Browse Source

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

TonyKang 3 years ago
parent
commit
3e1e20db0b
2 changed files with 3 additions and 1 deletions
  1. 2 0
      app/public/js/material.js
  2. 1 1
      app/service/stage_att.js

+ 2 - 0
app/public/js/material.js

@@ -764,6 +764,7 @@ $(document).ready(() => {
                     postData(window.location.pathname + '/month/save', { type:'updateOrigin', updateData: { mb_id: select.mb_id, value: validText } }, function (result) {
                         SpreadJsObj.reLoadRowData(info.sheet, info.row);
                         materialBillsData = result.materialBillsData;
+                        SpreadJsObj.loadSheetData(materialSpread.getActiveSheet(), SpreadJsObj.DataType.Data, materialBillsData);
                     }, function () {
                         select[col.field] = orgValue;
                         SpreadJsObj.reLoadRowData(info.sheet, info.row);
@@ -900,6 +901,7 @@ $(document).ready(() => {
                 SpreadJsObj.reLoadRowData(info.sheet, info.cellRange.row, info.cellRange.rowCount);
                 return;
             }
+            // console.log(data);
             if (pasteOrigin) {
                 // 更新至服务器
                 postData(window.location.pathname + '/month/save', { type:'pasteOrigin', updateData: data }, function (result) {

+ 1 - 1
app/service/stage_att.js

@@ -69,7 +69,7 @@ module.exports = app => {
                 ' pa.name as `username`, leg.name as `lname`, leg.code as `code`, leg.ledger_id as `ledger_id`, leg.b_code as `b_code`' +
                 ' FROM ?? AS att,?? AS pa,?? AS leg' +
                 ' WHERE leg.id = att.lid AND pa.id = att.uid AND att.tid = ? AND att.sid = ? ORDER BY att.id DESC';
-            const sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, this.ctx.service.ledger.tableName, tid, sid];
+            const sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, this.ctx.service.ledger.departTableName(tid), tid, sid];
             return await this.db.query(sql, sqlParam);
         }