Browse Source

合同支付,本期实付,表达式输入框允许编辑

MaiXinRong 5 years ago
parent
commit
784531cc0b
2 changed files with 13 additions and 2 deletions
  1. 9 0
      app/public/js/ledger.js
  2. 4 2
      app/public/js/stage_pay.js

+ 9 - 0
app/public/js/ledger.js

@@ -942,6 +942,15 @@ $(document).ready(function() {
     sjsSettingObj.setFxTreeStyle(ledgerSpreadSetting, sjsSettingObj.FxTreeStyle.jz);
     if (thousandth) sjsSettingObj.setTpThousandthFormat(ledgerSpreadSetting);
     ledgerTreeCol.initSpreadSetting(ledgerSpreadSetting);
+    ledgerSpreadSetting.cols.push(
+        {title: 'ledger_id', colSpan: '1', rowSpan: '2', field: 'ledger_id', hAlign: 2, width: 60, type: 'Number', readOnly: true},
+        {title: 'ledger_pid', colSpan: '1', rowSpan: '2', field: 'ledger_pid', hAlign: 2, width: 60, type: 'Number', readOnly: true},
+        {title: 'level', colSpan: '1', rowSpan: '2', field: 'level', hAlign: 2, width: 60, type: 'Number', readOnly: true},
+        {title: 'order', colSpan: '1', rowSpan: '2', field: 'order', hAlign: 2, width: 60, type: 'Number', readOnly: true},
+        {title: 'is_leaf', colSpan: '1', rowSpan: '2', field: 'is_leaf', hAlign: 2, width: 60, type: 'Number', readOnly: true},
+        {title: 'full_path', colSpan: '1', rowSpan: '2', field: 'full_path', hAlign: 2, width: 60, type: 'Number', readOnly: true},
+        {title: 'node_type', colSpan: '1', rowSpan: '2', field: 'node_type', hAlign: 2, width: 60, type: 'Number', readOnly: true}
+    );
     SpreadJsObj.initSheet(ledgerSpread.getActiveSheet(), ledgerSpreadSetting);
     SpreadJsObj.selChangedRefreshBackColor(ledgerSpread.getActiveSheet());
     // 绑定事件

+ 4 - 2
app/public/js/stage_pay.js

@@ -511,7 +511,7 @@ $(document).ready(() => {
             if (data) {
                 if (col.field === 'tp') {
                     $('#expr').val(data.expr).attr('field', 'expr').attr('org', data.expr)
-                        .attr('readOnly', readOnly|| payBase.isSpecial(data));
+                        .attr('readOnly', readOnly|| (payBase.isYF(data) || payBase.isWC(data)));
                 } else if (col.field === 'sprice') {
                     $('#expr').val(data.sexpr).attr('field', 'sexpr').attr('org', data.sexpr)
                         .attr('readOnly', readOnly|| payCol.readOnly.sprice(data));
@@ -892,7 +892,9 @@ $(document).ready(() => {
             if (field === 'expr') {
                 data.type = 'stage';
                 data.updateData = { pid: select.pid, tp: null, expr: newValue };
-                const [valid, msg] = paySpreadObj._checkExpr(newValue, data.updateData);
+                const [valid, msg] = payBase.isSF(select)
+                    ? paySpreadObj._checkSfExpr(newValue, data.updateData)
+                    : paySpreadObj._checkExpr(newValue, data.updateData);
                 if (!valid) {
                     toastr.warning(msg);
                     this.value = select.expr;