From e50fa16b6dbc4e7c50d5fbdbc04d2a556ca01c4e Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期一, 02 十二月 2024 11:26:36 +0800
Subject: [PATCH] 补片流程卡调整
---
north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelXJTwo.vue | 93 ++++++++++++++++++++++++++++++++++------------
1 files changed, 69 insertions(+), 24 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelXJTwo.vue b/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelXJTwo.vue
index 49eaad6..a404248 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelXJTwo.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelXJTwo.vue
@@ -31,13 +31,17 @@
faceOrientation:null,//鍐呭闈�
type:null,//鏍囩妯℃澘
lableType:null,//鏍囩绫诲瀷
- switch:null//鍒ゆ柇鏄惁涓烘柊鎵撳嵃
+ switch:null,//鍒ゆ柇鏄惁涓烘柊鎵撳嵃
+ dataType:null,
+ projectNo:null
})
const {currentRoute} = useRouter()
const route = currentRoute.value
let type = props.type
+let dataType = props.dataType
let faceOrientation = props.faceOrientation
+let projectNo=props.projectNo
if (type.indexOf("鑻辨枃")>-1 && faceOrientation==="姝ら潰涓哄鍐呴潰"){
faceOrientation='INSIDE'
}
@@ -45,36 +49,77 @@
faceOrientation='OUTSIDE'
}
let lableType = props.lableType
-data.value.printList = JSON.parse(props.list)
let switchType = props.switch
onMounted(() => {
- request.post(`/processCard/getSelectPrintCustomLabelDetails/${type}/${lableType}`, data.value).then((res) => {
- if (res.code == 200) {
+ if(parseInt(dataType)===1){
+ data.value.printList = JSON.parse(props.list)
+ request.post(`/processCard/getSelectPrintCustomLabelDetails/${type}/${lableType}`, data.value).then((res) => {
+ if (res.code == 200) {
- produceList.value = deepClone(res.data.title)
- list.value = deepClone(res.data.data)
- const data = produceList.value[0].value
- dataList = JSON.parse(`[${data}]`);
- if (switchType===true){
- labelList = props.titleList
- }else {
- labelList = dataList[0]
- }
- for (let i = 0; i < list.value.length; i++) {
- let count = list.value[i].data.length
- for (let j = 0; j < count; j++) {
- for (let k = 0; k < list.value[i].data[j].quantity; k++) {
- lastList.value.push(list.value[i].data[j])
- }
+ produceList.value = deepClone(res.data.title)
+ list.value = deepClone(res.data.data)
+ const data = produceList.value[0].value
+ dataList = JSON.parse(`[${data}]`);
+ if (switchType===true){
+ labelList = props.titleList
+ }else {
+ labelList = dataList[0]
+ }
+ for (let i = 0; i < list.value.length; i++) {
+ let count = list.value[i].data.length
+ for (let j = 0; j < count; j++) {
+ for (let k = 0; k < list.value[i].data[j].quantity; k++) {
+ lastList.value.push(list.value[i].data[j])
}
}
- } else {
- ElMessage.warning(res.msg)
}
- })
+ } else {
+ ElMessage.warning(res.msg)
+ }
+ })
+ }else if(parseInt(dataType)===2){
+ request.post(`/processCard/getPrintCustomDataProjectNo/${type}/${projectNo}`, data.value).then((res) => {
+ if (res.code == 200) {
+ produceList.value = deepClone(res.data.title)
+ list.value = deepClone(res.data.data)
+ const data = produceList.value[0].value
+ dataList = JSON.parse(`[${data}]`);
+ if (switchType===true){
+ labelList = props.titleList
+ }else {
+ labelList = dataList[0]
+ }
+ lastList.value = deepClone(res.data.data)
+ } else {
+ ElMessage.warning(res.msg)
+ }
+ })
+ }else if(parseInt(dataType)===3){
+ data.value.printList = JSON.parse(props.list)
+ request.post(`/processCard/getPrintCustomDataProjectNoDetail/${type}`, data.value).then((res) => {
+ if (res.code == 200) {
+ produceList.value = deepClone(res.data.title)
+ list.value = deepClone(res.data.data)
+ const data = produceList.value[0].value
+ dataList = JSON.parse(`[${data}]`);
+ if (switchType===true){
+ labelList = props.titleList
+ }else {
+ labelList = dataList[0]
+ }
+ for (let i = 0; i < list.value.length; i++) {
+ let count = list.value[i].data.length
+ for (let j = 0; j < count; j++) {
+ lastList.value.push(list.value[i].data[j])
- }
-)
+ }
+ }
+ } else {
+ ElMessage.warning(res.msg)
+ }
+ })
+ }
+})
//淇敼鐩稿悓浜у搧鍚嶇О鏍囩
const updateProductName = (event, index,id) => {
--
Gitblit v1.8.0