laiguoran 4 vuotta sitten
vanhempi
commit
61fbe92ee4
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      app/service/material.js

+ 2 - 2
app/service/material.js

@@ -182,12 +182,12 @@ module.exports = app => {
                 await transaction.delete(this.ctx.service.materialListNotjoin.tableName, { mid: id });
                 await transaction.delete(this.ctx.service.materialBillsHistory.tableName, { mid: id });
                 await transaction.delete(this.ctx.service.materialFile.tableName, { mid: id });
-                // 如果存在上一期,把上一期的quantity,pre_tp,is_summary添加到bill中
+                // 如果存在上一期,把上一期的quantity,m_tp,pre_tp,is_summary添加到bill中
                 const materialInfo = await this.getDataById(id);
                 if (materialInfo.order > 1) {
                     const sql = 'UPDATE ' + this.ctx.service.materialBills.tableName + ' as mb, ' +
                         this.ctx.service.materialBillsHistory.tableName + ' as mbh ' +
-                        'SET mb.`quantity` = mbh.`quantity`, mb.`pre_tp` = mbh.`pre_tp`, mb.`is_summary` = mbh.`is_summary` ' +
+                        'SET mb.`quantity` = mbh.`quantity`, mb.`m_tp` = mbh.`m_tp`, mb.`pre_tp` = mbh.`pre_tp`, mb.`is_summary` = mbh.`is_summary` ' +
                         'WHERE mbh.`tid` = ? AND mbh.`order` = ? AND mbh.`mb_id` = mb.`id`';
                     const sqlParam = [this.ctx.tender.id, materialInfo.order - 1];
                     await transaction.query(sql, sqlParam);