瀏覽代碼

1. 清单汇总页面,写入spreadjs授权码
2. 本期计量台账,部位明细计量bug

MaiXinRong 6 年之前
父節點
當前提交
e0153ef0d5
共有 4 個文件被更改,包括 8 次插入5 次删除
  1. 3 1
      app/public/js/gcl_gather.js
  2. 1 1
      app/public/js/stage.js
  3. 1 3
      app/service/stage_bills.js
  4. 3 0
      app/view/stage/gather.ejs

+ 3 - 1
app/public/js/gcl_gather.js

@@ -68,7 +68,9 @@ const gclGatherModel = (function () {
         // 加载树结构数据
         gsTree.loadDatas(ledger);
         // 加载本期计量数据
-        gsTree.loadCurStageData(curStage);
+        if (curStage) {
+            gsTree.loadCurStageData(curStage);
+        }
         // todo 加载截止上期计量数据
         // todo 加载变更令数据
         // 根据设置 计算 台账树结构

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

@@ -283,7 +283,7 @@ $(document).ready(() => {
                     toast('父节点不可插入部位明细', 'error');
                     info.cancel = true;
                     return;
-                } else if (info.editingText !== '' && node.code || node.code !== '') {
+                } else if (info.editingText !== '' && !node.b_code || node.b_code === '') {
                     toast('项目节不可插入部位明细', 'error');
                     info.cancel = true;
                     return;

+ 1 - 3
app/service/stage_bills.js

@@ -94,7 +94,7 @@ module.exports = app => {
                 said: this.ctx.session.sessionUser.accountId,
             };
 
-            const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, updateNode.unit);
+            const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, ledgerData.unit);
             if (insertData.contract_qty) {
                 d.contract_qty = this.round(insertData.contract_qty, precision.value);
                 d.contract_tp = d.contract_qty * ledgerData.unit_price;
@@ -116,7 +116,6 @@ module.exports = app => {
          */
         async updateStageData(data) {
             const datas = data instanceof Array ? data : [data];
-            console.log(datas);
             const transaction = await this.db.beginTransaction();
             try {
                 for (const d of datas) {
@@ -131,7 +130,6 @@ module.exports = app => {
                         d.qc_qty = this.round(d.qc_qty, precision.value);
                         d.qc_tp = d.qc_qty * ledgerBills.unit_price;
                     }
-                    console.log(d);
                     if (!stageBills) {
                         d.tid = this.ctx.tender.id;
                         d.sid = this.ctx.stage.id;

+ 3 - 0
app/view/stage/gather.ejs

@@ -74,6 +74,9 @@
     </div>
 </div>
 <script>
+    GC.Spread.Sheets.LicenseKey = "559432293813965#A0y3iTOzEDOzkjMyMDN9UTNiojIklkI1pjIEJCLi4TPB9mM5AFNTd4cvZ7SaJUVy3CWKtWYXx4VVhjMpp7dYNGdx2ia9sEVlZGOTh7NRlTUwkWR9wEV4gmbjBDZ4ElR8N7cGdHVvEWVBtCOwIGW0ZmeYVWVr3mI0IyUiwCMzETN8kzNzYTM0IicfJye&Qf35VfiEzRwEkI0IyQiwiIwEjL6ByUKBCZhVmcwNlI0IiTis7W0ICZyBlIsIyNyMzM5ADI5ADNwcTMwIjI0ICdyNkIsIibj9SbvNmL4N7bjRnch56ciojIz5GRiwiI8+Y9sWY9QmZ0Jyp96uL9v6L0wap9biY9qiq95q197Wr9g+89iojIh94Wiqi";
+</script>
+<script>
     const gclSpreadSetting = JSON.parse('<%- JSON.stringify(gclSpread) %>');
     const leafXmjSpreadSetting = JSON.parse('<%- JSON.stringify(leafXmjSpread) %>');
     const ledger = JSON.parse('<%- JSON.stringify(ledger) %>');