From 33dbc6a161554f3a897f9e9273feb4f2c1b47381 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期一, 15 十二月 2025 17:04:27 +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/PrintFlowCardDetails.vue | 165 +++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 136 insertions(+), 29 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 ff1be9e..c3b4eee 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
@@ -2,7 +2,7 @@
import request from "@/utils/request"
import deepClone from "@/utils/deepClone"
-import {ElDatePicker, ElMessage} from "element-plus"
+import {ElCheckbox, ElDatePicker, ElMessage} from "element-plus"
import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue"
import {useRouter} from 'vue-router'
import {useI18n} from 'vue-i18n'
@@ -21,6 +21,7 @@
import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global";
import TagStyleDesigner from "@/components/pp/TagStyleDesigner.vue";
import {hiprint} from "vue-plugin-hiprint";
+import {createTemplate} from "@/hook/createTemplateTag"
const company = companyInfo()
@@ -50,7 +51,8 @@
technologyNumber: null,
process: null
})
-
+//钀芥灦椤哄簭
+let landingSequence= ref(1)
//鎵撳嵃
let printRow = ref({
list: null,
@@ -64,7 +66,8 @@
faceOrientation: null,//鍐呭闈�
type: null,//鏍囩妯℃澘
lableType: null,//鏍囩绫诲瀷
- dataType: null//鏍囩绫诲瀷
+ dataType: null,
+ landingSequence:null
})
@@ -178,12 +181,14 @@
const data = ref({
printList: []
})
-
+let hiprintTemplate = ref(null)
onMounted(async () => {
await getTags();
await hiprint.init();
+
+
})
-let hiprintTemplate = ref()
+
const tags = ref([])
@@ -199,18 +204,55 @@
const changeTag = () => {
hiprintTemplate.value = new hiprint.PrintTemplate({});
- const json = JSON.parse(tag.value.value)
+ hiprintTemplate.value.design("#hiprint-printTemplate1",{grid:true});
+ const json = tag.value.value
hiprintTemplate.value.update(json)
}
const getTags = () => {
request.get('tagStyle/getTagList').then(res => {
+ res.data.forEach(item => {
+ item.value = JSON.parse(item.value)
+ })
tags.value = res.data
})
}
-const printObjectProcess = () => {
- hiprintTemplate.value.print(lastList.value)
+const printOrder = (type) => {
+ printNumber()
+ 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)
+
}
+const orderOtherMoney = ref(null)
const {currentRoute} = useRouter()
const route = currentRoute.value
@@ -229,7 +271,21 @@
newDataCollection.push(item);
})
}
+ orderOtherMoney.value = res.data.orderOtherMoney
+ orderOtherMoney.value.forEach(item => {
+ let column = {
+ field: `${item.column}`,
+ width: 100,
+ title: item.alias,
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ filterMethod: filterChanged,
+ sortable: true
+ }
+ gridOptions.columns.push(column)
+
+ })
titleSelectJson.value.dataType = res.data.type
xGrid.value.reloadData(newDataCollection)
gridOptions.loading = false
@@ -291,6 +347,9 @@
{title: t('basicData.operate'), width: 55, slots: {default: 'button_slot'}, fixed: "left"},
{type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80},
{type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
+ {field: 'printQuantity', title: t('processCard.printQuantity'), width: 90,
+ editRender: {name: 'input', attrs: {placeholder: ''}},
+ },
{
field: 'order_id',
title: t('order.orderId'),
@@ -326,14 +385,24 @@
title: t('order.OrderNum'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
- filterMethod: filterChanged, width: 100
+ filterMethod: filterChanged, width: 120
+ , sortable: true
},
{
field: 'technology_number',
title: t('processCard.technologyNumber'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
- filterMethod: filterChanged, width: 100
+ filterMethod: filterChanged, width: 120
+ , sortable: true
+ },
+ {
+ field: 'building_number',
+ title: t('processCard.buildingNumber'),
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ filterMethod: filterChanged, width: 120
+ , sortable: true
},
{
field: 'width',
@@ -357,9 +426,7 @@
filterMethod: filterChanged, width: 100
},
{field: 'quantity', title: t('order.quantity'), width: 90},
- {field: 'printQuantity', title: t('processCard.printQuantity'), width: 90,
- editRender: {name: 'input', attrs: {placeholder: ''}},
- },
+
{field: 'total_area', title: t('order.area'), width: 90},
{
field: 'product_name', title: t('order.product'), width: 120,
@@ -458,6 +525,7 @@
let lableTitle = lableType.text
if ($grid) {
switch (code) {
+ //鎵撳嵃娴佺▼鍗�
case 'print': {
if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -479,7 +547,7 @@
dialogTableVisible.value = true
break
}
-
+ //鏍囩鎵撳嵃 甯稿窞
case 'printLabel': {
if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -501,6 +569,7 @@
break
}
+ //鏍囩鎵撳嵃2 甯稿窞
case 'printLabel2': {
if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -550,6 +619,7 @@
})
break
}
+ //鑷畾涔夋垚鍝佹爣绛炬墦鍗�
case 'customLabel': {
if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -568,6 +638,7 @@
id += selectRecords[i].id + "|"
}
}
+ //鎴愬搧鏍囩1
if (lableTypes == 1) {
labelRow.value.list = JSON.stringify(selectRecords)
labelRow.value.faceOrientation = faceOrientation
@@ -576,7 +647,9 @@
lastList.value = []
if (company.label === 1) {
dialogTableVisibleLabel.value = true
- } else if (company.label === 2) {
+ }
+ //甯稿窞椤圭洰
+ else if (company.label === 2) {
router.push({
path: '/main/processCard/PrintCustomLabelCZ',
query: {
@@ -589,7 +662,9 @@
})
}
- } else if (lableTypes == 2) {
+ }
+ //鎴愬搧鏍囩2
+ else if (lableTypes == 2) {
labelRow.value.list = JSON.stringify(selectRecords)
labelRow.value.faceOrientation = faceOrientation
labelRow.value.type = type
@@ -597,7 +672,9 @@
lastList.value = []
if (company.label === 1) {
dialogTableVisibleCustomLabel.value = true
- } else if (company.label === 2) {
+ }
+ //甯稿窞椤圭洰
+ else if (company.label === 2) {
router.push({
path: '/main/processCard/PrintCustomLabelSemiCZ',
query: {
@@ -609,7 +686,9 @@
}
})
}
- } else if (lableTypes == 3) {
+ }
+ //鎴愬搧鏍囩3
+ else if (lableTypes == 3) {
router.push({
path: '/main/processCard/PrintLabel1',
query: {
@@ -632,7 +711,7 @@
return
}
if (printMerge.value === null || printMerge.value === '') {
- ElMessage.warning('璇峰~鍏ラ渶瑕佸悎骞剁殑灞�')
+ ElMessage.warning(t('rework.msg1'))
return
}
@@ -674,7 +753,7 @@
id += selectRecords[i].id + "|"
}
}
-
+ labelRow.value.landingSequence = landingSequence
labelRow.value.list = JSON.stringify(selectRecords)
labelRow.value.faceOrientation = faceOrientation
labelRow.value.type = type
@@ -765,12 +844,12 @@
};
-// 鐩戝惉鎵撳嵃瀹屾垚浜嬩欢
+
+// 鐩戝惉鎵撳嵃娆℃暟浜嬩欢
const printNumber = () => {
selectRecordsData.value.printList = selectRecords
- let printState = 0
- request.post(`/processCard/updatePrintState/${printState}`, selectRecordsData.value).then((res) => {
+ request.post(`/tagStyle/updatePrintNumber`, selectRecordsData.value).then((res) => {
if (res.code == 200 && res.data === true) {
} else {
@@ -780,6 +859,9 @@
})
}
+function onlandingSequenceChange(checked) {
+ landingSequence.value = checked ? 0 : 1
+}
</script>
<template>
@@ -807,7 +889,7 @@
/>
</el-select>
- <el-select v-model="stateValue" :placeholder="$t('processCard.pleaseSelect')" allow-create class="m-2" clearable
+ <el-select v-model="stateValue" v-show="false" :placeholder="$t('processCard.pleaseSelect')" allow-create class="m-2" clearable
filterable style="width: 140px">
<el-option
v-for="item in stateOptions"
@@ -816,6 +898,13 @@
:value="item.value"
/>
</el-select>
+
+ <el-checkbox
+ :model-value="landingSequence === 0"
+ @change="onlandingSequenceChange"
+ >
+ {{ t('processCard.landingSequence') }}
+ </el-checkbox>
</div>
<div class="main-table">
@@ -879,7 +968,7 @@
destroy-on-close
style="width: 75%;height:75% ">
<template #header="{ close, titleId, titleClass }">
- <el-button v-print="printContent" :icon="Printer" circle @click="printNumber"/>
+ <el-button v-print="printContent" :icon="Printer" circle />
</template>
<print-process
id="child"
@@ -897,7 +986,7 @@
destroy-on-close
style="width: 80%;height:75% ">
<template #header="{ close, titleId, titleClass }">
- <el-button v-print="printContentLabel" :icon="Printer" circle/>
+ <el-button v-print="printContentLabel" :icon="Printer" circle @click="printNumber"/>
</template>
<print-custom-label id="childLabel"
:faceOrientation="labelRow.faceOrientation"
@@ -916,7 +1005,7 @@
destroy-on-close
style="width: 80%;height:75% ">
<template #header="{ close, titleId, titleClass }">
- <el-button v-print="printContentLabelSemi" :icon="Printer" circle/>
+ <el-button v-print="printContentLabelSemi" :icon="Printer" circle @click="printNumber"/>
</template>
<print-custom-label-semi id="childLabelSemi"
:faceOrientation="labelRow.faceOrientation"
@@ -945,12 +1034,13 @@
:close-on-press-escape="false"
:title="$t('processCard.labelStyle')"
destroy-on-close
- style="width: 90%;height:93%;margin-top: 3vh ">
+ style="width: 90%;height:91%;margin-top: 3vh ">
<!-- <tag-style style="width: 100%;height: 100%"/>-->
<tag-style-designer :faceOrientation="labelRow.faceOrientation"
:lableType="labelRow.lableType"
:list="labelRow.list"
:type="labelRow.type"
+ :landingSequence="labelRow.landingSequence"
style="width: 100%;height: 100%"/>
</el-dialog>
@@ -962,7 +1052,24 @@
destroy-on-close
style="width: 80%;height:75% ">
<template #header="{ close, titleId, titleClass }">
- <el-button :icon="Printer" circle @click="printObjectProcess"/>
+ <el-tooltip
+ class="box-item"
+ effect="dark"
+ :content="$t('processCard.yesTitle')"
+ placement="top"
+ >
+ <el-button :icon="Printer" circle @click="printOrder(1)"/>
+ </el-tooltip>
+ <el-tooltip
+ class="box-item"
+ effect="dark"
+ :content="$t('processCard.noTitle')"
+ placement="top"
+ >
+ <el-button @click="printOrder(3)">
+ <i class="vxe-icon-print"></i>
+ </el-button>
+ </el-tooltip>
</template>
<print-custom-label-x-j id="childLabel"
:faceOrientation="labelRow.faceOrientation"
--
Gitblit v1.8.0