This commit is contained in:
潘晓云
2022-04-12 19:45:37 +08:00
parent 1a5a6473c7
commit 9422e97eb6
4 changed files with 126 additions and 92 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

@ -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);