Commit b63832f5bfa03361d467dd8ffbca867424687c9a
1 parent
048bc1fd
PSM-8
Showing
4 changed files
with
225 additions
and
18 deletions
src/main/resources/static/pages/scheduleApp/module/common/prj-common-ui-route-state.js
| @@ -765,7 +765,8 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi | @@ -765,7 +765,8 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi | ||
| 765 | }) | 765 | }) |
| 766 | 766 | ||
| 767 | .state("schedulePlanReportManage_edit", { | 767 | .state("schedulePlanReportManage_edit", { |
| 768 | - url: '/schedulePlanReportManage_edit/:xlid/:sdate/:lp', | 768 | + url: '/schedulePlanReportManage_edit', |
| 769 | + params: {type: 0, groupInfo: null}, | ||
| 769 | views: { | 770 | views: { |
| 770 | "": { | 771 | "": { |
| 771 | templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/edit_report.html' | 772 | templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/edit_report.html' |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/edit_report.html
| 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="schedulePlanReportManage">调度值勤日报</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="SchedulePlanReportManageFormCtrl as ctrl"> | ||
| 26 | + <div class="portlet-title"> | ||
| 27 | + <div class="caption"> | ||
| 28 | + <i class="icon-equalizer font-red-sunglo"></i> | ||
| 29 | + | ||
| 30 | + <span ng-if="ctrl.type == 1" class="caption-subject font-red-sunglo bold uppercase">表单1</span> | ||
| 31 | + <span ng-if="ctrl.type == 2" class="caption-subject font-red-sunglo bold uppercase">表单2</span> | ||
| 32 | + <span ng-if="ctrl.type == 3" class="caption-subject font-red-sunglo bold uppercase">表单3</span> | ||
| 33 | + <span ng-if="ctrl.type == 4" class="caption-subject font-red-sunglo bold uppercase">表单4</span> | ||
| 34 | + <span ng-if="ctrl.type == 5" class="caption-subject font-red-sunglo bold uppercase">表单5</span> | ||
| 35 | + </div> | ||
| 36 | + </div> | ||
| 37 | + | ||
| 38 | + <div class="portlet-body form"> | ||
| 39 | + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> | ||
| 40 | + <!--<div class="alert alert-danger display-hide">--> | ||
| 41 | + <!--<button class="close" data-close="alert"></button>--> | ||
| 42 | + <!--您的输入有误,请检查下面的输入项--> | ||
| 43 | + <!--</div>--> | ||
| 44 | + | ||
| 45 | + | ||
| 46 | + <!-- 其他信息放置在这里 --> | ||
| 47 | + <div class="form-body"> | ||
| 48 | + <div class="form-group has-success has-feedback"> | ||
| 49 | + <label class="col-md-2 control-label">线路*:</label> | ||
| 50 | + <div class="col-md-3"> | ||
| 51 | + <input type="text" class="form-control" name="xlName" ng-model="ctrl.groupInfo.xlName" readonly/> | ||
| 52 | + </div> | ||
| 53 | + <!-- 隐藏块,显示验证信息 --> | ||
| 54 | + <div class="alert alert-danger well-sm" ng-show="myForm.xlName.$error.required"> | ||
| 55 | + 线路必须选择 | ||
| 56 | + </div> | ||
| 57 | + </div> | ||
| 58 | + <div class="form-group has-success has-feedback"> | ||
| 59 | + <label class="col-md-2 control-label">日期*:</label> | ||
| 60 | + <div class="col-md-3"> | ||
| 61 | + <input type="text" class="form-control" name="scheduleDate" uib-datepicker-popup="yyyy年MM月dd日" ng-model="ctrl.groupInfo.scheduleDate" readonly/> | ||
| 62 | + </div> | ||
| 63 | + <!-- 隐藏块,显示验证信息 --> | ||
| 64 | + <div class="alert alert-danger well-sm" ng-show="myForm.scheduleDate.$error.required"> | ||
| 65 | + 日期不能为空 | ||
| 66 | + </div> | ||
| 67 | + </div> | ||
| 68 | + <div class="form-group has-success has-feedback"> | ||
| 69 | + <label class="col-md-2 control-label">路牌*:</label> | ||
| 70 | + <div class="col-md-3"> | ||
| 71 | + <input type="text" class="form-control" name="lpName" ng-model="ctrl.groupInfo.lpName" readonly/> | ||
| 72 | + </div> | ||
| 73 | + <!-- 隐藏块,显示验证信息 --> | ||
| 74 | + <div class="alert alert-danger well-sm" ng-show="myForm.lpName.$error.required"> | ||
| 75 | + 路牌不能为空 | ||
| 76 | + </div> | ||
| 77 | + </div> | ||
| 78 | + | ||
| 79 | + | ||
| 80 | + | ||
| 81 | + | ||
| 82 | + <div class="form-group has-success has-feedback"> | ||
| 83 | + <label class="col-md-2 control-label">车辆*:</label> | ||
| 84 | + <div class="col-md-3"> | ||
| 85 | + <sa-Select3 model="ctrl.busConfigForSave" | ||
| 86 | + name="cl" | ||
| 87 | + placeholder="请输拼音..." | ||
| 88 | + dcvalue="{{ctrl.busConfigForSave.cl.id}}" | ||
| 89 | + dcname="cl.id" | ||
| 90 | + icname="id" | ||
| 91 | + icnames="insideCode" | ||
| 92 | + datatype="cl" | ||
| 93 | + dataassociate="true" | ||
| 94 | + dataparam="{{ {'businessCode_eq': ctrl.busConfigForSave.xl.company} | json }}" | ||
| 95 | + mlp="true" | ||
| 96 | + required > | ||
| 97 | + </sa-Select3> | ||
| 98 | + </div> | ||
| 99 | + <!-- 隐藏块,显示验证信息 --> | ||
| 100 | + <div class="alert alert-danger well-sm" ng-show="myForm.cl.$error.required"> | ||
| 101 | + 车辆必须选择 | ||
| 102 | + </div> | ||
| 103 | + </div> | ||
| 104 | + | ||
| 105 | + <div class="form-group has-success has-feedback"> | ||
| 106 | + <label class="col-md-2 control-label">启用日期*:</label> | ||
| 107 | + <div class="col-md-3"> | ||
| 108 | + <div class="input-group"> | ||
| 109 | + <input type="text" class="form-control" | ||
| 110 | + name="qyrq" placeholder="请选择启用日期..." | ||
| 111 | + uib-datepicker-popup="yyyy年MM月dd日" | ||
| 112 | + is-open="ctrl.qyrqOpen" required | ||
| 113 | + ng-model="ctrl.busConfigForSave.qyrq" readonly/> | ||
| 114 | + <span class="input-group-btn"> | ||
| 115 | + <button type="button" class="btn btn-default" ng-click="ctrl.qyrq_open()"> | ||
| 116 | + <i class="glyphicon glyphicon-calendar"></i> | ||
| 117 | + </button> | ||
| 118 | + </span> | ||
| 119 | + </div> | ||
| 120 | + </div> | ||
| 121 | + <!-- 隐藏块,显示验证信息 --> | ||
| 122 | + <div class="alert alert-danger well-sm" ng-show="myForm.qyrq.$error.required"> | ||
| 123 | + 启用日期必须选择 | ||
| 124 | + </div> | ||
| 125 | + </div> | ||
| 126 | + | ||
| 127 | + <div class="form-group"> | ||
| 128 | + <label class="col-md-2 control-label">终止日期:</label> | ||
| 129 | + <div class="col-md-3"> | ||
| 130 | + <div class="input-group"> | ||
| 131 | + <input type="text" class="form-control" | ||
| 132 | + name="zzrq" placeholder="请选择启用日期..." | ||
| 133 | + uib-datepicker-popup="yyyy年MM月dd日" | ||
| 134 | + is-open="ctrl.zzrqOpen" | ||
| 135 | + ng-model="ctrl.busConfigForSave.zzrq" readonly/> | ||
| 136 | + <span class="input-group-btn"> | ||
| 137 | + <button type="button" class="btn btn-default" ng-click="ctrl.zzrq_open()"> | ||
| 138 | + <i class="glyphicon glyphicon-calendar"></i> | ||
| 139 | + </button> | ||
| 140 | + </span> | ||
| 141 | + </div> | ||
| 142 | + </div> | ||
| 143 | + </div> | ||
| 144 | + | ||
| 145 | + | ||
| 146 | + <div class="form-group has-success has-feedback"> | ||
| 147 | + <label class="col-md-2 control-label">停车场*:</label> | ||
| 148 | + <div class="col-md-3"> | ||
| 149 | + <input type="text" class="form-control" name="tcd" ng-model="ctrl.busConfigForSave.tcd" required | ||
| 150 | + placeholder="请输入停车场"/> | ||
| 151 | + </div> | ||
| 152 | + <!-- 隐藏块,显示验证信息 --> | ||
| 153 | + <div class="alert alert-danger well-sm" ng-show="myForm.tcd.$error.required"> | ||
| 154 | + 停车场必须填写 | ||
| 155 | + </div> | ||
| 156 | + </div> | ||
| 157 | + | ||
| 158 | + | ||
| 159 | + <!-- 其他form-group --> | ||
| 160 | + | ||
| 161 | + </div> | ||
| 162 | + | ||
| 163 | + <!-- TODO:!myForm.$valid 在这里有点问题,改用以下方法验证 --> | ||
| 164 | + <div class="form-actions"> | ||
| 165 | + <div class="row"> | ||
| 166 | + <div class="col-md-offset-3 col-md-4"> | ||
| 167 | + <button type="submit" class="btn green" | ||
| 168 | + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | ||
| 169 | + <a type="button" class="btn default" ui-sref="busConfig" ><i class="fa fa-times"></i> 取消</a> | ||
| 170 | + </div> | ||
| 171 | + </div> | ||
| 172 | + </div> | ||
| 173 | + | ||
| 174 | + </form> | ||
| 175 | + | ||
| 176 | + </div> | ||
| 177 | + | ||
| 178 | + | ||
| 179 | +</div> | ||
| 0 | \ No newline at end of file | 180 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/list_report.html
| @@ -79,57 +79,57 @@ | @@ -79,57 +79,57 @@ | ||
| 79 | <span ng-bind="info.lpName"></span> | 79 | <span ng-bind="info.lpName"></span> |
| 80 | </td> | 80 | </td> |
| 81 | <td> | 81 | <td> |
| 82 | - <a class="btn btn-success" ng-click="ctrl.goEditForm()"> | 82 | + <a class="btn btn-primary" ng-click="ctrl.goEditForm(1, info)"> |
| 83 | <span ng-bind="info.clZbh"></span> | 83 | <span ng-bind="info.clZbh"></span> |
| 84 | </a> | 84 | </a> |
| 85 | </td> | 85 | </td> |
| 86 | <td> | 86 | <td> |
| 87 | - <a class="btn btn-success" ng-show="info.ccsj1"> | 87 | + <a class="btn btn-info" ng-show="info.ccsj1" ng-click="ctrl.goEditForm(2, info)"> |
| 88 | <span ng-bind="info.ccsj1"></span> | 88 | <span ng-bind="info.ccsj1"></span> |
| 89 | </a> | 89 | </a> |
| 90 | </td> | 90 | </td> |
| 91 | <td> | 91 | <td> |
| 92 | - <a class="btn btn-success" ng-show="info.jsy1Gh"> | 92 | + <a class="btn btn-success" ng-show="info.jsy1Gh" ng-click="ctrl.goEditForm(3, info)"> |
| 93 | <span ng-bind="info.jsy1Gh"></span> | 93 | <span ng-bind="info.jsy1Gh"></span> |
| 94 | </a> | 94 | </a> |
| 95 | </td> | 95 | </td> |
| 96 | <td> | 96 | <td> |
| 97 | - <a class="btn btn-success" ng-show="info.jsy1Name"> | 97 | + <a class="btn btn-success" ng-show="info.jsy1Name" ng-click="ctrl.goEditForm(3, info)"> |
| 98 | <span ng-bind="info.jsy1Name"></span> | 98 | <span ng-bind="info.jsy1Name"></span> |
| 99 | </a> | 99 | </a> |
| 100 | </td> | 100 | </td> |
| 101 | <td> | 101 | <td> |
| 102 | - <a class="btn btn-success" ng-show="info.spy1Gh"> | 102 | + <a class="btn btn-info" ng-show="info.spy1Gh" ng-click="ctrl.goEditForm(3, info)"> |
| 103 | <span ng-bind="info.spy1Gh"></span> | 103 | <span ng-bind="info.spy1Gh"></span> |
| 104 | </a> | 104 | </a> |
| 105 | </td> | 105 | </td> |
| 106 | <td> | 106 | <td> |
| 107 | - <a class="btn btn-success" ng-show="info.spy1Name"> | 107 | + <a class="btn btn-info" ng-show="info.spy1Name" ng-click="ctrl.goEditForm(3, info)"> |
| 108 | <span ng-bind="info.spy1Name"></span> | 108 | <span ng-bind="info.spy1Name"></span> |
| 109 | </a> | 109 | </a> |
| 110 | </td> | 110 | </td> |
| 111 | <td> | 111 | <td> |
| 112 | - <a class="btn btn-success" ng-show="info.ccsj2"> | 112 | + <a class="btn btn-success" ng-show="info.ccsj2" ng-click="ctrl.goEditForm(4, info)"> |
| 113 | <span ng-bind="info.ccsj2"></span> | 113 | <span ng-bind="info.ccsj2"></span> |
| 114 | </a> | 114 | </a> |
| 115 | </td> | 115 | </td> |
| 116 | <td> | 116 | <td> |
| 117 | - <a class="btn btn-success" ng-show="info.jsy2Gh"> | 117 | + <a class="btn btn-info" ng-show="info.jsy2Gh" ng-click="ctrl.goEditForm(5, info)"> |
| 118 | <span ng-bind="info.jsy2Gh"></span> | 118 | <span ng-bind="info.jsy2Gh"></span> |
| 119 | </a> | 119 | </a> |
| 120 | </td> | 120 | </td> |
| 121 | <td> | 121 | <td> |
| 122 | - <a class="btn btn-success" ng-show="info.jsy2Name"> | 122 | + <a class="btn btn-info" ng-show="info.jsy2Name" ng-click="ctrl.goEditForm(5, info)"> |
| 123 | <span ng-bind="info.jsy2Name"></span> | 123 | <span ng-bind="info.jsy2Name"></span> |
| 124 | </a> | 124 | </a> |
| 125 | </td> | 125 | </td> |
| 126 | <td> | 126 | <td> |
| 127 | - <a class="btn btn-success" ng-show="info.spy2Gh"> | 127 | + <a class="btn btn-info" ng-show="info.spy2Gh" ng-click="ctrl.goEditForm(5, info)"> |
| 128 | <span ng-bind="info.spy2Gh"></span> | 128 | <span ng-bind="info.spy2Gh"></span> |
| 129 | </a> | 129 | </a> |
| 130 | </td> | 130 | </td> |
| 131 | <td> | 131 | <td> |
| 132 | - <a class="btn btn-success" ng-show="info.spy2Name"> | 132 | + <a class="btn btn-info" ng-show="info.spy2Name" ng-click="ctrl.goEditForm(5, info)"> |
| 133 | <span ng-bind="info.spy2Name"></span> | 133 | <span ng-bind="info.spy2Name"></span> |
| 134 | </a> | 134 | </a> |
| 135 | </td> | 135 | </td> |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/schedulePlanReportManage.js
| @@ -133,17 +133,44 @@ angular.module('ScheduleApp').controller('SchedulePlanReportManageListCtrl', [ | @@ -133,17 +133,44 @@ angular.module('ScheduleApp').controller('SchedulePlanReportManageListCtrl', [ | ||
| 133 | true | 133 | true |
| 134 | ); | 134 | ); |
| 135 | 135 | ||
| 136 | - // 切换到修改页面 | ||
| 137 | - self.goEditForm = function() { | ||
| 138 | - //$state.go("schedulePlanReportManage_edit"); | 136 | + /** |
| 137 | + * ui-route中param不定义在template-url后,定义在params参数对象中 | ||
| 138 | + * 参数说明,type=更新方式,groupInfo=分组排班信息 | ||
| 139 | + * @param type 1=替换车辆,2=修改出场班次1,3=替换分组人员(驾驶员1和售票员1) | ||
| 140 | + // 有分班的话,4=修改出场班次2,5=修改分组人员(驾驶员2和售票员2) | ||
| 141 | + * @param groupInfo 列表单条数据,表示每条线路,每天,每个路牌谁跑的 | ||
| 142 | + */ | ||
| 143 | + self.goEditForm = function(type, groupInfo) { | ||
| 144 | + $state.go("schedulePlanReportManage_edit", { | ||
| 145 | + type: type, | ||
| 146 | + groupInfo: groupInfo | ||
| 147 | + }); | ||
| 139 | } | 148 | } |
| 140 | 149 | ||
| 141 | } | 150 | } |
| 142 | ]); | 151 | ]); |
| 143 | 152 | ||
| 144 | -angular.module('ScheduleApp').controller('SchedulePlanReportManageFormCtrl', ['SchedulePlanReportManageService', '$stateParams', '$state', function(schedulePlanReportManageService, $stateParams, $state) { | ||
| 145 | - // TODO: | ||
| 146 | -}]); | 153 | +angular.module('ScheduleApp').controller('SchedulePlanReportManageFormCtrl', [ |
| 154 | + 'SchedulePlanReportManageService', | ||
| 155 | + '$stateParams', | ||
| 156 | + '$state', | ||
| 157 | + function(schedulePlanReportManageService, $stateParams, $state) { | ||
| 158 | + var self = this; | ||
| 159 | + | ||
| 160 | + // 传过来的值 | ||
| 161 | + var type_src = $stateParams.type; | ||
| 162 | + var groupInfo_src = $stateParams.groupInfo; | ||
| 163 | + | ||
| 164 | + // 欲修改的groupInfo值 | ||
| 165 | + self.groupInfo = {}; | ||
| 166 | + self.type = type_src; | ||
| 167 | + angular.copy(groupInfo_src, self.groupInfo); | ||
| 168 | + | ||
| 169 | + | ||
| 170 | + | ||
| 171 | + | ||
| 172 | + } | ||
| 173 | +]); | ||
| 147 | 174 | ||
| 148 | angular.module('ScheduleApp').controller('SchedulePlanReportManageDetailCtrl', ['SchedulePlanReportManageService', '$stateParams', function(schedulePlanReportManageService, $stateParams) { | 175 | angular.module('ScheduleApp').controller('SchedulePlanReportManageDetailCtrl', ['SchedulePlanReportManageService', '$stateParams', function(schedulePlanReportManageService, $stateParams) { |
| 149 | // TODO: | 176 | // TODO: |