From 99f7de1018df930ee96edd3b4f6400441ec13b83 Mon Sep 17 00:00:00 2001 From: "@fawn-nine" <1271023382@qq.com> Date: Mon, 9 Sep 2024 14:45:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B4=A7=E6=B7=BB=E5=8A=A0=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/order/orderdeliver-split.vue | 27 +++++++-------- src/views/modules/user/user-add-or-update.vue | 34 +++++++++---------- 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/src/views/modules/order/orderdeliver-split.vue b/src/views/modules/order/orderdeliver-split.vue index 85f13a3..d90e4bd 100644 --- a/src/views/modules/order/orderdeliver-split.vue +++ b/src/views/modules/order/orderdeliver-split.vue @@ -261,15 +261,20 @@ export default { // 传orderid }).then(({ data }) => { if (data && data.code === 0) { - loading.close(); + // loading.close(); // console.log(data) this.beforeCloseDialog() return this.$message.success('发货成功') } + else{ + this.$message.error(data.msg) + } + loading.close(); + }).catch((e) => { loading.close(); console.log('e',e) - this.$message.error('发货失败') + this.$message.error(e.msg) }) }else{ this.$message.error('请先选择物流公司') @@ -329,25 +334,19 @@ export default { }).then(({ data }) => { if(data && data.code === 0){ // console.log(data) - loading.close() this.beforeCloseDialog() return this.$message.success('发货成功') - + }else{ + this.$message.error(data.msg) } + loading.close() }).catch(({e}) => { + this.$message.error(e.msg) loading.close(); console.log('e',e) }) - // this.$message({ - // type: 'success', - // message: '发货成功!' - // }); - }).catch(() => { - // this.$message({ - // type: 'info', - // message: '已取消删除' - // }); - }); + + }) //this.beforeCloseDialog() } }) diff --git a/src/views/modules/user/user-add-or-update.vue b/src/views/modules/user/user-add-or-update.vue index 9ec4ba8..8be1e74 100644 --- a/src/views/modules/user/user-add-or-update.vue +++ b/src/views/modules/user/user-add-or-update.vue @@ -4,7 +4,7 @@ - + @@ -238,24 +238,24 @@ }, // 表单提交 dataFormSubmit() { - if (!this.dataForm.email && !this.dataForm.tel) { - this.$message.error("手机号或邮箱不为空!") - return - } + // if (!this.dataForm.email && !this.dataForm.tel) { + /// this.$message.error("手机号或邮箱不为空!") + // return + // } - if (this.dataForm.email) { - if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(this.dataForm.email) == false){ - this.$message.error("邮箱格式错误!") - return - } - } + // if (this.dataForm.email) { + // if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(this.dataForm.email) == false){ + // this.$message.error("邮箱格式错误!") + // return + // } + // } - if (this.dataForm.tel) { - if (/^1[3456789]\d{9}$/.test(this.dataForm.tel) == false) { - this.$message.error("手机格式错误!") - return - } - } + // if (this.dataForm.tel) { + // if (/^1[3456789]\d{9}$/.test(this.dataForm.tel) == false) { + // this.$message.error("手机格式错误!") + // return + // } + // } let myData = {} if (!this.dataForm.id) {