浏览代码

工程量清单模式变更台账下可添加计量单元功能

ellisran 5 月之前
父节点
当前提交
d8aa16b686
共有 3 个文件被更改,包括 9 次插入9 次删除
  1. 1 1
      app/controller/change_controller.js
  2. 8 6
      app/public/js/change_revise.js
  3. 0 2
      app/view/change/revise.ejs

+ 1 - 1
app/controller/change_controller.js

@@ -1986,7 +1986,7 @@ module.exports = app => {
             }
         }
         async _updatePos(ctx, data) {
-            await this.checkMeasureType(measureType.tz.value);
+            // await this.checkMeasureType(measureType.tz.value);
             if (!data.posPostType) throw '数据错误';
             switch (data.posPostType) {
                 case 'add':

+ 8 - 6
app/public/js/change_revise.js

@@ -294,7 +294,7 @@ $(document).ready(() => {
         treeSetting.calcFields.push('deal_tp');
     }
     treeSetting.calcFun = function (node) {
-        if (node && node.b_code && isTz) {
+        if (node && node.b_code) {
             const posData = pos.getLedgerPos(node.id) || [];
             let camount = node.camount || 0;
             if (posData.length > 0) {
@@ -1053,8 +1053,10 @@ $(document).ready(() => {
                             colSetting.field === 'sjcl_qty' || colSetting.field === 'sjcl_tp' ||
                             colSetting.field === 'qtcl_qty' || colSetting.field === 'qtcl_tp' ||
                             colSetting.field === 'camount' || colSetting.field === 'ca_tp') {
-                            toastMessageUniq(hint.posQty);
-                            continue;
+                            if (isTz) {
+                                toastMessageUniq(hint.posQty);
+                                continue;
+                            }
                         }
                         if (value !== '' && invalidFields.posXmj.indexOf(colSetting.field) >= 0) {
                             toastMessageUniq(hint.posXmj);
@@ -1574,7 +1576,7 @@ $(document).ready(() => {
             }
         },
         reCalcCamount: function (node) {
-            if (node && node.b_code && isTz) {
+            if (node && node.b_code) {
                 const posData = pos.getLedgerPos(node.id) || [];
                 let camount = node.camount || 0;
                 if (posData.length > 0) {
@@ -2551,7 +2553,7 @@ $(document).ready(() => {
             }
 
             const orgText = posData ? posData[col.field] : null;
-            const newText = trimInvalidChar(info.editingText);
+            const newText = col.wordWrap ? info.editingText : trimInvalidChar(info.editingText);
             if (orgText === newText || ((!orgText || orgText === '') && (newText === ''))) return;
 
             if (!node) {
@@ -3031,7 +3033,7 @@ $(document).ready(() => {
         }
     };
     posSpread.bind(spreadNS.Events.SelectionChanged, posSpreadObj.selectionChanged);
-    if (!readOnly && isTz) {
+    if (!readOnly) {
         $('a[name="pos-opr"]').click(function () {
             posSpreadObj.baseOpr(posSheet, this.getAttribute('type'));
         });

+ 0 - 2
app/view/change/revise.ejs

@@ -65,7 +65,6 @@
                 <!--0号台账模式-->
                 <div class="sjs-height-1" style="overflow: hidden" id="bills-spread">
                 </div>
-                <% if (ctx.tender.data.measure_type === measureType.tz.value) { %>
                 <div class="bcontent-wrap">
                     <div id="revise-resize" class="resize-y" id="top-spr" r-Type="height" div1=".sjs-height-1" div2=".bcontent-wrap" title="调整大小"><!--调整上下高度条--></div>
                     <div class="bc-bar mb-1">
@@ -98,7 +97,6 @@
                     <div class="sp-wrap" id="pos-spread">
                     </div>
                 </div>
-                <% } %>
             </div>
             <!--右栏-->
             <div class="c-body" id="right-view" style="display: none; width: 33%;">