From 29dc1f1b83a562ac877cc4466a17a2112529c184 Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期一, 27 十月 2025 17:16:47 +0800
Subject: [PATCH] 场地管理接口
---
cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite.js | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite.js b/cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite.js
index 565eed6..e3bedca 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tSite/tSite.js
@@ -1264,9 +1264,9 @@
}
// 收集价格数据
- var priceDetails = TSite.collectPriceData();
+ var priceDTOS = TSite.collectPriceData();
- if (priceDetails.length === 0) {
+ if (priceDTOS.length === 0) {
Feng.error("请至少添加一个时段并填写价格!");
return;
}
@@ -1306,8 +1306,8 @@
basicData.walkinCapacity = walkinChecked ? parseInt($("#walkin_capacity").val()) : 0;
basicData.nextName = nextNames.join(',');
basicData.halfName = halfNames.join(',');
- basicData.isHalf = parseInt(isHalf);
- basicData.priceDetails = priceDetails;
+ basicData.ishalf = parseInt(isHalf);
+ basicData.priceDTOS = priceDTOS;
// 确认提交
layer.confirm('确定要保存场地信息吗?', {
@@ -1479,10 +1479,10 @@
}
/**
- * 收集价格数据
+ * 收集价格数据(返回符合后端 PriceDTO 格式的数据)
*/
TSite.collectPriceData = function() {
- var priceDetails = [];
+ var priceDTOS = [];
var isHalf = TSite.priceConfig ? TSite.priceConfig.isHalf : 2;
var bookingChecked = $("#audience_booking").is(':checked');
var walkinChecked = $("#audience_walkin").is(':checked');
@@ -1512,11 +1512,11 @@
// 全场价格
if (fullCash > 0 || fullCoin > 0) {
- priceDetails.push({
+ priceDTOS.push({
startTime: startTime,
endTime: endTime,
dayOfWeek: day,
- targetAudience: 1,
+ targetAudience: "1", // String 类型,1=订场
fieldType: 'full',
cashPrice: fullCash,
coinPrice: fullCoin
@@ -1529,11 +1529,11 @@
var halfCoin = parseFloat($("#booking_" + index + "_" + day + "_half_coin").val() || 0);
if (halfCash > 0 || halfCoin > 0) {
- priceDetails.push({
+ priceDTOS.push({
startTime: startTime,
endTime: endTime,
dayOfWeek: day,
- targetAudience: 1,
+ targetAudience: "1", // String 类型,1=订场
fieldType: 'half',
cashPrice: halfCash,
coinPrice: halfCoin
@@ -1569,11 +1569,11 @@
// 全场价格
if (fullCash > 0 || fullCoin > 0) {
- priceDetails.push({
+ priceDTOS.push({
startTime: startTime,
endTime: endTime,
dayOfWeek: day,
- targetAudience: 2,
+ targetAudience: "2", // String 类型,2=散客
fieldType: 'full',
cashPrice: fullCash,
coinPrice: fullCoin
@@ -1586,11 +1586,11 @@
var halfCoin = parseFloat($("#walkin_" + index + "_" + day + "_half_coin").val() || 0);
if (halfCash > 0 || halfCoin > 0) {
- priceDetails.push({
+ priceDTOS.push({
startTime: startTime,
endTime: endTime,
dayOfWeek: day,
- targetAudience: 2,
+ targetAudience: "2", // String 类型,2=散客
fieldType: 'half',
cashPrice: halfCash,
coinPrice: halfCoin
@@ -1601,5 +1601,5 @@
});
}
- return priceDetails;
+ return priceDTOS;
};
--
Gitblit v1.7.1