From e6ae5800ad003cebcdbc1f5f063ea622a4b698eb Mon Sep 17 00:00:00 2001
From: wangfukang <15630117759@163.com>
Date: Sun, 18 Aug 2024 09:07:41 +0800
Subject: [PATCH] 11
---
package1/AI/AIInventoryList.vue | 2 +-
package1/AI/voiceInventory.vue | 606 +++++++++++++-----------
package1/index/orderDetail.vue | 488 ++++++++++++-------
package1/inventory/inventoryConfirm.vue | 28 +-
package1/stock/addStock.vue | 23 +-
5 files changed, 685 insertions(+), 462 deletions(-)
diff --git a/package1/AI/AIInventoryList.vue b/package1/AI/AIInventoryList.vue
index 37f542e..149a906 100644
--- a/package1/AI/AIInventoryList.vue
+++ b/package1/AI/AIInventoryList.vue
@@ -207,7 +207,7 @@
return str
},
goInventory(){
- uni.setStorageSync('carList1', this.carList1)
+ uni.setStorageSync('carList1', JSON.stringify(this.carList1))
uni.navigateTo({
url: '/package1/AI/voiceInventory'
})
diff --git a/package1/AI/voiceInventory.vue b/package1/AI/voiceInventory.vue
index 30fdc13..c9ef911 100644
--- a/package1/AI/voiceInventory.vue
+++ b/package1/AI/voiceInventory.vue
@@ -862,16 +862,16 @@
if (key1 == key) {
if (that.mergeId != that.carList1.id) {
that.carList.get(that.carList1.id).stockLogList.get(key).productCount =
- that.carList.get(that.carList1.id).stockLogList.get(key)
- .productCount + value1.productCount
+ Number(that.carList.get(that.carList1.id).stockLogList.get(key)
+ .productCount) + Number(value1.productCount)
isTrue = true
- that.carList.get(that.carList1.id).productCount += value1.productCount
+ that.carList.get(that.carList1.id).productCount += Number(value1.productCount)
}
}
})
if (isTrue == false) {
that.carList.get(that.carList1.id).stockLogList.set(key1, value1)
- that.carList.get(that.carList1.id).productCount += value1.productCount
+ that.carList.get(that.carList1.id).productCount += Number(value1.productCount)
}
})
@@ -891,7 +891,7 @@
if (this.mergeId != this.carList1.id) {
this.carList.delete(this.mergeId)
}
- that.carList.get(that.carList1.id).price1 = that.carList.get(that.carList1.id).productCount * that.carList
+ that.carList.get(that.carList1.id).price1 = Number(that.carList.get(that.carList1.id).productCount) * that.carList
.get(that.carList1.id).purchasePrice
this.getAllPrice()
setTimeout(res => {
@@ -902,7 +902,7 @@
return;
}
if (uni.getStorageSync('carList1') != '') {
- this.carList1 = uni.getStorageSync('carList1')
+ this.carList1 = JSON.parse(uni.getStorageSync('carList1'))
} else {
this.carList1 = this.carList1
@@ -910,7 +910,12 @@
if (this.carList1 != '') {
isTrue = true
}
- this.khName = JSON.parse(JSON.stringify(this.khName)) || ''
+ if (uni.getStorageSync('khName') != '') {
+ this.khName = JSON.parse(uni.getStorageSync('khName'))
+ } else {
+ this.khName = JSON.parse(JSON.stringify(this.khName)) || ''
+ }
+
if (this.khName != '') {
if (this.khName.noEarn != null && this.zhiqianqiankuan != this.khName.noEarn) {
isTrue = true
@@ -944,19 +949,19 @@
stockLogList1: []
}
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) {
- let productCount = this.carList1[i].saleDetailQueryDTO[m].productCount
+ let productCount = Number(this.carList1[i].saleDetailQueryDTO[m].productCount)
if (obj.stockLogList.has(this.carList1[i].saleDetailQueryDTO[m].attributeList) == true) {
- productCount += obj.stockLogList.get(this.carList1[i].saleDetailQueryDTO[m].attributeList)
- .productCount
+ productCount += Number(obj.stockLogList.get(this.carList1[i].saleDetailQueryDTO[m].attributeList)
+ .productCount)
}
var data1 = {
productCount: productCount,
name: this.carList1[i].saleDetailQueryDTO[m].name
}
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, data1)
- obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount == null ? 0 : this
- .carList1[i].saleDetailQueryDTO[m].productCount
- obj.price1 = obj.productCount * this.carList1[i].purchasePrice
+ obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount == null ? 0 : Number(this
+ .carList1[i].saleDetailQueryDTO[m].productCount)
+ obj.price1 = Number(obj.productCount) * this.carList1[i].purchasePrice
}
let id = this.carList1[i].isNew == true ? this.carList1[i].id : this.carList1[i].productId
this.carList.set(id, obj)
@@ -973,9 +978,9 @@
m].attributeList) == true) { //规格相同
var data1 = {
- productCount: this.carList.get(this.carList1[i].id).stockLogList.get(this.carList1[
- i].saleDetailQueryDTO[m].attributeList).productCount + this.carList1[i]
- .saleDetailQueryDTO[m].productCount,
+ productCount: Number(this.carList.get(this.carList1[i].id).stockLogList.get(this.carList1[
+ i].saleDetailQueryDTO[m].attributeList).productCount) + Number(this.carList1[i]
+ .saleDetailQueryDTO[m].productCount),
name: this.carList1[i].saleDetailQueryDTO[m].name
}
@@ -983,7 +988,7 @@
m].attributeList, data1)
} else { //规格不同
var data1 = {
- productCount: this.carList1[i].saleDetailQueryDTO[m].productCount,
+ productCount: Number(this.carList1[i].saleDetailQueryDTO[m].productCount),
name: this.carList1[i].saleDetailQueryDTO[m].name
}
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[
@@ -991,10 +996,10 @@
}
this.carList.get(this.carList1[i].id).productCount += this.carList1[i].saleDetailQueryDTO[
- m].productCount == null ? 0 : this.carList1[i].saleDetailQueryDTO[
- m].productCount
- this.carList.get(this.carList1[i].id).price1 = this.carList.get(this.carList1[i].id)
- .productCount * this.carList.get(this.carList1[i].id).purchasePrice
+ m].productCount == null ? 0 : Number(this.carList1[i].saleDetailQueryDTO[
+ m].productCount)
+ this.carList.get(this.carList1[i].id).price1 = Number(this.carList.get(this.carList1[i].id)
+ .productCount) * this.carList.get(this.carList1[i].id).purchasePrice
}
} else { //商品不同
let obj = {
@@ -1020,16 +1025,15 @@
}
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) {
var data1 = {
- productCount: this.carList1[i].saleDetailQueryDTO[m].productCount,
+ productCount: Number(this.carList1[i].saleDetailQueryDTO[m].productCount),
name: this.carList1[i].saleDetailQueryDTO[m].name
}
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, data1)
obj.name = this.carList1[i].saleDetailQueryDTO[m].name
- obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount == null ? 0 : this
- .carList1[i].saleDetailQueryDTO[
- m].productCount
- obj.price1 = obj.productCount * this.carList1[i].purchasePrice
+ obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount == null ? 0 : Number(this
+ .carList1[i].saleDetailQueryDTO[m].productCount)
+ obj.price1 = Number(obj.productCount) * this.carList1[i].purchasePrice
}
this.carList.set(id, obj)
@@ -1044,6 +1048,7 @@
this.carList1 = []
uni.removeStorageSync('carList1')
+ uni.removeStorageSync('khName')
if (isTrue) {
this.getAllPrice()
}
@@ -1343,19 +1348,19 @@
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) {
- let productCount = this.carList1[i].saleDetailQueryDTO[m].productCount
+ let productCount = Number(this.carList1[i].saleDetailQueryDTO[m].productCount)
if (obj.stockLogList.has(this.carList1[i].saleDetailQueryDTO[m].attributeList) == true) {
- productCount += obj.stockLogList.get(this.carList1[i].saleDetailQueryDTO[m].attributeList)
- .productCount
+ productCount += Number(obj.stockLogList.get(this.carList1[i].saleDetailQueryDTO[m].attributeList)
+ .productCount)
}
var data1 = {
productCount: productCount,
name: this.carList1[i].saleDetailQueryDTO[m].name
}
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, data1)
- obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount == null ? 0 : this
- .carList1[i].saleDetailQueryDTO[m].productCount
- obj.price1 = obj.productCount * this.carList1[i].purchasePrice
+ obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount == null ? 0 : Number(this
+ .carList1[i].saleDetailQueryDTO[m].productCount)
+ obj.price1 = Number(obj.productCount) * this.carList1[i].purchasePrice
}
let id = this.carList1[i].isNew == true ? this.carList1[i].id : this.carList1[i].productId
this.carList.set(id, obj)
@@ -1375,25 +1380,25 @@
if (this.carList.get(this.carList1[i].id).stockLogList.has(this.carList1[i]
.saleDetailQueryDTO[m].attributeList) == true) { //规格相同
var data1 = {
- productCount: this.carList.get(this.carList1[i].id).stockLogList.get(this
- .carList1[i].saleDetailQueryDTO[m].attributeList).productCount + this
- .carList1[i].saleDetailQueryDTO[m].productCount,
+ productCount: Number(this.carList.get(this.carList1[i].id).stockLogList.get(this
+ .carList1[i].saleDetailQueryDTO[m].attributeList).productCount) + Number(this
+ .carList1[i].saleDetailQueryDTO[m].productCount),
name: this.carList1[i].saleDetailQueryDTO[m].name
}
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i]
.saleDetailQueryDTO[m].attributeList, data1)
} else { //规格不同
var data1 = {
- productCount: this.carList1[i].saleDetailQueryDTO[m].productCount,
+ productCount: Number(this.carList1[i].saleDetailQueryDTO[m].productCount),
name: this.carList1[i].saleDetailQueryDTO[m].name
}
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i]
.saleDetailQueryDTO[m].attributeList, data1)
}
this.carList.get(this.carList1[i].id).productCount += this.carList1[i].saleDetailQueryDTO[
- m].productCount == null ? 0 : this.carList1[i].saleDetailQueryDTO[m].productCount
- this.carList.get(this.carList1[i].id).price1 = this.carList.get(this.carList1[i].id)
- .productCount * this.carList.get(this.carList1[i].id).purchasePrice
+ m].productCount == null ? 0 : Number(this.carList1[i].saleDetailQueryDTO[m].productCount)
+ this.carList.get(this.carList1[i].id).price1 = Number(this.carList.get(this.carList1[i].id)
+ .productCount) * this.carList.get(this.carList1[i].id).purchasePrice
}
} else { //商品不同
let obj = {
@@ -1420,16 +1425,15 @@
}
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) {
var data1 = {
- productCount: this.carList1[i].saleDetailQueryDTO[m].productCount,
+ productCount: Number(this.carList1[i].saleDetailQueryDTO[m].productCount),
name: this.carList1[i].saleDetailQueryDTO[m].name
}
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, data1)
obj.name = this.carList1[i].saleDetailQueryDTO[m].name
- obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount == null ? 0 : this
- .carList1[i].saleDetailQueryDTO[
- m].productCount
- obj.price1 = obj.productCount * this.carList1[i].purchasePrice
+ obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount == null ? 0 : Number(this
+ .carList1[i].saleDetailQueryDTO[m].productCount)
+ obj.price1 = Number(obj.productCount) * this.carList1[i].purchasePrice
}
this.carList.set(id, obj)
@@ -1549,7 +1553,7 @@
console.log('相同')
data[1] = stringKey
specMap.get(stringKey).name = that.sliceMsg(stringKey)
- specMap.get(stringKey).productCount += value.productCount
+ specMap.get(stringKey).productCount += Number(value.productCount)
} else {
console.log('不同')
data[1] = stringKey
@@ -1572,7 +1576,7 @@
} else {
if (specMap.has(key) == true) {
- specMap.get(key).productCount += value.productCount
+ specMap.get(key).productCount += Number(value.productCount)
} else {
specMap.set(key, value)
specMap.get(key).name = that.sliceMsg(key)
@@ -1584,7 +1588,7 @@
if (specMap.has(stringKey) == true) {
data[1] = stringKey
specMap.get(stringKey).name = that.sliceMsg(stringKey)
- specMap.get(stringKey).productCount += value.productCount
+ specMap.get(stringKey).productCount += Number(value.productCount)
} else {
data[1] = stringKey
@@ -1606,7 +1610,7 @@
}
} else {
if (specMap.has(key) == true) {
- specMap.get(key).productCount += value.productCount
+ specMap.get(key).productCount += Number(value.productCount)
} else {
specMap.set(key, value)
specMap.get(key).name = that.sliceMsg(key)
@@ -1833,21 +1837,23 @@
voiceData.productSn = voiceData.productSn.replace(/[沟勾钩]/g, 'J');
}
if (voiceData.productCount) {
- voiceData.productCount = voiceData.productCount.replace(/[^0-9]/g, "");
+ voiceData.productCount = Number(voiceData.productCount.replace(/[^0-9]/g, ""));
}
if (voiceData.purchasePrice) {
voiceData.purchasePrice = this.replaceCharAfterNumber(voiceData
.purchasePrice, '块','.')
- voiceData.purchasePrice = this.replaceCharAfterNumber(voiceData
- .purchasePrice, '元','')
+ if (voiceData.purchasePrice.indexOf('元') != -1) {
+ voiceData.purchasePrice = voiceData.purchasePrice.replace(/元/g, '')
+ }
voiceData.purchasePrice = voiceData.purchasePrice.replace(/[^0-9.]/g, "");
}
if (voiceData.wholesalePrice) {
voiceData.wholesalePrice = this.replaceCharAfterNumber(voiceData
.wholesalePrice, '块','.')
- voiceData.wholesalePrice = this.replaceCharAfterNumber(voiceData
- .wholesalePrice, '元','')
+ if (voiceData.wholesalePrice.indexOf('元') != -1) {
+ voiceData.wholesalePrice = voiceData.wholesalePrice.replace(/元/g, '')
+ }
voiceData.wholesalePrice = voiceData.wholesalePrice.replace(/[^0-9.]/g,
'');
}
@@ -1870,11 +1876,20 @@
if (voiceData.productCount) {
voiceData.productCount = voiceData.productCount.match(regexCount);
}
+ if (voiceData.purchasePrice) {
+ voiceData.purchasePrice = this.replaceCharAfterNumber(voiceData
+ .purchasePrice, '块','.')
+ if (voiceData.purchasePrice.indexOf('元') != -1) {
+ voiceData.purchasePrice = voiceData.purchasePrice.replace(/元/g, '')
+ }
+ voiceData.purchasePrice = voiceData.purchasePrice.replace(/[^0-9.]/g, "");
+
+ }
if (voiceData.wholesalePrice) {
- voiceData.wholesalePrice = this.replaceCharAfterNumber(voiceData
- .wholesalePrice,'块', '.')
- voiceData.wholesalePrice = this.replaceCharAfterNumber(voiceData
- .wholesalePrice, '元','')
+ voiceData.wholesalePrice = this.replaceCharAfterNumber(voiceData.wholesalePrice,'块', '.')
+ if (voiceData.wholesalePrice.indexOf('元') != -1) {
+ voiceData.wholesalePrice = voiceData.wholesalePrice.replace(/元/g, '')
+ }
voiceData.wholesalePrice = voiceData.wholesalePrice.replace(/[^0-9.]/g,
"");
}
@@ -1891,11 +1906,21 @@
productCount: Number(voiceData.productCount),
stockCount: null
}
+ if (voiceData.purchasePrice) {
+ voiceData.purchasePrice = this.replaceCharAfterNumber(voiceData
+ .purchasePrice, '块','.')
+ if (voiceData.purchasePrice.indexOf('元') != -1) {
+ voiceData.purchasePrice = voiceData.purchasePrice.replace(/元/g, '')
+ }
+ voiceData.purchasePrice = voiceData.purchasePrice.replace(/[^0-9.]/g, "");
+
+ }
if (voiceData.wholesalePrice) {
voiceData.wholesalePrice = this
.replaceCharAfterNumber(voiceData.wholesalePrice, '块', '.')
- voiceData.wholesalePrice = this
- .replaceCharAfterNumber(voiceData.wholesalePrice, '元', '')
+ if (voiceData.wholesalePrice.indexOf('元') != -1) {
+ voiceData.wholesalePrice = voiceData.wholesalePrice.replace(/元/g, '')
+ }
voiceData.wholesalePrice = voiceData.wholesalePrice
.replace(
/[^0-9.]/g, "");
@@ -1974,9 +1999,9 @@
.stockLogList1[i]
.attributeList)
.productCount +=
- purchaseDetails[j]
+ Number(purchaseDetails[j]
.stockLogList1[i]
- .productCount
+ .productCount)
} else {
this.carList.get(id)
.stockLogList.set(
@@ -1989,8 +2014,8 @@
}
this.carList.get(id)
.productCount +=
- purchaseDetails[j]
- .stockLogList1[i].productCount
+ Number(purchaseDetails[j]
+ .stockLogList1[i].productCount)
}
}
if (this.carList.get(id).stockLogList.get(
@@ -2000,8 +2025,8 @@
this.carList.get(id).stockLogList
.delete('{"颜色":"均色","尺码":"均码"}')
}
- this.carList.get(id).price1 = this.carList
- .get(id).productCount * this.carList
+ this.carList.get(id).price1 = Number(this.carList
+ .get(id).productCount) * this.carList
.get(id).purchasePrice
} else {
@@ -2190,11 +2215,9 @@
.attributeList
)
.productCount +=
- purchaseDetails[
- j]
- .stockLogList1[
- i]
- .productCount
+ Number(purchaseDetails[j]
+ .stockLogList1[i]
+ .productCount)
} else {
this.carList
.get(id)
@@ -2213,14 +2236,14 @@
}
this.carList.get(id)
.productCount +=
- purchaseDetails[j]
+ Number(purchaseDetails[j]
.stockLogList1[i]
- .productCount
+ .productCount)
}
}
this.carList.get(id).price1 =
- this.carList.get(id)
- .productCount * this
+ Number(this.carList.get(id)
+ .productCount) * this
.carList.get(id)
.purchasePrice
if (this.carList.get(id)
@@ -2304,12 +2327,12 @@
purchaseDetails[i]
.stockLogList1[m]
.attributeList),
- productCount: purchaseDetails[i]
+ productCount: Number(purchaseDetails[i]
.stockLogList1[m]
- .productCount ||
- purchaseDetails[i]
+ .productCount) ||
+ Number(purchaseDetails[i]
.stockLogList1[m]
- .productCounts,
+ .productCounts),
productNum: '',
name: this.sliceMsg(this
.getAttribute(
@@ -2319,8 +2342,8 @@
price: purchaseDetails[i]
.stockLogList1[m].purchasePrice
}
- data.productCount += purchaseDetails[i]
- .stockLogList1[m].productCount
+ data.productCount += Number(purchaseDetails[i]
+ .stockLogList1[m].productCount)
data.saleDetailQueryDTO.push(list)
}
this.carList1.push(data)
@@ -2340,23 +2363,31 @@
if (voiceData.productCount) {
let regexZCount = /\d+/g;
voiceData.productCount = voiceData.productCount[0]
- .match(
- regexZCount);
+ .match(regexZCount);
+ }
+ if (voiceData.purchasePrice) {
+ voiceData.purchasePrice = this.replaceCharAfterNumber(voiceData
+ .purchasePrice, '块','.')
+ if (voiceData.purchasePrice.indexOf('元') != -1) {
+ voiceData.purchasePrice = voiceData.purchasePrice.replace(/元/g, '')
+ }
+ voiceData.purchasePrice = voiceData.purchasePrice.replace(/[^0-9.]/g, "");
+
}
if (voiceData.wholesalePrice) {
voiceData.wholesalePrice = this
.replaceCharAfterNumber(
voiceData.wholesalePrice, '块', '.')
- voiceData.wholesalePrice = this
- .replaceCharAfterNumber(
- voiceData.wholesalePrice, '元', '')
+ if (voiceData.wholesalePrice.indexOf('元') != -1) {
+ voiceData.wholesalePrice = voiceData.wholesalePrice.replace(/元/g, '')
+ }
voiceData.wholesalePrice = voiceData.wholesalePrice
.replace(
/[^0-9.]/g, "");
}
let data = {
id: voiceData.productSn,
- productCount: voiceData.productCount || 0,
+ productCount: Number(voiceData.productCount) || 0,
productName: voiceData.productName,
productSn: voiceData.productSn,
categoryId: this.categoryList.categoryId,
@@ -2436,9 +2467,9 @@
.stockLogList1[i]
.attributeList)
.productCount +=
- purchaseDetails[j]
+ Number(purchaseDetails[j]
.stockLogList1[i]
- .productCount
+ .productCount)
} else {
this.carList.get(id)
.stockLogList.set(
@@ -2451,8 +2482,8 @@
}
this.carList.get(id)
.productCount +=
- purchaseDetails[j]
- .stockLogList1[i].productCount
+ Number(purchaseDetails[j]
+ .stockLogList1[i].productCount)
}
}
if (this.carList.get(id).stockLogList.get(
@@ -2462,8 +2493,8 @@
this.carList.get(id).stockLogList
.delete('{"颜色":"均色","尺码":"均码"}')
}
- this.carList.get(id).price1 = this.carList
- .get(id).productCount * this.carList
+ this.carList.get(id).price1 = Number(this.carList
+ .get(id).productCount) * this.carList
.get(id).purchasePrice
} else {
@@ -2643,11 +2674,9 @@
.attributeList
)
.productCount +=
- purchaseDetails[
- j]
- .stockLogList1[
- i]
- .productCount
+ Number(purchaseDetails[j]
+ .stockLogList1[i]
+ .productCount)
} else {
this.carList
.get(id)
@@ -2666,14 +2695,14 @@
}
this.carList.get(id)
.productCount +=
- purchaseDetails[j]
+ Number(purchaseDetails[j]
.stockLogList1[i]
- .productCount
+ .productCount)
}
}
this.carList.get(id).price1 =
- this.carList.get(id)
- .productCount * this
+ Number(this.carList.get(id)
+ .productCount) * this
.carList.get(id)
.purchasePrice
if (this.carList.get(id)
@@ -2699,13 +2728,22 @@
this.tui.toast("抱歉:小助手本次未识别到商品信息,请检查识别信息是否正确")
}
} else {
+ if (voiceData.purchasePrice) {
+ voiceData.purchasePrice = this.replaceCharAfterNumber(voiceData
+ .purchasePrice, '块','.')
+ if (voiceData.purchasePrice.indexOf('元') != -1) {
+ voiceData.purchasePrice = voiceData.purchasePrice.replace(/元/g, '')
+ }
+ voiceData.purchasePrice = voiceData.purchasePrice.replace(/[^0-9.]/g, "");
+
+ }
if (voiceData.wholesalePrice) {
voiceData.wholesalePrice = this
.replaceCharAfterNumber(
voiceData.wholesalePrice, '块', '.')
- voiceData.wholesalePrice = this
- .replaceCharAfterNumber(
- voiceData.wholesalePrice, '元', '')
+ if (voiceData.wholesalePrice.indexOf('元') != -1) {
+ voiceData.wholesalePrice = voiceData.wholesalePrice.replace(/元/g, '')
+ }
voiceData.wholesalePrice = voiceData
.wholesalePrice.replace(
/[^0-9.]/g, "");
@@ -2766,12 +2804,12 @@
purchaseDetails[i]
.stockLogList1[m]
.attributeList),
- productCount: purchaseDetails[i]
+ productCount: Number(purchaseDetails[i]
.stockLogList1[m]
- .productCount ||
- purchaseDetails[i]
+ .productCount) ||
+ Number(purchaseDetails[i]
.stockLogList1[m]
- .productCounts,
+ .productCounts),
productNum: '',
name: this.sliceMsg(this
.getAttribute(
@@ -2781,8 +2819,8 @@
price: purchaseDetails[i]
.stockLogList1[m].purchasePrice
}
- data.productCount += purchaseDetails[i]
- .stockLogList1[m].productCount
+ data.productCount += Number(purchaseDetails[i]
+ .stockLogList1[m].productCount)
data.saleDetailQueryDTO.push(list)
}
this.carList1.push(data)
@@ -2821,8 +2859,20 @@
if (purchaseDetails.length > 0) {
if (this.carList.get(id).productSn != '') {
for (let j = 0; j < purchaseDetails.length; j++) {
+ if(purchaseDetails[j].purchasePrice == "" || purchaseDetails[j].purchasePrice == null){
+ purchaseDetails[j].purchasePrice = 0
+ }
+ if(purchaseDetails[j].wholesalePrice == "" || purchaseDetails[j].wholesalePrice == null){
+ purchaseDetails[j].wholesalePrice = 0
+ }
+ if(purchaseDetails[j].price == "" || purchaseDetails[j].price == null){
+ purchaseDetails[j].price = 0
+ }
for (let i = 0; i < purchaseDetails[j].stockLogList1
.length; i++) {
+ if(purchaseDetails[j].stockLogList1[i].productCount == "" || purchaseDetails[j].stockLogList1[i].productCount == null){
+ purchaseDetails[j].stockLogList1[i].productCount = 0
+ }
if (this.carList.get(id).productName == '') {
this.carList.get(id).productName = purchaseDetails[0]
.productName
@@ -2835,6 +2885,11 @@
this.carList.get(id).purchasePrice = purchaseDetails[0]
.purchasePrice
}
+ if (this.carList.get(id).wholesalePrice == '' || this
+ .carList.get(id).wholesalePrice == null) {
+ this.carList.get(id).wholesalePrice = purchaseDetails[0]
+ .wholesalePrice
+ }
if (this.carList.get(id).productPicture == '') {
this.carList.get(id).productPicture = purchaseDetails[
0].productPicture
@@ -2852,8 +2907,8 @@
this.carList.get(id).stockLogList.get(
purchaseDetails[j].stockLogList1[i]
.attributeList).productCount +=
- purchaseDetails[j].stockLogList1[i]
- .productCount
+ Number(purchaseDetails[j].stockLogList1[i]
+ .productCount)
} else {
this.carList.get(id).stockLogList.set(
purchaseDetails[j].stockLogList1[i]
@@ -2861,8 +2916,8 @@
.stockLogList1[i])
}
}
- this.carList.get(id).productCount += purchaseDetails[j]
- .stockLogList1[i].productCount
+ this.carList.get(id).productCount += Number(purchaseDetails[j]
+ .stockLogList1[i].productCount)
}
}
if (this.carList.get(id).stockLogList.get('{"颜色":"均色","尺码":"均码"}')
@@ -2871,7 +2926,7 @@
this.carList.get(id).stockLogList.delete(
'{"颜色":"均色","尺码":"均码"}')
}
- this.carList.get(id).price1 = this.carList.get(id).productCount *
+ this.carList.get(id).price1 = Number(this.carList.get(id).productCount) *
this.carList.get(id).purchasePrice
} else {
@@ -2972,8 +3027,8 @@
purchaseDetails[j]
.stockLogList1[i].attributeList
).productCount +=
- purchaseDetails[j].stockLogList1[i]
- .productCount
+ Number(purchaseDetails[j].stockLogList1[i]
+ .productCount)
} else {
this.carList.get(id).stockLogList.set(
purchaseDetails[j]
@@ -2984,12 +3039,12 @@
}
}
this.carList.get(id).productCount +=
- purchaseDetails[j].stockLogList1[i]
- .productCount
+ Number(purchaseDetails[j].stockLogList1[i]
+ .productCount)
}
}
- this.carList.get(id).price1 = this.carList.get(id)
- .productCount * this.carList.get(id).purchasePrice
+ this.carList.get(id).price1 = Number(this.carList.get(id)
+ .productCount) * this.carList.get(id).purchasePrice
if (this.carList.get(id).stockLogList.get(
'{"颜色":"均色","尺码":"均码"}').productCount == 0 &&
purchaseDetails[0].stockLogList1.length > 0) {
@@ -3046,17 +3101,17 @@
attributeList: this.getAttribute(purchaseDetails[i]
.stockLogList1[m]
.attributeList),
- productCount: purchaseDetails[i].stockLogList1[m]
- .productCount ||
- purchaseDetails[i].stockLogList1[m].productCounts,
+ productCount: Number(purchaseDetails[i].stockLogList1[m]
+ .productCount) ||
+ Number(purchaseDetails[i].stockLogList1[m].productCounts),
productNum: '',
name: this.sliceMsg(this.getAttribute(purchaseDetails[i]
.stockLogList1[m]
.attributeList)),
price: purchaseDetails[i].stockLogList1[m].purchasePrice
}
- data.productCount += purchaseDetails[i].stockLogList1[m]
- .productCount
+ data.productCount += Number(purchaseDetails[i].stockLogList1[m]
+ .productCount)
data.saleDetailQueryDTO.push(list)
}
this.carList1.push(data)
@@ -3089,12 +3144,25 @@
this.$refs.popup.close()
this.$refs.voiceBottomPopup.close()
let purchaseDetails = res.result.data.purchaseDetails
+ //千问的单商品语音录入
if (this.oneGoodsId) {
let id = this.oneGoodsId
if (purchaseDetails.length > 0) {
if (this.carList.get(id).productSn != '') {
for (let j = 0; j < purchaseDetails.length; j++) {
+ if(purchaseDetails[j].purchasePrice == "" || purchaseDetails[j].purchasePrice == null){
+ purchaseDetails[j].purchasePrice = 0
+ }
+ if(purchaseDetails[j].wholesalePrice == "" || purchaseDetails[j].wholesalePrice == null){
+ purchaseDetails[j].wholesalePrice = 0
+ }
+ if(purchaseDetails[j].price == "" || purchaseDetails[j].price == null){
+ purchaseDetails[j].price = 0
+ }
for (let i = 0; i < purchaseDetails[j].stockLogList1.length; i++) {
+ if(purchaseDetails[j].stockLogList1[i].productCount == "" || purchaseDetails[j].stockLogList1[i].productCount == null){
+ purchaseDetails[j].stockLogList1[i].productCount = 0
+ }
if (this.carList.get(id).productName == '') {
this.carList.get(id).productName = purchaseDetails[0]
.productName
@@ -3107,6 +3175,11 @@
this.carList.get(id).purchasePrice = purchaseDetails[0]
.purchasePrice
}
+ if (this.carList.get(id).wholesalePrice == '' || this.carList
+ .get(id).wholesalePrice == null) {
+ this.carList.get(id).wholesalePrice = purchaseDetails[0]
+ .wholesalePrice
+ }
if (this.carList.get(id).productPicture == '') {
this.carList.get(id).productPicture = purchaseDetails[0]
.productPicture
@@ -3123,24 +3196,29 @@
this.carList.get(id).stockLogList.get(purchaseDetails[
j].stockLogList1[i].attributeList)
.productCount +=
- purchaseDetails[j].stockLogList1[i].productCount
+ Number(purchaseDetails[j].stockLogList1[i].productCount)
} else {
this.carList.get(id).stockLogList.set(purchaseDetails[
j].stockLogList1[i].attributeList,
purchaseDetails[j].stockLogList1[i])
}
}
- this.carList.get(id).productCount += purchaseDetails[j]
- .stockLogList1[i].productCount
+ this.carList.get(id).productCount += Number(purchaseDetails[j]
+ .stockLogList1[i].productCount)
}
}
+ this.$nextTick(()=>{
+ this.carList.get(id).price1 = Number(this.carList.get(id).productCount) * this
+ .carList.get(id).purchasePrice
+ this.getAllPrice()
+ this.oneGoodsId = ''
+ })
if (this.carList.get(id).stockLogList.get('{"颜色":"均色","尺码":"均码"}')
.productCount == 0 && purchaseDetails[0].stockLogList1.length > 0
) {
this.carList.get(id).stockLogList.delete('{"颜色":"均色","尺码":"均码"}')
}
- this.carList.get(id).price1 = this.carList.get(id).productCount * this
- .carList.get(id).purchasePrice
+
} else {
let isTrue = false
@@ -3197,6 +3275,11 @@
this.carList.get(id).purchasePrice = purchaseDetails[0]
.purchasePrice
}
+ if (this.carList.get(id).wholesalePrice == '' || this.carList.get(id)
+ .wholesalePrice == null) {
+ this.carList.get(id).wholesalePrice = purchaseDetails[0]
+ .wholesalePrice
+ }
if (this.carList.get(id).productPicture == '') {
this.carList.get(id).productPicture = purchaseDetails[0]
.productPicture
@@ -3238,8 +3321,8 @@
this.carList.get(id).stockLogList.get(
purchaseDetails[j].stockLogList1[i]
.attributeList).productCount +=
- purchaseDetails[j].stockLogList1[i]
- .productCount
+ Number(purchaseDetails[j].stockLogList1[i]
+ .productCount)
} else {
this.carList.get(id).stockLogList.set(
purchaseDetails[j].stockLogList1[i]
@@ -3248,12 +3331,12 @@
}
}
this.carList.get(id).productCount +=
- purchaseDetails[j].stockLogList1[i]
- .productCount
+ Number(purchaseDetails[j].stockLogList1[i]
+ .productCount)
}
}
- this.carList.get(id).price1 = this.carList.get(id)
- .productCount * this.carList.get(id).purchasePrice
+ this.carList.get(id).price1 = Number(this.carList.get(id)
+ .productCount) * this.carList.get(id).purchasePrice
if (this.carList.get(id).stockLogList.get(
'{"颜色":"均色","尺码":"均码"}').productCount == 0 &&
purchaseDetails[0].stockLogList1.length > 0) {
@@ -3262,7 +3345,7 @@
}
})
}
-
+ console.log('carList',this.carList)
this.$nextTick(() => {
this.getAllPrice()
this.oneGoodsId = ''
@@ -3309,16 +3392,16 @@
attributeList: this.getAttribute(purchaseDetails[i]
.stockLogList1[m]
.attributeList),
- productCount: purchaseDetails[i].stockLogList1[m]
- .productCount ||
- purchaseDetails[i].stockLogList1[m].productCounts,
+ productCount: Number(purchaseDetails[i].stockLogList1[m]
+ .productCount) ||
+ Number(purchaseDetails[i].stockLogList1[m].productCounts),
productNum: '',
name: this.sliceMsg(this.getAttribute(purchaseDetails[i]
.stockLogList1[m]
.attributeList)),
price: purchaseDetails[i].stockLogList1[m].purchasePrice
}
- data.productCount += purchaseDetails[i].stockLogList1[m].productCount
+ data.productCount += Number(purchaseDetails[i].stockLogList1[m].productCount)
data.saleDetailQueryDTO.push(list)
}
this.carList1.push(data)
@@ -3363,7 +3446,7 @@
res.result.records[i].discountAmount = oneData
.wholesalePrice
}
- res.result.records[i].productCount = oneData.productCount
+ res.result.records[i].productCount = Number(oneData.productCount)
if (oneData.purchasePrice) {
res.result.records[i].purchasePrice = oneData.purchasePrice
}
@@ -3453,9 +3536,9 @@
j].saleDetailQueryDTO[i]
.attributeList)
.productCount +=
- purchaseDetails[j]
+ Number(purchaseDetails[j]
.saleDetailQueryDTO[i]
- .productCount
+ .productCount)
} else {
this.carList.get(id).stockLogList.set(
purchaseDetails[
@@ -3466,8 +3549,8 @@
}
}
this.carList.get(id).productCount +=
- purchaseDetails[j]
- .saleDetailQueryDTO[i].productCount
+ Number(purchaseDetails[j]
+ .saleDetailQueryDTO[i].productCount)
}
}
if (this.carList.get(id).stockLogList.get(
@@ -3479,10 +3562,9 @@
this.carList.get(id).stockLogList.delete(
'{"颜色":"均色","尺码":"均码"}')
}
- this.carList.get(id).price1 = this.carList.get(id)
- .productCount *
- this
- .carList.get(id).purchasePrice
+ this.carList.get(id).price1 = Number(this.carList.get(id)
+ .productCount) *
+ this.carList.get(id).purchasePrice
} else {
let isTrue = false
@@ -3627,10 +3709,9 @@
i]
.attributeList)
.productCount +=
- purchaseDetails[j]
- .saleDetailQueryDTO[
- i]
- .productCount
+ Number(purchaseDetails[j]
+ .saleDetailQueryDTO[i]
+ .productCount)
} else {
this.carList.get(id)
.stockLogList.set(
@@ -3645,14 +3726,13 @@
}
this.carList.get(id)
.productCount +=
- purchaseDetails[j]
+ Number(purchaseDetails[j]
.saleDetailQueryDTO[i]
- .productCount
+ .productCount)
}
}
- this.carList.get(id).price1 = this.carList
- .get(id)
- .productCount * this.carList.get(id)
+ this.carList.get(id).price1 = Number(this.carList
+ .get(id).productCount) * this.carList.get(id)
.purchasePrice
if (this.carList.get(id).stockLogList.get(
'{"颜色":"均色","尺码":"均码"}')
@@ -3720,11 +3800,11 @@
purchaseDetails[0]
.saleDetailQueryDTO[0]
.attributeList),
- productCount: purchaseDetails[0]
+ productCount: Number(purchaseDetails[0]
.saleDetailQueryDTO[0]
- .productCount ||
- purchaseDetails[0].saleDetailQueryDTO[0]
- .productCounts,
+ .productCount) ||
+ Number(purchaseDetails[0].saleDetailQueryDTO[0]
+ .productCounts),
productNum: '',
name: this.sliceMsg(this.getAttribute(
purchaseDetails[0]
@@ -3733,9 +3813,9 @@
price: purchaseDetails[0].saleDetailQueryDTO[0]
.purchasePrice
}
- data.productCount += purchaseDetails[0]
+ data.productCount += Number(purchaseDetails[0]
.saleDetailQueryDTO[0]
- .productCount
+ .productCount)
data.saleDetailQueryDTO.push(list)
// }
this.carList1.push(data)
@@ -3764,12 +3844,12 @@
this.$refs.voiceBottomPopup.close()
if (oneData.productCount) {
- oneData.productCount = oneData.productCount
- .replace(/[^0-9]/g, "");
+ oneData.productCount = Number(oneData.productCount
+ .replace(/[^0-9]/g, ""));
}
let data = {
id: oneData.productSn,
- productCount: oneData.productCount ||
+ productCount: Number(oneData.productCount) ||
0,
productName: oneData.productName,
productSn: oneData.productSn,
@@ -3879,11 +3959,9 @@
.attributeList
)
.productCount +=
- purchaseDetails[
- j]
- .saleDetailQueryDTO[
- i]
- .productCount
+ Number(purchaseDetails[j]
+ .saleDetailQueryDTO[i]
+ .productCount)
} else {
this.carList.get(
id)
@@ -3902,9 +3980,9 @@
}
this.carList.get(id)
.productCount +=
- purchaseDetails[j]
+ Number(purchaseDetails[j]
.saleDetailQueryDTO[i]
- .productCount
+ .productCount)
}
}
if (this.carList.get(id)
@@ -3919,9 +3997,8 @@
'{"颜色":"均色","尺码":"均码"}'
)
}
- this.carList.get(id).price1 = this
- .carList.get(id)
- .productCount * this
+ this.carList.get(id).price1 = Number(this
+ .carList.get(id).productCount) * this
.carList.get(id).purchasePrice
} else {
@@ -4172,13 +4249,9 @@
.attributeList
)
.productCount +=
- purchaseDetails[
- j
- ]
- .saleDetailQueryDTO[
- i
- ]
- .productCount
+ Number(purchaseDetails[j]
+ .saleDetailQueryDTO[i]
+ .productCount)
} else {
this.carList
.get(
@@ -4205,20 +4278,16 @@
this.carList
.get(id)
.productCount +=
- purchaseDetails[
- j]
- .saleDetailQueryDTO[
- i]
- .productCount
+ Number(purchaseDetails[j]
+ .saleDetailQueryDTO[i]
+ .productCount)
}
}
this.carList.get(id)
- .price1 = this
- .carList.get(
- id)
- .productCount *
- this.carList.get(
- id)
+ .price1 = Number(this
+ .carList.get(id)
+ .productCount) *
+ this.carList.get(id)
.purchasePrice
if (this.carList.get(
id)
@@ -4318,13 +4387,12 @@
.saleDetailQueryDTO[
m]
.attributeList),
- productCount: purchaseDetails[
- i]
+ productCount: Number(purchaseDetails[i]
.saleDetailQueryDTO[m]
- .productCount ||
- purchaseDetails[i]
+ .productCount) ||
+ Number(purchaseDetails[i]
.saleDetailQueryDTO[m]
- .productCounts,
+ .productCounts),
productNum: '',
name: this.sliceMsg(this
.getAttribute(
@@ -4339,9 +4407,8 @@
.purchasePrice
}
data.productCount +=
- purchaseDetails[i]
- .saleDetailQueryDTO[
- m].productCount
+ Number(purchaseDetails[i]
+ .saleDetailQueryDTO[m].productCount)
data.saleDetailQueryDTO.push(list)
}
this.carList1.push(data)
@@ -4646,12 +4713,12 @@
for (var m = 0; m < this.pageOldTemList.length; m++) {
if (this.temporaryList[i].attributeList == this.pageOldTemList[m].attributeList) {
- this.pageOldTemList[m].productCount = this.temporaryList[i].productCount
+ this.pageOldTemList[m].productCount = Number(this.temporaryList[i].productCount)
}
}
for (var j = 0; j < this.oldTemList.length; j++) {
if (this.temporaryList[i].attributeList == this.oldTemList[j].attributeList) {
- this.oldTemList[j].productCount = this.temporaryList[i].productCount
+ this.oldTemList[j].productCount = Number(this.temporaryList[i].productCount)
}
}
}
@@ -4677,16 +4744,16 @@
this.carList.get(index).stockLogList.get(index1).productCount--
await this.carList.get(index).stockLogList.forEach(function(value, key) {
if (value.productCount < 0) {
- that.carList.get(index).returnCount = that.carList.get(index).returnCount + Math.abs(
+ that.carList.get(index).returnCount = Number(that.carList.get(index).returnCount) + Math.abs(
value.productCount)
} else {
- that.carList.get(index).productCount = that.carList.get(index).productCount + value
- .productCount
+ that.carList.get(index).productCount = Number(that.carList.get(index).productCount) + Number(value
+ .productCount)
}
})
await this.$nextTick(() => {
// if (that.discountType != 0) { //单品折扣
- that.carList.get(index).price1 = that.carList.get(index).productCount * that.carList
+ that.carList.get(index).price1 = Number(that.carList.get(index).productCount) * that.carList
.get(index).purchasePrice
// }
})
@@ -4697,7 +4764,7 @@
let that = this;
this.carList.get(index).stockLogList.get(index1).productCount++
that.carList.get(index).productCount++
- that.carList.get(index).price1 = that.carList.get(index).productCount * that.carList
+ that.carList.get(index).price1 = Number(that.carList.get(index).productCount) * that.carList
.get(index).purchasePrice
this.getAllPrice()
},
@@ -4724,10 +4791,10 @@
this.carList.get(id).productCount = 0
this.carList.get(id).returnCount = 0
if (this.linshiPrice == e.target.value) {
- this.carList.get(id).stockLogList.get(id1).productCount = e.target.value
+ this.carList.get(id).stockLogList.get(id1).productCount = Number(e.target.value)
} else {
if (e.detail.value == '') {
- this.carList.get(id).stockLogList.get(id1).productCount = this.linshiPrice
+ this.carList.get(id).stockLogList.get(id1).productCount = Number(this.linshiPrice)
} else {
this.carList.get(id).stockLogList.get(id1).productCount = Number(e.detail.value)
}
@@ -4735,15 +4802,15 @@
this.carList.get(id).stockLogList.forEach(function(value, key) {
if (value.productCount < 0) {
- that.carList.get(id).returnCount = that.carList.get(id).returnCount + Math.abs(value
+ that.carList.get(id).returnCount = Number(that.carList.get(id).returnCount) + Math.abs(value
.productCount)
} else {
- that.carList.get(id).productCount = that.carList.get(id).productCount + value.productCount
+ that.carList.get(id).productCount = Number(that.carList.get(id).productCount) + Number(value.productCount)
}
})
this.$nextTick(() => {
// if (that.discountType != 0) { //单品折扣
- that.carList.get(id).price1 = that.carList.get(id).productCount * that.carList
+ that.carList.get(id).price1 = Number(that.carList.get(id).productCount) * that.carList
.get(id).purchasePrice
// }
})
@@ -4802,12 +4869,12 @@
for (var m = 0; m < this.pageOldTemList.length; m++) {
if (this.temporaryList[i].attributeList == this.pageOldTemList[m].attributeList) {
- this.pageOldTemList[m].productCount = this.temporaryList[i].productCount
+ this.pageOldTemList[m].productCount = Number(this.temporaryList[i].productCount)
}
}
for (var j = 0; j < this.oldTemList.length; j++) {
if (this.temporaryList[i].attributeList == this.oldTemList[j].attributeList) {
- this.oldTemList[j].productCount = this.temporaryList[i].productCount
+ this.oldTemList[j].productCount = Number(this.temporaryList[i].productCount)
}
}
}
@@ -4829,12 +4896,12 @@
for (var m = 0; m < this.pageOldTemList.length; m++) {
if (this.temporaryList[i].attributeList == this.pageOldTemList[m].attributeList) {
- this.pageOldTemList[m].productCount = this.temporaryList[i].productCount
+ this.pageOldTemList[m].productCount = Number(this.temporaryList[i].productCount)
}
}
for (var j = 0; j < this.oldTemList.length; j++) {
if (this.temporaryList[i].attributeList == this.oldTemList[j].attributeList) {
- this.oldTemList[j].productCount = this.temporaryList[i].productCount
+ this.oldTemList[j].productCount = Number(this.temporaryList[i].productCount)
}
}
}
@@ -4915,7 +4982,7 @@
for (var i = 0; i < value.length; i++) {
this.attributeList = {
attributeList: value[i],
- productCount: this.temporaryNum,
+ productCount: Number(this.temporaryNum),
productNum: this.productNum,
name: this.evalue[i],
price: this.purchasePrice
@@ -4928,7 +4995,7 @@
for (var i = 0; i < value.length; i++) {
for (var m = 0; m < this.temporaryList.length; m++) {
if (this.temporaryList[m].attributeList == value[i]) {
- newProductCount = this.temporaryList[m].productCount
+ newProductCount = Number(this.temporaryList[m].productCount)
}
}
this.attributeList = {
@@ -4948,7 +5015,7 @@
let notChcek = true;
for (var m = 0; m < this.newTemList.length; m++) {
if (this.oldTemList[i].attributeList == this.newTemList[m].attributeList) {
- this.newTemList[m].productCount = this.oldTemList[i].productCount
+ this.newTemList[m].productCount = Number(this.oldTemList[i].productCount)
notChcek = false;
}
}
@@ -4963,7 +5030,7 @@
let notChcek = true;
for (var m = 0; m < this.newTemList.length; m++) {
if (this.pageOldTemList[i].attributeList == this.newTemList[m].attributeList) {
- this.newTemList[m].productCount = this.pageOldTemList[i].productCount
+ this.newTemList[m].productCount = Number(this.pageOldTemList[i].productCount)
notChcek = false;
}
}
@@ -5340,15 +5407,15 @@
let that = this;
this.carList.get(this.mergeId).stockLogList.forEach(function(values, keys) {
if (that.carList.get(value).stockLogList.has(keys)) {
- that.carList.get(value).stockLogList.get(keys).productCount += that.carList.get(that
- .mergeId).stockLogList.get(keys).productCount
+ that.carList.get(value).stockLogList.get(keys).productCount += Number(that.carList.get(that
+ .mergeId).stockLogList.get(keys).productCount)
} else {
that.carList.get(value).stockLogList.set(keys, that.carList.get(that.mergeId).stockLogList
.get(keys))
}
- that.carList.get(value).productCount += that.carList.get(that.mergeId).stockLogList.get(keys)
- .productCount
- that.carList.get(value).price1 = that.carList.get(value).productCount * that.carList.get(value)
+ that.carList.get(value).productCount += Number(that.carList.get(that.mergeId).stockLogList.get(keys)
+ .productCount)
+ that.carList.get(value).price1 = Number(that.carList.get(value).productCount) * that.carList.get(value)
.purchasePrice
})
this.carList.delete(this.mergeId)
@@ -5520,7 +5587,7 @@
value.stockLogList.forEach(function(values, keys) {
if (value.stockLogList1.length == 0) {
let obj = {
- productCount: values.productCount,
+ productCount: Number(values.productCount),
name: values.name,
attributeList: keys,
productNum: values.productNum
@@ -5531,7 +5598,7 @@
if (value.stockLogList1[i].attributeList != keys) {
if (value.stockLogList1.length == (i + 1)) {
let obj = {
- productCount: values.productCount,
+ productCount: Number(values.productCount),
name: values.name,
attributeList: keys,
productNum: values.productNum
@@ -5545,7 +5612,7 @@
})
if (value.productId == id) {
- that.zNum = value.productCount
+ that.zNum = Number(value.productCount)
that.temporaryList = value.stockLogList1
that.pageOldTemList = value.stockLogList1
that.oldTemList = value.stockLogList1
@@ -5553,7 +5620,7 @@
} else {
if (value.isNew) {
if (value.id == id.id) {
- that.zNum = value.productCount
+ that.zNum = Number(value.productCount)
that.temporaryList = value.stockLogList1
that.pageOldTemList = value.stockLogList1
that.oldTemList = value.stockLogList1
@@ -5561,7 +5628,7 @@
}
} else {
if (value.productId == id.productId) {
- that.zNum = value.productCount
+ that.zNum = Number(value.productCount)
that.temporaryList = value.stockLogList1
that.pageOldTemList = value.stockLogList1
that.oldTemList = value.stockLogList1
@@ -5654,8 +5721,8 @@
value.stockLogList.forEach(function(values, keys) {
if (value.stockLogList1.length == 0) {
let obj = {
- productCount: values
- .productCount,
+ productCount: Number(values
+ .productCount),
name: values.name,
attributeList: keys,
productNum: values
@@ -5670,8 +5737,8 @@
if (value.stockLogList1
.length == (i + 1)) {
let obj = {
- productCount: values
- .productCount,
+ productCount: Number(values
+ .productCount),
name: values
.name,
attributeList: keys,
@@ -5688,7 +5755,7 @@
})
if (value.productId == id) {
- that.zNum = value.productCount
+ that.zNum = Number(value.productCount)
that.temporaryList = value.stockLogList1
that.pageOldTemList = value.stockLogList1
that.oldTemList = value.stockLogList1
@@ -5696,7 +5763,7 @@
} else {
if (value.isNew) {
if (value.id == id.id) {
- that.zNum = value.productCount
+ that.zNum = Number(value.productCount)
that.temporaryList = value
.stockLogList1
that.pageOldTemList = value
@@ -5706,7 +5773,7 @@
}
} else {
if (value.productId == id.productId) {
- that.zNum = value.productCount
+ that.zNum = Number(value.productCount)
that.temporaryList = value
.stockLogList1
that.pageOldTemList = value
@@ -5826,20 +5893,20 @@
if (item != '' && item != undefined) {
for (var m = 0; m < this.pageOldTemList.length; m++) {
if (item.attributeList == this.pageOldTemList[m].attributeList) {
- this.pageOldTemList[m].productCount = item.productCount
+ this.pageOldTemList[m].productCount = Number(item.productCount)
break;
}
}
for (var j = 0; j < this.oldTemList.length; j++) {
if (item.attributeList == this.oldTemList[j].attributeList) {
- this.oldTemList[j].productCount = item.productCount
+ this.oldTemList[j].productCount = Number(item.productCount)
break;
}
}
}
this.zNum = 0
for (var i = 0; i < this.temporaryList.length; i++) {
- this.zNum += this.temporaryList[i].productCount || 0
+ this.zNum += Number(this.temporaryList[i].productCount) || 0
}
},
clickClose(e) {
@@ -5914,7 +5981,7 @@
for (let m = 0; m < carList1[i].saleDetailQueryDTO.length; m++) {
var data1 = {
- productCount: carList1[i].saleDetailQueryDTO[m].productCount,
+ productCount: Number(carList1[i].saleDetailQueryDTO[m].productCount),
name: carList1[i].saleDetailQueryDTO[m].name,
productNum: carList1[i].saleDetailQueryDTO[m].productNum
}
@@ -5926,8 +5993,8 @@
obj.stockLogList.set(carList1[i].saleDetailQueryDTO[m].attributeList, data1)
}
- obj.productCount += carList1[i].saleDetailQueryDTO[m].productCount
- obj.price1 = obj.productCount * this.goodsDetail.purchasePrice
+ obj.productCount += Number(carList1[i].saleDetailQueryDTO[m].productCount)
+ obj.price1 = Number(obj.productCount) * this.goodsDetail.purchasePrice
}
this.carList.set(carList1[i].id, obj)
}
@@ -5950,7 +6017,7 @@
m].attributeList) == true) { //规格相同
var data1 = {
- productCount: carList1[i].saleDetailQueryDTO[m].productCount,
+ productCount: Number(carList1[i].saleDetailQueryDTO[m].productCount),
name: carList1[i].saleDetailQueryDTO[m].name
}
if (carList1[i].saleDetailQueryDTO.length > 1) {
@@ -5971,7 +6038,7 @@
} else { //规格不同
var data1 = {
- productCount: carList1[i].saleDetailQueryDTO[m].productCount,
+ productCount: Number(carList1[i].saleDetailQueryDTO[m].productCount),
name: carList1[i].saleDetailQueryDTO[m].name
}
if (carList1[i].saleDetailQueryDTO.length > 1) {
@@ -5985,9 +6052,9 @@
.attributeList, data1)
}
}
- this.carList.get(carList1[i].id).productCount += carList1[i].saleDetailQueryDTO[
- m].productCount
- that.carList.get(carList1[i].id).price1 = that.carList.get(carList1[i].id).productCount *
+ this.carList.get(carList1[i].id).productCount += Number(carList1[i].saleDetailQueryDTO[
+ m].productCount)
+ that.carList.get(carList1[i].id).price1 = Number(that.carList.get(carList1[i].id).productCount) *
that.carList.get(carList1[i].id).purchasePrice
}
} else { //商品不同
@@ -6012,7 +6079,7 @@
for (let m = 0; m < carList1[i].saleDetailQueryDTO.length; m++) {
var data1 = {
- productCount: carList1[i].saleDetailQueryDTO[m].productCount,
+ productCount: Number(carList1[i].saleDetailQueryDTO[m].productCount),
name: carList1[i].saleDetailQueryDTO[m].name,
productNum: carList1[i].saleDetailQueryDTO[m].productNum
}
@@ -6023,7 +6090,7 @@
} else {
obj.stockLogList.set(carList1[i].saleDetailQueryDTO[m].attributeList, data1)
}
- obj.productCount += carList1[i].saleDetailQueryDTO[m].productCount
+ obj.productCount += Number(carList1[i].saleDetailQueryDTO[m].productCount)
obj.price1 = obj.productCount * this.goodsDetail.purchasePrice
}
this.carList.set(carList1[i].id, obj)
@@ -6218,18 +6285,19 @@
content: "确定删除此条规格吗?",
success: function(res) {
if (res.confirm) {
+ console.log('删除规格',that.carList.get(id))
if (that.carList.get(id).stockLogList.size == 1) {
- that.carList.get(id).productCount = that.carList.get(id).stockLogList.get(name)
- .productCount;
+ that.carList.get(id).productCount = Number(that.carList.get(id).stockLogList.get(name)
+ .productCount);
} else {
- that.carList.get(id).productCount -= that.carList.get(id).stockLogList.get(
- name).productCount;
+ that.carList.get(id).productCount -= Number(that.carList.get(id).stockLogList.get(
+ name).productCount);
}
- let count = that.carList.get(id).stockLogList.get(name).productCount
+ let count = Number(that.carList.get(id).stockLogList.get(name).productCount)
that.carList.get(id).stockLogList.delete(name)
- that.carList.get(id).price1 = that.carList.get(id).productCount * that.carList.get(
+ that.carList.get(id).price1 = Number(that.carList.get(id).productCount) * that.carList.get(
id).purchasePrice
if (that.carList.get(id).stockLogList.size == 0) {
let key = '{"颜色":"均色","尺码":"均码"}'
@@ -6313,7 +6381,7 @@
attributeList: '{"颜色":"均色","尺码":"均码"}'
}
value.productCount = 1
- value.price1 = value.productCount * value.purchasePrice
+ value.price1 = Number(value.productCount) * value.purchasePrice
value.stockLogList1.push(obj)
} else {
value.stockLogList.forEach(function(values, keys) {
@@ -6322,7 +6390,7 @@
throw Error('error')
}
let obj = {
- productCount: values.productCount,
+ productCount: Number(values.productCount),
attributeList: keys
}
value.stockLogList1.push(obj)
@@ -6371,7 +6439,7 @@
this.carList.get(id).purchasePrice = Number(e.detail.value)
}
}
- this.carList.get(id).price1 = this.carList.get(id).productCount * this.carList.get(id).purchasePrice
+ this.carList.get(id).price1 = Number(this.carList.get(id).productCount) * this.carList.get(id).purchasePrice
this.getAllPrice()
},
//编辑每一个的批和零售
@@ -6411,7 +6479,7 @@
that.yuedikou = 0
this.carList.forEach(function(value, key) {
that.shouldPay = that.shouldPay + value.price1
- that.totalAmount = that.totalAmount + value.productCount
+ that.totalAmount = that.totalAmount + Number(value.productCount)
})
this.$nextTick(() => {
if (parseFloat(that.zhiqianqiankuan) < 0) {
@@ -6441,12 +6509,12 @@
//修改已选规格的数量
GoodsNumChange(e, index, index1) {
let that = this;
- this.carList.get(index[0]).stockLogList.get(index1).productCount = e
+ this.carList.get(index[0]).stockLogList.get(index1).productCount = Number(e)
this.carList.get(index[0]).productCount = 0
this.carList.get(index[0]).stockLogList.forEach(function(value, key) {
- that.carList.get(index[0]).productCount = that.carList.get(index[0]).productCount + value
- .productCount
- that.carList.get(index[0]).price1 = that.carList.get(index[0]).productCount * that.carList.get(
+ that.carList.get(index[0]).productCount = Number(that.carList.get(index[0]).productCount) + Number(value
+ .productCount)
+ that.carList.get(index[0]).price1 = Number(that.carList.get(index[0]).productCount) * that.carList.get(
index[0]).purchasePrice
})
that.getAllPrice()
diff --git a/package1/index/orderDetail.vue b/package1/index/orderDetail.vue
index 577535d..3390dfd 100644
--- a/package1/index/orderDetail.vue
+++ b/package1/index/orderDetail.vue
@@ -269,39 +269,6 @@
-
-
物流信息
@@ -351,6 +318,21 @@
+
+
+ 店铺信息
+
+
+
+ 店铺地址:
+ {{ shopAddress }}
+
+
+ 店铺电话:
+ {{ shopOwnerPhone }}
+
+
+
= 1990 * pageNum) {
- strCmd += blesdk.addCPCLPrint();
- that.bufferData.push(strCmd);
-
- strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this
- .printHeight - that.yNum + 60), 1, 0, 162);
- that.yNum = 0
- pageNum++
- strCmd +=
- blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '销售数量:' + that.sales.productCount)
- strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount)
- // strCmd += blesdk.addCPCLSETMAG(1, 2)
- strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales
- .balanceDeductionAmount))
- // strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn)
-
- } else {
- strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '销售数量:' + that.sales.productCount)
- strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount)
- // strCmd += blesdk.addCPCLSETMAG(1, 2)
- strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales
- .balanceDeductionAmount))
- // strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn)
- }
-
- console.log('销售数量', that.yNum)
- strCmd += blesdk.addCPCLSETMAG(1, 1)
- if (that.yNum + 60 >= 1990) {
- strCmd += blesdk.addCPCLPrint();
- that.bufferData.push(strCmd);
-
- strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this
- .printHeight - that.yNum + 60), 1, 0, 162);
- that.yNum = 0
- pageNum++
- strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '退货数量:' + that.returnNum)
- strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice)
- strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '其他费用:' + (that.sales.otherExpense))
- } else {
- strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '退货数量:' + that.returnNum)
- strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice)
- strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '其他费用:' + (that.sales.otherExpense))
- }
-
- console.log('退货数量', that.yNum)
- if (that.yNum + 60 >= 1990) {
- strCmd += blesdk.addCPCLPrint();
- that.bufferData.push(strCmd);
-
- strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this
- .printHeight - that.yNum + 60), 1, 0, 162);
- that.yNum = 0
- pageNum++
- strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '欠款抵退货:' + that.sales
- .debtDeductionAmount)
- strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount)
- strCmd += blesdk.addCPCLSETMAG(1, 2)
- if (that.dealingsRecord.lastDebtAmount >= 0) {
- strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前欠款:' + that.dealingsRecord
- .lastDebtAmount)
- } else if (that.dealingsRecord.lastDebtAmount < 0) {
- strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前余额:' + Math.abs(that.dealingsRecord
- .lastDebtAmount))
+ if(this.shopId == '1820391948796694529'){
+ if (that.yNum + 30 >= 1990 * pageNum) {
+ strCmd += blesdk.addCPCLPrint();
+ that.bufferData.push(strCmd);
+
+ strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 30) >= 1990 ? 1990 : (this
+ .printHeight - that.yNum + 30), 1, 0, 162);
+ that.yNum = 0
+ pageNum++
+ strCmd +=
+ blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '销售数量:' + that.sales.productCount)
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount)
+ // strCmd += blesdk.addCPCLSETMAG(1, 2)
+ strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales
+ .balanceDeductionAmount))
+ // strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn)
+
} else {
- strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前欠款:0')
+ strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '销售数量:' + that.sales.productCount)
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount)
+ // strCmd += blesdk.addCPCLSETMAG(1, 2)
+ strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales
+ .balanceDeductionAmount))
+ // strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn)
}
- } else {
- strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '欠款抵退货:' + that.sales
- .debtDeductionAmount)
- strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount)
- // strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales
- // .balanceDeductionAmount))
- strCmd += blesdk.addCPCLSETMAG(1, 2)
- if (that.dealingsRecord.lastDebtAmount >= 0) {
- strCmd += blesdk.addCPCLText('610', (that.yNum - 10), '24', '0', 0, '之前欠款:' + that.dealingsRecord
- .lastDebtAmount)
- } else if (that.dealingsRecord.lastDebtAmount < 0) {
- strCmd += blesdk.addCPCLText('610', (that.yNum - 10), '24', '0', 0, '之前余额:' + Math.abs(that
- .dealingsRecord
- .lastDebtAmount))
+
+ console.log('销售数量', that.yNum)
+ strCmd += blesdk.addCPCLSETMAG(1, 1)
+ if (that.yNum + 30 >= 1990) {
+ strCmd += blesdk.addCPCLPrint();
+ that.bufferData.push(strCmd);
+
+ strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 30) >= 1990 ? 1990 : (this
+ .printHeight - that.yNum + 30), 1, 0, 162);
+ that.yNum = 0
+ pageNum++
+ strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '退货数量:' + that.returnNum)
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice)
+ strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '其他费用:' + (that.sales.otherExpense))
} else {
- strCmd += blesdk.addCPCLText('610', (that.yNum - 10), '24', '0', 0, '之前欠款:0')
+ strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '退货数量:' + that.returnNum)
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice)
+ strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '其他费用:' + (that.sales.otherExpense))
}
- }
-
- console.log('欠款抵退货', that.yNum)
- // strCmd += blesdk.addCPCLSETMAG(1,1)
- // if(that.yNum + 40 >= 1990){
- // strCmd += blesdk.addCPCLPrint();
- // that.bufferData.push(strCmd);
-
- // strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 40) >= 1990 ?1990:(this.printHeight - that.yNum + 40), 1, 0,162);
- // that.yNum = 0
- // pageNum ++
- // strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0,
- // '-----------------------------------------------------------------------------------')
- // }else{
- // strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0,
- // '-----------------------------------------------------------------------------------')
- // }
- strCmd += blesdk.addCPCLSETMAG(1, 2)
- if (that.yNum + 60 >= 1990) {
- strCmd += blesdk.addCPCLPrint();
- that.bufferData.push(strCmd);
-
- strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this
- .printHeight - that.yNum + 60), 1, 0, 162);
- that.yNum = 0
- pageNum++
- strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn)
- strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '本单应收:' + that.sales.realAmount)
-
- } else {
-
- strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn)
- strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '本单应收:' + that.sales.realAmount)
- }
-
-
- // strCmd += blesdk.addCPCLSETMAG(2, 2)
- // strCmd += blesdk.addCPCLLocation(0);
- if (that.yNum + 60 >= 1990) {
- strCmd += blesdk.addCPCLPrint();
- that.bufferData.push(strCmd);
-
- strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this
- .printHeight - that.yNum + 60), 1, 0, 162);
- that.yNum = 0
- pageNum++
- if (that.sales.noEarn >= 0) {
- strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单欠款:' + (that.sales.noEarn))
+
+ console.log('退货数量', that.yNum)
+ if (that.yNum + 30 >= 1990) {
+ strCmd += blesdk.addCPCLPrint();
+ that.bufferData.push(strCmd);
+
+ strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 30) >= 1990 ? 1990 : (this
+ .printHeight - that.yNum + 30), 1, 0, 162);
+ that.yNum = 0
+ pageNum++
+ strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '欠款抵退货:' + that.sales
+ .debtDeductionAmount)
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount)
+ strCmd += blesdk.addCPCLSETMAG(1, 2)
+ if (that.dealingsRecord.lastDebtAmount >= 0) {
+ strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '之前欠款:' + that.dealingsRecord
+ .lastDebtAmount)
+ } else if (that.dealingsRecord.lastDebtAmount < 0) {
+ strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '之前余额:' + Math.abs(that.dealingsRecord
+ .lastDebtAmount))
+ } else {
+ strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '之前欠款:0')
+ }
} else {
- strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单余额:' + Math.abs(that.sales
- .noEarn))
+ strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '欠款抵退货:' + that.sales
+ .debtDeductionAmount)
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount)
+ // strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales
+ // .balanceDeductionAmount))
+ strCmd += blesdk.addCPCLSETMAG(1, 1)
+ if (that.dealingsRecord.lastDebtAmount >= 0) {
+ strCmd += blesdk.addCPCLText('580', (that.yNum), '24', '0', 0, '之前欠款:' + that.dealingsRecord
+ .lastDebtAmount)
+ } else if (that.dealingsRecord.lastDebtAmount < 0) {
+ strCmd += blesdk.addCPCLText('580', (that.yNum), '24', '0', 0, '之前余额:' + Math.abs(that
+ .dealingsRecord
+ .lastDebtAmount))
+ } else {
+ strCmd += blesdk.addCPCLText('580', (that.yNum), '24', '0', 0, '之前欠款:0')
+ }
}
- if (that.dealingsRecord.balanceDue >= 0) {
- strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord
- .balanceDue)
- } else if (that.dealingsRecord.balanceDue < 0) {
- strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that
- .dealingsRecord.balanceDue))
+
+ console.log('欠款抵退货', that.yNum)
+ strCmd += blesdk.addCPCLSETMAG(1, 1)
+ if (that.yNum + 30 >= 1990) {
+ strCmd += blesdk.addCPCLPrint();
+ that.bufferData.push(strCmd);
+
+ strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 30) >= 1990 ? 1990 : (this
+ .printHeight - that.yNum + 30), 1, 0, 162);
+ that.yNum = 0
+ pageNum++
+
+ strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '本单应收:' + that.sales.realAmount)
+ if (that.sales.noEarn >= 0) {
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '本单欠款:' + (that.sales.noEarn))
+ } else {
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '本单余额:' + Math.abs(that.sales
+ .noEarn))
+ }
+ if (that.dealingsRecord.balanceDue >= 0) {
+ strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord
+ .balanceDue)
+ } else if (that.dealingsRecord.balanceDue < 0) {
+ strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that
+ .dealingsRecord.balanceDue))
+ } else {
+ strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计欠款:0')
+ }
+
} else {
- strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:0')
+
+
+ strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '本单应收:' + that.sales.realAmount)
+ if (that.sales.noEarn >= 0) {
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '本单欠款:' + (that.sales.noEarn))
+ } else {
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '本单余额:' + Math.abs(that.sales
+ .noEarn))
+ }
+ if (that.dealingsRecord.balanceDue >= 0) {
+ strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord
+ .balanceDue)
+ } else if (that.dealingsRecord.balanceDue < 0) {
+ strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that
+ .dealingsRecord.balanceDue))
+ } else {
+ strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计欠款:0')
+ }
}
- } else {
- if (that.sales.noEarn >= 0) {
- strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单欠款:' + (that.sales.noEarn))
+ if (that.yNum + 30 >= 1990) {
+ strCmd += blesdk.addCPCLPrint();
+ that.bufferData.push(strCmd);
+
+ strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 30) >= 1990 ? 1990 : (this
+ .printHeight - that.yNum + 30), 1, 0, 162);
+ that.yNum = 0
+ pageNum++
+
+ strCmd += blesdk.addCPCLSETMAG(1, 2)
+ strCmd += blesdk.addCPCLText('580', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn)
} else {
- strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单余额:' + Math.abs(that.sales
- .noEarn))
+
+ strCmd += blesdk.addCPCLSETMAG(1, 2)
+ strCmd += blesdk.addCPCLText('580', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn)
}
- if (that.dealingsRecord.balanceDue >= 0) {
- strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord
- .balanceDue)
- } else if (that.dealingsRecord.balanceDue < 0) {
- strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that
- .dealingsRecord.balanceDue))
+ }else{
+ if (that.yNum + 60 >= 1990 * pageNum) {
+ strCmd += blesdk.addCPCLPrint();
+ that.bufferData.push(strCmd);
+
+ strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this
+ .printHeight - that.yNum + 60), 1, 0, 162);
+ that.yNum = 0
+ pageNum++
+ strCmd +=
+ blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '销售数量:' + that.sales.productCount)
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount)
+ // strCmd += blesdk.addCPCLSETMAG(1, 2)
+ strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales
+ .balanceDeductionAmount))
+ // strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn)
+
} else {
- strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:0')
+ strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '销售数量:' + that.sales.productCount)
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount)
+ // strCmd += blesdk.addCPCLSETMAG(1, 2)
+ strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales
+ .balanceDeductionAmount))
+ // strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn)
+ }
+
+ console.log('销售数量', that.yNum)
+ strCmd += blesdk.addCPCLSETMAG(1, 1)
+ if (that.yNum + 60 >= 1990) {
+ strCmd += blesdk.addCPCLPrint();
+ that.bufferData.push(strCmd);
+
+ strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this
+ .printHeight - that.yNum + 60), 1, 0, 162);
+ that.yNum = 0
+ pageNum++
+ strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '退货数量:' + that.returnNum)
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice)
+ strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '其他费用:' + (that.sales.otherExpense))
+ } else {
+ strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '退货数量:' + that.returnNum)
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice)
+ strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '其他费用:' + (that.sales.otherExpense))
+ }
+
+ console.log('退货数量', that.yNum)
+ if (that.yNum + 60 >= 1990) {
+ strCmd += blesdk.addCPCLPrint();
+ that.bufferData.push(strCmd);
+
+ strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this
+ .printHeight - that.yNum + 60), 1, 0, 162);
+ that.yNum = 0
+ pageNum++
+ strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '欠款抵退货:' + that.sales
+ .debtDeductionAmount)
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount)
+ strCmd += blesdk.addCPCLSETMAG(1, 2)
+ if (that.dealingsRecord.lastDebtAmount >= 0) {
+ strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前欠款:' + that.dealingsRecord
+ .lastDebtAmount)
+ } else if (that.dealingsRecord.lastDebtAmount < 0) {
+ strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前余额:' + Math.abs(that.dealingsRecord
+ .lastDebtAmount))
+ } else {
+ strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前欠款:0')
+ }
+ } else {
+ strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '欠款抵退货:' + that.sales
+ .debtDeductionAmount)
+ strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount)
+ // strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales
+ // .balanceDeductionAmount))
+ strCmd += blesdk.addCPCLSETMAG(1, 2)
+ if (that.dealingsRecord.lastDebtAmount >= 0) {
+ strCmd += blesdk.addCPCLText('610', (that.yNum - 10), '24', '0', 0, '之前欠款:' + that.dealingsRecord
+ .lastDebtAmount)
+ } else if (that.dealingsRecord.lastDebtAmount < 0) {
+ strCmd += blesdk.addCPCLText('610', (that.yNum - 10), '24', '0', 0, '之前余额:' + Math.abs(that
+ .dealingsRecord
+ .lastDebtAmount))
+ } else {
+ strCmd += blesdk.addCPCLText('610', (that.yNum - 10), '24', '0', 0, '之前欠款:0')
+ }
+ }
+
+ console.log('欠款抵退货', that.yNum)
+ strCmd += blesdk.addCPCLSETMAG(1, 2)
+ if (that.yNum + 60 >= 1990) {
+ strCmd += blesdk.addCPCLPrint();
+ that.bufferData.push(strCmd);
+
+ strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this
+ .printHeight - that.yNum + 60), 1, 0, 162);
+ that.yNum = 0
+ pageNum++
+ strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn)
+ strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '本单应收:' + that.sales.realAmount)
+
+ } else {
+
+ strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn)
+ strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '本单应收:' + that.sales.realAmount)
+ }
+ if (that.yNum + 60 >= 1990) {
+ strCmd += blesdk.addCPCLPrint();
+ that.bufferData.push(strCmd);
+
+ strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this
+ .printHeight - that.yNum + 60), 1, 0, 162);
+ that.yNum = 0
+ pageNum++
+ if (that.sales.noEarn >= 0) {
+ strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单欠款:' + (that.sales.noEarn))
+ } else {
+ strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单余额:' + Math.abs(that.sales
+ .noEarn))
+ }
+ if (that.dealingsRecord.balanceDue >= 0) {
+ strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord
+ .balanceDue)
+ } else if (that.dealingsRecord.balanceDue < 0) {
+ strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that
+ .dealingsRecord.balanceDue))
+ } else {
+ strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:0')
+ }
+ } else {
+ if (that.sales.noEarn >= 0) {
+ strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单欠款:' + (that.sales.noEarn))
+ } else {
+ strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单余额:' + Math.abs(that.sales
+ .noEarn))
+ }
+ if (that.dealingsRecord.balanceDue >= 0) {
+ strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord
+ .balanceDue)
+ } else if (that.dealingsRecord.balanceDue < 0) {
+ strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that
+ .dealingsRecord.balanceDue))
+ } else {
+ strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:0')
+ }
}
}
strCmd += blesdk.addCPCLSETMAG(1, 1)
@@ -1453,7 +1575,7 @@
}
}
- if (that.yNum + 260 >= 1990) {
+ if (that.yNum + 300 >= 1990) {
strCmd += blesdk.addCPCLPrint();
that.bufferData.push(strCmd);
diff --git a/package1/inventory/inventoryConfirm.vue b/package1/inventory/inventoryConfirm.vue
index 37a78ae..4985022 100644
--- a/package1/inventory/inventoryConfirm.vue
+++ b/package1/inventory/inventoryConfirm.vue
@@ -117,7 +117,7 @@
return {
purchase:'',
purchaseDetails:'',
- aiinventory:0, //1是AI入库 0是普通入库
+ aiinventory:0, //1是AI入库 0是普通入库 2采购退货
userType:1,
leijiqiankuan:0,
zhiqianqiankuan:0,
@@ -137,7 +137,23 @@
}
},
onLoad(option) {
- this.purchaseDetails = JSON.parse(option.purchaseDetails)
+ this.purchaseDetails = JSON.parse(option.purchaseDetails)
+ console.log('purchaseDetails',this.purchaseDetails)
+ if(this.purchaseDetails != '' && uni.getStorageSync('type') == 0){
+ for(let i=0;i{
@@ -169,7 +187,7 @@
}, false, false).then((res) => {
if (res.code == 200) {
uni.showToast({
- title: "入库成功",
+ title: "退货成功",
icon: 'none'
})
setTimeout(res => {
@@ -179,7 +197,7 @@
}, 1000)
} else {
uni.showToast({
- title: "入库失败",
+ title: "退货失败",
icon: 'none'
})
}
diff --git a/package1/stock/addStock.vue b/package1/stock/addStock.vue
index 45d3b85..591ab19 100644
--- a/package1/stock/addStock.vue
+++ b/package1/stock/addStock.vue
@@ -15,15 +15,16 @@
-
+
暂无图片
- {{item.productSn}}
+ {{item.productSn==null?'':item.productSn}}
({{item.productName == null ?'':item.productName}})
+ (已下架)
{{item.supplierName == null ?'':item.supplierName}}
@@ -48,7 +49,7 @@
-
+
暂无图片
@@ -57,8 +58,9 @@
{{item.productSn}}
({{item.productName == null ?'':item.productName}})
+ (已下架)
- {{item.supplierName}}
+ {{item.supplierName == null ?'':item.supplierName}}
{{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}
@@ -329,6 +331,19 @@
})
}
+ },
+ //未入库遮罩
+ clickMask(item) {
+ let title = ''
+ if (item.delFlag == 0) {
+ title = '请将商品上架后再操作!'
+ } else {
+ title = '请将上次入库的采购价维护后再进行操作!'
+ }
+ uni.showToast({
+ title: title,
+ icon: 'none'
+ })
},
stockSelect(){
this.stockList = []