Commit 07dcd0f411fffb28a9a183632444095a475f4ed9
Merge branch 'minhang' of 192.168.168.201:panzhaov5/bsth_control into minhang
Showing
9 changed files
with
105 additions
and
61 deletions
src/main/java/com/bsth/repository/schedule/SchedulePlanInfoRepository.java
| ... | ... | @@ -43,7 +43,7 @@ public interface SchedulePlanInfoRepository extends BaseRepository<SchedulePlanI |
| 43 | 43 | "group_concat(distinct info.s_name) spyName, " + |
| 44 | 44 | "group_concat(info.fcno) fcno, " + |
| 45 | 45 | "max(info.update_date) as updateDate, " + |
| 46 | - "max(user.name) as updateUserName, " + | |
| 46 | + "max(user.user_name) as updateUserName, " + | |
| 47 | 47 | "max(info.tt_info_name) as ttInfoName " + |
| 48 | 48 | "from bsth_c_s_sp_info info left join bsth_c_sys_user user on info.update_by = user.id " + |
| 49 | 49 | "where info.xl = ?1 and " + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html
| ... | ... | @@ -55,17 +55,22 @@ |
| 55 | 55 | </div> |
| 56 | 56 | </div> |
| 57 | 57 | |
| 58 | - <!-- TODO --> | |
| 59 | 58 | <div class="form-group"> |
| 60 | 59 | <label class="col-md-2 control-label">分公司:</label> |
| 61 | 60 | <div class="col-md-3"> |
| 62 | - <select name="brancheCompanyCode" class="form-control"> | |
| 63 | - <option value="">请选择...</option> | |
| 64 | - <option value="1">分公司1</option> | |
| 65 | - <option value="2">分公司1</option> | |
| 66 | - <option value="3">分公司1</option> | |
| 67 | - <option value="4">分公司1</option> | |
| 68 | - </select> | |
| 61 | + <sa-Select5 name="fgs" | |
| 62 | + model="ctrl.employeeInfoForSave" | |
| 63 | + cmaps="{'brancheCompanyCode': 'businessCode', 'brancheCompany': 'businessName'}" | |
| 64 | + dcname="brancheCompanyCode" | |
| 65 | + icname="businessCode" | |
| 66 | + dsparams="{{ {type: 'ajax', param:{'upCode_eq': ctrl.employeeInfoForSave.companyCode }, atype:'gs' } | json }}" | |
| 67 | + iterobjname="item" | |
| 68 | + iterobjexp="item.businessName" | |
| 69 | + searchph="请选择所属分公司..." | |
| 70 | + searchexp="this.businessName" | |
| 71 | + > | |
| 72 | + </sa-Select5> | |
| 73 | + | |
| 69 | 74 | </div> |
| 70 | 75 | </div> |
| 71 | 76 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html
| ... | ... | @@ -55,17 +55,22 @@ |
| 55 | 55 | </div> |
| 56 | 56 | </div> |
| 57 | 57 | |
| 58 | - <!-- TODO --> | |
| 59 | 58 | <div class="form-group"> |
| 60 | 59 | <label class="col-md-2 control-label">分公司:</label> |
| 61 | 60 | <div class="col-md-3"> |
| 62 | - <select name="brancheCompanyCode" class="form-control"> | |
| 63 | - <option value="">请选择...</option> | |
| 64 | - <option value="1">分公司1</option> | |
| 65 | - <option value="2">分公司1</option> | |
| 66 | - <option value="3">分公司1</option> | |
| 67 | - <option value="4">分公司1</option> | |
| 68 | - </select> | |
| 61 | + <sa-Select5 name="fgs" | |
| 62 | + model="ctrl.employeeInfoForSave" | |
| 63 | + cmaps="{'brancheCompanyCode': 'businessCode', 'brancheCompany': 'businessName'}" | |
| 64 | + dcname="brancheCompanyCode" | |
| 65 | + icname="businessCode" | |
| 66 | + dsparams="{{ {type: 'ajax', param:{'upCode_eq': ctrl.employeeInfoForSave.companyCode }, atype:'gs' } | json }}" | |
| 67 | + iterobjname="item" | |
| 68 | + iterobjexp="item.businessName" | |
| 69 | + searchph="请选择所属分公司..." | |
| 70 | + searchexp="this.businessName" | |
| 71 | + > | |
| 72 | + </sa-Select5> | |
| 73 | + | |
| 69 | 74 | </div> |
| 70 | 75 | </div> |
| 71 | 76 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html
| ... | ... | @@ -101,6 +101,7 @@ |
| 101 | 101 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> |
| 102 | 102 | <a ui-sref="employeeInfoManage_detail({id: info.id})" class="btn btn-info btn-sm"> 详细 </a> |
| 103 | 103 | <a ui-sref="employeeInfoManage_edit({id: info.id})" class="btn btn-info btn-sm"> 修改 </a> |
| 104 | + <a ng-click="ctrl.deleteEmp(info.id)" class="btn btn-danger btn-sm"> 删除 </a> | |
| 104 | 105 | </td> |
| 105 | 106 | </tr> |
| 106 | 107 | </tbody> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js
| ... | ... | @@ -132,48 +132,56 @@ angular.module('ScheduleApp').controller( |
| 132 | 132 | ] |
| 133 | 133 | ); |
| 134 | 134 | |
| 135 | -angular.module('ScheduleApp').controller('EmployInfoManageToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | |
| 136 | - var self = this; | |
| 137 | - | |
| 138 | - // 关闭窗口 | |
| 139 | - self.close = function() { | |
| 140 | - $modalInstance.dismiss("cancel"); | |
| 141 | - }; | |
| 142 | - | |
| 143 | - self.clearInputFile = function() { | |
| 144 | - angular.element("input[type='file']").val(null); | |
| 145 | - }; | |
| 146 | - | |
| 147 | - // 上传文件组件 | |
| 148 | - self.uploader = new FileUploader({ | |
| 149 | - url: "/ee/uploadAndImportFile", | |
| 150 | - filters: [] // 用于过滤文件,比如只允许导入excel | |
| 151 | - }); | |
| 152 | - self.uploader.onAfterAddingFile = function(fileItem) | |
| 153 | - { | |
| 154 | - console.info('onAfterAddingFile', fileItem); | |
| 155 | - console.log(self.uploader.queue.length); | |
| 156 | - if (self.uploader.queue.length > 1) | |
| 157 | - self.uploader.removeFromQueue(0); | |
| 158 | - }; | |
| 159 | - self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 160 | - { | |
| 161 | - if (response.status == "SUCCESS") { | |
| 162 | - console.info('onSuccessItem', fileItem, response, status, headers); | |
| 163 | - } else { | |
| 164 | - fileItem.isSuccess = false; | |
| 165 | - fileItem.isCancel = false; | |
| 166 | - fileItem.isError = true; | |
| 167 | - | |
| 168 | - alert(response.msg); | |
| 169 | - } | |
| 170 | - }; | |
| 171 | - self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 172 | - { | |
| 173 | - console.info('onErrorItem', fileItem, response, status, headers); | |
| 174 | - }; | |
| 135 | +// dataImport.html控制 | |
| 136 | +angular.module('ScheduleApp').controller( | |
| 137 | + 'EmployInfoManageToolsCtrl', | |
| 138 | + [ | |
| 139 | + '$modalInstance', | |
| 140 | + 'FileUploader', | |
| 141 | + function($modalInstance, FileUploader) { | |
| 142 | + var self = this; | |
| 175 | 143 | |
| 176 | -}]); | |
| 144 | + // 关闭窗口 | |
| 145 | + self.close = function() { | |
| 146 | + $modalInstance.dismiss("cancel"); | |
| 147 | + }; | |
| 148 | + | |
| 149 | + self.clearInputFile = function() { | |
| 150 | + angular.element("input[type='file']").val(null); | |
| 151 | + }; | |
| 152 | + | |
| 153 | + // 上传文件组件 | |
| 154 | + self.uploader = new FileUploader({ | |
| 155 | + url: "/ee/uploadAndImportFile", | |
| 156 | + filters: [] // 用于过滤文件,比如只允许导入excel | |
| 157 | + }); | |
| 158 | + self.uploader.onAfterAddingFile = function(fileItem) | |
| 159 | + { | |
| 160 | + console.info('onAfterAddingFile', fileItem); | |
| 161 | + console.log(self.uploader.queue.length); | |
| 162 | + if (self.uploader.queue.length > 1) | |
| 163 | + self.uploader.removeFromQueue(0); | |
| 164 | + }; | |
| 165 | + self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 166 | + { | |
| 167 | + if (response.status == "SUCCESS") { | |
| 168 | + console.info('onSuccessItem', fileItem, response, status, headers); | |
| 169 | + } else { | |
| 170 | + fileItem.isSuccess = false; | |
| 171 | + fileItem.isCancel = false; | |
| 172 | + fileItem.isError = true; | |
| 173 | + | |
| 174 | + alert(response.msg); | |
| 175 | + } | |
| 176 | + }; | |
| 177 | + self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 178 | + { | |
| 179 | + console.info('onErrorItem', fileItem, response, status, headers); | |
| 180 | + }; | |
| 181 | + | |
| 182 | + } | |
| 183 | + ] | |
| 184 | +); | |
| 177 | 185 | |
| 178 | 186 | // list.html控制器 |
| 179 | 187 | angular.module('ScheduleApp').controller( |
| ... | ... | @@ -208,6 +216,16 @@ angular.module('ScheduleApp').controller( |
| 208 | 216 | }); |
| 209 | 217 | }; |
| 210 | 218 | |
| 219 | + self.deleteEmp = function(id) { | |
| 220 | + Employee.delete({id: id}, function(result) { | |
| 221 | + if (result.msg) { // 暂时这样做,之后全局拦截 | |
| 222 | + alert("失败:" + result.msg); | |
| 223 | + } else { | |
| 224 | + self.doPage(); | |
| 225 | + } | |
| 226 | + }); | |
| 227 | + }; | |
| 228 | + | |
| 211 | 229 | self.doPage(); |
| 212 | 230 | |
| 213 | 231 | } | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/info/list_info.html
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/list.html
| ... | ... | @@ -90,7 +90,7 @@ |
| 90 | 90 | <span ng-bind="info.scheduleToTime | date: 'yyyy-MM-dd '"></span> |
| 91 | 91 | </td> |
| 92 | 92 | <td> |
| 93 | - <span ng-bind="info.updateBy.name"></span> | |
| 93 | + <span ng-bind="info.updateBy.userName"></span> | |
| 94 | 94 | / |
| 95 | 95 | <span ng-bind="info.updateDate | date: 'yyyy-MM-dd HH:mm:ss'"></span> |
| 96 | 96 | </td> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/report/module.js
| ... | ... | @@ -240,6 +240,21 @@ angular.module('ScheduleApp').controller('SchedulePlanReportManageFormCtrl', [ |
| 240 | 240 | update: self.groupInfo |
| 241 | 241 | }; |
| 242 | 242 | |
| 243 | + // 处理工号,去除 -,如:55-33333,去除55- | |
| 244 | + var reg = /^(.*?)\-(.*?)$/; | |
| 245 | + if (self.groupInfo.jsy1Gh) { | |
| 246 | + self.groupInfo.jsy1Gh = self.groupInfo.jsy1Gh.replace(reg, '$2'); | |
| 247 | + } | |
| 248 | + if (self.groupInfo.spy1Gh) { | |
| 249 | + self.groupInfo.spy1Gh = self.groupInfo.spy1Gh.replace(reg, '$2'); | |
| 250 | + } | |
| 251 | + if (self.groupInfo.jsy2Gh) { | |
| 252 | + self.groupInfo.jsy2Gh = self.groupInfo.jsy2Gh.replace(reg, '$2'); | |
| 253 | + } | |
| 254 | + if (self.groupInfo.spy2Gh) { | |
| 255 | + self.groupInfo.spy2Gh = self.groupInfo.spy2Gh.replace(reg, '$2'); | |
| 256 | + } | |
| 257 | + | |
| 243 | 258 | //console.log($scope); |
| 244 | 259 | //console.log(param); |
| 245 | 260 | schedulePlanReportManageService.updateDetail(param).then( | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/list.html