From 1c5bdd46d4d8b71fd3dc7bbfb2331d9281305ec4 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期五, 22 十一月 2024 16:50:59 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue | 10
north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue | 36 ++
north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelProject.vue | 186 +++++-----
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintProject.vue | 131 ++++++
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProjectDetails.vue | 574 ++++---------------------------
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java | 2
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java | 5
north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelTwo.vue | 28 +
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java | 15
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml | 86 ++++
10 files changed, 456 insertions(+), 617 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelProject.vue b/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelProject.vue
index 38d0abc..d8a3630 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelProject.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelProject.vue
@@ -30,35 +30,63 @@
list:null,//鍕鹃�夌殑鏁版嵁
faceOrientation:null,//鍐呭闈�
type:null,//鏍囩妯℃澘
- lableType:null//鏍囩绫诲瀷
+ lableType:null,//鏍囩绫诲瀷
+ titleList:null,//鏍囬
+ switch:null,//鍒ゆ柇鏄惁涓烘柊鎵撳嵃,
+ lastList:[],
+ detailType:null
})
const {currentRoute} = useRouter()
const route = currentRoute.value
let type = props.type
-let faceOrientation = props.faceOrientation
-if (type.indexOf("鑻辨枃")>-1 && faceOrientation==="姝ら潰涓哄鍐呴潰"){
- faceOrientation='INSIDE'
-}
-else if (type.indexOf("鑻辨枃")>-1 && faceOrientation==="姝ら潰涓哄澶栭潰"){
- faceOrientation='OUTSIDE'
-}
+
let lableType = props.lableType
+let switchType = props.switch
+let detailType= props.detailType
data.value.printList = JSON.parse(props.list)
onMounted(() => {
- request.post(`/processCard/getPrintCustomDataProjectNoDetail/${type}`, data.value).then((res) => {
+ request.post(`/processCard/getPrintCustomDataProjectNoDetail/${type}/${detailType}`, data.value).then((res) => {
if (res.code == 200) {
- console.log(res.data.data)
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]
+ const printElements = dataList[0].panels[0].printElements;
+ let a = []
+ printElements.forEach(element => {
+ if(element.options.field==='table'){
+ element.options.columns[0].forEach(elements => {
+ if(elements.field){
+ a.push({
+ title: elements.title,
+ name: elements.field
+ }
+ )
+ }
+ })
+ }else{
+ a.push({
+ title: element.options.title,
+ name: element.options.field
+ })
+ }
+ })
+ labelList = a
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])
+ if (detailType==0){
+ for (let k = 0; k < list.value[i].data[j].quantity; k++) {
+ props.lastList.push(list.value[i].data[j])
+ }
+ }
+ else {
+ //for (let k = 0; k < list.value[i].data[j].quantity; k++) {
+ props.lastList.push(list.value[i].data[j])
+ //}
+ }
}
}
} else {
@@ -127,17 +155,20 @@
</script>
<template>
- <div id="print" :class="company.printLabel.className.custom.printFlowCardName()">
- <div v-for="(item1,index) in lastList" :class="company.printLabel.className.custom.entiretyName()">
- <div class="row4">{{ faceOrientation }}</div>
- <div v-for="(item,id) in labelList" :class="company.printLabel.className.custom.contentRowName()">
- <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row1" contenteditable="true" @input="updateProductName($event, id,index)" v-text="item.title+'锛�'+item1[item.name]"></div>
-<!-- <div class="row2" style="width: 100%;"><input class="contentRow2" v-model="item1[item.name]" @keyup="updataProductName()" style="border: none;"/></div>-->
-<!-- <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row2" style="width: 100%;" contenteditable="true" @input="updateProductName($event, id)" v-text="item1[item.name]"></div>-->
- </div>
- <div v-html="company.printLabel.custom(item1)"></div>
+ <div id="print" :class="company.printLabel.className.semi.printFlowCardName()">
+ <div v-for="(item1,index) in props.lastList" :class="company.printLabel.className.semi.entiretyName()">
+ <div class="row4">{{ faceOrientation }}</div>
+ <div v-for="(item,id) in labelList" :class="company.printLabel.className.semi.contentRowName()">
+ <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row1" contenteditable="true" @input="updateProductName($event, id,index)" v-text="item.title+'锛�'+item1[item.name]"></div>
+ <!-- <div class="row2" style="width: 100%;"><input class="contentRow2" v-model="item1[item.name]" @keyup="updataProductName()" style="border: none;"/></div>-->
+ <!-- <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row2" style="width: 100%;" contenteditable="true" @input="updateProductName($event, id)" v-text="item1[item.name]"></div>-->
</div>
+<!-- <div v-html="company.printLabel.custom(item1)"></div>-->
+ <div v-if="(id + 1) % 2 === 0" class="pagebreak"></div>
</div>
+ </div>
+
+
@@ -150,25 +181,10 @@
padding: 0;
}
-textarea {
- border: none; /* 鍙栨秷榛樿杈规 */
- padding: 0; /* 鍙栨秷榛樿鍐呰竟璺� */
- margin: 0; /* 鍙栨秷榛樿澶栬竟璺� */
- resize: none; /* 绂佺敤璋冩暣澶у皬鍔熻兘 */
- font-family: Arial; /* 璁剧疆鑷畾涔夊瓧浣� */
- font-size: 12px; /* 璁剧疆鑷畾涔夊瓧浣撳ぇ灏� */
- line-height: 1; /* 璁剧疆琛岄珮 */
- width: 100%; /* 璁剧疆瀹藉害涓�100% */
- height: auto; /* 楂樺害鏍规嵁鍐呭鑷姩璋冩暣 */
- box-sizing: border-box; /* 浣垮楂樺寘鎷唴杈硅窛鍜岃竟妗� */
- overflow-y: hidden;
-}
-
-
-body {
+body{
overflow: hidden;
font-family: Arial;
- font-size: 7px;
+
}
#printButton {
@@ -176,109 +192,87 @@
width: 100px;
}
-.print{
- width: 100%;
- height: 100%;
-}
-/*鎴�*/
-.printFlowCard_finished {
- /*
- font-family: 'Microsoft YaHei', '寰蒋闆呴粦', sans-serif;
- */
- flex-wrap: nowrap;
+
+/*鍗�*/
+.printFlowCard_semi {
+ flex-wrap: wrap;
+ font-size: 10px;
display: flex;
- flex-direction: column;
+ justify-content:space-between;
}
-/*鎴�*/
-.entirety_finished {
+
+/*鍗�*/
+.entirety_semi {
+ width: 45%;
display: flex;
text-align: center;
- flex-direction: column;
- margin-left: 10px;
- width: 100%;
- height: 100%;
+ flex-direction:column;
+ margin: 8px;
}
-/*div{
- font-family: 'Microsoft YaHei', '寰蒋闆呴粦', sans-serif;
-}*/
-
-.row3 {
+.row3{
text-align: center;
- /*display: flex;
- justify-content:space-evenly;*/
}
-.row3 label {
- margin-top: 28px;
+.contentRow{
+ display: flex;
+ text-align: center;
}
-.contentRow {
+label{
font-weight: bolder;
- display: flex;
- text-align: center;
+}
+
+.contentRow .row1{
width: 100%;
}
-label {
- /*font-family: 'Microsoft YaHei', '寰蒋闆呴粦', sans-serif;*/
-}
-
-.contentRow .row1 {
- width: 100%;
-}
-
-.entirety_finished .row4 {
- font-weight: bolder;
+.entirety_semi .row4{
text-align: right;
- margin-right: 20px;
}
-.contentRow .row1, .contentRow .row2 {
+.contentRow .row1,.contentRow .row2{
text-align: left;
}
-input{
- width: 100%;
- border: none;
-}
-
-@page {
- size: auto; /* auto is the initial value */
- margin: 13mm 5mm 0mm 7mm; /* this affects the margin in the printer settings */
-}
@media print {
+ @page {
+ size: auto; /* auto is the initial value */
+ margin: 13mm 5mm 0mm 7mm; /* this affects the margin in the printer settings */
+ }
div {
page-break-inside: avoid;
}
- .entirety_finished {
- page-break-before: always;
+
+
+ .pagebreak {
+ page-break-after: always;
}
}
-.printFlowCard_finished1 {
+.printFlowCard_semi1 {
flex-wrap: wrap;
+ font-size: 8pt;
display: flex;
- flex-direction: column;
}
/*鎴�*/
-.entirety_finished1 {
+.entirety_semi1 {
+ width: 50%;
display: flex;
text-align: center;
flex-direction: column;
- margin-left: 10px;
- width: 337px;
- height: 120px;
+ margin-left: -10px;
+ height: 80px;
}
diff --git a/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelTwo.vue b/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelTwo.vue
index fba7a6f..e6e6664 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelTwo.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelTwo.vue
@@ -46,20 +46,34 @@
}
let lableType = props.lableType
data.value.printList = JSON.parse(props.list)
-let switchType = props.switch
onMounted(() => {
request.post(`/processCard/getSelectPrintCustomLabel/${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]
- }
+ const printElements = dataList[0].panels[0].printElements;
+ let a = []
+ printElements.forEach(element => {
+ if(element.options.field==='table'){
+ element.options.columns[0].forEach(elements => {
+ if(elements.field){
+ a.push({
+ title: elements.title,
+ name: elements.field
+ }
+ )
+ }
+ })
+ }else{
+ a.push({
+ title: element.options.title,
+ name: element.options.field
+ })
+ }
+ })
+ labelList = a
for (let i = 0; i < list.value.length; i++) {
let count = list.value[i].data.length
for (let j = 0; j < count; j++) {
diff --git a/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue b/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
index 2eea661..ae28a28 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
@@ -33,6 +33,14 @@
const {currentRoute} = useRouter()
const route = currentRoute.value
const printMerge = props.printMerge
+
+//鎵撳嵃鏃堕棿
+const currentTime = new Date();
+const formattedTime = currentTime.getFullYear()
+ + '-' + (currentTime.getMonth() + 1) + '-'
+ + currentTime.getDate() + ' ' + currentTime.getHours() + ':'
+ + currentTime.getMinutes();formattedTime
+
let merge = props.printMerge
if (merge == '') {
merge = null
@@ -211,7 +219,7 @@
<div>{{ company.companyName }}</div>
<div>鐢熶骇娴佺▼鍗�</div>
<div style="font-weight: bolder;display: flex;justify-content:space-between">
- <div>鎵撳嵃浜猴細{{user.user.userName}}</div>
+ <div>鎵撳嵃浜猴細{{user.user.userName}} 鏃堕棿锛歿{formattedTime}}</div>
<div>
<span v-if="name!='閲戝崕绂忓枩澶╂垚鐜荤拑鏈夐檺鍏徃'" style="font-size: 10px">{{itemFlow.otherRemarks}}</span>
娴佺▼鍗″彿锛� {{
diff --git a/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue b/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
index 2e19bbd..ba8b8d4 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
@@ -499,6 +499,42 @@
}
},
{
+ tid: 'flow_card_sort', title: '宸ョ▼娴佺▼鍗$紪鍙�', data: '', type: 'text',
+ options: {
+ field: 'flow_card_sort',
+ testData: '',
+ width:100,
+ height: 16,
+ fontSize: 11.25,
+ textAlign: "left",
+ textContentVerticalAlign: "middle"
+ }
+ },
+ {
+ tid: 'heat_layout_id', title: '鐐夊彿', data: '', type: 'text',
+ options: {
+ field: 'heat_layout_id',
+ testData: '',
+ width:100,
+ height: 16,
+ fontSize: 11.25,
+ textAlign: "left",
+ textContentVerticalAlign: "middle"
+ }
+ },
+ {
+ tid: 'heat_layout_sort', title: '鐐夊唴搴忓彿', data: '', type: 'text',
+ options: {
+ field: 'heat_layout_sort',
+ testData: '',
+ width:100,
+ height: 16,
+ fontSize: 11.25,
+ textAlign: "left",
+ textContentVerticalAlign: "middle"
+ }
+ },
+ {
tid: 'custom1', title: '鑷畾涔�1', data: '', type: 'text',
options: {
field: 'custom1',
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProjectDetails.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProjectDetails.vue
index e641129..b250c7e 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProjectDetails.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProjectDetails.vue
@@ -21,6 +21,9 @@
import companyInfo from "@/stores/sd/companyInfo"
import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global";
import TagStyleDesigner from "@/components/pp/TagStyleDesigner.vue";
+import {hiprint} from "vue-plugin-hiprint";
+import QueuePrinter from "@/hook/queue"
+import TagStyleSet from "@/hook/tagStyleSet";
const company = companyInfo()
@@ -45,11 +48,15 @@
const xGrid = ref(null)
const xGridDetail = ref(null)
+const tags = ref([])
+
+const tagType = ref()
+
//鎺掑簭
let editRow = ref({
processId: null,
technologyNumber: null,
- process:null
+ process: null
})
//鎵撳嵃
@@ -65,107 +72,48 @@
faceOrientation: null,//鍐呭闈�
type: null,//鏍囩妯℃澘
lableType: null,//鏍囩绫诲瀷
- dataType: null//鏍囩绫诲瀷
+ dataType: null,//鏍囩绫诲瀷
+ detailType: 0//鏄惁鏄伐绋嬫槑缁嗘墦鍗�
})
-const getTableRow = (row, type) => {
- switch (type) {
- case 'edit' : {
- editRow.value.processId = row.process_id
- editRow.value.technologyNumber = row.technology_number
- editRow.value.process = row.process
- printVisible.value = true
+onMounted(async () => {
+ await getTags();
+ await hiprint.init();
+})
+let hiprintTemplate = ref()
- // router.push({path: '/sort-detail', query: {processId: row.process_id,technologyNumber:row.technology_number}})
- break
- }
- }
+
+const changeTag = () => {
+ hiprintTemplate.value = new hiprint.PrintTemplate({});
+ const json = JSON.parse(tag.value.value)
+ hiprintTemplate.value.update(json)
}
-//绛涢�夋潯浠讹紝鏈夊閿渶瑕佸厛瀹氫箟鏄庣粏閲岄潰鐨勬暟鎹�
-let filterData = ref({
- orderGlassDetail: {
- productionId: '',
- },
- orderDetail: {
- orderId: '',
- productId: '',
- productName: '',
- }
-
-
+const tag = ref({
+ id: null,
+ name: null,
+ type: 1,
+ tagWidth: null,
+ tagHeight: null,
+ value: null,
+ size: null
})
-
-//瀹氫箟椤甸潰鎬婚〉鏁�
-let pageTotal = ref('')
-//瀹氫箟鏁版嵁杩斿洖缁撴灉
-let produceList = ref([])
-//瀹氫箟鏁版嵁杩斿洖缁撴灉
-let produceDetailList = ref([])
-//瀹氫箟褰撳墠椤垫暟
-let pageNum = $ref(1)
-let pageState = null
-
-//瀹ゅ唴瀹ゅ闈�
-const stateValue = ref('')
-const stateOptions = [
- {
- value: t('processCard.thisIsTheIndoorSurface'),
- label: t('processCard.thisIsTheIndoorSurface'),
- },
- {
- value: t('processCard.thisSideIsOutsideTheRoom'),
- label: t('processCard.thisSideIsOutsideTheRoom'),
- },
-]
//鏍囩绫诲瀷
-let filteredOptions = []
const lableType = ref('1')
-const lableTypeOptions = [
- {
- value: '1',
- label: t('processCard.finishedProductLabel'),
- },
- /* {
- value: '2',
- label: t('processCard.halfProductLabel'),
- },*/
- {
- value: `${company.printLabel.labelValue}`,
- label: `${company.printLabel.labelType}`,
- },
- {
- value: `${company.printLabel.labelValue3}`,
- label: `${company.printLabel.labelType3}`,
- },
-]
-let hidePrintLabels = company.printLabel.hideButton;
-
-if (hidePrintLabels == 'true') {
- filteredOptions = lableTypeOptions.filter((option, index) => index !== 2);
-} else {
- filteredOptions = lableTypeOptions;
-}
//鍚堢墖娴佺▼鍗℃墦鍗颁笅鎷夐�夐」
-const printMerge = ref('')
-const printMergeOptions = [{}]
const printContent = ref({
id: 'child',
})
-
const printContentLabel = ref({
id: 'childLabel',
})
-const printContentLabelSemi = ref({
- id: 'childLabelSemi',
-})
//鎵撳嵃绫诲瀷
const printType = ref()
@@ -179,6 +127,12 @@
printList: []
})
+const getTags = () => {
+ request.get('tagStyle/getTagList').then(res => {
+ tags.value = res.data
+ })
+}
+
const {currentRoute} = useRouter()
const route = currentRoute.value
@@ -190,7 +144,6 @@
if (res.code == 200) {
xGrid.value.loadData(res.data.data)
gridOptions.loading = false
- hideButton()
} else {
ElMessage.warning(res.msg)
}
@@ -233,7 +186,7 @@
useKey: true
},
filterConfig: { //绛涢�夐厤缃」
- // remote: true
+ // remote: true
},
customConfig: {
storage: true
@@ -272,13 +225,8 @@
toolbarConfig: {
buttons: [
-
- {code: 'printLabel3', name: t('processCard.finishedProductPrinting2'), status: 'primary'},
- // {code: 'printLike', name: "鍚岄厤缃墦鍗�", status: 'primary'},
+ {code: 'printLabel3', name: t('basicData.print'), status: 'primary'},
],
- // import: false,
- // export: true,
- //print: true,
zoom: true,
custom: true
},
@@ -298,273 +246,41 @@
})
]
},
-
-
})
const gridEvents = {
toolbarButtonClick({code}) {
const $grid = xGrid.value
selectRecords = $grid.getCheckboxRecords()
- // selectRecords.forEach(obj => {
- // delete obj.print_status;
- // });
let type = printType.value
- let faceOrientation = stateValue.value
+ let faceOrientation = ''
let lableTypes = lableType.value
let lableTitle = lableType.text
if ($grid) {
switch (code) {
- case 'print': {
- if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
- ElMessage.warning(t('searchOrder.msgList.checkOrder'))
- 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 = null
- // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}})
- dialogTableVisible.value = true
- break
- }
-
- case 'printLabel': {
- if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
- ElMessage.warning(t('searchOrder.msgList.checkOrder'))
- 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 + "|"
- }
- }
- router.push({
- path: '/main/processCard/PrintLabel',
- query: {printList: JSON.stringify(selectRecords),printType:2}
- })
-
- break
- }
- case 'printLabel2': {
- if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
- ElMessage.warning(t('searchOrder.msgList.checkOrder'))
- 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 + "|"
- }
- }
- router.push({
- path: '/main/processCard/PrintCustomLabelSemi2',
- query: {printList: JSON.stringify(selectRecords),printType:2}
- })
-
- break
- }
- case 'sort': {
- const $table = xGridDetail.value
- let data = $table.getTableData().fullData
- let flowCardData = ref({
- flowCard: data,
- })
- for (let i = 0; i < flowCardData.value.flowCard.length; i++) {
- const regex = /^[1-9]\d*$/
- if (!regex.test(flowCardData.value.flowCard[i].sort)) {
- ElMessage.warning(t('basicData.msg.greater0'))
- return; // 濡傛灉鏈変竴涓笉鏄暣鏁�
- }
- }
- request.post("/processCard/printSort", flowCardData.value).then((res) => {
- if (res.code == 200) {
- ElMessage.success(t('processCard.sortingSuccessful'))
- router.push({
- path: '/main/processCard/PrintFlowCard',
- query: {orderId: orderId, random: Math.random()}
- })
-
- //location.reload();
- } else {
- ElMessage.warning(res.msg)
- }
- })
- 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(t('processCard.pleaseSelectCustomPrintLabelStyle'))
- 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) {
- labelRow.value.list = JSON.stringify(selectRecords)
- labelRow.value.faceOrientation = faceOrientation
- labelRow.value.type = type
- labelRow.value.lableType = lableTypes
- lastList.value = []
- if (company.label === 1) {
- dialogTableVisibleLabel.value = true
- } else if (company.label === 2) {
- router.push({
- path: '/main/processCard/PrintCustomLabelCZ',
- query: {
- type: type,
- faceOrientation: faceOrientation,
- lableType: lableTypes,
- printList: JSON.stringify(selectRecords),
- printType:2
- }
- })
- }
-
- } else if (lableTypes == 2) {
- labelRow.value.list = JSON.stringify(selectRecords)
- labelRow.value.faceOrientation = faceOrientation
- labelRow.value.type = type
- labelRow.value.lableType = lableTypes
- lastList.value = []
- if (company.label === 1) {
- dialogTableVisibleCustomLabel.value = true
- } else if (company.label === 2) {
- router.push({
- path: '/main/processCard/PrintCustomLabelSemiCZ',
- query: {
- type: type,
- faceOrientation: faceOrientation,
- lableType: lableTypes,
- printList: JSON.stringify(selectRecords),
- printType:2
- }
- })
- }
- } else if (lableTypes == 3) {
- router.push({
- path: '/main/processCard/PrintLabel1',
- query: {
- type: type,
- faceOrientation: faceOrientation,
- lableType: lableTypes,
- printList: JSON.stringify(selectRecords),
- printType:2
- }
- })
-
- }
-
-
- 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
- }
- case 'printTest': {
- if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
- ElMessage.warning(t('searchOrder.msgList.checkOrder'))
- return
- }
- // if (type === null || type === '' || type === undefined) {
- // ElMessage.warning(t('processCard.pleaseSelectCustomPrintLabelStyle'))
- // 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 + "|"
- }
- }
-
- labelRow.value.list = JSON.stringify(selectRecords)
- labelRow.value.faceOrientation = faceOrientation
- labelRow.value.type = type
- labelRow.value.lableType = lableTypes
- titleStyleVisible.value = true
- break
- }
case 'printLabel3': {
if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
ElMessage.warning(t('璇烽�夋嫨宸ョ▼瀵瑰簲鐨勭増鍥惧彿'))
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 (tag.value.name == null || tag.value.name == '') {
+ ElMessage.warning(t('璇烽�夋嫨鏍囩妯℃澘'))
+ return
}
-
- let name=company.companyName
+ let name = company.companyName
labelRow.value.list = JSON.stringify(selectRecords)
- if (name == '閲戝崕绂忓枩澶╂垚鐜荤拑鏈夐檺鍏徃'){
- labelRow.value.type = '鎴愬搧鏍囩'
- labelRow.value.dataType=3
+ if (name == '鏂扮枂鎭掗懌鐜荤拑绉戞妧鏈夐檺鍏徃') {
+ labelRow.value.type = '鎭掗懌甯︽暟閲�'
+ labelRow.value.dataType = 3
+ dialogTableVisibleLabelXJTwo.value = true
+ } else {
+ labelRow.value.type = tag.value.name
+ labelRow.value.dataType = 3
labelRow.value.lableType = lableTypes
+ labelRow.value.switch = true
+ lastList.value = []
dialogTableVisibleLabelProject.value = true
}
- else {
- labelRow.value.type = '鎭掗懌甯︽暟閲�'
- labelRow.value.dataType=3
- dialogTableVisibleLabelXJTwo.value = true
- }
-
-
-
-
break
}
}
@@ -573,44 +289,25 @@
}
-const openedTable = () => {
- let detail = ref(produceDetailList.value)
- xGridDetail.value.reloadData(detail.value)
- addListener(xGridDetail.value, detailGridOptions)
-}
-
-const hideButton = () => {
- // 鏍规嵁鏉′欢鍊� hidePrintLabels 杩囨护鎸夐挳鏁扮粍
- gridOptions.toolbarConfig.buttons = gridOptions.toolbarConfig.buttons.filter(button => {
- // 杩欓噷鏍规嵁 hidePrintLabels 鐨勫�煎喅瀹氭槸鍚﹂殣钘� printLabel 鍜� printLabel2
- if (hidePrintLabels == 'true') {
- return button.code !== 'printLabel' && button.code !== 'printLabel2';
- } else {
- return true && button.code !== 'printLike' && button.code !== 'printLabel3'&& button.code !== 'printTest'; // 鏄剧ず璇ユ寜閽�
- }
- })
-}
-
-
-// 鐩戝惉鎵撳嵃瀹屾垚浜嬩欢
-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'))
-
- }
- })
+const printObjectProcess = () => {
+ hiprintTemplate.value.print(lastList.value)
}
</script>
<template>
<div class="main-div-customer">
+ <div>
+ 鏍囩妯℃澘锛�
+ <el-select v-model="tag" placeholder="鏍囩妯℃澘鍒楄〃" style="width: 140px" @change="changeTag">
+ <el-option
+ v-for="(tag,index) in tags"
+ :key="index"
+ :label="tag.name"
+ :value="tag"
+ />
+ </el-select>
+ </div>
<vxe-grid
ref="xGrid"
class="mytable-scrollbar"
@@ -633,130 +330,19 @@
</ul>
</template>
- <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
- <!-- v-if="userStore.user.permissions.indexOf('SelectProductionBasicData.edit') > -1"-->
- <template #button_slot="{ row }">
- <el-button link
- size="small"
- type="primary"
- @click="getTableRow(row,'edit')">
- {{ $t('basicData.edit') }}
- </el-button>
-
- </template>
-
<template #num1_filter="{ column, $panel }">
<div>
<div v-for="(option, index) in column.filters" :key="index">
<input v-model="option.data"
type="text"
- @keyup.enter.native="$panel.confirmFilter()"
- @input="changeFilterEvent($event, option, $panel)"/>
+ @input="changeFilterEvent($event, option, $panel)"
+ @keyup.enter.native="$panel.confirmFilter()"/>
</div>
</div>
</template>
</vxe-grid>
- <!-- 娴佺▼鍗℃墦鍗� -->
- <el-dialog
- id="sizePrintCalrd"
- v-model="dialogTableVisible"
- :title="$t('processCard.print')"
- destroy-on-close
- style="width: 75%;height:75% ">
- <template #header="{ close, titleId, titleClass }">
- <el-button v-print="printContent" :icon="Printer" circle @click="printNumber"/>
- </template>
- <print-process
- id="child"
- :printLike="printRow.like"
- :printList="printRow.list"
- :printMerge="printRow.printMergeVal"
- style="width: 100%;height: 100%"/>
- </el-dialog>
-
- <!-- 鎴愬搧鏍囩-->
- <el-dialog
- id="sizeCustom"
- v-model="dialogTableVisibleLabel"
- :title="$t('processCard.printLabel')"
- destroy-on-close
- style="width: 80%;height:75% ">
- <template #header="{ close, titleId, titleClass }">
- <el-button v-print="printContentLabel" :icon="Printer" circle/>
- </template>
- <print-custom-label id="childLabel"
- :lastList = 'lastList'
- :faceOrientation="labelRow.faceOrientation"
- :lableType="labelRow.lableType"
- :list="labelRow.list"
- :type="labelRow.type"
- style="width: 100%;height: 100%"/>
- </el-dialog>
-
- <!-- 灏忕墖鏍囩 -->
- <el-dialog
- id="sizeCustomSemi"
- v-model="dialogTableVisibleCustomLabel"
- :title="$t('processCard.labelStyle')"
- destroy-on-close
- style="width: 80%;height:75% ">
- <template #header="{ close, titleId, titleClass }">
- <el-button v-print="printContentLabelSemi" :icon="Printer" circle/>
- </template>
- <print-custom-label-semi id="childLabelSemi"
- :faceOrientation="labelRow.faceOrientation"
- :lableType="labelRow.lableType"
- :list="labelRow.list"
- :type="labelRow.type"
- style="width: 100%;height: 100%"/>
- </el-dialog>
-
- <!-- 鎺掑簭-->
- <el-dialog
- id="sizeCheck"
- v-model="printVisible"
- :title="$t('processCard.processCardDetails')"
- destroy-on-close
- style="width: 80%;height:75% ">
- <sort-detail id="child" :processId="editRow.processId" :technologyNumber="editRow.technologyNumber" :process="editRow.process"/>
- </el-dialog>
-
- <!-- 鏍囩鏍峰紡 -->
- <el-dialog
- id="titleStyle"
- :title="$t('processCard.labelStyle')"
- style="width: 90%;height:93%;margin-top: 3vh "
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- destroy-on-close
- v-model="titleStyleVisible">
- <!-- <tag-style style="width: 100%;height: 100%"/>-->
- <tag-style-designer style="width: 100%;height: 100%"
- :faceOrientation="labelRow.faceOrientation"
- :lableType="labelRow.lableType"
- :list="labelRow.list"
- :type="labelRow.type"/>
- </el-dialog>
-
- <!-- 鎴愬搧鏍囩涓ゅ垪-->
- <el-dialog
- id="sizeCustom"
- v-model="dialogTableVisibleLabelXJ"
- :title="$t('processCard.printLabel')"
- destroy-on-close
- style="width: 80%;height:75% ">
- <template #header="{ close, titleId, titleClass }">
- <el-button v-print="printContentLabel" :icon="Printer" circle/>
- </template>
- <print-custom-label-x-j id="childLabel"
- :faceOrientation="labelRow.faceOrientation"
- :lableType="labelRow.lableType"
- :list="labelRow.list"
- :type="labelRow.type"
- style="width: 100%;height: 100%"/>
- </el-dialog>
<!-- 鎴愬搧鏍囩涓ゅ垪鏂扮枂-->
<el-dialog
@@ -769,12 +355,12 @@
<el-button v-print="printContentLabel" :icon="Printer" circle/>
</template>
<print-custom-label-x-j-two id="childLabel"
- :faceOrientation="labelRow.faceOrientation"
- :lableType="labelRow.lableType"
- :list="labelRow.list"
- :type="labelRow.type"
- :dataType="labelRow.dataType"
- style="width: 100%;height: 100%"/>
+ :dataType="labelRow.dataType"
+ :faceOrientation="labelRow.faceOrientation"
+ :lableType="labelRow.lableType"
+ :list="labelRow.list"
+ :type="labelRow.type"
+ style="width: 100%;height: 100%"/>
</el-dialog>
<!-- 鎴愬搧鏍囩宸ョ▼鎵撳嵃-->
@@ -785,14 +371,20 @@
destroy-on-close
style="width: 80%;height:75% ">
<template #header="{ close, titleId, titleClass }">
- <el-button v-print="printContentLabel" :icon="Printer" circle/>
+ <el-button :icon="Printer" circle @click="printObjectProcess"/>
</template>
<print-custom-label-project id="childLabel"
- :faceOrientation="labelRow.faceOrientation"
- :lableType="labelRow.lableType"
- :list="labelRow.list"
- :type="labelRow.type"
- style="width: 100%;height: 100%"/>
+
+ :detailType="labelRow.detailType"
+ :faceOrientation="labelRow.faceOrientation"
+ :lableType="labelRow.lableType"
+ :lastList='lastList'
+ :list="labelRow.list"
+ :switch="labelRow.switch"
+ :titleList="labelRow.titleList"
+ :type="labelRow.type"
+
+ style="width: 100%;height: 100%"/>
</el-dialog>
</div>
</template>
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintProject.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintProject.vue
index edbd291..bac1943 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintProject.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintProject.vue
@@ -1,5 +1,5 @@
<script lang="ts" setup>
-import {reactive, ref} from "vue";
+import {onMounted, reactive, ref} from "vue";
import {useRouter} from 'vue-router'
import request from "@/utils/request";
import deepClone from "@/utils/deepClone";
@@ -13,19 +13,26 @@
import {Printer} from "@element-plus/icons-vue/global";
import companyInfo from "@/stores/sd/companyInfo"
import {remove} from "xe-utils";
+import PrintCustomLabelProject from "@/components/pp/PrintCustomLabelProject.vue";
//璇█鑾峰彇
const {t} = useI18n()
let router = useRouter()
const dialogTableVisibleLabelXJTwo = ref(false)
+const dialogTableVisibleLabelProject = ref(false)
let rowClickIndex = ref(null)
+let lastList = ref([])
+const tags = ref([])
+const tagType=ref()
//瀹氫箟鏁版嵁杩斿洖缁撴灉
let produceList = ref([])
let titleStyleVisible = ref(false)
let print = ref("1")
+
+
//鏍囩
let labelRow = ref({
@@ -34,9 +41,11 @@
type: "",//鏍囩妯℃澘
lableType: null,//鏍囩绫诲瀷
dataType: 0,//鏍囩绫诲瀷
- projectNo:null
+ projectNo:null,
+ detailType:0//鏄惁鏄伐绋嬫槑缁嗘墦鍗�
})
const company = companyInfo()
+let name=company.companyName
let hidePrintLabels = company.printLabel.hideButton;
const form = reactive({
@@ -44,11 +53,60 @@
orderId: '',
project: ''
})
+
+const tag = ref({
+ id:null,
+ name:null,
+ type:1,
+ tagWidth:null,
+ tagHeight:null,
+ value:null,
+ size:null
+
+})
+
+onMounted(async () => {
+ await getTags();
+ await hiprint.init();
+})
+let hiprintTemplate = ref()
+const changeTag = () => {
+ hiprintTemplate.value = new hiprint.PrintTemplate({});
+ const json = JSON.parse(tag.value.value)
+ hiprintTemplate.value.update(json)
+}
const getTableRow = (row, type) => {
switch (type) {
case 'edit' :{
if(parseInt(print.value)==1){
- router.push({path: '/main/processCard/PrintLabel', query: { projectNo: row.project_no,type:1 }})
+ if (name.indexOf('鍚夊埄鐜荤拑')!=-1){
+ router.push({path: '/main/processCard/PrintLabel', query: { projectNo: row.project_no,type:1 }})
+ }
+ else {
+ if (tag.value.name==null || tag.value.name==''){
+ ElMessage.warning(t('璇烽�夋嫨鏍囩妯℃澘'))
+ return
+ }
+ let name=company.companyName
+ labelRow.value.list = JSON.stringify([row])
+ if (name == '閲戝崕绂忓枩澶╂垚鐜荤拑鏈夐檺鍏徃'){
+ labelRow.value.type = tag.value.name
+ labelRow.value.dataType=3
+ labelRow.value.lableType = 1
+ labelRow.value.switch=true
+ labelRow.value.detailType=1
+ lastList.value = []
+ dialogTableVisibleLabelProject.value = true
+ }
+ else {
+ labelRow.value.type = '鎭掗懌甯︽暟閲�'
+ labelRow.value.dataType=3
+ dialogTableVisibleLabelXJTwo.value = true
+ }
+ }
+
+
+ return
}else{
router.push({path: '/main/processCard/PrintCustomLabelSemi2', query: { projectNo: row.project_no,type:1 }})
}
@@ -100,6 +158,12 @@
let endTime = form.date1[1]
let orderId=form.orderId
let project=form.project
+
+const getTags = () => {
+ request.get('tagStyle/getTagList').then(res => {
+ tags.value = res.data
+ })
+}
//绗竴娆″姞杞芥暟鎹�
@@ -281,15 +345,8 @@
id: 'childLabel',
})
-const hideButton = () => {
- let name=company.companyName
- // 鏍规嵁鏉′欢鍊� hidePrintLabels 杩囨护鎸夐挳鏁扮粍
- gridOptions.toolbarConfig.buttons = gridOptions.toolbarConfig.buttons.filter(button => {
- // 杩欓噷鏍规嵁 hidePrintLabels 鐨勫�煎喅瀹氭槸鍚﹂殣钘� printLabel 鍜� printLabel2
- if (name == '閲戝崕绂忓枩澶╂垚鐜荤拑鏈夐檺鍏徃') {
- return button.code !== 'printLabel';
- }
- })
+const printObjectProcess = () => {
+ hiprintTemplate.value.print(lastList.value)
}
</script>
@@ -313,7 +370,26 @@
:icon="Search"
type="primary" @click="getWorkOrder">{{ $t('basicData.search') }}
</el-button>
+
+
+ <el-row v-if="name.indexOf('鍚夊埄鐜荤拑')==-1">
+ 鏍囩妯℃澘锛�
+ <el-select v-model="tag" @change="changeTag" placeholder="鏍囩妯℃澘鍒楄〃" style="width: 140px" >
+ <el-option
+ v-for="(tag,index) in tags"
+ :key="index"
+ :label="tag.name"
+ :value="tag"
+ />
+ </el-select>
+ </el-row>
</el-row>
+ <el-row>
+
+ </el-row>
+ <div>
+
+ </div>
</div>
<vxe-grid
ref="xGrid"
@@ -336,8 +412,9 @@
</template>
<!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
<template #button_slot="{ row }">
- <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('machine.cutting')}}</el-button>
- <el-button @click="getTableRow(row,'edit1')" link type="primary" size="small">{{$t('machine.tempering')}}</el-button>
+ <el-button v-if="name.indexOf('鍚夊埄鐜荤拑')!=-1" @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('machine.cutting')}}</el-button>
+ <el-button v-else @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('machine.tempering')}}</el-button>
+ <el-button v-if="name.indexOf('鍚夊埄鐜荤拑')!=-1" @click="getTableRow(row,'edit1')" link type="primary" size="small">{{$t('machine.tempering')}}</el-button>
</template>
<template #num1_filter="{ column, $panel }">
@@ -387,6 +464,30 @@
:projectNo="labelRow.projectNo"
style="width: 100%;height: 100%"/>
</el-dialog>
+
+ <!-- 鎴愬搧鏍囩宸ョ▼鎵撳嵃-->
+ <el-dialog
+ id="sizeCustom"
+ v-model="dialogTableVisibleLabelProject"
+ :title="$t('processCard.printLabel')"
+ destroy-on-close
+ style="width: 80%;height:75% ">
+ <template #header="{ close, titleId, titleClass }">
+ <el-button @click="printObjectProcess" :icon="Printer" circle/>
+ </template>
+ <print-custom-label-project id="childLabel"
+
+ :lastList = 'lastList'
+ :faceOrientation="labelRow.faceOrientation"
+ :lableType="labelRow.lableType"
+ :list="labelRow.list"
+ :type="labelRow.type"
+ :titleList="labelRow.titleList"
+ :switch="labelRow.switch"
+ :detailType="labelRow.detailType"
+
+ style="width: 100%;height: 100%"/>
+ </el-dialog>
</div>
</template>
@@ -398,7 +499,7 @@
height: 93%;
}
#selectForm {
- width: 60%;
+ width: 50%;
}
:deep(#titleStyle .el-dialog__body){
height: 90%;
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
index 3ffe382..855e105 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -376,11 +376,12 @@
}
@ApiOperation("宸ョ▼鏄庣粏鎵撳嵃鏍囩鏌ヨ")
- @PostMapping("/getPrintCustomDataProjectNoDetail/{type}")
+ @PostMapping("/getPrintCustomDataProjectNoDetail/{type}/{detailType}")
public Result getPrintCustomDataProjectNoDetail(
@PathVariable String type,
+ @PathVariable Integer detailType,
@RequestBody Map<String, Object> object) {
- return Result.seccess(flowCardService.getPrintCustomDataProjectNoDetailSv(type,object));
+ return Result.seccess(flowCardService.getPrintCustomDataProjectNoDetailSv(type,detailType,object));
}
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 8aec501..d38ddba 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
@@ -186,4 +186,6 @@
List<Map<String, Object>> getPrintProjectDetailsMp(String projectNo);
List<Map<String, Object>> getPrintCustomDataProjectDetail(String projectNo, String stockId);
+
+ List<Map<String, Object>> getPrintCustomDataProject(String projectNo);
}
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 22dcb73..820c199 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
@@ -823,7 +823,7 @@
return map;
}
- public Map<String, Object> getPrintCustomDataProjectNoDetailSv(String type, Map<String, Object> object) {
+ public Map<String, Object> getPrintCustomDataProjectNoDetailSv(String type, Integer detailType, 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);
@@ -831,7 +831,18 @@
Set<String> processedProcessIds = new HashSet<>(); // 鐢ㄦ潵瀛樻斁宸插鐞嗚繃鐨� processId
for (FlowCard flowCard : flowCardList) {
Map<String, Object> itemmap = new HashMap<>();
- itemmap.put("data", flowCardMapper.getPrintCustomDataProjectDetail(flowCard.getProjectNo(),flowCard.getStockId()));
+ if (detailType==0){
+ itemmap.put("data", flowCardMapper.getPrintCustomDataProjectDetail(flowCard.getProjectNo(),flowCard.getStockId()));
+
+ }
+ else if (detailType==1) {
+ itemmap.put("data", flowCardMapper.getPrintCustomDataProject(flowCard.getProjectNo()));
+
+ }
+ else {
+ itemmap.put("data", flowCardMapper.getPrintCustomDataProject(flowCard.getProjectNo()));
+
+ }
list.add(itemmap);
}
}
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 d9e7de2..3ab8d64 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -478,7 +478,7 @@
</select>
<select id="selectPrintFlowCard">
- select *
+ select project_no,glass_total,glass_total_area
from pp.optimize_project
where date(create_time)>=#{selectTime1} and date(create_time) <= #{selectTime2}
and state >= 20
@@ -2162,7 +2162,7 @@
od.processing_note as processingNote,
od.width,
od.height,
- fc.quantity,
+ fc.quantity as flowQuantity,
od.order_number as orderNumber,
fc.technology_number as technologyNumber,
od.building_number as buildingNumber,
@@ -2310,7 +2310,7 @@
od.processing_note as processingNote,
od.width,
od.height,
- fc.quantity,
+ fc.quantity as flowQuantity,
od.order_number as orderNumber,
fc.technology_number as technologyNumber,
od.building_number as buildingNumber,
@@ -2351,4 +2351,84 @@
order by opt.stock_id,opt.polys_id
</select>
+ <select id="getPrintCustomDataProject">
+ select
+ o.order_id as orderId,
+ project,
+ customer_id as customerId,
+ o.customer_name as customerName,
+ order_type as orderType,
+ order_classify as orderClassify,
+ batch,
+ o.icon,
+ pack_type as packType,
+ delivery_date as deliveryDate,
+ al_type as alType,
+ money,
+ contract_id as contractId,
+ customer_batch customerBatch,
+ contacts,
+ delivery_address as deliveryAddress,
+ od.processing_note as processingNote,
+ od.width,
+ od.height,
+ fc.quantity as flowQuantity,
+ od.order_number as orderNumber,
+ fc.technology_number as technologyNumber,
+ od.building_number as buildingNumber,
+ od.product_name as productName,
+ od.edging_type as edgingType,
+ od.remarks,
+ c.customer_abbreviation as customerAbbreviation,
+ p.product_abbreviation as productAbbreviation,
+ fc.process_id as processId,
+ o.create_time as createTime,
+ JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber,
+ JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')) AS figureNumber,
+ JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S03')) AS colourCeramicGlaze,
+ JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')) AS remarks1,
+ JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S05')) AS remarks2,
+ JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S06')) AS remarks3,
+ JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S07')) AS remarks4,
+ JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S08')) AS remarks5,
+ p.remarks as filmNumber,
+ od.bend_radius as bendRadius,
+ od.other_columns,
+ JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.color')) AS color,
+ '鏂囨湰' as custom1,
+ '鏂囨湰' as custom2,
+ '鏂囨湰' as custom3,
+ '鏂囨湰' as custom4,
+ '鏂囨湰' as custom5,
+ od.quantity,
+ o.order_id,
+ c.customer_abbreviation as customer_name,
+ od.building_number,
+ od.processing_note,
+ ogd.child_width as childWidth,
+ ogd.child_height as childHeight,
+ ogd.glass_child as glassChild,
+ ogd.process,
+ e.type_name,
+ opt.stock_id,
+ od.bend_radius,
+ a.id as flow_card_sort,
+ concat(opt.heat_layout_id,'') as heat_layout_id ,
+ opt.heat_layout_sort
+ from optimize_detail as opt
+ left join flow_card as fc on opt.project_no=fc.project_no and opt.process_id=fc.process_id and opt.layer=fc.technology_number and opt.order_sort=fc.order_number
+ left join sd.order as o on o.order_id=fc.order_id
+ left join sd.order_detail as od on fc.order_id = od.order_id and od.order_number = fc.order_number
+ left join sd.order_glass_detail as ogd on ogd.order_id=o.order_id and ogd.order_number=od.order_number and ogd.technology_number=fc.technology_number
+ left join sd.product as p on p.id = od.product_id
+ left join sd.basic_glass_type e on e.type_id = p.type_id
+ left join sd.customer as c on c.id = o.customer_id
+ left join sd.product_detail as pd on pd.prod_id = p.id and pd.sort_num = od.order_number and
+ pd.glass_sort = fc.technology_number
+ left join (select (@row_number := @row_number + 1) as id,process_id as process_id from (select process_id from pp.optimize_detail tt where project_no =#{projectNo} group by process_id) tt,(select @row_number := 0) as t) a
+ on a.process_id=opt.process_id
+ where opt.project_no=#{projectNo}
+ order by opt.heat_layout_id, opt.heat_layout_sort desc
+ </select>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0