فهرست منبع

错漏增减相关问题

MaiXinRong 5 سال پیش
والد
کامیت
c5ce20cabf
3فایلهای تغییر یافته به همراه13 افزوده شده و 5 حذف شده
  1. 1 1
      app/const/spread.js
  2. 11 3
      app/public/js/ledger.js
  3. 1 1
      app/service/pos.js

+ 1 - 1
app/const/spread.js

@@ -250,7 +250,7 @@ const stageNoCl = {
         cols: [
             {title: '部位名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 180, formatter: '@'},
             {title: '复核数量', colSpan: '1', rowSpan: '2', field: 'sgfh_qty', hAlign: 2, width: 60, type: 'Number'},
-            {title: '本期计量|合同', colSpan: '3|1', rowSpan: '1|1', field: 'sgfh_tp', hAlign: 2, width: 60, type: 'Number'},
+            {title: '本期计量|合同', colSpan: '3|1', rowSpan: '1|1', field: 'contract_qty', hAlign: 2, width: 60, type: 'Number'},
             {title: '|数量变更', colSpan: '|1', rowSpan: '|1', field: 'qc_qty', hAlign: 2, width: 80, type: 'Number'},
             {title: '|完成', colSpan: '|1', rowSpan: '|1', field: 'gather_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
             {title: '截止本期计量|合同', colSpan: '3|1', rowSpan: '1|1', field: 'end_contract_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},

+ 11 - 3
app/public/js/ledger.js

@@ -854,6 +854,7 @@ $(document).ready(function() {
                 const datas = [], posSelects = [];
                 const sel = sheet.getSelections()[0];
                 for (let iRow = sel.row; iRow < sel.row + sel.rowCount; iRow++) {
+                    let bDel = false;
                     const node = sortData[iRow];
                     if (node) {
                         const data = {id: node.id};
@@ -863,10 +864,17 @@ $(document).ready(function() {
                                 toast('部位名称不能为空', 'error');
                                 return;
                             }
-                            data[colSetting.field] = null;
+                            const style = sheet.getStyle(iRow, iCol);
+                            if (!style.locked) {
+                                const colSetting = sheet.zh_setting.cols[iCol];
+                                data[colSetting.field] = null;
+                                bDel = true;
+                            }
+                        }
+                        if (bDel) {
+                            datas.push(data);
+                            posSelects.push(node);
                         }
-                        datas.push(data);
-                        posSelects.push(node);
                     }
                 }
                 if (datas.length > 0) {

+ 1 - 1
app/service/pos.js

@@ -93,7 +93,7 @@ module.exports = app => {
                             } else if (op) {
                                 d.sjcl_qty = op.sjcl_qty;
                             }
-                            if (d.qtcl_qty) {
+                            if (d.qtcl_qty !== undefined) {
                                 d.qtcl_qty = this.round(d.qtcl_qty, precision.value);
                             } else if (op) {
                                 d.qtcl_qty = op.qtcl_qty;