|
@@ -150,6 +150,7 @@ module.exports = app => {
|
|
|
|
|
|
const filter = {stimes: this.ctx.stage.curTimes, sorder: this.ctx.stage.curOrder};
|
|
|
const updateDatas = [];
|
|
|
+ console.log(datas);
|
|
|
for (const d of datas) {
|
|
|
const history = d.shistory && d.shistory !== '' ? JSON.parse(d.shistory) : [];
|
|
|
const his = this.ctx.helper._.find(datas, filter);
|
|
@@ -158,7 +159,7 @@ module.exports = app => {
|
|
|
if (d.sid === d.add_sid) his.total_price = d.total_price;
|
|
|
} else {
|
|
|
const nHis = { stimes: this.ctx.stage.curTimes, sorder: this.ctx.stage.curOrder, tp: d.tp };
|
|
|
- if (d.sid === d.add_sid) his.total_price = d.total_price;
|
|
|
+ if (d.sid === d.add_sid) nHis.total_price = d.total_price;
|
|
|
history.push(nHis);
|
|
|
}
|
|
|
updateDatas.push({ id: d.id, shistory: JSON.stringify(history) });
|
|
@@ -188,4 +189,4 @@ module.exports = app => {
|
|
|
}
|
|
|
|
|
|
return StageOther;
|
|
|
-};
|
|
|
+};
|