Kaynağa Gözat

活动报名

lizeyu 5 ay önce
ebeveyn
işleme
75187d14e6

+ 3 - 3
src/main/resources/mapping/PfPracticalActivityCQuery.xml

@@ -54,14 +54,14 @@
         </if>
         <choose>
             <when test="beginDate!=null and endDate!=null ">
-                and (ppa.begin_the_registration_time <![CDATA[ <= ]]> #{endDate} and ppa.end_the_registration_time
+                and (ppa.begin_date <![CDATA[ <= ]]> #{endDate} and ppa.end_date
                 <![CDATA[ >= ]]> #{beginDate})
             </when>
             <when test="beginDate!=null">
-                and ppa.begin_the_registration_time <![CDATA[ >= ]]> #{beginDate}
+                and ppa.begin_date <![CDATA[ >= ]]> #{beginDate}
             </when>
             <when test="endDate!=null">
-                and ppa.end_the_registration_time <![CDATA[ <= ]]> #{endDate}
+                and ppa.end_date <![CDATA[ <= ]]> #{endDate}
             </when>
         </choose>
         order by ppa.create_time desc

+ 6 - 0
src/main/resources/static/app/main/css/gt_style.css

@@ -95,6 +95,12 @@ body {
     width: 18% !important;
 }
 
+
+/*dj-table4*/
+.dj-formtable > .dj-table4 > tbody > tr > th {
+    width: 6%;
+}
+
 /*dj-table-list*/
 .dj-formtable > .dj-table-list > tbody > tr > th {
     width: auto !important;

+ 8 - 6
src/main/resources/static/app/main/partylife/practicalActivity/detail.html

@@ -4,26 +4,28 @@
         <div class="card">
                 <div panel-title data-title="'基础信息'"></div>
                 <div class="dj-formtable">
-                    <table class="dj-table dj-table3">
+                    <table class="dj-table dj-table4">
                         <tr>
                             <th>活动类别</th>
                             <td>{{dataModel.activityTypeName}}</td>
                             <th>活动主题</th>
                             <td>{{dataModel.activityName}}</td>
-                            <th>活动举办时间</th>
-                            <td>{{dataModel.beginDate | date:'yyyy-MM-dd'}}~{{dataModel.endDate | date:'yyyy-MM-dd'}}</td>
                         </tr>
                         <tr>
-                            <th>活动地点</th>
-                            <td>{{dataModel.address}}</td>
+                            <th>活动举办时间</th>
+                            <td>{{dataModel.beginDate | date:'yyyy-MM-dd'}}~{{dataModel.endDate | date:'yyyy-MM-dd'}}</td>
                             <th>报名时间</th>
                             <td>
                                 {{dataModel.beginTheRegistrationTime | date:'yyyy-MM-dd'}}~{{dataModel.endTheRegistrationTime | date:'yyyy-MM-dd'}}
                             </td>
                         </tr>
+                        <tr>
+                            <th>活动地点</th>
+                            <td colspan="3">{{dataModel.address}}</td>
+                        </tr>
                         <tr>
                             <th>活动备注</th>
-                            <td colspan="5">{{dataModel.remark}}</td>
+                            <td colspan="3">{{dataModel.remark}}</td>
                         </tr>
                     </table>
                 </div>

+ 25 - 23
src/main/resources/static/app/main/partylife/practicalActivity/edit.html

@@ -4,9 +4,9 @@
         <div class="card">
             <form class="form-horizontal" role="form" id="practicalactivityform"
                   name="practicalactivityform" ng-submit="save(practicalactivityform.$valid)" novalidate>
-                <div panel-title data-title="'基础信息'"></div>
+                <div panel-title data-title="'活动基本信息'"></div>
                 <div class="dj-formtable">
-                    <table class="dj-table dj-table3">
+                    <table class="dj-table dj-table4">
                         <tr>
                             <th>活动类别<span style="color:red;">*</span></th>
                             <td ng-class="{ 'has-error' : this.practicalactivityform.activityType.$invalid &&  this.practicalactivityform.$submitted}">
@@ -28,6 +28,8 @@
                                 <span ng-show="this.practicalactivityform.activityName.$invalid &&  this.practicalactivityform.$submitted"
                                       class="error">必填.</span>
                             </td>
+                        </tr>
+                        <tr>
                             <th>活动举办时间<span style="color: red;">*</span></th>
                             <td ng-class="{ 'has-error' : (this.practicalactivityform.beginDate.$invalid || this.practicalactivityform.endDate.$invalid) &&  this.practicalactivityform.$submitted}">
                                 <input style="width: 90px;display: inline;" name="beginDate" class="form-control"
@@ -46,6 +48,26 @@
                                 <span ng-show="(this.practicalactivityform.beginDate.$invalid || this.practicalactivityform.endDate.$invalid) &&  this.practicalactivityform.$submitted"
                                       class="error">必填.</span>
                             </td>
+                            <th>报名时间<span style="color: red;">*</span></th>
+                            <td ng-class="{ 'has-error' : (this.practicalactivityform.beginTheRegistrationTime.$invalid || this.practicalactivityform.endTheRegistrationTime.$invalid) &&  this.practicalactivityform.$submitted}">
+                                <input style="width: 90px;display: inline;" name="beginTheRegistrationTime"
+                                       class="form-control"
+                                       autocomplete="off" autoclose="true"
+                                       data-date-format="yyyy-MM-dd" data-date-type="date"
+                                       ng-model="dataModel.beginTheRegistrationTime"
+                                       ng-required="true"
+                                       placeholder="" bs-datepicker/>
+                                ~
+                                <input style="width: 90px;display: inline;" name="endTheRegistrationTime"
+                                       class="form-control"
+                                       autocomplete="off" autoclose="true"
+                                       data-date-format="yyyy-MM-dd" data-date-type="date"
+                                       ng-model="dataModel.endTheRegistrationTime"
+                                       ng-required="true"
+                                       placeholder="" bs-datepicker/>
+                                <span ng-show="(this.practicalactivityform.beginTheRegistrationTime.$invalid || this.practicalactivityform.endTheRegistrationTime.$invalid) &&  this.practicalactivityform.$submitted"
+                                      class="error">必填.</span>
+                            </td>
                         </tr>
                         <tr>
                             <th>活动地点<span style="color: red;">*</span></th>
@@ -71,30 +93,10 @@
                                           class="error">必填.</span>
                                 </div>
                             </td>
-                            <th>报名时间<span style="color: red;">*</span></th>
-                            <td ng-class="{ 'has-error' : (this.practicalactivityform.beginTheRegistrationTime.$invalid || this.practicalactivityform.endTheRegistrationTime.$invalid) &&  this.practicalactivityform.$submitted}">
-                                <input style="width: 90px;display: inline;" name="beginTheRegistrationTime"
-                                       class="form-control"
-                                       autocomplete="off" autoclose="true"
-                                       data-date-format="yyyy-MM-dd" data-date-type="date"
-                                       ng-model="dataModel.beginTheRegistrationTime"
-                                       ng-required="true"
-                                       placeholder="" bs-datepicker/>
-                                ~
-                                <input style="width: 90px;display: inline;" name="endTheRegistrationTime"
-                                       class="form-control"
-                                       autocomplete="off" autoclose="true"
-                                       data-date-format="yyyy-MM-dd" data-date-type="date"
-                                       ng-model="dataModel.endTheRegistrationTime"
-                                       ng-required="true"
-                                       placeholder="" bs-datepicker/>
-                                <span ng-show="(this.practicalactivityform.beginTheRegistrationTime.$invalid || this.practicalactivityform.endTheRegistrationTime.$invalid) &&  this.practicalactivityform.$submitted"
-                                      class="error">必填.</span>
-                            </td>
                         </tr>
                         <tr>
                             <th>活动备注</th>
-                            <td colspan="5">
+                            <td colspan="3">
                                 <textarea name="remark" ng-model="dataModel.remark" class="form-control"
                                           rows="3"></textarea>
                             </td>

+ 12 - 1
src/main/resources/static/app/main/partylife/practicalActivity/edit.js

@@ -42,7 +42,7 @@
 
         $scope.changeBeginDate = function () {
             if ($scope.dataModel.beginDate) {
-                $scope.dataModel.endTheRegistrationTime = moment($scope.dataModel.beginDate).add(-1, 'days').format("YYYY-MM-DD");
+                $scope.dataModel.endTheRegistrationTime = moment($scope.dataModel.beginDate).add(-1, 'days');
             }
         }
 
@@ -59,6 +59,7 @@
                     $scope.dataModel.beginTheRegistrationTime = $scope.currentDate;
                 }
                 $scope.loadActivityTypes();
+                $scope.getUserAddressList();
             }, function () {
                 $scope.showMsg('错误', '服务器错误');
             });
@@ -71,6 +72,16 @@
                 return false;
             }
 
+            if (moment($scope.dataModel.endDate) < moment($scope.dataModel.beginDate)) {
+                $scope.showMsg('提示', '活动举办结束时间不能小于活动举办开始时间!');
+                return false;
+            }
+
+            if (moment($scope.dataModel.endTheRegistrationTime) < moment($scope.dataModel.beginTheRegistrationTime)) {
+                $scope.showMsg('提示', '报名结束时间不能小于报名开始时间!');
+                return false;
+            }
+
             if (isflag) {
                 $loading.show();
                 $http({