| | |
| | | $t('hellow.stopproject') |
| | | }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" :disabled="listFlow.length > 0 ? false : true" id="searchButton" type="warning" @click="handleBinde">{{ |
| | | $t('searchOrder.printlabels') |
| | | }} |
| | | </el-button> |
| | | </div> |
| | | |
| | | <div id="dotClass"> |
| | |
| | | <div style="display: flex;"> |
| | | <el-input v-model="flowCardId" style="margin-left: 10px;margin-bottom: 10px;width: 240px;" :placeholder="$t('searchOrder.incardnumber')" /> |
| | | <el-input v-model="filmsId" style="margin-left: 10px;margin-bottom: 10px;width: 240px;" :placeholder="$t('film.infilms')"/> |
| | | <el-input v-model="productName" style="margin-left: 10px;margin-bottom: 10px;width: 240px;" :placeholder="$t('large.inproductname')"/> |
| | | <el-input v-model="customerName" style="margin-left: 10px;margin-bottom: 10px;width: 240px;" :placeholder="$t('large.incustomerName')"/> |
| | | <el-input v-model="thickness" style="margin-left: 10px;margin-bottom: 10px;width: 240px;" :placeholder="$t('searchOrder.inthickness')"/> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="fetchFlowCardsearch"> |
| | | {{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <div style="margin-left: 87%;">{{$t('hellow.pairsnumbertotal')}}{{ pairTotal }}</div> |
| | | <el-table |
| | | ref="table" |
| | | style="margin-top: 20px; height: 700px;" |
| | | :data="tableDatab" |
| | | :row-class-name="tableRowClassName" |
| | | :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }" |
| | | row-key="projectNumber" |
| | | > |
| | | <!-- <el-table-column type="expand"> --> |
| | | <el-table-column> |
| | | <template #default="props"> |
| | | <el-table :data="props.row.records" style="width: 100%"> |
| | | <el-table :data="props.row.flowCardGlassInfoDTOList" style="width: 100%" |
| | | :row-class-name="(row) => nestedTableRowClassName(props.row, row)" |
| | | > |
| | | <el-table-column prop="layer" fixed align="center" :label="$t('hellow.layernumber')" min-width="80"/> |
| | | <el-table-column prop="thickness" align="center" :label="$t('hellow.thickness')" min-width="80"/> |
| | | <el-table-column prop="filmsId" align="center" :label="$t('hellow.coatingtypes')" min-width="80"/> |
| | | <el-table-column prop="sumCount" align="center" :label="$t('hellow.totalnumber')" min-width="80"/> |
| | | <el-table-column prop="realCount" align="center" :label="$t('hellow.realpieces')" min-width="80"/> |
| | | <el-table-column prop="pairCount" align="center" :label="$t('hellow.pairsnumber')" min-width="80"/> |
| | | <el-table-column prop="damageCount" align="center" :label="$t('hellow.damagenumber')" min-width="80"/> |
| | | <el-table-column prop="pairCount" align="center" :label="$t('hellow.pairsnumber')" min-width="80"/> |
| | | </el-table> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="projectNumber" fixed align="center" :label="$t('hellow.cardnumber')" min-width="20"/> |
| | | <el-table-column prop="flowCardId" fixed align="center" :label="$t('hellow.cardnumber')" min-width="20"/> |
| | | <el-table-column prop="productName" fixed align="center" :label="$t('large.productname')" min-width="20"/> |
| | | <el-table-column prop="customerName" fixed align="center" :label="$t('large.customerName')" min-width="20"/> |
| | | <el-table-column fixed="right" :label="$t('hellow.operate')" align="center" width="270"> |
| | | <template #default="scope"> |
| | | <el-button type="text" plain @click="handletake(scope.row)">{{ $t('hellow.claimquest') }}</el-button> |
| | | <el-button type="text" :disabled="scope.row.isThroughSlot" plain @click="handletake(scope.row)">{{ $t('hellow.claimquest') }}</el-button> |
| | | <el-button type="text" plain @click="handleBindRack(scope.row)">{{ |
| | | $t('hellow.missingfilms') |
| | | }} |
| | |
| | | <el-dialog v-model="dialogFormVisibleb" top="7vh" width="70%" height="500"> |
| | | <div style="margin-top: -20px;text-align: center;margin-left: 400px;"> |
| | | <el-form-item :label="$t('hellow.cardnumbera')" style="width: 14vw"> |
| | | {{ currentRow.projectNumber }} |
| | | {{ currentRow.flowCardId }} |
| | | </el-form-item> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 400px;" |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 打印标签 --> |
| | | <el-dialog v-model="blinde" top="30vh" width="25%" :title="$t('searchOrder.printlabels')"> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-select v-model="tag" filterable clearable :placeholder="$t('hellow.projectMsg2')" @change="changeTag" |
| | | style="width: 220px" @input="handleInputChange"> |
| | | <el-option v-for="(tag, index) in tags" :key="index" :label="tag.name" :value="tag" /> |
| | | </el-select> |
| | | <el-select v-model="stateValue" filterable clearable :placeholder="$t('screendisplay.pchoice')" |
| | | style="width: 220px" @input="handleInputChange"> |
| | | <el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | <el-button type="primary" @click="labelPrint = true"> |
| | | {{ $t('processCard.printing') }} |
| | | </el-button> |
| | | <el-button @click="blinde = false">{{ $t('basicData.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="labelPrint" style="width: 80%; " destroy-on-close> |
| | | <el-button :icon="Printer" circle @click="printOrder(1)">{{ $t('processCard.printing') }}</el-button> |
| | | <print-custom-label-x-j id="childLabel" :faceOrientation="stateValue" :lableType="1" :list="listFlow" |
| | | :lastList='lastList' :type="tag.name" style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | <!-- 删除任务 --> |
| | | <el-dialog v-model="blindd" top="30vh" width="25%" :title="$t('hellow.hollowtaskdet')"> |
| | | <template #footer> |
| | |
| | | v-model="selectedProjectNo" |
| | | filterable |
| | | clearable |
| | | :placeholder="$t('basicData.plselectproject')" |
| | | :placeholder="$t('hellow.plselectproject')" |
| | | style="width: 260px" |
| | | > |
| | | <el-option |
| | |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 历史任务 --> |
| | | <el-dialog v-model="blindb" top="5vh" width="71%"> |
| | | <el-dialog v-model="blindb" top="5vh" width="95%" @close="iframeUrl=''"> |
| | | <iframe |
| | | :src="iframeUrl" |
| | | marginwidth="2000px" |
| | |
| | | const topRemove = ref('') |
| | | const filmsId = ref('') |
| | | const flowCardId = ref('') |
| | | const pairTotal = ref() |
| | | const productName = ref('') |
| | | const customerName = ref('') |
| | | const freethree = ref('#911005'); |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisibleb = ref(false) |
| | |
| | | }; |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | fetchFlowBind(currentRow.projectNumber, currentRow.layer, currentPage2.value); |
| | | fetchFlowBind(currentRow.flowCardId, currentPage2.value); |
| | | }; |
| | | const handleMessage = (data) => { |
| | | try { |
| | |
| | | // 缺片详情 |
| | | const handleBindRack = (row) => { |
| | | currentPage2.value = 1; |
| | | const { projectNumber, layer } = row; |
| | | currentRow.projectNumber = row.projectNumber; |
| | | const { flowCardId} = row; |
| | | currentRow.flowCardId = row.flowCardId; |
| | | dialogFormVisibleb.value = true; |
| | | fetchFlowBind(projectNumber, layer,currentPage2.value); |
| | | fetchFlowBind(flowCardId, currentPage2.value); |
| | | }; |
| | | // 领取任务 |
| | | const handletake = (row) => { |
| | | window.localStorage.setItem('flowCardId', row.projectNumber) |
| | | window.localStorage.setItem('flowCardId', row.flowCardId) |
| | | dialogFormVisiblec.value = true; |
| | | fetchmulan() |
| | | }; |
| | | // 强制出片 |
| | | const handleout = (row) => { |
| | | window.localStorage.setItem('flowCardId', row.projectNumber) |
| | | window.localStorage.setItem('flowCardId', row.flowCardId) |
| | | dialogFormVisibled.value = true; |
| | | fetchmulan() |
| | | }; |
| | |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | | const response = await request.post('/hollowGlass/hollowGlassRelationInfo/queryHollowAllFlowCard',{ |
| | | deviceId: 0, |
| | | filmsId: '', |
| | | flowCardId: '', |
| | | thickness: '', |
| | | thickness: 0, |
| | | }); |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | const newData = parseData(response.data); |
| | | tableDatab.value = newData; |
| | | tableDatab.value = response.data; |
| | | pairTotal.value = response.data[0].pairTotalCount; |
| | | } else { |
| | | ElMessage.error('Failed to fetch data'); |
| | | } |
| | | } catch (error) { |
| | | ElMessage.error('Error fetching data'); |
| | | } |
| | | }; |
| | | function tableRowClassName({ row }) { |
| | | if (row.isThroughSlot == true) { |
| | | return 'row-red-background'; |
| | | } |
| | | return ''; |
| | | } |
| | | function nestedTableRowClassName(parentRow, row) { |
| | | if (parentRow.isThroughSlot == true) { |
| | | return 'row-red-background'; |
| | | } |
| | | return ''; |
| | | } |
| | | const fetchFlowCardsearch = async () => { |
| | | try { |
| | | const response = await request.post('/hollowGlass/hollowGlassRelationInfo/queryHollowAllFlowCard',{ |
| | |
| | | }); |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | const newData = parseData(response.data); |
| | | tableDatab.value = newData; |
| | | tableDatab.value = response.data; |
| | | pairTotal.value = response.data[0].pairTotalCount; |
| | | } else { |
| | | ElMessage.error('Failed to fetch data'); |
| | | } |
| | | } catch (error) { |
| | | ElMessage.error('Error fetching data'); |
| | | } |
| | | }; |
| | | // 中空配方 |
| | |
| | | tableDatax.value = response.data; |
| | | titleformulaName.value = response.data.map(item => ({ formulaId: item.id, formulaName: item.formulaName })); |
| | | } else { |
| | | ElMessage.error('Failed to fetch data'); |
| | | } |
| | | } catch (error) { |
| | | ElMessage.error('Error fetching data'); |
| | | } |
| | | }; |
| | | const handleFormulaChange = (value) => { |
| | |
| | | topRemove.value = ''; |
| | | fetchmulan() |
| | | } else { |
| | | ElMessage.error('Failed to fetch data'); |
| | | } |
| | | } catch (error) { |
| | | ElMessage.error('Error fetching data'); |
| | | } |
| | | }; |
| | | const removalMethodMapa = { |
| | |
| | | adda.value = false |
| | | fetchmulan() |
| | | } else { |
| | | ElMessage.error('Failed to fetch data'); |
| | | } |
| | | } catch (error) { |
| | | ElMessage.error('Error fetching data'); |
| | | } |
| | | }; |
| | | // 中空配方删除 |
| | |
| | | ElMessage.success(response.message); |
| | | fetchmulan() |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | } catch (error) { |
| | |
| | | })); |
| | | titleSelectJson.value.processType = processTypes; |
| | | } else { |
| | | ElMessage.error('Failed to fetch data'); |
| | | } |
| | | } catch (error) { |
| | | ElMessage.error('Error fetching data'); |
| | | } |
| | | }; |
| | | // 预览 |
| | | const handleup = async () => { |
| | | if (!selectedProjectNo.value) { |
| | | ElMessage.error(t('hellow.plselectproject')) |
| | | return |
| | | } |
| | | try { |
| | | var url="/hollowGlass/hollowGlassOutRelationInfo/appointHollowTaskDetails?cell="+ 932 + "&flowCardId=" + selectedProjectNo.value; |
| | | window.localStorage.setItem('flowCardId', selectedProjectNo.value) |
| | |
| | | dialogFormVisiblee.value = false |
| | | selectedProjectNo.value = '' |
| | | closeWebSocket(socket); |
| | | const summary = response.data.reduce((map, item) => { |
| | | const key = `${item.hollowSequence}`; |
| | | if (!map[key]) { |
| | | map[key] = { |
| | | printQuantity: 1, |
| | | order_number: item.glassType, |
| | | processId: item.flowCardId |
| | | }; |
| | | } |
| | | return map; |
| | | }, {}); |
| | | listFlow.value = Object.values(summary); |
| | | } else { |
| | | ElMessage.error('Failed to fetch data'); |
| | | } |
| | | } catch (error) { |
| | | ElMessage.error('Error fetching data'); |
| | | } |
| | | }; |
| | | const parseData = (rawData) => { |
| | | return Object.keys(rawData).map(projectNumber => ({ |
| | | projectNumber, |
| | | records: rawData[projectNumber] |
| | | })); |
| | | return Object.entries(rawData).map(([compositeKey, records]) => { |
| | | const [projectNumber, productName] = compositeKey.split(':'); |
| | | return { |
| | | projectNumber, |
| | | productname: productName, |
| | | records: records.map(record => ({ |
| | | ...record, |
| | | })) |
| | | }; |
| | | }); |
| | | }; |
| | | const fetchFlowBind = async (flowCardId, layer, page) => { |
| | | const fetchFlowBind = async (flowCardId, page) => { |
| | | try { |
| | | var url="/hollowGlass/hollowGlassRelationInfo/queryLackByFlowCard?flowCardId="+flowCardId + "&layer=" + layer; |
| | | var url="/hollowGlass/hollowGlassRelationInfo/queryLackByFlowCard?flowCardId="+flowCardId + "&layer=" + 1; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | tableDatac.value = response.data[page]; |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | } |
| | |
| | | ElMessage.success(response.message); |
| | | blinda.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | |
| | | ElMessage.success(response.message); |
| | | blindc.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | |
| | | ElMessage.success(response.message); |
| | | blindd.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | |
| | | const finisha = async () => { |
| | | let flowCardId = window.localStorage.getItem('flowCardId') |
| | | let id = window.localStorage.getItem('id') |
| | | if (!totalPairQuantity.value) { |
| | | ElMessage.error(t('hellow.cpairQuantity')) |
| | | return |
| | | } |
| | | try { |
| | | var url="/hollowGlass/hollowGlassOutRelationInfo/receiveTask?cell="+ 932 + "&flowCardId=" + flowCardId + "&totalPairQuantity=" + totalPairQuantity.value+ "&formulaId=" + -1; |
| | | const response = await request.post(url) |
| | |
| | | formulaName.value = ''; |
| | | totalPairQuantity.value = ''; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | } |
| | |
| | | const finishb = async () => { |
| | | let flowCardId = window.localStorage.getItem('flowCardId') |
| | | let id = window.localStorage.getItem('id') |
| | | if (!totalPairQuantitya.value) { |
| | | ElMessage.error(t('hellow.cpairQuantity')) |
| | | return |
| | | } |
| | | try { |
| | | var url="/hollowGlass/hollowGlassOutRelationInfo/forceOutGlass?cell="+ 932 + "&flowCardId=" + flowCardId + "&totalPairQuantity=" + totalPairQuantitya.value+ "&formulaId=" + -1; |
| | | const response = await request.post(url) |
| | |
| | | cella.value = ''; |
| | | totalPairQuantitya.value = ''; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | } |
| | |
| | | onBeforeUnmount(() => { |
| | | closeWebSocket(); |
| | | }); |
| | | |
| | | import requestErp from "@/utils/requestErp"; |
| | | import { hiprint } from "vue-plugin-hiprint"; |
| | | import PrintCustomLabelXJ from './PrintCustomLabelTwo.vue' |
| | | const listFlow = ref([]) |
| | | let hiprintTemplate = ref() |
| | | const stateValue = ref('') |
| | | const stateOptions = [ |
| | | { |
| | | value: t('processCard.thisIsTheIndoorSurface'), |
| | | label: t('processCard.thisIsTheIndoorSurface'), |
| | | }, |
| | | { |
| | | value: t('processCard.thisSideIsOutsideTheRoom'), |
| | | label: t('processCard.thisSideIsOutsideTheRoom'), |
| | | }, |
| | | ] |
| | | const blinde = ref(false) |
| | | const labelPrint = ref(false); |
| | | const handleBinde = (row) => { |
| | | blinde.value = true; |
| | | getTags(); |
| | | hiprint.init(); |
| | | }; |
| | | const changeTag = () => { |
| | | hiprintTemplate.value = new hiprint.PrintTemplate({}); |
| | | const json = JSON.parse(tag.value.value) |
| | | hiprintTemplate.value.update(json) |
| | | } |
| | | |
| | | const getTags = async () => { |
| | | try { |
| | | const response = await requestErp.get('tagStyle/getTagList') |
| | | if (response.code == 200) { |
| | | tags.value = response.data |
| | | ElMessage.success(response.message); |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | const printOrder = (type) => { |
| | | const list = hiprintTemplate.value.getJson() |
| | | list.panels[0].printElements.forEach(element => { |
| | | element.options.fontFamily = 'Arial' |
| | | }) |
| | | console.log(lastList.value) |
| | | let object = lastList.value |
| | | //判断是否为表格 |
| | | let columnsNum = null |
| | | if (list.panels[0].printElements[0].options.field === 'table') { |
| | | object = { table: lastList.value } |
| | | columnsNum = (list.panels[0].printElements[0].options.gridColumns || 1) |
| | | } |
| | | hiprintTemplate.value.print(object) |
| | | |
| | | } |
| | | let lastList = ref([]) |
| | | const tags = ref([]) |
| | | |
| | | const tag = ref({ |
| | | id: null, |
| | | name: null, |
| | | type: 1, |
| | | tagWidth: null, |
| | | tagHeight: null, |
| | | value: null, |
| | | size: null |
| | | }) |
| | | </script> |
| | | <style scoped> |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | |
| | | margin-top: 20px; |
| | | margin-bottom: 10px; |
| | | } |
| | | ::v-deep(.row-red-background) { |
| | | background-color: rgb(224.6, 242.8, 215.6) !important; |
| | | } |
| | | </style> |