Browse Source

培训班管理

lizeyu 7 months ago
parent
commit
24d1229f19

+ 1 - 1
src/main/resources/static/app/main/partylife/meeting/edit.html

@@ -53,7 +53,7 @@
                                                     name="addressSelect">
                                             </select>
                                         </div>
-                                        <div class="form-line" style="width: 98%;margin-top: -29px;z-index: 9;"
+                                        <div class="form-line" style="width: 97%;margin-top: -29px;z-index: 9;"
                                              ng-class="{ 'focused error' : this.meetingform.address.$invalid &&  this.meetingform.$submitted}">
                                             <input type="text" name="address"
                                                    ng-model="dataModel.address"

+ 1 - 1
src/main/resources/static/app/main/partylife/scyd/edit.html

@@ -53,7 +53,7 @@
                                                     name="addressSelect">
                                             </select>
                                         </div>
-                                        <div class="form-line" style="width: 98%;margin-top: -29px;z-index: 9;"
+                                        <div class="form-line" style="width: 97%;margin-top: -29px;z-index: 9;"
                                              ng-class="{ 'focused error' : this.scydmeetingform.address.$invalid &&  this.scydmeetingform.$submitted}">
                                             <input type="text" name="address"
                                                    ng-model="dataModel.address"

+ 1 - 1
src/main/resources/static/app/main/partylife/tqdflzhy/edit.html

@@ -65,7 +65,7 @@
                                                     name="addressSelect">
                                             </select>
                                         </div>
-                                        <div class="form-line" style="width: 98%;margin-top: -29px;z-index: 9;"
+                                        <div class="form-line" style="width: 97%;margin-top: -29px;z-index: 9;"
                                              ng-class="{ 'focused error' : this.tqdflzhyform.address.$invalid &&  this.tqdflzhyform.$submitted}">
                                             <input type="text" name="address"
                                                    ng-model="dataModel.address"

+ 0 - 1
src/main/resources/static/app/main/train/trainingClass/course.js

@@ -48,7 +48,6 @@
                 $loading.hide();
                 if (result.data.success) {
                     $scope.dataModel = result.data.item;
-
                     $scope.weekStartDate = moment($scope.dataModel.beginDate).startOf('week').add(1, 'day');
                     $scope.weekEndDate = moment($scope.weekStartDate).add(6, 'day');
 

+ 2 - 3
src/main/resources/static/app/main/train/trainingClass/courseEdit.js

@@ -17,9 +17,8 @@ var classCourseEditCtrl = function ($scope, $http, $alert, $loading, AuthUser) {
             $loading.hide();
             if (result.data.success) {
                 $scope.classCourseModel = result.data.item;
-                if($scope.defaultDate){
-                    $scope.classCourseModel.trainingTime = moment($scope.defaultDate).format("YYYY-MM-DD HH:mm");
-                }
+                $scope.classCourseModel.trainingTime =$scope.defaultDate ?
+                    moment($scope.defaultDate).format("YYYY-MM-DD HH:mm") : moment($scope.classCourseModel.trainingTime).format("YYYY-MM-DD HH:mm")
             } else {
                 $scope.showMsg('失败', result.data.msg);
             }

+ 5 - 3
src/main/resources/static/app/main/train/trainingClass/detail.html

@@ -24,12 +24,14 @@
                         <td>
                             {{dataModel.beginDate|date:'yyyy-MM-dd'}}~{{dataModel.endDate|date:'yyyy-MM-dd'}}
                         </td>
-                        <th>录入组织</th>
-                        <td>{{dataModel.dzzmc}}</td>
+                        <th>培训天数</th>
+                        <td>{{dataModel.dateDiffDay}}</td>
                     </tr>
                     <tr>
+                        <th>录入组织</th>
+                        <td>{{dataModel.dzzmc}}</td>
                         <th>培训详情地址</th>
-                        <td colspan="5">{{dataModel.address}}</td>
+                        <td colspan="3">{{dataModel.address}}</td>
                     </tr>
                     <tr>
                         <th>主办部门</th>

+ 8 - 6
src/main/resources/static/app/main/train/trainingClass/edit.html

@@ -51,18 +51,22 @@
                                        autocomplete="off" autoclose="true"
                                        data-date-format="yyyy-MM-dd" data-date-type="date"
                                        ng-model="dataModel.beginDate"
-                                       ng-required="true"
+                                       ng-required="true" ng-change="getDateDiffDay()"
                                        placeholder="" bs-datepicker/>
                                 ~
                                 <input style="width: 90px;display: inline;" name="endDate" class="form-control"
                                        autocomplete="off" autoclose="true"
                                        data-date-format="yyyy-MM-dd" data-date-type="date"
                                        ng-model="dataModel.endDate"
-                                       ng-required="true"
+                                       ng-required="true" ng-change="getDateDiffDay()"
                                        placeholder="" bs-datepicker/>
                                 <span ng-show="(this.trainingClassForm.beginDate.$invalid || this.trainingClassForm.endDate.$invalid) &&  this.trainingClassForm.$submitted"
                                       class="error">必填.</span>
                             </td>
+                            <th>培训天数</th>
+                            <td>{{dataModel.dateDiffDay}}</td>
+                        </tr>
+                        <tr>
                             <th>录入组织<span style="color: red;">*</span></th>
                             <td ng-class="{ 'has-error' : this.trainingClassForm.dzzmc.$invalid &&  this.trainingClassForm.$submitted}">
                                 <div class="input-group input-group-search"
@@ -76,10 +80,8 @@
                                 <span ng-show="this.trainingClassForm.dzzmc.$invalid &&  this.trainingClassForm.$submitted"
                                       class="error">必填.</span>
                             </td>
-                        </tr>
-                        <tr>
                             <th>培训详情地址</th>
-                            <td colspan="5"
+                            <td colspan="3"
                                 ng-class="{ 'has-error' : this.trainingClassForm.address.$invalid &&  this.trainingClassForm.$submitted}">
                                 <div class="form-group" style="margin-bottom: 4px;margin-top: 5px;">
                                     <div class="form-line select-group" style="padding-bottom: 1px;">
@@ -89,7 +91,7 @@
                                                 name="addressSelect">
                                         </select>
                                     </div>
-                                    <div class="form-line" style="width: 98%;margin-top: -29px;z-index: 9;"
+                                    <div class="form-line" style="width: 97%;margin-top: -29px;z-index: 9;"
                                          ng-class="{ 'focused error' : this.trainingClassForm.address.$invalid &&  this.trainingClassForm.$submitted}">
                                         <input type="text" name="address"
                                                ng-model="dataModel.address"

+ 8 - 0
src/main/resources/static/app/main/train/trainingClass/edit.js

@@ -132,6 +132,14 @@
             });
         };
 
+        $scope.getDateDiffDay =function () {
+            if($scope.dataModel.beginDate && $scope.dataModel.endDate){
+                $scope.dataModel.dateDiffDay = moment($scope.dataModel.endDate).diff($scope.dataModel.beginDate, 'days');
+            }else {
+                $scope.dataModel.dateDiffDay = null;
+            }
+        }
+
         //基础信息
         $scope.save = function (isflag) {
             if (!isflag) {