Commit 7ca7b1fb authored by yujinyao's avatar yujinyao

异常订单去掉文本框空格

parent 262bb6af
......@@ -14,7 +14,7 @@
:placeholder="$t('请输入订单号')"
clearable
@keyup.enter.native="handleQuery"
@input="queryParams.orderNo=queryParams.orderNo.replace(/\s+/g, '')"
@input="replaceSpace(queryParams, 'orderNo')"
>
<template slot="prepend">
<dict-selector
......@@ -199,7 +199,7 @@
:placeholder="$t('发货人')"
clearable
@keyup.enter.native="handleQuery"
@input="queryParams.consignorText=queryParams.consignorText.replace(/\s+/g, '')"
@input="replaceSpace(queryParams, 'consignorText')"
/>
</el-form-item>
<el-form-item :label="$t('收货人')" prop="consigneeText">
......@@ -208,7 +208,7 @@
:placeholder="$t('收货人')"
clearable
@keyup.enter.native="handleQuery"
@input="queryParams.consigneeText=queryParams.consigneeText.replace(/\s+/g, '')"
@input="replaceSpace(queryParams, 'consigneeText')"
/>
</el-form-item>
<el-form-item :label="$t('唛头') + ':'" v-show="showSearch">
......@@ -217,7 +217,7 @@
:placeholder="$t('请输入唛头')"
clearable
@keyup.enter.native="handleQuery"
@input="queryParams.marks=queryParams.marks.replace(/\s+/g, '')"
@input="replaceSpace(queryParams, 'marks')"
>
<template slot="prepend">
<dict-selector
......@@ -1170,6 +1170,10 @@ export default {
this.AddressTown = data;
})
}
},
// 自动去除空格
replaceSpace(obj, field){
obj[field] = obj[field].replace(/\s+/g, '');
}
},
};
......
......@@ -1758,14 +1758,18 @@ export default {
// 增值服务文本
getTypeText(){
return type => {
const arr = []
if(type.indexOf('1') > -1){
arr.push(this.$t('集运'))
}
if(type.indexOf('2') > -1){
arr.push(this.$t('海外仓'))
if (type) {
const arr = []
if(type.indexOf('1') > -1){
arr.push(this.$t('集运'))
}
if(type.indexOf('2') > -1){
arr.push(this.$t('海外仓'))
}
return arr.join(",")
} else {
return null
}
return arr.join("")
}
}
},
......
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