Browse Source

1. 审核比较,显示新增流程,重新审批
2. 合同支付,表达式,过滤前后空格

MaiXinRong 5 years ago
parent
commit
6af24b8d73

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

@@ -23,7 +23,7 @@ const invalidFields = {
     posCalc: ['sgfh_qty', 'sgfh_tp', 'sjcl_qty', 'sjcl_tp', 'qtcl_qty', 'qtcl_tp'],
 };
 function transExpr(expr) {
-    return expr.replace('=', '').replace('%', '/100');
+    return $.trim(expr).replace('\t', '').replace('=', '').replace('%', '/100');
 }
 
 $(document).ready(function() {

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

@@ -10,7 +10,7 @@
 
 const ckBillsSpread = window.location.pathname + '-billsSelect';
 function transExpr(expr) {
-    return expr.replace('=', '').replace('%', '/100');
+    return $.trim(expr).replace('\t', '').replace('=', '').replace('%', '/100');
 }
 
 $(document).ready(() => {

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

@@ -13,7 +13,7 @@ function checkTzMeasureType () {
 }
 
 function transExpr(expr) {
-    return expr.replace('=', '').replace('%', '/100');
+    return $.trim(expr).replace('\t', '').replace('=', '').replace('%', '/100');
 }
 
 /**

+ 3 - 3
app/public/js/stage_pay.js

@@ -397,7 +397,7 @@ $(document).ready(() => {
 
             const num = text ? _.toNumber(text) : null;
             let expr = text ? (num ? null : text) : null;
-            expr = expr ? expr.replace('=', '').toLowerCase(): null;
+            expr = expr ? $.trim(expr).replace('\t', '').replace('=', '').toLowerCase(): null;
             const [valid, msg] = this._checkExprValid(expr, ['bqwc', 'ybbqwc']);
             if (!valid) return [valid, msg];
 
@@ -423,7 +423,7 @@ $(document).ready(() => {
 
             const num = text ? _.toNumber(text) : null;
             let expr = text ? (num ? null : text) : null;
-            expr = expr ? expr.replace('=', '').toLowerCase(): null;
+            expr = expr ? $.trim(expr).replace('\t', '').replace('=', '').toLowerCase(): null;
             const [valid, msg] = this._checkExprValid(expr, ['bqwc', 'ybbqwc']);
             if (!valid) return [valid, msg];
 
@@ -447,7 +447,7 @@ $(document).ready(() => {
                     data.tp = num;
                     data.expr = null;
                 } else {
-                    const expr = text.replace('=', '').toLowerCase();
+                    const expr = $.trim(text).replace('\t', '').replace('=', '').toLowerCase();
                     const [valid, msg] = this._checkExprValid(expr);
                     if (!valid) return [valid, msg];
                     data.expr = expr;

+ 1 - 1
app/view/stage/compare_modal.ejs

@@ -10,7 +10,7 @@
                 <table class="table table-sm">
                     <tr><th>审批人</th><th width="90">选择</th><th></th></tr>
                     <% for (const [i, a] of ctx.stage.auditors.entries()) { %>
-                    <% if (a.status === auditConst.status.checked || a.status === auditConst.status.checkNoPre ||
+                    <% if (a.status === auditConst.status.checked || a.status === auditConst.status.checkNoPre || a.status === auditConst.status.checkAgain ||
                             (a.status === auditConst.status.checking && a.aid === ctx.session.sessionUser.accountId)) { %>
                     <tr auditorId="<%- a.aid %>">
                         <td><%- a.name %></td>