From 612254a4c651f79676fab4c925bfdb16e64b58e8 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 19 六月 2024 09:45:32 +0800
Subject: [PATCH] 自定义标签样式调整,添加根据状态显示不同数据
---
north-glass-erp/northglass-erp/src/router/index.js | 5
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabel.vue | 73 ++++--
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInspectionReview.vue | 18 +
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue | 57 ++++-
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi.vue | 192 +++++++++++++++++++
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue | 2
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue | 4
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue | 78 +++++--
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java | 4
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue | 73 ++++++
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java | 27 +
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml | 20 +
12 files changed, 455 insertions(+), 98 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/router/index.js b/north-glass-erp/northglass-erp/src/router/index.js
index f342b81..b7fa3be 100644
--- a/north-glass-erp/northglass-erp/src/router/index.js
+++ b/north-glass-erp/northglass-erp/src/router/index.js
@@ -373,6 +373,11 @@
component: () => import('../views/pp/processCard/PrintCustomLabel.vue'),
},
{
+ path: 'printCustomLabelSemi',
+ name: 'printCustomLabelSemi',
+ component: () => import('../views/pp/processCard/PrintCustomLabelSemi.vue'),
+ },
+ {
path: 'productionScheduling',
name: 'productionScheduling',
component: () => import('../views/pp/processCard/ProductionScheduling.vue'),
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabel.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabel.vue
index 1f1fc88..32e9af2 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabel.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabel.vue
@@ -29,28 +29,25 @@
data.value.printList = JSON.parse(route.query.printList)
const type = route.query.type
const faceOrientation = route.query.faceOrientation
+const lableType = route.query.lableType
+
onMounted(() => {
request.post(`/processCard/getSelectPrintCustomLabel/${type}`, data.value).then((res) => {
if (res.code == 200) {
produceList.value = deepClone(res.data.title)
list.value = deepClone(res.data.data)
- const quantity = res.data.quantity
- console.log(quantity)
const data = produceList.value[0].value
dataList = JSON.parse(`[${data}]`);
labelList = dataList[0]
for (let i = 0; i < list.value.length; i++) {
- let count= list.value[i].quantity
- for (let j = 0; j < quantity; j++) {
- lastList.value.push(list.value[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])
+ }
}
}
- console.log(lastList.value)
- console.log(labelList)
-
-
} else {
ElMessage.warning(res.msg)
router.push("/login")
@@ -58,13 +55,14 @@
})
}
+
)
// 鎵撳嵃鏂规硶
const printFlowCard = () => {
// 闇�瑕佹墦鍗扮殑灞�閮ㄥ尯鍩熻祴浜�"print-wrap"鐨刬d
- let el = document.getElementById("printFlowCard");
+ let el = document.getElementById("print");
let doc = document;
let body = doc.body || doc.getElementsByTagName("body")[0];
let printId = "print-" + Date.now();
@@ -101,15 +99,16 @@
<template>
<el-button id="printButton" @click="printFlowCard();">{{ $t('basicData.print') }}</el-button>
- <div id="printFlowCard">
- <div v-for="(item1,id) in lastList" id="entirety">
- <div class="row4">{{faceOrientation}}</div>
- <div v-for="(item,id) in labelList" class="contentRow">
- <div class="row1">{{ item.title }}:</div>
- <div class="row2">{{ item1.order[item.name] }}</div>
+ <div class="printFlowCard_finished" id="print">
+ <div v-for="(item1,id) in lastList" class="entirety_finished">
+ <div class="row4">{{faceOrientation}}</div>
+ <div v-for="(item,id) in labelList" class="contentRow">
+ <div class="row1">{{ item.title }}:</div>
+ <div class="row2">{{ item1.order[item.name] }}</div>
- </div>
- <div class="row3"><label>W:</label>{{ item1.width }} <label>H:</label>{{ item1.height }}</div>
+ </div>
+ <div class="row3"><label>W:</label>{{ item1.width }} <label>H:</label>{{ item1.height }}</div>
+
</div>
</div>
@@ -121,31 +120,41 @@
padding: 0;
}
+body{
+ overflow: hidden;
+}
+
#printButton {
margin-top: -20px;
width: 100px;
}
-#printFlowCard {
+/*鎴�*/
+.printFlowCard_finished {
flex-wrap: wrap;
- font-size: 20px;
- margin-left: 5px;
- margin-top: 15px;
+ font-size: 16px;
+ margin-left: 6px;
+ display: flex;
+ flex-direction:column;
}
-#entirety {
+
+/*鎴�*/
+.entirety_finished {
display: flex;
text-align: center;
- width: 250px;
- margin-bottom: 10px;
flex-direction:column;
+}
+
+
+.row3{
+ text-align: center;
}
.contentRow{
display: flex;
text-align: center;
- border: red solid 1px;
}
label{
@@ -153,6 +162,7 @@
}
.row1{
+ width: 20%;
font-weight: bolder;
}
@@ -167,14 +177,19 @@
@page {
size: auto; /* auto is the initial value */
- margin: 7mm 2mm 2mm 0mm /* this affects the margin in the printer settings */
-
+ margin: 12mm 4mm 0mm 2mm; /* this affects the margin in the printer settings */
}
@media print {
div {
page-break-inside: avoid;
}
+
+ .entirety_finished {
+ page-break-before: always;
+ page-break-after: always;
+ }
+
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi.vue
new file mode 100644
index 0000000..6e4a041
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi.vue
@@ -0,0 +1,192 @@
+<script setup>
+import request from "@/utils/request"
+import {ElDatePicker, ElMessage} from "element-plus"
+import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue"
+import {Search} from "@element-plus/icons-vue"
+import {useRouter} from 'vue-router'
+import {changeFilterEvent, filterChanged} from "@/hook"
+import {useI18n} from 'vue-i18n'
+import deepClone from "@/utils/deepClone";
+//璇█鑾峰彇
+const {t} = useI18n()
+let router = useRouter()
+let produceList = ref([])
+let labelList = ref([])
+let titleList = ref([])
+let dataList = ref([])
+let list = ref([])
+let lastList=ref([])
+
+let filterData = ref({})
+
+const data = ref({
+ printList: []
+})
+
+
+const {currentRoute} = useRouter()
+const route = currentRoute.value
+data.value.printList = JSON.parse(route.query.printList)
+const type = route.query.type
+const faceOrientation = route.query.faceOrientation
+const lableType = route.query.lableType
+
+onMounted(() => {
+ request.post(`/processCard/getSelectPrintCustomLabel/${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}]`);
+ 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)
+ router.push("/login")
+ }
+ })
+
+ }
+
+)
+
+
+// 鎵撳嵃鏂规硶
+const printFlowCard = () => {
+ // 闇�瑕佹墦鍗扮殑灞�閮ㄥ尯鍩熻祴浜�"print-wrap"鐨刬d
+ let el = document.getElementById("print");
+ let doc = document;
+ let body = doc.body || doc.getElementsByTagName("body")[0];
+ let printId = "print-" + Date.now();
+
+ // 鍒涘缓鏃犲壇浣滅敤鐨勬墦鍗板鍣�(鍥犱笉纭畾椤甸潰鐨勬墦鍗板厓绱犳湁鏃犲叾瀹冩牱寮�)
+ let content = doc.createElement("div");
+ content.id = printId;
+
+ // 鏍峰紡鎺у埗涓庢墦鍗版棤鍏崇殑鍏冪礌闅愯棌
+ let style = doc.createElement("style");
+ style.innerHTML =
+ "body>#" +
+ printId +
+ "{display:none}@media print{body>:not(#" +
+ printId +
+ "){display:none !important}body>#" +
+ printId +
+ "{display:block;padding-top:1px}}";
+ //
+ content.innerHTML = el.outerHTML;
+ // // console.log("el.outerHTML", el.outerHTML);
+ body.appendChild(style);
+
+ // 涓巗tyle鍏冪礌璁剧疆鐨勬牱寮忕浉閰嶅悎
+ // 鎶婃墦鍗板唴瀹圭殑鍏冪礌娣诲姞鍒癰ody(浣滀负body鐨勫瓙鍏冪礌锛屽彲鐢╞ody鐨勫瓙閫夋嫨鍣� '>' 鎺у埗鎵撳嵃鏍峰紡)
+ body.appendChild(content);
+ setTimeout(() => {
+ window.print();
+ body.removeChild(content);
+ body.removeChild(style);
+ }, 20);
+}
+</script>
+
+<template>
+ <el-button id="printButton" @click="printFlowCard();">{{ $t('basicData.print') }}</el-button>
+ <div class="printFlowCard_semi" id="print">
+ <div v-for="(item1,id) in lastList" class="entirety_semi">
+ <div class="row4">{{faceOrientation}}</div>
+ <div v-for="(item,id) in labelList" class="contentRow">
+ <div class="row1">{{ item.title }}:</div>
+ <div class="row2">{{ item1.order[item.name] }}</div>
+
+ </div>
+ <div class="row3"><label>W:</label>{{ item1.width }} <label>H:</label>{{ item1.height }}</div>
+
+ </div>
+ </div>
+
+</template>
+
+<style scoped>
+* {
+ margin: 0;
+ padding: 0;
+}
+
+body{
+ overflow: hidden;
+}
+
+#printButton {
+ margin-top: -20px;
+ width: 100px;
+}
+
+
+
+/*鍗�*/
+.printFlowCard_semi {
+ flex-wrap: wrap;
+ font-size: 10px;
+ display: flex;
+}
+
+
+
+/*鍗�*/
+.entirety_semi {
+ width: 45%;
+ display: flex;
+ text-align: center;
+ flex-direction:column;
+ margin: 8px;
+
+}
+
+.row3{
+ text-align: center;
+}
+
+.contentRow{
+ display: flex;
+ text-align: center;
+}
+
+label{
+ font-weight: bolder;
+}
+
+.row1{
+ width: 30%;
+ font-weight: bolder;
+}
+
+.row4{
+ font-weight: bolder;
+ text-align: right;
+}
+
+.row1,.row2{
+ text-align: left;
+}
+
+@page {
+ size: auto; /* auto is the initial value */
+ margin: 0mm 2mm 2mm 2mm; /* this affects the margin in the printer settings */
+
+}
+
+@media print {
+ div {
+ page-break-inside: avoid;
+ }
+}
+
+</style>
\ No newline at end of file
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 7c02c89..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
@@ -86,6 +86,19 @@
},
]
+//瀹ゅ唴瀹ゅ闈�
+const lableType = ref('1')
+const lableTypeOptions = [
+ {
+ value: '1',
+ label: '鎴愬搧鏍囩',
+ },
+ {
+ value: '2',
+ label: '鍗婂搧鏍囩',
+ },
+]
+
//鎵撳嵃绫诲瀷
const printType = ref()
@@ -181,14 +194,6 @@
filterMethod: filterChanged
},
{
- field: 'order_number',
- title: '搴忓彿',
- showOverflow: "ellipsis",
- filters: [{data: ''}],
- slots: {filter: 'num1_filter'},
- filterMethod: filterChanged
- },
- {
field: 'customer_name',
title: t('customer.customerName'),
filters: [{data: ''}],
@@ -216,7 +221,7 @@
buttons: [
{code: 'print', name: t('processCard.print'), status: 'primary'},
{code: 'printLabel', name: t('processCard.printLabel'), status: 'primary'},
- // {code: 'customLabel', name: '鑷畾涔夋爣绛炬墦鍗�', status: 'primary'},
+ {code: 'customLabel', name: '鑷畾涔夋爣绛炬墦鍗�', status: 'primary'},
],
// import: false,
@@ -249,6 +254,7 @@
selectRecords = $grid.getCheckboxRecords()
let type=printType.value
let faceOrientation=stateValue.value
+ let lableTypes=lableType.value
if ($grid) {
switch (code) {
case 'print': {
@@ -329,7 +335,15 @@
}
}
- router.push({path: '/main/processCard/PrintCustomLabel', query: {type:type,faceOrientation:faceOrientation, printList: JSON.stringify(selectRecords)}})
+ 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
}
@@ -474,23 +488,33 @@
<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="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>-->
+ <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"
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
index d97bdc3..1f8a095 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
@@ -12,7 +12,7 @@
let router = useRouter()
let produceList = ref([])
let labelList = ref([])
-let list = ref()
+let list = ref([])
const data = ref({
@@ -29,13 +29,19 @@
if (res.code == 200) {
produceList.value = deepClone(res.data.data)
+
+ console.log(produceList.value)
for (let i = 0; i < produceList.value.length; i++) {
- let count= produceList.value[i].quantity
+ let count= produceList.value[i].data.length
for (let j = 0; j < count; j++) {
- labelList.value.push(produceList.value[i])
+ for (let k = 0; k < produceList.value[i].data[j].quantity; k++){
+ labelList.value.push(produceList.value[i].data[j])
+ }
+
}
}
+ console.log(labelList.value)
} else {
ElMessage.warning(res.msg)
router.push("/login")
@@ -90,20 +96,39 @@
<template>
<el-button id="printButton" @click="printFlowCard();">{{ $t('basicData.print') }}</el-button>
<div id="printFlowCard" >
+<!-- <div id="entirety" v-for="(items,id) in produceList" >
+ <div v-for="(item,index) in items.data" :key="index">
+ <div class="row1">{{ item.customer_name }}</div>
+ <div class="row2">
+ <span>{{ item.order_id }}</span>
+ <span>{{ item.type_name }}</span>
+ </div>
+ <div class="row3">{{item.child_width}}*{{item.child_height}}={{item.quantity}}</div>
+ <div class="row5">
+ <span>{{item.project}}</span>
+ <span>{{ item.remarks }}</span>
+ </div>
+ <div class="row6">
+ <span>{{item.glass_child}}</span>
+ <span>{{item.processing_note}}</span>
+ </div>
+ </div>
+ </div>-->
<div id="entirety" v-for="(item,id) in labelList" >
- <div class="row1">{{ item.customer_name }}</div>
- <div class="row2">
- <span>{{ item.order_id }}</span>
- <span>{{ item.type_name }}</span>
- </div>
- <div class="row3">{{item.child_width}}*{{item.child_height}}={{item.quantity}}</div>
- <div class="row5">
- <span>{{item.project}}</span>
- <span>{{ item.remarks }}</span>
- </div>
- <div class="row6">
- <span>{{item.glass_child}}</span>
- <span>{{item.processing_note}}</span></div>
+ <div class="row1">{{ item.customer_name }}</div>
+ <div class="row2">
+ <span>{{ item.order_id }}</span>
+ <span>{{ item.type_name }}</span>
+ </div>
+ <div class="row3">{{item.child_width}}*{{item.child_height}}={{item.quantity}}</div>
+ <div class="row5">
+ <span>{{item.project}}</span>
+ <span>{{ item.remarks }}</span>
+ </div>
+ <div class="row6">
+ <span>{{item.glass_child}}</span>
+ <span>{{item.processing_note}}</span>
+ </div>
</div>
</div>
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue
index e1735ae..8fff03d 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectDetailProcessCard.vue
@@ -141,7 +141,7 @@
{field: 'process_id', width: 140, title: t('processCard.processId') ,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
{field: 'order_number', title: t('order.OrderNum') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },},
{field: 'technology_number', title: t('processCard.technologyNumber') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },},
- {field: 'quantity', title: t('order.OrderNum'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 80},
+ {field: 'quantity', title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 80},
{field: 'child_width', title: t('order.width'), },
{field: 'child_height', title: t('order.height'), },
{field: 'area', title: t('order.area') ,showOverflow:"ellipsis"},
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInspectionReview.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInspectionReview.vue
index e538a1b..4c8fa17 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInspectionReview.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/QualityInspectionReview.vue
@@ -176,7 +176,19 @@
total.dataTotal = res.data.total.total*1
total.pageTotal= res.data.total.pageTotal
pageTotal.value = res.data.total
- xGrid.value.loadData(res.data.data)
+ produceList = deepClone(res.data.data)
+ produceList.forEach(item => {
+ if (item.damageDetails.qualityInsStatus === 2) {
+ item.damageDetails.qualityInsStatus = '宸茶川妫�';
+ }
+ else if (item.damageDetails.qualityInsStatus === 1){
+ item.damageDetails.qualityInsStatus = '寰呰川妫�';
+ }
+ else if (item.damageDetails.qualityInsStatus === 0){
+ item.damageDetails.qualityInsStatus = '鏃犻渶璐ㄦ';
+ }
+ });
+ xGrid.value.reloadData(produceList)
gridOptions.loading = false
} else {
ElMessage.warning(res.msg)
@@ -395,8 +407,8 @@
size="small">
{{ $t('basicData.edit') }}
</el-button>
- <el-button v-if="row.damageDetails.qualityInsStatus===1" @click="getTableRow(row,'setType')" link type="primary" size="small">{{ $t('basicData.review') }}</el-button>
- <el-button v-else disabled @click="getTableRow(row,'setType')" link type="primary" size="small">{{ $t('basicData.review') }}</el-button>
+ <el-button v-if="row.damageDetails.qualityInsStatus==='宸茶川妫�'||row.damageDetails.qualityInsStatus==='鏃犻渶璐ㄦ'" disabled @click="getTableRow(row,'setType')" link type="primary" size="small">{{ $t('basicData.review') }}</el-button>
+ <el-button v-else @click="getTableRow(row,'setType')" link type="primary" size="small">{{ $t('basicData.review') }}</el-button>
</template>
<template #num1_filter="{ column, $panel }">
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
index a6b8b39..3f2d938 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
@@ -116,7 +116,23 @@
total.pageTotal= res.data.total.pageTotal
pageTotal.value = res.data.total
produceList = produceList.value.concat(deepClone(res.data.data))
- xGrid.value.reloadData(produceList)
+ // 浣跨敤map鏂规硶鏉ュ鐞嗘瘡涓璞�
+ let modifiedCollection = produceList.map(item => {
+ if (item.reviewedState === 1) {
+ return { ...item, reviewedState: "宸插鏍�" };
+ }
+ else if (item.reviewedState === 0) {
+ return { ...item, reviewedState: "鏈鏍�" };
+ }
+ else if (item.reviewedState === 2){
+ return { ...item, reviewedState: "瀹℃牳涓嶉�氳繃" };
+ }
+ else {
+ // 鍏朵粬鎯呭喌淇濇寔涓嶅彉
+ return item;
+ }
+ });
+ xGrid.value.reloadData(modifiedCollection)
gridOptions.loading = false
} else {
ElMessage.warning(res.msg)
@@ -136,7 +152,23 @@
produceList = deepClone(res.data.data)
- xGrid.value.reloadData(produceList)
+ // 浣跨敤map鏂规硶鏉ュ鐞嗘瘡涓璞�
+ let modifiedCollection = produceList.map(item => {
+ if (item.reviewedState === 1) {
+ return { ...item, reviewedState: "宸插鏍�" };
+ }
+ else if (item.reviewedState === 0) {
+ return { ...item, reviewedState: "鏈鏍�" };
+ }
+ else if (item.reviewedState === 2){
+ return { ...item, reviewedState: "瀹℃牳涓嶉�氳繃" };
+ }
+ else {
+ // 鍏朵粬鎯呭喌淇濇寔涓嶅彉
+ return item;
+ }
+ });
+ xGrid.value.reloadData(modifiedCollection)
}else{
ElMessage.warning(res.msg)
}
@@ -157,7 +189,24 @@
total.dataTotal = res.data.total.total*1
total.pageTotal= res.data.total.pageTotal
pageTotal.value = res.data.total
- xGrid.value.loadData(res.data.data)
+ produceList=res.data.data
+ // 浣跨敤map鏂规硶鏉ュ鐞嗘瘡涓璞�
+ let modifiedCollection = produceList.map(item => {
+ if (item.reviewedState === 1) {
+ return { ...item, reviewedState: "宸插鏍�" };
+ }
+ else if (item.reviewedState === 0) {
+ return { ...item, reviewedState: "鏈鏍�" };
+ }
+ else if (item.reviewedState === 2){
+ return { ...item, reviewedState: "瀹℃牳涓嶉�氳繃" };
+ }
+ else {
+ // 鍏朵粬鎯呭喌淇濇寔涓嶅彉
+ return item;
+ }
+ });
+ xGrid.value.reloadData(modifiedCollection)
gridOptions.loading = false
} else {
ElMessage.warning(res.msg)
@@ -203,7 +252,23 @@
total.pageTotal=parseInt(res.data.total)
pageNum.value=1
produceList = deepClone(res.data.data)
- xGrid.value.reloadData(produceList)
+ // 浣跨敤map鏂规硶鏉ュ鐞嗘瘡涓璞�
+ let modifiedCollection = produceList.map(item => {
+ if (item.reviewedState === 1) {
+ return { ...item, reviewedState: "宸插鏍�" };
+ }
+ else if (item.reviewedState === 0) {
+ return { ...item, reviewedState: "鏈鏍�" };
+ }
+ else if (item.reviewedState === 2){
+ return { ...item, reviewedState: "瀹℃牳涓嶉�氳繃" };
+ }
+ else {
+ // 鍏朵粬鎯呭喌淇濇寔涓嶅彉
+ return item;
+ }
+ });
+ xGrid.value.reloadData(modifiedCollection)
gridOptions.loading=false
}else{
ElMessage.warning(res.msg)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue b/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
index 675bfbe..001dd58 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
@@ -255,8 +255,8 @@
{field: 'order.batch', title: t('order.batch'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 110},
{field: 'order.project', title: t('order.project'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 210},
{field: 'order.orderType', title: t('order.orderType'), showOverflow: "ellipsis", width: 110},
- {field: 'orderDetail.grossArea', title: t('order.orderType'), width: 70},
- {field: 'orderDetail.quantity', title: t('order.grossArea'),},
+ {field: 'orderDetail.grossArea', title: t('order.grossArea'), width: 70},
+ {field: 'orderDetail.quantity', title: t('order.quantity'),},
{field: 'order.creator', title: t('order.creator'),},
],//琛ㄥご鎸夐挳
data: null,//琛ㄦ牸鏁版嵁
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
index 0647e20..ebf22f3 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -93,5 +93,7 @@
List<Map<String, Object>> getCustomLabelDetailMp(String name, String form, String id, FlowCard flowCard);
- List<Order> getPrintCustomData(String orderId, Integer orderNumber);
+ List<Order> getPrintCustomData(String processId, Integer technologyNumber);
+
+ Integer getPrintLabelCount(String processId, Integer technologyNumber);
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
index 5e1ed14..69d3e53 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -257,16 +257,21 @@
public Map<String, Object> getSelectPrintLabelSv(Map<String, Object> object) {
Map<String, Object> map = new HashMap<>();
+ List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//鏈�缁堢粨鏋�
List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
if (!flowCardList.isEmpty()) {
for (FlowCard flowCard : flowCardList) {
- Integer count=flowCard.getQuantity();
- for (int i = 0; i < count; i++) {
- map.put("data", flowCardMapper.getPrintLabel(flowCard.getProcessId(), flowCard.getTechnologyNumber()));
- System.out.println(flowCardMapper.getPrintLabel(flowCard.getProcessId(), flowCard.getTechnologyNumber()));
- }
+ // Integer count=flowCardMapper.getPrintLabelCount(flowCard.getProcessId(), flowCard.getTechnologyNumber());
+ Map<String, Object> itemmap = new HashMap<>();
+ // for (int i = 0; i < count; i++) {
+ itemmap.put("data", flowCardMapper.getPrintLabel(flowCard.getProcessId(), flowCard.getTechnologyNumber()));
+ list.add(itemmap);
+ //}
+
}
}
+
+ map.put("data", list);
return map;
}
@@ -293,12 +298,16 @@
List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
if (!flowCardList.isEmpty()) {
for (FlowCard flowCard : flowCardList) {
- map.put("data", flowCardMapper.getPrintCustomData(flowCard.getOrderId(),flowCard.getOrderNumber()));
- map.put("quantity", flowCard.getQuantity());
+
+ Map<String, Object> itemmap = new HashMap<>();
+ itemmap.put("data", flowCardMapper.getPrintCustomData(flowCard.getProcessId(),flowCard.getTechnologyNumber()));
+ list.add(itemmap);
+
+
}
}
-
- map.put("title", flowCardMapper.getPrintTitle(type));
+ map.put("data", list);
+ map.put("title", flowCardMapper.getPrintTitle(type));
return map;
}
diff --git a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
index 9bc991c..b7cef34 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -615,7 +615,7 @@
order_type,
order_classify,
batch,
- icon,
+ o.icon,
pack_type,
delivery_date,
al_type,
@@ -625,15 +625,23 @@
contacts,
delivery_address,
od.processing_note,
- width,
- height,
- od.quantity
+ width,
+ height,
+ od.quantity,
+ od.order_number,
+ fc.technology_number
from sd.order as o
left join sd.order_detail as od on o.order_id = od.order_id
- where o.order_id = #{orderId}
- and od.order_number = #{orderNumber}
+ left join flow_card as fc on o.order_id = fc.order_id and
+ od.order_number = fc.order_number
+ where fc.process_id = #{processId}
+ and fc.technology_number=#{technologyNumber}
+ group by od.order_number,width,height
+ </select>
+
+ <select id="getPrintLabelCount">
</select>
--
Gitblit v1.8.0