@@ -113,6 +113,7 @@ module.exports = app => {
const sql = `SELECT pda.aid, pa.name, pa.company, pa.role, pa.mobile, pa.telephone, pda.times, pda.order, pda.status, pda.opinion, pda.begin_time, pda.end_time` +
` FROM ${this.tableName} pda LEFT JOIN ${this.ctx.service.projectAccount.tableName} pa ON pda.aid = pa.id` +
' WHERE pda.td_id = ? AND pda.times = ?';
+ //const flow = await this.db.query(sql, [detail.id, detail.status === auditConst.status.checkNo && !detail.readOnly ? detail.curTimes - 1 : detail.curTimes]);
const flow = await this.db.query(sql, [detail.id, detail.curTimes]);
flow.forEach(x => {
if (x.status === auditConst.status.checked) result.push(x);
@@ -501,7 +501,7 @@ module.exports = app => {
if (l.cur_read_qty !== l.cur_qty || l.cur_read_tp !== l.cur_tp) {
const data = { id: l.id, cur_read_qty: l.cur_qty, cur_read_tp: l.cur_tp };
const his = l.cur_his ? JSON.parse(l.cur_his) : [];
- his.push({ ...auditInfo, qty: l.cur_qty, tp: l.cur_tp });
+ his.push({ ...auditInfo, qty: l.cur_qty, tp: l.cur_tp, up: l.unit_price });
data.cur_his = JSON.stringify(his);
data.cur_read_qty = l.cur_qty;
data.cur_read_tp = l.cur_tp;