|
|
|
@ -694,7 +694,7 @@
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="text-input">
|
|
|
|
|
<a-textarea
|
|
|
|
|
v-model="details.pkgsTotal"
|
|
|
|
|
v-model="details.pkgstotal"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
:auto-size="{ minRows: 6, maxRows: 9 }"
|
|
|
|
|
@change="pkgsTextChange"
|
|
|
|
@ -743,7 +743,7 @@
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="text-input">
|
|
|
|
|
<a-textarea
|
|
|
|
|
v-model="details.kgsTotal"
|
|
|
|
|
v-model="details.kgstotal"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
:auto-size="{ minRows: 6, maxRows: 9 }"
|
|
|
|
|
@change="kgsTextChange"
|
|
|
|
@ -765,7 +765,7 @@
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="text-input">
|
|
|
|
|
<a-textarea
|
|
|
|
|
v-model="details.cbmTotal"
|
|
|
|
|
v-model="details.cbmtotal"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
:auto-size="{ minRows: 6, maxRows: 9 }"
|
|
|
|
|
@change="cbmTextChange"
|
|
|
|
@ -1830,7 +1830,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 件数包装修改
|
|
|
|
|
pkgsTextChange () {
|
|
|
|
|
const pkgsTexyVal = this.details.pkgsTotal
|
|
|
|
|
const pkgsTexyVal = this.details.pkgstotal
|
|
|
|
|
const arr = pkgsTexyVal.split(/\n|\r/g)
|
|
|
|
|
let pkgs = 0
|
|
|
|
|
let kindpkgs = ''
|
|
|
|
@ -1839,19 +1839,21 @@ export default {
|
|
|
|
|
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g);
|
|
|
|
|
console.log('分割数组:', regexStr)
|
|
|
|
|
if (regexStr && Number(regexStr[0])) {
|
|
|
|
|
pkgs += Number(regexStr[0])
|
|
|
|
|
// pkgs += Number(regexStr[0])
|
|
|
|
|
const num1 = Number(regexStr[0])
|
|
|
|
|
pkgs = (pkgs * 100 + num1 * 100) / 100
|
|
|
|
|
}
|
|
|
|
|
if (!kindpkgs && regexStr && /^[a-zA-Z]+$/.test(regexStr[1])) {
|
|
|
|
|
kindpkgs = regexStr[1]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
console.log('包装:', kindpkgs, ' 、件数:', pkgs)
|
|
|
|
|
this.details.pkgs = pkgs
|
|
|
|
|
console.log('包装:', kindpkgs, ' 、件数:', parseInt(pkgs))
|
|
|
|
|
this.details.pkgs = parseInt(pkgs)
|
|
|
|
|
this.details.kindpkgs = kindpkgs
|
|
|
|
|
},
|
|
|
|
|
// 毛重修改
|
|
|
|
|
kgsTextChange () {
|
|
|
|
|
const kgsTexyVal = this.details.kgsTotal
|
|
|
|
|
const kgsTexyVal = this.details.kgstotal
|
|
|
|
|
const arr = kgsTexyVal.split(/\n|\r/g)
|
|
|
|
|
let kgs = 0
|
|
|
|
|
console.log('arr:', arr)
|
|
|
|
@ -1859,7 +1861,9 @@ export default {
|
|
|
|
|
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g);
|
|
|
|
|
console.log('分割数组:', regexStr)
|
|
|
|
|
if (regexStr && Number(regexStr[0])) {
|
|
|
|
|
kgs += Number(regexStr[0])
|
|
|
|
|
// kgs += Number(regexStr[0])
|
|
|
|
|
const num1 = Number(regexStr[0])
|
|
|
|
|
kgs = (kgs * 100 + num1 * 100) / 100
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
console.log('总重量:', kgs)
|
|
|
|
@ -1867,7 +1871,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 尺码修改
|
|
|
|
|
cbmTextChange () {
|
|
|
|
|
const cbmTexyVal = this.details.cbmTotal
|
|
|
|
|
const cbmTexyVal = this.details.cbmtotal
|
|
|
|
|
const arr = cbmTexyVal.split(/\n|\r/g)
|
|
|
|
|
let cbm = 0
|
|
|
|
|
console.log('arr:', arr)
|
|
|
|
@ -1875,10 +1879,25 @@ export default {
|
|
|
|
|
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g);
|
|
|
|
|
console.log('分割数组:', regexStr)
|
|
|
|
|
if (regexStr && Number(regexStr[0])) {
|
|
|
|
|
cbm += Number(regexStr[0])
|
|
|
|
|
// cbm += Number(regexStr[0])
|
|
|
|
|
const num1 = Number(regexStr[0])
|
|
|
|
|
cbm = (cbm * 100 + num1 * 100) / 100
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
console.log('总重量:', cbm)
|
|
|
|
|
// cbm += ''
|
|
|
|
|
// let res = null
|
|
|
|
|
// const pNum = cbm.split('.')
|
|
|
|
|
// if (!/\./.test(cbm)) {
|
|
|
|
|
// res = cbm + '.00'
|
|
|
|
|
// } else if (pNum[1].length < 2) {
|
|
|
|
|
// res = cbm + '0'
|
|
|
|
|
// } else if (pNum.length > 1) {
|
|
|
|
|
// res = pNum[0] + '.' + pNum[1].substr(0, 1)
|
|
|
|
|
// console.log(pNum[0], pNum[1].substr(0, 1))
|
|
|
|
|
// } else {
|
|
|
|
|
// res = cbm
|
|
|
|
|
// }
|
|
|
|
|
console.log('尺码: ', cbm)
|
|
|
|
|
this.details.cbm = cbm
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|