fix bug
This commit is contained in:
@ -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);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user