|
@@ -11,6 +11,7 @@ Page({
|
|
|
loading: true
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
+ console.log(options)
|
|
|
if (options.id) this.setData({
|
|
|
sa_itemgroupid: options.id,
|
|
|
itemno: options.itemno
|
|
@@ -51,14 +52,15 @@ Page({
|
|
|
}, 500)
|
|
|
return;
|
|
|
}
|
|
|
- this.handleFiles(res.data[0].attinfos)
|
|
|
+ let index = res.data.findIndex(v => v.itemno == this.data.itemno);
|
|
|
+ this.handleFiles(res.data[index].attinfos)
|
|
|
const CNY = sum => currency(sum, {
|
|
|
symbol: "¥",
|
|
|
precision: 2
|
|
|
}).format();
|
|
|
|
|
|
this.setData({
|
|
|
- detail: res.data[0],
|
|
|
+ detail: res.data[index],
|
|
|
rows: res.data.map(v => {
|
|
|
v.gradeprice = CNY(v.gradeprice);
|
|
|
v.marketprice = CNY(v.marketprice);
|