From 82685a4ec94db01c564561582141c03054012ea3 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 07 二月 2025 10:16:38 +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/PrintFlowCardDetails.vue | 55 ++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 44 insertions(+), 11 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
index 6c189d8..925174e 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
@@ -20,6 +20,7 @@
import companyInfo from "@/stores/sd/companyInfo"
import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global";
import TagStyleDesigner from "@/components/pp/TagStyleDesigner.vue";
+import {hiprint} from "vue-plugin-hiprint";
const company = companyInfo()
@@ -176,6 +177,39 @@
const data = ref({
printList: []
})
+
+onMounted(async () => {
+ await getTags();
+ await hiprint.init();
+})
+let hiprintTemplate = ref()
+
+const tags = ref([])
+
+const tag = ref({
+ id: null,
+ name: null,
+ type: 1,
+ tagWidth: null,
+ tagHeight: null,
+ value: null,
+ size: null
+})
+
+const changeTag = () => {
+ hiprintTemplate.value = new hiprint.PrintTemplate({});
+ const json = JSON.parse(tag.value.value)
+ hiprintTemplate.value.update(json)
+}
+
+const getTags = () => {
+ request.get('tagStyle/getTagList').then(res => {
+ tags.value = res.data
+ })
+}
+const printObjectProcess = () => {
+ hiprintTemplate.value.print(lastList.value)
+}
const {currentRoute} = useRouter()
const route = currentRoute.value
@@ -520,7 +554,6 @@
}
}
if (lableTypes == 1) {
- console.log(company.label)
labelRow.value.list = JSON.stringify(selectRecords)
labelRow.value.faceOrientation = faceOrientation
labelRow.value.type = type
@@ -639,7 +672,7 @@
ElMessage.warning(t('searchOrder.msgList.checkOrder'))
return
}
- if (type === null || type === '' || type === undefined) {
+ if (tag.value.name === null || tag.value.name === '' || tag.value.name === undefined) {
ElMessage.warning(t('processCard.pleaseSelectCustomPrintLabelStyle'))
return
}
@@ -655,7 +688,7 @@
labelRow.value.list = JSON.stringify(selectRecords)
labelRow.value.faceOrientation = faceOrientation
- labelRow.value.type = type
+ labelRow.value.type = tag.value.name
labelRow.value.lableType = lableTypes
labelRow.value.dataType = 1
let columnsLabel = company.printLabel.columnsLabel
@@ -701,7 +734,7 @@
gridOptions.toolbarConfig.buttons = gridOptions.toolbarConfig.buttons.filter(button => {
// 杩欓噷鏍规嵁 hidePrintLabels 鐨勫�煎喅瀹氭槸鍚﹂殣钘� printLabel 鍜� printLabel2
if (hidePrintLabels == 'true') {
- return button.code !== 'printLabel' && button.code !== 'printLabel2';
+ return button.code !== 'printLabel' && button.code !== 'printLabel2' && button.code !== 'customLabel';
} else {
return true && button.code !== 'printLike' && button.code !== 'printLabel3' && button.code !== 'printTest'; // 鏄剧ず璇ユ寜閽�
}
@@ -733,13 +766,12 @@
style="width: 90px"></el-input>
<label>{{ $t('processCard.labelStyle') }}锛�</label>
- <el-select v-model="printType" :placeholder="$t('processCard.pleaseSelect')" clearable default-value="default_city"
- style="width: 120px">
+ <el-select v-model="tag" :placeholder="$t('processCard.pleaseSelect')" style="width: 140px" @change="changeTag">
<el-option
- v-for="item in titleSelectJson['dataType']"
- :key="item.id"
- :label="item.name"
- :value="item.name"
+ v-for="(tag,index) in tags"
+ :key="index"
+ :label="tag.name"
+ :value="tag"
/>
</el-select>
@@ -907,12 +939,13 @@
destroy-on-close
style="width: 80%;height:75% ">
<template #header="{ close, titleId, titleClass }">
- <el-button v-print="printContentLabel" :icon="Printer" circle/>
+ <el-button :icon="Printer" circle @click="printObjectProcess"/>
</template>
<print-custom-label-x-j id="childLabel"
:faceOrientation="labelRow.faceOrientation"
:lableType="labelRow.lableType"
:list="labelRow.list"
+ :lastList='lastList'
:type="labelRow.type"
style="width: 100%;height: 100%"/>
</el-dialog>
--
Gitblit v1.8.0