Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -46,13 +46,14 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
startInfo: any = [];
|
startInfo: any = [];
|
||||||
endInfo: any = [];
|
endInfo: any = [];
|
||||||
PageStatus = '';
|
PageStatus = '';
|
||||||
|
shipperName = '';
|
||||||
limitValues = {
|
limitValues = {
|
||||||
maxMonth: 99,
|
maxMonth: 99,
|
||||||
maxWeight: 99999,
|
maxWeight: 99999,
|
||||||
maxVolume: 99999,
|
maxVolume: 99999,
|
||||||
maxTrainNumber: 99999,
|
maxTrainNumber: 99999,
|
||||||
maxFreight: 9999999
|
maxFreight: 9999999
|
||||||
}
|
};
|
||||||
constructor(
|
constructor(
|
||||||
private http: _HttpClient,
|
private http: _HttpClient,
|
||||||
fb: FormBuilder,
|
fb: FormBuilder,
|
||||||
@ -118,7 +119,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
searchDebounceTime: 300,
|
searchDebounceTime: 300,
|
||||||
searchLoadingText: '搜索中...',
|
searchLoadingText: '搜索中...',
|
||||||
onSearch: (q: any) => {
|
onSearch: (q: any) => {
|
||||||
let str =q.replace(/^\s+|\s+$/g,"");
|
let str = q.replace(/^\s+|\s+$/g, '');
|
||||||
if (str) {
|
if (str) {
|
||||||
return this.service
|
return this.service
|
||||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||||
@ -128,12 +129,13 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
return of([]);
|
return of([]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
change: (q: any) => {
|
change: (q: any, qs: any) => {
|
||||||
let str =q.replace(/^\s+|\s+$/g,"");
|
let str = q.replace(/^\s+|\s+$/g, '');
|
||||||
if (str) {
|
if (str) {
|
||||||
this.getRegionCode(str);
|
this.getRegionCode(str);
|
||||||
|
this.shipperName = qs?.label;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
} as SFSelectWidgetSchema
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
enterpriseProjectId: {
|
enterpriseProjectId: {
|
||||||
@ -158,7 +160,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
format: 'yyyy-MM-dd HH:mm:ss',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
validator: (val) => {
|
validator: val => {
|
||||||
let d = new Date();
|
let d = new Date();
|
||||||
let year = d.getFullYear();
|
let year = d.getFullYear();
|
||||||
let month = d.getMonth();
|
let month = d.getMonth();
|
||||||
@ -171,7 +173,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
return [{ keyword: 'validTime2', message: `有效期最长为${this.limitValues.maxMonth}个月` }];
|
return [{ keyword: 'validTime2', message: `有效期最长为${this.limitValues.maxMonth}个月` }];
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dispatchPhone: {
|
dispatchPhone: {
|
||||||
@ -369,13 +371,13 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
maxMultipleCount:3,
|
maxMultipleCount: 3,
|
||||||
placeholder: '请选择车型',
|
placeholder: '请选择车型',
|
||||||
errors: { required: '请选择车型' },
|
errors: { required: '请选择车型' },
|
||||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }),
|
asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }),
|
||||||
change:(tag:any , org:any)=>{
|
change: (tag: any, org: any) => {
|
||||||
if(tag.includes("999")){
|
if (tag.includes('999')) {
|
||||||
this.sf4.setValue('/carModel',["999"]);
|
this.sf4.setValue('/carModel', ['999']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -386,17 +388,17 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
maxMultipleCount:3,
|
maxMultipleCount: 3,
|
||||||
placeholder: '请选择车长',
|
placeholder: '请选择车长',
|
||||||
errors: { required: '请选择车长' },
|
errors: { required: '请选择车长' },
|
||||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
|
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
|
||||||
change:(tag:any , org:any)=>{
|
change: (tag: any, org: any) => {
|
||||||
if(tag.includes("999")){
|
if (tag.includes('999')) {
|
||||||
this.sf4.setValue('/carModel',["999"]);
|
this.sf4.setValue('/carModel', ['999']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
required: ['weight', 'carModel', 'carLength', 'freightPrice', 'rule', 'settlementBasis']
|
required: ['weight', 'carModel', 'carLength', 'freightPrice', 'rule', 'settlementBasis']
|
||||||
};
|
};
|
||||||
@ -483,7 +485,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
visibleIf: {
|
visibleIf: {
|
||||||
receiptType: value => value === '2'
|
receiptType: value => value === '2'
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
receiptUserPhone: {
|
receiptUserPhone: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -493,7 +495,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
visibleIf: {
|
visibleIf: {
|
||||||
receiptType: value => value === '2'
|
receiptType: value => value === '2'
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
receiptAddressArea: {
|
receiptAddressArea: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -503,7 +505,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
visibleIf: {
|
visibleIf: {
|
||||||
receiptType: value => value === '2'
|
receiptType: value => value === '2'
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
receiptAddress: {
|
receiptAddress: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -513,7 +515,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
visibleIf: {
|
visibleIf: {
|
||||||
receiptType: value => value === '2'
|
receiptType: value => value === '2'
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
paymentDays: {
|
paymentDays: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -535,7 +537,15 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
} as SFTextareaWidgetSchema
|
} as SFTextareaWidgetSchema
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress','paymentDays']
|
required: [
|
||||||
|
'stateReceipt',
|
||||||
|
'receiptType',
|
||||||
|
'receiptUserName',
|
||||||
|
'receiptUserPhone',
|
||||||
|
'receiptAddressArea',
|
||||||
|
'receiptAddress',
|
||||||
|
'paymentDays'
|
||||||
|
]
|
||||||
};
|
};
|
||||||
this.ui7 = {
|
this.ui7 = {
|
||||||
'*': {
|
'*': {
|
||||||
@ -664,13 +674,19 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
this.sf1.validator({ emitError: true });
|
this.sf1.validator({ emitError: true });
|
||||||
this.sf3.validator({ emitError: true });
|
this.sf3.validator({ emitError: true });
|
||||||
this.sf4.validator({ emitError: true });
|
this.sf4.validator({ emitError: true });
|
||||||
if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid ) {
|
if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid) {
|
||||||
this.service.msgSrv.warning('请完善必填项!');
|
this.service.msgSrv.warning('请完善必填项!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 校验各个输入限定值
|
// 校验各个输入限定值
|
||||||
if (this.sf4.value.weight > this.limitValues.maxWeight || this.sf4.value.volume > this.limitValues.maxVolume || this.sf4.value.number > this.limitValues.maxTrainNumber) {
|
if (
|
||||||
this.service.msgSrv.error(`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxTrainNumber}车】`);
|
this.sf4.value.weight > this.limitValues.maxWeight ||
|
||||||
|
this.sf4.value.volume > this.limitValues.maxVolume ||
|
||||||
|
this.sf4.value.number > this.limitValues.maxTrainNumber
|
||||||
|
) {
|
||||||
|
this.service.msgSrv.error(
|
||||||
|
`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxTrainNumber}车】`
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -679,58 +695,67 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
return;
|
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 goodsInfoDTOList = [
|
||||||
|
{
|
||||||
|
...this.sf4.value,
|
||||||
|
...this.sf3.value,
|
||||||
|
carModel: this.sf4.value.carModel.join(','),
|
||||||
|
carLength: this.sf4.value.carLength.join(',')
|
||||||
|
}
|
||||||
|
];
|
||||||
|
// 从“再下一单”过来,将所有的子参数内的id都删除
|
||||||
|
if ((this.PageStatus = '大宗下一单')) {
|
||||||
|
LoadingList.forEach((ele: any) => {
|
||||||
|
delete ele.id;
|
||||||
|
});
|
||||||
|
goodsInfoDTOList.forEach((ele: any) => {
|
||||||
|
delete ele.id;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const params: any = {
|
||||||
|
...this.sf1.value,
|
||||||
|
...this.sf7.value,
|
||||||
|
unLoadingPlaceDTOList: LoadingList,
|
||||||
|
goodsInfoDTOList: goodsInfoDTOList
|
||||||
|
};
|
||||||
|
params.freightPrice = this.totalFees;
|
||||||
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 }
|
||||||
});
|
});
|
||||||
modalRef.afterClose.subscribe(result => {
|
modalRef.afterClose.subscribe(result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
this.submit(submitType);
|
this.submit(submitType, params);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 确认提交
|
// 确认提交
|
||||||
submit(submitType?: string): void {
|
submit(submitType?: string, params?: any): 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 params: any = {
|
|
||||||
...this.sf1.value,
|
|
||||||
...this.sf7.value,
|
|
||||||
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo],
|
|
||||||
goodsInfoDTOList: [
|
|
||||||
{
|
|
||||||
...this.sf4.value,
|
|
||||||
...this.sf3.value,
|
|
||||||
carModel: this.sf4.value.carModel.join(','),
|
|
||||||
carLength: this.sf4.value.carLength.join(',')
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
params.freightPrice = this.totalFees;
|
|
||||||
if (submitType) {
|
if (submitType) {
|
||||||
if (submitType == 'assign') {
|
if (submitType == 'assign') {
|
||||||
this.chooseFamifiar(params);
|
this.chooseFamifiar(params);
|
||||||
return;
|
return;
|
||||||
}else if(submitType === 'qrcode'){
|
} else if (submitType === 'qrcode') {
|
||||||
this.service.request(this.service.$api_saveAnotherBulkOrderQRCode, params).subscribe(res => {
|
this.service.request(this.service.$api_saveAnotherBulkOrderQRCode, params).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.assignedQrcode( res, params )
|
this.assignedQrcode(res, params);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -742,28 +767,28 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
this.requests(this.service.$api_set_saveAnotherBulkOrder, params, 2);
|
this.requests(this.service.$api_set_saveAnotherBulkOrder, params, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 生成二维码
|
// 生成二维码
|
||||||
assignedQrcode(id:string,parms:any ) {
|
assignedQrcode(id: string, parms: any) {
|
||||||
const item = {
|
const item = {
|
||||||
id,
|
id,
|
||||||
enterpriseInfoName: parms.enterpriseInfoName,
|
enterpriseInfoName: parms.enterpriseInfoName,
|
||||||
loadingAddressArr: this.startInfo.map((ele: any)=>ele.detailedAddress),
|
loadingAddressArr: this.startInfo.map((ele: any) => ele.detailedAddress),
|
||||||
unloadingAddressArr: this.endInfo.map((ele: any)=>ele.detailedAddress),
|
unloadingAddressArr: this.endInfo.map((ele: any) => ele.detailedAddress),
|
||||||
deadlineTime: parms.deadlineTime,
|
deadlineTime: parms.deadlineTime
|
||||||
}
|
};
|
||||||
const modalRef = this.modalService.create({
|
const modalRef = this.modalService.create({
|
||||||
nzTitle: '二维码',
|
nzTitle: '二维码',
|
||||||
nzWidth: '468px',
|
nzWidth: '468px',
|
||||||
nzContent: SupplyManagementQrcodePageComponent,
|
nzContent: SupplyManagementQrcodePageComponent,
|
||||||
nzComponentParams: {
|
nzComponentParams: {
|
||||||
i: item,
|
i: item
|
||||||
},
|
},
|
||||||
nzFooter: null,
|
nzFooter: null
|
||||||
});
|
});
|
||||||
modalRef.afterClose.subscribe(() => {
|
modalRef.afterClose.subscribe(() => {
|
||||||
this.router.navigate(['/supply-management/index'], { queryParams: { type: 'bulk' } });
|
this.router.navigate(['/supply-management/index'], { queryParams: { type: 'bulk' } });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
requests(url: any, params: any, change?: any) {
|
requests(url: any, params: any, change?: any) {
|
||||||
this.service.request(url, params).subscribe((res: any) => {
|
this.service.request(url, params).subscribe((res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
@ -875,6 +900,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
dataR(res: any) {
|
dataR(res: any) {
|
||||||
// 注:区分编辑和下一单 区别是初始化的时候加不加ID
|
// 注:区分编辑和下一单 区别是初始化的时候加不加ID
|
||||||
if (res?.shipperAppUserName) {
|
if (res?.shipperAppUserName) {
|
||||||
|
this.shipperName = res?.shipperAppUserName;
|
||||||
const List: any = [];
|
const List: any = [];
|
||||||
this.service.request(this.service.$api_enterpriceList, { enterpriseName: res?.shipperAppUserName }).subscribe(rs => {
|
this.service.request(this.service.$api_enterpriceList, { enterpriseName: res?.shipperAppUserName }).subscribe(rs => {
|
||||||
rs?.forEach((element: any) => {
|
rs?.forEach((element: any) => {
|
||||||
@ -1057,8 +1083,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 装卸货地址互换
|
// 装卸货地址互换
|
||||||
swapAddress(){
|
swapAddress() {
|
||||||
let item = this.startInfo;
|
let item = this.startInfo;
|
||||||
this.startInfo = this.endInfo;
|
this.startInfo = this.endInfo;
|
||||||
this.endInfo = item;
|
this.endInfo = item;
|
||||||
@ -1084,9 +1110,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
this.service.limitKeys2.weight,
|
this.service.limitKeys2.weight,
|
||||||
this.service.limitKeys2.volume,
|
this.service.limitKeys2.volume,
|
||||||
this.service.limitKeys2.trainNumber,
|
this.service.limitKeys2.trainNumber,
|
||||||
this.service.limitKeys2.freight,
|
this.service.limitKeys2.freight
|
||||||
];
|
];
|
||||||
this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe((res) => {
|
this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe(res => {
|
||||||
const maxMonth = res.filter((item: any) => item.itemKey === this.service.limitKeys2.month)[0].itemValue;
|
const maxMonth = res.filter((item: any) => item.itemKey === this.service.limitKeys2.month)[0].itemValue;
|
||||||
const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys2.weight)[0].itemValue;
|
const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys2.weight)[0].itemValue;
|
||||||
const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys2.volume)[0].itemValue;
|
const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys2.volume)[0].itemValue;
|
||||||
@ -1098,7 +1124,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
maxVolume: Number(maxVolume),
|
maxVolume: Number(maxVolume),
|
||||||
maxTrainNumber: Number(maxTrainNumber),
|
maxTrainNumber: Number(maxTrainNumber),
|
||||||
maxFreight: Number(maxFreight)
|
maxFreight: Number(maxFreight)
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,10 +58,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
totalTime = 0.0; //路程总时间
|
totalTime = 0.0; //路程总时间
|
||||||
currentRate = 0; //实时计算的费率
|
currentRate = 0; //实时计算的费率
|
||||||
id = this.route.snapshot.params.id;
|
id = this.route.snapshot.params.id;
|
||||||
// // 单位
|
|
||||||
startInfo: any = []; // 发货地数据
|
startInfo: any = []; // 发货地数据
|
||||||
endInfo: any = []; // 卸货地数据
|
endInfo: any = []; // 卸货地数据
|
||||||
PageStatus = '';
|
PageStatus = '';
|
||||||
|
shipperName = '';
|
||||||
changeSub = new Subject<string>();
|
changeSub = new Subject<string>();
|
||||||
envCache: any;
|
envCache: any;
|
||||||
enterpriseProjectIds: any;
|
enterpriseProjectIds: any;
|
||||||
@ -163,10 +163,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
return of([]);
|
return of([]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
change: (q: any) => {
|
change: (q: any, qs: any) => {
|
||||||
let str = q.replace(/^\s+|\s+$/g, '');
|
let str = q.replace(/^\s+|\s+$/g, '');
|
||||||
if (str) {
|
if (str) {
|
||||||
this.getRegionCode(str);
|
this.getRegionCode(str);
|
||||||
|
this.shipperName = qs?.label;
|
||||||
this.payChange();
|
this.payChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1003,7 +1004,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
nzContent: TranAgreementComponent,
|
nzContent: TranAgreementComponent,
|
||||||
nzWidth: 900,
|
nzWidth: 900,
|
||||||
nzFooter: null,
|
nzFooter: null,
|
||||||
nzComponentParams: { Object: params }
|
nzComponentParams: { object: params, shipperName: this.shipperName }
|
||||||
});
|
});
|
||||||
modalRef.afterClose.subscribe(result => {
|
modalRef.afterClose.subscribe(result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
@ -1102,6 +1103,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
// 初始化赋值信息函数
|
// 初始化赋值信息函数
|
||||||
dataR(res: any) {
|
dataR(res: any) {
|
||||||
if (res?.shipperAppUserName) {
|
if (res?.shipperAppUserName) {
|
||||||
|
this.shipperName = res?.shipperAppUserName;
|
||||||
const List: any = [];
|
const List: any = [];
|
||||||
this.service.request(this.service.$api_enterpriceList, { enterpriseName: res?.shipperAppUserName }).subscribe(rs => {
|
this.service.request(this.service.$api_enterpriceList, { enterpriseName: res?.shipperAppUserName }).subscribe(rs => {
|
||||||
rs?.forEach((element: any) => {
|
rs?.forEach((element: any) => {
|
||||||
|
|||||||
@ -51,6 +51,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
totalDistance = 0.0; //总里程
|
totalDistance = 0.0; //总里程
|
||||||
totalTime = 0.0; //路程总时间
|
totalTime = 0.0; //路程总时间
|
||||||
currentRate = 0; //实时计算的费率
|
currentRate = 0; //实时计算的费率
|
||||||
|
shipperName = '';
|
||||||
constructor(
|
constructor(
|
||||||
private http: _HttpClient,
|
private http: _HttpClient,
|
||||||
fb: FormBuilder,
|
fb: FormBuilder,
|
||||||
@ -156,10 +157,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
return of([]);
|
return of([]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
change: (q: any) => {
|
change: (q: any, qs: any) => {
|
||||||
let str = q.replace(/^\s+|\s+$/g, '');
|
let str = q.replace(/^\s+|\s+$/g, '');
|
||||||
if (str) {
|
if (str) {
|
||||||
this.getRegionCode(str);
|
this.getRegionCode(str);
|
||||||
|
this.shipperName = qs?.label;
|
||||||
this.payChange();
|
this.payChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -977,11 +979,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
nzContent: TranAgreementComponent,
|
nzContent: TranAgreementComponent,
|
||||||
nzWidth: 900,
|
nzWidth: 900,
|
||||||
nzFooter: null,
|
nzFooter: null,
|
||||||
nzComponentParams: { Object: params }
|
nzComponentParams: { object: params ,shipperName: this.shipperName}
|
||||||
});
|
});
|
||||||
modalRef.afterClose.subscribe(result => {
|
modalRef.afterClose.subscribe(result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
this.submit(submitType, params);
|
this.submit(submitType, params, );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-02-24 20:19:51
|
* @Date : 2022-02-24 20:19:51
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-02-28 20:55:59
|
* @LastEditTime : 2022-03-03 14:24:51
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -28,33 +28,48 @@ import { SupplyManagementService } from '../../services/supply-management.servic
|
|||||||
styleUrls: ['./tran-agreement.component.less']
|
styleUrls: ['./tran-agreement.component.less']
|
||||||
})
|
})
|
||||||
export class TranAgreementComponent {
|
export class TranAgreementComponent {
|
||||||
Object: any;
|
object: any;
|
||||||
agreement:any;
|
agreement:any;
|
||||||
|
envCache:any;
|
||||||
|
shipperName:any;
|
||||||
constructor(private modal: NzModalRef,public service: SupplyManagementService,) {
|
constructor(private modal: NzModalRef,public service: SupplyManagementService,) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.log(Object)
|
console.log(this.object)
|
||||||
const params = {
|
const params = {
|
||||||
contractType:'1',
|
contractType:'1',
|
||||||
parametersDTO: {
|
|
||||||
// 回单付
|
|
||||||
back: 'dsfgffdsg',
|
|
||||||
// 发货地址
|
|
||||||
consignorAddress: 'gfdgdfdg',
|
|
||||||
// 发货时间
|
|
||||||
consignorDate: 'dsggdsgsfgds',
|
|
||||||
// 发货时间
|
|
||||||
// consignorDate: '',
|
|
||||||
|
|
||||||
},
|
|
||||||
resourceType: '1',
|
resourceType: '1',
|
||||||
signingObject: '1',
|
signingObject: '1',
|
||||||
templateType: 'MX',
|
templateType: 'MX',
|
||||||
}
|
parametersDTO: {
|
||||||
|
contractCode:'',
|
||||||
|
shipperName:this?.shipperName, //托运人
|
||||||
|
carrierName:this.object?.enterpriseInfoName, //承运人
|
||||||
|
consignorInfo: `${this.object?.unLoadingPlaceDTOList[0].appUserName} ${this.object?.unLoadingPlaceDTOList[0].contractTelephone}`, // 发货信息
|
||||||
|
consignorAddress: this.object?.unLoadingPlaceDTOList[0].detailedAddress, // 发货地址
|
||||||
|
consignorDate: this.object?.loadingTime, // 发货时间
|
||||||
|
consigneeInfo: `${this.object?.unLoadingPlaceDTOList[this.object?.unLoadingPlaceDTOList.length-1].appUserName} ${this.object?.unLoadingPlaceDTOList[this.object?.unLoadingPlaceDTOList.length-1].contractTelephone}`, // 收货信息
|
||||||
|
consigneeDate: this.object?.unloadingTime, // 收货时间
|
||||||
|
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:this.object?.total, // 订单运费金额(元)
|
||||||
|
pre:this.object?.expenseDTOList?.filter((item:any) => item.expenseCode === 'PRE')[0].price, //预付
|
||||||
|
rece:this.object?.expenseDTOList?.filter((item:any) => item.expenseCode === 'RECE')[0].price,// 到付
|
||||||
|
back:this.object?.expenseDTOList?.filter((item:any) => item.expenseCode === 'BACK')[0].price,// 回单付
|
||||||
|
lunarKnot:0,
|
||||||
|
total:this.object?.subtotal, // 合计(元)
|
||||||
|
paymentTime:`到货后${this.object?.paymentDays}天`, // 承诺支付运费时间
|
||||||
|
year:new Date().getFullYear(), // 签约年份
|
||||||
|
month:new Date().getMonth()+1, // 签约月份
|
||||||
|
day:new Date().getDate(), // 签约日期
|
||||||
|
}
|
||||||
|
}
|
||||||
console.log(params)
|
console.log(params)
|
||||||
|
|
||||||
this.service.request(this.service.$api_getContractContent,params).subscribe((res) => {
|
this.service.request(this.service.$api_getContractContent,params).subscribe((res) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user