From a944fc9a5bfaac1e2367f6ce398f09eafbcb53a5 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 19 六月 2024 10:01:18 +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 | 146 +++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 131 insertions(+), 15 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 5e615b1..5319bfb 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
@@ -11,12 +11,14 @@
import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove";
import PrintProcess from '@/views/pp/processCard/PrintProcess.vue'
import PrintLabel from '@/views/pp/processCard/PrintLabel.vue'
+import PrintCustomLabel from '@/views/pp/processCard/PrintCustomLabel.vue'
import footSum from "@/hook/footSum"
//璇█鑾峰彇
const {t} = useI18n()
let router = useRouter()
const dialogTableVisible = ref(false)
const dialogTableVisibleLabel = ref(false)
+const dialogTableVisibleCustomLabel = ref(false)
const printVisible= ref(false)
let selectRecords = ref(null)
@@ -60,6 +62,7 @@
})
+
//瀹氫箟椤甸潰鎬婚〉鏁�
let pageTotal = ref('')
//瀹氫箟鏁版嵁杩斿洖缁撴灉
@@ -69,6 +72,41 @@
//瀹氫箟褰撳墠椤垫暟
let pageNum = $ref(1)
let pageState = null
+
+//瀹ゅ唴瀹ゅ闈�
+const stateValue = ref('姝ら潰涓哄鍐呴潰')
+const stateOptions = [
+ {
+ value: '姝ら潰涓哄鍐呴潰',
+ label: '姝ら潰涓哄鍐呴潰',
+ },
+ {
+ value: '姝ら潰涓哄澶栭潰',
+ label: '姝ら潰涓哄澶栭潰',
+ },
+]
+
+//瀹ゅ唴瀹ゅ闈�
+const lableType = ref('1')
+const lableTypeOptions = [
+ {
+ value: '1',
+ label: '鎴愬搧鏍囩',
+ },
+ {
+ value: '2',
+ label: '鍗婂搧鏍囩',
+ },
+]
+
+
+//鎵撳嵃绫诲瀷
+const printType = ref()
+
+//瀹氫箟鎺ユ敹鍔犺浇琛ㄥご涓嬫媺鏁版嵁
+const titleSelectJson = ref({
+ dataType: [],
+})
const {currentRoute} = useRouter()
const route = currentRoute.value
@@ -80,12 +118,14 @@
if (res.code == 200) {
produceList = produceList.value.concat(deepClone(res.data.data))
+ titleSelectJson.value.dataType = res.data.type
xGrid.value.reloadData(produceList)
gridOptions.loading = false
} else {
ElMessage.warning(res.msg)
}
})
+
//琛ㄥ熬姹傚拰
const sumNum = (list, field) => {
@@ -147,7 +187,7 @@
},
{
field: 'process_id',
- title: '娴佺▼鍗″彿',
+ title: t('processCard.processId'),
showOverflow: "ellipsis",
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
@@ -155,32 +195,34 @@
},
{
field: 'customer_name',
- title: '瀹㈡埛鍚嶇О',
+ title: t('customer.customerName'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
filterMethod: filterChanged
},
{
field: 'project',
- title: '椤圭洰鍚嶇О',
+ title: t('order.project'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
filterMethod: filterChanged
},
- {field: 'technology_number', title: '灏忕墖椤哄簭', showOverflow: "ellipsis"},
- {field: 'glass_address', title: '灏忕墖鏍囪',},
- {field: 'quantity', title: '鏁伴噺',},
- {field: 'total_area', title: '闈㈢Н',},
- {field: 'product_name', title: '浜у搧鍚嶇О',},
- {field: 'glass_child', title: '鍗曠墖鍚嶇О',},
- {field: 'founder', title: '鍒嗘灦鍛�',},
- {field: 'splitFrame_time', title: '鍒嗘灦鏃堕棿',},
+ {field: 'technology_number', title: t('processCard.technologyNumber'), showOverflow: "ellipsis"},
+ {field: 'glass_address', title: t('processCard.glassAddress'),},
+ {field: 'quantity', title: t('order.quantity'),},
+ {field: 'total_area', title: t('order.area'),},
+ {field: 'product_name', title: t('order.product'),},
+ {field: 'glass_child', title: t('reportingWorks.glassChild'),},
+ {field: 'founder', title: t('processCard.founder'),},
+ {field: 'splitFrame_time', title: t('processCard.splitFrameTime'),},
],//琛ㄥご鎸夐挳
toolbarConfig: {
buttons: [
- {code: 'print', name: '鎵撳嵃娴佺▼鍗�', status: 'primary'},
- {code: 'printLabel', name: '鎵撳嵃鏍囩', status: 'primary'},
+ {code: 'print', name: t('processCard.print'), status: 'primary'},
+ {code: 'printLabel', name: t('processCard.printLabel'), status: 'primary'},
+ {code: 'customLabel', name: '鑷畾涔夋爣绛炬墦鍗�', status: 'primary'},
+
],
// import: false,
// export: true,
@@ -210,6 +252,9 @@
toolbarButtonClick ({ code}) {
const $grid = xGrid.value
selectRecords = $grid.getCheckboxRecords()
+ let type=printType.value
+ let faceOrientation=stateValue.value
+ let lableTypes=lableType.value
if ($grid) {
switch (code) {
case 'print': {
@@ -271,10 +316,42 @@
})
break
}
+ case 'customLabel': {
+ if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
+ ElMessage.warning(t('searchOrder.msgList.checkOrder'))
+ return
+ }
+ if (type===null||type===''||type===undefined){
+ 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 + "|"
+ }
+ }
+
+ if (lableTypes==1){
+ router.push({path: '/main/processCard/PrintCustomLabel', query: {type:type,faceOrientation:faceOrientation,lableType:lableTypes, printList: JSON.stringify(selectRecords)}})
+
+ }
+ else {
+ router.push({path: '/main/processCard/PrintCustomLabelSemi', query: {type:type,faceOrientation:faceOrientation,lableType:lableTypes, printList: JSON.stringify(selectRecords)}})
+
+ }
+
+
+ break
+ }
}
}
},
}
+
const detailGridOptions = reactive({
@@ -406,10 +483,38 @@
xGridDetail.value.reloadData(detail.value)
}
+
</script>
<template>
<div class="main-div-customer">
+ <label>鏍囩鏍峰紡锛�</label>
+ <el-select v-model="printType" clearable default-value="default_city" style="width: 120px">
+ <el-option
+ v-for="item in titleSelectJson['dataType']"
+ :key="item.id"
+ :label="item.name"
+ :value="item.name"
+ />
+ </el-select>
+
+ <el-select v-model="lableType" class="m-2" placeholder="鎴愬搧鏍囩" style="width: 140px">
+ <el-option
+ v-for="item in lableTypeOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+
+ <el-select v-model="stateValue" class="m-2" placeholder="瀹ゅ唴澶栭潰" style="width: 140px">
+ <el-option
+ v-for="item in stateOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
<vxe-grid
ref="xGrid"
class="mytable-scrollbar"
@@ -460,7 +565,7 @@
<el-dialog
v-model="dialogTableVisible"
destroy-on-close
- title="娴佺▼鍗℃墦鍗�"
+ :title="$t('processCard.print')"
style="width: 80%;height:75% ">
<PrintProcess :printList="selectRecords"
style="width: 100%;height: 100%" />
@@ -469,7 +574,16 @@
<el-dialog
v-model="dialogTableVisibleLabel"
destroy-on-close
- title="鏍囩鎵撳嵃"
+ :title="$t('processCard.printLabel')"
+ style="width: 80%;height:75% ">
+ <PrintLabel :printList="selectRecords"
+ style="width: 100%;height: 100%" />
+ </el-dialog>
+
+ <el-dialog
+ v-model="dialogTableVisibleCustomLabel"
+ destroy-on-close
+ title="鑷畾涔夋爣绛�"
style="width: 80%;height:75% ">
<PrintLabel :printList="selectRecords"
style="width: 100%;height: 100%" />
@@ -514,6 +628,8 @@
</vxe-grid>
</el-dialog>
+
+
</div>
</template>
--
Gitblit v1.8.0