Browse Source

屏蔽最底层项目节,调用变更令

MaiXinRong 5 years ago
parent
commit
6a2f4f3078
3 changed files with 3 additions and 6 deletions
  1. 1 1
      app/public/js/stage.js
  2. 0 2
      app/service/stage_change.js
  3. 2 3
      app/service/stage_pos.js

+ 1 - 1
app/public/js/stage.js

@@ -448,7 +448,7 @@ $(document).ready(() => {
     col.hoverImg = '#ellipsis-icon';
     col.indent = 5;
     col.showImage = function (data) {
-        if (!data || (data.children && data.children.length > 0)) {
+        if (!data || (data.children && data.children.length > 0) || !(data.b_code && data.b_code !== '')) {
             return false;
         } else {
             const nodePos = stagePos.getLedgerPos(data.id);

+ 0 - 2
app/service/stage_change.js

@@ -152,7 +152,6 @@ module.exports = app => {
          * @returns {Promise<{}>}
          */
         async posChange(pos, changes) {
-            console.log(pos);
             const self = this;
             function getNewChange(cid, cbid, times, order, qty) {
                 return {
@@ -209,7 +208,6 @@ module.exports = app => {
                 for (const c of updateChanges) {
                     await transaction.update(this.tableName, c);
                 }
-                console.log(posQty);
                 await this.ctx.service.stagePos.updateChangeQuantity(transaction, pos, posQty);
                 await transaction.commit();
             } catch (err) {

+ 2 - 3
app/service/stage_pos.js

@@ -54,7 +54,7 @@ module.exports = app => {
          */
         async getLastestStageData(tid, sid, where) {
             const filterSql = this._getPosFilterSql(where);
-            const sql = 'SELECT Pos.lid, Pos.pid, Pos.contract_qty, Pos.qc_qty, Pos.postil, Pos.times, Pos.order FROM ' +
+            const sql = 'SELECT Pos.id, Pos.lid, Pos.pid, Pos.contract_qty, Pos.qc_qty, Pos.postil, Pos.times, Pos.order FROM ' +
                 '  (SELECT * FROM ' + this.tableName + ' WHERE tid = ? And sid = ?) As Pos ' +
                 '  INNER JOIN ( ' +
                 '    SELECT MAX(`times` * ' + timesLen + ' + `order`) As `flow`, `tid`, `sid`, `pid` From ' + this.tableName +
@@ -76,7 +76,7 @@ module.exports = app => {
          */
         async getAuditorStageData(tid, sid, times, order, where) {
             const filterSql = this._getPosFilterSql(where);
-            const sql = 'SELECT Pos.pid, Pos.lid, Pos.contract_qty, Pos.qc_qty, Pos.postil, Pos.times, Pos.order FROM ' +
+            const sql = 'SELECT Pos.id, Pos.pid, Pos.lid, Pos.contract_qty, Pos.qc_qty, Pos.postil, Pos.times, Pos.order FROM ' +
                 '  (SELECT * FROM '+ this.tableName + ' WHERE tid = ? And sid = ?) As Pos ' +
                 '  INNER JOIN ( ' +
                 '    SELECT MAX(`times` * ' + timesLen + ' + `order`) As `flow`, `pid`, `sid` From ' + this.tableName +
@@ -165,7 +165,6 @@ module.exports = app => {
          * @private
          */
         async _updateStagePosData(transaction, data) {
-            console.log(data);
             let bills, precision;
             const result = {ledger: [], pos: [], stageUpdate: true}, ledgerCalc = [];
             const datas = data instanceof Array ? data : [data];