浏览代码

修复变更清单审批部位丢失bug

ellisran 1 年之前
父节点
当前提交
47f6b2d9f6
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      app/public/js/change_information_approval.js

+ 5 - 2
app/public/js/change_information_approval.js

@@ -24,7 +24,7 @@ $(document).ready(() => {
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 120, formatter: '@', readOnly: true},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', readOnly: true},
             {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, type: 'Number', getValue: 'getValue.unit_price', readOnly: true},
-            {title: '变更部位', colSpan: '1', rowSpan: '2', field: 'bwmx', hAlign: 0, width: 120, formatter: '@', readOnly: true},
+            {title: '变更部位', colSpan: '1', rowSpan: '2', field: 'bwmx', hAlign: 0, width: 120, formatter: '@', readOnly: true, getValue: 'getValue.bwmx'},
             {title: '变更详情', colSpan: '1', rowSpan: '2', field: 'detail', hAlign: 0, width: 120, formatter: '@', readOnly: true},
             {title: '计量上限(%)', colSpan: '1', rowSpan: '2', field: 'delimit', hAlign: 2, width: 60, formatter: '@', readOnly: true, visible: openChangeState},
             {title: '原设计|数量', colSpan: '2|1', rowSpan: '1|1', field: 'oamount', hAlign: 2, width: 60, type: 'Number', getValue: 'getValue.oamount', readOnly: true},
@@ -107,6 +107,9 @@ $(document).ready(() => {
                 return ZhCalc.add(ZhCalc.round(ZhCalc.mul(ZhCalc.round(data.unit_price, unitPriceUnit), ZhCalc.round(data.oamount, findDecimal(data.unit))), totalPriceUnit),
                     ZhCalc.round(ZhCalc.mul(ZhCalc.round(data.unit_price, unitPriceUnit), ZhCalc.round(data.spamount, findDecimal(data.unit))), totalPriceUnit));
             },
+            bwmx: function (data) {
+                return data.bwmx ? data.bwmx : (data.xmj_jldy ? data.xmj_jldy : '');
+            }
         },
     };
     const changeSpreadObj = {
@@ -247,7 +250,7 @@ $(document).ready(() => {
                     id: select.id,
                     spamount: select.spamount,
                 };
-                console.log(data);
+                console.log(data, select);
 
                 // 更新至服务器
                 postData(window.location.pathname + '/save', { type:'update', updateData: data }, function (result) {