修改问题
This commit is contained in:
@@ -3,7 +3,6 @@ const $ = layui.$;
|
||||
let gmjldata = []; // 转换后的扁平数组
|
||||
let originalData = []; // 原始树形数据
|
||||
let qishuok = {}; // 期号数据
|
||||
let selectedLotteryPath = [];
|
||||
let selectedLotteryIds = [];
|
||||
let currentIssue = ""; // 当前期号
|
||||
let currentPayPublishOptions = null;
|
||||
@@ -286,10 +285,7 @@ const $ = layui.$;
|
||||
}
|
||||
|
||||
step.numberRange.forEach(function (number) {
|
||||
const text =
|
||||
number !== "" && !isNaN(Number(number)) && Number(number) < 10
|
||||
? "0" + Number(number)
|
||||
: String(number);
|
||||
const text = String(number);
|
||||
const numberElement = document.createElement("div");
|
||||
|
||||
numberElement.className = step.class;
|
||||
@@ -313,8 +309,7 @@ const $ = layui.$;
|
||||
}
|
||||
|
||||
function normalizeSelectedNumber(value) {
|
||||
const text = String(value);
|
||||
return text !== "" && !isNaN(Number(text)) ? Number(text) : text;
|
||||
return String(value);
|
||||
}
|
||||
|
||||
function toggleNumberSelection(numberElement, selectedClass) {
|
||||
@@ -444,11 +439,6 @@ const $ = layui.$;
|
||||
applyPayPickerConfig(currentPayPicker);
|
||||
}
|
||||
|
||||
function normalizePayBallValue(value) {
|
||||
const text = String(value);
|
||||
return text !== "" && !isNaN(Number(text)) ? Number(text) : text;
|
||||
}
|
||||
|
||||
function applyPayPickerConfig(picker) {
|
||||
const groups = Array.isArray(picker && picker.groups)
|
||||
? picker.groups
|
||||
@@ -462,9 +452,7 @@ const $ = layui.$;
|
||||
const max = Number(group.maxSelect || min || 1);
|
||||
return {
|
||||
name: group.name || group.key || "号码选择",
|
||||
numberRange: ApiClient.asArray(group.balls).map(
|
||||
normalizePayBallValue,
|
||||
),
|
||||
numberRange: ApiClient.asArray(group.balls),
|
||||
allowMultiple: max > 1,
|
||||
class: group.color === "blue" ? "Blueball" : "Redball",
|
||||
classok: group.color === "blue" ? "BlueSelected" : "selected",
|
||||
@@ -603,13 +591,10 @@ const $ = layui.$;
|
||||
}
|
||||
//console.log(qishuok);
|
||||
function clearLotterySelection() {
|
||||
selectedLotteryPath = [];
|
||||
selectedLotteryIds = [];
|
||||
currentPayPublishOptions = null;
|
||||
currentPayPicker = null;
|
||||
$("#a1,#a2,#a3,#qi,#vv,#payMenuId,#payCode").val("");
|
||||
$("#payTitle").val("");
|
||||
$("#payTitleCount").text("0/100");
|
||||
$("#expectInput").val("");
|
||||
$("#priceInput").val("");
|
||||
$("#priceText").text(0);
|
||||
@@ -650,7 +635,6 @@ const $ = layui.$;
|
||||
//
|
||||
$("#qi").val("");
|
||||
$("#qihao").text("正在生成当前期号...");
|
||||
selectedLotteryPath = e.data || [];
|
||||
selectedLotteryIds = e.ids || [];
|
||||
$("#gmjl").closest(".selectY-box").addClass("is-selected");
|
||||
$("#a1").val(selectedLotteryIds[0] || "");
|
||||
@@ -705,6 +689,10 @@ const $ = layui.$;
|
||||
layer.alert("发布前置信息还没有加载完成,请重新选择方案");
|
||||
return false;
|
||||
}
|
||||
if (!title) {
|
||||
layer.alert("请输入文章标题");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
!currentPayPicker ||
|
||||
!Array.isArray(currentPayPicker.groups) ||
|
||||
@@ -713,10 +701,6 @@ const $ = layui.$;
|
||||
layer.alert("后端未返回选号配置,请重新选择方案");
|
||||
return false;
|
||||
}
|
||||
if (!title) {
|
||||
layer.alert("请输入文章标题");
|
||||
return false;
|
||||
}
|
||||
if (!qi) {
|
||||
layer.alert("当前期号不能为空");
|
||||
return false;
|
||||
@@ -768,10 +752,7 @@ const $ = layui.$;
|
||||
}
|
||||
|
||||
function formatSelectedBallText(value) {
|
||||
const text = String(value);
|
||||
return text !== "" && !isNaN(Number(text)) && Number(text) < 10
|
||||
? "0" + Number(text)
|
||||
: text;
|
||||
return String(value);
|
||||
}
|
||||
|
||||
function isSelectionComplete(currentSelections) {
|
||||
@@ -822,7 +803,9 @@ const $ = layui.$;
|
||||
.join("");
|
||||
|
||||
selectedGroups.push(
|
||||
'<div class="FormBox ballok' + index + '">' + balls + "</div>",
|
||||
'<div class="FormBox ballok' + index + '">' +
|
||||
(step.name ? '<span class="selection-group-label">' + CommonUtil.escapeHtml(step.name) + '</span>' : '') +
|
||||
balls + "</div>",
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user