This commit is contained in:
wangshiming
2022-04-13 15:57:02 +08:00
parent eee6eb0581
commit 402bb51a41
5 changed files with 36 additions and 10 deletions

View File

@ -309,6 +309,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
errors: { required: '请填写货物名称' },
visibleIf: {
goodsTypeName: (value: any) => value && value === '其它'
},
blur: (value: any) => {
this.checkGoodsName();
}
}
}
@ -1237,4 +1240,21 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
}
this.payChange();
}
checkGoodsName() {
const name = this.sf3.getValue('/goodsName1');
if (!name || name.trim().length === 0) {
return;
}
this.service.request(this.service.$api_checkGoodsName, name).subscribe(res => {
if (res === false) {
const modalRef = this.modalService.error({
nzTitle: '货物名称含有违禁词,请重新输入!',
});
modalRef.afterClose.subscribe(result => {
// this.sf3.setValue('/goodsName1', null);
});
}
});
}
}