|
@@ -80,13 +80,20 @@ Page({
|
|
item.gradeprice = CNY(item.gradeprice);
|
|
item.gradeprice = CNY(item.gradeprice);
|
|
item.marketprice = CNY(item.marketprice);
|
|
item.marketprice = CNY(item.marketprice);
|
|
item.qty = item.orderaddqty;
|
|
item.qty = item.orderaddqty;
|
|
- this.setData({
|
|
|
|
- content,
|
|
|
|
- detail: item,
|
|
|
|
|
|
+ let ros = {
|
|
specRows: res.data.specRows.reverse(),
|
|
specRows: res.data.specRows.reverse(),
|
|
cheekRows: res.data.cheekRows,
|
|
cheekRows: res.data.cheekRows,
|
|
materialRows: res.data.materialRows,
|
|
materialRows: res.data.materialRows,
|
|
colorRows: res.data.colorRows,
|
|
colorRows: res.data.colorRows,
|
|
|
|
+ };
|
|
|
|
+ ['spec', 'cheek', 'material', 'color'].forEach(key => {
|
|
|
|
+ let list = ros[key + 'Rows'].filter(v => v.flag);
|
|
|
|
+ if (list.length == 1) content[key] = list[0].parm
|
|
|
|
+ })
|
|
|
|
+ this.setData({
|
|
|
|
+ content,
|
|
|
|
+ detail: item,
|
|
|
|
+ ...ros,
|
|
loading: false,
|
|
loading: false,
|
|
itemCount: ['specRows', 'cheekRows', 'materialRows', 'colorRows'].filter(v => res.data[v].length).length
|
|
itemCount: ['specRows', 'cheekRows', 'materialRows', 'colorRows'].filter(v => res.data[v].length).length
|
|
});
|
|
});
|