|
@@ -5,7 +5,6 @@ const _Http = getApp().globalData.http,
|
|
|
precision: 2
|
|
|
}).format();
|
|
|
let downCount = {};
|
|
|
-
|
|
|
Component({
|
|
|
options: {
|
|
|
addGlobalClass: true,
|
|
@@ -30,14 +29,13 @@ Component({
|
|
|
},
|
|
|
customizedProduct(item) {
|
|
|
return new Promise((resolve) => {
|
|
|
- console.log(item)
|
|
|
_Http.basic({
|
|
|
"id": 20220924104302,
|
|
|
"content": {
|
|
|
"sa_shoppingcartid": item.sa_shoppingcartid,
|
|
|
"qty": item.qty,
|
|
|
- "width": item.width,
|
|
|
- "length": item.length
|
|
|
+ "width": item.width || 0,
|
|
|
+ "length": item.length || 0
|
|
|
},
|
|
|
}).then(res => {
|
|
|
console.log("修改定制", res)
|
|
@@ -74,7 +72,7 @@ Component({
|
|
|
let list = [],
|
|
|
allBrandList = [];
|
|
|
list = res.data.map(v => {
|
|
|
- v.showPrice = CNY(v.oldprice)
|
|
|
+ v.showPrice = CNY(v.gradeprice)
|
|
|
let obj = allBrandList.find(s => s.sa_brandid == v.sa_brandid);
|
|
|
if (obj) {
|
|
|
obj.results.push(v.sa_shoppingcartid)
|
|
@@ -127,6 +125,7 @@ Component({
|
|
|
"qty": v.qty,
|
|
|
width: v.width || 0,
|
|
|
length: v.length || 0,
|
|
|
+ sa_shoppingcartid: v.sa_shoppingcartid || 0
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -217,7 +216,7 @@ Component({
|
|
|
if (results.length) results = results.filter(v => {
|
|
|
let item = this.data.list.find(va => va.sa_shoppingcartid == v);
|
|
|
if (item) {
|
|
|
- sum = currency(sum).add(currency(item.qty).multiply(item.oldprice)).value;
|
|
|
+ sum = currency(sum).add(currency(item.qty).multiply(item.gradeprice)).value;
|
|
|
/* 领域分类 */
|
|
|
let index = classList.findIndex(value => value.type == item.tradefield_shoppingcart);
|
|
|
if (index == -1) {
|
|
@@ -318,7 +317,9 @@ Component({
|
|
|
"id": 20220924104302,
|
|
|
"content": {
|
|
|
"sa_shoppingcartid": item.sa_shoppingcartid,
|
|
|
- "qty": item.qty
|
|
|
+ "qty": item.qty,
|
|
|
+ "width": item.width || 0,
|
|
|
+ "length": item.length || 0
|
|
|
},
|
|
|
}, false).then(res => {
|
|
|
console.log("修改数量", res)
|
|
@@ -346,7 +347,9 @@ Component({
|
|
|
"id": 20220924104302,
|
|
|
"content": {
|
|
|
"sa_shoppingcartid": item.sa_shoppingcartid,
|
|
|
- "qty": item.qty
|
|
|
+ "qty": item.qty,
|
|
|
+ "width": item.width || 0,
|
|
|
+ "length": item.length || 0
|
|
|
},
|
|
|
}, false).then(res => {
|
|
|
console.log("修改数量", res)
|