提成优化修改、订单列表增加进粉字段、调理项目
This commit is contained in:
		| @@ -76,7 +76,7 @@ | ||||
|  | ||||
|       </el-table-column> | ||||
|       <el-table-column label="操作" align="center"> | ||||
|         <template slot-scope="scope"> | ||||
|         <template scope="scope"> | ||||
|           <el-button type="text" @click="openFormDialog('查看发放计划', scope.row)">查看发放计划</el-button> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
| @@ -94,10 +94,14 @@ | ||||
|     /> | ||||
|  | ||||
|  | ||||
|     <el-dialog title="提成发放计划" :visible.sync="sendCommissionPlanTable" width="25%" align="center"> | ||||
|       <el-table :data="sendCommissionPlan"> | ||||
|     <el-dialog title="提成发放计划" :visible.sync="sendCommissionPlanTable" width="40%" align="center"> | ||||
|       <el-table :data="sendCommissionPlan.list" show-summary  :summary-method="getSummaries"> | ||||
|         <el-table-column property="nickName" label="姓名" width="150"></el-table-column> | ||||
|         <el-table-column property="yearMonth" label="发放年月" width="200"></el-table-column> | ||||
|         <el-table-column property="yearMonth" label="提成月份" width="200"> | ||||
|           <template scope="scope"> | ||||
|             {{scope.row.yearMonth.substring(0, 4)}}年{{scope.row.yearMonth.substring(4)}}月 | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|         <el-table-column property="yearMonthCommission" label="提成金额" width="100"></el-table-column> | ||||
|       </el-table> | ||||
|     </el-dialog> | ||||
| @@ -154,7 +158,7 @@ | ||||
|           postId: null, | ||||
|         }, | ||||
|         sendCommissionPlanTable: false, | ||||
|         sendCommissionPlan:[] | ||||
|         sendCommissionPlan:{} | ||||
|       }; | ||||
|     }, | ||||
|     created() { | ||||
| @@ -249,15 +253,36 @@ | ||||
|         this.queryParams.userId = null; | ||||
|       }, | ||||
|       openFormDialog(title, row){ | ||||
|          this.sendCommissionPlan = row.sendDetailList; | ||||
|          this.sendCommissionPlan = {}; | ||||
|          var total = 0; | ||||
|          this.sendCommissionPlan.forEach(function(e){ | ||||
|               e.nickName = row.nickName; | ||||
|               e.yearMonth = e.yearMonth.substring(0,4) + "年" + e.yearMonth.substring(4)+"月"; | ||||
|               total += e.yearMonthCommission; | ||||
|          }); | ||||
|         //this.sendCommissionPlan.push({'': }) | ||||
|          if(row.sendDetailList != null){ | ||||
|            row.sendDetailList.forEach(function (e) { | ||||
|              e.nickName = row.nickName; | ||||
|              total += e.yearMonthCommission; | ||||
|            }); | ||||
|          } | ||||
|          this.sendCommissionPlan.list = row.sendDetailList; | ||||
|          this.sendCommissionPlan.total = row.totalNotSentCommissionAmount; | ||||
|          this.sendCommissionPlanTable = true; | ||||
|       }, | ||||
|       getSummaries(param) { | ||||
|         //param 是固定的对象,里面包含 columns与 data参数的对象 {columns: Array[4], data: Array[5]},包含了表格的所有的列与数据信息 | ||||
|         const { columns, data } = param; | ||||
|         const sums = []; | ||||
|         columns.forEach((column, index) => { | ||||
|           if (index === 0) { | ||||
|             sums[index] = '合计'; | ||||
|             return; | ||||
|           } | ||||
|           if(index == 1){ | ||||
|             sums[index] = data.length +"个月"; | ||||
|             return | ||||
|           } | ||||
|           if(index == 2){ | ||||
|             sums[index] = this.sendCommissionPlan.total; | ||||
|           } | ||||
|         }); | ||||
|         return sums; | ||||
|       } | ||||
|     } | ||||
|   }; | ||||
|   | ||||
| @@ -238,6 +238,7 @@ | ||||
|           {{scope.row.giveServeDay ? `${scope.row.giveServeDay}天` : '0天'}} | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="调理项目" align="center" prop="conditioningProject" width="120"/> | ||||
|       <el-table-column label="收款方式" align="center" prop="payType" width="120"/> | ||||
|       <el-table-column label="售前" align="center" prop="preSale" width="120"/> | ||||
|       <el-table-column label="售后" align="center" prop="afterSale" width="120"/> | ||||
| @@ -249,6 +250,11 @@ | ||||
|       <el-table-column label="运营" align="center" prop="operator" width="120"/> | ||||
|       <el-table-column label="运营助理" align="center" prop="operatorAssis" width="120"/> | ||||
|       <el-table-column label="推荐人" align="center" prop="recommender" width="120"/> | ||||
|       <el-table-column label="进粉时间" align="center" prop="becomeFanTime" width="120"> | ||||
|         <template slot-scope="scope"> | ||||
|           <span>{{ parseTime(scope.row.becomeFanTime, '{y}-{m}-{d}') }}</span> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="备注" align="center" prop="remark" width="120"/> | ||||
|       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300" fixed="right"> | ||||
|         <template slot-scope="scope"> | ||||
| @@ -364,6 +370,18 @@ | ||||
|               </el-select> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|           <el-col :span="8"> | ||||
|             <el-form-item label="调理项目" prop="conditioningProjectId"> | ||||
|               <el-select v-model="form.conditioningProjectId" placeholder="请选择"> | ||||
|                 <el-option | ||||
|                   v-for="dict in conditioningProjectIdOption" | ||||
|                   :key="dict.dictValue" | ||||
|                   :label="dict.dictLabel" | ||||
|                   :value="parseInt(dict.dictValue)" | ||||
|                 /> | ||||
|               </el-select> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|           <el-col :span="8"> | ||||
|             <el-form-item label="售前" prop="preSaleId"> | ||||
|               <el-select v-model="form.preSaleId" placeholder="请选择"> | ||||
| @@ -478,6 +496,21 @@ | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|           <el-col :span="12"> | ||||
|             <el-form-item label="进粉时间" prop="becomeFanTime"> | ||||
|               <el-date-picker | ||||
|                 style="width: 182.5px" | ||||
|                 v-model="form.becomeFanTime" | ||||
|                 type="date" | ||||
|                 placeholder="选择进粉时间" | ||||
|                 format="yyyy-MM-dd" | ||||
|                 value-format="yyyy-MM-dd" | ||||
|                 :picker-options="fanPickerOptions" | ||||
|               > | ||||
|               </el-date-picker> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|  | ||||
|           <el-col :span="10"> | ||||
|             <el-form-item label="成交时间" prop="orderTime"> | ||||
|               <el-date-picker | ||||
|                 style="width: 182.5px" | ||||
| @@ -572,6 +605,8 @@ | ||||
|         serveTimeIdOption: [], | ||||
|         // 赠送时长 | ||||
|         giveTimeIdOption: [], | ||||
|         //调理项目 | ||||
|         conditioningProjectIdOption:[], | ||||
|         // 审核状态 | ||||
|         reviewStatusOptions: [], | ||||
|         // 策划助理字典 | ||||
| @@ -618,7 +653,12 @@ | ||||
|           ], | ||||
|           startTime: [ | ||||
|             {required: true, message: "开始时间不能为空", trigger: "blur"} | ||||
|           ], | ||||
|           becomeFanTime: [ | ||||
|             {required: true, message: "进粉时间不能为空", trigger: "blur"} | ||||
|           ] | ||||
|  | ||||
|  | ||||
|           // payTypeId: [ | ||||
|           //   {required: true, message: "收款方式不能为空", trigger: "blur"} | ||||
|           // ], | ||||
| @@ -664,6 +704,11 @@ | ||||
|             return time.getTime() > Date.now(); | ||||
|           }, | ||||
|         }, | ||||
|         fanPickerOptions: { | ||||
|           disabledDate(time) { | ||||
|             return time.getTime() > Date.now(); | ||||
|           }, | ||||
|         }, | ||||
|         startPickerOptions: { | ||||
|           disabledDate(time) { | ||||
|             return time.getTime() < Date.now(); | ||||
| @@ -702,6 +747,9 @@ | ||||
|       this.getDicts("give_serve_daye_type").then(response => { | ||||
|         this.giveTimeIdOption = response.data; | ||||
|       }); | ||||
|       this.getDicts("conditioning_project").then(response => { | ||||
|         this.conditioningProjectIdOption = response.data; | ||||
|     }); | ||||
|       this.getDicts("cus_review_status").then(response => { | ||||
|         this.reviewStatusOptions = response.data; | ||||
|       }) | ||||
| @@ -767,6 +815,7 @@ | ||||
|         const defaultPayType = this.payTypeIdOptions.find(opt => opt.remark === 'default'); | ||||
|         const defaultServeTime = this.serveTimeIdOption.find(opt => opt.remark === 'default'); | ||||
|         const defaultGiveServeTime = this.giveTimeIdOption.find(opt => opt.remark === 'default'); | ||||
|         const defaultConditioningProjectIdOption = this.conditioningProjectIdOption.find(opt => opt.remark === 'default'); | ||||
|         const defaultAccount = this.accountIdOptions.find(opt => opt.remark === 'default'); | ||||
|         const defaultOperator = this.operatorIdOptions.find(opt => opt.remark === 'default'); | ||||
|         const defaultOperatorAssis = this.operatorAssisIdOptions.find(opt => opt.remark === 'default'); | ||||
| @@ -803,7 +852,9 @@ | ||||
|           orderTime: dayjs().format("YYYY-MM-DD HH:mm:ss"), | ||||
|           serveTimeId: defaultServeTime ? parseInt(defaultServeTime.dictValue) : null, | ||||
|           reviewStatus: this.review, | ||||
|           giveServeDay: defaultGiveServeTime ? parseInt(defaultGiveServeTime.dictValue) : null | ||||
|           giveServeDay: defaultGiveServeTime ? parseInt(defaultGiveServeTime.dictValue) : null, | ||||
|           conditioningProjectId: defaultConditioningProjectIdOption ? parseInt(defaultConditioningProjectIdOption.dictValue) : null, | ||||
|           becomeFanTime: dayjs().format("YYYY-MM-DD") | ||||
|         }; | ||||
|         this.resetForm("form"); | ||||
|       }, | ||||
| @@ -837,6 +888,9 @@ | ||||
|         getOrder(orderId).then(response => { | ||||
|           this.form = response.data; | ||||
|           this.form.giveServeDay = parseInt(this.form.giveServeDay+""); | ||||
|           if(this.form.becomeFanTime == null){ | ||||
|             this.form.becomeFanTime = this.form.orderTime; | ||||
|           } | ||||
|           this.open = true; | ||||
|           this.title = "修改销售订单"; | ||||
|         }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user