Parcourir la source

项目列表,新增建设状态

MaiXinRong il y a 1 semaine
Parent
commit
b7d33f086c

+ 2 - 0
app/const/project_setting.js

@@ -61,6 +61,7 @@ const colSet = {
     projectList: [
         { field: 'name', name: '项目名称', fixed: ['show'] },
         { field: 'budget_std', name: '概预算标准', fixed: ['show'] },
+        { field: 'proj_status', name: '建设状态', fixed: [] },
         { field: 'tender_count', name: '标段个数', fixed: [] },
         { field: 'file_count', name: '文件个数', fixed: [] },
         { field: 'contract_count1', name: '合同个数', fixed: [] },
@@ -89,6 +90,7 @@ const defaultProjectColSet = {
     list: [
         { field: 'name', show: 1 },
         { field: 'budget_std', show: 1, alias: '' },
+        { field: 'proj_status', show: 0, alias: '' },
         { field: 'tender_count', show: 1, alias: '' },
         { field: 'file_count', show: 1, alias: '' },
         { field: 'contract_count1', show: 1, alias: '' },

+ 2 - 0
app/controller/sub_proj_controller.js

@@ -23,6 +23,8 @@ module.exports = app => {
                 p.contract_count = await this.ctx.service.contract.count({ spid: p.id });
                 p.contract_count1 = await this.ctx.service.contract.count({ spid: p.id, contract_type: 1 });
                 p.file_count = await this.ctx.service.file.count({ spid: p.id, is_deleted: 0 });
+                const info = await this.ctx.service.subProjInfo.getInfo(p.id);
+                p.proj_status = info.proj_status;
             }
         }
 

+ 9 - 0
app/public/js/sub_project.js

@@ -30,6 +30,7 @@ $(document).ready(function() {
                 html.push('<tr class="text-center">');
                 if (colSetCache.name.show) html.push('<th style="min-width: 300px">', colSetCache.name.alias, '</th>');
                 if (colSetCache.budget_std.show) html.push('<th width="8%">', colSetCache.budget_std.alias, '</th>');
+                if (colSetCache.proj_status.show) html.push('<th width="5%">', colSetCache.proj_status.alias || '-', '</th>');
                 if (colSetCache.tender_count.show) html.push('<th width="5%">', colSetCache.tender_count.alias, '</th>');
                 if (colSetCache.file_count.show) html.push('<th width="5%">', colSetCache.file_count.alias, '<i class="fa fa-question-circle text-primary" data-placement="bottom" data-toggle="tooltip" data-original-title="指资料归集的所有文件个数"></i>', '</th>');
                 if (colSetCache.contract_count1.show) html.push('<th width="5%">', colSetCache.contract_count1.alias, '<i class="fa fa-question-circle text-primary" data-placement="bottom" data-toggle="tooltip" data-original-title="项目支出合同个数"></i>', '</th>');
@@ -71,6 +72,14 @@ $(document).ready(function() {
                         }
                     }
                 }
+                // 建设状态
+                if (colSetCache.proj_status.show) {
+                    if (node.is_folder) {
+                        html.push(`<td class="text-center"></td>`);
+                    } else {
+                        html.push(`<td class="text-center">${node.proj_status}</td>`);
+                    }
+                }
                 // 创建时间
                 if (node.is_folder) {
                     if (colSetCache.tender_count.show) html.push(`<td class="text-center"></td>`);