Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
		| @ -44,7 +44,7 @@ export class VehicleSureArriveComponent implements OnInit { | ||||
|   ngOnInit(): void { | ||||
|     console.log(this.i) | ||||
|     this.initData() | ||||
|     this.i.time = this.i.loadingTime; | ||||
|     this.i.time = this.i?.loadingTime; | ||||
|     this.initSF(); | ||||
|   } | ||||
|   initSF() { | ||||
| @ -407,7 +407,7 @@ export class VehicleSureArriveComponent implements OnInit { | ||||
|           } as SFUploadWidgetSchema, | ||||
|         } | ||||
|       }, | ||||
|       required: ['time', 'weight' ] | ||||
|       required: ['time' ] | ||||
|     }; | ||||
|   } | ||||
|     this.ui = { | ||||
| @ -422,19 +422,16 @@ export class VehicleSureArriveComponent implements OnInit { | ||||
|     }; | ||||
|   } | ||||
|   save(value: any): void { | ||||
|     console.log('444'); | ||||
|     if(this.Status === 1) { | ||||
|       console.log('555'); | ||||
|        | ||||
|       if(!value.time) { | ||||
|         this.service.msgSrv.warning('必填项为空!') | ||||
|         return; | ||||
|        } | ||||
|        const params = { | ||||
|         id: this.i.id, | ||||
|         imgUrl1: value.imgUrl1.data.fullFilePath, | ||||
|         imgUrl2: value.imgUrl2.data.fullFilePath, | ||||
|         time: value.time, | ||||
|         imgUrl1: value?.imgUrl1?.data?.fullFilePath, | ||||
|         imgUrl2: value?.imgUrl2?.data?.fullFilePath, | ||||
|         time: value?.time, | ||||
|       } | ||||
|       params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') | ||||
|       this.service.request(this.service.$api_get_insertWholeUnloadCarInfo, params).subscribe((res) => { | ||||
| @ -444,12 +441,10 @@ export class VehicleSureArriveComponent implements OnInit { | ||||
|         } | ||||
|       }) | ||||
|     } else { | ||||
|       if(!value.time || !this.data.weight) { | ||||
|       if(!value.time ) { | ||||
|         this.service.msgSrv.warning('必填项为空!') | ||||
|         return; | ||||
|        } | ||||
|         console.log(value) | ||||
|         console.log(this.i) | ||||
|         const params = { | ||||
|           id: this.i?.id, | ||||
|           imgUrl1: value?.imgUrl1?.data?.fullFilePath, | ||||
| @ -459,7 +454,6 @@ export class VehicleSureArriveComponent implements OnInit { | ||||
|           weight: this.data?.weight | ||||
|         } | ||||
|         params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') | ||||
|         console.log(params) | ||||
|         this.service.request(this.service.$api_get_insertBulkUnloadCarInfo, params).subscribe((res) => { | ||||
|           if(res) { | ||||
|             this.service.msgSrv.success('确认到车成功!') | ||||
|  | ||||
| @ -99,7 +99,6 @@ export class VehicleSureDepartComponent implements OnInit { | ||||
|               }, | ||||
|               multiple: false, | ||||
|               listType: 'picture-card', | ||||
|               showRequired: true, | ||||
|             } as SFUploadWidgetSchema, | ||||
|           }, | ||||
|           imgUrl2: { | ||||
| @ -138,11 +137,10 @@ export class VehicleSureDepartComponent implements OnInit { | ||||
|               }, | ||||
|               multiple: false, | ||||
|               listType: 'picture-card', | ||||
|               showRequired: true, | ||||
|             } as SFUploadWidgetSchema, | ||||
|           } | ||||
|         }, | ||||
|         required: ['reason'] | ||||
|         required: ['time'] | ||||
|       }; | ||||
|     } else { | ||||
|       this.schema = { | ||||
| @ -210,7 +208,6 @@ export class VehicleSureDepartComponent implements OnInit { | ||||
|               }, | ||||
|               multiple: false, | ||||
|               listType: 'picture-card', | ||||
|               showRequired: true, | ||||
|             } as SFUploadWidgetSchema, | ||||
|           }, | ||||
|           imgUrl2: { | ||||
| @ -249,11 +246,10 @@ export class VehicleSureDepartComponent implements OnInit { | ||||
|               }, | ||||
|               multiple: false, | ||||
|               listType: 'picture-card', | ||||
|               showRequired: true, | ||||
|             } as SFUploadWidgetSchema, | ||||
|           } | ||||
|         }, | ||||
|         required: ['time', 'weight'] | ||||
|         required: ['time'] | ||||
|       }; | ||||
|     } | ||||
|    | ||||
| @ -268,15 +264,15 @@ export class VehicleSureDepartComponent implements OnInit { | ||||
|   } | ||||
|   save(value: any): void { | ||||
|     if(this.Status === 1) { | ||||
|       if(!value.time) { | ||||
|       if(!value?.time) { | ||||
|         this.service.msgSrv.warning('必填项为空!') | ||||
|         return; | ||||
|        } | ||||
|        const params = { | ||||
|         id: this.i.id, | ||||
|         imgUrl1: value.imgUrl1.data.fullFilePath, | ||||
|         imgUrl2: value.imgUrl2.data.fullFilePath, | ||||
|         time: value.time, | ||||
|         imgUrl1: value?.imgUrl1?.data?.fullFilePath, | ||||
|         imgUrl2: value?.imgUrl2?.data?.fullFilePath, | ||||
|         time: value?.time, | ||||
|       } | ||||
|       params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') | ||||
|       this.service.request(this.service.$api_get_insertWholeStartCarInfo, params).subscribe((res) => { | ||||
| @ -286,18 +282,18 @@ export class VehicleSureDepartComponent implements OnInit { | ||||
|         } | ||||
|       }) | ||||
|     } else { | ||||
|       if(!value.time || !this.data.weight) { | ||||
|       if(!value?.time) { | ||||
|         this.service.msgSrv.warning('必填项为空!') | ||||
|         return; | ||||
|        } | ||||
|         console.log(value) | ||||
|         const params = { | ||||
|           id: this.i.id, | ||||
|           imgUrl1: value.imgUrl1.data.fullFilePath, | ||||
|           imgUrl2: value.imgUrl2.data.fullFilePath, | ||||
|           time: value.time, | ||||
|           volume: this.data.volume, | ||||
|           weight: this.data.weight | ||||
|           imgUrl1: value?.imgUrl1?.data?.fullFilePath, | ||||
|           imgUrl2: value?.imgUrl2?.data?.fullFilePath, | ||||
|           time: value?.time, | ||||
|           volume: this.data?.volume, | ||||
|           weight: this.data?.weight | ||||
|         } | ||||
|         params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') | ||||
|         this.service.request(this.service.$api_get_insertBulkStartCarInfo, params).subscribe((res) => { | ||||
|  | ||||
| @ -144,30 +144,30 @@ export class SupplyManagementBulkAssignedCarComponent implements OnInit { | ||||
|         title: '司机姓名', | ||||
|         index: 'name', | ||||
|         className: 'text-center', | ||||
|         width: '80px' | ||||
|         width: '20%' | ||||
|       }, | ||||
|       { | ||||
|         title: '手机号', | ||||
|         index: 'telephone', | ||||
|         className: 'text-center', | ||||
|         width: '100px' | ||||
|         width: '15%' | ||||
|       }, | ||||
|       { | ||||
|         title: '车队长', | ||||
|         render: 'captain', | ||||
|         className: 'text-center', | ||||
|         width: '200px' | ||||
|         width: '30%' | ||||
|       }, | ||||
|       { | ||||
|         title: '指定车辆', | ||||
|         render: 'carNo', | ||||
|         className: 'text-center', | ||||
|         width: '100px' | ||||
|         width: '15%' | ||||
|       }, | ||||
|       { | ||||
|         title: '操作', | ||||
|         className: 'text-center', | ||||
|         width: '80px', | ||||
|         width: '20%', | ||||
|         buttons: [ | ||||
|           { | ||||
|             text: '移除', | ||||
|  | ||||
| @ -65,7 +65,7 @@ export class SupplyManagementBulkDetailComponent implements OnInit { | ||||
|   get reqParams() { | ||||
|     return {  | ||||
|       operateObject: this.i?.resourceCode, | ||||
|       operateType: 4, | ||||
|       operateTypeList:  [4,7], | ||||
|      }; | ||||
|   } | ||||
|   currentStatus = 0; | ||||
|  | ||||
| @ -464,19 +464,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         // receiptAddressId: { | ||||
|         //   type: 'string', | ||||
|         //   title: '选择地址', | ||||
|         //   ui: { | ||||
|         //     widget: 'custom', | ||||
|         //     placeholder: '请点击选择收回单地址', | ||||
|         //     // validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []), | ||||
|         //     visibleIf: { | ||||
|         //       receiptType: value => value === '2' | ||||
|         //     } | ||||
|         //   }, | ||||
|         //   default: '' | ||||
|         // }, | ||||
|         receiptUserName: { | ||||
|           type: 'string', | ||||
|           title: '联系人', | ||||
| @ -738,7 +725,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | ||||
|       nzContent: TranAgreementComponent, | ||||
|       nzWidth: 900, | ||||
|       nzFooter: null, | ||||
|       nzComponentParams: { object: params, shipperName: this.shipperName } | ||||
|       nzComponentParams: { object: params, shipperName: this.shipperName , type:'bulk'} | ||||
|     }); | ||||
|     modalRef.afterClose.subscribe(result => { | ||||
|       if (result) { | ||||
|  | ||||
| @ -48,6 +48,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { | ||||
|     maxTrainNumber: 99999, | ||||
|     maxFreight: 9999999 | ||||
|   } | ||||
|   shipperName = ''; | ||||
|   // // 单位 | ||||
|   startInfo: any[] = []; | ||||
|   endInfo: any[] = []; | ||||
| @ -139,10 +140,11 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { | ||||
|                 return of([]); | ||||
|               } | ||||
|             }, | ||||
|             change: (q: any) => { | ||||
|             change: (q: any, qs: any) => { | ||||
|               let str =q.replace(/^\s+|\s+$/g,""); | ||||
|               if (str) { | ||||
|               this.getRegionCode(str); | ||||
|               this.shipperName = qs?.label; | ||||
|               } | ||||
|             } | ||||
|           } as SFSelectWidgetSchema | ||||
| @ -606,51 +608,54 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { | ||||
|       this.service.msgSrv.error(`当前运费单价已超出限定值【${this.limitValues.maxFreight}元】`); | ||||
|       return; | ||||
|     } | ||||
|  | ||||
|      // //装卸货信息 | ||||
|      const LoadingList = this.startInfo.concat(this.endInfo); | ||||
|  | ||||
|      // 货物信息 | ||||
|      const sf3Values = { ...this.sf3.value }; | ||||
|      if (sf3Values.goodsTypeName === '其它') { | ||||
|        sf3Values.goodsName = sf3Values.goodsName1; | ||||
|        delete sf3Values.goodsName1; | ||||
|      } | ||||
|      if (this.sf4.value.carModel.includes('999')) { | ||||
|        this.sf4.value.carModel = ['999'] | ||||
|      } | ||||
|      if (this.sf4.value.carLength.includes('999')) { | ||||
|        this.sf4.value.carLength = ['999'] | ||||
|      } | ||||
|     | ||||
|      const goodsInfoList = [ | ||||
|        { | ||||
|          ...sf3Values, | ||||
|          ...this.sf4.value, | ||||
|          carModel: this.sf4.value.carModel.join(','), | ||||
|          carLength: this.sf4.value.carLength.join(',') | ||||
|        } | ||||
|      ]; | ||||
|      const params = { | ||||
|        id: '', | ||||
|        ...this.sf1.value, | ||||
|        unLoadingPlaceDTOList: LoadingList, | ||||
|        goodsInfoDTOList: goodsInfoList, | ||||
|        ...this.sf6.value | ||||
|      }; | ||||
|       const modalRef = this.modalService.create({ | ||||
|         nzTitle: '运输协议', | ||||
|         nzContent: TranAgreementComponent, | ||||
|         nzWidth: 900, | ||||
|         nzFooter: null | ||||
|         nzFooter: null, | ||||
|         nzComponentParams: { object: params, shipperName: this.shipperName , type:'bulk'} | ||||
|       }); | ||||
|       modalRef.afterClose.subscribe(result => { | ||||
|         if (result) { | ||||
|           this.submit(submitType); | ||||
|           this.submit(submitType, params); | ||||
|         } | ||||
|       }); | ||||
|   } | ||||
|   // 确认提交(下单) | ||||
|   submit(submitType: string): void { | ||||
|     // //装卸货信息 | ||||
|     const LoadingList = this.startInfo.concat(this.endInfo); | ||||
|  | ||||
|     // 货物信息 | ||||
|     const sf3Values = { ...this.sf3.value }; | ||||
|     if (sf3Values.goodsTypeName === '其它') { | ||||
|       sf3Values.goodsName = sf3Values.goodsName1; | ||||
|       delete sf3Values.goodsName1; | ||||
|     } | ||||
|     if (this.sf4.value.carModel.includes('999')) { | ||||
|       this.sf4.value.carModel = ['999'] | ||||
|     } | ||||
|     if (this.sf4.value.carLength.includes('999')) { | ||||
|       this.sf4.value.carLength = ['999'] | ||||
|     } | ||||
|    | ||||
|     const goodsInfoList = [ | ||||
|       { | ||||
|         ...sf3Values, | ||||
|         ...this.sf4.value, | ||||
|         carModel: this.sf4.value.carModel.join(','), | ||||
|         carLength: this.sf4.value.carLength.join(',') | ||||
|       } | ||||
|     ]; | ||||
|     const params = { | ||||
|       id: '', | ||||
|       ...this.sf1.value, | ||||
|       unLoadingPlaceDTOList: LoadingList, | ||||
|       goodsInfoDTOList: goodsInfoList, | ||||
|       ...this.sf6.value | ||||
|     }; | ||||
|   submit(submitType?: string, params?: any): void { | ||||
|     | ||||
|  | ||||
|     let reqUrl = this.service.$api_consignBulk; | ||||
|     if (submitType === 'assign') { | ||||
|  | ||||
| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2022-01-12 10:52:50 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-03-02 18:09:01 | ||||
|  * @LastEditTime : 2022-03-04 15:45:58 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\bulk\\bulk.component.html | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
| --> | ||||
| @ -32,7 +32,7 @@ | ||||
|       </div> | ||||
|       <div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right"> | ||||
|         <button nz-button nzType="primary" [nzLoading]="loading" (click)="search()"  acl  [acl-ability]="['SUPPLY-INDEX-bulkSearch']">查询</button> | ||||
|         <button nz-button nzType="primary" [disabled]="loading">导入</button> | ||||
|         <button nz-button nzType="primary" [disabled]="loading" (click)="exportFire()">导出</button> | ||||
|         <button nz-button [disabled]="loading" (click)="resetSF()">重置</button> | ||||
|         <button nz-button nzType="link" (click)="expandToggle()"> | ||||
|           {{ !_$expand ? '展开' : '收起' }} | ||||
|  | ||||
| @ -569,7 +569,12 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|     userAction() { | ||||
|        | ||||
|     } | ||||
|       // 导出 | ||||
|    exportFire() { | ||||
|     this.service.request(this.service.$api_asyncExportBulkList,  this.reqParams ).subscribe((res: any) => { | ||||
|       if(res) { | ||||
|         this.service.msgSrv.success('导出成功,请去下载中心下载!') | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -581,65 +581,45 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         receiptAddress: { | ||||
|           type: 'string', | ||||
|           title: '回单收件人信息', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             placeholder: '请点击选择回单收件人信息', | ||||
|             // validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []), | ||||
|             visibleIf: { | ||||
|               receiptType: value => value === '2' | ||||
|             } | ||||
|           }, | ||||
|           default: '' | ||||
|         }, | ||||
|         receiptAddressId: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           ui: { | ||||
|             hidden: true | ||||
|           } | ||||
|         }, | ||||
|         receiptUserName: { | ||||
|           type: 'string', | ||||
|           title: '联系人', | ||||
|           maxLength: 15, | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               receiptType: value => value === '2' | ||||
|             } | ||||
|           }, | ||||
|           readOnly: true | ||||
|           } | ||||
|         }, | ||||
|         phon: { | ||||
|         receiptUserPhone: { | ||||
|           type: 'string', | ||||
|           title: '联系电话', | ||||
|           maxLength: 11, | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               receiptType: value => value === '2' | ||||
|             } | ||||
|           }, | ||||
|           readOnly: true | ||||
|           } | ||||
|         }, | ||||
|         area: { | ||||
|         receiptAddressArea: { | ||||
|           type: 'string', | ||||
|           title: '所在地区', | ||||
|           maxLength: 30, | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               receiptType: value => value === '2' | ||||
|             } | ||||
|           }, | ||||
|           readOnly: true | ||||
|           } | ||||
|         }, | ||||
|         address: { | ||||
|         receiptAddress: { | ||||
|           type: 'string', | ||||
|           title: '详细地址', | ||||
|           maxLength: 30, | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               receiptType: value => value === '2' | ||||
|             } | ||||
|           }, | ||||
|           readOnly: true | ||||
|           } | ||||
|         }, | ||||
|         remarks: { | ||||
|           type: 'string', | ||||
| @ -652,11 +632,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|           } as SFTextareaWidgetSchema | ||||
|         } | ||||
|       }, | ||||
|       required: ['stateReceipt', 'receiptType', 'receiptAddress'] | ||||
|       required: ['stateReceipt', 'receiptType', 'receiptUserName', 'receiptUserPhone', 'receiptAddressArea', 'receiptAddress'] | ||||
|     }; | ||||
|     this.ui6 = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 115, | ||||
|         spanLabelFixed: 90, | ||||
|         grid: { span: 24 } | ||||
|       } | ||||
|     }; | ||||
| @ -1019,7 +999,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|       nzContent: TranAgreementComponent, | ||||
|       nzWidth: 900, | ||||
|       nzFooter: null, | ||||
|       nzComponentParams: { object: params, shipperName: this.shipperName } | ||||
|       nzComponentParams: { object: params, shipperName: this.shipperName,type:'onecar' } | ||||
|     }); | ||||
|     modalRef.afterClose.subscribe(result => { | ||||
|       if (result) { | ||||
|  | ||||
| @ -281,15 +281,6 @@ | ||||
|   <div nz-row> | ||||
|     <div nz-col nzSpan="12"> | ||||
|       <sf #sf6 [schema]="schema6" [button]="'none'" [ui]="ui6" [formData]="sf6data"> | ||||
|         <!-- <ng-template sf-template="receiptAddressId" let-i let-ui="ui"> | ||||
|           <input | ||||
|             nz-input | ||||
|             [ngModel]="i.value" | ||||
|             (ngModelChange)="i.setValue($event)" | ||||
|             placeholder="请点击选择收回单地址" | ||||
|             (click)="backBillChange()" | ||||
|           /> | ||||
|         </ng-template> --> | ||||
|       </sf> | ||||
|     </div> | ||||
|   </div> | ||||
|  | ||||
| @ -565,65 +565,45 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         receiptAddress: { | ||||
|           type: 'string', | ||||
|           title: '回单收件人信息', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             placeholder: '请点击选择回单收件人信息', | ||||
|             // validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []), | ||||
|             visibleIf: { | ||||
|               receiptType: value => value === '2' | ||||
|             } | ||||
|           }, | ||||
|           default: '' | ||||
|         }, | ||||
|         receiptAddressId: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           ui: { | ||||
|             hidden: true | ||||
|           } | ||||
|         }, | ||||
|         receiptUserName: { | ||||
|           type: 'string', | ||||
|           title: '联系人', | ||||
|           maxLength: 15, | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               receiptType: value => value === '2' | ||||
|             } | ||||
|           }, | ||||
|           readOnly: true | ||||
|           } | ||||
|         }, | ||||
|         phon: { | ||||
|         receiptUserPhone: { | ||||
|           type: 'string', | ||||
|           title: '联系电话', | ||||
|           maxLength: 11, | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               receiptType: value => value === '2' | ||||
|             } | ||||
|           }, | ||||
|           readOnly: true | ||||
|           } | ||||
|         }, | ||||
|         area: { | ||||
|         receiptAddressArea: { | ||||
|           type: 'string', | ||||
|           title: '所在地区', | ||||
|           maxLength: 30, | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               receiptType: value => value === '2' | ||||
|             } | ||||
|           }, | ||||
|           readOnly: true | ||||
|           } | ||||
|         }, | ||||
|         address: { | ||||
|         receiptAddress: { | ||||
|           type: 'string', | ||||
|           title: '详细地址', | ||||
|           maxLength: 30, | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               receiptType: value => value === '2' | ||||
|             } | ||||
|           }, | ||||
|           readOnly: true | ||||
|           } | ||||
|         }, | ||||
|         remarks: { | ||||
|           type: 'string', | ||||
| @ -636,11 +616,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|           } as SFTextareaWidgetSchema | ||||
|         } | ||||
|       }, | ||||
|       required: ['stateReceipt', 'receiptType', 'receiptAddress'] | ||||
|       required: ['stateReceipt', 'receiptType', 'receiptUserName', 'receiptUserPhone', 'receiptAddressArea', 'receiptAddress'] | ||||
|     }; | ||||
|     this.ui6 = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 115, | ||||
|         spanLabelFixed: 90, | ||||
|         grid: { span: 24 } | ||||
|       } | ||||
|     }; | ||||
| @ -994,7 +974,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|       nzContent: TranAgreementComponent, | ||||
|       nzWidth: 900, | ||||
|       nzFooter: null, | ||||
|       nzComponentParams: { object: params ,shipperName: this.shipperName} | ||||
|       nzComponentParams: { object: params ,shipperName: this.shipperName,type:'onecar'} | ||||
|     }); | ||||
|     modalRef.afterClose.subscribe(result => { | ||||
|       if (result) { | ||||
|  | ||||
| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2022-02-24 20:19:51 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-03-03 14:24:51 | ||||
|  * @LastEditTime : 2022-03-04 16:46:31 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| @ -28,6 +28,8 @@ import { SupplyManagementService } from '../../services/supply-management.servic | ||||
|   styleUrls: ['./tran-agreement.component.less'] | ||||
| }) | ||||
| export class TranAgreementComponent { | ||||
|   enterpriseInfo:any; // 网络货运人 | ||||
|   type:any; | ||||
|   object: any; | ||||
|   agreement:any; | ||||
|   envCache:any; | ||||
| @ -38,13 +40,30 @@ export class TranAgreementComponent { | ||||
|  | ||||
|   ngOnInit() { | ||||
|     console.log(this.object) | ||||
|     const params = { | ||||
|    // 获取托运人承运人信息 | ||||
|    this.service.request(this.service.$api_getContractAtr,{id:this.object?.shipperAppUserId}).subscribe(res => { | ||||
|     if (res) { | ||||
|       this.enterpriseInfo = res | ||||
|       this.getContent(); | ||||
|     } | ||||
|   }); | ||||
|  | ||||
|   | ||||
|   } | ||||
|  | ||||
|   getContent() { | ||||
|     let params:any; | ||||
|     if(this.type ==='onecar'){ | ||||
|  | ||||
|      params = { | ||||
|       contractType:'1', | ||||
|       resourceType: '1', | ||||
|       signingObject: '1', | ||||
|       templateType: 'MX', | ||||
|       parametersDTO: { | ||||
|         contractCode:'', | ||||
|         shipperLegalPersonName:this.enterpriseInfo.legalPersonName, //托运法定代表人 | ||||
|         carrierLegalPersonName:this.enterpriseInfo.netLegalPersonName, //承运法定代表人 | ||||
|         shipperName:this?.shipperName, //托运人 | ||||
|         carrierName:this.object?.enterpriseInfoName, //承运人 | ||||
|         consignorInfo: `${this.object?.unLoadingPlaceDTOList[0].appUserName}  ${this.object?.unLoadingPlaceDTOList[0].contractTelephone}`, // 发货信息 | ||||
| @ -69,15 +88,48 @@ export class TranAgreementComponent { | ||||
|         day:new Date().getDate(), // 签约日期 | ||||
|       } | ||||
|       } | ||||
|     } else if(this.type ==='bulk'){  | ||||
|       params = { | ||||
|         contractType:'1', | ||||
|         resourceType: '2', | ||||
|         signingObject: '1', | ||||
|         templateType: 'MX', | ||||
|         parametersDTO: { | ||||
|           contractCode:'', | ||||
|           shipperName:this?.shipperName, //托运人 | ||||
|           carrierName:this.object?.enterpriseInfoName, //承运人 | ||||
|           shipperLegalPersonName:this.enterpriseInfo.legalPersonName, //托运法定代表人 | ||||
|           carrierLegalPersonName:this.enterpriseInfo.netLegalPersonName, //承运法定代表人 | ||||
|           consignorInfo: `${this.object.unLoadingPlaceDTOList[0].appUserName}  ${this.object.unLoadingPlaceDTOList[0].contractTelephone}`, // 发货信息 | ||||
|           consignorAddress: this.object.unLoadingPlaceDTOList[0].detailedAddress, // 发货地址 | ||||
|           consignorDate: '', // 发货时间 | ||||
|           consigneeInfo: `${this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].appUserName}  ${this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].contractTelephone}`, // 收货信息 | ||||
|           consigneeDate: '', // 收货时间 | ||||
|           consigneeAddress: this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].detailedAddress, // 收货地址 | ||||
|           goodsName:this.object.goodsInfoDTOList[0].goodsName, // 货物名称 | ||||
|           shippingType:'大宗运输', | ||||
|           consignmentVolume:`${this.object.goodsInfoDTOList[0].weight}吨/${this.object.goodsInfoDTOList[0].volume}方/${this.object.goodsInfoDTOList[0].number}车`, //托运量 | ||||
|           transporterInfo:'', //运输方信息 | ||||
|           freightAmount:'', // 订单运费金额(元) | ||||
|           pre:'', //预付 | ||||
|           rece:'',// 到付 | ||||
|           back:'',// 回单付 | ||||
|           lunarKnot:'', | ||||
|           total:'', // 合计(元) | ||||
|           paymentTime:`到货后${this.object.paymentDays}天`, // 承诺支付运费时间 | ||||
|           year:new Date().getFullYear(), // 签约年份 | ||||
|           month:new Date().getMonth()+1, // 签约月份 | ||||
|           day:new Date().getDate(), // 签约日期 | ||||
|         }, | ||||
|       } | ||||
|     } | ||||
|         console.log(params) | ||||
|     this.service.request(this.service.$api_getContractContent,params).subscribe((res) => { | ||||
|       if (res) { | ||||
|          | ||||
|         this.agreement = res.contractContent; | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   handleOk(){ | ||||
|     this.modal.close(true); | ||||
|   } | ||||
|  | ||||
| @ -53,7 +53,7 @@ export class SupplyManagementVehicleDetailComponent implements OnInit { | ||||
|   get reqParams() { | ||||
|     return {  | ||||
|       operateObject: this.i?.resourceCode, | ||||
|       operateType: 4, | ||||
|       operateTypeList:  [4,7], | ||||
|      }; | ||||
|   } | ||||
|   constructor( | ||||
|  | ||||
| @ -31,7 +31,7 @@ | ||||
|         [acl-ability]="['SUPPLY-INDEX-vehicleSearch']" | ||||
|         >查询</button | ||||
|       > | ||||
|       <button nz-button nzType="primary" [disabled]="loading">导出</button> | ||||
|       <button nz-button nzType="primary" [disabled]="loading" (click)="exportFire()" >导出</button> | ||||
|       <button nz-button [disabled]="loading" (click)="resetSF()">重置</button> | ||||
|       <button nz-button nzType="link" (click)="expandToggle()"> | ||||
|         {{ !_$expand ? '展开' : '收起' }} | ||||
|  | ||||
| @ -611,4 +611,12 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|       } | ||||
|     ]; | ||||
|   } | ||||
|    // 导出 | ||||
|    exportFire() { | ||||
|     this.service.request(this.service.$api_asyncExportWholeList,  this.reqParams ).subscribe((res: any) => { | ||||
|       if(res) { | ||||
|         this.service.msgSrv.success('导出成功,请去下载中心下载!') | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -54,8 +54,8 @@ export class SupplyManagementService extends BaseService { | ||||
|   $api_getCalculatedSurcharge = `/api/sdc/expense/getCalculatedSurcharge`; | ||||
|   // 整车计算附加费率 | ||||
|   $api_getcalculatedServiceRate = `/api/sdc/expense/getAdditionalRate`; | ||||
|     // 整车计算附加费率 | ||||
|     $api_getAdditionalRate = `/api/sdc/expense/getAdditionalRate`; | ||||
|   // 整车计算附加费率 | ||||
|   $api_getAdditionalRate = `/api/sdc/expense/getAdditionalRate`; | ||||
|   // 代发整车货源 | ||||
|   $api_consignWhole = `/api/sdc/goodsResourceOperate/consignWhole`; | ||||
|   // 代发大宗货源 | ||||
| @ -139,20 +139,20 @@ export class SupplyManagementService extends BaseService { | ||||
|     super(injector); | ||||
|   } | ||||
|   public limitKeys = { | ||||
|     weight:'sys.config.goods.approvalCarMaxWeight', //整车-核载重量上限 | ||||
|     volume:'sys.config.goods.approvalCarMaxVolume', //整车-核载体积上限 | ||||
|     piece:'sys.config.goods.approvalCarMaxPiece', //整车-核载件数上限 | ||||
|     maxDays:'sys.config.goods.wholeLoadingMaxDays', //整车-计划装货时间上限  | ||||
|     intervalDays:'sys.config.goods.wholeUnloadingIntervalDays', //计划装、卸货时间间隔 | ||||
|     maxTimes:'sys.config.goods.wholeLoadingMaxTimes', //整车-多装多卸地点上限 | ||||
|   } | ||||
|     weight: 'sys.config.goods.approvalCarMaxWeight', //整车-核载重量上限 | ||||
|     volume: 'sys.config.goods.approvalCarMaxVolume', //整车-核载体积上限 | ||||
|     piece: 'sys.config.goods.approvalCarMaxPiece', //整车-核载件数上限 | ||||
|     maxDays: 'sys.config.goods.wholeLoadingMaxDays', //整车-计划装货时间上限 | ||||
|     intervalDays: 'sys.config.goods.wholeUnloadingIntervalDays', //计划装、卸货时间间隔 | ||||
|     maxTimes: 'sys.config.goods.wholeLoadingMaxTimes' //整车-多装多卸地点上限 | ||||
|   }; | ||||
|   public limitKeys2 = { | ||||
|     month:'sys.config.goods.bulkEndMaxMonth', //大宗-截止时间上限 | ||||
|     weight:'sys.config.goods.bulkMaxWeight', //大宗-重量上限 | ||||
|     volume:'sys.config.goods.bulkMaxVolume', //大宗-体积上限 | ||||
|     trainNumber:'sys.config.goods.bulkMaxTrainNumber', //大宗-车次上限 | ||||
|     freight:'sys.config.goods.bulkMaxUnitFreight', //大宗-运费单价上限 | ||||
|   } | ||||
|     month: 'sys.config.goods.bulkEndMaxMonth', //大宗-截止时间上限 | ||||
|     weight: 'sys.config.goods.bulkMaxWeight', //大宗-重量上限 | ||||
|     volume: 'sys.config.goods.bulkMaxVolume', //大宗-体积上限 | ||||
|     trainNumber: 'sys.config.goods.bulkMaxTrainNumber', //大宗-车次上限 | ||||
|     freight: 'sys.config.goods.bulkMaxUnitFreight' //大宗-运费单价上限 | ||||
|   }; | ||||
|   // 根据ItemKey获取项值 | ||||
|   public $api_findItemValueByItemKeys = '/api/mdc/pbc/sysConfigItem/findItemValueByItemKeys'; | ||||
|   // 获取保价费信息 | ||||
| @ -163,8 +163,14 @@ export class SupplyManagementService extends BaseService { | ||||
|   public $api_goodsResourceOperateImport = '/api/sdc/uploadGoodsResource/goodsResourceOperateImport'; | ||||
|   // 根据货主ID查询网络货运人信息 | ||||
|   public $api_getNetworkTransporter = '/api/mdc/cuc/enterpriseInfo/operate/getNetworkTransporter'; | ||||
|   $api_verify_vehicle_status = `/api/sdc/goodsResourceShipper/saveVerify`;// 发布货源校验司机/车队长的状态 | ||||
|   $api_verify_vehicle_status = `/api/sdc/goodsResourceShipper/saveVerify`; // 发布货源校验司机/车队长的状态 | ||||
|   $api_get_sys_config = `/api/mdc/pbc/sysConfigItem/findConfigValues`; // 根据项key、业务id获取配置信息 | ||||
|     // 获取指派熟车列表 | ||||
|     $api_getListCars = '/api/mdc/cuc/enterpriseVehicle/getPracticeCarList'; | ||||
|   // 获取指派熟车列表 | ||||
|   $api_getListCars = '/api/mdc/cuc/enterpriseVehicle/getPracticeCarList'; | ||||
|   // 异步导出运营后台大宗货源列表 | ||||
|   $api_asyncExportBulkList = '/api/sdc/goodsResourceOperate/asyncExportBulkList'; | ||||
|   // 异步导出运营后台整车货源列表 | ||||
|   $api_asyncExportWholeList = '/api/sdc/goodsResourceOperate/asyncExportWholeList'; | ||||
|   // 根据货主ID查询合同签署属性 | ||||
|   public $api_getContractAtr = '/api/mdc/cuc/enterpriseInfo/cargoOwner/getContractAtr'; | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user