From fd658508f4470f0c479b2a36738b0f50481cbbe9 Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期六, 16 九月 2023 10:59:09 +0800 Subject: [PATCH] 后台代码 --- cloud-server-management/src/main/webapp/static/modular/system/bodySideAppointment/tBodySideAppointment.js | 50 ++++++++++++++++++-------------------------------- 1 files changed, 18 insertions(+), 32 deletions(-) diff --git a/cloud-server-management/src/main/webapp/static/modular/system/bodySideAppointment/tBodySideAppointment.js b/cloud-server-management/src/main/webapp/static/modular/system/bodySideAppointment/tBodySideAppointment.js index 8f7d79b..aff4b9e 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/bodySideAppointment/tBodySideAppointment.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/bodySideAppointment/tBodySideAppointment.js @@ -80,7 +80,7 @@ area: ['100%', '100%'], //宽高 fix: false, //不固定 maxmin: true, - content: Feng.ctxPath + '/benefits/update/' + TQuestion.seItem.id + content: Feng.ctxPath + '/bodySideAppointment/update/' + TQuestion.seItem.id }); this.layerIndex = index; } @@ -106,12 +106,12 @@ contentType: "application/json", // 设置请求头的 Content-Type data: JSON.stringify(ids), // 将数据转换为 JSON 字符串 success: function(response) { - Feng.success("上架成功!"); + Feng.success("修改成功!"); TQuestion.search(); }, error: function(xhr, status, error) { - var errorMessage = xhr.responseText ? xhr.responseText : "上架失败!"; + var errorMessage = xhr.responseText ? xhr.responseText : "修改失败!"; Feng.error("您的网络异常!"); } }); @@ -142,37 +142,14 @@ contentType: "application/json", // 设置请求头的 Content-Type data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 success: function(response) { - Feng.success("下架成功!"); + Feng.success("修改成功!"); TQuestion.search(); }, error: function(xhr, status, error) { - var errorMessage = xhr.responseText ? xhr.responseText : "下架失败!"; + var errorMessage = xhr.responseText ? xhr.responseText : "修改失败!"; Feng.error("您的网络异常!"); } }); - } -}; -/** - * 查看详情 - */ -TQuestion.getInfo = function () { - var selected = $('#' + this.id).bootstrapTable('getSelections'); - if(selected.length >1 ){ - Feng.info("只能选择一条进行查看!"); - }else { - if (this.check()){ - var selected = $('#' + this.id).bootstrapTable('getSelections'); - - var index = layer.open({ - type: 2, - title: '详情', - area: ['100%', '100%'], //宽高 - fix: false, //不固定 - maxmin: true, - content: Feng.ctxPath + '/benefits/info/' + TQuestion.seItem.id - }); - this.layerIndex = index; - } } }; @@ -275,7 +252,6 @@ ajax1.start(); }; TQuestion.addSubmit = function(){ - var data = { id:null, province:"", @@ -351,6 +327,8 @@ data: JSON.stringify(data), contentType: "application/json", success: function (response) { + window.parent.TQuestion.table.refresh(); + TQuestion.close(); Feng.success("添加成功"); }, error: function (xhr, status, error) { @@ -388,6 +366,8 @@ data: JSON.stringify(data), contentType: "application/json", success: function (response) { + window.parent.TQuestion.table.refresh(); + TQuestion.close(); Feng.success("添加成功"); }, error: function (xhr, status, error) { @@ -398,15 +378,20 @@ /** * 查询列表 */ -TQuestion.search = function () { +TQuestion.search = function (e) { + var queryData = {}; + queryData['phone'] = $("#phone").val(); queryData['parentName'] = $("#parentName").val(); queryData['state'] = $("#state").val(); + queryData['day'] = e; TQuestion.table.refresh({query: queryData}); }; - +TQuestion.close = function() { + parent.layer.close(window.parent.TQuestion.layerIndex); +} /** * 重置搜索 */ @@ -415,9 +400,10 @@ $("#phone").val(''); $("#parentName").val(''); $("#state").val(''); - TQuestion.search(); + TQuestion.search(null); }; + $(function () { var defaultColunms = TQuestion.initColumn(); var table = new BSTable(TQuestion.id, "/bodySideAppointment/listAll", defaultColunms); -- Gitblit v1.7.1