牌位報名與列印
This commit is contained in:
@@ -18,8 +18,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="customMenu" style="top:20px;right:10mm;width:20vw;height:90vh; position: fixed; background-color: #f0f0f0;
|
||||
border: 1px solid #ccc; padding: 10px; z-index: 1000; opacity: 1;">
|
||||
<div id="customMenu" style="top: 20px; right: 10mm; width: 20vw; height: 90vh; position: fixed; background-color: #f0f0f0; border: 1px solid #ccc; padding: 10px; z-index: 1000; opacity: 1;">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -91,6 +90,18 @@
|
||||
|
||||
<form id="form1" runat="server">
|
||||
</form>
|
||||
<div class="position-fixed top-50 start-50 p-3" style="z-index: 10001">
|
||||
<div id="liveToast" class="toast hide " role="alert" aria-live="assertive"
|
||||
data-bs-delay="3000" aria-atomic="true"
|
||||
style="color: white; background-color: dimgray; opacity: 1; font-size: 24px;">
|
||||
<div class="toast-header">
|
||||
<strong class="me-auto">提示訊息</strong>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="toast-body" id="toast_body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="<%=ResolveUrl("~/js/bootstrap5/js/bootstrap.bundle.min.js")%>"></script>
|
||||
<script src="<%=ResolveUrl("~/js/jquery-4.0.0.min.js")%>"></script>
|
||||
@@ -116,6 +127,7 @@
|
||||
tabletElement: [],
|
||||
observer: null,
|
||||
isInit: true,
|
||||
toast: null,
|
||||
bg: [
|
||||
{ name: "黃1", path: "../../admin/print/html/tablet-1_new.svg" },
|
||||
{ name: "黃2", path: "../../admin/print/html/tablet-1B_new.svg" },
|
||||
@@ -123,7 +135,7 @@
|
||||
{ name: "紅2", path: "../../admin/print/html/tablet-2B.svg" }
|
||||
],
|
||||
async init() {
|
||||
|
||||
this.toast = new bootstrap.Toast($('#liveToast'));
|
||||
let HTTP_HOST = "<%=UrlHost()%>";
|
||||
this.http_host = HTTP_HOST;
|
||||
//
|
||||
@@ -794,7 +806,7 @@
|
||||
return g;
|
||||
},
|
||||
renderNormal(mid, d) {
|
||||
console.log("renderNormal:", d)
|
||||
//sconsole.log("renderNormal:", d)
|
||||
let self = this;
|
||||
let txt = $(`<div class='${d.elementID}'>${mid}</div>`).css({
|
||||
"z-index": 9999, visibility: d.visibility,
|
||||
@@ -858,18 +870,33 @@
|
||||
|
||||
},
|
||||
async changeSetup(config) {
|
||||
|
||||
let classList = ["liveList", "nameList", "address", "ancestor-wrapper", "lefttitle", "righttitle", "rosterList"]
|
||||
switch (config) {
|
||||
case "X":
|
||||
if ($("#indivualSetup").prop("checked")) {
|
||||
$(this.selected).css("left", $("#textX").val() + "mm");
|
||||
} else if ($("#allSetup").prop("checked")) {
|
||||
|
||||
classList.forEach(w => {
|
||||
if ($(this.selected.children()).first().hasClass(w)) {
|
||||
$(`.${w}`).parent().each((index, y) => {
|
||||
$(y).css("left", $("#textX").val() + "mm")
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
break;
|
||||
case "Y":
|
||||
if ($("#indivualSetup").prop("checked")) {
|
||||
$(this.selected).css("top", $("#textY").val() + "mm");
|
||||
} else if ($("#allSetup").prop("checked")) {
|
||||
classList.forEach(w => {
|
||||
if ($(this.selected.children()).first().hasClass(w)) {
|
||||
$(`.${w}`).parent().each((index, y) => {
|
||||
$(y).css("top", $("#textY").val() + "mm")
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
break;
|
||||
@@ -877,7 +904,8 @@
|
||||
if ($("#indivualSetup").prop("checked")) {
|
||||
$(this.selected).css("font-size", $("#fontSize").val())
|
||||
} else if ($("#allSetup").prop("checked")) {
|
||||
|
||||
$("#toast_body").html("字體大小不可在全域中修改");
|
||||
this.toast.show();
|
||||
}
|
||||
break;
|
||||
case "width":
|
||||
@@ -907,7 +935,8 @@
|
||||
}
|
||||
|
||||
} else if ($("#allSetup").prop("checked")) {
|
||||
|
||||
$("#toast_body").html("寬度不可在全域中修改");
|
||||
this.toast.show();
|
||||
}
|
||||
break;
|
||||
case "height":
|
||||
@@ -937,7 +966,8 @@
|
||||
}
|
||||
|
||||
} else if ($("#allSetup").prop("checked")) {
|
||||
|
||||
$("#toast_body").html("高度不可在全域中修改");
|
||||
this.toast.show();
|
||||
}
|
||||
break;
|
||||
case "breakCount":
|
||||
|
||||
@@ -480,7 +480,7 @@
|
||||
if (newFontSize < 10) {
|
||||
newFontSize = 10;
|
||||
}
|
||||
console.log("乎哈:", d.elementID, d.textWidth, newFontSize)
|
||||
|
||||
let content = $(`<div class="tablet-element vertical-text ">${element.sampleContent}</div>`)
|
||||
.css({
|
||||
position: "absolute", left: d.startX + "mm", top: d.startY + "mm", fontSize: newFontSize + 'px',
|
||||
@@ -1136,7 +1136,7 @@
|
||||
return Number.parseFloat(val).toFixed(2);
|
||||
},
|
||||
renderNormal(mid, d) {
|
||||
console.log("renderNormal:", d)
|
||||
//console.log("renderNormal:", d)
|
||||
let self = this;
|
||||
let txt = $(`<div class='${d.elementID}'>${mid}</div>`).css({
|
||||
"z-index": 9999, visibility: d.visibility,
|
||||
@@ -1394,7 +1394,7 @@
|
||||
mid_right: designer.family_right_title,
|
||||
addr_items: designer.family_address
|
||||
}
|
||||
console.log(JSON.stringify(tablet));
|
||||
//console.log(JSON.stringify(tablet));
|
||||
var pro_order_detail =
|
||||
{
|
||||
num: designer.tabletItem.num <= 0 ? null : designer.tabletItem.num,
|
||||
|
||||
Reference in New Issue
Block a user