瀏覽代碼

1. 台账修订,删除右键菜单,顺序重排子项调整
2. 台账审批,新增签约数据
3. 计量台账,新增签约数据

MaiXinRong 5 年之前
父節點
當前提交
ef9c498934
共有 4 個文件被更改,包括 19 次插入21 次删除
  1. 6 0
      app/const/spread.js
  2. 4 2
      app/controller/ledger_audit_controller.js
  3. 1 1
      app/controller/ledger_controller.js
  4. 8 18
      app/public/js/revise.js

+ 6 - 0
app/const/spread.js

@@ -106,6 +106,8 @@ const withClGcl = {
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@'},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 50, formatter: '@', cellType: 'unit'},
             {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, type: 'Number'},
+            {title: '签约|数量', colSpan: '2|1', rowSpan: '1|1', field: 'deal_qty', hAlign: 2, width: 60, type: 'Number'},
+            {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'deal_tp', hAlign: 2, width: 60, type: 'Number', readOnly: true},
             {title: '项目节数量|数量1',  colSpan: '2|1', rowSpan: '1|1', field: 'dgn_qty1', hAlign: 2, width: 60, type: 'Number'},
             {title: '|数量2',  colSpan: '|1', rowSpan: '|1', field: 'dgn_qty2', hAlign: 2, width: 60, type: 'Number'},
             {title: '经济指标',  colSpan: '1', rowSpan: '2', field: 'dgn_price', hAlign: 2, width: 60, type: 'Number', readOnly: true},
@@ -226,6 +228,8 @@ const stageCl = {
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@', readOnly: true},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', readOnly: true, cellType: 'unit'},
             {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
+            {title: '签约|数量', colSpan: '2|1', rowSpan: '1|1', field: 'deal_qty', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
+            {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'deal_tp', hAlign: 2, width: 60, type: 'Number', readOnly: true},
             {title: '台账|数量', colSpan: '2|1', rowSpan: '1|1', field: 'quantity', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
             {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
             {title: '本期合同计量|数量', colSpan: '2|1', rowSpan: '1|1', field: 'contract_qty', hAlign: 2, width: 60, type: 'Number'},
@@ -293,6 +297,8 @@ const stageNoCl = {
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@', readOnly: true},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', readOnly: true, cellType: 'unit'},
             {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
+            {title: '签约|数量', colSpan: '2|1', rowSpan: '1|1', field: 'deal_qty', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
+            {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'deal_tp', hAlign: 2, width: 60, type: 'Number', readOnly: true},
             {title: '台账|数量', colSpan: '2|1', rowSpan: '1|1', field: 'quantity', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
             {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
             {title: '本期合同计量|数量', colSpan: '2|1', rowSpan: '1|1', field: 'contract_qty', hAlign: 2, width: 60, type: 'Number'},

+ 4 - 2
app/controller/ledger_audit_controller.js

@@ -36,9 +36,11 @@ module.exports = app => {
                 });
             }
             const tender = this.ctx.tender;
-            const setting = tender.info.display.ledger.clQty ? spreadConst.withCl : spreadConst.withoutCl;
+            const setting = tender.data.measure_type === measureType.tz.value
+                ? (tender.info.display.ledger.clQty ? spreadConst.withCl : spreadConst.withoutCl)
+                : (tender.info.display.ledger.clQty ? spreadConst.withClGcl : spreadConst.withoutClGcl);
             const ledger = JSON.parse(JSON.stringify(setting.ledger));
-            const pos = JSON.parse(JSON.stringify(setting.pos));
+            const pos = setting.pos ? JSON.parse(JSON.stringify(setting.pos)) : spreadConst.blank;
             ledger.readOnly = true;
             pos.readOnly = true;
             if (tender.data.measure_type === measureType.tz.value) {

+ 1 - 1
app/controller/ledger_controller.js

@@ -86,7 +86,7 @@ module.exports = app => {
             // setColFormat(ledger.cols, 'dgn_price', upFormatter);
             // setColFormat(ledger.cols, 'total_price', tpFormatter);
             // setColFormat(ledger.cols, 'deal_tp', tpFormatter);
-            const pos = setting.pos ? JSON.parse(JSON.stringify(setting.pos)) : {};
+            const pos = setting.pos ? JSON.parse(JSON.stringify(setting.pos)) : spreadConst.blank;
 
             if (this._ledgerReadOnly(tender.data)) {
                 ledger.readOnly = true;

+ 8 - 18
app/public/js/revise.js

@@ -729,12 +729,14 @@ $(document).ready(() => {
                 if (!children || children.length === 0) return;
 
                 for (const [i, child] of children.entries()) {
-                    const code = parentCode + '-' + (i + 1);
-                    const cData = tree.getNodeKeyData(child);
-                    cData.code = code;
-                    data.push(cData);
-                    if (!tree.isLeafXmj(child)) {
-                        recursiveSortCode(data, code, child.children);
+                    if (!child.b_code || child.b_code === '') {
+                        const code = parentCode + '-' + (i + 1);
+                        const cData = tree.getNodeKeyData(child);
+                        cData.code = code;
+                        data.push(cData);
+                        if (!tree.isLeafXmj(child)) {
+                            recursiveSortCode(data, code, child.children);
+                        }
                     }
                 }
             };
@@ -955,18 +957,6 @@ $(document).ready(() => {
                     }
                 },
                 'sprBatch': '-----------',
-                'sortChildren': {
-                    name: '顺序重排子项编号',
-                    icon: 'fa-sort-numeric-asc',
-                    disabled: function (key, opt) {
-                        const node = SpreadJsObj.getSelectObject(billsSheet);
-                        return !node || !node.code || !node.children || node.children === 0;
-                    },
-                    callback: function (key, opt) {
-                        billsTreeSpreadObj.sortCode(billsSheet);
-                    }
-                },
-                'sprSort': '-----------',
                 'importGclBills2Xmj': {
                     name: '导入工程量清单至项目节',
                     icon: 'fa-file-excel-o',