初步联调货源
This commit is contained in:
@ -22,31 +22,26 @@ import { SupplyManagementService } from '../../services/supply-management.servic
|
||||
export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
validateForm1: FormGroup;
|
||||
newTempchecked = false; //是否存入新模板
|
||||
sf1data: any; // 货源单设置回显
|
||||
sf3data: any; // 货源单设置回显
|
||||
sf4data: any; // 货源单设置回显
|
||||
sf5data: any; // 货源单设置回显
|
||||
sf6data: any; // 货源单设置回显
|
||||
sf7data: any; // 货源单设置回显
|
||||
creatTime: any; // 货源单设置回显
|
||||
modifyTime: any; // 货源单设置回显
|
||||
id = this.route.snapshot.params.id;
|
||||
// // 单位
|
||||
unit1 = '吨';
|
||||
unit2 = '方';
|
||||
unit3 = '保价费金额';
|
||||
startInfo: any[] = [
|
||||
{
|
||||
addresss: '深圳',
|
||||
name: '张三',
|
||||
phone: '18888888888'
|
||||
}
|
||||
];
|
||||
endInfo: any[] = [
|
||||
{
|
||||
addresss: '深圳',
|
||||
name: '张三',
|
||||
phone: '18888888888'
|
||||
}
|
||||
];
|
||||
startInfo: any = [];
|
||||
endInfo: any = [];
|
||||
dataList: any;
|
||||
constructor(private http: _HttpClient, fb: FormBuilder, private router: Router, private route: ActivatedRoute, private modalService: NzModalService, public service: SupplyManagementService) {
|
||||
this.validateForm1 = fb.group({
|
||||
name1: [null, []],
|
||||
name2: [null, []],
|
||||
name3: [null, []]
|
||||
createTime: [null, []],
|
||||
modifyTime: [null, []],
|
||||
});
|
||||
}
|
||||
|
||||
@ -127,7 +122,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'text'
|
||||
},
|
||||
default: 0
|
||||
},
|
||||
externalResourceCode: {
|
||||
type: 'string',
|
||||
@ -163,7 +157,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
};
|
||||
this.ui1 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
spanLabelFixed: 120,
|
||||
grid: { span: 8 }
|
||||
}
|
||||
};
|
||||
@ -192,7 +186,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
initSF3() {
|
||||
this.schema3 = {
|
||||
properties: {
|
||||
name1: {
|
||||
goodsNameId: {
|
||||
type: 'string',
|
||||
title: '货物名称',
|
||||
enum: [
|
||||
@ -240,7 +234,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
initSF4() {
|
||||
this.schema4 = {
|
||||
properties: {
|
||||
name3: {
|
||||
weight: {
|
||||
type: 'string',
|
||||
title: '重量/体积',
|
||||
ui: {
|
||||
@ -248,7 +242,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
name4: {
|
||||
volume: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
@ -256,7 +250,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
name5: {
|
||||
vehicleDemand: {
|
||||
type: 'string',
|
||||
title: '用车需求',
|
||||
enum: [
|
||||
@ -305,13 +299,13 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
spanLabelFixed: 90,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$name3: {
|
||||
$weight: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$name4: {
|
||||
$volume: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$name5: {
|
||||
$vehicleDemand: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$name6: {
|
||||
@ -323,7 +317,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
initSF5() {
|
||||
this.schema5 = {
|
||||
properties: {
|
||||
name1: {
|
||||
goodsValue: {
|
||||
type: 'string',
|
||||
title: '货物价值',
|
||||
ui: {
|
||||
@ -344,12 +338,12 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
initSF6() {
|
||||
this.schema6 = {
|
||||
properties: {
|
||||
name1: {
|
||||
stateReceipt: {
|
||||
type: 'string',
|
||||
title: '是否回单',
|
||||
enum: [
|
||||
{ label: '1', value: '1' },
|
||||
{ label: '2', value: '2' }
|
||||
{ label: '是', value: '1' },
|
||||
{ label: '否', value: '2' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
@ -365,7 +359,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
// change: (i) => this.updateCategory(i, '/categoryId2'),
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
name2: {
|
||||
remarks: {
|
||||
type: 'string',
|
||||
title: '备注',
|
||||
ui: {
|
||||
@ -387,11 +381,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
initSF7() {
|
||||
this.schema7 = {
|
||||
properties: {
|
||||
name1: { type: 'number', title: '预付', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema },
|
||||
name2: { type: 'number', title: '到付', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema },
|
||||
name3: { type: 'number', title: '油卡', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema },
|
||||
name4: { type: 'number', title: '回单付', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema },
|
||||
name5: {
|
||||
prePay: { type: 'number', title: '预付', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema },
|
||||
toPay: { type: 'number', title: '到付', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema },
|
||||
oilCardPay: { type: 'number', title: '油卡', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema },
|
||||
receiptPay: { type: 'number', title: '回单付', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema },
|
||||
oilCardPay2: {
|
||||
type: 'string',
|
||||
title: '小计',
|
||||
ui: {
|
||||
@ -399,7 +393,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
name6: {
|
||||
appendFee: {
|
||||
type: 'string',
|
||||
title: '附加费',
|
||||
ui: {
|
||||
@ -407,7 +401,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
name7: {
|
||||
totalFee: {
|
||||
type: 'string',
|
||||
title: '总费用',
|
||||
ui: {
|
||||
@ -435,9 +429,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
|
||||
addStartInfo(event: any) {
|
||||
this.startInfo.push({
|
||||
addresss: '',
|
||||
name: '',
|
||||
phone: ''
|
||||
detailedAddress: '',
|
||||
appUserName: '',
|
||||
contractTelephone: ''
|
||||
});
|
||||
}
|
||||
subStartInfo(event: any, index: number) {
|
||||
@ -446,9 +440,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
|
||||
addEndInfo(event: any) {
|
||||
this.endInfo.push({
|
||||
addresss: '',
|
||||
name: '',
|
||||
phone: ''
|
||||
detailedAddress: '',
|
||||
appUserName: '',
|
||||
contractTelephone: ''
|
||||
});
|
||||
}
|
||||
subEndInfo(event: any, index: number) {
|
||||
@ -469,10 +463,21 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.validateForm1.controls[key].updateValueAndValidity();
|
||||
});
|
||||
console.log(this.validateForm1);
|
||||
var d = new Date(this.validateForm1.value.createTime);
|
||||
console.log(d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate() + ' ' + d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds())
|
||||
|
||||
if (this.validateForm1.invalid) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(this.sf1.value)
|
||||
console.log(this.startInfo)
|
||||
console.log(this.endInfo)
|
||||
console.log(this.validateForm1.value)
|
||||
console.log(this.sf3.value)
|
||||
console.log(this.sf4.value)
|
||||
console.log(this.sf5.value)
|
||||
console.log(this.sf6.value)
|
||||
console.log(this.sf7.value)
|
||||
// const data = this.form.value;
|
||||
// this.http.post('/register', data).subscribe(() => {
|
||||
// this.router.navigateByUrl('/passport/register-result', {
|
||||
@ -497,9 +502,81 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
// 初始化信息
|
||||
initdata() {
|
||||
console.log(this.id)
|
||||
this.service.request(`${this.service.$api_get_getCompleteVehicleDetail}`, {id:this.id}).subscribe((res) => {
|
||||
// this.service.request(`${this.service.$api_get_getCompleteVehicleDetail}`, {id:this.id}).subscribe((res) => {
|
||||
this.service.request(`${this.service.$api_get_getBulkDetail}`, {id:this.id}).subscribe((res) => {
|
||||
console.log(res)
|
||||
this.dataList = res;
|
||||
// this.dataList = res;
|
||||
this.sf1data = {
|
||||
shipperAppUserNmae: res?.shipperAppUserNmae || '',
|
||||
enterpriseProjectName: res?.enterpriseProjectName || '',
|
||||
enterpriseInfoName: res?.enterpriseInfoName || '',
|
||||
externalResourceCode: res?.externalResourceCode || '',
|
||||
dispatchId: res?.dispatchId || '',
|
||||
}
|
||||
res.unLoadingPlaceList.forEach((element: any) => {
|
||||
if(element.type === 1) {
|
||||
this.startInfo.push({
|
||||
detailedAddress: element.detailedAddress,
|
||||
appUserName: element.appUserName,
|
||||
contractTelephone: element.contractTelephone,
|
||||
})
|
||||
console.log(element)
|
||||
if(element.createTime) {
|
||||
this.creatTime = element.createTime
|
||||
this.creatTime = element.modifyTime
|
||||
}
|
||||
} else if(element.type === 2) {
|
||||
this.endInfo.push({
|
||||
detailedAddress: element.detailedAddress,
|
||||
appUserName: element.appUserName,
|
||||
contractTelephone: element.contractTelephone,
|
||||
})
|
||||
}
|
||||
});
|
||||
this.sf3data = {
|
||||
goodsNameId: res?.goodsInfoList.goodsNameId || '',
|
||||
weight: res?.goodsInfoList.weight || '',
|
||||
volume: res?.goodsInfoList.volume || '',
|
||||
externalResourceCode: res?.goodsInfoList.goodsNameId || '',
|
||||
}
|
||||
this.sf4data = {
|
||||
goodsNameId: res?.goodsInfoList.goodsNameId || '',
|
||||
weight: res?.goodsInfoList.weight || '',
|
||||
volume: res?.goodsInfoList.volume || '',
|
||||
externalResourceCode: res?.goodsInfoList.goodsNameId || '',
|
||||
}
|
||||
this.sf5data = {
|
||||
goodsValue: res?.goodsValue || '',
|
||||
}
|
||||
this.sf6data = {
|
||||
stateReceipt: res?.supplementaryInformationVO.stateReceipt || '',
|
||||
remarks: res?.supplementaryInformationVO.remarks || '',
|
||||
}
|
||||
this.sf7data = {
|
||||
prePay: res?.shippingInformationVO?.prePay || '',
|
||||
toPay: res?.shippingInformationVO?.toPay || '',
|
||||
oilCardPay: res?.shippingInformationVO?.oilCardPay || '',
|
||||
receiptPay: res?.shippingInformationVO?.receiptPay || '',
|
||||
oilCardPay2: res?.shippingInformationVO?.oilCardPay || '',
|
||||
appendFee: res?.shippingInformationVO?.appendFee || '',
|
||||
totalFee: res?.shippingInformationVO?.totalFee || '',
|
||||
name8: res?.shippingInformationVO?.appendFee || '',
|
||||
}
|
||||
// <p>预付:{{dataList?.shippingInformationVO?.prePay | currency: '¥' }}</p>
|
||||
// <p>油卡:{{dataList?.shippingInformationVO?.oilCardPay | currency: '¥'}}</p>
|
||||
// <p>到付:{{dataList?.shippingInformationVO?.toPay | currency: '¥'}}</p>
|
||||
// <p>回单付:{{dataList?.shippingInformationVO?.receiptPay | currency: '¥'}}</p>
|
||||
// <p>保险费:{{dataList?.shippingInformationVO?.insuranceFee | currency: '¥'}}</p>
|
||||
// <p>附加费保险费:{{dataList?.shippingInformationVO?.appendFee | currency: '¥'}}</p> totalFee
|
||||
console.log(this.sf1.value)
|
||||
console.log(this.startInfo)
|
||||
console.log(this.endInfo)
|
||||
console.log(this.validateForm1.value)
|
||||
console.log(this.sf3.value)
|
||||
console.log(this.sf4.value)
|
||||
console.log(this.sf5.value)
|
||||
console.log(this.sf6.value)
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user