fix bug
This commit is contained in:
@ -725,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,20 +608,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
this.service.msgSrv.error(`当前运费单价已超出限定值【${this.limitValues.maxFreight}元】`);
|
||||
return;
|
||||
}
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '运输协议',
|
||||
nzContent: TranAgreementComponent,
|
||||
nzWidth: 900,
|
||||
nzFooter: null
|
||||
});
|
||||
modalRef.afterClose.subscribe(result => {
|
||||
if (result) {
|
||||
this.submit(submitType);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 确认提交(下单)
|
||||
submit(submitType: string): void {
|
||||
|
||||
// //装卸货信息
|
||||
const LoadingList = this.startInfo.concat(this.endInfo);
|
||||
|
||||
@ -651,6 +640,22 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
goodsInfoDTOList: goodsInfoList,
|
||||
...this.sf6.value
|
||||
};
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '运输协议',
|
||||
nzContent: TranAgreementComponent,
|
||||
nzWidth: 900,
|
||||
nzFooter: null,
|
||||
nzComponentParams: { object: params, shipperName: this.shipperName , type:'bulk'}
|
||||
});
|
||||
modalRef.afterClose.subscribe(result => {
|
||||
if (result) {
|
||||
this.submit(submitType, params);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 确认提交(下单)
|
||||
submit(submitType?: string, params?: any): void {
|
||||
|
||||
|
||||
let reqUrl = this.service.$api_consignBulk;
|
||||
if (submitType === 'assign') {
|
||||
|
||||
@ -999,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) {
|
||||
|
||||
@ -974,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}`, // 发货信息
|
||||
@ -68,16 +87,49 @@ export class TranAgreementComponent {
|
||||
month:new Date().getMonth()+1, // 签约月份
|
||||
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);
|
||||
}
|
||||
|
||||
@ -171,4 +171,6 @@ export class SupplyManagementService extends BaseService {
|
||||
$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