From a8378db2feef3b08edc0a6594bec187051d3b754 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 24 十二月 2025 13:32:33 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProgressProcessCard.vue | 152 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 147 insertions(+), 5 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProgressProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProgressProcessCard.vue
index af2a3bc..ab88f44 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProgressProcessCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProgressProcessCard.vue
@@ -15,6 +15,8 @@
import PrintProcess from "@/components/pp/PrintProcess.vue";
import PrintCustomLabelXJ from "@/components/pp/PrintCustomLabelTwo.vue";
import companyInfo from "@/stores/sd/companyInfo";
+import {createTemplate} from "@/hook/createTemplateTag";
+import {hiprint} from "vue-plugin-hiprint";
//璇█鑾峰彇
const { t } = useI18n()
let router=useRouter()
@@ -24,6 +26,8 @@
const dialogTableVisible = ref(false)
const dialogTableVisibleLabel = ref(false)
+
+let lastList = ref([])
let props = defineProps({
orderId:null
@@ -86,6 +90,84 @@
}
})
+//鏍囩
+let labelRow = ref({
+ list: null,//鍕鹃�夌殑鏁版嵁
+ faceOrientation: null,//鍐呭闈�
+ type: null,//鏍囩妯℃澘
+ lableType: null//鏍囩绫诲瀷
+})
+//閫変腑鍐呭
+let selectRecords = ref(null)
+
+//鍚堢墖娴佺▼鍗℃墦鍗颁笅鎷夐�夐」
+const printMerge = ref('')
+const printMergeOptions = [{}]
+
+//鍊掑彊
+let flashback = ref(1)
+//钀芥灦椤哄簭
+let landingSequence= ref(1)
+//鍚堟灦鎵撳嵃
+let compound = ref(null)
+
+const printContent = ref({
+ id: 'child',
+
+})
+
+let hiprintTemplate = ref(null)
+
+const printContentLabel = ref({
+ id: 'childLabel',
+})
+
+const printContentLabelSemi = ref({
+ id: 'childLabelSemi',
+})
+
+const changeTag = () => {
+ hiprintTemplate.value = new hiprint.PrintTemplate({});
+ hiprintTemplate.value.design("#hiprint-printTemplate1",{grid:true});
+ const json = tag.value.value
+ hiprintTemplate.value.update(json)
+}
+
+const printOrder = (type) => {
+ printNumberLabel()
+ const list = tag.value.value
+ list.panels[0].printElements.forEach(element => {
+ element.options.fontFamily = 'Arial'
+ if( element.options.field !== undefined){
+ if(type===3 ){
+ element.options.hideTitle = true
+ }
+ }
+ if(type!==3){
+ element.options.hideTitle = false
+ if( element.options.field === undefined){
+ element.options.hideTitle = true
+ }
+ }
+ })
+
+ //hiprintTemplate.value.update(list)
+ let object = JSON.parse(JSON.stringify(lastList.value))
+ //鍒ゆ柇鏄惁涓鸿〃鏍�
+ let columnsNum = null
+ if(list.panels[0].printElements[0].options.field==='table'){
+ object = {table:lastList.value}
+ columnsNum = (list.panels[0].printElements[0].options.gridColumns || 1)
+ }
+ //鍒ゆ柇鏄惁鏈� 宓屽鑷畾涔夌焊寮�
+ if(tag.value.tagHeight && tag.value.tagWidth){
+ const print =createTemplate(list,object,tag.value.tagWidth,tag.value.tagHeight)
+ hiprintTemplate.value.update(print.template)
+ object = print.printData
+ }
+ hiprintTemplate.value.print(object)
+
+}
//闇�瑕佸悎骞剁殑鍒�
let column = [1,3,8]
@@ -305,9 +387,9 @@
// delete obj.print_status;
// });
let type = tag.value.name
- let faceOrientation = stateValue.value
- let lableTypes = lableType.value
- let lableTitle = lableType.text
+ let faceOrientation = ''
+ let lableTypes = 1
+ let lableTitle = ''
if ($grid) {
switch (code) {
//鎵撳嵃娴佺▼鍗�
@@ -329,7 +411,7 @@
printRow.value.printMergeVal = printMerge.value
printRow.value.like = null
printRow.value.merge = company.flowCardMerge
- printRow.value.printFc= printFc
+ printRow.value.printFc= true
printRow.value.flashback = flashback.value
printRow.value.landingSequence=landingSequence.value
printRow.value.compound = compound.value
@@ -356,7 +438,7 @@
id += selectRecords[i].id + "|"
}
}
-
+ lastList.value = []
labelRow.value.list = JSON.stringify(selectRecords)
labelRow.value.faceOrientation = faceOrientation
labelRow.value.type = tag.value.name
@@ -385,6 +467,38 @@
const handleCellDblClick = ({ row, column, cell, $event }) => {
VxeUI.clipboard.copy(row[column.property])
+}
+
+const selectRecordsData = ref({
+ printList: []
+})
+// 鐩戝惉娴佺▼鍗℃墦鍗板畬鎴愪簨浠�
+const printNumber = () => {
+
+ selectRecordsData.value.printList = selectRecords
+ let printState = 0
+ request.post(`/processCard/updatePrintState/${printState}`, selectRecordsData.value).then((res) => {
+ if (res.code == 200 && res.data === true) {
+ } else {
+
+ ElMessage.warning(t('basicData.msg.saveFail'))
+
+ }
+ })
+}
+
+// 鐩戝惉鏍囩鎵撳嵃瀹屾垚浜嬩欢
+const printNumberLabel = () => {
+
+ selectRecordsData.value.printList = selectRecords
+ request.post(`/tagStyle/updatePrintNumber`, selectRecordsData.value).then((res) => {
+ if (res.code == 200 && res.data === true) {
+ } else {
+
+ ElMessage.warning(t('basicData.msg.saveFail'))
+
+ }
+ })
}
</script>
@@ -429,6 +543,7 @@
v-bind="gridOptions"
:merge-cells="mergeCells"
@cell-dblclick="handleCellDblClick"
+ v-on="gridEvents"
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
@@ -534,6 +649,33 @@
height: calc(100% - 35px);
}
+:deep(#sizeCheck .el-dialog__body) {
+ height: 90%;
+ width: 100%;
+}
+
+:deep(#sizePrintCalrd .el-dialog__body) {
+ height: 85%;
+ width: 100%;
+ overflow-y: auto;
+}
+
+:deep(#sizeCustom .el-dialog__body) {
+ height: 85%;
+ width: 100%;
+ overflow-y: auto;
+}
+
+:deep(#sizeCustomSemi .el-dialog__body) {
+ height: 85%;
+ width: 100%;
+ overflow-y: auto;
+}
+
+:deep(#titleStyle .el-dialog__body){
+ height: 93%;
+ width: 100%;
+}
.vxe-grid {
/* 绂佺敤娴忚鍣ㄩ粯璁ら�変腑 */
-webkit-user-select: none;
--
Gitblit v1.8.0