作者 小范

表单校验更新

... ... @@ -42,7 +42,7 @@
<el-col style="width: 40%;margin-left:5px">
<el-form-item>
<el-input minlength="1" maxlength="25" onkeyup="this.value=this.value.toUpperCase()"
@keyup.native="shp_contact.contact_number.replace(/[^0-9-_\s]/g,'')" v-model="shp_contact.contact_number" auto-complete="off" placeholder="电话/传真" size="mini"></el-input>
@keyup.native="shp_contact.contact_number.replace(/[^0-9]/g,'')" v-model="shp_contact.contact_number" auto-complete="off" placeholder="电话/传真" size="mini"></el-input>
<!-- <el-select v-model="form.shp.shp_detail_number" placeholder="电话/传真">-->
<!-- <el-option label="电话" value="2"></el-option>-->
<!-- <el-option label="传真" value="3"></el-option>-->
... ... @@ -74,7 +74,7 @@
<el-row>
<el-col style="width: 80%">
<el-form-item>
<el-input minlength="1" maxlength="9" onkeyup="this.value=this.value.toUpperCase()"
<el-input minlength="1" maxlength="35" onkeyup="this.value=this.value.toUpperCase()"
@keyup.native="form.shp.shp_adr=form.shp.shp_adr.replace(/[^A-Za-z0-9_\s]/g,'')"
v-model="form.shp.shp_adr" auto-complete="off" placeholder="地址"></el-input>
</el-form-item>
... ... @@ -136,7 +136,7 @@
<el-col style="width: 40%;margin-left: 5px">
<el-form-item>
<el-input minlength="1" maxlength="25" onkeyup="this.value=this.value.toUpperCase()"
@keyup.native="cne_contact.contact_number=cne_contact.contact_number.replace(/[^0-9-_\s]/g,'')"
@keyup.native="cne_contact.contact_number=cne_contact.contact_number.replace(/[^0-9]/g,'')"
v-model="cne_contact.contact_number" auto-complete="off" placeholder="电话/传真" size="mini"></el-input>
</el-form-item>
</el-col>
... ... @@ -970,7 +970,7 @@ Handling Information
<el-col style="width: 40%;margin-left:5px">
<el-form-item>
<el-input minlength="1" maxlength="25" onkeyup="this.value=this.value.toUpperCase()"
@keyup.native="addForm.shp.shp_detail_number=addForm.shp.shp_detail_number.replace(/[^0-9-_\s]/g,'')" v-model="addForm.shp.shp_detail_number" auto-complete="off" placeholder="电话/传真" size="mini"></el-input>
@keyup.native="addForm.shp.shp_detail_number=addForm.shp.shp_detail_number.replace(/[^0-9]/g,'')" v-model="addForm.shp.shp_detail_number" auto-complete="off" placeholder="电话/传真" size="mini"></el-input>
<!-- <el-select v-model="addForm.shp.shp_detail_number" placeholder="电话/传真">-->
<!-- <el-option label="电话" value="2"></el-option>-->
<!-- <el-option label="传真" value="3"></el-option>-->
... ... @@ -1065,7 +1065,7 @@ Handling Information
<el-col style="width: 40%;margin-left: 5px">
<el-form-item>
<el-input minlength="1" maxlength="25" onkeyup="this.value=this.value.toUpperCase()"
@keyup.native="addForm.cne.cne_detail_number=addForm.cne.cne_detail_number.replace(/[^0-9-_\s]/g,'')" v-model="addForm.cne.cne_detail_number" auto-complete="off" placeholder="电话/传真" size="mini"></el-input>
@keyup.native="addForm.cne.cne_detail_number=addForm.cne.cne_detail_number.replace(/[^0-9]/g,'')" v-model="addForm.cne.cne_detail_number" auto-complete="off" placeholder="电话/传真" size="mini"></el-input>
<!-- <el-select v-model="addForm.cne.cne_detail_number" placeholder="电话/传真">-->
<!-- <el-option label="电话" value="2"></el-option>-->
<!-- <el-option label="传真" value="3"></el-option>-->
... ... @@ -2097,6 +2097,7 @@ Handling Information
},
// 分单
addForm:{
companyName1:'',
fhl:{
waybillNum:'',
quantity_weight_code:'',
... ... @@ -2175,10 +2176,7 @@ Handling Information
{ required: true, message: '请输入分运单号', trigger: 'blur' },
{ min: 1, max: 12, message: '长度是1-13个字符', trigger: 'blur' }
],
hbs_origin: [
{ required: true, message: '请输入起始站', trigger: 'blur' },
{ min: 3, max: 3, message: '长度是3个字符', trigger: 'blur' }
],
},
},
dialogTableVisible:false,
... ... @@ -2357,9 +2355,9 @@ Handling Information
let res = response.data;
//添加调度记录信息,失败
if (res.code !== '200'){
return this.$message.error('新增分运单,失败');
return this.$message.error(res.msg);
}
this.$message.success('新增分运单,成功');
this.$message.success(res.msg);
Object.assign(this.$data, this.$options.data());
// this.addForm = {
// fhl:{
... ... @@ -2449,7 +2447,7 @@ Handling Information
let res = response.data;
//添加调度记录信息,失败
if (res.code !== '200'){
return this.$message.error('新增主运单,失败');
return this.$message.error(res.msg);
}
this.$message.success(res.msg);
Object.assign(this.$data, this.$options.data());
... ... @@ -2600,7 +2598,7 @@ Handling Information
this.addForm.fhl.destination = res.data.data.destination;
this.addForm.fhl.quantity_weight_code = res.data.data.quantity_weight_code;
}
return this.$message.success(res.msg);
return this.$message.success(res.data.msg);
}
}).catch((error) => {
alert(error);
... ...