Merge branch 'develop'
This commit is contained in:
		| @ -5,7 +5,7 @@ import { OnChanges } from '@angular/core'; | |||||||
|  * @Author       : Shiming |  * @Author       : Shiming | ||||||
|  * @Date         : 2022-01-05 11:01:55 |  * @Date         : 2022-01-05 11:01:55 | ||||||
|  * @LastEditors  : Shiming |  * @LastEditors  : Shiming | ||||||
|  * @LastEditTime : 2022-04-27 11:13:07 |  * @LastEditTime : 2022-04-27 20:19:39 | ||||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-detail\\contract-template-detail.component.ts |  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-detail\\contract-template-detail.component.ts | ||||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. |  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||||
|  */ |  */ | ||||||
| @ -87,7 +87,6 @@ export class ContractManagementTemplateTextComponent implements OnInit { | |||||||
|             widget: 'select', |             widget: 'select', | ||||||
|             placeholder: '请选择', |             placeholder: '请选择', | ||||||
|             change: (tag: any, org: any) => { |             change: (tag: any, org: any) => { | ||||||
|               console.log(tag); |  | ||||||
|               switch (tag) { |               switch (tag) { | ||||||
|                 case 'MX': |                 case 'MX': | ||||||
|                   this.Types = [ |                   this.Types = [ | ||||||
| @ -95,7 +94,7 @@ export class ContractManagementTemplateTextComponent implements OnInit { | |||||||
|                     { label: '订单补充协议', value: '2' }, |                     { label: '订单补充协议', value: '2' }, | ||||||
|                     { label: '运单合同', value: '3' }, |                     { label: '运单合同', value: '3' }, | ||||||
|                     { label: '运单补充协议', value: '4' }, |                     { label: '运单补充协议', value: '4' }, | ||||||
|                     { label: '委托代收合同', value: '5' }, |                     { label: '委托代收合同', value: '5' } | ||||||
|                   ]; |                   ]; | ||||||
|                   this.sf.getProperty('/contractType')!.schema.enum = this.Types; |                   this.sf.getProperty('/contractType')!.schema.enum = this.Types; | ||||||
|                   this.sf.getProperty('/contractType')!.widget.reset(this.Types); |                   this.sf.getProperty('/contractType')!.widget.reset(this.Types); | ||||||
| @ -176,7 +175,7 @@ export class ContractManagementTemplateTextComponent implements OnInit { | |||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       }, |       }, | ||||||
|       required: ['templateName', 'templateType','contractType'] |       required: ['templateName', 'templateType', 'contractType'] | ||||||
|     }; |     }; | ||||||
|     this.ui = { |     this.ui = { | ||||||
|       '*': { |       '*': { | ||||||
| @ -204,14 +203,69 @@ export class ContractManagementTemplateTextComponent implements OnInit { | |||||||
|     }; |     }; | ||||||
|   } |   } | ||||||
|   initData(url: string) { |   initData(url: string) { | ||||||
|     console.log('编辑'); |  | ||||||
|  |  | ||||||
|     this.service.request(url, { id: this.route.snapshot.params.id }).subscribe(res => { |     this.service.request(url, { id: this.route.snapshot.params.id }).subscribe(res => { | ||||||
|       if (res) { |       if (res) { | ||||||
|         this.detailList = res; |         this.detailList = res; | ||||||
|         this.title = this.detailList?.templateName; |         this.title = this.detailList?.templateName; | ||||||
|         this.sfdata = res; |         this.sfdata = res; | ||||||
|         this.sfdata2 = res; |         this.sfdata2 = res; | ||||||
|  |      | ||||||
|  |         switch (res.templateType) { | ||||||
|  |           case 'MX': | ||||||
|  |             let Types1 = [ | ||||||
|  |               { label: '订单合同', value: '1' }, | ||||||
|  |               { label: '订单补充协议', value: '2' }, | ||||||
|  |               { label: '运单合同', value: '3' }, | ||||||
|  |               { label: '运单补充协议', value: '4' }, | ||||||
|  |               { label: '委托代收合同', value: '5' } | ||||||
|  |             ]; | ||||||
|  |             setTimeout(() => { | ||||||
|  |               if (this.sf) { | ||||||
|  |                 this.sf.getProperty('/contractType')!.schema.enum = Types1; | ||||||
|  |                 this.sf.getProperty('/contractType')!.widget.reset(Types1); | ||||||
|  |                 if (res.contractType) { | ||||||
|  |                   this.sf.setValue('/contractType', res.contractType); | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             }); | ||||||
|  |  | ||||||
|  |             return; | ||||||
|  |             break; | ||||||
|  |           case 'KJ': | ||||||
|  |             const Types2 = [ | ||||||
|  |               { label: '网络货物运输服务合同', value: '6' }, | ||||||
|  |               { label: '运输服务承揽合同', value: '7' } | ||||||
|  |             ]; | ||||||
|  |             setTimeout(() => { | ||||||
|  |               if (this.sf) { | ||||||
|  |                 this.sf.getProperty('/contractType')!.schema.enum = Types2; | ||||||
|  |                 this.sf.getProperty('/contractType')!.widget.reset(Types2); | ||||||
|  |                 if (res.contractType) { | ||||||
|  |                   this.sf.setValue('/contractType', res.contractType); | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             }); | ||||||
|  |             return; | ||||||
|  |             break; | ||||||
|  |           case 'HHR': | ||||||
|  |             const Types3 = [ | ||||||
|  |               { label: '企业合伙人入驻合同', value: '8' }, | ||||||
|  |               { label: '个人合伙人入驻合同', value: '9' } | ||||||
|  |             ]; | ||||||
|  |             setTimeout(() => { | ||||||
|  |               if (this.sf) { | ||||||
|  |                 this.sf.getProperty('/contractType')!.schema.enum = Types3; | ||||||
|  |                 this.sf.getProperty('/contractType')!.widget.reset(Types3); | ||||||
|  |                 if (res.contractType) { | ||||||
|  |                   this.sf.setValue('/contractType', res.contractType); | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             }); | ||||||
|  |             return; | ||||||
|  |             break; | ||||||
|  |           default: | ||||||
|  |             break; | ||||||
|  |         } | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
| @ -220,13 +274,12 @@ export class ContractManagementTemplateTextComponent implements OnInit { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   save() { |   save() { | ||||||
|     console.log(this.sf.value.templateName); |     if ( | ||||||
|     console.log(this.sf.value.templateType); |       !this.sf.value.templateName || | ||||||
|     console.log(this.sf2.value.templateContent); |       !this.sf.value.templateType || | ||||||
|     console.log(this.title); |       !this.sf2.value.templateContent || | ||||||
|     console.log(this.title || this.detailList.templateName); |       !(this.title || this.detailList.templateName) | ||||||
|      |     ) { | ||||||
|     if (!this.sf.value.templateName || !this.sf.value.templateType || !this.sf2.value.templateContent || !(this.title || this.detailList.templateName)) { |  | ||||||
|       this.service.msgSrv.error('必填参数为空,请检查再重新保存!'); |       this.service.msgSrv.error('必填参数为空,请检查再重新保存!'); | ||||||
|       return; |       return; | ||||||
|     } |     } | ||||||
| @ -239,9 +292,8 @@ export class ContractManagementTemplateTextComponent implements OnInit { | |||||||
|     const params = { |     const params = { | ||||||
|       ...this.sf.value, |       ...this.sf.value, | ||||||
|       ...this.sf2.value, |       ...this.sf2.value, | ||||||
|       templateTitle: this.title || this.detailList.templateName |       templateTitle: this.detailList.templateName || this.title | ||||||
|     }; |     }; | ||||||
|     console.log(params); |  | ||||||
|     this.service.request(this.service.$api_save_contractTemplate, params).subscribe((res: any) => { |     this.service.request(this.service.$api_save_contractTemplate, params).subscribe((res: any) => { | ||||||
|       if (res) { |       if (res) { | ||||||
|         this.service.msgSrv.success('保存成功!'); |         this.service.msgSrv.success('保存成功!'); | ||||||
| @ -249,4 +301,5 @@ export class ContractManagementTemplateTextComponent implements OnInit { | |||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|  |   EditType() {} | ||||||
| } | } | ||||||
|  | |||||||
| @ -125,6 +125,7 @@ export class ContractManagementTemplateFrameComponent implements OnInit { | |||||||
|       { |       { | ||||||
|         title: '合同模板名称', |         title: '合同模板名称', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|  |         width: '300px', | ||||||
|         render: 'templateName' |         render: 'templateName' | ||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
| @ -135,7 +136,7 @@ export class ContractManagementTemplateFrameComponent implements OnInit { | |||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
|         title: '合同类型', |         title: '合同类型', | ||||||
|         width: '100px', |         width: '200px', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|         index: 'contractTypeLabel' |         index: 'contractTypeLabel' | ||||||
|       }, |       }, | ||||||
|  | |||||||
| @ -125,6 +125,7 @@ export class ContractManagementTemplatePartnerComponent implements OnInit { | |||||||
|       { |       { | ||||||
|         title: '合同模板名称', |         title: '合同模板名称', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|  |         width: '300px', | ||||||
|         render: 'templateName' |         render: 'templateName' | ||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
| @ -135,7 +136,7 @@ export class ContractManagementTemplatePartnerComponent implements OnInit { | |||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
|         title: '合同类型', |         title: '合同类型', | ||||||
|         width: '100px', |         width: '200px', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|         index: 'contractTypeLabel' |         index: 'contractTypeLabel' | ||||||
|       }, |       }, | ||||||
|  | |||||||
| @ -125,6 +125,7 @@ export class ContractManagementTemplateDetailComponent implements OnInit { | |||||||
|       { |       { | ||||||
|         title: '合同模板名称', |         title: '合同模板名称', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|  |         width: '300px', | ||||||
|         render: 'templateName' |         render: 'templateName' | ||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
| @ -135,7 +136,7 @@ export class ContractManagementTemplateDetailComponent implements OnInit { | |||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
|         title: '合同类型', |         title: '合同类型', | ||||||
|         width: '100px', |         width: '200px', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|         index: 'contractTypeLabel' |         index: 'contractTypeLabel' | ||||||
|       }, |       }, | ||||||
|  | |||||||
| @ -741,6 +741,13 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|       fuelCardAmount: oilCardPay, |       fuelCardAmount: oilCardPay, | ||||||
|       resourcetype: '1' |       resourcetype: '1' | ||||||
|     }; |     }; | ||||||
|  |     if(!this?.sf1.value?.shipperAppUserId || !this?.sf1.value?.enterpriseInfoName) { | ||||||
|  |       this.service.msgSrv.warning('请先选择货主和网络货运人!'); | ||||||
|  |       this.sf7.setValue('/prePay', 0); | ||||||
|  |       this.sf7.setValue('/toPay', 0); | ||||||
|  |       this.sf7.setValue('/receiptPay', 0); | ||||||
|  |       return | ||||||
|  |     } | ||||||
|     this.service.request(this.service.$api_getCalculatedSurcharge, params).subscribe(res => { |     this.service.request(this.service.$api_getCalculatedSurcharge, params).subscribe(res => { | ||||||
|       if (res) { |       if (res) { | ||||||
|         this.sf7.setValue('/appendFee', res.surcharge); |         this.sf7.setValue('/appendFee', res.surcharge); | ||||||
|  | |||||||
| @ -761,6 +761,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|       fuelCardAmount: oilCardPay, |       fuelCardAmount: oilCardPay, | ||||||
|       resourcetype: '1' |       resourcetype: '1' | ||||||
|     }; |     }; | ||||||
|  |     if(!this?.sf1.value?.shipperAppUserId || !this?.sf1.value?.enterpriseInfoName) { | ||||||
|  |       this.service.msgSrv.warning('请先选择货主和网络货运人!'); | ||||||
|  |       this.sf7.setValue('/prePay', 0); | ||||||
|  |       this.sf7.setValue('/toPay', 0); | ||||||
|  |       this.sf7.setValue('/receiptPay', 0); | ||||||
|  |       return | ||||||
|  |     } | ||||||
|     this.service.request(this.service.$api_getCalculatedSurcharge, params).subscribe(res => { |     this.service.request(this.service.$api_getCalculatedSurcharge, params).subscribe(res => { | ||||||
|       if (res) { |       if (res) { | ||||||
|         this.sf7.setValue('/appendFee', res.surcharge); |         this.sf7.setValue('/appendFee', res.surcharge); | ||||||
| @ -994,18 +1001,18 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|       goodsValue: this.sf4.value.goodsValue |       goodsValue: this.sf4.value.goodsValue | ||||||
|     }; |     }; | ||||||
|     console.log(params); |     console.log(params); | ||||||
|     const modalRef = this.modalService.create({ |     // const modalRef = this.modalService.create({ | ||||||
|       nzTitle: '运输协议', |     //   nzTitle: '运输协议', | ||||||
|       nzContent: TranAgreementComponent, |     //   nzContent: TranAgreementComponent, | ||||||
|       nzWidth: 900, |     //   nzWidth: 900, | ||||||
|       nzFooter: null, |     //   nzFooter: null, | ||||||
|       nzComponentParams: { object: params, shipperName: this.shipperName, type: 'onecar' } |     //   nzComponentParams: { object: params, shipperName: this.shipperName, type: 'onecar' } | ||||||
|     }); |     // }); | ||||||
|     modalRef.afterClose.subscribe(result => { |     // modalRef.afterClose.subscribe(result => { | ||||||
|       if (result) { |     //   if (result) { | ||||||
|         this.submit(submitType, params); |     //     this.submit(submitType, params); | ||||||
|       } |     //   } | ||||||
|     }); |     // }); | ||||||
|   } |   } | ||||||
|   // 提交 |   // 提交 | ||||||
|   submit(submitType?: string, params?: any): void { |   submit(submitType?: string, params?: any): void { | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user