Browse Source

方案计算式填写补齐

laiguoran 3 years ago
parent
commit
0495012e4a
3 changed files with 7 additions and 0 deletions
  1. 1 0
      app/service/change.js
  2. 4 0
      app/view/change/plan_information.ejs
  3. 2 0
      sql/update.sql

+ 1 - 0
app/service/change.js

@@ -124,6 +124,7 @@ module.exports = app => {
                         let content = planInfo.reason ? planInfo.reason.replace(/[\r\n]/g, '\r\n') : '';
                         content = content + (planInfo.content ? (planInfo.reason ? '\r\n' : '') + planInfo.content.replace(/[\r\n]/g, '\r\n') : '');
                         change.content = content ? content : null;
+                        change.expr = planInfo.expr;
                     }
                 }
                 const operate = await this.transaction.insert(this.tableName, change);

+ 4 - 0
app/view/change/plan_information.ejs

@@ -107,6 +107,10 @@
                                 <th width="" class="text-center" style="vertical-align: middle">方案描述</th>
                                 <td colspan="3"><textarea class="form-control form-control-sm" data-name="memo" <% if (change.readOnly) { %>readonly<% } %> rows="3"><%- change.memo %></textarea></td>
                             </tr>
+                            <tr>
+                                <th width="" class="text-center" style="vertical-align: middle">工程量数量计算式</th>
+                                <td colspan="3"><textarea class="form-control form-control-sm" data-name="expr" <% if (change.readOnly) { %>readonly<% } %> rows="3"><%- change.expr %></textarea></td>
+                            </tr>
                         </table>
                         <h5 id="qingdan" class="d-inline-block">变更清单</h5>
                         <% if (change.status === auditConst.status.checked) { %>

+ 2 - 0
sql/update.sql

@@ -1 +1,3 @@
 ALTER TABLE `zh_material` ADD `is_new` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '是否是新建的调差,用于区分清单新建规则' AFTER `in_time`;
+
+ALTER TABLE `zh_change_plan` ADD `expr` TEXT NULL DEFAULT NULL COMMENT '工程量数量计算式' AFTER `memo`;