Bladeren bron

子项目管理,反馈问题1

MaiXinRong 2 jaren geleden
bovenliggende
commit
ff05bd5403
3 gewijzigde bestanden met toevoegingen van 14 en 11 verwijderingen
  1. 8 8
      app/public/js/sub_project.js
  2. 4 1
      app/service/sub_project.js
  3. 2 2
      app/view/sub_proj/modal.ejs

+ 8 - 8
app/public/js/sub_project.js

@@ -29,6 +29,14 @@ $(document).ready(function() {
                     html.push('<a href="javascript: void(0)" name="name" id="' + node.id + '">', node.name, '</a>');
                 }
                 html.push('</td>');
+                // 创建时间
+                if (node.is_folder) {
+                    html.push(`<td class="text-center"></td>`);
+                    html.push(`<td class="text-center"></td>`);
+                } else {
+                    html.push(`<td class="text-center">${moment(node.create_time).format('YYYY-MM-DD')}</td>`);
+                    html.push(`<td class="text-center">${node.management || ''}<a class="ml-2" href="javascript: void(0)" name="set-management"><i class="fa fa-pencil-square-o "></i></a></td>`);
+                }
                 // 概预算标准
                 if (node.is_folder) {
                     html.push(`<td class="text-center"></td>`);
@@ -39,14 +47,6 @@ $(document).ready(function() {
                         html.push(`<td class="text-center"><button class="btn btn-outline-primary btn-sm ml-1" name="set-std">选择</button></td>`);
                     }
                 }
-                // 创建时间
-                if (node.is_folder) {
-                    html.push(`<td class="text-center"></td>`);
-                    html.push(`<td class="text-center"></td>`);
-                } else {
-                    html.push(`<td class="text-center">${moment(node.create_time).format('YYYY-MM-DD')}</td>`);
-                    html.push(`<td class="text-center">${node.management || ''}<a class="ml-2" href="javascript: void(0)" name="set-management"><i class="fa fa-pencil-square-o "></i></a></td>`);
-                }
                 // 操作
                 html.push(`<td>`);
                 html.push('<button class="btn btn-outline-primary btn-sm ml-1" name="edit">编辑</button>');

+ 4 - 1
app/service/sub_project.js

@@ -259,7 +259,7 @@ module.exports = app => {
             const users = await this.ctx.service.projectAccount.getAllDataByCondition({ where: { project_id: subProject.project_id, company: data.management }});
             const orgMember = await this.ctx.service.subProjPermission.getAllDataByCondition({ where: { spid: subProject.id } });
             const dm = [], um = [], im = [];
-            const filing_type = this.ctx.service.filing.allFilingType, file_permission = '1,2';
+            const filing_type = this.ctx.service.filing.allFilingType.join(','), file_permission = '1,2';
             for (const u of users) {
                 const nm = orgMember.find(x => { return u.id === x.uid; });
                 if (nm) {
@@ -273,7 +273,10 @@ module.exports = app => {
                 await conn.update(this.tableName, { id: subProject.id, management: data.management });
                 await this.ctx.service.filing.initFiling(subProject.id, conn);
                 if (dm.length > 0) await conn.delete(this.ctx.service.subProjPermission.tableName, { id: dm });
+                console.log(um);
+                console.log(1);
                 if (um.length > 0) await conn.updateRows(this.ctx.service.subProjPermission.tableName, um);
+                console.log(2);
                 if (im.length > 0) await conn.insert(this.ctx.service.subProjPermission.tableName, im);
 
                 await conn.commit();

+ 2 - 2
app/view/sub_proj/modal.ejs

@@ -160,7 +160,7 @@
                             <th rowspan="2">成员名称</th>
                             <th rowspan="2">角色/职位</th>
                             <th colspan="2">动态投资</th>
-                            <th colspan="3">电子档案</th>
+                            <th colspan="3">资料归集</th>
                             <th rowspan="2">关联标段</th>
                             <th rowspan="2">移除</th>
                         </tr>
@@ -169,7 +169,7 @@
                             <th>编辑</th>
                             <th>查看</th>
                             <th>导入</th>
-                            <th>编辑</th>
+                            <th>编辑分类</th>
                         </tr>
                         </thead>
                         <tbody id="member-list">