edit
This commit is contained in:
		| @ -28,66 +28,56 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; |   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||||
|   @ViewChild('sfView', { static: false }) sfView!: SFComponent; |   @ViewChild('sfView', { static: false }) sfView!: SFComponent; | ||||||
|   columns: STColumn[] = []; |   columns: STColumn[] = []; | ||||||
|   datass: any = [ |   tabs = [ | ||||||
|     { |     { | ||||||
|     one: '1', |  | ||||||
|     two: '1', |  | ||||||
|     three: '1', |  | ||||||
|     id: 1 |  | ||||||
|    }, |  | ||||||
|     { |  | ||||||
|     one: '2', |  | ||||||
|     two: '2', |  | ||||||
|     three: '2', |  | ||||||
|     id: 2 |  | ||||||
|    }, |  | ||||||
| ]; |  | ||||||
|   tabs = [  { |  | ||||||
|       name: '全部', |       name: '全部', | ||||||
|       type: 5, |       type: 5, | ||||||
|     count: 0, |       count: 0 | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       name: '待申诉', |       name: '待申诉', | ||||||
|       type: 5, |       type: 5, | ||||||
|     count: 0, |       count: 0 | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       name: '申诉中', |       name: '申诉中', | ||||||
|       type: 5, |       type: 5, | ||||||
|     count: 0, |       count: 0 | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       name: '申诉成功', |       name: '申诉成功', | ||||||
|       type: 5, |       type: 5, | ||||||
|     count: 0, |       count: 0 | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       name: '申诉失败', |       name: '申诉失败', | ||||||
|       type: 5, |       type: 5, | ||||||
|     count: 0, |       count: 0 | ||||||
|   }, |     } | ||||||
|   ]; |   ]; | ||||||
|   constructor(public service: SupplyManagementService, public service2: ShipperBaseService, private modal: NzModalService, public router: Router) { } |   constructor( | ||||||
|  |     public service: SupplyManagementService, | ||||||
|  |     public service2: ShipperBaseService, | ||||||
|  |     private modal: NzModalService, | ||||||
|  |     public router: Router | ||||||
|  |   ) {} | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 查询参数 |    * 查询参数 | ||||||
|    */ |    */ | ||||||
|   get reqParams() { |   get reqParams() { | ||||||
|     return { |     return { | ||||||
|       ...this.sf?.value, |       ...this.sf?.value | ||||||
|     }; |     }; | ||||||
|   } |   } | ||||||
|   get selectedRows() { |   get selectedRows() { | ||||||
|     return this.st?.list.filter((item) => item.checked) || []; |     return this.st?.list.filter(item => item.checked) || []; | ||||||
|   } |   } | ||||||
|   ngOnInit(): void { |   ngOnInit(): void { | ||||||
|     this.initSF(); |     this.initSF(); | ||||||
|     this.initST(); |     this.initST(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 初始化查询表单 |    * 初始化查询表单 | ||||||
|    */ |    */ | ||||||
| @ -97,7 +87,7 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|         _$expand: { type: 'boolean', ui: { hidden: true } }, |         _$expand: { type: 'boolean', ui: { hidden: true } }, | ||||||
|         billCode: { |         billCode: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '订单号', |           title: '订单号' | ||||||
|         }, |         }, | ||||||
|         resourceCode: { |         resourceCode: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
| @ -112,8 +102,8 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|           title: '装货地', |           title: '装货地', | ||||||
|           ui: { |           ui: { | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               _$expand: (value: boolean) => value, |               _$expand: (value: boolean) => value | ||||||
|             }, |             } | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         dischargePlace: { |         dischargePlace: { | ||||||
| @ -121,8 +111,8 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|           title: '卸货地', |           title: '卸货地', | ||||||
|           ui: { |           ui: { | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               _$expand: (value: boolean) => value, |               _$expand: (value: boolean) => value | ||||||
|             }, |             } | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         // driverName: { |         // driverName: { | ||||||
| @ -145,26 +135,25 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|             onSearch: (q: any) => { |             onSearch: (q: any) => { | ||||||
|               if (!!q) { |               if (!!q) { | ||||||
|                 return this.service |                 return this.service | ||||||
|                   .request(this.service.$api_get_getDriverInfo, { keyword: q, |                   .request(this.service.$api_get_getDriverInfo, { keyword: q, model: 1, type: 1 }) | ||||||
|                   model: 1, type: 1 }) |                   .pipe(map(res => (res as any[]).map(i => ({ label: i.name, value: i.id } as SFSchemaEnum)))) | ||||||
|                   .pipe(map((res) => (res as any[]).map((i) => ({ label: i.name, value: i.id } as SFSchemaEnum)))) |  | ||||||
|                   .toPromise(); |                   .toPromise(); | ||||||
|               } else { |               } else { | ||||||
|                 return of([]); |                 return of([]); | ||||||
|               } |               } | ||||||
|             }, |             }, | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               expand: (value: boolean) => value, |               _$expand: (value: boolean) => value | ||||||
|             }, |             } | ||||||
|           } as SFSelectWidgetSchema, |           } as SFSelectWidgetSchema | ||||||
|         }, |         }, | ||||||
|         no9: { |         no9: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '车牌号', |           title: '车牌号', | ||||||
|           ui: { |           ui: { | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               _$expand: (value: boolean) => value, |               _$expand: (value: boolean) => value | ||||||
|             }, |             } | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         no10: { |         no10: { | ||||||
| @ -172,8 +161,8 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|           title: '收款人', |           title: '收款人', | ||||||
|           ui: { |           ui: { | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               _$expand: (value: boolean) => value, |               _$expand: (value: boolean) => value | ||||||
|             }, |             } | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         wayBillType: { |         wayBillType: { | ||||||
| @ -184,9 +173,9 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|             params: { dictKey: 'goodresourceType' }, |             params: { dictKey: 'goodresourceType' }, | ||||||
|             containAllLable: true, |             containAllLable: true, | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               _$expand: (value: boolean) => value, |               _$expand: (value: boolean) => value | ||||||
|             }, |             } | ||||||
|           } as SFSelectWidgetSchema, |           } as SFSelectWidgetSchema | ||||||
|         }, |         }, | ||||||
|         shipperId: { |         shipperId: { | ||||||
|           title: '托运人', |           title: '托运人', | ||||||
| @ -196,9 +185,9 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|             params: { dictKey: 'BulkFreightUnitPriceType' }, |             params: { dictKey: 'BulkFreightUnitPriceType' }, | ||||||
|             containAllLable: true, |             containAllLable: true, | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               _$expand: (value: boolean) => value, |               _$expand: (value: boolean) => value | ||||||
|             }, |             } | ||||||
|           } as SFSelectWidgetSchema, |           } as SFSelectWidgetSchema | ||||||
|         }, |         }, | ||||||
|         enterpriseInfoName: { |         enterpriseInfoName: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
| @ -207,11 +196,11 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|             widget: 'select', |             widget: 'select', | ||||||
|             placeholder: '请选择', |             placeholder: '请选择', | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               _$expand: (value: boolean) => value, |               _$expand: (value: boolean) => value | ||||||
|             }, |             }, | ||||||
|             allowClear: true, |             allowClear: true, | ||||||
|             asyncData: () => this.service2.getNetworkFreightForwarder(), |             asyncData: () => this.service2.getNetworkFreightForwarder() | ||||||
|           }, |           } | ||||||
|         }, |         }, | ||||||
|         createTime: { |         createTime: { | ||||||
|           title: '创建时间', |           title: '创建时间', | ||||||
| @ -221,12 +210,12 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|             mode: 'range', |             mode: 'range', | ||||||
|             format: 'yyyy-MM-dd', |             format: 'yyyy-MM-dd', | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               _$expand: (value: boolean) => value, |               _$expand: (value: boolean) => value | ||||||
|  |             } | ||||||
|  |           } as SFDateWidgetSchema | ||||||
|  |         } | ||||||
|       }, |       }, | ||||||
|           } as SFDateWidgetSchema, |       type: 'object' | ||||||
|         }, |  | ||||||
|       }, |  | ||||||
|       type: 'object', |  | ||||||
|     }; |     }; | ||||||
|     this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; |     this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; | ||||||
|   } |   } | ||||||
| @ -253,7 +242,7 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|         title: '异常信息', |         title: '异常信息', | ||||||
|         width: '100px', |         width: '100px', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|         index: 'abnormalCause', |         index: 'abnormalCause' | ||||||
|       }, |       }, | ||||||
|       { title: '托运人', index: 'shipperName', width: '120px', className: 'text-center' }, |       { title: '托运人', index: 'shipperName', width: '120px', className: 'text-center' }, | ||||||
|       { title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' }, |       { title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' }, | ||||||
| @ -261,33 +250,31 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|         title: '运费明细', |         title: '运费明细', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|         width: '120px', |         width: '120px', | ||||||
|         render: 'billExpenseDetailVOList', |         render: 'billExpenseDetailVOList' | ||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
|         title: '服务类型', |         title: '服务类型', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|         width: '120px', |         width: '120px', | ||||||
|         index: 'serviceTypeLabel', |         index: 'serviceTypeLabel' | ||||||
|       }, { |       }, | ||||||
|  |       { | ||||||
|         title: '装货地', |         title: '装货地', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|         width: '180px', |         width: '180px', | ||||||
|         index: 'loadingPlace', |         index: 'loadingPlace' | ||||||
|  |  | ||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
|         title: '卸货地', |         title: '卸货地', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|         width: '180px', |         width: '180px', | ||||||
|         index: 'dischargePlace', |         index: 'dischargePlace' | ||||||
|  |  | ||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
|         title: '货物信息', |         title: '货物信息', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|         width: '180px', |         width: '180px', | ||||||
|         render: 'goodsInfoVOList', |         render: 'goodsInfoVOList' | ||||||
|  |  | ||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
|         title: '承运司机', |         title: '承运司机', | ||||||
| @ -315,14 +302,14 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|         buttons: [ |         buttons: [ | ||||||
|           { |           { | ||||||
|             text: '审核', |             text: '审核', | ||||||
|             click: (_record) => this.audit(_record), |             click: _record => this.audit(_record) | ||||||
|           }, |           }, | ||||||
|           { |           { | ||||||
|             text: '详情', |             text: '详情', | ||||||
|             click: (_record) => this.viewEvaluate(_record), |             click: _record => this.viewEvaluate(_record) | ||||||
|           }, |           } | ||||||
|         ], |         ] | ||||||
|       }, |       } | ||||||
|     ]; |     ]; | ||||||
|   } |   } | ||||||
|   initSTAudit(value: number) { |   initSTAudit(value: number) { | ||||||
| @ -334,8 +321,8 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|             type: 'string', |             type: 'string', | ||||||
|             default: this.auditId, |             default: this.auditId, | ||||||
|             ui: { |             ui: { | ||||||
|               widget: 'text', |               widget: 'text' | ||||||
|             }, |             } | ||||||
|           }, |           }, | ||||||
|           representationsCause: { |           representationsCause: { | ||||||
|             title: '备注', |             title: '备注', | ||||||
| @ -345,9 +332,9 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|               placeholder: '通过可以不用填写原因 ,拒绝必须说明原因', |               placeholder: '通过可以不用填写原因 ,拒绝必须说明原因', | ||||||
|               widget: 'textarea', |               widget: 'textarea', | ||||||
|               autosize: { minRows: 3, maxRows: 6 } |               autosize: { minRows: 3, maxRows: 6 } | ||||||
|             }, |             } | ||||||
|           }, |           } | ||||||
|         }, |         } | ||||||
|       }; |       }; | ||||||
|     } else { |     } else { | ||||||
|       this.schemaView = { |       this.schemaView = { | ||||||
| @ -357,8 +344,8 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|             type: 'string', |             type: 'string', | ||||||
|             default: `已选${this.selectedRows?.length}条订单`, |             default: `已选${this.selectedRows?.length}条订单`, | ||||||
|             ui: { |             ui: { | ||||||
|               widget: 'text', |               widget: 'text' | ||||||
|             }, |             } | ||||||
|           }, |           }, | ||||||
|           representationsCause: { |           representationsCause: { | ||||||
|             title: '备注', |             title: '备注', | ||||||
| @ -368,9 +355,9 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|               placeholder: '通过可以不用填写原因 ,拒绝必须说明原因', |               placeholder: '通过可以不用填写原因 ,拒绝必须说明原因', | ||||||
|               widget: 'textarea', |               widget: 'textarea', | ||||||
|               autosize: { minRows: 3, maxRows: 6 } |               autosize: { minRows: 3, maxRows: 6 } | ||||||
|             }, |             } | ||||||
|           }, |           } | ||||||
|         }, |         } | ||||||
|       }; |       }; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -390,7 +377,7 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|     this.sf?.setValue('/_$expand', this._$expand); |     this.sf?.setValue('/_$expand', this._$expand); | ||||||
|   } |   } | ||||||
|   tabChange(item: any) { |   tabChange(item: any) { | ||||||
|     console.log(item) |     console.log(item); | ||||||
|   } |   } | ||||||
|   /** |   /** | ||||||
|    * 重置表单 |    * 重置表单 | ||||||
| @ -400,18 +387,15 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|     this._$expand = false; |     this._$expand = false; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|   // 获取录单员 |   // 获取录单员 | ||||||
|   getCatalogueMember() { |   getCatalogueMember() { | ||||||
|     const params = { |     const params = {}; | ||||||
|     }; |  | ||||||
|     return this.service.request(this.service.$api_get_catalogue_member, params, 'GET').pipe( |     return this.service.request(this.service.$api_get_catalogue_member, params, 'GET').pipe( | ||||||
|       map((res) => { |       map(res => { | ||||||
|         if (res) { |         if (res) { | ||||||
|           console.log(res) |           console.log(res); | ||||||
|         } |         } | ||||||
|       }), |       }) | ||||||
|     ); |     ); | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @ -421,74 +405,70 @@ export class OrderManagementRiskComponent implements OnInit { | |||||||
|   /** |   /** | ||||||
|    * 导入货源 |    * 导入货源 | ||||||
|    */ |    */ | ||||||
|   importGoodsSource() { |   importGoodsSource() {} | ||||||
|  |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   /* |   /* | ||||||
|    * 审核关闭弹窗 |    * 审核关闭弹窗 | ||||||
|    */ |    */ | ||||||
|   handleCancel() { |   handleCancel() { | ||||||
|     this.isVisibleRE = false |     this.isVisibleRE = false; | ||||||
|   } |   } | ||||||
|   /** |   /** | ||||||
|    * 审核通过按钮 |    * 审核通过按钮 | ||||||
|    */ |    */ | ||||||
|   handleOK() { |   handleOK() { | ||||||
|     console.log(this.sfView.value) |     console.log(this.sfView.value); | ||||||
|     const parms = { |     const parms = { | ||||||
|       id: this.sfView.value.billCode, |       id: this.sfView.value.billCode, | ||||||
|       representationsCause: this.sfView.value.representationsCause, |       representationsCause: this.sfView.value.representationsCause | ||||||
|     } |     }; | ||||||
|     this.service.request(this.service.$api_get_catalogue_member, parms).subscribe((res) => { |     this.service.request(this.service.$api_get_catalogue_member, parms).subscribe(res => { | ||||||
|       console.log(res) |       console.log(res); | ||||||
|       if (res) { |       if (res) { | ||||||
|         this.service.msgSrv.success('审核通过!') |         this.service.msgSrv.success('审核通过!'); | ||||||
|        this.isVisibleRE = false |         this.isVisibleRE = false; | ||||||
|       } else { |       } else { | ||||||
|         this.service.msgSrv.error(res.msg) |         this.service.msgSrv.error(res.msg); | ||||||
|  |  | ||||||
|       } |       } | ||||||
|     }) |     }); | ||||||
|   } |   } | ||||||
|   /** |   /** | ||||||
|    * 审核拒绝按钮 |    * 审核拒绝按钮 | ||||||
|    */ |    */ | ||||||
|   reject() { |   reject() { | ||||||
|     console.log(this.sfView.value) |     console.log(this.sfView.value); | ||||||
|     const parms = { |     const parms = { | ||||||
|       id: this.sfView.value.billCode, |       id: this.sfView.value.billCode, | ||||||
|       representationsCause: this.sfView.value.representationsCause, |       representationsCause: this.sfView.value.representationsCause | ||||||
|     } |     }; | ||||||
|     this.service.request(this.service.$api_get_catalogue_member, parms).subscribe((res) => { |     this.service.request(this.service.$api_get_catalogue_member, parms).subscribe(res => { | ||||||
|       console.log(res) |       console.log(res); | ||||||
|       if (res) { |       if (res) { | ||||||
|         this.service.msgSrv.success('审核通过!') |         this.service.msgSrv.success('审核通过!'); | ||||||
|        this.isVisibleRE = false |         this.isVisibleRE = false; | ||||||
|       } else { |       } else { | ||||||
|         this.service.msgSrv.error(res.msg) |         this.service.msgSrv.error(res.msg); | ||||||
|  |  | ||||||
|       } |       } | ||||||
|     }) |     }); | ||||||
|   } |   } | ||||||
|   /** |   /** | ||||||
|    *审核 |    *审核 | ||||||
|    */ |    */ | ||||||
|   audit(item?: any) { |   audit(item?: any) { | ||||||
|     this.isVisibleRE = true |     this.isVisibleRE = true; | ||||||
|     if (item) { |     if (item) { | ||||||
|       this.auditId = item.id; |       this.auditId = item.id; | ||||||
|       this.initSTAudit(1); |       this.initSTAudit(1); | ||||||
|     } else { |     } else { | ||||||
|       this.initSTAudit(2); |       this.initSTAudit(2); | ||||||
|     } |     } | ||||||
|     console.log(item) |     console.log(item); | ||||||
|   } |   } | ||||||
|   /** |   /** | ||||||
|    *查看详情 |    *查看详情 | ||||||
|    */ |    */ | ||||||
|   viewEvaluate(item: any) { |   viewEvaluate(item: any) { | ||||||
|     console.log(item) |     console.log(item); | ||||||
|     this.router.navigate(['/order-management/risk-detail', item.id]) |     this.router.navigate(['/order-management/risk-detail', item.id]); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user