Commit 45b268ff authored by wanglianghe's avatar wanglianghe

必填校验

parent 66f5dc48
......@@ -223,7 +223,12 @@
// 表单参数
form: {},
// 表单校验
rules: {}
rules: {
transportType: [{ required: true, message: "运输方式不能为空", trigger: "blur" }],
startWarehouseId: [{ required: true, message: "始发地不能为空", trigger: "blur" }],
destWarehouseId: [{ required: true, message: "目的地不能为空", trigger: "blur" }],
}
};
},
computed: {
......@@ -342,6 +347,21 @@
if (!valid) {
return;
}
if(this.form.transportType != 3) {
if(!this.form.cabinetId) {
this.$message.error('柜型不能为空');
return;
}
}
if(this.form.transportType == 3 || this.form.transportType == 4) {
if(!this.form.shippingChannelId) {
this.$message.error('出货渠道不能为空');
return;
}
}
// 修改的提交
if (this.form.id != null) {
updatebox(this.form).then(response => {
......
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