发货添加错误反馈
This commit is contained in:
@@ -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()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||
label-width="120px">
|
||||
<el-form-item label="电话" prop="tel">
|
||||
<el-input v-model="dataForm.tel" placeholder="电话"></el-input>
|
||||
<el-input v-model="dataForm.tel" placeholder="电话" type="number"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input v-model="dataForm.email" placeholder="邮箱"></el-input>
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user