浏览代码

1. 清单汇总,超计比例在localstorage中记录
2. 部位明细,工程量清单模式,计量时添加部位明细报错

MaiXinRong 6 年之前
父节点
当前提交
84d0bd7c5c
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 5 0
      app/public/js/stage_gather.js
  2. 1 1
      app/service/stage_pos.js

+ 5 - 0
app/public/js/stage_gather.js

@@ -9,6 +9,10 @@
  */
 
 $(document).ready(function () {
+    let per = _.toNumber(getLocalCache('StageGatherOverPercent'));
+    if (per && !_.isNaN(per)) {
+        $('#over-percent').val(per >= 50 ? (per <= 100 ? per : 100) : 50);
+    }
     autoFlashHeight();
     // 初始化工程量清单
     const gclSpread = SpreadJsObj.createNewSpread($('#gcl-spread')[0]);
@@ -75,6 +79,7 @@ $(document).ready(function () {
         $('.dropdown-menu').click();
     });
     $('#over-percent').change(function () {
+        setLocalCache('StageGatherOverPercent', this.value);
         checkOverRange();
     });
 });

+ 1 - 1
app/service/stage_pos.js

@@ -153,7 +153,7 @@ module.exports = app => {
                 }
                 // 在主表pos中新增数据
                 const p = {
-                    tid: this.ctx.tender.id, lid: d.lid, name: d.name,
+                    id: this.uuid.v4(), tid: this.ctx.tender.id, lid: d.lid, name: d.name,
                     add_stage: this.ctx.stage.id,
                     add_times: this.ctx.stage.curTimes,
                     add_user: this.ctx.session.sessionUser.accountId,