ソースを参照

安全生产费,记录单价

MaiXinRong 2 年 前
コミット
05a966cca7
2 ファイル変更2 行追加1 行削除
  1. 1 0
      app/service/payment_detail_audit.js
  2. 1 1
      app/service/payment_safe_bills.js

+ 1 - 0
app/service/payment_detail_audit.js

@@ -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);

+ 1 - 1
app/service/payment_safe_bills.js

@@ -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;