fix bug
This commit is contained in:
		| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2021-12-24 16:58:02 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-02-28 11:58:21 | ||||
|  * @LastEditTime : 2022-02-28 12:01:57 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| @ -566,14 +566,14 @@ initSF3() { | ||||
|             placeholder: '请选择', | ||||
|             errors: { required: '请选择货物类型' }, | ||||
|             asyncData: () => | ||||
|             this.shipperservice.loadConfigByKey('goods.name.config.type').pipe( | ||||
|               this.service.loadConfigByKey('goods.name.config.type').pipe( | ||||
|                 map((data: any) => { | ||||
|                   return data[0].children?.map((m: any) => { | ||||
|                     return { label: m.name, value: m.id }; | ||||
|                   }); | ||||
|                 }) | ||||
|               ), | ||||
|           change: (value: any, data: any) => { | ||||
|             change: (value, data: any) => { | ||||
|               this.changeGoodsType(value, data); | ||||
|               this.sf3.setValue('/goodsTypeName', data.label); | ||||
|             } | ||||
| @ -626,43 +626,11 @@ initSF3() { | ||||
|     }; | ||||
|     this.ui3 = { | ||||
|       '*': { | ||||
|       spanLabelFixed: 110, | ||||
|       grid: { span: 12 } | ||||
|     }, | ||||
|     $goodsName: { | ||||
|       grid: { span: 12 } | ||||
|     }, | ||||
|     $qita: { | ||||
|         spanLabelFixed: 90, | ||||
|         grid: { span: 12 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
| changeGoodsType(value: string, data: any) { | ||||
|   if (data.label === '其它') return; | ||||
|   const params = { | ||||
|     pageIndex: 1, | ||||
|     pageSize: 100, | ||||
|     configId: value | ||||
|   }; | ||||
|   this.service | ||||
|     .request(this.service.$api_get_config_item_page, params) | ||||
|     .pipe( | ||||
|       map(data => { | ||||
|         return data.records?.map((m: any) => { | ||||
|           return { label: m.name, value: m.id }; | ||||
|         }); | ||||
|       }) | ||||
|     ) | ||||
|     .subscribe(res => { | ||||
|       if (res) { | ||||
|         this.sf3.getProperty('/goodsNameId')!.schema.enum = res; | ||||
|         this.sf3.getProperty('/goodsNameId')!.widget?.reset(res); | ||||
|         if (this.sf3data.goodsNameId) { | ||||
|           this.sf3.setValue('/goodsNameId', this.sf3data.goodsNameId); | ||||
|         } | ||||
|       } | ||||
|     }); | ||||
| } | ||||
|   initSF4() { | ||||
|     this.schema4 = { | ||||
|       properties: { | ||||
| @ -691,104 +659,42 @@ initSF4() { | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|       carmand: { | ||||
|         carModel: { | ||||
|           type: 'string', | ||||
|         title: '用车需求', | ||||
|           title: '车型/车长', | ||||
|           ui: { | ||||
|           widget: 'custom', | ||||
|           placeholder: '请输入' | ||||
|             widget: 'select', | ||||
|             mode: 'multiple', | ||||
|             maxMultipleCount:3, | ||||
|             placeholder: '请选择车型', | ||||
|             errors: { required: '请选择车型' }, | ||||
|             asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }), | ||||
|             change:(tag:any , org:any)=>{ | ||||
|               if(tag.includes("999")){ | ||||
|                 this.sf4.setValue('/carModel',["999"]); | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|       drivers: { | ||||
|         carLength: { | ||||
|           type: 'string', | ||||
|         title: '承运司机', | ||||
|           title: '', | ||||
|           ui: { | ||||
|           widget: 'custom', | ||||
|           placeholder: '请输入' | ||||
|             widget: 'select', | ||||
|             mode: 'multiple', | ||||
|             maxMultipleCount:3, | ||||
|             placeholder: '请选择车长', | ||||
|             errors: { required: '请选择车长' }, | ||||
|             asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }), | ||||
|             change:(tag:any , org:any)=>{ | ||||
|               if(tag.includes("999")){ | ||||
|                 this.sf4.setValue('/carModel',["999"]); | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|       weightModel: { | ||||
|         type: 'string', | ||||
|         title: '车型车长承重', | ||||
|         ui: { | ||||
|           widget: 'custom', | ||||
|           placeholder: '请输入' | ||||
|         } | ||||
|       }, | ||||
|     loadTime: { | ||||
|         type: 'string', | ||||
|         title: '发车时间', | ||||
|         ui: { | ||||
|           widget: 'custom', | ||||
|           placeholder: '请输入' | ||||
|         } | ||||
|       }, | ||||
|       unloadTime: { | ||||
|         type: 'string', | ||||
|         title: '到车时间', | ||||
|         ui: { | ||||
|           widget: 'custom', | ||||
|           placeholder: '请输入' | ||||
|         } | ||||
|       }, | ||||
|       acceptWeight: { | ||||
|         type: 'number', | ||||
|         title: '装货重量', | ||||
|         minimum:0, | ||||
|         maximum:99999, | ||||
|         ui: { | ||||
|           unit: '吨', | ||||
|           placeholder: '请输入', | ||||
|           grid: { | ||||
|             span: 12 | ||||
|           }, | ||||
|           hideStep: true, | ||||
|         } as SFNumberWidgetSchema | ||||
|       }, | ||||
|       acceptVolume: { | ||||
|         type: 'number', | ||||
|         title: '装货体积', | ||||
|         minimum:0, | ||||
|         maximum:99999, | ||||
|         ui: { | ||||
|           unit: '吨', | ||||
|           placeholder: '请输入', | ||||
|           grid: { | ||||
|             span: 12 | ||||
|           }, | ||||
|           hideStep: true, | ||||
|         } as SFNumberWidgetSchema | ||||
|       }, | ||||
|       settlementWeight: { | ||||
|         type: 'number', | ||||
|         title: '卸货重量', | ||||
|         minimum:0, | ||||
|         maximum:99999, | ||||
|         ui: { | ||||
|           unit: '吨', | ||||
|           placeholder: '请输入', | ||||
|           grid: { | ||||
|             span: 12 | ||||
|           }, | ||||
|           hideStep: true, | ||||
|         } as SFNumberWidgetSchema | ||||
|       }, | ||||
|       settlementVolume: { | ||||
|         type: 'number', | ||||
|         title: '卸货体积', | ||||
|         minimum:0, | ||||
|         maximum:99999, | ||||
|         ui: { | ||||
|           unit: '吨', | ||||
|           placeholder: '请输入', | ||||
|           grid: { | ||||
|             span: 12 | ||||
|           }, | ||||
|           hideStep: true, | ||||
|         } as SFNumberWidgetSchema | ||||
|       } | ||||
|     }, | ||||
|     required: ['weight','loadTime','unloadTime'] | ||||
|       required: ['weight', 'carModel', 'carLength'] | ||||
|     }; | ||||
|     this.ui4 = { | ||||
|       '*': { | ||||
| @ -796,32 +702,208 @@ initSF4() { | ||||
|         grid: { span: 24 } | ||||
|       }, | ||||
|       $weight: { | ||||
|       grid: { span: 8 } | ||||
|         grid: { lg: 8, md: 12, sm: 12, xs: 24 } | ||||
|       }, | ||||
|       $volume: { | ||||
|       grid: { span: 8 } | ||||
|         grid: { lg: 8, md: 12, sm: 12, xs: 24 } | ||||
|       }, | ||||
|       $number: { | ||||
|         grid: { lg: 8, md: 12, sm: 12, xs: 24 } | ||||
|       }, | ||||
|       $carModel: { | ||||
|         spanLabelFixed: 100, | ||||
|         grid: { span: 8 } | ||||
|       }, | ||||
|     $carmand: { | ||||
|       grid: { span: 24 } | ||||
|     }, | ||||
|     $weightModel: { | ||||
|       spanLabelFixed: 120, | ||||
|       grid: { span: 12 } | ||||
|     }, | ||||
|     $drivers: { | ||||
|       grid: { span: 12 } | ||||
|     }, | ||||
|     $loadTime: { | ||||
|       grid: { span: 12 } | ||||
|     }, | ||||
|     $unloadTime: { | ||||
|       grid: { span: 12 } | ||||
|     }, | ||||
|       $carLength: { | ||||
|         grid: { span: 8 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
| changeGoodsType(value: string, data: any) { | ||||
|   if (data.label === '其它') return; | ||||
|   const params = { | ||||
|     pageIndex: 1, | ||||
|     pageSize: 100, | ||||
|     configId: value | ||||
|   }; | ||||
|   this.service | ||||
|     .request(this.service.$api_get_config_item_page, params) | ||||
|     .pipe( | ||||
|       map(data => { | ||||
|         return data.records?.map((m: any) => { | ||||
|           return { label: m.name, value: m.id }; | ||||
|         }); | ||||
|       }) | ||||
|     ) | ||||
|     .subscribe(res => { | ||||
|       if (res) { | ||||
|         this.sf3.getProperty('/goodsNameId')!.schema.enum = res; | ||||
|         this.sf3.getProperty('/goodsNameId')!.widget?.reset(res); | ||||
|         if (this.sf3data.goodsNameId) { | ||||
|           this.sf3.setValue('/goodsNameId', this.sf3data.goodsNameId); | ||||
|         } | ||||
|       } | ||||
|     }); | ||||
| } | ||||
| // initSF4() { | ||||
| //   this.schema4 = { | ||||
| //     properties: { | ||||
| //       weight: { | ||||
| //         type: 'string', | ||||
| //         title: '货物数量', | ||||
| //         ui: { | ||||
| //           widget: 'custom', | ||||
| //           placeholder: '请输入', | ||||
| //           errors: { required: '必填项' } | ||||
| //         } | ||||
| //       }, | ||||
| //       volume: { | ||||
| //         type: 'string', | ||||
| //         title: '', | ||||
| //         ui: { | ||||
| //           widget: 'custom', | ||||
| //           placeholder: '请输入' | ||||
| //         } | ||||
| //       }, | ||||
| //       number: { | ||||
| //         type: 'string', | ||||
| //         title: '', | ||||
| //         ui: { | ||||
| //           widget: 'custom', | ||||
| //           placeholder: '请输入' | ||||
| //         } | ||||
| //       }, | ||||
| //       carmand: { | ||||
| //         type: 'string', | ||||
| //         title: '用车需求', | ||||
| //         ui: { | ||||
| //           widget: 'custom', | ||||
| //           placeholder: '请输入' | ||||
| //         } | ||||
| //       }, | ||||
| //       drivers: { | ||||
| //         type: 'string', | ||||
| //         title: '承运司机', | ||||
| //         ui: { | ||||
| //           widget: 'custom', | ||||
| //           placeholder: '请输入' | ||||
| //         } | ||||
| //       }, | ||||
| //       weightModel: { | ||||
| //         type: 'string', | ||||
| //         title: '车型车长承重', | ||||
| //         ui: { | ||||
| //           widget: 'custom', | ||||
| //           placeholder: '请输入' | ||||
| //         } | ||||
| //       }, | ||||
| //     loadTime: { | ||||
| //         type: 'string', | ||||
| //         title: '发车时间', | ||||
| //         ui: { | ||||
| //           widget: 'custom', | ||||
| //           placeholder: '请输入' | ||||
| //         } | ||||
| //       }, | ||||
| //       unloadTime: { | ||||
| //         type: 'string', | ||||
| //         title: '到车时间', | ||||
| //         ui: { | ||||
| //           widget: 'custom', | ||||
| //           placeholder: '请输入' | ||||
| //         } | ||||
| //       }, | ||||
| //       acceptWeight: { | ||||
| //         type: 'number', | ||||
| //         title: '装货重量', | ||||
| //         minimum:0, | ||||
| //         maximum:99999, | ||||
| //         ui: { | ||||
| //           unit: '吨', | ||||
| //           placeholder: '请输入', | ||||
| //           grid: { | ||||
| //             span: 12 | ||||
| //           }, | ||||
| //           hideStep: true, | ||||
| //         } as SFNumberWidgetSchema | ||||
| //       }, | ||||
| //       acceptVolume: { | ||||
| //         type: 'number', | ||||
| //         title: '装货体积', | ||||
| //         minimum:0, | ||||
| //         maximum:99999, | ||||
| //         ui: { | ||||
| //           unit: '吨', | ||||
| //           placeholder: '请输入', | ||||
| //           grid: { | ||||
| //             span: 12 | ||||
| //           }, | ||||
| //           hideStep: true, | ||||
| //         } as SFNumberWidgetSchema | ||||
| //       }, | ||||
| //       settlementWeight: { | ||||
| //         type: 'number', | ||||
| //         title: '卸货重量', | ||||
| //         minimum:0, | ||||
| //         maximum:99999, | ||||
| //         ui: { | ||||
| //           unit: '吨', | ||||
| //           placeholder: '请输入', | ||||
| //           grid: { | ||||
| //             span: 12 | ||||
| //           }, | ||||
| //           hideStep: true, | ||||
| //         } as SFNumberWidgetSchema | ||||
| //       }, | ||||
| //       settlementVolume: { | ||||
| //         type: 'number', | ||||
| //         title: '卸货体积', | ||||
| //         minimum:0, | ||||
| //         maximum:99999, | ||||
| //         ui: { | ||||
| //           unit: '吨', | ||||
| //           placeholder: '请输入', | ||||
| //           grid: { | ||||
| //             span: 12 | ||||
| //           }, | ||||
| //           hideStep: true, | ||||
| //         } as SFNumberWidgetSchema | ||||
| //       } | ||||
| //     }, | ||||
| //     required: ['weight','loadTime','unloadTime'] | ||||
| //   }; | ||||
| //   this.ui4 = { | ||||
| //     '*': { | ||||
| //       spanLabelFixed: 90, | ||||
| //       grid: { span: 24 } | ||||
| //     }, | ||||
| //     $weight: { | ||||
| //       grid: { span: 8 } | ||||
| //     }, | ||||
| //     $volume: { | ||||
| //       grid: { span: 8 } | ||||
| //     }, | ||||
| //     $number: { | ||||
| //       grid: { span: 8 } | ||||
| //     }, | ||||
| //     $carmand: { | ||||
| //       grid: { span: 24 } | ||||
| //     }, | ||||
| //     $weightModel: { | ||||
| //       spanLabelFixed: 120, | ||||
| //       grid: { span: 12 } | ||||
| //     }, | ||||
| //     $drivers: { | ||||
| //       grid: { span: 12 } | ||||
| //     }, | ||||
| //     $loadTime: { | ||||
| //       grid: { span: 12 } | ||||
| //     }, | ||||
| //     $unloadTime: { | ||||
| //       grid: { span: 12 } | ||||
| //     }, | ||||
| //   }; | ||||
| // } | ||||
| // 处理上传图片 | ||||
| handlePreview1 = async (file: NzUploadFile) => { | ||||
|   if (!file.url && !file.preview) { | ||||
|  | ||||
| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2021-12-03 15:31:52 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-02-24 20:20:23 | ||||
|  * @LastEditTime : 2022-02-28 12:01:42 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| @ -190,6 +190,22 @@ export class OrderManagementService extends ShipperBaseService { | ||||
|       }) | ||||
|     ); | ||||
|   } | ||||
|     /** | ||||
|    * 获取车型、车长字典数据 | ||||
|    * @returns | ||||
|    */ | ||||
|      getDictOptions(params = {}) { | ||||
|       return this.request(this.$api_getDictValue, params).pipe( | ||||
|         map((res: any) => { | ||||
|           if (!res) { | ||||
|             return []; | ||||
|           } | ||||
|           const obj = []; | ||||
|           obj.push({ label: '不限', value: '999' }); | ||||
|           return [...obj, ...res]; | ||||
|         }) | ||||
|       ); | ||||
|     } | ||||
|   constructor(public injector: Injector, public eaCacheSrv: EACacheService) { | ||||
|     super(injector, eaCacheSrv); | ||||
|   } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user