违禁品校验

This commit is contained in:
潘晓云
2022-04-13 10:46:31 +08:00
parent 13d7859a2d
commit b2c41c13b5
2 changed files with 10 additions and 2 deletions

View File

@ -1145,7 +1145,11 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
});
}
checkGoodsName() {
this.service.request(this.service.$api_checkGoodsName, this.sf3.value.goodsName1).subscribe(res => {
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: '货物名称含有违禁词,请重新输入!',

View File

@ -1469,7 +1469,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
checkGoodsName() {
this.service.request(this.service.$api_checkGoodsName, this.sf3.value.goodsName1).subscribe(res => {
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: '货物名称含有违禁词,请重新输入!',