Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
Taric Xin
2022-04-12 20:36:46 +08:00
5 changed files with 128 additions and 94 deletions

View File

@ -91,7 +91,7 @@ export class ContractManagementFrameComponent implements OnInit {
title: '合同名称',
width: '100px',
className: 'text-center',
index: 'templateName'
index: 'contractName'
},
{ title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' },
{ title: '合同对象', index: 'contractObjectName', width: '120px', className: 'text-center' },

View File

@ -475,10 +475,10 @@ export class DatatableFundReportingComponent implements OnInit {
routeTowaybill(item: any) {
if (item.orderType === '1') {
window.open(location.origin + `/#/waybill-management/vehicle/vehicle-detail/${item.waybillId}`);
window.open(location.origin + `/#/waybill-management/vehicle/vehicle-detail/${item.wayBillId}`);
} else {
window.open(location.origin + `/#/waybill-management/bulk/bulk-detail/${item.waybillId}`);
window.open(location.origin + `/#/waybill-management/bulk/bulk-detail/${item.wayBillId}`);
}
}

View File

@ -271,6 +271,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
errors: { required: '请填写货物名称' },
visibleIf: {
goodsTypeName: (value: any) => value && value === '其它'
},
blur: (value: any) => {
this.checkGoodsName();
}
}
}
@ -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);
});
}
});
}
}

View File

@ -323,6 +323,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
errors: { required: '请填写货物名称' },
visibleIf: {
goodsTypeName: (value: any) => value && value === '其它'
},
blur: (value: any) => {
this.checkGoodsName();
}
}
}
@ -1450,4 +1453,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
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);
});
}
});
}
}

View File

@ -180,6 +180,9 @@ export class SupplyManagementService extends BaseService {
// 发送邀请司机短信
$api_send_msg_code = `/api/mdc/pbc/smsSend/sendInviteDriver`;
// 校验货物名称是否合规
$api_checkGoodsName = '/api/sdc/goodsResourceShipper/checkGoodsName';
getDictByKey(dictKey: string) {
const params = { dictKey: dictKey };
return this.request(this.$api_getDictValue, params);