From 12f2fd73462da331478fabc7eaa79fc35b1a59b3 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期五, 19 七月 2024 16:41:17 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue | 134 +++++++++++++++++++++++++++++++++-----------
1 files changed, 100 insertions(+), 34 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
index c89ec54..711b7d1 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -9,12 +9,13 @@
import {changeFilterEvent, filterChanged} from "@/hook"
import {VXETable} from "vxe-table";
import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove";
-import PrintProcess from '@/views/pp/processCard/PrintProcess.vue'
+import PrintProcess from '@/components/pp/PrintProcess.vue'
import PrintLabel from '@/views/pp/processCard/PrintLabel.vue'
import PrintCustomLabel from '@/views/pp/processCard/PrintCustomLabel.vue'
import SortDetail from '@/components/pp/SelectSortDetailProcessCard.vue'
import footSum from "@/hook/footSum"
import companyInfo from "@/stores/sd/companyInfo"
+import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global";
const company = companyInfo()
@@ -28,13 +29,27 @@
const printVisible= ref(false)
let selectRecords = ref(null)
+const selectRecordsData = ref({
+ printList: []
+})
+
const xGrid = ref(null)
const xGridDetail =ref(null)
+//鎺掑簭
let editRow = ref({
processId:null,
technologyNumber:null
})
+
+//鎵撳嵃
+let printRow = ref({
+ list:null,
+ printMergeVal:null,
+ like:null
+})
+
+
const getTableRow = (row,type) => {
switch (type) {
@@ -119,6 +134,10 @@
const printMerge = ref('')
const printMergeOptions=[{}]
+const printContent = ref({
+ id: 'child',
+
+})
//鎵撳嵃绫诲瀷
const printType = ref()
@@ -128,26 +147,30 @@
dataType: [],
})
+const data = ref({
+ printList: []
+})
+
const {currentRoute} = useRouter()
const route = currentRoute.value
let orderId = route.query.orderId
+data.value.printList=JSON.parse(route.query.printList)
+
// 绗竴娆″姞杞芥煡璇�
-request.post(`/processCard/selectPrint/${orderId}`, filterData.value).then((res) => {
+request.post(`/processCard/selectPrint`, data.value).then((res) => {
if (res.code == 200) {
- produceList = produceList.value.concat(deepClone(res.data.data))
+ let newDataCollection = [];
+ for (let i = 0; i <res.data.data.length ; i++) {
+ res.data.data[i].detail.forEach((item) =>{
+ newDataCollection.push(item);
+ })
+ }
+
titleSelectJson.value.dataType = res.data.type
- produceList.forEach(item => {
- if(item.print_status == 1){
- item.print_status='宸叉墦鍗�'
- }
- else if (item.print_status == 0){
- item.print_status='鏈墦鍗�'
- }
- });
- xGrid.value.reloadData(produceList)
+ xGrid.value.reloadData(newDataCollection)
gridOptions.loading = false
hideButton()
} else {
@@ -259,6 +282,7 @@
{code: 'customLabel', name: t('processCard.customLabelPrinting'), status: 'primary'},
{code: 'printLabel', name: t('processCard.labelPrinting'), status: 'primary'},
{code: 'printLabel2', name: t('processCard.labelPrinting2'), status: 'primary'},
+ {code: 'printLike', name: "鍚岄厤缃墦鍗�", status: 'primary'},
],
// import: false,
// export: true,
@@ -290,9 +314,9 @@
toolbarButtonClick ({ code}) {
const $grid = xGrid.value
selectRecords = $grid.getCheckboxRecords()
- selectRecords.forEach(obj => {
- delete obj.print_status;
- });
+ // selectRecords.forEach(obj => {
+ // delete obj.print_status;
+ // });
let type=printType.value
let faceOrientation=stateValue.value
let lableTypes=lableType.value
@@ -313,10 +337,11 @@
id += selectRecords[i].id + "|"
}
}
-
- let printMergeVal=printMerge.value
- router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}})
-
+ printRow.value.list = JSON.stringify(selectRecords)
+ printRow.value.printMergeVal=printMerge.value
+ printRow.value.like=null
+ // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}})
+ dialogTableVisible.value=true
break
}
@@ -418,6 +443,31 @@
break
}
+ case 'printLike': {
+ if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
+ ElMessage.warning(t('searchOrder.msgList.checkOrder'))
+ return
+ }
+ if(printMerge.value===null ||printMerge.value===''){
+ ElMessage.warning('璇峰~鍏ラ渶瑕佸悎骞剁殑灞�')
+ return
+ }
+
+ let id = ""
+ for (let i = 0; i < selectRecords.length; i++) {
+ if (i + 1 === selectRecords.length) {
+ id += selectRecords[i].id
+ } else {
+ id += selectRecords[i].id + "|"
+ }
+ }
+ printRow.value.list = JSON.stringify(selectRecords)
+ printRow.value.printMergeVal=printMerge.value
+ printRow.value.like="1"
+ // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}})
+ dialogTableVisible.value=true
+ break
+ }
}
}
},
@@ -435,9 +485,25 @@
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' ;
} else {
- return true; // 涓嶉殣钘忎换浣曟寜閽�
+ return true && button.code !=='printLike'; // 鏄剧ず璇ユ寜閽�
+ }
+ })
+}
+
+
+// 鐩戝惉鎵撳嵃瀹屾垚浜嬩欢
+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'))
+
}
})
}
@@ -523,11 +589,15 @@
</vxe-grid>
<el-dialog
+ id="sizePrintCalrd"
v-model="dialogTableVisible"
- destroy-on-close
:title="$t('processCard.print')"
- style="width: 80%;height:75% ">
- <PrintProcess :printList="selectRecords"
+ destroy-on-close
+ style="width: 75%;height:75% ">
+ <template #header="{ close, titleId, titleClass }">
+ <el-button v-print="printContent" @click="printNumber" :icon="Printer" circle />
+ </template>
+ <print-process id="child" :printList="printRow.list" :printMerge="printRow.printMergeVal" :printLike="printRow.like"
style="width: 100%;height: 100%" />
</el-dialog>
@@ -568,20 +638,16 @@
height: 100%;
}
-.vxe-grid {
- /* 绂佺敤娴忚鍣ㄩ粯璁ら�変腑 */
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
:deep(#sizeCheck .el-dialog__body){
height: 90%;
width: 100%;
}
-/deep/ .vxe-menu {
- position: absolute;
- z-index: 9999 !important;
+
+:deep(#sizePrintCalrd .el-dialog__body){
+ height: 85%;
+ width: 100%;
+ overflow-y: auto;
}
+
</style>
\ No newline at end of file
--
Gitblit v1.8.0