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