From 99d0bb96043ba5d6db66bbfb00f67ca4e09f3ffb Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 07 三月 2025 09:08:33 +0800
Subject: [PATCH] 小片尺寸和成品尺寸不相同时,打印显示小片信息
---
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi2.vue | 165 +++++++++++++++++++++++++++++++++++-------------------
1 files changed, 106 insertions(+), 59 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi2.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi2.vue
index 42f9b7a..668b153 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi2.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi2.vue
@@ -19,6 +19,8 @@
let dataList = ref([])
let list = ref([])
let lastList=ref([])
+let projectNo = ref([])
+let type = ref([])
let filterData = ref({})
@@ -27,53 +29,74 @@
})
+
const {currentRoute} = useRouter()
const route = currentRoute.value
-data.value.printList = JSON.parse(route.query.printList)
-const type = route.query.type
const faceOrientation = route.query.faceOrientation
const lableType = route.query.lableType
const printType=route.query.printType
+projectNo.value = route.query.projectNo
+type.value = route.query.type
onMounted(() => {
- if (printType == 1) {
- request.post(`/processCard/getSelectPrintLabel1`, data.value).then((res) => {
- if (res.code == 200) {
- produceList.value = deepClone(res.data.data)
- for (let i = 0; i < produceList.value.length; i++) {
- let count = produceList.value[i].data.length
- for (let j = 0; j < count; j++) {
- for (let k = 0; k < produceList.value[i].data[j].quantity; k++) {
- labelList.value.push(produceList.value[i].data[j])
- }
-
- }
- }
- } else {
- ElMessage.warning(res.msg)
- router.push("/login")
- }
- })
-
- }else if(printType==2){
- request.post(`/processCard/getSelectPrintLabelDetails`, data.value).then((res) => {
- if (res.code == 200) {
- produceList.value = deepClone(res.data.data)
- for (let i = 0; i < produceList.value.length; i++) {
- let count = produceList.value[i].data.length
- for (let j = 0; j < count; j++) {
- for (let k = 0; k < produceList.value[i].data[j].quantity; k++) {
- labelList.value.push(produceList.value[i].data[j])
- }
-
- }
- }
- } else {
- ElMessage.warning(res.msg)
- router.push("/login")
- }
- })
+ if (localStorage.getItem('hasRefreshed')=="false") {
+ localStorage.setItem('hasRefreshed', 'true');
+ location.reload();
+ }else{
+ localStorage.setItem('hasRefreshed', 'false');
}
+ if(projectNo.value!=null){
+ request.post(`/processCard/getSelectPrintLabel/${projectNo.value}/${type.value}`).then((res) => {
+ if (res.code == 200) {
+ labelList.value = deepClone(res.data.data)
+ } else {
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+ })
+
+ }else{
+ data.value.printList = JSON.parse(route.query.printList)
+ if (printType == 1) {
+ request.post(`/processCard/getSelectPrintLabel1`, data.value).then((res) => {
+ if (res.code == 200) {
+ produceList.value = deepClone(res.data.data)
+ for (let i = 0; i < produceList.value.length; i++) {
+ let count = produceList.value[i].data.length
+ for (let j = 0; j < count; j++) {
+ for (let k = 0; k < produceList.value[i].data[j].quantity; k++) {
+ labelList.value.push(produceList.value[i].data[j])
+ }
+
+ }
+ }
+ } else {
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+ })
+
+ }else if(printType==2){
+ request.post(`/processCard/getSelectPrintLabelDetails`, data.value).then((res) => {
+ if (res.code == 200) {
+ produceList.value = deepClone(res.data.data)
+ for (let i = 0; i < produceList.value.length; i++) {
+ let count = produceList.value[i].data.length
+ for (let j = 0; j < count; j++) {
+ for (let k = 0; k < produceList.value[i].data[j].quantity; k++) {
+ labelList.value.push(produceList.value[i].data[j])
+ }
+
+ }
+ }
+ } else {
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+ })
+ }
+ }
+
})
@@ -125,14 +148,29 @@
<div id="printFlowCard" >
<template v-for="(item,id) in labelList">
<div id="entirety" >
- <div class="row1">
+
+ <div class="row1" v-if="item.heat_layout_id!=null">
+ <div class="cell" v-if="item.heat_layout_id!=null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div>
<span>{{ item.customer_name }}</span>
<span>{{ item.order_id }}</span>
- <span v-if="item.process.includes('澶硅兌')">鑳剁墖</span>
+ <span v-if="item.process.includes('澶硅兌')||item.process.includes('澶瑰眰')">鑳剁墖</span>
<span v-else-if="item.process.includes('涓┖')">涓┖</span>
<span v-else-if="item.process.includes('鐧惧彾')">鐧惧彾</span>
<span v-else></span>
+ <div class="cell1" v-if="item.stock_id!=null">{{ item.stock_id }}</div>
</div>
+ <div class="row6" v-else>
+ <div class="cell" v-if="item.heat_layout_id!=null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div>
+ <span>{{ item.customer_name }}</span>
+ <span>{{ item.order_id }}</span>
+ <span v-if="item.process.includes('澶硅兌')||item.process.includes('澶瑰眰')">鑳剁墖</span>
+ <span v-else-if="item.process.includes('涓┖')">涓┖</span>
+ <span v-else-if="item.process.includes('鐧惧彾')">鐧惧彾</span>
+ <span v-else></span>
+ <div class="cell1" v-if="item.stock_id!=null">{{ item.stock_id }}</div>
+ </div>
+
+
<div class="row2">
<span>{{item.project}}</span>
<span>{{ item.building_number }}</span>
@@ -145,7 +183,8 @@
<span>{{item.processing_note}}</span>
</div>
</div>
- <div style="width: 20px" v-if="id%2===0"></div>
+ <div style="width: 19px" v-if="id%2===0"></div>
+ <div class="element-to-break-after" style="width: 1px" v-if="id%2===1"></div>
</template>
</div>
@@ -183,7 +222,7 @@
height: 35px;
}
.row1 span {
- font-size: 17pt;
+ font-size: 14pt;
}
.row2 {
font-size: 12pt;
@@ -219,25 +258,33 @@
}
.row6 {
- height: 20px;
+ height: 25px;
font-weight: bold;
font-size: 10pt;
}
-
-
-
-
-
-@media print {
- div {
- page-break-inside: avoid;
- }
- @page {
- size: auto; /* auto is the initial value */
- margin: 13mm 4mm 0mm 4mm; /* this affects the margin in the printer settings */
-
- }
-
+.row6 span {
+ font-size: 16pt;
}
+.cell{
+ position: absolute;
+ font-weight: bold;
+ margin-left: 5px;
+ margin-top: 0px;
+}
+
+.cell1{
+ position: absolute;
+ font-weight: bold;
+ margin-left: 225px;
+ margin-top: -30px;
+}
+
+
+.element-to-break-after {
+ page-break-after: always;
+}
+
+
+
</style>
\ No newline at end of file
--
Gitblit v1.8.0