浏览代码

状态更新

laiguoran 2 年之前
父节点
当前提交
cdf7727e3f
共有 2 个文件被更改,包括 5 次插入7 次删除
  1. 2 2
      app/const/construction.js
  2. 3 5
      app/view/construction/info.ejs

+ 2 - 2
app/const/construction.js

@@ -20,12 +20,12 @@ const logJson = {
 };
 const status = {
     uncheck: 1, // 待提交
-    checking: 2, // 审签
+    checking: 2, // 审签
     checked: 3, // 已审签
 };
 const statusString = [];
 statusString[status.uncheck] = '待提交';
-statusString[status.checking] = '审签';
+statusString[status.checking] = '审签';
 statusString[status.checked] = '已审签';
 
 const statusClass = [];

+ 3 - 5
app/view/construction/info.ejs

@@ -5,14 +5,12 @@
                 <a href="/construction/<%- ctx.constructionTender.id %>/list" class="mr-2"><i class="fa fa-chevron-left mr-2"></i>
                     <span>返回</span></a><%- (ctx.constructionTender.name.length > 20 ? ctx.constructionTender.name.substring(0,20) + '...' : ctx.constructionTender.name) %> / <%- logInfo.code %></div>
             <div>
-                <span class="pull-right <%- constructionConst.statusClass[logInfo.status] %>"><%- constructionConst.statusString[logInfo.status] %></span>
                 <% if (ctx.session.sessionUser.accountId === logInfo.shenpi_uid && logInfo.status === constructionConst.status.checking) { %>
-                <span class=" pull-right mr-2">|</span>
                 <a href="javascript:void(0);" id="check-btn" class="btn btn-sm btn-success pull-right mr-2">确认审签</a>
-                <% } %>
-                <% if (ctx.session.sessionUser.accountId === logInfo.report_uid && logInfo.status === constructionConst.status.uncheck) { %>
-                <span class=" pull-right mr-2">|</span>
+                <% } else if (ctx.session.sessionUser.accountId === logInfo.report_uid && logInfo.status === constructionConst.status.uncheck) { %>
                 <a href="javascript:void(0);" id="start-btn" class="btn btn-sm btn-primary pull-right mr-2">提交审签</a>
+                <% } else { %>
+                <span class="pull-right <%- constructionConst.statusClass[logInfo.status] %>"><%- constructionConst.statusString[logInfo.status] %></span>
                 <% } %>
                 <!-- 提交审签后,可再次编辑,提供取消按钮 -->
                 <% if (logInfo.report_uid === ctx.session.sessionUser.accountId && logInfo.status === constructionConst.status.checking) { %>