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