From 06b1f67905f2682578f1cd1866516388562df926 Mon Sep 17 00:00:00 2001 From: kgdxpr Date: Sun, 23 Apr 2023 16:01:20 +0800 Subject: [PATCH 1/4] 'commit' --- WebRoot/html/ypzs/view/apply.html | 4 +- WebRoot/html/ypzs/view/taskView.html | 182 +++++---------------------- 2 files changed, 32 insertions(+), 154 deletions(-) diff --git a/WebRoot/html/ypzs/view/apply.html b/WebRoot/html/ypzs/view/apply.html index 3dd1ab5..2a204ad 100644 --- a/WebRoot/html/ypzs/view/apply.html +++ b/WebRoot/html/ypzs/view/apply.html @@ -9,10 +9,12 @@ -

+
+

+
报名申请表
diff --git a/WebRoot/html/ypzs/view/taskView.html b/WebRoot/html/ypzs/view/taskView.html index 0015bf5..d912cb8 100644 --- a/WebRoot/html/ypzs/view/taskView.html +++ b/WebRoot/html/ypzs/view/taskView.html @@ -7,28 +7,22 @@ - +
- -
-
- -
- -
@@ -40,24 +34,26 @@ - From 700a85716905fc8d44307144eeb709ad512f6ebe Mon Sep 17 00:00:00 2001 From: kgdxpr Date: Sun, 23 Apr 2023 16:13:34 +0800 Subject: [PATCH 2/4] 'commit' --- WebRoot/html/ypzs/view/taskManageAdd.html | 51 +++++++++++++--------- WebRoot/html/ypzs/view/taskManageList.html | 2 +- WebRoot/html/ypzs/view/taskView.html | 16 +++---- 3 files changed, 40 insertions(+), 29 deletions(-) diff --git a/WebRoot/html/ypzs/view/taskManageAdd.html b/WebRoot/html/ypzs/view/taskManageAdd.html index 552c58f..8955ba7 100644 --- a/WebRoot/html/ypzs/view/taskManageAdd.html +++ b/WebRoot/html/ypzs/view/taskManageAdd.html @@ -113,37 +113,48 @@ var bxids = ""; var limits = ""; + var flag = true; + Object.keys(data.field).forEach((key) => { if (key === "taskName") { taskName = data.field[key]; } else { bxids += key + "," + if (data.field[key] == 0) { + layer.msg("人数限制必须大于0", { + icon: 2, + time: 2000 + }); + flag = false; + } limits += data.field[key] + "," } }); - $.ajax({ - url: "/FengHuang/yp/addTask", - data: { "task_name": taskName, "bx_ids": bxids.substr(0, bxids.length - 1), "limits": limits.substr(0, limits.length - 1) }, - type: 'POST', - success: function (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 - }); + if (flag) { + $.ajax({ + url: "/FengHuang/yp/addTask", + data: { "task_name": taskName, "bx_ids": bxids.substr(0, bxids.length - 1), "limits": limits.substr(0, limits.length - 1) }, + type: 'POST', + success: function (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; }); diff --git a/WebRoot/html/ypzs/view/taskManageList.html b/WebRoot/html/ypzs/view/taskManageList.html index a056918..1fbee68 100644 --- a/WebRoot/html/ypzs/view/taskManageList.html +++ b/WebRoot/html/ypzs/view/taskManageList.html @@ -63,7 +63,7 @@ , { field: 'task_name', title: '任务名称', align: 'center' } , { field: 'create_time', title: '创建时间', align: 'center', width: "10%" } , { field: '', title: '状态', align: 'center', width: "10%", templet: getPublishText } - , { field: '', title: '操作', toolbar: '#tableOperate', align: 'center', width: "15%" } + , { field: '', title: '操作', toolbar: '#tableOperate', align: 'center', width: "25%" } ] ] diff --git a/WebRoot/html/ypzs/view/taskView.html b/WebRoot/html/ypzs/view/taskView.html index d912cb8..528187b 100644 --- a/WebRoot/html/ypzs/view/taskView.html +++ b/WebRoot/html/ypzs/view/taskView.html @@ -57,13 +57,13 @@ let cols = [ [ { field: '', title: '序号', align: 'center', type: 'numbers', width: "5%" } - , { field: 'name', title: '姓名', align: 'center' } - , { field: 'xb', title: '性别', align: 'center' } - , { field: 'sfzh', title: '身份证号', align: 'center', width: "10%" } - , { field: 'bx_name', title: '报名学段', align: 'center', width: "10%" } - , { field: 'address', title: '家庭住址', align: 'center', width: "10%" } - , { field: 'father_name', title: '父亲姓名', align: 'center', width: "10%" } - , { field: 'mother_name', title: '母亲姓名', align: 'center', width: "10%" } + , { field: 'name', title: '姓名', align: 'center', width: "8%" } + , { field: 'xb', title: '性别', align: 'center', width: "5%" } + , { field: 'sfzh', title: '身份证号', align: 'center', width: "15%" } + , { field: 'bx_name', title: '报名学段', align: 'center', width: "8%" } + , { field: 'address', title: '家庭住址', align: 'center', width: "21%" } + , { field: 'father_name', title: '父亲姓名', align: 'center', width: "8%" } + , { field: 'mother_name', title: '母亲姓名', align: 'center', width: "8%" } , { field: 'tel', title: '联系电话', align: 'center', width: "10%" } , { field: '', title: '查看户口本照片', toolbar: '#tableOperate', align: 'center', width: "10%" } ] @@ -109,7 +109,7 @@ tableRender(); }); - table.on('tool(task-table)', function (data) { + table.on('tool(task-table)', function (data) { if (data.event === 'view') { window.open('/FengHuang/' + data.data.pic); } From c11de4ffbf865ea38ed6ee3b1acb9c752e25cb9e Mon Sep 17 00:00:00 2001 From: kgdxpr Date: Sun, 23 Apr 2023 16:16:00 +0800 Subject: [PATCH 3/4] 'commit' --- WebRoot/html/ypzs/view/apply.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/WebRoot/html/ypzs/view/apply.html b/WebRoot/html/ypzs/view/apply.html index 2a204ad..82dff1a 100644 --- a/WebRoot/html/ypzs/view/apply.html +++ b/WebRoot/html/ypzs/view/apply.html @@ -14,8 +14,7 @@

- -
报名申请表
+