批量输入的字符,分割成数组后做前后去空格的处理
This commit is contained in:
parent
953c143a3b
commit
2ffb0f9a4c
@ -265,6 +265,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code+"30"] || dm[code+"40"]){
|
if(dm[code+"30"] || dm[code+"40"]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -251,6 +251,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -268,6 +268,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -259,6 +259,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -262,6 +262,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -253,6 +253,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -264,6 +264,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -261,6 +261,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -262,6 +262,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -252,6 +252,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -321,6 +321,7 @@ export default {
|
|||||||
}
|
}
|
||||||
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
||||||
bcList.forEach((code) => {
|
bcList.forEach((code) => {
|
||||||
|
code = code.trim();
|
||||||
this.getDetail(code, true)
|
this.getDetail(code, true)
|
||||||
})
|
})
|
||||||
this.openBatch=false;
|
this.openBatch=false;
|
||||||
|
|||||||
@ -243,6 +243,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -330,6 +330,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code+"10"] || dm[code+"20"]){
|
if(dm[code+"10"] || dm[code+"20"]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -245,6 +245,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -237,6 +237,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -1536,6 +1536,8 @@ export default {
|
|||||||
let bcList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[];
|
let bcList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[];
|
||||||
|
|
||||||
bcList.forEach(async (billcode) => {
|
bcList.forEach(async (billcode) => {
|
||||||
|
billcode = billcode.trim();
|
||||||
|
|
||||||
if(this.emisCoPackDetail.filter(wb => wb.billCode == billcode).length == 0){
|
if(this.emisCoPackDetail.filter(wb => wb.billCode == billcode).length == 0){
|
||||||
let billRes = await listEmisWaybill({billCode:billcode});
|
let billRes = await listEmisWaybill({billCode:billcode});
|
||||||
if(!billRes || billRes.code != 200 || !billRes.rows || billRes.rows.length < 1){
|
if(!billRes || billRes.code != 200 || !billRes.rows || billRes.rows.length < 1){
|
||||||
|
|||||||
@ -669,12 +669,12 @@ export default {
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
let exitlist = this.emisWaybillList.filter(item => (item.billCode == bcList[bc] && item.problemId == this.form.problemId));
|
let exitlist = this.emisWaybillList.filter(item => (item.billCode == bcList[bc].trim() && item.problemId == this.form.problemId));
|
||||||
if(exitlist.length > 0){
|
if(exitlist.length > 0){
|
||||||
this.$message.error("单号:"+ bcList[bc] + ", 已存在");
|
this.$message.error("单号:"+ bcList[bc].trim() + ", 已存在");
|
||||||
continue;
|
continue;
|
||||||
}else{
|
}else{
|
||||||
await this.addToList(bcList[bc]);
|
await this.addToList(bcList[bc].trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user