优化
This commit is contained in:
@ -33,28 +33,28 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
public shipperservice: ShipperBaseService,
|
public shipperservice: ShipperBaseService,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
) {}
|
) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initST();
|
this.initST();
|
||||||
this.initSF();
|
this.initSF();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 查询参数
|
* 查询参数
|
||||||
*/
|
*/
|
||||||
get reqParams() {
|
get reqParams() {
|
||||||
const params = {
|
const params = {
|
||||||
...this.sf?.value,
|
...this.sf?.value,
|
||||||
}
|
}
|
||||||
delete params.signTime;
|
delete params.signTime;
|
||||||
delete params._$expand;
|
delete params._$expand;
|
||||||
if(this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
|
if (this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
|
||||||
params.signTime = {
|
params.signTime = {
|
||||||
start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
|
start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
|
||||||
end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'),
|
end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
|
if (this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
|
||||||
params.effectiveEndTime = {
|
params.effectiveEndTime = {
|
||||||
start: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
|
start: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
|
||||||
end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss'),
|
end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss'),
|
||||||
@ -91,7 +91,7 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
title: '合同名称',
|
title: '合同名称',
|
||||||
width: '100px',
|
width: '100px',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
index: 'templateName'
|
index: 'contractName'
|
||||||
},
|
},
|
||||||
{ title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' },
|
{ title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' },
|
||||||
{ title: '合同对象', index: 'contractObjectName', width: '120px', className: 'text-center' },
|
{ title: '合同对象', index: 'contractObjectName', width: '120px', className: 'text-center' },
|
||||||
@ -157,7 +157,7 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
widget: 'dict-select',
|
widget: 'dict-select',
|
||||||
containsAllLable: true,
|
containsAllLable: true,
|
||||||
params: { dictKey: 'contract:type' },
|
params: { dictKey: 'contract:type' },
|
||||||
containAllLable:true,
|
containAllLable: true,
|
||||||
} as SFSelectWidgetSchema,
|
} as SFSelectWidgetSchema,
|
||||||
},
|
},
|
||||||
enterpriseInfoId: {
|
enterpriseInfoId: {
|
||||||
@ -210,7 +210,7 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
widget: 'dict-select',
|
widget: 'dict-select',
|
||||||
containsAllLable: true,
|
containsAllLable: true,
|
||||||
params: { dictKey: 'esign:flow:status' },
|
params: { dictKey: 'esign:flow:status' },
|
||||||
containAllLable:true,
|
containAllLable: true,
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value,
|
_$expand: (value: boolean) => value,
|
||||||
},
|
},
|
||||||
@ -238,9 +238,9 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
approval(): void {}
|
approval(): void { }
|
||||||
|
|
||||||
add(): void {}
|
add(): void { }
|
||||||
|
|
||||||
routeTo(item: any) {
|
routeTo(item: any) {
|
||||||
this.router.navigate(['/ticket/invoice-requested-detail/1']);
|
this.router.navigate(['/ticket/invoice-requested-detail/1']);
|
||||||
|
|||||||
@ -271,6 +271,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
errors: { required: '请填写货物名称' },
|
errors: { required: '请填写货物名称' },
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
goodsTypeName: (value: any) => value && value === '其它'
|
goodsTypeName: (value: any) => value && value === '其它'
|
||||||
|
},
|
||||||
|
blur: (value: any) => {
|
||||||
|
this.checkGoodsName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -583,7 +586,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
subStartInfo(event: any, index: number, id?: any) {
|
subStartInfo(event: any, index: number, id?: any) {
|
||||||
if (id) {
|
if (id) {
|
||||||
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => {});
|
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => { });
|
||||||
}
|
}
|
||||||
this.startInfo.splice(index, 1);
|
this.startInfo.splice(index, 1);
|
||||||
this.validateForm1.removeControl(`loadAddress${index}`);
|
this.validateForm1.removeControl(`loadAddress${index}`);
|
||||||
@ -611,7 +614,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
subEndInfo(event: any, index: number, id?: any) {
|
subEndInfo(event: any, index: number, id?: any) {
|
||||||
if (id) {
|
if (id) {
|
||||||
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => {});
|
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => { });
|
||||||
}
|
}
|
||||||
this.endInfo.splice(index, 1);
|
this.endInfo.splice(index, 1);
|
||||||
this.validateForm1.removeControl(`unloadAddress${index}`);
|
this.validateForm1.removeControl(`unloadAddress${index}`);
|
||||||
@ -838,7 +841,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
nzContent: AmapPoiPickerComponent,
|
nzContent: AmapPoiPickerComponent,
|
||||||
nzWidth: 900,
|
nzWidth: 900,
|
||||||
nzOnOk: item => {
|
nzOnOk: item => {
|
||||||
if(item?.poi) {
|
if (item?.poi) {
|
||||||
const poi = item.poi;
|
const poi = item.poi;
|
||||||
const locList = poi.location.toString().split(',');
|
const locList = poi.location.toString().split(',');
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -1127,4 +1130,16 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
checkGoodsName() {
|
||||||
|
this.service.request(this.service.$api_checkGoodsName, this.sf3.value.goodsName1).subscribe(res => {
|
||||||
|
if (res === false) {
|
||||||
|
const modalRef = this.modalService.error({
|
||||||
|
nzTitle: '货物名称含有违禁词,请重新输入!',
|
||||||
|
});
|
||||||
|
modalRef.afterClose.subscribe(result => {
|
||||||
|
// this.sf3.setValue('/goodsName1', null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -323,6 +323,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
errors: { required: '请填写货物名称' },
|
errors: { required: '请填写货物名称' },
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
goodsTypeName: (value: any) => value && value === '其它'
|
goodsTypeName: (value: any) => value && value === '其它'
|
||||||
|
},
|
||||||
|
blur: (value: any) => {
|
||||||
|
this.checkGoodsName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -465,10 +468,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
change: (tag: any, org: any) => {
|
change: (tag: any, org: any) => {
|
||||||
if(tag === '3'){
|
if (tag === '3') {
|
||||||
this.sf5.setValue('/insurancePremium', null);
|
this.sf5.setValue('/insurancePremium', null);
|
||||||
this.sf5.setValue('/insuranceRate', null);
|
this.sf5.setValue('/insuranceRate', null);
|
||||||
}else {
|
} else {
|
||||||
this.getInsurersPrice(tag);
|
this.getInsurersPrice(tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -481,7 +484,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'custom',
|
||||||
visibleIf: { insuranceType: (value: string) => value === '0' }
|
visibleIf: { insuranceType: (value: string) => value === '0' }
|
||||||
} ,
|
},
|
||||||
},
|
},
|
||||||
type2: {
|
type2: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -494,7 +497,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
insurancePremium: {
|
insurancePremium: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '服务包费用',
|
title: '服务包费用',
|
||||||
readOnly:true,
|
readOnly: true,
|
||||||
ui: {
|
ui: {
|
||||||
visibleIf: { insuranceType: (value: string) => value !== '3' }
|
visibleIf: { insuranceType: (value: string) => value !== '3' }
|
||||||
}
|
}
|
||||||
@ -523,7 +526,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
required: [ 'insurancePremium']
|
required: ['insurancePremium']
|
||||||
};
|
};
|
||||||
this.ui5 = {
|
this.ui5 = {
|
||||||
'*': {
|
'*': {
|
||||||
@ -986,9 +989,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
];
|
];
|
||||||
// 运费信息
|
// 运费信息
|
||||||
const expenseList = [
|
const expenseList = [
|
||||||
{ expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '' ,resourceId: this.sf7data?.PREresourceId || '' },
|
{ expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '', resourceId: this.sf7data?.PREresourceId || '' },
|
||||||
{ expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' ,resourceId: this.sf7data?.RECEresourceId || ''},
|
{ expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '', resourceId: this.sf7data?.RECEresourceId || '' },
|
||||||
{ expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' ,resourceId: this.sf7data?.BACKresourceId || ''}
|
{ expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '', resourceId: this.sf7data?.BACKresourceId || '' }
|
||||||
];
|
];
|
||||||
// 从“再下一单”过来,将所有的子参数内的id都删除
|
// 从“再下一单”过来,将所有的子参数内的id都删除
|
||||||
if (this.PageStatus === '整车下一单') {
|
if (this.PageStatus === '整车下一单') {
|
||||||
@ -1017,8 +1020,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
paymentDays: this.sf7.value.paymentDays,
|
paymentDays: this.sf7.value.paymentDays,
|
||||||
estimatedKilometers: this.totalDistance,
|
estimatedKilometers: this.totalDistance,
|
||||||
estimatedTravelTime: this.totalTime,
|
estimatedTravelTime: this.totalTime,
|
||||||
subtotal :this.sf7.value.subtotal,
|
subtotal: this.sf7.value.subtotal,
|
||||||
total:this.sf7.value.total,
|
total: this.sf7.value.total,
|
||||||
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,
|
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,
|
||||||
goodsValue: this.sf4.value.goodsValue
|
goodsValue: this.sf4.value.goodsValue
|
||||||
};
|
};
|
||||||
@ -1081,7 +1084,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
nzWidth: 900,
|
nzWidth: 900,
|
||||||
nzOnOk: item => {
|
nzOnOk: item => {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
if(item?.poi) {
|
if (item?.poi) {
|
||||||
const poi = item.poi;
|
const poi = item.poi;
|
||||||
const locList = poi.pois;
|
const locList = poi.pois;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -1155,7 +1158,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
this.totalDistance = res?.estimatedKilometers;
|
this.totalDistance = res?.estimatedKilometers;
|
||||||
this.totalTime = res?.estimatedTravelTime;
|
this.totalTime = res?.estimatedTravelTime;
|
||||||
this.sf1data = {
|
this.sf1data = {
|
||||||
resourceCode:res?.resourceCode || '',
|
resourceCode: res?.resourceCode || '',
|
||||||
enterpriseInfoName: res?.enterpriseInfoName,
|
enterpriseInfoName: res?.enterpriseInfoName,
|
||||||
enterpriseInfoId: res?.enterpriseInfoId,
|
enterpriseInfoId: res?.enterpriseInfoId,
|
||||||
dispatchPhone: res?.dispatchPhone,
|
dispatchPhone: res?.dispatchPhone,
|
||||||
@ -1441,13 +1444,26 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 运费信息价格变更
|
// 运费信息价格变更
|
||||||
priceChange(event:any, i:any){
|
priceChange(event: any, i: any) {
|
||||||
i.setValue(event);
|
i.setValue(event);
|
||||||
if(event>=99999){
|
if (event >= 99999) {
|
||||||
this.modalService.warning({
|
this.modalService.warning({
|
||||||
nzTitle: '可输入的最大金额为99999元',
|
nzTitle: '可输入的最大金额为99999元',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.payChange()
|
this.payChange()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkGoodsName() {
|
||||||
|
this.service.request(this.service.$api_checkGoodsName, this.sf3.value.goodsName1).subscribe(res => {
|
||||||
|
if (res === false) {
|
||||||
|
const modalRef = this.modalService.error({
|
||||||
|
nzTitle: '货物名称含有违禁词,请重新输入!',
|
||||||
|
});
|
||||||
|
modalRef.afterClose.subscribe(result => {
|
||||||
|
// this.sf3.setValue('/goodsName1', null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -180,6 +180,9 @@ export class SupplyManagementService extends BaseService {
|
|||||||
// 发送邀请司机短信
|
// 发送邀请司机短信
|
||||||
$api_send_msg_code = `/api/mdc/pbc/smsSend/sendInviteDriver`;
|
$api_send_msg_code = `/api/mdc/pbc/smsSend/sendInviteDriver`;
|
||||||
|
|
||||||
|
// 校验货物名称是否合规
|
||||||
|
$api_checkGoodsName = '/api/sdc/goodsResourceShipper/checkGoodsName';
|
||||||
|
|
||||||
getDictByKey(dictKey: string) {
|
getDictByKey(dictKey: string) {
|
||||||
const params = { dictKey: dictKey };
|
const params = { dictKey: dictKey };
|
||||||
return this.request(this.$api_getDictValue, params);
|
return this.request(this.$api_getDictValue, params);
|
||||||
|
|||||||
Reference in New Issue
Block a user