Browse Source

数字类型 元保留,查看所有权限更新

laiguoran 2 years ago
parent
commit
f7ec5ea160
2 changed files with 4 additions and 6 deletions
  1. 1 6
      app/middleware/payment_detail_check.js
  2. 3 0
      app/public/js/payment_detail.js

+ 1 - 6
app/middleware/payment_detail_check.js

@@ -38,7 +38,6 @@ module.exports = options => {
             detail.auditors = yield this.service.paymentDetailAudit.getAuditors(detail.id, detail.times);
             detail.curAuditor = yield this.service.paymentDetailAudit.getCurAuditor(detail.id, detail.times);
             detail.rptAudits = yield this.service.paymentRptAudit.getListByDetail(detail.id);
-
             const accountId = this.session.sessionUser.accountId,
                 auditorIds = _.map(detail.auditors, 'aid'),
                 rptAuditIds = _.map(detail.rptAudits, 'uid');
@@ -60,7 +59,7 @@ module.exports = options => {
                 } else {
                     detail.curOrder = detail.curAuditor.order;
                 }
-            } else if (auditorIds.indexOf(accountId) !== -1) { // 审批人
+            } else if (auditorIds.indexOf(accountId) !== -1 || rptAuditIds.indexOf(accountId) !== -1 || this.payment.auditPermission.view_all) { // 审批人及签署人及查看所有权人
                 if (detail.status === status.uncheck) {
                     throw '您无权查看该数据';
                 }
@@ -76,10 +75,6 @@ module.exports = options => {
                 } else {
                     detail.curOrder = accountId === detail.curAuditor.aid ? detail.curAuditor.order : detail.curAuditor.order - 1;
                 }
-            } else if (rptAuditIds.indexOf(accountId) !== -1 || this.payment.auditPermission.view_all) {
-                if (detail.status === status.uncheck || detail.status === status.checkNo) {
-                    throw '您无权查看该数据';
-                }
             } else { // 其他不可见
                 throw '您无权查看该数据';
             }

+ 3 - 0
app/public/js/payment_detail.js

@@ -119,6 +119,9 @@ $(function () {
 
     let timer = null
     function checkAndUpdate(index, newVal, _self) {
+        if (tesRpttData.items[0].interact_cells[index].DataType === 'intact_type_number' && _.indexOf(tesRpttData.items[0].interact_cells[index].Value, '元') !== -1) {
+            newVal = newVal + '元';
+        }
         console.log(index, newVal);
         clearTimeout(timer);
         timer = setTimeout(() => {