Explorar el Código

计量进度,改版

MaiXinRong hace 4 años
padre
commit
b804b2554e
Se han modificado 2 ficheros con 23 adiciones y 17 borrados
  1. 22 16
      app/public/js/tender_list_progress.js
  2. 1 1
      config/web.js

+ 22 - 16
app/public/js/tender_list_progress.js

@@ -308,7 +308,7 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     const html = [];
     html.push('<tr pid="' + pid + '">');
     // 名称
-    html.push('<td width="30%" class="in-' + node.level + '">');
+    html.push('<td width="25%" class="in-' + node.level + '">');
     if (node.cid) {
         html.push('<span onselectstart="return false" style="{-moz-user-select:none}" class="fold-switch mr-1" title="收起" cid="'+ node.sort_id +'"><i class="fa fa-minus-square-o"></i></span> <i class="fa fa-folder-o"></i> ', node.name);
     } else {
@@ -319,21 +319,26 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
         html.push('<a href="javascript: void(0)" id="' + node.id + '">', node.name, '</a>');
     }
     html.push('</td>');
-    // 计量期数
-    html.push('<td width="120" class="text-center">');
-    if (!node.cid) {
-        html.push(node.lastStage ? '第' + node.lastStage.order + '期' : '台账');
+    // 计量进度
+    html.push('<td style="width: 10%">');
+    if (!node.cid && node.cur_flow) {
+        html.push(node.cur_flow.title + ' (' + '<span class="' + node.cur_flow.status_class +'">' + node.cur_flow.status + '</span>' + ')');
     }
     html.push('</td>');
-
-    // 审批状态
+    // 当前流程
     html.push('<td style="width: 10%">');
-    html.push(node.lastStage ? auditConst.stage.statusString[node.lastStage.status] : auditConst.ledger.statusString[node.ledger_status]);
-    html.push(node.status_users ? '(' + node.status_users + ')' : '');
+    if (!node.cid && node.cur_flow) {
+        html.push(node.cur_flow.name + ' ' + '<span class="' + node.cur_flow.status_class +'">' + node.cur_flow.status + '</span>');
+    }
     html.push('</td>');
-
-    // 累计合同计量
-    html.push('<td width="15%" class="text-right">');
+    // 上一流程审批时间
+    html.push('<td style="width: 10%">');
+    if (!node.cid && node.pre_flow) {
+        html.push(node.pre_flow.name + ' ' + moment(node.pre_flow.time).format('YYYY-MM-DD'));
+    }
+    html.push('</td>');
+    // 总价
+    html.push('<td width="10%" class="text-right">');
     const sum = node.lastStage ? ZhCalc.add(node.total_price, node.lastStage.end_qc_tp) : node.total_price;
     html.push(node.sum_tp ? node.sum_tp : '');
     html.push('</td>');
@@ -359,11 +364,12 @@ function getTenderTreeHtml () {
         const html = [];
         html.push('<table class="table table-hover table-bordered">');
         html.push('<thead style="position: fixed;left:56px;top: 34px;">', '<tr>');
-        html.push('<th style="width: 30%" class="text-center">', '标段名称', '</th>');
-        html.push('<th style="width: 10%" class="text-center">', '计量期数', '</th>');
-        html.push('<th style="width: 10%" class="text-center">','审批状态','</th>');
+        html.push('<th style="width: 25%" class="text-center">', '标段名称', '</th>');
+        html.push('<th class="text-center" style="width: 10%">', '计量进度', '</th>');
+        html.push('<th class="text-center" style="width: 10%">', '当前流程', '</th>');
+        html.push('<th class="text-center" style="width: 10%">', '上一流程审批时间', '</th>');
         html.push('<th style="width: 10%" class="text-center">', '总价 <i class="fa fa-question-circle text-primary"  data-placement="bottom" data-toggle="tooltip" data-original-title="0号台账+截止本期数量变更"></i>', '</th>');
-        html.push('<th style="width: 40%" class="text-center">', '截止上期完成/本期完成/未完成', '</th>');
+        html.push('<th style="width: 35%" class="text-center">', '截止上期完成/本期完成/未完成', '</th>');
         html.push('</tr>', '</thead>');
         parentId = 0;
         for (const t of tenderTree) {

+ 1 - 1
config/web.js

@@ -76,7 +76,7 @@ const JsFiles = {
                 mergeFile: 'tender_list_info',
             },
             progress: {
-                files: ['/public/js/ztree/jquery.ztree.core.js', '/public/js/ztree/jquery.ztree.exedit.js', '/public/js/decimal.min.js'],
+                files: ['/public/js/ztree/jquery.ztree.core.js', '/public/js/ztree/jquery.ztree.exedit.js', '/public/js/decimal.min.js', '/public/js/moment/moment.min.js'],
                 mergeFiles: [
                     '/public/js/zh_calc.js',
                     '/public/js/PinYinOrder.bundle.js',