浏览代码

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

TonyKang 4 年之前
父节点
当前提交
4bb722a4d1
共有 4 个文件被更改,包括 12 次插入2 次删除
  1. 2 0
      app/controller/report_controller.js
  2. 4 1
      app/public/js/change_detail.js
  3. 1 0
      app/view/change/info.ejs
  4. 5 1
      app/view/dashboard/index.ejs

+ 2 - 0
app/controller/report_controller.js

@@ -7,6 +7,7 @@
 const tenderMenu = require('../../config/menu').tenderMenu;
 const measureType = require('../const/tender').measureType;
 const auditConst = require('../const/audit');
+const shenpiConst = require('../const/shenpi');
 const accountGroup = require('../const/account_group').group;
 const JpcEx = require('../reports/rpt_component/jpc_ex');
 const JV = require('../reports/rpt_component/jpc_value_define');
@@ -212,6 +213,7 @@ module.exports = app => {
                     // pageShow: JSON.stringify(pageShow),
                     pageShow,
                     authMobile: accountInfo.auth_mobile,
+                    shenpiConst,
                 };
                 await this.layout('report/index.ejs', renderData, 'report/rpt_all_popup.ejs');
                 // await this.layout('report/index.ejs', renderData);

+ 4 - 1
app/public/js/change_detail.js

@@ -49,7 +49,7 @@ $(document).ready(() => {
             $('#bills').removeClass('first-bill-pane');
         }
     });
-
+    console.log(auditList)
     // 上传附件
     $('#upload-file-btn').click(function () {
         const files = $('#upload-file')[0].files;
@@ -74,6 +74,9 @@ $(document).ready(() => {
             formData.append('size', filesize);
             formData.append('file[]', file);
         }
+        if (auditList.findIndex(item => item.uid === accountId) === -1) {
+            return toastr.error('暂无权限上传!')
+        }
         postDataWithFile(window.location.pathname + '/file/upload', formData, function (data) {
             $('#addfujian').modal('hide');
             let html = '';

+ 1 - 0
app/view/change/info.ejs

@@ -746,6 +746,7 @@
     const ledgeStatus = '<%- tender.ledger_status %>';
     const ledgerConsts = JSON.parse('<%- JSON.stringify(ledgerConsts) %>');
     const auditStatus = '<%- auditStatus %>'
+    const auditList = JSON.parse('<%- JSON.stringify(auditList) %>');
     autoFlashHeight();
     $('a[href="#sub-ap"').click(function() {
         if (parseInt(ledgeStatus) === ledgerConsts.uncheck) {

+ 5 - 1
app/view/dashboard/index.ejs

@@ -68,7 +68,11 @@
                                                     <div class="col-3 ml-auto text-right pl-0"><a href="/tender/<%- revise.t_id %>/revise/info" class="btn btn-sm btn-outline-primary"><% if (revise.status === acRevise.status.checking) { %>审批<% } else if (revise.status === acRevise.status.checkNo) { %>重新上报<% } %></a></div>
                                                 </div>
                                                 <p class="mt-1 mb-0"><%- revise.audit_name %><small class="ml-1 text-muted"><%- (revise.audit_role ? '- ' + revise.audit_role: '') %></small>
-                                                    <span class="pull-right text-muted"><%- (revise.end_time ? ctx.moment(revise.end_time).format('YYYY-MM-DD HH:mm:ss') : '') %></span>
+                                                    <span class="pull-right text-muted"><%- (
+                                                        revise.status === acRevise.status.checking
+                                                                ? (revise.begin_time ? ctx.moment(revise.begin_time).format('YYYY-MM-DD HH:mm:ss') : '')
+                                                                : (revise.end_time ? ctx.moment(revise.end_time).format('YYYY-MM-DD HH:mm:ss') : '')
+                                                        ) %></span>
                                                 </p>
                                             </div>
                                         </li>