瀏覽代碼

头修改及提示更改

laiguoran 2 年之前
父節點
當前提交
4dc3ddcc5b

+ 7 - 1
app/controller/payment_controller.js

@@ -510,6 +510,9 @@ module.exports = app => {
                 const rptProject = await ctx.service.rptTreeNode.getDataByCondition({ pid: ctx.session.sessionProject.id, name: '01.支付审批报表' });
                 const rptProjectList = rptProject && rptProject.items ? JSON.parse(rptProject.items) : [];
                 const tenderRptList = await ctx.service.paymentTenderRpt.getProcessList(ctx.tender.id);
+                if (tenderRptList === -1) {
+                    throw '未配置审批模块,请联系管理员处理';
+                }
                 return await ctx.service.paymentTenderRpt.checkAndUpdateList(tenderRptList, rptProjectList, formProcess);
             }
             return await ctx.service.paymentTenderRpt.getList(ctx.tender.id, ctx.session.sessionUser.accountId);
@@ -597,8 +600,11 @@ module.exports = app => {
         async rptList(ctx) {
             try {
                 const tenderRptList = await this._returnRptProjectList(ctx);
+                if (tenderRptList === -1) {
+                    throw '未配置审批模块,请联系管理员处理';
+                }
                 if (tenderRptList.length === 0) {
-                    throw '当前报表表单您无权打开或还没进行模块或表单审批设置';
+                    throw '未配置表单设置,请联系管理员处理';
                 }
                 for (const tr of tenderRptList) {
                     tr.have_notice = await ctx.service.paymentDetail.haveNotice2TenderRpt(tr.id, ctx.session.sessionUser.accountId);

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

@@ -113,7 +113,7 @@ $(function () {
             html.push('<th class="text-center" style="width: 40%">', '名称', '</th>');
             html.push('<th class="text-center" style="width: 15%">', '创建人', '</th>');
             html.push('<th class="text-center" style="width: 15%">', '创建时间', '</th>');
-            html.push('<th class="text-center" style="width: 15%">', '审批流程', '</th>');
+            html.push('<th class="text-center" style="width: 15%">', '标段设置', '</th>');
             html.push('<th class="text-center" style="width: 15%">', '操作', '</th>');
             html.push('</tr>', '</thead>');
             parentId = 0;

+ 2 - 2
app/service/payment_tender_rpt.js

@@ -25,7 +25,7 @@ module.exports = app => {
                 }
             }
             if (typeValues.length === 0) {
-                return [];
+                return -1;
             }
             const sql = 'SELECT * FROM ?? WHERE `tender_id` = ? AND `type` IN (' + this.ctx.helper.getInArrStrSqlFilter(typeValues) + ')' +
                 ' AND (`id` in (SELECT pda.`tr_id` FROM ?? as pda LEFT JOIN ?? as pd ON pda.`tr_id` = pd.`tr_id` WHERE pd.`status` != ' + auditConst.status.uncheck + ' AND pda.`aid` = ?)' +
@@ -44,7 +44,7 @@ module.exports = app => {
                 }
             }
             if (typeValues.length === 0) {
-                return [];
+                return -1;
             }
             const sql = 'SELECT ptr.*, pa.name as user_name FROM ?? as ptr LEFT JOIN ?? as pa ON ptr.`uid` = pa.`id` WHERE ptr.`tender_id` = ?  AND ptr.`type` IN (' + this.ctx.helper.getInArrStrSqlFilter(typeValues) + ')';
             const params = [this.tableName, this.ctx.service.projectAccount.tableName, id];

+ 1 - 1
app/view/payment/process.ejs

@@ -1,7 +1,7 @@
 <div class="panel-content">
     <div class="panel-title fluid">
         <div class="title-main  d-flex justify-content-between">
-            <div>支付审批/审批流程</div>
+            <div><a href="/payment"><i class="fa fa-chevron-left mr-2"></i></a><%- ctx.tender.name %> / 标段设置</div>
         </div>
     </div>
     <div class="content-wrap">