Commit a388c8b52dd13772f7c95e5a4c5fd1c3825ce3c9
Merge branch 'master' of 192.168.168.201:panzhaov5/bsth_control
Showing
6 changed files
with
668 additions
and
26 deletions
src/main/java/com/bsth/controller/CarsController.java
| 1 | package com.bsth.controller; | 1 | package com.bsth.controller; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.Cars; | 3 | import com.bsth.entity.Cars; |
| 4 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 4 | import org.springframework.web.bind.annotation.RequestMapping; | 5 | import org.springframework.web.bind.annotation.RequestMapping; |
| 6 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 5 | import org.springframework.web.bind.annotation.RestController; | 7 | import org.springframework.web.bind.annotation.RestController; |
| 6 | 8 | ||
| 9 | +import java.util.Map; | ||
| 10 | + | ||
| 7 | /** | 11 | /** |
| 8 | * Created by xu on 16/5/31. | 12 | * Created by xu on 16/5/31. |
| 9 | */ | 13 | */ |
| 10 | @RestController | 14 | @RestController |
| 11 | @RequestMapping("cars") | 15 | @RequestMapping("cars") |
| 12 | public class CarsController extends BaseController<Cars, Integer> { | 16 | public class CarsController extends BaseController<Cars, Integer> { |
| 17 | + | ||
| 18 | + | ||
| 19 | + /** | ||
| 20 | + * 覆写方法,因为form提交的方式参数不全,改用 json形式提交 @RequestBody | ||
| 21 | + * @Title: save | ||
| 22 | + * @Description: TODO(持久化对象) | ||
| 23 | + * @param @param t | ||
| 24 | + * @param @return 设定文件 | ||
| 25 | + * @return Map<String,Object> {status: 1(成功),-1(失败)} | ||
| 26 | + * @throws | ||
| 27 | + */ | ||
| 28 | + @RequestMapping(method = RequestMethod.POST) | ||
| 29 | + public Map<String, Object> save(@RequestBody Cars t){ | ||
| 30 | + return baseService.save(t); | ||
| 31 | + } | ||
| 13 | } | 32 | } |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js
| @@ -121,11 +121,19 @@ angular.module('ScheduleApp').factory('BusInfoManageService', ['BusInfoManageSer | @@ -121,11 +121,19 @@ angular.module('ScheduleApp').factory('BusInfoManageService', ['BusInfoManageSer | ||
| 121 | /** | 121 | /** |
| 122 | * 获取明细信息。 | 122 | * 获取明细信息。 |
| 123 | * @param id 车辆id | 123 | * @param id 车辆id |
| 124 | - * @return 返沪一个 promise | 124 | + * @return 返回一个 promise |
| 125 | */ | 125 | */ |
| 126 | getDetail: function(id) { | 126 | getDetail: function(id) { |
| 127 | var params = {id: id}; | 127 | var params = {id: id}; |
| 128 | return service.get(params).$promise; | 128 | return service.get(params).$promise; |
| 129 | + }, | ||
| 130 | + /** | ||
| 131 | + * 保存信息。 | ||
| 132 | + * @param obj 车辆详细信息 | ||
| 133 | + * @return 返回一个 promise | ||
| 134 | + */ | ||
| 135 | + saveDetail: function(obj) { | ||
| 136 | + return service.save(obj).$promise; | ||
| 129 | } | 137 | } |
| 130 | }; | 138 | }; |
| 131 | }]); | 139 | }]); |
| @@ -142,7 +150,7 @@ angular.module('ScheduleApp').controller('BusInfoManageCtrl', ['BusInfoManageSer | @@ -142,7 +150,7 @@ angular.module('ScheduleApp').controller('BusInfoManageCtrl', ['BusInfoManageSer | ||
| 142 | 150 | ||
| 143 | }]); | 151 | }]); |
| 144 | 152 | ||
| 145 | -angular.module('ScheduleApp').controller('BusInfoManageListCtrl', ['BusInfoManageService','$scope', function(service, $scope) { | 153 | +angular.module('ScheduleApp').controller('BusInfoManageListCtrl', ['BusInfoManageService','$scope', function(busInfoManageService, $scope) { |
| 146 | var self = this; | 154 | var self = this; |
| 147 | self.pageInfo = { | 155 | self.pageInfo = { |
| 148 | totalItems : 0, | 156 | totalItems : 0, |
| @@ -151,12 +159,12 @@ angular.module('ScheduleApp').controller('BusInfoManageListCtrl', ['BusInfoManag | @@ -151,12 +159,12 @@ angular.module('ScheduleApp').controller('BusInfoManageListCtrl', ['BusInfoManag | ||
| 151 | }; | 159 | }; |
| 152 | 160 | ||
| 153 | // 初始创建的时候,获取一次列表数据 | 161 | // 初始创建的时候,获取一次列表数据 |
| 154 | - service.getPage().then( | 162 | + busInfoManageService.getPage().then( |
| 155 | function(result) { | 163 | function(result) { |
| 156 | self.pageInfo.totalItems = result.totalElements; | 164 | self.pageInfo.totalItems = result.totalElements; |
| 157 | self.pageInfo.currentPage = result.number + 1; | 165 | self.pageInfo.currentPage = result.number + 1; |
| 158 | self.pageInfo.infos = result.content; | 166 | self.pageInfo.infos = result.content; |
| 159 | - service.setCurrentPageNo(result.number + 1); | 167 | + busInfoManageService.setCurrentPageNo(result.number + 1); |
| 160 | }, | 168 | }, |
| 161 | function(result) { | 169 | function(result) { |
| 162 | alert("出错啦!"); | 170 | alert("出错啦!"); |
| @@ -169,13 +177,13 @@ angular.module('ScheduleApp').controller('BusInfoManageListCtrl', ['BusInfoManag | @@ -169,13 +177,13 @@ angular.module('ScheduleApp').controller('BusInfoManageListCtrl', ['BusInfoManag | ||
| 169 | 177 | ||
| 170 | // 翻页的时候调用 | 178 | // 翻页的时候调用 |
| 171 | self.pageChanaged = function() { | 179 | self.pageChanaged = function() { |
| 172 | - service.setCurrentPageNo(self.pageInfo.currentPage); | ||
| 173 | - service.getPage().then( | 180 | + busInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); |
| 181 | + busInfoManageService.getPage().then( | ||
| 174 | function(result) { | 182 | function(result) { |
| 175 | self.pageInfo.totalItems = result.totalElements; | 183 | self.pageInfo.totalItems = result.totalElements; |
| 176 | self.pageInfo.currentPage = result.number + 1; | 184 | self.pageInfo.currentPage = result.number + 1; |
| 177 | self.pageInfo.infos = result.content; | 185 | self.pageInfo.infos = result.content; |
| 178 | - service.setCurrentPageNo(result.number + 1); | 186 | + busInfoManageService.setCurrentPageNo(result.number + 1); |
| 179 | }, | 187 | }, |
| 180 | function(result) { | 188 | function(result) { |
| 181 | alert("出错啦!"); | 189 | alert("出错啦!"); |
| @@ -184,15 +192,15 @@ angular.module('ScheduleApp').controller('BusInfoManageListCtrl', ['BusInfoManag | @@ -184,15 +192,15 @@ angular.module('ScheduleApp').controller('BusInfoManageListCtrl', ['BusInfoManag | ||
| 184 | }; | 192 | }; |
| 185 | // 获取查询条件数据 | 193 | // 获取查询条件数据 |
| 186 | self.searchCondition = function() { | 194 | self.searchCondition = function() { |
| 187 | - return service.getSearchCondition(); | 195 | + return busInfoManageService.getSearchCondition(); |
| 188 | }; | 196 | }; |
| 189 | // 重置查询条件 | 197 | // 重置查询条件 |
| 190 | self.resetSearchCondition = function() { | 198 | self.resetSearchCondition = function() { |
| 191 | - return service.resetSearchCondition(); | 199 | + return busInfoManageService.resetSearchCondition(); |
| 192 | }; | 200 | }; |
| 193 | }]); | 201 | }]); |
| 194 | 202 | ||
| 195 | -angular.module('ScheduleApp').controller('BusInfoManageFormCtrl', ['BusInfoManageService', '$scope', function(busInfoManageService, $scope) { | 203 | +angular.module('ScheduleApp').controller('BusInfoManageFormCtrl', ['BusInfoManageService', '$stateParams', '$state', function(busInfoManageService, $stateParams, $state) { |
| 196 | var self = this; | 204 | var self = this; |
| 197 | 205 | ||
| 198 | // 报废日期 日期控件开关 | 206 | // 报废日期 日期控件开关 |
| @@ -216,20 +224,48 @@ angular.module('ScheduleApp').controller('BusInfoManageFormCtrl', ['BusInfoManag | @@ -216,20 +224,48 @@ angular.module('ScheduleApp').controller('BusInfoManageFormCtrl', ['BusInfoManag | ||
| 216 | self.busInfoForSave = {}; | 224 | self.busInfoForSave = {}; |
| 217 | 225 | ||
| 218 | // 车辆类型 selectedItem | 226 | // 车辆类型 selectedItem |
| 219 | - self.busInfoForSave.carType_Selected = null; | 227 | + self.busInfoForSave.carType_selected = null; |
| 220 | self.carTypes = busInfoManageService.getCarTypes(); | 228 | self.carTypes = busInfoManageService.getCarTypes(); |
| 229 | + self.carType_selected_change = function($item, $model) { | ||
| 230 | + self.busInfoForSave.carType = $item.type; | ||
| 231 | + }; | ||
| 232 | + self.carType_selected_remove = function($item, $model) { | ||
| 233 | + self.busInfoForSave.carType_selected = null; | ||
| 234 | + self.busInfoForSave.carType = null; | ||
| 235 | + }; | ||
| 221 | 236 | ||
| 222 | // 机动车类型 selectedItem | 237 | // 机动车类型 selectedItem |
| 223 | - self.busInfoForSave.vehicleStats_Selected = null; | 238 | + self.busInfoForSave.vehicleStats_selected = null; |
| 224 | self.vehicleStates = busInfoManageService.getVehicleStates(); | 239 | self.vehicleStates = busInfoManageService.getVehicleStates(); |
| 240 | + self.vehicleStats_selected_change = function($item, $model) { | ||
| 241 | + self.busInfoForSave.vehicleStats = $item.type; | ||
| 242 | + }; | ||
| 243 | + self.vehicleStats_selected_remove = function($item, $model) { | ||
| 244 | + self.busInfoForSave.vehicleStats_selected = null; | ||
| 245 | + self.busInfoForSave.vehicleStats = null; | ||
| 246 | + }; | ||
| 225 | 247 | ||
| 226 | // 营运状态类型 selectedItem | 248 | // 营运状态类型 selectedItem |
| 227 | - self.busInfoForSave.operatorsState_Selected = null; | 249 | + self.busInfoForSave.operatorsState_selected = null; |
| 228 | self.operatorsStates = busInfoManageService.getOperatorsStates(); | 250 | self.operatorsStates = busInfoManageService.getOperatorsStates(); |
| 251 | + self.operatorsState_selected_change = function($item, $model) { | ||
| 252 | + self.busInfoForSave.operatorsState = $item.type; | ||
| 253 | + }; | ||
| 254 | + self.operatorsState_selected_remove = function($item, $model) { | ||
| 255 | + self.busInfoForSave.operatorsState_selected = null; | ||
| 256 | + self.busInfoForSave.operatorsState = null; | ||
| 257 | + }; | ||
| 229 | 258 | ||
| 230 | // 设备厂商 selectedItem | 259 | // 设备厂商 selectedItem |
| 231 | self.busInfoForSave.supplierName_selected = null; | 260 | self.busInfoForSave.supplierName_selected = null; |
| 232 | self.supplierNames = busInfoManageService.getSupplierNames(); | 261 | self.supplierNames = busInfoManageService.getSupplierNames(); |
| 262 | + self.supplierName_selected_change = function($item, $model) { | ||
| 263 | + self.busInfoForSave.supplierName = $item.name; | ||
| 264 | + }; | ||
| 265 | + self.supplierName_selected_remove = function() { | ||
| 266 | + self.busInfoForSave.supplierName_selected = null; | ||
| 267 | + self.busInfoForSave.supplierName = null; | ||
| 268 | + }; | ||
| 233 | 269 | ||
| 234 | // 公司 selectedItem | 270 | // 公司 selectedItem |
| 235 | self.busInfoForSave.gs_selected = null; | 271 | self.busInfoForSave.gs_selected = null; |
| @@ -239,26 +275,103 @@ angular.module('ScheduleApp').controller('BusInfoManageFormCtrl', ['BusInfoManag | @@ -239,26 +275,103 @@ angular.module('ScheduleApp').controller('BusInfoManageFormCtrl', ['BusInfoManag | ||
| 239 | self.busInfoForSave.company = $item.gsmc; | 275 | self.busInfoForSave.company = $item.gsmc; |
| 240 | }; | 276 | }; |
| 241 | self.gs_selected_remove = function() { | 277 | self.gs_selected_remove = function() { |
| 278 | + self.busInfoForSave.gs_selected = null; | ||
| 242 | self.busInfoForSave.businessCode = null; | 279 | self.busInfoForSave.businessCode = null; |
| 243 | self.busInfoForSave.company = null; | 280 | self.busInfoForSave.company = null; |
| 244 | }; | 281 | }; |
| 245 | 282 | ||
| 283 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | ||
| 284 | + var id = $stateParams.id; | ||
| 285 | + if (id) { | ||
| 286 | + self.busInfoForSave.id = id; | ||
| 287 | + busInfoManageService.getDetail(id).then( | ||
| 288 | + function(result) { | ||
| 289 | + var key; | ||
| 290 | + for (key in result) { | ||
| 291 | + self.busInfoForSave[key] = result[key]; | ||
| 292 | + } | ||
| 293 | + // 填写所有的 select 控件选中框数据 | ||
| 294 | + // 公司字典 | ||
| 295 | + if (self.busInfoForSave.businessCode) { | ||
| 296 | + angular.forEach(self.gses, function(data) { | ||
| 297 | + if (self.busInfoForSave.businessCode == data.gsdm) { | ||
| 298 | + self.busInfoForSave.gs_selected = data; | ||
| 299 | + } | ||
| 300 | + }); | ||
| 301 | + } | ||
| 302 | + // 设备厂商字典 | ||
| 303 | + if (self.busInfoForSave.supplierName) { | ||
| 304 | + angular.forEach(self.supplierNames, function(data) { | ||
| 305 | + if (self.busInfoForSave.supplierName == data.name) { | ||
| 306 | + self.busInfoForSave.supplierName_selected = data; | ||
| 307 | + } | ||
| 308 | + }); | ||
| 309 | + } | ||
| 310 | + // 车辆类型字典 | ||
| 311 | + if (self.busInfoForSave.carType) { | ||
| 312 | + angular.forEach(self.carTypes, function(data) { | ||
| 313 | + if (self.busInfoForSave.carType == data.type) { | ||
| 314 | + self.busInfoForSave.carType_selected = data; | ||
| 315 | + } | ||
| 316 | + }); | ||
| 317 | + } | ||
| 318 | + // 机动车类型字典 | ||
| 319 | + if (self.busInfoForSave.vehicleStats) { | ||
| 320 | + angular.forEach(self.vehicleStates, function(data) { | ||
| 321 | + if (self.busInfoForSave.vehicleStats == data.type) { | ||
| 322 | + self.busInfoForSave.vehicleStats_selected = data; | ||
| 323 | + } | ||
| 324 | + }); | ||
| 325 | + } | ||
| 326 | + // 营运状态类型字典 | ||
| 327 | + if (self.busInfoForSave.operatorsState) { | ||
| 328 | + angular.forEach(self.operatorsStates, function(data) { | ||
| 329 | + if (self.busInfoForSave.operatorsState == data.type) { | ||
| 330 | + self.busInfoForSave.operatorsState_selected = data; | ||
| 331 | + } | ||
| 332 | + }); | ||
| 333 | + } | ||
| 334 | + | ||
| 335 | + }, | ||
| 336 | + function(result) { | ||
| 337 | + alert("出错啦!"); | ||
| 338 | + } | ||
| 339 | + ); | ||
| 340 | + } | ||
| 341 | + | ||
| 246 | // 提交方法 | 342 | // 提交方法 |
| 247 | self.submit = function() { | 343 | self.submit = function() { |
| 248 | console.log(self.busInfoForSave); | 344 | console.log(self.busInfoForSave); |
| 249 | - alert("form submit 测试!"); | 345 | + //if (self.busInfoForSave) { |
| 346 | + // delete $stateParams.id; | ||
| 347 | + //} | ||
| 348 | + busInfoManageService.saveDetail(self.busInfoForSave).then( | ||
| 349 | + function(result) { | ||
| 350 | + // TODO:弹出框方式以后改 | ||
| 351 | + if (result.status == 1) { | ||
| 352 | + alert("保存成功!"); | ||
| 353 | + $state.go("busInfoManage"); | ||
| 354 | + } else { | ||
| 355 | + alert("保存异常!"); | ||
| 356 | + } | ||
| 357 | + }, | ||
| 358 | + function(result) { | ||
| 359 | + // TODO:弹出框方式以后改 | ||
| 360 | + alert("出错啦!"); | ||
| 361 | + } | ||
| 362 | + ); | ||
| 250 | }; | 363 | }; |
| 251 | 364 | ||
| 252 | }]); | 365 | }]); |
| 253 | 366 | ||
| 254 | -angular.module('ScheduleApp').controller('BusInfoManageDetailCtrl', ['BusInfoManageService', '$stateParams', function(service, $stateParams) { | 367 | +angular.module('ScheduleApp').controller('BusInfoManageDetailCtrl', ['BusInfoManageService', '$stateParams', function(busInfoManageService, $stateParams) { |
| 255 | var self = this; | 368 | var self = this; |
| 256 | self.title = ""; | 369 | self.title = ""; |
| 257 | self.busInfoForDetail = {}; | 370 | self.busInfoForDetail = {}; |
| 258 | self.busInfoForDetail.id = $stateParams.id; | 371 | self.busInfoForDetail.id = $stateParams.id; |
| 259 | 372 | ||
| 260 | // 当转向到此页面时,就获取明细信息并绑定 | 373 | // 当转向到此页面时,就获取明细信息并绑定 |
| 261 | - service.getDetail($stateParams.id).then( | 374 | + busInfoManageService.getDetail($stateParams.id).then( |
| 262 | function(result) { | 375 | function(result) { |
| 263 | var key; | 376 | var key; |
| 264 | for (key in result) { | 377 | for (key in result) { |
| @@ -268,6 +381,7 @@ angular.module('ScheduleApp').controller('BusInfoManageDetailCtrl', ['BusInfoMan | @@ -268,6 +381,7 @@ angular.module('ScheduleApp').controller('BusInfoManageDetailCtrl', ['BusInfoMan | ||
| 268 | self.title = "车辆 " + self.busInfoForDetail.insideCode + " 详细信息"; | 381 | self.title = "车辆 " + self.busInfoForDetail.insideCode + " 详细信息"; |
| 269 | }, | 382 | }, |
| 270 | function(result) { | 383 | function(result) { |
| 384 | + // TODO:弹出框方式以后改 | ||
| 271 | alert("出错啦!"); | 385 | alert("出错啦!"); |
| 272 | } | 386 | } |
| 273 | ); | 387 | ); |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/edit.html
0 → 100644
| 1 | +<div class="page-head"> | ||
| 2 | + <div class="page-title"> | ||
| 3 | + <h1>修改车辆信息</h1> | ||
| 4 | + </div> | ||
| 5 | +</div> | ||
| 6 | + | ||
| 7 | +<ul class="page-breadcrumb breadcrumb"> | ||
| 8 | + <li> | ||
| 9 | + <a href="/pages/home.html" data-pjax>首页</a> | ||
| 10 | + <i class="fa fa-circle"></i> | ||
| 11 | + </li> | ||
| 12 | + <li> | ||
| 13 | + <span class="active">基础信息</span> | ||
| 14 | + <i class="fa fa-circle"></i> | ||
| 15 | + </li> | ||
| 16 | + <li> | ||
| 17 | + <a ui-sref="busInfoManage">车辆信息管理</a> | ||
| 18 | + <i class="fa fa-circle"></i> | ||
| 19 | + </li> | ||
| 20 | + <li> | ||
| 21 | + <span class="active">修改车辆信息</span> | ||
| 22 | + </li> | ||
| 23 | +</ul> | ||
| 24 | + | ||
| 25 | +<div class="portlet light bordered" ng-controller="BusInfoManageFormCtrl as ctrl"> | ||
| 26 | + <div class="portlet-title"> | ||
| 27 | + <div class="caption"> | ||
| 28 | + <i class="icon-equalizer font-red-sunglo"></i> <span | ||
| 29 | + class="caption-subject font-red-sunglo bold uppercase">表单</span> | ||
| 30 | + </div> | ||
| 31 | + </div> | ||
| 32 | + | ||
| 33 | + <div class="portlet-body form"> | ||
| 34 | + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> | ||
| 35 | + <!--<div class="alert alert-danger display-hide">--> | ||
| 36 | + <!--<button class="close" data-close="alert"></button>--> | ||
| 37 | + <!--您的输入有误,请检查下面的输入项--> | ||
| 38 | + <!--</div>--> | ||
| 39 | + | ||
| 40 | + | ||
| 41 | + <!-- 其他信息放置在这里 --> | ||
| 42 | + <div class="form-body"> | ||
| 43 | + <div class="form-group has-success has-feedback"> | ||
| 44 | + <label class="col-md-2 control-label">内部编号*:</label> | ||
| 45 | + <div class="col-md-3"> | ||
| 46 | + <input type="text" class="form-control" | ||
| 47 | + name="insideCode" ng-model="ctrl.busInfoForSave.insideCode" | ||
| 48 | + required ng-maxlength="8" placeholder="请输入车辆内部编码"/> | ||
| 49 | + </div> | ||
| 50 | + <!-- 隐藏块,显示验证信息 --> | ||
| 51 | + <div class="alert alert-danger well-sm" ng-show="myForm.insideCode.$error.required"> | ||
| 52 | + 内部编号必须填写 | ||
| 53 | + </div> | ||
| 54 | + <div class="alert alert-danger well-sm" ng-show="myForm.insideCode.$error.maxlength"> | ||
| 55 | + 内部编号长度不能超过8位 | ||
| 56 | + </div> | ||
| 57 | + </div> | ||
| 58 | + | ||
| 59 | + <div class="form-group has-success has-feedback"> | ||
| 60 | + <label class="col-md-2 control-label">所属公司*:</label> | ||
| 61 | + <div class="col-md-3"> | ||
| 62 | + <div class="input-group"> | ||
| 63 | + <ui-select ng-model="ctrl.busInfoForSave.gs_selected" | ||
| 64 | + on-select="ctrl.gs_selected_change($item, $model)" | ||
| 65 | + theme="bootstrap" name="gs" required> | ||
| 66 | + <ui-select-match placeholder="请选择所属公司...">{{$select.selected.gsmc}}</ui-select-match> | ||
| 67 | + <ui-select-choices repeat="item in ctrl.gses"> | ||
| 68 | + <span ng-bind="item.gsmc"></span> | ||
| 69 | + </ui-select-choices> | ||
| 70 | + </ui-select> | ||
| 71 | + <span class="input-group-btn"> | ||
| 72 | + <button type="button" ng-click="ctrl.gs_selected_remove()" class="btn btn-default"> | ||
| 73 | + <span class="glyphicon glyphicon-trash"></span> | ||
| 74 | + </button> | ||
| 75 | + </span> | ||
| 76 | + </div> | ||
| 77 | + </div> | ||
| 78 | + <!-- 隐藏块,显示验证信息 --> | ||
| 79 | + <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required"> | ||
| 80 | + 内部编号必须填写 | ||
| 81 | + </div> | ||
| 82 | + </div> | ||
| 83 | + | ||
| 84 | + <!-- TODO --> | ||
| 85 | + <div class="form-group"> | ||
| 86 | + <label class="col-md-2 control-label">分公司:</label> | ||
| 87 | + <div class="col-md-3"> | ||
| 88 | + <select name="brancheCompanyCode" class="form-control"> | ||
| 89 | + <option value="">请选择...</option> | ||
| 90 | + <option value="1">分公司1</option> | ||
| 91 | + <option value="2">分公司1</option> | ||
| 92 | + <option value="3">分公司1</option> | ||
| 93 | + <option value="4">分公司1</option> | ||
| 94 | + </select> | ||
| 95 | + </div> | ||
| 96 | + </div> | ||
| 97 | + | ||
| 98 | + <div class="form-group has-success has-feedback"> | ||
| 99 | + <label class="col-md-2 control-label">车辆编码*:</label> | ||
| 100 | + <div class="col-md-3"> | ||
| 101 | + <input type="text" class="form-control" | ||
| 102 | + name="carCode" ng-model="ctrl.busInfoForSave.carCode" | ||
| 103 | + required placeholder="请输入车辆编码"/> | ||
| 104 | + </div> | ||
| 105 | + <!-- 隐藏块,显示验证信息 --> | ||
| 106 | + <div class="alert alert-danger well-sm" ng-show="myForm.carCode.$error.required"> | ||
| 107 | + 车辆编码必须填写 | ||
| 108 | + </div> | ||
| 109 | + </div> | ||
| 110 | + | ||
| 111 | + <div class="form-group has-success has-feedback"> | ||
| 112 | + <label class="col-md-2 control-label">车牌号*:</label> | ||
| 113 | + <div class="col-md-3"> | ||
| 114 | + <input type="text" class="form-control" | ||
| 115 | + name="carPlate" ng-model="ctrl.busInfoForSave.carPlate" | ||
| 116 | + required placeholder="请输入车牌号"/> | ||
| 117 | + </div> | ||
| 118 | + <!-- 隐藏快,显示验证信息 --> | ||
| 119 | + <div class="alert alert-danger well-sm" ng-show="myForm.carPlate.$error.required"> | ||
| 120 | + 车牌号必须填写 | ||
| 121 | + </div> | ||
| 122 | + </div> | ||
| 123 | + | ||
| 124 | + <div class="form-group has-success has-feedback"> | ||
| 125 | + <label class="col-md-2 control-label">设备供应厂商*:</label> | ||
| 126 | + <div class="col-md-3"> | ||
| 127 | + <div class="input-group"> | ||
| 128 | + <ui-select ng-model="ctrl.busInfoForSave.supplierName_selected" | ||
| 129 | + on-select="ctrl.supplierName_selected_change($item, $model)" | ||
| 130 | + theme="bootstrap" name="supplierName" required> | ||
| 131 | + <ui-select-match placeholder="请选择设备厂商...">{{$select.selected.name}}</ui-select-match> | ||
| 132 | + <ui-select-choices repeat="item in ctrl.supplierNames"> | ||
| 133 | + <span ng-bind="item.name"></span> | ||
| 134 | + </ui-select-choices> | ||
| 135 | + </ui-select> | ||
| 136 | + <span class="input-group-btn"> | ||
| 137 | + <button type="button" ng-click="ctrl.supplierName_selected_remove()" class="btn btn-default"> | ||
| 138 | + <span class="glyphicon glyphicon-trash"></span> | ||
| 139 | + </button> | ||
| 140 | + </span> | ||
| 141 | + </div> | ||
| 142 | + </div> | ||
| 143 | + <!-- 隐藏快,显示验证信息 --> | ||
| 144 | + <div class="alert alert-danger well-sm" ng-show="myForm.supplierName.$error.required"> | ||
| 145 | + 设备供应厂商必须选择 | ||
| 146 | + </div> | ||
| 147 | + </div> | ||
| 148 | + | ||
| 149 | + <div class="form-group has-success has-feedback"> | ||
| 150 | + <label class="col-md-2 control-label">终端号*:</label> | ||
| 151 | + <div class="col-md-3"> | ||
| 152 | + <input type="text" class="form-control" | ||
| 153 | + name="equipmentCode" ng-model="ctrl.busInfoForSave.equipmentCode" | ||
| 154 | + required placeholder="请输入设备终端号"/> | ||
| 155 | + </div> | ||
| 156 | + <!-- 隐藏块,显示验证信息 --> | ||
| 157 | + <div class="alert alert-danger well-sm" ng-show="myForm.equipmentCode.$error.required"> | ||
| 158 | + 设备终端号必须填写 | ||
| 159 | + </div> | ||
| 160 | + </div> | ||
| 161 | + | ||
| 162 | + <div class="form-group"> | ||
| 163 | + <label class="col-md-2 control-label">车型类别:</label> | ||
| 164 | + <div class="col-md-4"> | ||
| 165 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carClass" | ||
| 166 | + placeholder="请输入车型类别"/> | ||
| 167 | + </div> | ||
| 168 | + </div> | ||
| 169 | + <div class="form-group"> | ||
| 170 | + <label class="col-md-2 control-label">技术速度:</label> | ||
| 171 | + <div class="col-md-4"> | ||
| 172 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.speed" | ||
| 173 | + placeholder="请输入技术速度"/> | ||
| 174 | + </div> | ||
| 175 | + </div> | ||
| 176 | + <div class="form-group"> | ||
| 177 | + <label class="col-md-2 control-label">座位数:</label> | ||
| 178 | + <div class="col-md-4"> | ||
| 179 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carSeatnNumber" | ||
| 180 | + placeholder="请输入座位数"/> | ||
| 181 | + </div> | ||
| 182 | + </div> | ||
| 183 | + <div class="form-group"> | ||
| 184 | + <label class="col-md-2 control-label">载客标准:</label> | ||
| 185 | + <div class="col-md-4"> | ||
| 186 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carStandard" | ||
| 187 | + placeholder="请输入载客标准"/> | ||
| 188 | + </div> | ||
| 189 | + </div> | ||
| 190 | + <div class="form-group"> | ||
| 191 | + <label class="col-md-2 control-label">标准油耗/开空调:</label> | ||
| 192 | + <div class="col-md-4"> | ||
| 193 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.kburnStandard" | ||
| 194 | + placeholder="请输入标准油耗/开空调"/> | ||
| 195 | + </div> | ||
| 196 | + </div> | ||
| 197 | + <div class="form-group"> | ||
| 198 | + <label class="col-md-2 control-label">标准油耗/关空调:</label> | ||
| 199 | + <div class="col-md-4"> | ||
| 200 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.gburnStandard" | ||
| 201 | + placeholder="请输入标准油耗/关空调"/> | ||
| 202 | + </div> | ||
| 203 | + </div> | ||
| 204 | + <div class="form-group"> | ||
| 205 | + <label class="col-md-2 control-label">报废号:</label> | ||
| 206 | + <div class="col-md-4"> | ||
| 207 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.scrapCode" | ||
| 208 | + placeholder="请输入报废号"/> | ||
| 209 | + </div> | ||
| 210 | + </div> | ||
| 211 | + | ||
| 212 | + <div class="form-group"> | ||
| 213 | + <label class="col-md-2 control-label">报废日期:</label> | ||
| 214 | + <div class="col-md-4"> | ||
| 215 | + <div class="input-group"> | ||
| 216 | + <input type="text" class="form-control" | ||
| 217 | + name="scrapDate" placeholder="请选择报废日期..." | ||
| 218 | + uib-datepicker-popup="yyyy年MM月dd日" | ||
| 219 | + is-open="ctrl.scrapDateOpen" | ||
| 220 | + ng-model="ctrl.busInfoForSave.scrapDate"/> | ||
| 221 | + <span class="input-group-btn"> | ||
| 222 | + <button type="button" class="btn btn-default" ng-click="ctrl.scrapDate_open()"> | ||
| 223 | + <i class="glyphicon glyphicon-calendar"></i> | ||
| 224 | + </button> | ||
| 225 | + </span> | ||
| 226 | + </div> | ||
| 227 | + </div> | ||
| 228 | + </div> | ||
| 229 | + <div class="form-group"> | ||
| 230 | + <label class="col-md-2 control-label">厂牌型号1:</label> | ||
| 231 | + <div class="col-md-4"> | ||
| 232 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.makeCodeOne" | ||
| 233 | + placeholder="请输入厂牌型号1"/> | ||
| 234 | + </div> | ||
| 235 | + </div> | ||
| 236 | + <div class="form-group"> | ||
| 237 | + <label class="col-md-2 control-label">厂牌型号2:</label> | ||
| 238 | + <div class="col-md-4"> | ||
| 239 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.makeCodeTwo" | ||
| 240 | + placeholder="请输入厂牌型号2"/> | ||
| 241 | + </div> | ||
| 242 | + </div> | ||
| 243 | + <div class="form-group"> | ||
| 244 | + <label class="col-md-2 control-label">车辆等级标准:</label> | ||
| 245 | + <div class="col-md-4"> | ||
| 246 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carGride" | ||
| 247 | + placeholder="请输入车辆等级标准"/> | ||
| 248 | + </div> | ||
| 249 | + </div> | ||
| 250 | + <div class="form-group"> | ||
| 251 | + <label class="col-md-2 control-label">出厂排放标准:</label> | ||
| 252 | + <div class="col-md-4"> | ||
| 253 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.emissionsStandard" | ||
| 254 | + placeholder="请输入出场排放标准"/> | ||
| 255 | + </div> | ||
| 256 | + </div> | ||
| 257 | + <div class="form-group"> | ||
| 258 | + <label class="col-md-2 control-label">发动机号码1:</label> | ||
| 259 | + <div class="col-md-4"> | ||
| 260 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.engineCodeOne" | ||
| 261 | + placeholder="请输入发动机号码1"/> | ||
| 262 | + </div> | ||
| 263 | + </div> | ||
| 264 | + <div class="form-group"> | ||
| 265 | + <label class="col-md-2 control-label">发动机号码2:</label> | ||
| 266 | + <div class="col-md-4"> | ||
| 267 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.engineCodeTwo" | ||
| 268 | + placeholder="请输入发动机号码2"/> | ||
| 269 | + </div> | ||
| 270 | + </div> | ||
| 271 | + <div class="form-group"> | ||
| 272 | + <label class="col-md-2 control-label">车架号码1:</label> | ||
| 273 | + <div class="col-md-4"> | ||
| 274 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carNumberOne" | ||
| 275 | + placeholder="请输入车架号码1"/> | ||
| 276 | + </div> | ||
| 277 | + </div> | ||
| 278 | + <div class="form-group"> | ||
| 279 | + <label class="col-md-2 control-label">车架号码2:</label> | ||
| 280 | + <div class="col-md-4"> | ||
| 281 | + <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carNumberTwo" | ||
| 282 | + placeholder="请输入车架号码2"/> | ||
| 283 | + </div> | ||
| 284 | + </div> | ||
| 285 | + <div class="form-group"> | ||
| 286 | + <label class="col-md-2 control-label">启用日期:</label> | ||
| 287 | + <div class="col-md-4"> | ||
| 288 | + <div class="input-group"> | ||
| 289 | + <input type="text" class="form-control" | ||
| 290 | + name="openDate" placeholder="请选择启用日期..." | ||
| 291 | + uib-datepicker-popup="yyyy年MM月dd日" | ||
| 292 | + is-open="ctrl.openDateOpen" | ||
| 293 | + ng-model="ctrl.busInfoForSave.openDate"/> | ||
| 294 | + <span class="input-group-btn"> | ||
| 295 | + <button type="button" class="btn btn-default" ng-click="ctrl.openDate_open()"> | ||
| 296 | + <i class="glyphicon glyphicon-calendar"></i> | ||
| 297 | + </button> | ||
| 298 | + </span> | ||
| 299 | + </div> | ||
| 300 | + </div> | ||
| 301 | + </div> | ||
| 302 | + <div class="form-group"> | ||
| 303 | + <label class="col-md-2 control-label">取消日期:</label> | ||
| 304 | + <div class="col-md-4"> | ||
| 305 | + <div class="input-group"> | ||
| 306 | + <input type="text" class="form-control" | ||
| 307 | + name="closeDate" placeholder="请选择取消日期..." | ||
| 308 | + uib-datepicker-popup="yyyy年MM月dd日" | ||
| 309 | + is-open="ctrl.closeDateOpen" | ||
| 310 | + ng-model="ctrl.busInfoForSave.closeDate"/> | ||
| 311 | + <span class="input-group-btn"> | ||
| 312 | + <button type="button" class="btn btn-default" ng-click="ctrl.closeDate_open()"> | ||
| 313 | + <i class="glyphicon glyphicon-calendar"></i> | ||
| 314 | + </button> | ||
| 315 | + </span> | ||
| 316 | + </div> | ||
| 317 | + </div> | ||
| 318 | + </div> | ||
| 319 | + | ||
| 320 | + <div class="form-group"> | ||
| 321 | + <label class="col-md-2 control-label">是否空调车:</label> | ||
| 322 | + <div class="col-md-3"> | ||
| 323 | + <label class="radio-inline"> | ||
| 324 | + <input type="radio" name="hvacCar" | ||
| 325 | + ng-value="true" ng-model="ctrl.busInfoForSave.hvacCar"/>是 | ||
| 326 | + </label> | ||
| 327 | + <label class="radio-inline"> | ||
| 328 | + <input type="radio" name="hvacCar" | ||
| 329 | + ng-value="false" ng-model="ctrl.busInfoForSave.hvacCar"/>否 | ||
| 330 | + </label> | ||
| 331 | + </div> | ||
| 332 | + </div> | ||
| 333 | + | ||
| 334 | + <div class="form-group"> | ||
| 335 | + <label class="col-md-2 control-label">有无人售票:</label> | ||
| 336 | + <div class="col-md-3"> | ||
| 337 | + <label class="radio-inline"> | ||
| 338 | + <input type="radio" name="ticketType" | ||
| 339 | + ng-value="true" ng-model="ctrl.busInfoForSave.ticketType"/>是 | ||
| 340 | + </label> | ||
| 341 | + <label class="radio-inline"> | ||
| 342 | + <input type="radio" name="ticketType" | ||
| 343 | + ng-value="false" ng-model="ctrl.busInfoForSave.ticketType"/>否 | ||
| 344 | + </label> | ||
| 345 | + </div> | ||
| 346 | + </div> | ||
| 347 | + | ||
| 348 | + <div class="form-group"> | ||
| 349 | + <label class="col-md-2 control-label">是否有LED服务屏:</label> | ||
| 350 | + <div class="col-md-3"> | ||
| 351 | + <label class="radio-inline"> | ||
| 352 | + <input type="radio" name="ledScreen" | ||
| 353 | + ng-value="true" ng-model="ctrl.busInfoForSave.ledScreen"/>是 | ||
| 354 | + </label> | ||
| 355 | + <label class="radio-inline"> | ||
| 356 | + <input type="radio" name="ledScreen" | ||
| 357 | + ng-value="false" ng-model="ctrl.busInfoForSave.ledScreen"/>否 | ||
| 358 | + </label> | ||
| 359 | + </div> | ||
| 360 | + </div> | ||
| 361 | + | ||
| 362 | + <div class="form-group"> | ||
| 363 | + <label class="col-md-2 control-label">是否有TV视屏:</label> | ||
| 364 | + <div class="col-md-3"> | ||
| 365 | + <label class="radio-inline"> | ||
| 366 | + <input type="radio" name="tvVideoType" | ||
| 367 | + ng-value="true" ng-model="ctrl.busInfoForSave.tvVideoType"/>是 | ||
| 368 | + </label> | ||
| 369 | + <label class="radio-inline"> | ||
| 370 | + <input type="radio" name="tvVideoType" | ||
| 371 | + ng-value="false" ng-model="ctrl.busInfoForSave.tvVideoType"/>否 | ||
| 372 | + </label> | ||
| 373 | + </div> | ||
| 374 | + </div> | ||
| 375 | + | ||
| 376 | + <div class="form-group"> | ||
| 377 | + <label class="col-md-2 control-label">车辆类型:</label> | ||
| 378 | + <div class="col-md-3"> | ||
| 379 | + <div class="input-group"> | ||
| 380 | + <ui-select ng-model="ctrl.busInfoForSave.carType_selected" | ||
| 381 | + on-select="ctrl.carType_selected_change($item, $model)" | ||
| 382 | + theme="bootstrap" name="carType"> | ||
| 383 | + <ui-select-match placeholder="请选择车辆类型...">{{$select.selected.type}}</ui-select-match> | ||
| 384 | + <ui-select-choices repeat="item in ctrl.carTypes"> | ||
| 385 | + <span ng-bind="item.type"></span> | ||
| 386 | + </ui-select-choices> | ||
| 387 | + </ui-select> | ||
| 388 | + <span class="input-group-btn"> | ||
| 389 | + <button type="button" ng-click="ctrl.carType_selected_remove()" class="btn btn-default"> | ||
| 390 | + <span class="glyphicon glyphicon-trash"></span> | ||
| 391 | + </button> | ||
| 392 | + </span> | ||
| 393 | + </div> | ||
| 394 | + </div> | ||
| 395 | + </div> | ||
| 396 | + | ||
| 397 | + <div class="form-group"> | ||
| 398 | + <label class="col-md-2 control-label">是否机动车:</label> | ||
| 399 | + <div class="col-md-3"> | ||
| 400 | + <div class="input-group"> | ||
| 401 | + <ui-select ng-model="ctrl.busInfoForSave.vehicleStats_selected" | ||
| 402 | + on-select="ctrl.vehicleStats_selected_change($item, $model)" | ||
| 403 | + theme="bootstrap" name="vehicleStats"> | ||
| 404 | + <ui-select-match placeholder="请选择机动车类型...">{{$select.selected.type}}</ui-select-match> | ||
| 405 | + <ui-select-choices repeat="item in ctrl.vehicleStates"> | ||
| 406 | + <span ng-bind="item.type"></span> | ||
| 407 | + </ui-select-choices> | ||
| 408 | + </ui-select> | ||
| 409 | + <span class="input-group-btn"> | ||
| 410 | + <button type="button" ng-click="ctrl.vehicleStats_selected_remove()" class="btn btn-default"> | ||
| 411 | + <span class="glyphicon glyphicon-trash"></span> | ||
| 412 | + </button> | ||
| 413 | + </span> | ||
| 414 | + </div> | ||
| 415 | + </div> | ||
| 416 | + </div> | ||
| 417 | + | ||
| 418 | + <div class="form-group"> | ||
| 419 | + <label class="col-md-2 control-label">营运状态:</label> | ||
| 420 | + <div class="col-md-3"> | ||
| 421 | + <div class="input-group"> | ||
| 422 | + <ui-select ng-model="ctrl.busInfoForSave.operatorsState_selected" | ||
| 423 | + on-select="ctrl.operatorsState_selected_change($item, $model)" | ||
| 424 | + theme="bootstrap" name="operatorsState"> | ||
| 425 | + <ui-select-match placeholder="请选择营运状态...">{{$select.selected.type}}</ui-select-match> | ||
| 426 | + <ui-select-choices repeat="item in ctrl.operatorsStates"> | ||
| 427 | + <span ng-bind="item.type"></span> | ||
| 428 | + </ui-select-choices> | ||
| 429 | + </ui-select> | ||
| 430 | + <span class="input-group-btn"> | ||
| 431 | + <button type="button" ng-click="ctrl.operatorsState_selected_remove()" class="btn btn-default"> | ||
| 432 | + <span class="glyphicon glyphicon-trash"></span> | ||
| 433 | + </button> | ||
| 434 | + </span> | ||
| 435 | + </div> | ||
| 436 | + </div> | ||
| 437 | + </div> | ||
| 438 | + | ||
| 439 | + <div class="form-group"> | ||
| 440 | + <label class="col-md-2 control-label">是否电车:</label> | ||
| 441 | + <div class="col-md-3"> | ||
| 442 | + <label class="radio-inline"> | ||
| 443 | + <input type="radio" name="sfdc" | ||
| 444 | + ng-value="true" ng-model="ctrl.busInfoForSave.sfdc"/>是 | ||
| 445 | + </label> | ||
| 446 | + <label class="radio-inline"> | ||
| 447 | + <input type="radio" name="sfdc" | ||
| 448 | + ng-value="false" ng-model="ctrl.busInfoForSave.sfdc"/>否 | ||
| 449 | + </label> | ||
| 450 | + </div> | ||
| 451 | + </div> | ||
| 452 | + | ||
| 453 | + <div class="form-group"> | ||
| 454 | + <label class="col-md-2 control-label">备注:</label> | ||
| 455 | + <div class="col-md-10"> | ||
| 456 | + <textarea rows="3" class="form-control" name="descriptions" | ||
| 457 | + ng-model="ctrl.busInfoForSave.descriptions"></textarea> | ||
| 458 | + </div> | ||
| 459 | + </div> | ||
| 460 | + | ||
| 461 | + | ||
| 462 | + <!-- 其他form-group --> | ||
| 463 | + | ||
| 464 | + </div> | ||
| 465 | + | ||
| 466 | + <div class="form-actions"> | ||
| 467 | + <div class="row"> | ||
| 468 | + <div class="col-md-offset-3 col-md-4"> | ||
| 469 | + <button type="submit" class="btn green" ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | ||
| 470 | + <a type="button" class="btn default" ui-sref="busInfoManage" ><i class="fa fa-times"></i> 取消</a> | ||
| 471 | + </div> | ||
| 472 | + </div> | ||
| 473 | + </div> | ||
| 474 | + | ||
| 475 | + </form> | ||
| 476 | + | ||
| 477 | + </div> | ||
| 478 | + | ||
| 479 | + | ||
| 480 | +</div> | ||
| 0 | \ No newline at end of file | 481 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/form.html
| @@ -125,7 +125,8 @@ | @@ -125,7 +125,8 @@ | ||
| 125 | <label class="col-md-2 control-label">设备供应厂商*:</label> | 125 | <label class="col-md-2 control-label">设备供应厂商*:</label> |
| 126 | <div class="col-md-3"> | 126 | <div class="col-md-3"> |
| 127 | <div class="input-group"> | 127 | <div class="input-group"> |
| 128 | - <ui-select ng-model="ctrl.busInfoForSave.supplierName_Selected" | 128 | + <ui-select ng-model="ctrl.busInfoForSave.supplierName_selected" |
| 129 | + on-select="ctrl.supplierName_selected_change($item, $model)" | ||
| 129 | theme="bootstrap" name="supplierName" required> | 130 | theme="bootstrap" name="supplierName" required> |
| 130 | <ui-select-match placeholder="请选择设备厂商...">{{$select.selected.name}}</ui-select-match> | 131 | <ui-select-match placeholder="请选择设备厂商...">{{$select.selected.name}}</ui-select-match> |
| 131 | <ui-select-choices repeat="item in ctrl.supplierNames"> | 132 | <ui-select-choices repeat="item in ctrl.supplierNames"> |
| @@ -133,7 +134,7 @@ | @@ -133,7 +134,7 @@ | ||
| 133 | </ui-select-choices> | 134 | </ui-select-choices> |
| 134 | </ui-select> | 135 | </ui-select> |
| 135 | <span class="input-group-btn"> | 136 | <span class="input-group-btn"> |
| 136 | - <button type="button" ng-click="ctrl.busInfoForSave.supplierName_Selected = null" class="btn btn-default"> | 137 | + <button type="button" ng-click="ctrl.supplierName_selected_remove()" class="btn btn-default"> |
| 137 | <span class="glyphicon glyphicon-trash"></span> | 138 | <span class="glyphicon glyphicon-trash"></span> |
| 138 | </button> | 139 | </button> |
| 139 | </span> | 140 | </span> |
| @@ -376,14 +377,16 @@ | @@ -376,14 +377,16 @@ | ||
| 376 | <label class="col-md-2 control-label">车辆类型:</label> | 377 | <label class="col-md-2 control-label">车辆类型:</label> |
| 377 | <div class="col-md-3"> | 378 | <div class="col-md-3"> |
| 378 | <div class="input-group"> | 379 | <div class="input-group"> |
| 379 | - <ui-select ng-model="ctrl.busInfoForSave.carType_Selected" theme="bootstrap"> | 380 | + <ui-select ng-model="ctrl.busInfoForSave.carType_selected" |
| 381 | + on-select="ctrl.carType_selected_change($item, $model)" | ||
| 382 | + theme="bootstrap" name="carType"> | ||
| 380 | <ui-select-match placeholder="请选择车辆类型...">{{$select.selected.type}}</ui-select-match> | 383 | <ui-select-match placeholder="请选择车辆类型...">{{$select.selected.type}}</ui-select-match> |
| 381 | <ui-select-choices repeat="item in ctrl.carTypes"> | 384 | <ui-select-choices repeat="item in ctrl.carTypes"> |
| 382 | <span ng-bind="item.type"></span> | 385 | <span ng-bind="item.type"></span> |
| 383 | </ui-select-choices> | 386 | </ui-select-choices> |
| 384 | </ui-select> | 387 | </ui-select> |
| 385 | <span class="input-group-btn"> | 388 | <span class="input-group-btn"> |
| 386 | - <button type="button" ng-click="ctrl.busInfoForSave.carType_Selected = null" class="btn btn-default"> | 389 | + <button type="button" ng-click="ctrl.carType_selected_remove()" class="btn btn-default"> |
| 387 | <span class="glyphicon glyphicon-trash"></span> | 390 | <span class="glyphicon glyphicon-trash"></span> |
| 388 | </button> | 391 | </button> |
| 389 | </span> | 392 | </span> |
| @@ -395,14 +398,16 @@ | @@ -395,14 +398,16 @@ | ||
| 395 | <label class="col-md-2 control-label">是否机动车:</label> | 398 | <label class="col-md-2 control-label">是否机动车:</label> |
| 396 | <div class="col-md-3"> | 399 | <div class="col-md-3"> |
| 397 | <div class="input-group"> | 400 | <div class="input-group"> |
| 398 | - <ui-select ng-model="ctrl.busInfoForSave.vehicleStats_Selected" theme="bootstrap"> | 401 | + <ui-select ng-model="ctrl.busInfoForSave.vehicleStats_Selected" |
| 402 | + on-select="ctrl.vehicleStats_selected_change($item, $model)" | ||
| 403 | + theme="bootstrap" name="vehicleStats"> | ||
| 399 | <ui-select-match placeholder="请选择机动车类型...">{{$select.selected.type}}</ui-select-match> | 404 | <ui-select-match placeholder="请选择机动车类型...">{{$select.selected.type}}</ui-select-match> |
| 400 | <ui-select-choices repeat="item in ctrl.vehicleStates"> | 405 | <ui-select-choices repeat="item in ctrl.vehicleStates"> |
| 401 | <span ng-bind="item.type"></span> | 406 | <span ng-bind="item.type"></span> |
| 402 | </ui-select-choices> | 407 | </ui-select-choices> |
| 403 | </ui-select> | 408 | </ui-select> |
| 404 | <span class="input-group-btn"> | 409 | <span class="input-group-btn"> |
| 405 | - <button type="button" ng-click="ctrl.busInfoForSave.vehicleStats_Selected = null" class="btn btn-default"> | 410 | + <button type="button" ng-click="ctrl.vehicleStats_selected_remove()" class="btn btn-default"> |
| 406 | <span class="glyphicon glyphicon-trash"></span> | 411 | <span class="glyphicon glyphicon-trash"></span> |
| 407 | </button> | 412 | </button> |
| 408 | </span> | 413 | </span> |
| @@ -414,14 +419,16 @@ | @@ -414,14 +419,16 @@ | ||
| 414 | <label class="col-md-2 control-label">营运状态:</label> | 419 | <label class="col-md-2 control-label">营运状态:</label> |
| 415 | <div class="col-md-3"> | 420 | <div class="col-md-3"> |
| 416 | <div class="input-group"> | 421 | <div class="input-group"> |
| 417 | - <ui-select ng-model="ctrl.busInfoForSave.operatorsState_Selected" theme="bootstrap"> | 422 | + <ui-select ng-model="ctrl.busInfoForSave.operatorsState_Selected" |
| 423 | + on-select="ctrl.operatorsState_selected_change($item, $model)" | ||
| 424 | + theme="bootstrap" name="operatorsState"> | ||
| 418 | <ui-select-match placeholder="请选择营运状态...">{{$select.selected.type}}</ui-select-match> | 425 | <ui-select-match placeholder="请选择营运状态...">{{$select.selected.type}}</ui-select-match> |
| 419 | <ui-select-choices repeat="item in ctrl.operatorsStates"> | 426 | <ui-select-choices repeat="item in ctrl.operatorsStates"> |
| 420 | <span ng-bind="item.type"></span> | 427 | <span ng-bind="item.type"></span> |
| 421 | </ui-select-choices> | 428 | </ui-select-choices> |
| 422 | </ui-select> | 429 | </ui-select> |
| 423 | <span class="input-group-btn"> | 430 | <span class="input-group-btn"> |
| 424 | - <button type="button" ng-click="ctrl.busInfoForSave.operatorsState_Selected = null" class="btn btn-default"> | 431 | + <button type="button" ng-click="ctrl.operatorsState_selected_remove()" class="btn btn-default"> |
| 425 | <span class="glyphicon glyphicon-trash"></span> | 432 | <span class="glyphicon glyphicon-trash"></span> |
| 426 | </button> | 433 | </button> |
| 427 | </span> | 434 | </span> |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/list.html
| @@ -97,7 +97,7 @@ | @@ -97,7 +97,7 @@ | ||
| 97 | <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> | 97 | <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> |
| 98 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> | 98 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> |
| 99 | <a ui-sref="busInfoManage_detail({id: info.id})" class="btn default blue-stripe btn-sm"> 详细 </a> | 99 | <a ui-sref="busInfoManage_detail({id: info.id})" class="btn default blue-stripe btn-sm"> 详细 </a> |
| 100 | - <a href="#" class="btn default blue-stripe btn-sm"> 修改 </a> | 100 | + <a ui-sref="busInfoManage_edit({id: info.id})" class="btn default blue-stripe btn-sm"> 修改 </a> |
| 101 | </td> | 101 | </td> |
| 102 | </tr> | 102 | </tr> |
| 103 | </tbody> | 103 | </tbody> |
src/main/resources/static/pages/scheduleApp/module/main.js
| @@ -87,6 +87,25 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi | @@ -87,6 +87,25 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi | ||
| 87 | }] | 87 | }] |
| 88 | } | 88 | } |
| 89 | }) | 89 | }) |
| 90 | + .state("busInfoManage_edit", { | ||
| 91 | + url: '/busInfoManage_edit/:id', | ||
| 92 | + views: { | ||
| 93 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/edit.html'} | ||
| 94 | + }, | ||
| 95 | + resolve: { | ||
| 96 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 97 | + return $ocLazyLoad.load({ | ||
| 98 | + name: 'busInfoManage_edit_module', | ||
| 99 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 100 | + files: [ | ||
| 101 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 102 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 103 | + "pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js" | ||
| 104 | + ] | ||
| 105 | + }); | ||
| 106 | + }] | ||
| 107 | + } | ||
| 108 | + }) | ||
| 90 | .state("busInfoManage_detail", { | 109 | .state("busInfoManage_detail", { |
| 91 | url: '/busInfoManage_detail/:id', | 110 | url: '/busInfoManage_detail/:id', |
| 92 | views: { | 111 | views: { |
| @@ -237,7 +256,7 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi | @@ -237,7 +256,7 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi | ||
| 237 | angular.module('ScheduleApp').factory('BusInfoManageService_g', ['$resource', function($resource) { | 256 | angular.module('ScheduleApp').factory('BusInfoManageService_g', ['$resource', function($resource) { |
| 238 | return $resource( | 257 | return $resource( |
| 239 | '/cars/:id', | 258 | '/cars/:id', |
| 240 | - {order: 'carCode', direction: 'ASC', id: '@id'}, | 259 | + {order: 'carCode', direction: 'ASC', id: '@id_route'}, |
| 241 | { | 260 | { |
| 242 | list: { | 261 | list: { |
| 243 | method: 'GET', | 262 | method: 'GET', |
| @@ -247,6 +266,9 @@ angular.module('ScheduleApp').factory('BusInfoManageService_g', ['$resource', fu | @@ -247,6 +266,9 @@ angular.module('ScheduleApp').factory('BusInfoManageService_g', ['$resource', fu | ||
| 247 | }, | 266 | }, |
| 248 | get: { | 267 | get: { |
| 249 | method: 'GET' | 268 | method: 'GET' |
| 269 | + }, | ||
| 270 | + save: { | ||
| 271 | + method: 'POST' | ||
| 250 | } | 272 | } |
| 251 | } | 273 | } |
| 252 | ); | 274 | ); |