|  |  | 
 |  |  |         <FormItem label="片区描述" prop="description"> | 
 |  |  |           <Input v-model="areaForm.description" /> | 
 |  |  |         </FormItem> | 
 |  |  |         <FormItem label="配送员" prop="userId"> | 
 |  |  |           <Select v-model="areaForm.userId" filterable> | 
 |  |  |             <Option :value="0" :key="0" selected>请选择</Option> | 
 |  |  |             <Option v-for="item in userList" :value="item.id">{{ item.nickname }}</Option> | 
 |  |  |         <!--<FormItem label="配送员" prop="userId">--> | 
 |  |  |           <!--<Select v-model="areaForm.userId" filterable>--> | 
 |  |  |             <!--<Option :value="0" :key="0" selected>请选择</Option>--> | 
 |  |  |             <!--<Option v-for="item in userList" :value="item.id">{{ item.nickname }}</Option>--> | 
 |  |  |           <!--</Select>--> | 
 |  |  |         <!--</FormItem>--> | 
 |  |  |         <FormItem label="配送车辆" prop="carId"> | 
 |  |  |           <Select v-model="areaForm.carId" filterable> | 
 |  |  |             <Option value="" key="" selected>请选择</Option> | 
 |  |  |             <Option v-for="item in carList" :value="item.id">{{ item.carNo }}</Option> | 
 |  |  |           </Select> | 
 |  |  |         </FormItem> | 
 |  |  |       </Form> | 
 |  |  | 
 |  |  |         <FormItem label="商户名称" prop="name"> | 
 |  |  |           <Input v-model="customerForm.name" /> | 
 |  |  |         </FormItem> | 
 |  |  |         <FormItem label="商户编号" prop="code"> | 
 |  |  |           <Input v-model="customerForm.code" /> | 
 |  |  |         </FormItem> | 
 |  |  |         <!--<FormItem label="商户编号" prop="code">--> | 
 |  |  |           <!--<Input v-model="customerForm.code" />--> | 
 |  |  |         <!--</FormItem>--> | 
 |  |  |  | 
 |  |  |         <Row :gutter="0"> | 
 |  |  |           <Col span="12"> | 
 |  |  | 
 |  |  |           </Col> | 
 |  |  |         </Row> | 
 |  |  |         <Row :gutter="0"> | 
 |  |  |           <Col span="12"> | 
 |  |  |             <Form-item label="上次配送日期" prop="lastTime"> | 
 |  |  |               <Row> | 
 |  |  |                 <Col> | 
 |  |  |                   <Date-picker @on-change="change1" type="date" value="yyyy-MM-dd" placeholder="选择日期" v-model="customerForm.lastTime"></Date-picker> | 
 |  |  |                 </Col> | 
 |  |  |               </Row> | 
 |  |  |             </Form-item> | 
 |  |  |           </Col> | 
 |  |  |           <!--<Col span="12">--> | 
 |  |  |             <!--<Form-item label="上次配送日期" prop="lastTime">--> | 
 |  |  |               <!--<Row>--> | 
 |  |  |                 <!--<Col>--> | 
 |  |  |                   <!--<Date-picker @on-change="change1" type="date" value="yyyy-MM-dd" placeholder="选择日期" v-model="customerForm.lastTime"></Date-picker>--> | 
 |  |  |                 <!--</Col>--> | 
 |  |  |               <!--</Row>--> | 
 |  |  |             <!--</Form-item>--> | 
 |  |  |           <!--</Col>--> | 
 |  |  |           <Col span="12"> | 
 |  |  |             <FormItem label="联系方式" prop="phone"> | 
 |  |  |               <Input v-model="customerForm.phone"/> | 
 |  |  | 
 |  |  |       modalTitle: "", | 
 |  |  |       modalTitle2: "", | 
 |  |  |       modalTitle3: "", | 
 |  |  |       carList:[], | 
 |  |  |       searchForm: { | 
 |  |  |         // 搜索框初始化对象 | 
 |  |  |         pageNumber: 1, // 当前页数 | 
 |  |  | 
 |  |  |       areaForm: { | 
 |  |  |       }, | 
 |  |  |       customerForm: { | 
 |  |  |         kstatus : 1 | 
 |  |  |       }, | 
 |  |  |       areaSectionForm: { | 
 |  |  |       }, | 
 |  |  | 
 |  |  |           } | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           title: "配送人", | 
 |  |  |           key: "nickName", | 
 |  |  |           title: "配送车辆", | 
 |  |  |           key: "carNo", | 
 |  |  |           width: 200, | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  | 
 |  |  |           key: "phone", | 
 |  |  |           width: 135, | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           title: "状态", | 
 |  |  |           key: "status", | 
 |  |  |           width:100, | 
 |  |  |           render: (h, params) => { | 
 |  |  |             let re = ""; | 
 |  |  |             if (params.row.status == 0) { | 
 |  |  |               return h("div", [ | 
 |  |  |                 h("Badge", { | 
 |  |  |                   props: { | 
 |  |  |                     status: "success", | 
 |  |  |                     text: "正常", | 
 |  |  |                   }, | 
 |  |  |                 }), | 
 |  |  |               ]); | 
 |  |  |             } else if (params.row.status == 1) { | 
 |  |  |               return h("div", [ | 
 |  |  |                 h("Badge", { | 
 |  |  |                   props: { | 
 |  |  |                     status: "error", | 
 |  |  |                     text: "不活跃", | 
 |  |  |                   }, | 
 |  |  |                 }), | 
 |  |  |               ]); | 
 |  |  |             } | 
 |  |  |           }, | 
 |  |  |         }, | 
 |  |  |         // { | 
 |  |  |         //   title: "状态", | 
 |  |  |         //   key: "status", | 
 |  |  |         //   width:100, | 
 |  |  |         //   render: (h, params) => { | 
 |  |  |         //     let re = ""; | 
 |  |  |         //     if (params.row.status == 0) { | 
 |  |  |         //       return h("div", [ | 
 |  |  |         //         h("Badge", { | 
 |  |  |         //           props: { | 
 |  |  |         //             status: "success", | 
 |  |  |         //             text: "正常", | 
 |  |  |         //           }, | 
 |  |  |         //         }), | 
 |  |  |         //       ]); | 
 |  |  |         //     } else if (params.row.status == 1) { | 
 |  |  |         //       return h("div", [ | 
 |  |  |         //         h("Badge", { | 
 |  |  |         //           props: { | 
 |  |  |         //             status: "error", | 
 |  |  |         //             text: "不活跃", | 
 |  |  |         //           }, | 
 |  |  |         //         }), | 
 |  |  |         //       ]); | 
 |  |  |         //     } | 
 |  |  |         //   }, | 
 |  |  |         // }, | 
 |  |  |         { | 
 |  |  |           title: "联系人", | 
 |  |  |           key: "linker", | 
 |  |  | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |     }, | 
 |  |  |     getAllCar(){ | 
 |  |  |       getAll().then((res)=>{ | 
 |  |  |         if (res.success){ | 
 |  |  |           this.carList=res.result; | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |     }, | 
 |  |  |     getAreaSectionList(areaId) { | 
 |  |  |       this.loading = true; | 
 |  |  |       this.searchForm.areaId=areaId; | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     submitCustomer() { | 
 |  |  |       this.$refs.areaSectionForm.validate((valid) => { | 
 |  |  |         this.customerForm.lastTime = this.lastTime; | 
 |  |  |         //this.customerForm.lastTime = this.lastTime; | 
 |  |  |         this.customerForm.areaSectionId = this.areaSectionId; | 
 |  |  |         this.customerForm.areaId = this.areaId; | 
 |  |  |         this.customerForm.kstatus = 1; | 
 |  |  |  | 
 |  |  |         if (valid) { | 
 |  |  |             this.$delete(this.customerForm,'receives') | 
 |  |  |           if (this.modalType == 0) { | 
 |  |  |             // 添加 | 
 |  |  |             this.submitLoading = true; | 
 |  |  |             this.customerForm.kstatus = 0; | 
 |  |  |             addCustomer(this.customerForm).then((res) => { | 
 |  |  |               this.submitLoading = false; | 
 |  |  |               if (res.success) { | 
 |  |  | 
 |  |  |       console.log(this.areaSectionId); | 
 |  |  |     }, | 
 |  |  |     addCar() { | 
 |  |  |       this.getAllUser(); | 
 |  |  |       //this.getAllUser(); | 
 |  |  |       this.getAllCar(); | 
 |  |  |       this.modalType = 0; | 
 |  |  |       this.modalTitle = "添加"; | 
 |  |  |       this.$refs.areaForm.resetFields(); | 
 |  |  | 
 |  |  |       this.addCustomerVisible = true; | 
 |  |  |     }, | 
 |  |  |     edit(v) { | 
 |  |  |       this.getAllUser(); | 
 |  |  |       //this.getAllUser(); | 
 |  |  |       this.getAllCar() | 
 |  |  |       this.modalType = 1; | 
 |  |  |       this.modalTitle = "编辑"; | 
 |  |  |       this.$refs.areaForm.resetFields(); |