牌位列印調整,活動刪除提示訊息調整

This commit is contained in:
2026-07-02 16:43:18 +08:00
parent 31e382070f
commit 1d09b445d3
3 changed files with 97 additions and 21 deletions
+1 -1
View File
@@ -126,7 +126,7 @@
},
deleteItem(item) {
if (confirm('是否確定刪除此筆資料?')) {
if (confirm('是否確定刪除此筆資料,如有報名資料將一併刪除?')) {
const index = this.data_table.list.indexOf(item)
if (index != -1) {
axios
+3 -1
View File
@@ -645,9 +645,11 @@
<asp:TextBox ID="subject" MaxLength="100" runat="server" CssClass="form-control" placeholder="請輸入品項名稱"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="subject" runat="server" ErrorMessage="必填!" Display="Dynamic" SetFocusOnError="true"></asp:RequiredFieldValidator>
</div>
<label class="col-sm-2 col-form-label">牌位編號開頭</label>
<label class="col-sm-2 col-form-label">牌位編號開頭 *</label>
<div class="col-sm-4">
<asp:TextBox ID="print_init" MaxLength="20" runat="server" CssClass="form-control" placeholder="請輸入牌位編號開頭"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" ControlToValidate="print_init" runat="server" ErrorMessage="必填!" Display="Dynamic" SetFocusOnError="true"></asp:RequiredFieldValidator>
</div>
</div>
<div class="row mb-1 label-sm-right">
+93 -19
View File
@@ -57,7 +57,7 @@
<label class="small" for="textHeight">物件高度</label>
</div>
</div>
<div class="col-6">
<%-- <div class="col-6">
<div class="form-floating mb-3">
<input type="text" id="textBreakCount" class="form-control form-control-sm mb-2" onchange="Printer.changeWidth()" />
<label class="small" for="textBreakCount">文字斷行(依字數)</label>
@@ -68,7 +68,7 @@
<input type="text" id="textBreakWord" class="form-control form-control-sm mb-2" onchange="Printer.changeWidth()" />
<label class="small" for="textBreakWord">文字斷行(依文字)</label>
</div>
</div>
</div>--%>
</div>
</div>
</div>
@@ -433,9 +433,17 @@
yang = "";
bi = "";
}
})
let content = $(`<div class="tablet-element "></div>`)
.css({
position: "absolute", left: "4mm", top: "2mm", fontSize: '12px',
"z-index": 9999,
"align-items": "center"
})
.html(x.print_id);
tabletpaper.append(content);
//console.log("xCount:", Math.floor( xCount));
let xFloor = Math.floor(xCount);
@@ -688,13 +696,16 @@
$(".tablet-element span").on("click", function (e) {
e.preventDefault();
console.log(self);
self.selected = $(this);
let fontSize = $(this).css("font-size");
let fontFamily = $(this).css("font-family");
let textWidth = $(this).css("max-width");
let textHeight = $(this).css("min-height");
if ($(this).hasClass("liveSpan")) {
if ($(this).hasClass("liveSpan") || $(this).hasClass("nameSpan") || $(this).hasClass("rosterSpan")) {
textWidth = $(this).css("width");
textHeight = $(this).css("height");
fontSize = $(this).css("font-size");
} else if ($(this).hasClass("main-name") || $(this).hasClass("sub-text")) {
textWidth = "";
textHeight = "";
@@ -710,24 +721,31 @@
$("#textWidth").val(textWidth);
$("#textHeight").val(textHeight);
let parentElement = this.parentElement;
if ($(parentElement).hasClass("nameList") || $(parentElement).hasClass("liveList") || $(parentElement).hasClass("rosterList")) {
if ($(parentElement).hasClass("nameList") || $(parentElement).hasClass("liveList") ||
$(parentElement).hasClass("rosterList")) {
$("#textX").prop("readonly", true);
$("#textY").prop("readonly", true);
$("#fontSize").prop("readonly", true);
$("#textBreakCount").prop("readonly", false);
$("#textBreakWord").prop("readonly", false);
//$("#textBreakCount").prop("readonly", false);
//$("#textBreakWord").prop("readonly", false);
} else if ($(this).hasClass("main-name") || $(this).hasClass("sub-text")) {
$("#textX").prop("readonly", true);
$("#textY").prop("readonly", true);
$("#fontSize").prop("readonly", true);
$("#textBreakCount").prop("readonly", true);
$("#textBreakWord").prop("readonly", true);
//$("#textBreakCount").prop("readonly", true);
//$("#textBreakWord").prop("readonly", true);
$("#textWidth").prop("readonly", true);
$("#textHeight").prop("readonly", true);
}
});
$(".tablet-element .rosterspan").on("click", function (e) {
$("#toast_body").html("此格式不提供單項物件修改");
self.toast.show();
});
},
fix2(val) {
@@ -904,8 +922,28 @@
if ($("#indivualSetup").prop("checked")) {
$(this.selected).css("font-size", $("#fontSize").val())
} else if ($("#allSetup").prop("checked")) {
$("#toast_body").html("字體大小不可在全域中修改");
this.toast.show();
if (this.selected.find(".liveList").length >= 1 || this.selected.find(".nameList").length >= 1 ||
this.selected.find(".rosterList").length >= 1) {
classList.forEach(w => {
if ($(this.selected.children()).first().hasClass(w)) {
$(`.${w}`).parent().each((index, y) => {
$(y).css("font-size", $("#fontSize").val())
})
}
});
} else if (this.selected.hasClass("nameSpan")) {
$(".nameSpan").css("font-size", $("#fontSize").val())
} else if (this.selected.hasClass("liveSpan")) {
$(".liveSpan").css("font-size", $("#fontSize").val())
} else if (this.selected.hasClass("rosterSpan")) {
$(".rosterSpan").css("font-size", $("#fontSize").val())
} else {
$("#toast_body").html("字體大小不可在全域中修改");
this.toast.show();
}
//$("#toast_body").html("字體大小不可在全域中修改");
//this.toast.show();
}
break;
case "width":
@@ -920,7 +958,7 @@
} else if (this.selected.hasClass("nameSpan")) {
let spans = $(this.selected.parent().first()).find(".nameSpan");
spans.each(function (index, x) {
$(x).css("max-width", $("#textWidth").val());
$(x).css("width", $("#textWidth").val());
});
} else if (this.selected.hasClass("liveSpan")) {
let spans = $(this.selected.parent().first()).find(".liveSpan");
@@ -930,13 +968,31 @@
} else if (this.selected.hasClass("rosterSpan")) {
let spans = $(this.selected.parent().first()).find(".rosterSpan");
spans.each(function (index, x) {
$(x).css("max-width", $("#textWidth").val());
$(x).css("width", $("#textWidth").val());
});
}
} else if ($("#allSetup").prop("checked")) {
$("#toast_body").html("寬度不可在全域中修改");
this.toast.show();
if (this.selected.find(".liveList").length >= 1 || this.selected.find(".nameList").length >= 1 ||
this.selected.find(".rosterList").length >= 1) {
classList.forEach(w => {
if ($(this.selected.children()).first().hasClass(w)) {
$(`.${w}`).parent().each((index, y) => {
$(y).css("width", $("#textWidth").val())
})
}
});
} else if (this.selected.hasClass("nameSpan")) {
$(".nameSpan").css("width", $("#textWidth").val());
} else if (this.selected.hasClass("liveSpan")) {
$(".liveSpan").css("width", $("#textWidth").val());
} else if (this.selected.hasClass("rosterSpan")) {
$(".rosterSpan").css("width", $("#textWidth").val());
} else {
$("#toast_body").html("寬度不可在全域中修改");
this.toast.show();
}
}
break;
case "height":
@@ -950,7 +1006,7 @@
} else if (this.selected.hasClass("nameSpan")) {
let spans = $(this.selected.parent().first()).find(".nameSpan");
spans.each(function (index, x) {
$(x).css("min-height", $("#textHeight").val());
$(x).css("height", $("#textHeight").val());
});
} else if (this.selected.hasClass("liveSpan")) {
let spans = $(this.selected.parent().first()).find(".liveSpan");
@@ -961,13 +1017,31 @@
} else if (this.selected.hasClass("rosterSpan")) {
let spans = $(this.selected.parent().first()).find(".rosterSpan");
spans.each(function (index, x) {
$(x).css("min-height", $("#textHeight").val());
$(x).css("height", $("#textHeight").val());
});
}
} else if ($("#allSetup").prop("checked")) {
$("#toast_body").html("高度不可在全域中修改");
this.toast.show();
if (this.selected.find(".liveList").length >= 1 || this.selected.find(".nameList").length >= 1 ||
this.selected.find(".rosterList").length >= 1) {
classList.forEach(w => {
if ($(this.selected.children()).first().hasClass(w)) {
$(`.${w}`).parent().each((index, y) => {
$(y).css("height", $("#textHeight").val())
})
}
});
} else if (this.selected.hasClass("nameSpan")) {
$(".nameSpan").css("min-height", $("#textHeight").val());
} else if (this.selected.hasClass("liveSpan")) {
$(".liveSpan").css("height", $("#textHeight").val());
} else if (this.selected.hasClass("rosterSpan")) {
$(".rosterSpan").css("min-height", $("#textHeight").val());
} else {
$("#toast_body").html("高度不可在全域中修改");
this.toast.show();
}
}
break;
case "breakCount":