From d7c8e07d5e7dca7582f019fd4a8283a28f8fe027 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期二, 10 九月 2024 10:26:38 +0800
Subject: [PATCH] 报工新增流程卡查询语句修改,一行两列打印标签修改
---
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue | 104 ++++++++++++++++++++++++++++++++--------------------
1 files changed, 64 insertions(+), 40 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue b/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
index b344787..1beef24 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
@@ -40,7 +40,7 @@
like = null
}
data.value.printList = JSON.parse(props.printList)
-let flowCardCount = data.value.printList.length
+let flowCardCount = ''
onMounted(() => {
request.post(`/processCard/getSelectPrinting/${merge}/${like}`, data.value).then((res) => {
if (res.code == 200) {
@@ -135,22 +135,35 @@
const handleGetQRCode = async () => {
+ let technologyNumber=''
for (let i = 0; i < produceList.value.length; i++) {
- const technologyNumber = produceList.value[i].detail[0].technologyNumber.toString(); // 杞崲涓哄瓧绗︿覆浠ヤ究澶勭悊姣忎釜瀛楃
+ if (produceList.value[i].detail[0].qrcode!="" && produceList.value[i].detail[0].qrcode!=null){
+ technologyNumber = produceList.value[i].detail[0].qrcode.toString(); // 杞崲涓哄瓧绗︿覆浠ヤ究澶勭悊姣忎釜瀛楃,鍚堝苟鏍囩
+ }else {
+ technologyNumber = produceList.value[i].detail[0].technologyNumber.toString(); // 杞崲涓哄瓧绗︿覆浠ヤ究澶勭悊姣忎釜瀛楃
+ }
produceList.value[i].detail[0]["qrcodeList"] = []; // 鍒濆鍖栦竴涓┖鏁扮粍鐢ㄦ潵瀛樺偍 QR Code
- for (let j = 0; j < technologyNumber.length; j++) {
- const processId = produceList.value[i].detail[0].process_id;
- const url = `${processId}/${technologyNumber[j]}`;
+ const processId = produceList.value[i].detail[0].process_id;
+ const url = `${processId}/${technologyNumber}`;
+ // 鐢熸垚 QR Code 骞跺瓨鍌ㄥ埌鏁扮粍涓�
+ const qrcodeData = await QRCode.toDataURL(url);
+ produceList.value[i].detail[0]["qrcodeList"].push({
+ qrcode: qrcodeData,
+ technologyNumber: technologyNumber
+ });
- // 鐢熸垚 QR Code 骞跺瓨鍌ㄥ埌鏁扮粍涓�
- const qrcodeData = await QRCode.toDataURL(url);
- produceList.value[i].detail[0]["qrcodeList"].push({
- qrcode: qrcodeData,
- technologyNumber: technologyNumber[j]
- });
-
- }
+ // for (let j = 0; j < technologyNumber.length; j++) {
+ // const processId = produceList.value[i].detail[0].process_id;
+ // const url = `${processId}/${technologyNumber[j]}`;
+ // // 鐢熸垚 QR Code 骞跺瓨鍌ㄥ埌鏁扮粍涓�
+ // const qrcodeData = await QRCode.toDataURL(url);
+ // produceList.value[i].detail[0]["qrcodeList"].push({
+ // qrcode: qrcodeData,
+ // technologyNumber: technologyNumber[j]
+ // });
+ //
+ // }
}
};
@@ -186,7 +199,7 @@
<template>
<!-- <el-button id="printButton" @click="printFlowCard();">{{ $t('basicData.print') }}</el-button>-->
<div id="printFlowCard">
- <table v-for="(item,id) in produceList" id="contentTable" :key="id">
+ <table v-for="(item,id) in produceList" id="contentTable" :key="id" style="border-bottom: none">
<thead>
<tr v-for="(itemFlow,index) in item.detail" :key="index">
<td colspan="29">
@@ -198,13 +211,13 @@
{{itemFlow.otherRemarks}}
娴佺▼鍗″彿锛� {{
itemFlow.process_id
- }}/{{ itemFlow.technologyNumberMerge }} 鍏� {{ flowCardCount }} 鏋�
+ }}/{{ itemFlow.technologyNumberMerge }} 鍏� {{ item.count }} 鏋�
</div>
<div v-else style="text-align: right;font-weight: bolder">
{{itemFlow.otherRemarks}}
娴佺▼鍗″彿锛� {{
itemFlow.process_id
- }}/{{ itemFlow.technologyNumber }} 鍏� {{ flowCardCount }} 鏋�
+ }}/{{ itemFlow.technologyNumber }} 鍏� {{ item.count }} 鏋�
</div>
</td>
</tr>
@@ -342,23 +355,7 @@
<td colspan="2"></td>
<td colspan="2"></td>
</tr>
- <tr>
- <td>璐ㄦ绛惧悕</td>
- <td colspan="2"></td>
- <td colspan="2">鐢熶骇绛惧悕</td>
- <td colspan="2"></td>
- <td colspan="2"></td>
- <td colspan="2"></td>
- <td colspan="2"></td>
- <td colspan="2"></td>
- <td colspan="2"></td>
- <td colspan="2"></td>
- <td colspan="2"></td>
- <td colspan="2"></td>
- <td colspan="2"></td>
- <td colspan="2"></td>
- <td colspan="2"></td>
- </tr>
+
<tr>
<td>鍘熺墖绠卞彿</td>
<td colspan="28"></td>
@@ -378,14 +375,38 @@
</td>
</tr>
+ <tr v-if="company.remarkSwitch=='1'">
+ <td colspan="29">
+ <div style="display: flex;flex-wrap: wrap;">
+ <div v-for="(itemremark,index) in item.remarkList" :key="index">
+ <span v-if="!(itemremark.S02==null&&itemremark.S03==null&&itemremark.S04==null&&itemremark.S05==null)">
+ 缂栧彿锛歿{itemremark.S01}}
+ </span>
+ <span v-if="itemremark.S02!=null">澶囨敞1锛歿{itemremark.S02}}</span>
+ <span v-if="itemremark.S03!=null">澶囨敞2锛歿{itemremark.S03}}</span>
+ <span v-if="itemremark.S04!=null">澶囨敞3锛歿{itemremark.S04}}</span>
+ <span v-if="itemremark.S05!=null">澶囨敞4锛歿{itemremark.S05}}</span>
+ </div>
+ </div>
+ </td>
+ </tr>
<tr v-for="(itemtextareas,index) in item.detail" :key="index">
- <td colspan="29" rowspan="6" style="width: 480px;height: 150px ">
- <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 12px">{{itemtextareas.processing_note}}</textarea>
+ <td colspan="29" style="width: 480px;height: 150px ">
+ <div style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 12px;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea>
+ </div>
+ </td>
+ </tr>
+ <tr style="border-bottom: none">
+ <td colspan="29" style="text-align: left;border-bottom: none;">
+ <div>
+ <span>璐ㄦ绛惧悕锛�</span>
+ <span style="margin-left: 300px">鐢熶骇绛惧悕锛�</span>
</div>
</td>
</tr>
</tfoot>
</table>
+
</div>
</template>
@@ -394,9 +415,11 @@
* {
margin: 0;
padding: 0;
- text-align: center;
}
+td,input{
+ text-align: center;
+}
#printFlowCard {
text-align: center;
@@ -426,11 +449,11 @@
}
#contentTable tbody {
-
+white-space: nowrap;
}
.tdNowrap {
-
+ white-space: nowrap;
}
#contentTable tfoot {
@@ -458,8 +481,9 @@
page-break-inside: auto;
}
- #contentTable thead {
- display: table-header-group;
+ thead {
+ display: table-header-group;
+ page-break-inside: avoid;
}
tfoot {
--
Gitblit v1.8.0