diff --git a/WebRoot/html/ypzs/view/apply.html b/WebRoot/html/ypzs/view/apply.html index 5650ea7..3dd1ab5 100644 --- a/WebRoot/html/ypzs/view/apply.html +++ b/WebRoot/html/ypzs/view/apply.html @@ -173,12 +173,12 @@ url: "/FengHuang/yp/save", data: { "task_id": taskId, "name": fields.name, "xb": fields.xb, "sfzh": fields.sfzh, "bx_id": stageId, "address": fields.address, "father_name": fields.father_name, "mother_name": fields.mother_name, "tel": fields.tel, "uuid": imgId }, success: function (data) { - if (data) { + if (data.success) { window.location = "./success.html"; } else { layer.msg(data.message, { icon: 2, - time: 2500 + time: 3000 }); } } diff --git a/WebRoot/html/ypzs/view/taskManageAdd.html b/WebRoot/html/ypzs/view/taskManageAdd.html index 60c12d8..552c58f 100644 --- a/WebRoot/html/ypzs/view/taskManageAdd.html +++ b/WebRoot/html/ypzs/view/taskManageAdd.html @@ -120,7 +120,7 @@ bxids += key + "," limits += data.field[key] + "," } - }); + }); $.ajax({ @@ -128,7 +128,20 @@ data: { "task_name": taskName, "bx_ids": bxids.substr(0, bxids.length - 1), "limits": limits.substr(0, limits.length - 1) }, type: 'POST', success: function (result) { - console.log(result); + if (result.success) { + layer.msg("成功!", { + icon: 1, + time: 1500 + }, function () { + parent.layer.close(parent.layer.getFrameIndex(window.name)); + parent.parentTableRender(); + }); + } else { + layer.msg(result.message, { + icon: 2, + time: 1000 + }); + } } }); diff --git a/WebRoot/html/ypzs/view/taskManageEdit.html b/WebRoot/html/ypzs/view/taskManageEdit.html index 0bcdafa..de6ad4a 100644 --- a/WebRoot/html/ypzs/view/taskManageEdit.html +++ b/WebRoot/html/ypzs/view/taskManageEdit.html @@ -26,17 +26,10 @@ * - - - - - -
-
@@ -61,8 +54,11 @@ var objResData = {}; + let taskId = GetQueryString("task_id"); + + $.ajax({ - url: "/FengHuang/yp/getTask?task_id=2", + url: "/FengHuang/yp/getTask?task_id=" + taskId, async: false, type: 'GET', success: function (result) { @@ -73,11 +69,10 @@ $.ajax({ - url: "/FengHuang/yp/getBx?task_id=2", + url: "/FengHuang/yp/getBx?task_id=" + taskId, async: false, type: 'GET', success: function (result) { - var childs = []; result.data.forEach((item) => { var obj = {}; @@ -128,7 +123,7 @@ var taskName = ""; var bxids = ""; var limits = ""; - + Object.keys(data.field).forEach((key) => { if (key === "taskName") { taskName = data.field[key]; @@ -141,15 +136,38 @@ $.ajax({ url: "/FengHuang/yp/updateTask", - data: { "task_id": 2, "task_name": taskName, "bx_ids": bxids.substr(0, bxids.length - 1), "limits": limits.substr(0, limits.length - 1) }, + data: { "task_id": taskId, "task_name": taskName, "bx_ids": bxids.substr(0, bxids.length - 1), "limits": limits.substr(0, limits.length - 1) }, type: 'POST', success: function (result) { - console.log(result); + if (result.success) { + layer.msg("成功!", { + icon: 1, + time: 1500 + }, function () { + parent.layer.close(parent.layer.getFrameIndex(window.name)); + parent.parentTableRender(); + }); + } else { + layer.msg(result.message, { + icon: 2, + time: 1000 + }); + } } }); return false; }); + + + function GetQueryString(name, istop) { + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); + var r = window.location.search.substr(1).match(reg); + if (typeof (istop) != "undefined") r = top.location.search.substr(1).match(reg); + + if (r != null) return unescape(r[2]); + return null; + } }); diff --git a/WebRoot/html/ypzs/view/taskManageList.html b/WebRoot/html/ypzs/view/taskManageList.html index affc32c..a056918 100644 --- a/WebRoot/html/ypzs/view/taskManageList.html +++ b/WebRoot/html/ypzs/view/taskManageList.html @@ -8,7 +8,7 @@ - +
@@ -23,17 +23,18 @@ @@ -47,7 +48,7 @@ - + +
+ +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/target/classes/Sql/yp.sql b/target/classes/Sql/yp.sql index c8998b0..038dc46 100644 --- a/target/classes/Sql/yp.sql +++ b/target/classes/Sql/yp.sql @@ -10,6 +10,6 @@ #end #sql("listTask") - select * from t_yp_task where b_use=1 order by task_id desc + select task_id,task_name,date_format(create_time,'%Y-%m-%d') as create_time,b_use,is_run from t_yp_task where b_use=1 order by task_id desc #end #end \ No newline at end of file