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) {