From a660db06773007b1be690e0674829c00a57aeb7b Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 24 十二月 2025 16:21:23 +0800
Subject: [PATCH] 订单首页流程卡新增楼层编号显示
---
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel1.vue | 106 ++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 77 insertions(+), 29 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel1.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel1.vue
index ec8bd01..0d75f91 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel1.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel1.vue
@@ -32,32 +32,65 @@
const type = route.query.type
const faceOrientation = route.query.faceOrientation
const lableType = route.query.lableType
+const printType=route.query.printType
onMounted(() => {
- request.post(`/processCard/getSelectPrintCustomLabel/${type}/1`, data.value).then((res) => {
- if (res.code == 200) {
- produceList.value = deepClone(res.data.title)
- list.value = deepClone(res.data.data)
- const data = produceList.value[0].value
- dataList = JSON.parse(`[${data}]`);
- labelList = dataList[0]
- for (let i = 0; i < list.value.length; i++) {
- let count= list.value[i].data.length
- for (let j = 0; j < count; j++) {
- for (let k = 0; k < list.value[i].data[j].quantity; k++){
- lastList.value.push(list.value[i].data[j])
- }
+ if (localStorage.getItem('hasRefreshed')=="false") {
+ localStorage.setItem('hasRefreshed', 'true');
+ location.reload();
+ }else{
+ localStorage.setItem('hasRefreshed', 'false');
+ }
+ //娴佺▼鍗$紪杈戞墦鍗版爣绛�2 甯稿窞
+ if (printType == 1) {
+ request.post(`/processCard/getSelectPrintCustomLabel2/${type}/1`, data.value).then((res) => {
+ if (res.code == 200) {
+ produceList.value = deepClone(res.data.title)
+ list.value = deepClone(res.data.data)
+ const data = produceList.value[0].value
+ dataList = JSON.parse(`[${data}]`);
+ labelList = dataList[0]
+ for (let i = 0; i < list.value.length; i++) {
+ let count = list.value[i].data.length
+ for (let j = 0; j < count; j++) {
+ for (let k = 0; k < list.value[i].data[j].quantity; k++) {
+ lastList.value.push(list.value[i].data[j])
}
}
- } else {
- ElMessage.warning(res.msg)
- router.push("/login")
}
- })
+ } else {
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+ })
- }
+ }
+ //鏄庣粏鍒嗘灦鎵撳嵃鏍囩2 甯稿窞
+ else if(printType==2){
+ request.post(`/processCard/getSelectPrintCustomLabelDetails/${type}/1`, data.value).then((res) => {
+ if (res.code == 200) {
+ produceList.value = deepClone(res.data.title)
+ list.value = deepClone(res.data.data)
+ const data = produceList.value[0].value
+ dataList = JSON.parse(`[${data}]`);
-)
+ labelList = dataList[0]
+
+ for (let i = 0; i < list.value.length; i++) {
+ let count = list.value[i].data.length
+ for (let j = 0; j < count; j++) {
+ for (let k = 0; k < list.value[i].data[j].quantity; k++) {
+ lastList.value.push(list.value[i].data[j])
+ }
+ }
+ }
+ } else {
+ ElMessage.warning(res.msg)
+ }
+ })
+ }
+
+})
// 鎵撳嵃鏂规硶
@@ -77,7 +110,11 @@
style.innerHTML =
"body>#" +
printId +
- "{display:none}@media print{body>:not(#" +
+ "{display:none}@media print{" +
+ "@page {" +
+ " size: auto; " +
+ " margin: 13mm 4mm 0mm 4mm; " +
+ " }body>:not(#" +
printId +
"){display:none !important}body>#" +
printId +
@@ -110,10 +147,10 @@
<span>{{ item.project }}</span>
<span>{{ item.buildingNumber }}</span>
</div>
- <div class="row3" v-if="item.other_columns==null||JSON.parse(item.other_columns).S02==null">{{item.width}}*{{item.height}}={{item.quantity}}</div>
+ <div class="row3" v-if="item.other_columns==null||JSON.parse(item.other_columns).S02==null">{{item.width}}x{{item.height}}={{item.quantity}}</div>
<div class="row3" v-else>{{JSON.parse(item.other_columns).S02}}={{item.quantity}}</div>
<div class="row5">
- <span>{{item.remarks}}</span>
+ <span>{{item.filmNumber}}</span>
<span>{{ item.processingNote }}</span>
</div>
</div>
@@ -141,10 +178,12 @@
#entirety{
text-align: center;
- width: 185px;
+ width: 180px;
height: 87px;
margin-bottom: 10px;
+ margin-right: 5px;
overflow: hidden;
+ white-space: nowrap;
}
.row1 {
@@ -152,11 +191,17 @@
font-weight: bold;
height: 20px;
}
+.row1 span {
+ font-size: 12pt;
+}
.row2 {
font-size: 8pt;
font-weight: bold;
height: 20px;
+}
+.row2 span {
+ font-size: 12pt;
}
span {
font-size: 10pt;
@@ -166,7 +211,7 @@
.row3 {
margin-top: -5px;
height: 28px;
- font-size: 15pt;
+ font-size: 17pt;
font-weight: bolder;
}
@@ -177,22 +222,25 @@
}
.row5 span {
- font-size: 8pt;
+ font-size: 10pt;
}
-@page {
- size: auto; /* auto is the initial value */
- margin: 13mm 4mm 0mm 4mm /* this affects the margin in the printer settings */
-}
+
+
@media print {
div {
page-break-inside: avoid;
}
+ @page {
+ size: auto; /* auto is the initial value */
+ margin: 13mm 4mm 0mm 4mm !important; /* this affects the margin in the printer settings */
+
+ }
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0