소스 검색

1. 材差,全选
2. 报表,中间计量数据问题
3. 计量台账,删除项目节数量报错

MaiXinRong 3 년 전
부모
커밋
461f85f404
3개의 변경된 파일14개의 추가작업 그리고 3개의 파일을 삭제
  1. 8 1
      app/public/report/js/rpt_custom.js
  2. 2 2
      app/service/stage_bills_dgn.js
  3. 4 0
      app/view/report/rpt_all_popup.ejs

+ 8 - 1
app/public/report/js/rpt_custom.js

@@ -195,7 +195,7 @@ const rptCustomObj = (function () {
                     }
                 }
                 $('#change-select-result').html(selectHtml.join(''));
-            })
+            });
         },
 
         show: async function (title, resolve) {
@@ -392,6 +392,13 @@ const rptCustomObj = (function () {
             rptCustomObj.resetMaterialSumSelect(resolve);
             // $("#stage-select").modal('hide');
         });
+        $('#material-sum-select-all').unbind('click');
+        $('#material-sum-select-all').bind('click', function () {
+            const material = $('[name=material-sum-select-check]');
+            for (const m of material) {
+                m.checked = this.checked;
+            }
+        })
     };
     const init = function (cDefine, sfData, cSelect, rptName, resolve = null) {
         stageFlow = sfData;

+ 2 - 2
app/service/stage_bills_dgn.js

@@ -93,13 +93,13 @@ module.exports = app => {
             const transaction = await this.db.beginTransaction();
             try {
                 if (newDatas.length > 0) await transaction.insert(this.tableName, newDatas);
-                if (updateDatas.length > 0) await transaction.update(this.tableName, updateDatas);
+                if (updateDatas.length > 0) await transaction.updateRows(this.tableName, updateDatas);
                 await transaction.commit();
             } catch (err) {
                 await transaction.rollback();
                 throw err;
             }
-            await this.db.select(this.tableName, {where: { id: ids } });
+            return await this.db.select(this.tableName, {where: { id: ids } });
         }
 
         /**

+ 4 - 0
app/view/report/rpt_all_popup.ejs

@@ -466,6 +466,10 @@
                 <div class="alert alert-danger my-2 p-2" id="material-sum-select-hint">我是提示呀</div>
             </div>
             <div class="modal-footer">
+                <div class="form-check form-check-inline mr-auto">
+                    <input class="form-check-input" type="checkbox" id="material-sum-select-all">
+                    <label class="form-check-label" for="material-sum-select-all">全选</label>
+                </div>
                 <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
                 <button class="btn btn-sm btn-primary" id="material-sum-select-ok">确定</button>
             </div>