master
wangning 7 years ago
commit 39f1cf3b4d

@ -13,7 +13,7 @@ import java.text.SimpleDateFormat;
* *
*/ */
public class NoticeInfo { public class NoticeInfo {
private final DateFormat format = new SimpleDateFormat("yyyyMMdd"); private final DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
@NotNull @NotNull
private String title; private String title;
private String desc; private String desc;

@ -102,7 +102,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
} }
var notice = angular.copy($scope.notice); var notice = angular.copy($scope.notice);
if (notice.end_time) { if (notice.end_time) {
notice.end_time = $filter('date')(notice.end_time, 'yyyyMMdd') notice.end_time = $filter('date')(notice.end_time, 'yyyy-MM-dd')
} }
if (notice.merchants_type == 1) { if (notice.merchants_type == 1) {
if (notice.send_clients.length == 0) { if (notice.send_clients.length == 0) {
@ -189,7 +189,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
$scope.saveNoticeResult = false; $scope.saveNoticeResult = false;
commonDialog.alert({title: 'Success', content: 'Send a notice successfully', type: 'success'}); commonDialog.alert({title: 'Success', content: 'Send a notice successfully', type: 'success'});
$scope.$close(); $scope.$close();
$state.go('notice.detail', {notice_id: $scope.notice.notice_id}) $state.go('^.detail', {notice_id: $scope.notice.notice_id},{reload:true})
}, function (resp) { }, function (resp) {
$scope.saveNoticeResult = false; $scope.saveNoticeResult = false;
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
@ -220,7 +220,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
} }
var notice = angular.copy($scope.notice); var notice = angular.copy($scope.notice);
if (notice.end_time) { if (notice.end_time) {
notice.end_time = $filter('date')(notice.end_time, 'yyyyMMdd') notice.end_time = $filter('date')(notice.end_time, 'yyyy-MM-dd')
} else { } else {
if (notice.status == '1') { if (notice.status == '1') {
$scope.notice.status = '0'; $scope.notice.status = '0';

@ -127,6 +127,7 @@
</div> </div>
<div class="btn-group margin-bottom margin-top"> <div class="btn-group margin-bottom margin-top">
<button class="btn btn-success" type="button" ng-click="save(noticeForm)">Save</button> <button class="btn btn-success" type="button" ng-click="save(noticeForm)">Save</button>
<button class="btn btn-warning" type="button" ui-sref="notice">Cancel</button>
<!--<button ng-if="notice.status=='0'|| notice.status==null" class="btn btn-danger" type="button"--> <!--<button ng-if="notice.status=='0'|| notice.status==null" class="btn btn-danger" type="button"-->
<!--ng-click="notice.status='1';save(noticeForm)">Send--> <!--ng-click="notice.status='1';save(noticeForm)">Send-->
<!--</button>--> <!--</button>-->

Loading…
Cancel
Save