From 98346956b542835eb8d59e94bfbf5d47f799f2dd Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期一, 11 八月 2025 08:59:19 +0800
Subject: [PATCH] 赛事模块
---
cloud-server-management/src/main/webapp/static/modular/system/bodySideAppointment/tBodySideAppointment.js | 86 +++++++++++++++++--------------------------
1 files changed, 34 insertions(+), 52 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..268dddd 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
@@ -14,7 +14,7 @@
TQuestion.initColumn = function () {
return [
{field: 'selectItem', checkbox: true},
- {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
+ {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'},
{title: '所在省市', field: 'provinceAndCity', visible: true, align: 'center', valign: 'middle'},
{title: '预约门店', field: 'storeName', visible: true, align: 'center', valign: 'middle'},
{title: '家长姓名', field: 'parentName', visible: true, align: 'center', valign: 'middle'},
@@ -47,7 +47,20 @@
TQuestion.dataCount = 0;
TQuestion.phone = "";
TQuestion.phoneId = "";
-
+TQuestion.oneChange = function (e) {
+ var oneId=$(e).val();
+ var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){
+ if(data!=null){
+ var content='<option value="">选择市</option>';
+ $.each(data, function(k,v) {
+ content += "<option value='"+v.code+"'>"+v.name+"</option>";
+ });
+ $("#cCode").empty().append(content);
+ }
+ });
+ ajax.set("oneId",oneId);
+ ajax.start();
+};
/**
* 点击添加
*/
@@ -80,7 +93,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 +119,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 +155,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;
- }
}
};
@@ -231,24 +221,7 @@
});
}
};
-TQuestion.oneChange = function () {
- var province = $('#pCode option:selected').text();
- var citySelect = document.getElementById("cCode");
- var ajax = new $ax(Feng.ctxPath + "/tSite/getCity", function(data){
- if(data!=null){
- var content='<option value="">选择市</option>';
- $.each(data, function(k,v) {
- content += "<option value='"+v.cityCode+"'>"+v.city+"</option>";
- });
- $("#cCode").empty().append(content);
- }
- });
- if (province === ""){
- citySelect.innerHTML = '<option value="">请先选择省</option>';
- }
- ajax.set("province",province);
- ajax.start();
-};
+
TQuestion.oneChangeNext = function (e) {
var oneId=$(e).val();
@@ -275,7 +248,6 @@
ajax1.start();
};
TQuestion.addSubmit = function(){
-
var data = {
id:null,
province:"",
@@ -351,6 +323,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 +362,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 +374,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 +396,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