浏览代码

台账修订,批量插入清单-计量单元报错

MaiXinRong 5 年之前
父节点
当前提交
32d10a559b
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 2 2
      app/public/js/revise.js
  2. 4 4
      app/service/revise_bills.js

+ 2 - 2
app/public/js/revise.js

@@ -1533,8 +1533,8 @@ $(document).ready(() => {
                     postData(window.location.pathname + '/update', {postType: 'batch-insert', postData: insertData}, function (data) {
                         pos.updateDatas(data.pos);
                         const result = billsTree.loadPostData(data.ledger);
-                        billsTreeSpreadObj.refreshTree(sheet, result);
-                        billsTreeSpreadObj.refreshOperationValid(sheet, selection);
+                        billsTreeSpreadObj.refreshTree(billsSheet, result);
+                        billsTreeSpreadObj.refreshOperationValid(billsSheet, selection);
                         self.obj.modal('hide');
                     }, null, true);
                 }

+ 4 - 4
app/service/revise_bills.js

@@ -59,7 +59,7 @@ module.exports = app => {
             const result = { ledger: {}, pos: null };
             if (!tid || !rid || !lid) return result;
 
-            const select = await this.getDataByLid(tid, lid);
+            const select = await this.getDataByKid(tid, lid);
             if (!select) {
                 throw '位置数据错误';
             }
@@ -136,7 +136,7 @@ module.exports = app => {
             // 查询应返回的结果
             result.ledger.create = await this.getDataById(newIds);
             if (!lastChild) {
-                result.ledger.update = await this.getDataByLid(select.id);
+                result.ledger.update = await this.getDataByKid(select.id);
             }
             result.pos = await this.ctx.service.revisePos.getDataByLid(tid, newIds);
             return result;
@@ -154,11 +154,11 @@ module.exports = app => {
             const result = { ledger: {}, pos: null };
             if (!tid || !rid || !lid) return result;
 
-            const select = await this.getDataByLid(tid, lid);
+            const select = await this.getDataByKid(tid, lid);
             if (!select) {
                 throw '位置数据错误';
             }
-            const parentData = await this.getDataByLid(tid, select.ledger_pid);
+            const parentData = await this.getDataByKid(tid, select.ledger_pid);
             if (!parentData) {
                 throw '位置数据错误';
             }