From 42bc66fbd3a8a845339642448562f48afbe1e76e Mon Sep 17 00:00:00 2001
From: kgdxpr
Date: Sun, 23 Apr 2023 15:20:23 +0800
Subject: [PATCH] 'commit'
---
WebRoot/html/ypzs/view/apply.html | 4 +-
WebRoot/html/ypzs/view/taskManageAdd.html | 17 +-
WebRoot/html/ypzs/view/taskManageEdit.html | 44 ++--
WebRoot/html/ypzs/view/taskManageList.html | 108 +++++----
WebRoot/html/ypzs/view/taskView.html | 257 +++++++++++++++++++++
target/classes/Sql/yp.sql | 2 +-
6 files changed, 371 insertions(+), 61 deletions(-)
create mode 100644 WebRoot/html/ypzs/view/taskView.html
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;
+ }
});
-
+
@@ -23,17 +23,18 @@
@@ -47,7 +48,7 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+