Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
		| @ -172,6 +172,8 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|               type: 'default', | ||||
|               onClick: () => { | ||||
|                 tipsModal.destroy(); | ||||
|                 this.st?.reload(); | ||||
|                 this.getGoodsSourceStatistical(); | ||||
|               } | ||||
|             }, | ||||
|             { | ||||
| @ -182,10 +184,14 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|                 if(!result?.failNumber) { | ||||
|                   this.service.msgSrv.error('没有失败数据!'); | ||||
|                   tipsModal.destroy(); | ||||
|                   this.st?.reload(); | ||||
|                   this.getGoodsSourceStatistical(); | ||||
|                   return; | ||||
|                 } | ||||
|                 this.service.downloadFile(this.service.$api_getFailUploadGoodsOperateResource, result.ids) | ||||
|                 tipsModal.destroy(); | ||||
|                 this.st?.reload(); | ||||
|                 this.getGoodsSourceStatistical(); | ||||
|               } | ||||
|             }, | ||||
|           ] | ||||
| @ -194,51 +200,6 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * 修改运费 | ||||
|    */ | ||||
|   updateFreight(item: any) { | ||||
|     const modalRef = this.modal.create({ | ||||
|       nzTitle: '货源导入', | ||||
|       nzWidth: 600, | ||||
|       nzContent: SupplyManagementImportSupplyComponent, | ||||
|       nzComponentParams: { | ||||
|         // i: item | ||||
|       }, | ||||
|       nzFooter: null | ||||
|     }); | ||||
|     modalRef.afterClose.subscribe(result => { | ||||
|       if (result) { | ||||
|         const tipsModal = this.modal.create({ | ||||
|           nzTitle: '上传提示', | ||||
|           nzWidth: 600, | ||||
|           nzContent: `<div>文件上传完成!成功<span class="text-blue-dark">${result?.successNumber}</span>条,失败<span class="text-red-dark">${result?.failNumber}</span>条!</div>`, | ||||
|           nzFooter: [ | ||||
|             { | ||||
|               label: '取 消', | ||||
|               type: 'default', | ||||
|               onClick: () => { | ||||
|                 tipsModal.destroy(); | ||||
|               } | ||||
|             }, | ||||
|             { | ||||
|               label: '下载失败数据', | ||||
|               type: 'primary', | ||||
|               onClick: () => { | ||||
|                 this.service.downloadFile(this.service.$api_getFailUploadGoodsOperateResource, result.ids); | ||||
|                 // this.service.request(this.service.$api_getFailUploadGoodsOperateResource, result.ids).subscribe((res: any) => { | ||||
|                 //   if (res) { | ||||
|                 //     console.log(res); | ||||
|                 //   } | ||||
|                 // }); | ||||
|                 console.log(111); | ||||
|               } | ||||
|             } | ||||
|           ] | ||||
|         }); | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * 重新指派 | ||||
|  | ||||
| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2021-12-03 11:10:14 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-03-11 10:35:44 | ||||
|  * @LastEditTime : 2022-04-13 10:41:09 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\supply-management\\model\\import-supply\\import-supply.component.html | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
| --> | ||||
| @ -51,5 +51,5 @@ | ||||
| </div> | ||||
| <div class="modal-footer text-right"> | ||||
|   <button nz-button type="button" (click)="close()">取消</button> | ||||
|   <button nz-button type="submit" nzType="primary" (click)="save()">确定</button> | ||||
|   <button nz-button type="submit" nzType="primary"  [nzLoading]="load" (click)="save()">确定</button> | ||||
| </div> | ||||
|  | ||||
| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2022-03-01 15:13:03 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-03-11 10:33:44 | ||||
|  * @LastEditTime : 2022-04-13 10:41:08 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\supply-management\\model\\import-supply\\import-supply.component.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| @ -31,6 +31,7 @@ export class SupplyManagementImportSupplyComponent implements OnInit { | ||||
|   status: boolean = true | ||||
|   files2: any; | ||||
|   schema: SFSchema = {}; | ||||
|   load = false | ||||
|   ui: SFUISchema = {}; | ||||
|   networkTransporter: any; // 网络货运人id | ||||
|   uploadUrl = apiConf.file_upload_url; | ||||
| @ -154,12 +155,11 @@ export class SupplyManagementImportSupplyComponent implements OnInit { | ||||
|       }); | ||||
|   } | ||||
|   save(): void { | ||||
|     console.log(this?.networkTransporter) | ||||
|     console.log(this.sf.value) | ||||
|     if(!this.sf.value?.shipperAppUserId || !this?.networkTransporter || !this.sf.value?.enterpriseProjectId || !this.sf.value?.fileName) { | ||||
|       this.service.msgSrv.error('请填写必填项并上传文件!') | ||||
|       return | ||||
|     } | ||||
|     this.load =true; | ||||
|     const formData : any= new FormData(); | ||||
|     this.files?.forEach((file: any) => { | ||||
|       formData.append('file', file); | ||||
| @ -172,6 +172,7 @@ export class SupplyManagementImportSupplyComponent implements OnInit { | ||||
|     this.service.request(this.service.$api_goodsResourceOperateImport, formData).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.service.msgSrv.success('导入成功'); | ||||
|        this.load =false; | ||||
|         this.modal.destroy({ ...res }); | ||||
|       } | ||||
|     }); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user