From 715976be2d470f9b91a283d9cd60a57955007924 Mon Sep 17 00:00:00 2001 From: jishenghua <752718920@qq.com> Date: Wed, 11 Jun 2025 23:35:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=8A=E6=94=B6=E6=94=AF=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=9A=84=E9=87=8D=E5=A4=8D=E6=8F=90=E7=A4=BA=E6=94=B9=E6=88=90?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=9A=84=E6=97=B6=E5=80=99=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/system/modules/InOutItemModal.vue | 29 ++++--------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/jshERP-web/src/views/system/modules/InOutItemModal.vue b/jshERP-web/src/views/system/modules/InOutItemModal.vue index e5c74ff5..70cd127c 100644 --- a/jshERP-web/src/views/system/modules/InOutItemModal.vue +++ b/jshERP-web/src/views/system/modules/InOutItemModal.vue @@ -72,8 +72,7 @@ name:{ rules: [ { required: true, message: '请输入名称!' }, - { min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' }, - { validator: this.validatePersonName} + { min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' } ]}, type:{ rules: [ @@ -128,36 +127,20 @@ } obj.then((res)=>{ if(res.code === 200){ - that.$emit('ok'); - }else{ + that.$emit('ok') + that.confirmLoading = false + that.close() + } else { that.$message.warning(res.data.message); + that.confirmLoading = false } }).finally(() => { - that.confirmLoading = false; - that.close(); }) } }) }, handleCancel () { this.close() - }, - validatePersonName(rule, value, callback){ - let params = { - name: value, - id: this.model.id?this.model.id:0 - }; - checkInOutItem(params).then((res)=>{ - if(res && res.code===200) { - if(!res.data.status){ - callback(); - } else { - callback("名称已经存在"); - } - } else { - callback(res.data); - } - }); } } }