From 430ab98c6225a276bab44c5eebb304fc6206cb73 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 25 九月 2024 16:03:48 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel1.vue | 94 +++++++++++++++++++++++++++++++++-------------
1 files changed, 67 insertions(+), 27 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 c9067f7..a4ba061 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,56 @@
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 (printType == 1) {
+ 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])
}
}
- } else {
- ElMessage.warning(res.msg)
- router.push("/login")
}
- })
+ } else {
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+ })
- }
+ }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 +101,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 +138,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,9 +169,12 @@
#entirety{
text-align: center;
- width: 185px;
+ width: 180px;
height: 87px;
margin-bottom: 10px;
+ margin-right: 5px;
+ overflow: hidden;
+ white-space: nowrap;
}
.row1 {
@@ -151,11 +182,17 @@
font-weight: bold;
height: 20px;
}
+.row1 span {
+ font-size: 10pt;
+}
.row2 {
font-size: 8pt;
font-weight: bold;
height: 20px;
+}
+.row2 span {
+ font-size: 10pt;
}
span {
font-size: 10pt;
@@ -182,16 +219,19 @@
-@page {
- size: auto; /* auto is the initial value */
- margin: 13mm 4mm 0mm 6mm /* 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; /* this affects the margin in the printer settings */
+
+ }
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0