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);
}