| 
															
																@@ -994,12 +994,12 @@ module.exports = app => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         async getAccountCacheDatas(ids, defaultData) { 
															 | 
															
															 | 
															
																         async getAccountCacheDatas(ids, defaultData) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            const result  = await this.getAllDataByCondition({ 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            const result = await this.getAllDataByCondition({ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 where: { id: ids }, 
															 | 
															
															 | 
															
																                 where: { id: ids }, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                columns: ['name', 'company', 'role', 'mobile', 'telephone'] 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                columns: ['name', 'company', 'role', 'mobile', 'telephone'], 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             }); 
															 | 
															
															 | 
															
																             }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             const self = this; 
															 | 
															
															 | 
															
																             const self = this; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            return result.map(x => { return self._.assign(x, defaultData)}); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            return result.map(x => { return self._.assign(x, defaultData); }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         async getSelfCategoryLevel(id) { 
															 | 
															
															 | 
															
																         async getSelfCategoryLevel(id) { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1037,7 +1037,8 @@ module.exports = app => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         async getAllSubProjectAccount(subProject, columns) { 
															 | 
															
															 | 
															
																         async getAllSubProjectAccount(subProject, columns) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            const defaultColumns = ['id', 'name', 'company', 'role', 'enable', 'is_admin', 'account_group', 'mobile', 'company_id']; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            // const defaultColumns = ['id', 'name', 'company', 'role', 'enable', 'is_admin', 'account_group', 'mobile', 'company_id']; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            const defaultColumns = ['id', 'name', 'company', 'role', 'enable', 'is_admin', 'account_group', 'mobile', 'company_id', 'account', 'telephone', 'permission', 'sign_path', 'stamp_path']; // 新加的字段给报表用 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             const columnsSql = columns 
															 | 
															
															 | 
															
																             const columnsSql = columns 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 ? columns.map(x => { return 'pa.`' + x + '`'; }).join(', ') 
															 | 
															
															 | 
															
																                 ? columns.map(x => { return 'pa.`' + x + '`'; }).join(', ') 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 : defaultColumns.map(x => { return 'pa.`' + x + '`'; }).join(', '); 
															 | 
															
															 | 
															
																                 : defaultColumns.map(x => { return 'pa.`' + x + '`'; }).join(', '); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1056,7 +1057,7 @@ module.exports = app => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         for (const sf of searchField) { 
															 | 
															
															 | 
															
																                         for (const sf of searchField) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             innerFilter.push(`${f.tableName}.${sf} LIKE '%${f.filter[prop]}%'`); 
															 | 
															
															 | 
															
																                             innerFilter.push(`${f.tableName}.${sf} LIKE '%${f.filter[prop]}%'`); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         } 
															 | 
															
															 | 
															
																                         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        rstFilter.push('(' + innerFilter.join(' OR ') + ')') 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        rstFilter.push('(' + innerFilter.join(' OR ') + ')'); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } else { 
															 | 
															
															 | 
															
																                     } else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         rstFilter.push(this.db.format(`${f.tableName}.${prop} = ?`, [f.filter[prop]])); 
															 | 
															
															 | 
															
																                         rstFilter.push(this.db.format(`${f.tableName}.${prop} = ?`, [f.filter[prop]])); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } 
															 | 
															
															 | 
															
																                     } 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1066,8 +1067,8 @@ module.exports = app => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         async getSubProjectAccountCount(subProject, filter) { 
															 | 
															
															 | 
															
																         async getSubProjectAccountCount(subProject, filter) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            const filterInfo = [{ filter: {spid: subProject.id}, tableName: 'spp' }]; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            if (filter) filterInfo.push({ filter, tableName: 'pa'}); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            const filterInfo = [{ filter: { spid: subProject.id }, tableName: 'spp' }]; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (filter) filterInfo.push({ filter, tableName: 'pa' }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             const filterSql = this._getFilterSql(filterInfo); 
															 | 
															
															 | 
															
																             const filterSql = this._getFilterSql(filterInfo); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             const sql = `SELECT count(pa.id) as count FROM ${this.ctx.service.subProjPermission.tableName} spp LEFT JOIN ${this.tableName} pa ON spp.uid = pa.id WHERE ` + filterSql; 
															 | 
															
															 | 
															
																             const sql = `SELECT count(pa.id) as count FROM ${this.ctx.service.subProjPermission.tableName} spp LEFT JOIN ${this.tableName} pa ON spp.uid = pa.id WHERE ` + filterSql; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             const result = await this.db.queryOne(sql); 
															 | 
															
															 | 
															
																             const result = await this.db.queryOne(sql); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1075,8 +1076,8 @@ module.exports = app => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         async getSubProjecAllAccountListWithPermission(subProject, filter) { 
															 | 
															
															 | 
															
																         async getSubProjecAllAccountListWithPermission(subProject, filter) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            const filterInfo = [{ filter: {spid: subProject.id}, tableName: 'spp' }]; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            if (filter) filterInfo.push({ filter, tableName: 'pa'}); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            const filterInfo = [{ filter: { spid: subProject.id }, tableName: 'spp' }]; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (filter) filterInfo.push({ filter, tableName: 'pa' }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             const filterSql = this._getFilterSql(filterInfo); 
															 | 
															
															 | 
															
																             const filterSql = this._getFilterSql(filterInfo); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             const sql = `SELECT pa.*, spp.id AS permission_id,  
															 | 
															
															 | 
															
																             const sql = `SELECT pa.*, spp.id AS permission_id,  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     spp.file_permission, spp.budget_permission, spp.info_permission, spp.datacollect_permission, spp.fund_trans_permission, spp.fund_pay_permission, spp.contract_permission  
															 | 
															
															 | 
															
																                     spp.file_permission, spp.budget_permission, spp.info_permission, spp.datacollect_permission, spp.fund_trans_permission, spp.fund_pay_permission, spp.contract_permission  
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1086,8 +1087,8 @@ module.exports = app => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         async getSubProjectAccountListWithPermission(subProject, filter) { 
															 | 
															
															 | 
															
																         async getSubProjectAccountListWithPermission(subProject, filter) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            const filterInfo = [{ filter: {spid: subProject.id}, tableName: 'spp' }]; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            if (filter) filterInfo.push({ filter, tableName: 'pa'}); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            const filterInfo = [{ filter: { spid: subProject.id }, tableName: 'spp' }]; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (filter) filterInfo.push({ filter, tableName: 'pa' }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             const filterSql = this._getFilterSql(filterInfo); 
															 | 
															
															 | 
															
																             const filterSql = this._getFilterSql(filterInfo); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             const limit = this.ctx.pageSize ? this.ctx.pageSize : this.app.config.pageSize; 
															 | 
															
															 | 
															
																             const limit = this.ctx.pageSize ? this.ctx.pageSize : this.app.config.pageSize; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             const offset = limit * (this.ctx.page - 1); 
															 | 
															
															 | 
															
																             const offset = limit * (this.ctx.page - 1); 
															 |