添加成品便签按编号打印,合并流程卡显示一个二维码、单片名称添加连接符号
| | |
| | | const route = currentRoute.value |
| | | let type = props.type |
| | | let faceOrientation = props.faceOrientation |
| | | if (type==="英文标签" && faceOrientation==="此面为室内面"){ |
| | | if (type.indexOf("英文")>-1 && faceOrientation==="此面为室内面"){ |
| | | faceOrientation='INSIDE' |
| | | } |
| | | else if (type==="英文标签" && faceOrientation==="此面为室外面"){ |
| | | else if (type.indexOf("英文")>-1 && faceOrientation==="此面为室外面"){ |
| | | faceOrientation='OUTSIDE' |
| | | } |
| | | let lableType = props.lableType |
| | |
| | | } |
| | | |
| | | // 遍历 lastList 并更新对应的属性 |
| | | console.log(lastList.value,id) |
| | | console.log(lastList.value[index].glassNumber) |
| | | lastList.value.forEach(obj => { |
| | | // 获取前缀和 orderId |
| | | const prefix = obj.processId.substring(0, 11); |
New file |
| | |
| | | <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"; |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | |
| | | const company = companyInfo() |
| | | //语言获取 |
| | | 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: [] |
| | | }) |
| | | |
| | | let props = defineProps({ |
| | | list:null,//勾选的数据 |
| | | faceOrientation:null,//内外面 |
| | | type:null,//标签模板 |
| | | lableType: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 |
| | | data.value.printList = JSON.parse(props.list) |
| | | onMounted(() => { |
| | | 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}]`); |
| | | 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 updateProductName = (event, index,id) => { |
| | | // 创建映射对象 |
| | | const propertyMapping = {}; |
| | | labelList.forEach(item => { |
| | | propertyMapping[item.name] = item.title; |
| | | }); |
| | | // 输入的值 |
| | | const newValue = event.target.innerText; |
| | | const parts = newValue.split(':'); |
| | | const result = parts[1]; // 获取冒号后的部分 |
| | | |
| | | // 获取映射中所有的键 |
| | | const keys = Object.keys(propertyMapping); |
| | | |
| | | // 根据 index 获取对应的属性名 |
| | | const propertyName = keys[index]; |
| | | |
| | | // 如果映射中没有该 index,直接返回 |
| | | if (!propertyName) { |
| | | console.warn('Unsupported index:', index); |
| | | return; |
| | | } |
| | | |
| | | // 遍历 lastList 并更新对应的属性 |
| | | lastList.value.forEach(obj => { |
| | | // 获取前缀和 orderId |
| | | const prefix = obj.processId.substring(0, 11); |
| | | const orderId = obj.orderId; |
| | | const glassNumber=lastList.value[id].glassNumber |
| | | // 根据 propertyName 更新属性 |
| | | if (propertyName === 'productAbbreviation' && prefix === obj.processId.substring(0, 11)) { |
| | | obj.productAbbreviation = result; |
| | | } |
| | | |
| | | if (propertyName === 'project' && orderId === obj.orderId) { |
| | | obj.project = result; |
| | | } |
| | | if (propertyName === 'productName' && glassNumber === obj.glassNumber){ |
| | | obj.productName = result; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | </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> |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | * { |
| | | margin: 0; |
| | | 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 { |
| | | overflow: hidden; |
| | | font-family: Arial; |
| | | font-size: 7px; |
| | | } |
| | | |
| | | #printButton { |
| | | margin-top: -20px; |
| | | width: 100px; |
| | | } |
| | | |
| | | .print{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | /*成*/ |
| | | .printFlowCard_finished { |
| | | /* |
| | | font-family: 'Microsoft YaHei', '微软雅黑', sans-serif; |
| | | */ |
| | | flex-wrap: nowrap; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | |
| | | /*成*/ |
| | | .entirety_finished { |
| | | display: flex; |
| | | text-align: center; |
| | | flex-direction: column; |
| | | margin-left: 10px; |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | } |
| | | |
| | | /*div{ |
| | | font-family: 'Microsoft YaHei', '微软雅黑', sans-serif; |
| | | }*/ |
| | | |
| | | .row3 { |
| | | text-align: center; |
| | | /*display: flex; |
| | | justify-content:space-evenly;*/ |
| | | } |
| | | |
| | | .row3 label { |
| | | margin-top: 28px; |
| | | } |
| | | |
| | | .contentRow { |
| | | font-weight: bolder; |
| | | display: flex; |
| | | text-align: center; |
| | | width: 100%; |
| | | } |
| | | |
| | | label { |
| | | /*font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;*/ |
| | | } |
| | | |
| | | .contentRow .row1 { |
| | | width: 100%; |
| | | } |
| | | |
| | | .entirety_finished .row4 { |
| | | font-weight: bolder; |
| | | text-align: right; |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .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 { |
| | | div { |
| | | page-break-inside: avoid; |
| | | } |
| | | |
| | | .entirety_finished { |
| | | page-break-before: always; |
| | | } |
| | | |
| | | } |
| | | |
| | | .printFlowCard_finished1 { |
| | | flex-wrap: wrap; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | |
| | | /*成*/ |
| | | .entirety_finished1 { |
| | | display: flex; |
| | | text-align: center; |
| | | flex-direction: column; |
| | | margin-left: 10px; |
| | | width: 337px; |
| | | height: 120px; |
| | | |
| | | } |
| | | |
| | | .contentRow1 { |
| | | font-weight: bolder; |
| | | display: flex; |
| | | text-align: center; |
| | | width: 100%; |
| | | } |
| | | |
| | | .contentRow1 .row1 { |
| | | width: 30%; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | .entirety_finished1 .row4 { |
| | | font-weight: bolder; |
| | | text-align: right; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .contentRow1 .row1, .contentRow1 .row2 { |
| | | text-align: left; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | </style> |
| | |
| | | <div v-for="(item1,id) in 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" >{{ item.title }}:{{ item1[item.name] }}</div> |
| | | <div contenteditable="true" v-if="item1[item.name] != null && item1[item.name] !== ''" class="row1" >{{ item.title }}:{{ item1[item.name] }}</div> |
| | | <!-- <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row2">{{ item1[item.name] }}</div>--> |
| | | </div> |
| | | <div v-html="company.printLabel.customSemi(item1)"></div> |
| | |
| | | |
| | | |
| | | const handleGetQRCode = async () => { |
| | | console.log(produceList.value) |
| | | let technologyNumber='' |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | |
| | | const technologyNumber = produceList.value[i].detail[0].technologyNumber.toString(); // 转换为字符串以便处理每个字符 |
| | | if (produceList.value[i].detail[0].qrcode!="" && produceList.value[i].detail[0].qrcode!=null){ |
| | | technologyNumber = produceList.value[i].detail[0].qrcode.toString(); // 转换为字符串以便处理每个字符,合并标签 |
| | | }else { |
| | | technologyNumber = produceList.value[i].detail[0].technologyNumber.toString(); // 转换为字符串以便处理每个字符 |
| | | } |
| | | produceList.value[i].detail[0]["qrcodeList"] = []; // 初始化一个空数组用来存储 QR Code |
| | | |
| | | for (let j = 0; j < technologyNumber.length; j++) { |
| | |
| | | component: () => import('../components/pp/SelectSortDetailProcessCard.vue'), |
| | | }, |
| | | { |
| | | path: 'printFlowCardDetails', |
| | | name: 'printFlowCardDetails', |
| | | component: () => import('../views/pp/processCard/PrintFlowCardDetails.vue'), |
| | | }, |
| | | { |
| | | path: 'printCustomLabelDetails', |
| | | name: 'printCustomLabelDetails', |
| | | component: () => import('../components/pp/PrintCustomLabelDetails.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/processCard/SelectProcessCard' |
| | | } |
New file |
| | |
| | | <script setup> |
| | | |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {useRouter} from 'vue-router' |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {VXETable} from "vxe-table"; |
| | | import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import PrintProcess from '@/components/pp/PrintProcess.vue' |
| | | import PrintLabel from '@/views/pp/processCard/PrintLabel.vue' |
| | | import PrintCustomLabel from '@/components/pp/PrintCustomLabelDetails.vue' |
| | | import PrintCustomLabelSemi from '@/components/pp/PrintCustomLabelSemi.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() |
| | | |
| | | |
| | | //语言获取 |
| | | 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) |
| | | |
| | | const selectRecordsData = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | const xGrid = ref(null) |
| | | const xGridDetail = ref(null) |
| | | |
| | | //排序 |
| | | let editRow = ref({ |
| | | processId: null, |
| | | technologyNumber: null, |
| | | process:null |
| | | }) |
| | | |
| | | //打印 |
| | | let printRow = ref({ |
| | | list: null, |
| | | printMergeVal: null, |
| | | like: null |
| | | }) |
| | | |
| | | //标签 |
| | | let labelRow = ref({ |
| | | list: null,//勾选的数据 |
| | | faceOrientation: null,//内外面 |
| | | type: null,//标签模板 |
| | | lableType: null//标签类型 |
| | | }) |
| | | |
| | | |
| | | 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 |
| | | |
| | | // router.push({path: '/sort-detail', query: {processId: row.process_id,technologyNumber:row.technology_number}}) |
| | | break |
| | | } |
| | | } |
| | | } |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | |
| | | orderGlassDetail: { |
| | | productionId: '', |
| | | }, |
| | | orderDetail: { |
| | | orderId: '', |
| | | productId: '', |
| | | productName: '', |
| | | } |
| | | |
| | | |
| | | }) |
| | | |
| | | //定义页面总页数 |
| | | 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'), |
| | | }, |
| | | |
| | | ] |
| | | 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() |
| | | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | 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) |
| | | |
| | | let inquiryMode = route.query.checkedValue |
| | | // 第一次加载查询 |
| | | request.post(`/processCard/selectPrintDetails/${inquiryMode}`, data.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | 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 |
| | | xGrid.value.reloadData(newDataCollection) |
| | | gridOptions.loading = false |
| | | hideButton() |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'printFlowCard_1', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollX: {enabled: true}, |
| | | scrollY: {enabled: true, gt: 0},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {title: t('basicData.operate'), width: 55, slots: {default: 'button_slot'}, fixed: "left"}, |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'order_id', |
| | | title: t('order.orderId'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged, width: 120 |
| | | }, |
| | | { |
| | | field: 'process_id', |
| | | title: t('processCard.processId'), |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged, width: 140 |
| | | }, |
| | | { |
| | | field: 'customer_name', |
| | | title: t('customer.customerName'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged, width: 120 |
| | | }, |
| | | { |
| | | field: 'project', |
| | | title: t('order.project'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged, |
| | | width: 120 |
| | | }, |
| | | { |
| | | field: 'order_number', |
| | | title: t('order.OrderNum'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged,width: 100 |
| | | }, |
| | | { |
| | | field: 'glassNumber', |
| | | title: t('reportingWorks.glassNumber'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged,width: 100 |
| | | }, |
| | | {field: 'quantity', title: t('order.quantity'), width: 90}, |
| | | {field: 'total_area', title: t('order.area'), width: 90}, |
| | | {field: 'product_name', title: t('order.product'), width: 120}, |
| | | { |
| | | field: 'glass_child', |
| | | title: t('reportingWorks.glassChild'), |
| | | width: 120, |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'founder', title: t('processCard.founder'), width: 120}, |
| | | {field: 'splitFrame_time', title: t('processCard.splitFrameTime'), width: 120}, |
| | | { |
| | | field: 'process', title: t('craft.process'), filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged, width: 160 |
| | | }, |
| | | { |
| | | field: 'print_status', |
| | | title: t('processCard.printStatus'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged, width: 120 |
| | | }, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'print', name: t('processCard.print'), status: 'primary'}, |
| | | {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, |
| | | //print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: null,//表格数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["quantity", 'total_area',] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | }, |
| | | |
| | | |
| | | }) |
| | | |
| | | 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 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)}}) |
| | | |
| | | 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)} |
| | | }) |
| | | |
| | | 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 |
| | | if (company.label === 1) { |
| | | dialogTableVisibleLabel.value = true |
| | | } else if (company.label === 2) { |
| | | router.push({ |
| | | path: '/main/processCard/PrintCustomLabel', |
| | | query: { |
| | | type: type, |
| | | faceOrientation: faceOrientation, |
| | | lableType: lableTypes, |
| | | printList: JSON.stringify(selectRecords) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | } else if (lableTypes == 2) { |
| | | labelRow.value.list = JSON.stringify(selectRecords) |
| | | labelRow.value.faceOrientation = faceOrientation |
| | | labelRow.value.type = type |
| | | labelRow.value.lableType = lableTypes |
| | | if (company.label === 1) { |
| | | dialogTableVisibleCustomLabel.value = true |
| | | } else if (company.label === 2) { |
| | | router.push({ |
| | | path: '/main/processCard/PrintCustomLabelSemi', |
| | | query: { |
| | | type: type, |
| | | faceOrientation: faceOrientation, |
| | | lableType: lableTypes, |
| | | printList: JSON.stringify(selectRecords) |
| | | } |
| | | }) |
| | | } |
| | | } else if (lableTypes == 3) { |
| | | router.push({ |
| | | path: '/main/processCard/PrintLabel1', |
| | | query: { |
| | | type: type, |
| | | faceOrientation: faceOrientation, |
| | | lableType: lableTypes, |
| | | printList: JSON.stringify(selectRecords) |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | |
| | | 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 |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | |
| | | |
| | | 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'; // 显示该按钮 |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | // 监听打印完成事件 |
| | | 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')) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <el-input v-show="isVisible" v-model="printMerge" :placeholder="$t('processCard.mergePrinting')" clearable |
| | | style="width: 90px"></el-input> |
| | | |
| | | <label>{{ $t('processCard.labelStyle') }}:</label> |
| | | <el-select v-model="printType" :placeholder="$t('processCard.pleaseSelect')" 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" :placeholder="lableTypeOptions[0].label" class="m-2" style="width: 140px"> |
| | | <el-option |
| | | v-for="item in filteredOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-select v-model="stateValue" :placeholder="$t('processCard.pleaseSelect')" allow-create class="m-2" clearable |
| | | filterable 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" |
| | | height="100%" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{ item.title + ': ' }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | |
| | | </li> |
| | | </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" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </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" |
| | | :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> |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer { |
| | | width: 99%; |
| | | height: 92%; |
| | | } |
| | | |
| | | |
| | | :deep(#sizeCheck .el-dialog__body) { |
| | | height: 90%; |
| | | width: 100%; |
| | | } |
| | | |
| | | :deep(#sizePrintCalrd .el-dialog__body) { |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | :deep(#sizeCustom .el-dialog__body) { |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | :deep(#sizeCustomSemi .el-dialog__body) { |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | </style> |
| | |
| | | if (project==''){ |
| | | project=null |
| | | } |
| | | |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}`, filterData.value).then((res) => { |
| | | request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | gridOptions.toolbarConfig.buttons[2].visible=false |
| | | let roleId=res.data.user |
| | | if (roleId=='1' || roleId=='17'){ |
| | | gridOptions.toolbarConfig.buttons[2].visible=true |
| | | } |
| | | |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | |
| | | buttons: [ |
| | | {code: 'editCheckbox', name: t('basicData.edit'), status: 'primary'}, |
| | | {'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'}, |
| | | {code: 'detailsPrint', name: '明细打印', status: 'primary'}, |
| | | |
| | | ], |
| | | |
| | |
| | | return; |
| | | |
| | | } |
| | | case 'detailsPrint': { |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | if(selectRecords===null ||selectRecords===''||selectRecords.length===0){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | |
| | | let orderIdList = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | | orderIdList += selectRecords[i].order_id |
| | | } else { |
| | | orderIdList += selectRecords[i].order_id + "|" |
| | | } |
| | | } |
| | | let array = orderIdList.split('|'); |
| | | router.push({path: '/main/processCard/PrintFlowCardDetails', query: {printList: JSON.stringify(selectRecords),checkedValue:checkedValue.value.value}}) |
| | | return; |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | @ApiOperation("流程卡打印查询接口") |
| | | @SaCheckPermission("SelectPrintFlowCard.search") |
| | | @PostMapping("/selectPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}") |
| | | @PostMapping("/selectPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}/{userId}") |
| | | public Result selectPrintFlowCard( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String project, |
| | | @PathVariable String userId, |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.selectPrintFlowCardSv(selectTime1, selectTime2, orderId, project, flowCard)); |
| | | return Result.seccess(flowCardService.selectPrintFlowCardSv(selectTime1, selectTime2, orderId, project,userId, flowCard)); |
| | | } |
| | | |
| | | @ApiOperation("流程卡明细查询接口") |
| | |
| | | @RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.getSelectPrinReworkSv(object,printMerge,printLike)); |
| | | } |
| | | |
| | | @ApiOperation("流程卡明细按编号查询接口") |
| | | @PostMapping("/selectPrintDetails/{inquiryMode}") |
| | | public Result selectPrintDetails( |
| | | @PathVariable String inquiryMode, |
| | | @RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.selectPrintDetailsSv(object,inquiryMode)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("打印自定义标签数据按编号查询接口") |
| | | @PostMapping("/getSelectPrintCustomLabelDetails/{type}/{lableType}") |
| | | public Result getSelectPrintCustomLabelDetails( @PathVariable String type, |
| | | @PathVariable Integer lableType, |
| | | @RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.getSelectPrintCustomLabelDetailsSv(type,lableType,object)); |
| | | |
| | | } |
| | | } |
| | |
| | | Boolean printUpdateSortMp(String processId, Integer orderNumber, Integer technologyNumber, Integer sort, String process); |
| | | |
| | | List<Map<String, String>> getPrimaryListLimt(String processId, String technologyNumber, String glassChild, String process); |
| | | |
| | | List<Map<String, String>> selectPrintDetailsMp(String orderId); |
| | | |
| | | List<Map<String, Object>> getPrintCustomDataDetails(String processId, Integer orderNumber); |
| | | |
| | | String selectUserMp(String userId); |
| | | } |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Object selectPrintFlowCardSv(Date selectTime1, Date selectTime2, String orderId, String project, FlowCard flowCard) { |
| | | public Object selectPrintFlowCardSv(Date selectTime1, Date selectTime2, String orderId, String project,String userId, FlowCard flowCard) { |
| | | if ("null".equals(orderId)) { |
| | | orderId = ""; |
| | | } |
| | |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.selectPrintFlowCardMp(selectTime1, selectTime2, orderId, project, flowCard)); |
| | | String roleId=flowCardMapper.selectUserMp(userId); |
| | | map.put("user",roleId ); |
| | | return map; |
| | | } |
| | | |
| | |
| | | printLike=null; |
| | | return map; |
| | | } |
| | | |
| | | public Object selectPrintDetailsSv(Map<String, Object> object, String inquiryMode) { |
| | | 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) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("detail", flowCardMapper.selectPrintDetailsMp(flowCard.getOrderId())); |
| | | list.add(itemmap); |
| | | } |
| | | } |
| | | map.put("data", list); |
| | | map.put("type", flowCardMapper.selectType()); |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getSelectPrintCustomLabelDetailsSv(String type, Integer lableType, 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()) { |
| | | |
| | | if (lableType != 2){ |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataDetails(flowCard.getProcessId(),flowCard.getOrderNumber())); |
| | | list.add(itemmap); |
| | | } |
| | | } |
| | | else{ |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataSemi(flowCard.getProcessId(),flowCard.getTechnologyNumber(),flowCard.getProcess())); |
| | | list.add(itemmap); |
| | | } |
| | | } |
| | | } |
| | | map.put("data", list); |
| | | map.put("title", flowCardMapper.getPrintTitle(type)); |
| | | return map; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | ogds.order_number, |
| | | GROUP_CONCAT(ogds.technology_number SEPARATOR '') AS technology_number, |
| | | ogds.glass_child, |
| | | GROUP_CONCAT(ogds.glass_child SEPARATOR ' ') AS concatenated_glass_child, |
| | | GROUP_CONCAT(ogds.glass_child SEPARATOR '+') AS concatenated_glass_child, |
| | | SUBSTRING(process, LOCATE('夹胶', process)) AS processed_part |
| | | from sd.order_glass_detail as ogds |
| | | where ogds.order_id = #{orderId} |
| | |
| | | ogds.order_number, |
| | | GROUP_CONCAT(pds.glass_sort SEPARATOR '') AS technology_number, |
| | | ogds.glass_child, |
| | | GROUP_CONCAT(ogds.glass_child SEPARATOR ' ') AS concatenated_glass_child, |
| | | GROUP_CONCAT(ogds.glass_child SEPARATOR '+') AS concatenated_glass_child, |
| | | SUBSTRING(pds.process, LOCATE('中空', pds.process)) AS processed_part |
| | | from sd.order_glass_detail as ogds |
| | | left join sd.order_detail as ods |
| | |
| | | sum(od.weight) as weight, |
| | | #{technologyNumber} as technologyNumber, |
| | | concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber, |
| | | concat('对应我司单号',o.batch) AS otherRemarks |
| | | concat('对应我司单号',o.batch) AS otherRemarks, |
| | | '' as qrcode |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | o.project, |
| | | ogd.technology_number, |
| | | ogd.glass_address, |
| | | sum(od.quantity) as quantity, |
| | | sum(ogd.total_area) as total_area, |
| | | sum(fc.quantity) as quantity, |
| | | round(sum(ogd.child_width*ogd.child_height*fc.quantity/1000000) ,2) as total_area, |
| | | od.product_name, |
| | | ogd.glass_child, |
| | | fc.founder, |
| | |
| | | ogds.order_number, |
| | | GROUP_CONCAT(ogds.technology_number SEPARATOR '') AS technology_number, |
| | | ogds.glass_child, |
| | | GROUP_CONCAT(ogds.glass_child SEPARATOR ' ') AS concatenated_glass_child, |
| | | GROUP_CONCAT(ogds.glass_child SEPARATOR '+') AS concatenated_glass_child, |
| | | SUBSTRING(process, LOCATE('夹胶', process)) AS processed_part |
| | | from sd.order_glass_detail as ogds |
| | | where ogds.order_id = #{orderId} |
| | |
| | | ogds.order_number, |
| | | GROUP_CONCAT(pds.glass_sort SEPARATOR '') AS technology_number, |
| | | ogds.glass_child, |
| | | GROUP_CONCAT(ogds.glass_child SEPARATOR ' ') AS concatenated_glass_child, |
| | | GROUP_CONCAT(ogds.glass_child SEPARATOR '+') AS concatenated_glass_child, |
| | | SUBSTRING(pds.process, LOCATE('中空', pds.process)) AS processed_part |
| | | from sd.order_glass_detail as ogds |
| | | left join sd.order_detail as ods |
| | |
| | | sum(od.weight) as weight, |
| | | #{technologyNumber} as technologyNumber, |
| | | concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber, |
| | | concat('对应我司单号',o.batch) AS otherRemarks |
| | | concat('对应我司单号',o.batch) AS otherRemarks, |
| | | fc.technology_number as qrcode |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | and position(fc.technology_number in #{technologyNumber}) |
| | | group by fc.process_id limit 1 |
| | | </select> |
| | | |
| | | <select id="selectPrintDetailsMp"> |
| | | select fc.id, |
| | | fc.order_id, |
| | | fc.process_id, |
| | | o.customer_name, |
| | | o.project, |
| | | ogd.technology_number, |
| | | ogd.glass_address, |
| | | (fc.quantity) as quantity, |
| | | round((ogd.child_width*ogd.child_height*fc.quantity/1000000) ,2) as total_area, |
| | | od.product_name, |
| | | ogd.glass_child, |
| | | fc.founder, |
| | | date(fc.splitFrame_time) as splitFrame_time, |
| | | /* if(fc.print_status=0,'未打印','已打印') as print_status*/ |
| | | fc.print_status, |
| | | ogd.process, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber, |
| | | od.order_number |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and |
| | | ogd.technology_number = fc.technology_number |
| | | left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number |
| | | left join sd.`order` as o on o.order_id = fc.order_id |
| | | where fc.order_id = #{orderId} |
| | | GROUP BY fc.process_id, od.order_number |
| | | order by fc.process_id,od.order_number |
| | | </select> |
| | | |
| | | <select id="getPrintCustomDataDetails"> |
| | | 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, |
| | | width, |
| | | height, |
| | | od.quantity, |
| | | 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, |
| | | p.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, |
| | | ogd.glass_child as glassChild, |
| | | ogd.glass_address as glassAddress, |
| | | JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.color')) AS color |
| | | from sd.order as o |
| | | left join sd.order_detail as od on o.order_id = od.order_id |
| | | left join flow_card as fc on o.order_id = fc.order_id and |
| | | od.order_number = fc.order_number |
| | | left join sd.product as p on p.id = od.product_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 sd.order_glass_detail as ogd |
| | | on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and |
| | | ogd.technology_number = fc.technology_number |
| | | where fc.process_id = #{processId} |
| | | and fc.order_number=#{orderNumber} |
| | | group by fc.process_id,od.order_number, width, height |
| | | order by fc.process_id |
| | | </select> |
| | | |
| | | <select id="selectUserMp"> |
| | | select role_id from |
| | | erp_user_info.`user` as u left join erp_user_info.user_role as ur on u.id=ur.user_id |
| | | where u.login_name=#{userId} |
| | | </select> |
| | | </mapper> |