|
|
|
@ -470,76 +470,79 @@ |
|
|
|
this.khName = [] |
|
|
|
this.saleId = '' |
|
|
|
} |
|
|
|
for (let i = 0; i < this.carList1.length; i++) { |
|
|
|
if (this.carList.size == 0) { //当前页没有数据 |
|
|
|
|
|
|
|
let obj = { |
|
|
|
purchasePrice: this.carList1[i].price, //采购价 |
|
|
|
price: 0, //总价 |
|
|
|
discount: 10, //折扣 |
|
|
|
unitPrice: this.carList1[i].unitPrice || 0, //单价 |
|
|
|
discountAmount: this.carList1[i].unitPrice || 0, //折后价 |
|
|
|
wholesalePrice: this.carList1[i].wholesalePrice, //批发价 |
|
|
|
lsprice: this.carList1[i].lsprice, //零售价 |
|
|
|
productCount: 0, //总数量 |
|
|
|
productId: this.carList1[i].id, |
|
|
|
productName: this.carList1[i].productName, |
|
|
|
productPicture: this.carList1[i].productPicture, |
|
|
|
productSn: this.carList1[i].productSn, |
|
|
|
stockLogList: new Map(), |
|
|
|
stockLogList1: [], |
|
|
|
supplierName: this.carList1[i].supplierName //供应商 |
|
|
|
} |
|
|
|
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) { |
|
|
|
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, this.carList1[i] |
|
|
|
.saleDetailQueryDTO[m].productCount) |
|
|
|
obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount |
|
|
|
} |
|
|
|
this.carList.set(this.carList1[i].id, obj) |
|
|
|
} else { //当前页有数据 |
|
|
|
if (this.carList.has(this.carList1[i].id) == true) { //商品相同 |
|
|
|
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) { |
|
|
|
if (this.carList.get(this.carList1[i].id).stockLogList.has(this.carList1[i].saleDetailQueryDTO[ |
|
|
|
m].attributeList) == true) { //规格相同 |
|
|
|
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[ |
|
|
|
m].attributeList, this.carList.get(this.carList1[i].id).stockLogList.get(this |
|
|
|
.carList1[i].saleDetailQueryDTO[m].attributeList) + this.carList1[i] |
|
|
|
.saleDetailQueryDTO[m].productCount) |
|
|
|
this.carList.get(this.carList1[i].id).productCount += this.carList1[i].saleDetailQueryDTO[ |
|
|
|
m].productCount |
|
|
|
} else { //规格不同 |
|
|
|
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[ |
|
|
|
m].attributeList, this.carList1[i].saleDetailQueryDTO[m].productCount) |
|
|
|
this.carList.get(this.carList1[i].id).productCount += this.carList1[i].saleDetailQueryDTO[ |
|
|
|
m].productCount |
|
|
|
} |
|
|
|
} |
|
|
|
} else { //商品不同 |
|
|
|
let obj = { |
|
|
|
purchasePrice: this.carList1[i].price, //采购价 |
|
|
|
price: 0, |
|
|
|
discount: 10, |
|
|
|
discountAmount: this.carList1[i].unitPrice || 0, |
|
|
|
unitPrice: this.carList1[i].unitPrice || 0, //单价 |
|
|
|
wholesalePrice: this.carList1[i].wholesalePrice, //批发价 |
|
|
|
lsprice: this.carList1[i].lsprice, //零售价 |
|
|
|
productCount: 0, |
|
|
|
productId: this.carList1[i].id, |
|
|
|
productName: this.carList1[i].productName, |
|
|
|
productPicture: this.carList1[i].productPicture, |
|
|
|
stockLogList: new Map(), |
|
|
|
stockLogList1: [], |
|
|
|
productSn: this.carList1[i].productSn, |
|
|
|
supplierName: this.carList1[i].supplierName |
|
|
|
} |
|
|
|
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) { |
|
|
|
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, this.carList1[i] |
|
|
|
.saleDetailQueryDTO[m].productCount) |
|
|
|
obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount |
|
|
|
} |
|
|
|
this.carList.set(this.carList1[i].id, obj) |
|
|
|
} |
|
|
|
} |
|
|
|
for (let i = 0; i < this.carList1.length; i++) { |
|
|
|
if(this.carList1[i].saleDetailQueryDTO){ |
|
|
|
if (this.carList.size == 0) { //当前页没有数据 |
|
|
|
|
|
|
|
let obj = { |
|
|
|
purchasePrice: this.carList1[i].price, //采购价 |
|
|
|
price: 0, //总价 |
|
|
|
discount: 10, //折扣 |
|
|
|
unitPrice: this.carList1[i].unitPrice || 0, //单价 |
|
|
|
discountAmount: this.carList1[i].unitPrice || 0, //折后价 |
|
|
|
wholesalePrice: this.carList1[i].wholesalePrice, //批发价 |
|
|
|
lsprice: this.carList1[i].lsprice, //零售价 |
|
|
|
productCount: 0, //总数量 |
|
|
|
productId: this.carList1[i].id, |
|
|
|
productName: this.carList1[i].productName, |
|
|
|
productPicture: this.carList1[i].productPicture, |
|
|
|
productSn: this.carList1[i].productSn, |
|
|
|
stockLogList: new Map(), |
|
|
|
stockLogList1: [], |
|
|
|
supplierName: this.carList1[i].supplierName //供应商 |
|
|
|
} |
|
|
|
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) { |
|
|
|
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, this.carList1[i] |
|
|
|
.saleDetailQueryDTO[m].productCount) |
|
|
|
obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount |
|
|
|
} |
|
|
|
this.carList.set(this.carList1[i].id, obj) |
|
|
|
} else { //当前页有数据 |
|
|
|
if (this.carList.has(this.carList1[i].id) == true) { //商品相同 |
|
|
|
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) { |
|
|
|
if (this.carList.get(this.carList1[i].id).stockLogList.has(this.carList1[i].saleDetailQueryDTO[ |
|
|
|
m].attributeList) == true) { //规格相同 |
|
|
|
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[ |
|
|
|
m].attributeList, this.carList.get(this.carList1[i].id).stockLogList.get(this |
|
|
|
.carList1[i].saleDetailQueryDTO[m].attributeList) + this.carList1[i] |
|
|
|
.saleDetailQueryDTO[m].productCount) |
|
|
|
this.carList.get(this.carList1[i].id).productCount += this.carList1[i].saleDetailQueryDTO[ |
|
|
|
m].productCount |
|
|
|
} else { //规格不同 |
|
|
|
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[ |
|
|
|
m].attributeList, this.carList1[i].saleDetailQueryDTO[m].productCount) |
|
|
|
this.carList.get(this.carList1[i].id).productCount += this.carList1[i].saleDetailQueryDTO[ |
|
|
|
m].productCount |
|
|
|
} |
|
|
|
} |
|
|
|
} else { //商品不同 |
|
|
|
let obj = { |
|
|
|
purchasePrice: this.carList1[i].price, //采购价 |
|
|
|
price: 0, |
|
|
|
discount: 10, |
|
|
|
discountAmount: this.carList1[i].unitPrice || 0, |
|
|
|
unitPrice: this.carList1[i].unitPrice || 0, //单价 |
|
|
|
wholesalePrice: this.carList1[i].wholesalePrice, //批发价 |
|
|
|
lsprice: this.carList1[i].lsprice, //零售价 |
|
|
|
productCount: 0, |
|
|
|
productId: this.carList1[i].id, |
|
|
|
productName: this.carList1[i].productName, |
|
|
|
productPicture: this.carList1[i].productPicture, |
|
|
|
stockLogList: new Map(), |
|
|
|
stockLogList1: [], |
|
|
|
productSn: this.carList1[i].productSn, |
|
|
|
supplierName: this.carList1[i].supplierName |
|
|
|
} |
|
|
|
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) { |
|
|
|
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, this.carList1[i] |
|
|
|
.saleDetailQueryDTO[m].productCount) |
|
|
|
obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount |
|
|
|
} |
|
|
|
this.carList.set(this.carList1[i].id, obj) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
uni.removeStorageSync('carList1') |
|
|
|
uni.removeStorageSync('khName') |
|
|
|
@ -1744,7 +1747,9 @@ |
|
|
|
margin-left: 46rpx !important; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.uni-data-checklist .checklist-group .checklist-box { |
|
|
|
margin-right: 0 !important; |
|
|
|
} |
|
|
|
.uni-numbox { |
|
|
|
input { |
|
|
|
padding-left: 0; |
|
|
|
|