From 2bc68b845667f2bdab7b2172bbc0688b2def5fce Mon Sep 17 00:00:00 2001 From: yuan <1551130722@qq.com> Date: Thu, 15 Mar 2018 17:41:16 +0800 Subject: [PATCH] fix~ --- .../core/impls/AppActServiceImp.java | 1 + src/main/ui/static/actapp/app_act_list.js | 11 ++++- .../actapp/templates/act_app_detail.html | 42 +++++++++++-------- .../static/actapp/templates/act_app_list.html | 2 +- 4 files changed, 37 insertions(+), 19 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/activities/app_index/core/impls/AppActServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/activities/app_index/core/impls/AppActServiceImp.java index e3221c19a..5a78e66de 100644 --- a/src/main/java/au/com/royalpay/payment/manage/activities/app_index/core/impls/AppActServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/activities/app_index/core/impls/AppActServiceImp.java @@ -48,6 +48,7 @@ public class AppActServiceImp implements AppActService { Assert.notNull(act); JSONObject params = appActBean.toJsonParam(); params.put("act_id",act_id); + params.put("update_time",new Date()); actAppMapper.updateAct(params); } diff --git a/src/main/ui/static/actapp/app_act_list.js b/src/main/ui/static/actapp/app_act_list.js index 2876874e3..2ba083d6c 100644 --- a/src/main/ui/static/actapp/app_act_list.js +++ b/src/main/ui/static/actapp/app_act_list.js @@ -47,7 +47,16 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS }]); app.controller('appActNewCtrl', ['$rootScope', '$scope', '$http', 'commonDialog','$state', function ($rootScope, $scope, $http, commonDialog,$state) { $scope.actDetail = {}; - $scope.submit = function () { + $scope.submit = function (form) { + $scope.errmsg = null; + if (form.$invalid) { + angular.forEach(form, function (item, key) { + if (key.indexOf('$') < 0) { + item.$dirty = true; + } + }); + return; + } $http.put('/manager/app/act/new', $scope.actDetail).then(function (resp) { commonDialog.alert({title: 'Success', content: '新增成功', type: 'success'}); $state.go('^.detail',{act_id:resp.data.act_id},{reload:true}); diff --git a/src/main/ui/static/actapp/templates/act_app_detail.html b/src/main/ui/static/actapp/templates/act_app_detail.html index 265da8191..9ab3fa610 100644 --- a/src/main/ui/static/actapp/templates/act_app_detail.html +++ b/src/main/ui/static/actapp/templates/act_app_detail.html @@ -18,29 +18,37 @@
-
-
+
+
+ for="actDetail.act_name">Title *
- + +
+

Title is required

+
+
-
- +
+
- + +
+

Desc is required

+
- +
@@ -72,11 +80,11 @@
@@ -98,17 +106,17 @@
-
-
-
+
diff --git a/src/main/ui/static/actapp/templates/act_app_list.html b/src/main/ui/static/actapp/templates/act_app_list.html index 080e79984..2c20099ed 100644 --- a/src/main/ui/static/actapp/templates/act_app_list.html +++ b/src/main/ui/static/actapp/templates/act_app_list.html @@ -20,7 +20,7 @@