Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
		| @ -158,6 +158,9 @@ | ||||
|       <sv label="回单类型"> | ||||
|         {{ i?.supplementaryInformationVO?.receiptTypeLabel }} | ||||
|       </sv> | ||||
|       <sv label="联系人"> | ||||
|         {{ i?.supplementaryInformationVO?.receiptUserName ? i?.supplementaryInformationVO?.receiptUserName + '/' : '' }}  {{ i?.supplementaryInformationVO?.phon }} | ||||
|       </sv> | ||||
|       <sv label="所在地区"> | ||||
|         {{ i?.supplementaryInformationVO?.area }} | ||||
|       </sv> | ||||
|  | ||||
| @ -213,13 +213,13 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | ||||
|           } as SFSelectWidgetSchema | ||||
|         } | ||||
|       }, | ||||
|       required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoId', 'deadlineTime'] | ||||
|       required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName', 'deadlineTime'] | ||||
|     }; | ||||
|     this.ui1 = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 120, | ||||
|         grid: { span: 8 } | ||||
|       } | ||||
|         spanLabelFixed: 115, | ||||
|         grid: { span: 12 } | ||||
|       }, | ||||
|     }; | ||||
|   } | ||||
|   initSF3() { | ||||
| @ -289,7 +289,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | ||||
|           } | ||||
|         } | ||||
|       }, | ||||
|       required: ['goodsTypeId', 'goodsName', 'goodsNameId'] | ||||
|       required: ['goodsTypeId', 'goodsName', 'goodsNameId','goodsName1'] | ||||
|     }; | ||||
|     this.ui3 = { | ||||
|       '*': { | ||||
|  | ||||
| @ -7,13 +7,9 @@ | ||||
| </page-header-wrapper> | ||||
| <nz-card> | ||||
|   <div class="card-title">货源单设置</div> | ||||
|   <div nz-row> | ||||
|     <div nz-col nzSpan="12"> | ||||
|       <sf #sf1 [schema]="schema1" [button]="'none'" [ui]="ui1" [formData]="sf1data"> | ||||
|         <ng-template sf-template="enterpriseInfoName" let-i let-ui="ui"> {{ i.value }} </ng-template> | ||||
|       </sf> | ||||
|     </div> | ||||
|   </div> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card> | ||||
|  | ||||
| @ -315,7 +315,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { | ||||
|           } | ||||
|         } | ||||
|       }, | ||||
|       required: ['goodsTypeId', 'goodsName', 'goodsNameId'] | ||||
|       required: ['goodsTypeId', 'goodsName', 'goodsNameId','goodsName1'] | ||||
|     }; | ||||
|     this.ui3 = { | ||||
|       '*': { | ||||
|  | ||||
| @ -50,3 +50,7 @@ input[type='number']::-webkit-outer-spin-button { | ||||
|   margin: 0; | ||||
|   -webkit-appearance: none; | ||||
| } | ||||
| .hides { | ||||
|   margin-left: 10px; | ||||
|   color: aqua; | ||||
| } | ||||
|  | ||||
| @ -188,6 +188,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|             widget: 'text' | ||||
|           } | ||||
|         }, | ||||
|      | ||||
|         externalResourceCode: { | ||||
|           type: 'string', | ||||
|           title: '外部货源号', | ||||
| @ -231,14 +232,26 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|             }, | ||||
|             asyncData: () => this.shipperSrv.getStaffList2() | ||||
|           } as SFSelectWidgetSchema | ||||
|         } | ||||
|         }, | ||||
|       }, | ||||
|       required: ['shipperAppUserId', 'enterpriseProjectId'] | ||||
|     }; | ||||
|     this.ui1 = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 120, | ||||
|         grid: { span: 8 } | ||||
|         spanLabelFixed: 115, | ||||
|         grid: { span: 12 } | ||||
|       }, | ||||
|       $enterpriseInfoName: { | ||||
|         grid: { span: 12 } | ||||
|       }, | ||||
|       $shipperAppUserId: { | ||||
|         grid: { span: 12 } | ||||
|       }, | ||||
|       $enterpriseProjectId: { | ||||
|         grid: { span: 12 } | ||||
|       }, | ||||
|       $dispatchId: { | ||||
|         grid: { span: 12 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
| @ -309,7 +322,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|           } | ||||
|         } | ||||
|       }, | ||||
|       required: ['goodsTypeId', 'goodsName', 'goodsNameId'] | ||||
|       required: ['goodsTypeId', 'goodsName', 'goodsNameId','goodsName1'] | ||||
|     }; | ||||
|     this.ui3 = { | ||||
|       '*': { | ||||
|  | ||||
| @ -7,13 +7,9 @@ | ||||
| </page-header-wrapper> | ||||
| <nz-card> | ||||
|   <div class="card-title">货源单设置</div> | ||||
|   <div nz-row> | ||||
|     <div nz-col nzSpan="12"> | ||||
|       <sf #sf1 [schema]="schema1" [button]="'none'" [ui]="ui1" [formData]="sf1data"> | ||||
|         <ng-template sf-template="enterpriseInfoName" let-i let-ui="ui"> {{ i.value }} </ng-template> | ||||
|       </sf> | ||||
|     </div> | ||||
|   </div> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card> | ||||
|  | ||||
| @ -176,14 +176,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|             allowClear: true | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         //  enterpriseInfoName: { | ||||
|         //    type: 'string', | ||||
|         //    title: '网络货运人', | ||||
|         //    ui: { | ||||
|         //      widget: 'custom' | ||||
|         //    }, | ||||
|         //    default: '天津市怡亚通XXXX有限公司' | ||||
|         //  }, | ||||
|         enterpriseInfoName: { | ||||
|           type: 'string', | ||||
|           title: '网络货运人', | ||||
| @ -238,17 +230,26 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|             optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您', | ||||
|             asyncData: () => this.shipperSrv.getStaffList2() | ||||
|           } as SFSelectWidgetSchema | ||||
|         } | ||||
|         }, | ||||
|       }, | ||||
|       required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName'] | ||||
|     }; | ||||
|     this.ui1 = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 110, | ||||
|         spanLabelFixed: 115, | ||||
|         grid: { span: 12 } | ||||
|       }, | ||||
|       $enterpriseInfoName: { | ||||
|         grid: { span: 24 } | ||||
|         grid: { span: 12 } | ||||
|       }, | ||||
|       $shipperAppUserId: { | ||||
|         grid: { span: 12 } | ||||
|       }, | ||||
|       $enterpriseProjectId: { | ||||
|         grid: { span: 12 } | ||||
|       }, | ||||
|       $dispatchId: { | ||||
|         grid: { span: 12 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|  | ||||
| @ -163,7 +163,32 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|     }); | ||||
|     modalRef.afterClose.subscribe(result => { | ||||
|       if (result) { | ||||
|         this.st.reload(); | ||||
|         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.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         : 2022-03-01 15:13:03 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-03-07 11:09:33 | ||||
|  * @LastEditTime : 2022-03-07 13:50:55 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\supply-management\\model\\import-supply\\import-supply.component.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| @ -32,6 +32,7 @@ export class SupplyManagementImportSupplyComponent implements OnInit { | ||||
|   files2: any; | ||||
|   schema: SFSchema = {}; | ||||
|   ui: SFUISchema = {}; | ||||
|   networkTransporter: any; // 网络货运人id | ||||
|   uploadUrl = apiConf.file_upload_url; | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   constructor( | ||||
| @ -78,7 +79,7 @@ export class SupplyManagementImportSupplyComponent implements OnInit { | ||||
|             } | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         netTranName: { | ||||
|         enterpriseInfoId: { | ||||
|           type: 'string', | ||||
|           title: '网络货运人', | ||||
|           ui: { | ||||
| @ -109,7 +110,7 @@ export class SupplyManagementImportSupplyComponent implements OnInit { | ||||
|           } | ||||
|         }, | ||||
|       }, | ||||
|       required: ['shipperAppUserId', 'enterpriseProjectId','netTranName','fileName'], | ||||
|       required: ['shipperAppUserId', 'enterpriseProjectId','enterpriseInfoId','fileName'], | ||||
|     }; | ||||
|     this.ui = { | ||||
|       '*': { | ||||
| @ -146,23 +147,22 @@ export class SupplyManagementImportSupplyComponent implements OnInit { | ||||
|     console.log(regionCode); | ||||
|     return this.service | ||||
|       .request(this.service.$api_getNetworkTransporter, { id: regionCode }).subscribe((res: any) => { | ||||
|         console.log(res?.netTranName) | ||||
|         console.log(res?.networkTransporter) | ||||
|         this.sf.getProperty('/netTranName')!.widget.reset(res?.netTranName); | ||||
|         this.sf.setValue('/netTranName', res?.netTranName) | ||||
|         console.log(res) | ||||
|         this.networkTransporter = res.networkTransporter | ||||
|         this.sf.getProperty('/enterpriseInfoId')!.widget.reset(res?.netTranName); | ||||
|         this.sf.setValue('/enterpriseInfoId', res?.netTranName) | ||||
|       }); | ||||
|   } | ||||
|   save(): void { | ||||
|     console.log(this.files) | ||||
|     console.log(this.sf.value) | ||||
|     const formData = new FormData(); | ||||
|     const formData : any= new FormData(); | ||||
|     this.files.forEach((file: any) => { | ||||
|       formData.append('file', file); | ||||
|       formData.append('shipperAppUserId', this.sf.value?.shipperAppUserId); | ||||
|       formData.append('enterpriseInfoId', this?.networkTransporter); | ||||
|       formData.append('enterpriseProjectId', this.sf.value?.enterpriseProjectId); | ||||
|     }); | ||||
|     console.log(formData) | ||||
|     let params = { file: formData ,...this.sf.value} | ||||
|     console.log(params) | ||||
|     this.service.request(this.service.$api_goodsResourceOperateImport, params).subscribe(res => { | ||||
|     this.service.request(this.service.$api_goodsResourceOperateImport, formData).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.service.msgSrv.success('导入成功'); | ||||
|         this.modal.destroy({ ...res }); | ||||
|  | ||||
| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2021-12-03 11:10:14 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-03-02 14:27:18 | ||||
|  * @LastEditTime : 2022-03-07 13:54:46 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\supply-management\\services\\supply-management.service.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| @ -161,6 +161,8 @@ export class SupplyManagementService extends BaseService { | ||||
|   public $api_exportGoodsResourceOperateTemplate = '/api/sdc/uploadGoodsResource/exportGoodsResourceOperateTemplate'; | ||||
|   // 导入货源-运营后台 | ||||
|   public $api_goodsResourceOperateImport = '/api/sdc/uploadGoodsResource/goodsResourceOperateImport'; | ||||
|   // 下载失败数据-运营后台 | ||||
|   public $api_getFailUploadGoodsOperateResource = '/api/sdc/uploadGoodsResource/getFailUploadGoodsOperateResource'; | ||||
|   // 根据货主ID查询网络货运人信息 | ||||
|   public $api_getNetworkTransporter = '/api/mdc/cuc/enterpriseInfo/operate/getNetworkTransporter'; | ||||
|   $api_verify_vehicle_status = `/api/sdc/goodsResourceShipper/saveVerify`; // 发布货源校验司机/车队长的状态 | ||||
|  | ||||
		Reference in New Issue
	
	Block a user