Commit dc5acacb authored by 鲁鑫's avatar 鲁鑫

工厂验证

parent f8011745
...@@ -238,8 +238,12 @@ export default { ...@@ -238,8 +238,12 @@ export default {
if (row != null && row != undefined) { if (row != null && row != undefined) {
this.form.factoryId = row.factoryId; this.form.factoryId = row.factoryId;
this.form.factoryName = row.factoryName; this.form.factoryName = row.factoryName;
this.form.itemId = this.itemId this.form.itemId = this.itemId
const idx = this.factoryList.findIndex(itm => itm.factoryId == row.factoryId)
if (idx > -1) {
this.$modal.msgError("新增工厂失败,工厂已存在");
return
}
addFactory(this.form).then((response) => { addFactory(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.getList(); this.getList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment