|
|
@ -470,7 +470,6 @@ |
|
|
this.khName = [] |
|
|
this.khName = [] |
|
|
this.saleId = '' |
|
|
this.saleId = '' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for (let i = 0; i < this.carList1.length; i++) { |
|
|
for (let i = 0; i < this.carList1.length; i++) { |
|
|
if (this.carList.size == 0) { //当前页没有数据 |
|
|
if (this.carList.size == 0) { //当前页没有数据 |
|
|
|
|
|
|
|
|
@ -478,8 +477,8 @@ |
|
|
purchasePrice: this.carList1[i].price, //采购价 |
|
|
purchasePrice: this.carList1[i].price, //采购价 |
|
|
price: 0, //总价 |
|
|
price: 0, //总价 |
|
|
discount: 10, //折扣 |
|
|
discount: 10, //折扣 |
|
|
unitPrice: 0, //单价 |
|
|
unitPrice: this.carList1[i].unitPrice || 0, //单价 |
|
|
discountAmount: 0, //折后价 |
|
|
discountAmount: this.carList1[i].unitPrice || 0, //折后价 |
|
|
wholesalePrice: this.carList1[i].wholesalePrice, //批发价 |
|
|
wholesalePrice: this.carList1[i].wholesalePrice, //批发价 |
|
|
lsprice: this.carList1[i].lsprice, //零售价 |
|
|
lsprice: this.carList1[i].lsprice, //零售价 |
|
|
productCount: 0, //总数量 |
|
|
productCount: 0, //总数量 |
|
|
@ -497,9 +496,7 @@ |
|
|
obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount |
|
|
obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount |
|
|
} |
|
|
} |
|
|
this.carList.set(this.carList1[i].id, obj) |
|
|
this.carList.set(this.carList1[i].id, obj) |
|
|
|
|
|
|
|
|
} else { //当前页有数据 |
|
|
} else { //当前页有数据 |
|
|
|
|
|
|
|
|
if (this.carList.has(this.carList1[i].id) == true) { //商品相同 |
|
|
if (this.carList.has(this.carList1[i].id) == true) { //商品相同 |
|
|
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) { |
|
|
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[ |
|
|
if (this.carList.get(this.carList1[i].id).stockLogList.has(this.carList1[i].saleDetailQueryDTO[ |
|
|
@ -522,8 +519,8 @@ |
|
|
purchasePrice: this.carList1[i].price, //采购价 |
|
|
purchasePrice: this.carList1[i].price, //采购价 |
|
|
price: 0, |
|
|
price: 0, |
|
|
discount: 10, |
|
|
discount: 10, |
|
|
discountAmount: 0, |
|
|
discountAmount: this.carList1[i].unitPrice || 0, |
|
|
unitPrice: 0, //单价 |
|
|
unitPrice: this.carList1[i].unitPrice || 0, //单价 |
|
|
wholesalePrice: this.carList1[i].wholesalePrice, //批发价 |
|
|
wholesalePrice: this.carList1[i].wholesalePrice, //批发价 |
|
|
lsprice: this.carList1[i].lsprice, //零售价 |
|
|
lsprice: this.carList1[i].lsprice, //零售价 |
|
|
productCount: 0, |
|
|
productCount: 0, |
|
|
@ -549,7 +546,9 @@ |
|
|
uni.removeStorageSync('saoma') |
|
|
uni.removeStorageSync('saoma') |
|
|
this.carList1 = [] |
|
|
this.carList1 = [] |
|
|
this.carList.forEach(function(value, key) { |
|
|
this.carList.forEach(function(value, key) { |
|
|
if (that.priceType == 0) { //零售 |
|
|
if(that.priceType == ''){ |
|
|
|
|
|
// value.unitPrice = value.unitPrice |
|
|
|
|
|
}else if (that.priceType == 0) { //零售 |
|
|
value.unitPrice = value.lsprice |
|
|
value.unitPrice = value.lsprice |
|
|
} else if (that.priceType == 1) { //批发 |
|
|
} else if (that.priceType == 1) { //批发 |
|
|
value.unitPrice = value.wholesalePrice |
|
|
value.unitPrice = value.wholesalePrice |
|
|
@ -641,14 +640,15 @@ |
|
|
this.temporaryList.push(this.attributeList); |
|
|
this.temporaryList.push(this.attributeList); |
|
|
} else { |
|
|
} else { |
|
|
for (var i = 0; i < this.temporaryList.length; i++) { |
|
|
for (var i = 0; i < this.temporaryList.length; i++) { |
|
|
if (this.temporaryList[i].name.indexOf(this.attributeList.name) != -1) { |
|
|
if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i].name.indexOf(this.attributeList.name) == 1) { |
|
|
this.temporaryList[i] = this.attributeList |
|
|
if (this.temporaryList.length == (i + 1)) { |
|
|
return |
|
|
this.temporaryList.push(this.attributeList); |
|
|
} else { |
|
|
return |
|
|
if (this.temporaryList.length == (i + 1)) { |
|
|
|
|
|
this.temporaryList.push(this.attributeList); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
this.temporaryList[i] = this.attributeList |
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -732,7 +732,10 @@ |
|
|
let that = this; |
|
|
let that = this; |
|
|
let price = 0 |
|
|
let price = 0 |
|
|
this.carList.forEach(function(value, key) { |
|
|
this.carList.forEach(function(value, key) { |
|
|
if(that.priceType == 0){ //零售 |
|
|
console.log(value.unitPrice) |
|
|
|
|
|
if(that.priceType == ''){ |
|
|
|
|
|
price = value.unitPrice |
|
|
|
|
|
}else if(that.priceType == 0){ //零售 |
|
|
price = value.lsprice |
|
|
price = value.lsprice |
|
|
}else if(that.priceType == 1){ //批发 |
|
|
}else if(that.priceType == 1){ //批发 |
|
|
price = value.wholesalePrice |
|
|
price = value.wholesalePrice |
|
|
|