修正很多東西
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="btn btn-primary no-print" onclick="Printer.print()">列印</span>
|
||||
<span class="btn btn-primary no-print" id="printBtn" onclick="Printer.print()">列印</span>
|
||||
<select id="paperSizeSel" onchange="Printer.render()">
|
||||
<!-- onchange="Printer.render()"-->
|
||||
<option value="">紙張尺寸</option>
|
||||
@@ -128,6 +128,7 @@
|
||||
observer: null,
|
||||
isInit: true,
|
||||
toast: null,
|
||||
mode:"",
|
||||
bg: [
|
||||
{ name: "超薦1", path: "../../../admin/print/html/tablet-1_new.svg" },
|
||||
{ name: "超薦2", path: "../../../admin/print/html/tablet-1B_new.svg" },
|
||||
@@ -138,6 +139,7 @@
|
||||
this.toast = new bootstrap.Toast($('#liveToast'));
|
||||
let HTTP_HOST = "<%=UrlHost()%>";
|
||||
this.http_host = HTTP_HOST;
|
||||
|
||||
//
|
||||
Promise.all([
|
||||
this.getActItem(),
|
||||
@@ -283,6 +285,7 @@
|
||||
this.printData.forEach(x => {
|
||||
let style = self.allStyle.find(y => y.styleID == x.style);
|
||||
//用來印內容的尺寸
|
||||
console.log("style.paperSize:", style.paperSize)
|
||||
let size = self.allSize.find(y => y.paperID == style.paperSize);
|
||||
//包含空白用來折的尺寸
|
||||
let printSize = self.allSize.find(y => y.paperID == style.printSize);
|
||||
@@ -384,7 +387,7 @@
|
||||
"column-gap": "1px",
|
||||
"row-gap": "1px",
|
||||
"align-items": "center",
|
||||
"justify-content": "space-between",
|
||||
"justify-content": "start",
|
||||
});
|
||||
|
||||
mid.forEach(z => {
|
||||
@@ -1192,10 +1195,16 @@
|
||||
}, 1200);
|
||||
},
|
||||
}
|
||||
$(document).click(function (e) {
|
||||
$(document).ready(function (e) {
|
||||
//if (!$("#customMenu").is(e.target) && $("#customMenu").has(e.target).length === 0) {
|
||||
// $("#customMenu").hide();
|
||||
//}
|
||||
console.log(localStorage.getItem("mode"))
|
||||
if (localStorage.getItem("mode") && localStorage.getItem("mode") == "preview") {
|
||||
//this.mode = "preview"
|
||||
$("#printBtn").attr("style", "display:none")
|
||||
$("#customMenu").attr("style","display:none")
|
||||
}
|
||||
});
|
||||
$(() => Printer.init());
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user