Commit 7ca7b1fb authored by yujinyao's avatar yujinyao

异常订单去掉文本框空格

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