merge partner
This commit is contained in:
		| @ -13,7 +13,7 @@ import { SupplyManagementUpdatePriceComponent } from '../update-price/update-pri | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-supply-management-bulk', | ||||
|   templateUrl: './bulk.component.html', | ||||
|   templateUrl: './bulk.component.html' | ||||
| }) | ||||
| export class SupplyManagementBulkComponent implements OnInit { | ||||
|   resourceStatus: any; | ||||
| @ -31,10 +31,10 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   @ViewChild('sfFre', { static: false }) sfFre!: SFComponent; | ||||
|  | ||||
|   tabs = { | ||||
|   tabs: any = { | ||||
|     totalQuantity: 0, | ||||
|     cancelQuantity: 0, | ||||
|     completedQuantity: 0, | ||||
|     receivedQuantity: 0, | ||||
|     stayQuantity: 0 | ||||
|   }; | ||||
|   constructor( | ||||
| @ -42,41 +42,41 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|     private modal: NzModalService, | ||||
|     private router: Router, | ||||
|     public shipperservice: ShipperBaseService | ||||
|     ) { } | ||||
|   ) {} | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|     this.initSF(); | ||||
|     this.initST(); | ||||
|     this.initSFFre(); | ||||
|     this.getGoodsSourceStatistical() | ||||
|     this.getGoodsSourceStatistical(); | ||||
|   } | ||||
|   /** | ||||
|  * 查询参数 | ||||
|  */ | ||||
|    get reqParams() { | ||||
|     const a:any = {}; | ||||
|     if(this.resourceStatus) { | ||||
|       a.resourceStatus = this.resourceStatus  | ||||
|    * 查询参数 | ||||
|    */ | ||||
|   get reqParams() { | ||||
|     const a: any = {}; | ||||
|     if (this.resourceStatus) { | ||||
|       a.resourceStatus = this.resourceStatus; | ||||
|     } | ||||
|     const params: any = Object.assign({}, this.sf?.value || {}); | ||||
|     delete params._$expand; | ||||
|     return {  | ||||
|     return { | ||||
|       ...a, | ||||
|       ...params, | ||||
|       releaseTime: { | ||||
|         start: this.sf?.value?.releaseTime?.[0] || '', | ||||
|         end: this.sf?.value?.releaseTime?.[1] || '', | ||||
|         end: this.sf?.value?.releaseTime?.[1] || '' | ||||
|       }, | ||||
|       deadlineTime: { | ||||
|         start: this.sf?.value?.deadlineTime?.[0] || '', | ||||
|         end: this.sf?.value?.deadlineTime?.[1] || '', | ||||
|       }, | ||||
|      }; | ||||
|         end: this.sf?.value?.deadlineTime?.[1] || '' | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|   beforeReq = (requestOptions: STRequestOptions) => { | ||||
|     const a:any = {}; | ||||
|     if(this.resourceStatus) { | ||||
|       a.resourceStatus = this.resourceStatus  | ||||
|     const a: any = {}; | ||||
|     if (this.resourceStatus) { | ||||
|       a.resourceStatus = this.resourceStatus; | ||||
|     } | ||||
|     const params: any = Object.assign({}, this.sf?.value || {}); | ||||
|     delete params._$expand; | ||||
| @ -86,12 +86,12 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|         ...params, | ||||
|         releaseTime: { | ||||
|           start: this.sf?.value?.releaseTime?.[0] || '', | ||||
|           end: this.sf?.value?.releaseTime?.[1] || '', | ||||
|           end: this.sf?.value?.releaseTime?.[1] || '' | ||||
|         }, | ||||
|         deadlineTime: { | ||||
|           start: this.sf?.value?.deadlineTime?.[0] || '', | ||||
|           end: this.sf?.value?.deadlineTime?.[1] || '', | ||||
|         }, | ||||
|           end: this.sf?.value?.deadlineTime?.[1] || '' | ||||
|         } | ||||
|       }); | ||||
|     } | ||||
|     this.loading = true; | ||||
| @ -99,19 +99,19 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|   }; | ||||
|   search() { | ||||
|     this.st?.load(); | ||||
|     this.getGoodsSourceStatistical() | ||||
|     this.getGoodsSourceStatistical(); | ||||
|   } | ||||
|   afterRes = (data: any[], rawData?: any) => { | ||||
|     console.log(data) | ||||
|     this.loading = false | ||||
|     console.log(data); | ||||
|     this.loading = false; | ||||
|     return data.map(item => ({ | ||||
|       ...item, | ||||
|       disabled: item.auditStatus !== '1'  | ||||
|       disabled: item.auditStatus !== '1' | ||||
|     })); | ||||
|   }; | ||||
|   /** | ||||
|  * 初始化查询表单 | ||||
|  */ | ||||
|    * 初始化查询表单 | ||||
|    */ | ||||
|   initSF() { | ||||
|     this.schema = { | ||||
|       properties: { | ||||
| @ -134,26 +134,26 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|           default: '', | ||||
|           ui: { | ||||
|             widget: 'dict-select', | ||||
|             containsAllLable: true, | ||||
|             containsAllLabel: true, | ||||
|             params: { dictKey: 'service:type' }, | ||||
|             containAllLable:true, | ||||
|             containAllLable: true, | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|             }, | ||||
|           } as SFSelectWidgetSchema, | ||||
|               _$expand: (value: boolean) => value | ||||
|             } | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         settlementBasis: { | ||||
|           title: '结算依据', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'dict-select', | ||||
|             containsAllLable: true, | ||||
|             containsAllLabel: true, | ||||
|             params: { dictKey: 'goodresource:settlement:type' }, | ||||
|             containAllLable:true, | ||||
|             containAllLable: true, | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|             }, | ||||
|           } as SFSelectWidgetSchema, | ||||
|               _$expand: (value: boolean) => value | ||||
|             } | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         releaseTime: { | ||||
|           title: '发布时间', | ||||
| @ -163,10 +163,10 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|             mode: 'range', | ||||
|             format: 'yyyy-MM-dd', | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|               _$expand: (value: boolean) => value | ||||
|             }, | ||||
|             allowClear: true, | ||||
|           } as SFDateWidgetSchema, | ||||
|             allowClear: true | ||||
|           } as SFDateWidgetSchema | ||||
|         }, | ||||
|         deadlineTime: { | ||||
|           title: '截止时间', | ||||
| @ -176,10 +176,10 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|             mode: 'range', | ||||
|             format: 'yyyy-MM-dd', | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|               _$expand: (value: boolean) => value | ||||
|             }, | ||||
|             allowClear: true, | ||||
|           } as SFDateWidgetSchema, | ||||
|             allowClear: true | ||||
|           } as SFDateWidgetSchema | ||||
|         }, | ||||
|         enterpriseInfoId: { | ||||
|           type: 'string', | ||||
| @ -188,11 +188,11 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|               _$expand: (value: boolean) => value | ||||
|             }, | ||||
|             allowClear: true, | ||||
|             asyncData: () => this.shipperservice.getNetworkFreightForwarder(), | ||||
|           }, | ||||
|             asyncData: () => this.shipperservice.getNetworkFreightForwarder() | ||||
|           } | ||||
|         }, | ||||
|         shipperAppUserId: { | ||||
|           type: 'string', | ||||
| @ -207,20 +207,20 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|             }, | ||||
|             allowClear: true, | ||||
|             onSearch: (q: any) => { | ||||
|               let str =q.replace(/^\s+|\s+$/g,""); | ||||
|               let str = q.replace(/^\s+|\s+$/g, ''); | ||||
|               if (str) { | ||||
|                 return this.service | ||||
|                   .request(this.service.$api_enterpriceList, { enterpriseName: str}) | ||||
|                   .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) | ||||
|                   .request(this.service.$api_enterpriceList, { enterpriseName: str }) | ||||
|                   .pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) | ||||
|                   .toPromise(); | ||||
|               } else { | ||||
|                 return of([]); | ||||
|               } | ||||
|             }, | ||||
|           } as SFSelectWidgetSchema, | ||||
|         }, | ||||
|             } | ||||
|           } as SFSelectWidgetSchema | ||||
|         } | ||||
|       }, | ||||
|       type: 'object', | ||||
|       type: 'object' | ||||
|     }; | ||||
|     this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; | ||||
|   } | ||||
| @ -228,24 +228,24 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|     this.freightSchema = { | ||||
|       properties: { | ||||
|         remarks: { | ||||
|         title: '备注', | ||||
|         type: 'string', | ||||
|         maxLength: 50, | ||||
|         ui: { | ||||
|           placeholder: '请输入备注', | ||||
|           widget: 'textarea', | ||||
|         }, | ||||
|       }, | ||||
|     } | ||||
|   }; | ||||
|   this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 16 } } }; | ||||
|           title: '备注', | ||||
|           type: 'string', | ||||
|           maxLength: 50, | ||||
|           ui: { | ||||
|             placeholder: '请输入备注', | ||||
|             widget: 'textarea' | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }; | ||||
|     this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 16 } } }; | ||||
|   } | ||||
|   /** | ||||
|    * 初始化数据列表 | ||||
|    */ | ||||
|   initST() { | ||||
|     this.columns = [ | ||||
|       { title: '', type: 'checkbox',   fixed: 'left', width: '50px', className: 'text-center' }, | ||||
|       { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, | ||||
|       { | ||||
|         title: '货源编号', | ||||
|         width: '200px', | ||||
| @ -261,13 +261,14 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|       { | ||||
|         title: '装货地', | ||||
|         className: 'text-left', | ||||
|         index: 'loadingAddressArr',  | ||||
|         width: '200px', | ||||
|       }, { | ||||
|         index: 'loadingAddressArr', | ||||
|         width: '200px' | ||||
|       }, | ||||
|       { | ||||
|         title: '卸货地', | ||||
|         className: 'text-left', | ||||
|         index: 'unloadingAddressArr',  | ||||
|         width: '200px', | ||||
|         index: 'unloadingAddressArr', | ||||
|         width: '200px' | ||||
|       }, | ||||
|       { | ||||
|         title: '用车需求', | ||||
| @ -286,25 +287,25 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|         title: '结算依据', | ||||
|         className: 'text-left', | ||||
|         width: '200px', | ||||
|         index: 'settlementBasisLabel', | ||||
|         index: 'settlementBasisLabel' | ||||
|       }, | ||||
|       { | ||||
|         title: '货源状态', | ||||
|         className: 'text-left', | ||||
|         index: 'resourceStatusLabel', | ||||
|         width: '120px', | ||||
|         width: '120px' | ||||
|       }, | ||||
|       { | ||||
|         title: '截止时间', | ||||
|         width: '170px', | ||||
|         className: 'text-left', | ||||
|         index: 'deadlineTime', | ||||
|         index: 'deadlineTime' | ||||
|       }, | ||||
|       { | ||||
|         title: '发布时间', | ||||
|         width: '170px', | ||||
|         className: 'text-left', | ||||
|         index: 'createTime', | ||||
|         index: 'createTime' | ||||
|       }, | ||||
|       { | ||||
|         title: '审核状态', | ||||
| @ -316,8 +317,8 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|           '1': { text: '待审核', color: 'warning' }, | ||||
|           '2': { text: '审核通过', color: 'success' }, | ||||
|           '3': { text: '不通过', color: 'default' }, | ||||
|           '4': { text: '已取消', color: 'default' }, | ||||
|         }, | ||||
|           '4': { text: '已取消', color: 'default' } | ||||
|         } | ||||
|       }, | ||||
|       { | ||||
|         title: '操作', | ||||
| @ -327,36 +328,35 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|         buttons: [ | ||||
|           { | ||||
|             text: '货源审核', | ||||
|             click: (_record) => this.audit(_record, 1), | ||||
|             click: _record => this.audit(_record, 1), | ||||
|             iif: item => item.auditStatus === '1', | ||||
|             acl: { ability: ['SUPPLY-INDEX-bulkBatchAudit'] }, | ||||
|             acl: { ability: ['SUPPLY-INDEX-bulkBatchAudit'] } | ||||
|           }, | ||||
|           {  | ||||
|           { | ||||
|             text: '二维码', | ||||
|             click: (_record) => this.assignedQrcode(_record), | ||||
|             iif: item => item.resourceStatus == 1, | ||||
|             click: _record => this.assignedQrcode(_record), | ||||
|             iif: item => item.resourceStatus == 1 | ||||
|           }, | ||||
|           { | ||||
|             text: '修改单价', | ||||
|             click: (_record) => this.modification(_record), | ||||
|             iif: item => item.resourceStatus == 1 , | ||||
|             acl: { ability: ['SUPPLY-INDEX-modificationUnitPrice'] }, | ||||
|             click: _record => this.modification(_record), | ||||
|             iif: item => item.resourceStatus == 1, | ||||
|             acl: { ability: ['SUPPLY-INDEX-modificationUnitPrice'] } | ||||
|           }, | ||||
|           { | ||||
|             text: '取消货源', | ||||
|             click: (_record) => this.delOne(_record), | ||||
|             click: _record => this.delOne(_record), | ||||
|             iif: item => item.resourceStatus == 1, | ||||
|             acl: { ability: ['SUPPLY-INDEX-bulkCancelSupply'] }, | ||||
|             acl: { ability: ['SUPPLY-INDEX-bulkCancelSupply'] } | ||||
|           }, | ||||
|           { | ||||
|             text: '再下一单', | ||||
|             click: (_record) => this.nextOrder(_record), | ||||
|             acl: { ability: ['SUPPLY-INDEX-bulkPlaceOrder'] }, | ||||
|             click: _record => this.nextOrder(_record), | ||||
|             acl: { ability: ['SUPPLY-INDEX-bulkPlaceOrder'] } | ||||
|           }, | ||||
|           {type: 'divider'}, | ||||
|  | ||||
|         ], | ||||
|       }, | ||||
|           { type: 'divider' } | ||||
|         ] | ||||
|       } | ||||
|     ]; | ||||
|   } | ||||
|   add(): void { | ||||
| @ -371,8 +371,8 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|     return Object.keys(this.schema?.properties || {}).length; | ||||
|   } | ||||
|   /** | ||||
|   * 伸缩查询条件 | ||||
|   */ | ||||
|    * 伸缩查询条件 | ||||
|    */ | ||||
|   expandToggle(): void { | ||||
|     this._$expand = !this._$expand; | ||||
|     this.sf?.setValue('/_$expand', this._$expand); | ||||
| @ -386,15 +386,15 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|     this._$expand = false; | ||||
|   } | ||||
|   get selectedRows() { | ||||
|     return this.st?.list.filter((item) => item.checked) || []; | ||||
|     return this.st?.list.filter(item => item.checked) || []; | ||||
|   } | ||||
|  | ||||
|   selectChange(e: number) { | ||||
|     console.log(e); | ||||
|     if(e == 2) { | ||||
|     this.resourceStatus = 4; | ||||
|     if (e == 2) { | ||||
|       this.resourceStatus = 4; | ||||
|     } else { | ||||
|     this.resourceStatus = e; | ||||
|       this.resourceStatus = e; | ||||
|     } | ||||
|     this.initST(); | ||||
|     setTimeout(() => { | ||||
| @ -402,104 +402,103 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|     }, 500); | ||||
|   } | ||||
|  | ||||
|  | ||||
|   /** | ||||
|   * 二维码 | ||||
|   */ | ||||
|    * 二维码 | ||||
|    */ | ||||
|   assignedQrcode(item: any) { | ||||
|     const modalRef = this.modal.create({ | ||||
|       nzTitle: '二维码', | ||||
|       nzWidth: '468px', | ||||
|       nzContent: SupplyManagementQrcodePageComponent, | ||||
|       nzComponentParams: { | ||||
|         i: item, | ||||
|         i: item | ||||
|       }, | ||||
|       nzFooter: null, | ||||
|       nzFooter: null | ||||
|     }); | ||||
|   } | ||||
|   tabChange(item: any) { | ||||
|     console.log(item) | ||||
|     console.log(item); | ||||
|   } | ||||
|    /** | ||||
|   * 审核 | ||||
|   * status : 1 单个  2:批量 | ||||
|   * value : 单个单条数据 | ||||
|   */ | ||||
|     audit(value: any, status?: any) { | ||||
|       console.log(value) | ||||
|       console.log(status) | ||||
|       if(status === 2) { | ||||
|         if(this.selectedRows.length <= 0) { | ||||
|           this.service.msgSrv.error('未选择货源单!'); | ||||
|           return | ||||
|         } | ||||
|         let list: any[] = []; | ||||
|         this.selectedRows.forEach(item => { | ||||
|           list.push(item.id); | ||||
|         }); | ||||
|         this.auditID = list; | ||||
|         this.auditMany = true; | ||||
|       } else { | ||||
|         this.auditID = value.id | ||||
|         this.auditMany = false; | ||||
|   /** | ||||
|    * 审核 | ||||
|    * status : 1 单个  2:批量 | ||||
|    * value : 单个单条数据 | ||||
|    */ | ||||
|   audit(value: any, status?: any) { | ||||
|     console.log(value); | ||||
|     console.log(status); | ||||
|     if (status === 2) { | ||||
|       if (this.selectedRows.length <= 0) { | ||||
|         this.service.msgSrv.error('未选择货源单!'); | ||||
|         return; | ||||
|       } | ||||
|       this.isVisible = true; | ||||
|       let list: any[] = []; | ||||
|       this.selectedRows.forEach(item => { | ||||
|         list.push(item.id); | ||||
|       }); | ||||
|       this.auditID = list; | ||||
|       this.auditMany = true; | ||||
|     } else { | ||||
|       this.auditID = value.id; | ||||
|       this.auditMany = false; | ||||
|     } | ||||
|       /** | ||||
|   * 审核关闭弹窗 | ||||
|   */ | ||||
|   handleCancel(type: any) { | ||||
|     this.isVisible = false | ||||
|     this.isVisible = true; | ||||
|   } | ||||
|    /** | ||||
|   /** | ||||
|    * 审核关闭弹窗 | ||||
|    */ | ||||
|   handleCancel(type: any) { | ||||
|     this.isVisible = false; | ||||
|   } | ||||
|   /** | ||||
|    * 代发货源 | ||||
|    */ | ||||
|     releaseGoods() { | ||||
|       this.router.navigate(['/supply-management/bulk-release']); | ||||
|     } | ||||
|   /** | ||||
|   * 审核通过按钮 | ||||
|   */ | ||||
|   handleOK(value: any) { | ||||
|     if(this.auditMany === false) {  | ||||
|     const params: any = { | ||||
|       id: this.auditID, | ||||
|       remarks: this.sfFre.value.remarks, | ||||
|     } | ||||
|     if(value == 1) { | ||||
|       params.auditStatus = 2 | ||||
|     } else { | ||||
|       params.auditStatus = 3 | ||||
|     } | ||||
|     console.log(params) | ||||
|     this.service.request(this.service.$api_goodsResourceAudit, params).subscribe(res => { | ||||
|       if (res === true) { | ||||
|         this.service.msgSrv.success('审核成功!'); | ||||
|         this.isVisible = false; | ||||
|         this.st?.reload(); | ||||
|         this.getGoodsSourceStatistical(); | ||||
|       } | ||||
|     }) | ||||
|   } else { | ||||
|     const params: any = { | ||||
|       ids: this.auditID, | ||||
|       remarks: this.sfFre.value.remarks, | ||||
|     } | ||||
|     if(value == 1) { | ||||
|       params.auditStatus = 2 | ||||
|     } else { | ||||
|       params.auditStatus = 3 | ||||
|     } | ||||
|     console.log(params) | ||||
|     this.service.request(this.service.$api_batchGoodsResourceAudit, params).subscribe(res => { | ||||
|       if (res === true) { | ||||
|         this.service.msgSrv.success('审核成功!'); | ||||
|         this.isVisible = false; | ||||
|         this.st?.reload(); | ||||
|         this.getGoodsSourceStatistical(); | ||||
|       } | ||||
|     }) | ||||
|   releaseGoods() { | ||||
|     this.router.navigate(['/supply-management/bulk-release']); | ||||
|   } | ||||
|   /** | ||||
|    * 审核通过按钮 | ||||
|    */ | ||||
|   handleOK(value: any) { | ||||
|     if (this.selectedRows.length <= 0) { | ||||
|       const params: any = { | ||||
|         id: this.auditID, | ||||
|         remarks: this.sfFre.value.remarks | ||||
|       }; | ||||
|       if (value == 1) { | ||||
|         params.auditStatus = 2; | ||||
|       } else { | ||||
|         params.auditStatus = 3; | ||||
|       } | ||||
|       console.log(params); | ||||
|       this.service.request(this.service.$api_goodsResourceAudit, params).subscribe(res => { | ||||
|         if (res === true) { | ||||
|           this.service.msgSrv.success('审核成功!'); | ||||
|           this.isVisible = false; | ||||
|           this.st?.reload(); | ||||
|           this.getGoodsSourceStatistical(); | ||||
|         } | ||||
|       }); | ||||
|     } else { | ||||
|       const params: any = { | ||||
|         ids: this.auditID, | ||||
|         remarks: this.sfFre.value.remarks | ||||
|       }; | ||||
|       if (value == 1) { | ||||
|         params.auditStatus = 2; | ||||
|       } else { | ||||
|         params.auditStatus = 3; | ||||
|       } | ||||
|       console.log(params); | ||||
|       this.service.request(this.service.$api_batchGoodsResourceAudit, params).subscribe(res => { | ||||
|         if (res === true) { | ||||
|           this.service.msgSrv.success('审核成功!'); | ||||
|           this.isVisible = false; | ||||
|           this.st?.reload(); | ||||
|           this.getGoodsSourceStatistical(); | ||||
|         } | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
|   // 修改单价 | ||||
|   modification(item: any) { | ||||
| @ -508,16 +507,16 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|       nzWidth: '600px', | ||||
|       nzContent: SupplyManagementUpdatePriceComponent, | ||||
|       nzComponentParams: { | ||||
|         record: item, | ||||
|         record: item | ||||
|       }, | ||||
|       nzFooter: null, | ||||
|       nzFooter: null | ||||
|     }); | ||||
|     modalRef.afterClose.subscribe(res => { | ||||
|       if (res) { | ||||
|         this.st?.reload(); | ||||
|         this.getGoodsSourceStatistical(); | ||||
|       } | ||||
|     }) | ||||
|     }); | ||||
|   } | ||||
|   // getGoodsSourceDetail() { | ||||
|   //   this.service.request(this.service.$api_get_bulk_detail, { id: this.id }).subscribe(res => { | ||||
| @ -531,8 +530,8 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|     this.router.navigate(['/supply-management/bulk-amend', item.id], { | ||||
|       queryParams: { | ||||
|         sta: 4 | ||||
|       }, | ||||
|     }) | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|   //  取消货源 | ||||
|   delOne(item: any) { | ||||
| @ -540,39 +539,39 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|       nzTitle: '<b>确定取消货源吗?</b>', | ||||
|       nzContent: `<b>取消后不可恢复,谨慎操作</b>`, | ||||
|       nzOnOk: () => | ||||
|         this.service.request(this.service.$api_cancelSource, {id: item.id}).subscribe((res) => { | ||||
|           if(res) { | ||||
|             this.service.msgSrv.success('已取消货源!') | ||||
|         this.service.request(this.service.$api_cancelSource, { id: item.id }).subscribe(res => { | ||||
|           if (res) { | ||||
|             this.service.msgSrv.success('已取消货源!'); | ||||
|             this.st?.reload(); | ||||
|             this.getGoodsSourceStatistical(); | ||||
|           } | ||||
|         }) | ||||
|     }) | ||||
|   | ||||
|     }); | ||||
|   } | ||||
|     // 获取货源状态统计 | ||||
|     getGoodsSourceStatistical() { | ||||
|       this.tabs = { | ||||
|         totalQuantity: 0, | ||||
|         cancelQuantity: 0, | ||||
|         completedQuantity: 0, | ||||
|         stayQuantity: 0 | ||||
|       }; | ||||
|       const params: any = Object.assign({}, this.reqParams || {}); | ||||
|       delete params.resourceStatus | ||||
|       this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 2, ...params }).subscribe(res => { | ||||
|         if (res) { | ||||
|           console.log(res) | ||||
|           this.tabs = res; | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|       // 导出 | ||||
|    exportFire() { | ||||
|     this.service.request(this.service.$api_asyncExportBulkList,  this.reqParams ).subscribe((res: any) => { | ||||
|       if(res) { | ||||
|         this.service.msgSrv.success('导出成功,请去下载中心下载!') | ||||
|   // 获取货源状态统计 | ||||
|   getGoodsSourceStatistical() { | ||||
|     this.tabs = { | ||||
|       totalQuantity: 0, | ||||
|       cancelQuantity: 0, | ||||
|       receivedQuantity: 0, | ||||
|       stayQuantity: 0 | ||||
|     }; | ||||
|     const params: any = Object.assign({}, this.reqParams || {}); | ||||
|     delete params.resourceStatus; | ||||
|     this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 2, ...params }).subscribe(res => { | ||||
|       if (res) { | ||||
|         console.log(res); | ||||
|         this.tabs = res; | ||||
|       } | ||||
|     }) | ||||
|     }); | ||||
|   } | ||||
|   userAction() {} | ||||
|   // 导出 | ||||
|   exportFire() { | ||||
|     this.service.request(this.service.$api_asyncExportBulkList, this.reqParams).subscribe((res: any) => { | ||||
|       if (res) { | ||||
|         this.service.msgSrv.success('导出成功,请去下载中心下载!'); | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user