补充报工新增语言,修改补片打印时,多个流程卡号在同一个补片单号下出现的问题,分架排序改为前端排序
| | |
| | | flowCardCount=produceList.value.length |
| | | |
| | | handleSummary() |
| | | handleGetQRCode() |
| | | if (name=='天津北玻玻璃工业技术有限公司(TJBB-QR7.1-01)'){ |
| | | handleGetQRCodeTj()//天津扫码枪报工需要合并层号二维码 |
| | | }else{ |
| | | handleGetQRCode()//拆分层号二维码 |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | |
| | | |
| | | } |
| | | ) |
| | | |
| | | const handleGetQRCode = async () => { |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | const detail = produceList.value[i].detail[0]; |
| | | const processId = detail.process_id; |
| | | const mergeStr = detail.mergeTechnologyNumber?.toString() || ''; |
| | | const detailItem = produceList.value[i].detail[0]; |
| | | const detailList = produceList.value[i].detailList; |
| | | |
| | | detail.qrcodeList = []; // 初始化 |
| | | const mergeTechNumber = detailItem.mergeTechnologyNumber.toString(); |
| | | const processId = detailItem.process_id; |
| | | const url = `${processId}/${mergeTechNumber}`; |
| | | |
| | | for (let j = 0; j < mergeStr.length; j++) { |
| | | const singleTech = mergeStr[j]; // 取出每一位字符 |
| | | const url = `${processId}/${singleTech}`; |
| | | const qrcodeData = await QRCode.toDataURL(url); |
| | | detail.qrcodeList.push({ |
| | | const qrcodeData = await QRCode.toDataURL(url); |
| | | detailItem.qrcodeList = []; |
| | | |
| | | //储存层号 |
| | | const seenTechNumbers = new Set(); |
| | | |
| | | for (let j = 0; j < detailList.length; j++) { |
| | | const techNum = detailList[j].technology_number; |
| | | //有则跳过 |
| | | if (seenTechNumbers.has(techNum)) continue; |
| | | detailItem.qrcodeList.push({ |
| | | qrcode: qrcodeData, |
| | | technologyNumber: singleTech |
| | | technologyNumber: techNum |
| | | }); |
| | | |
| | | seenTechNumbers.add(techNum); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | |
| | | // const handleGetQRCode = async () => { |
| | | // let technologyNumber='' |
| | | // for (let i = 0; i < produceList.value.length; i++) { |
| | | // |
| | | // const technologyNumber = produceList.value[i].detail[0].technologyNumber.toString(); // 转换为字符串以便处理每个字符 |
| | | // produceList.value[i].detail[0]["qrcodeList"] = []; // 初始化一个空数组用来存储 QR Code |
| | | // const merge = produceList.value[i].detail[0].mergeTechnologyNumber.toString(); |
| | | // const processId = produceList.value[i].detail[0].process_id; |
| | | // const url = `${processId}/${technologyNumber}`; |
| | | // // 生成 QR Code 并存储到数组中 |
| | | // const qrcodeData = await QRCode.toDataURL(url); |
| | | // produceList.value[i].detail[0]["qrcodeList"].push({ |
| | | // qrcode: qrcodeData, |
| | | // technologyNumber: technologyNumber |
| | | // }); |
| | | // } |
| | | // }; |
| | | |
| | | const handleGetQRCodeTj = async () => { |
| | | let technologyNumber='' |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | const technologyNumber = produceList.value[i].detail[0].mergeTechnologyNumber.toString(); // 转换为字符串以便处理每个字符 |
| | | produceList.value[i].detail[0]["qrcodeList"] = []; // 初始化一个空数组用来存储 QR Code |
| | | |
| | | const processId = produceList.value[i].detail[0].process_id; |
| | | const url = `${processId}/${technologyNumber}`; |
| | | // 生成 QR Code 并存储到数组中 |
| | | const qrcodeData = await QRCode.toDataURL(url); |
| | | produceList.value[i].detail[0]["qrcodeList"].push({ |
| | | qrcode: qrcodeData, |
| | | technologyNumber: technologyNumber |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | |
| | | //根据输入的数量重新汇总 |
| | |
| | | pleaseNumber8:'الرجاء إدخال الرقم التسلسلي', |
| | | pleaseNumber9:'تصحيح الكمية النهائية أو المعلقة', |
| | | pleaseNumber10:'完工数不能大于流程卡数量', |
| | | pleaseNumber11:'完工+次破数量不能大于可完工数量', |
| | | pleaseNumber12:'本工序报工数:', |
| | | pleaseNumber13:'下工序报工数:', |
| | | pleaseNumber14:'本工序修改数不能小于下工序报工数', |
| | | }, |
| | | productStock:{ |
| | | page:{ |
| | |
| | | pleaseNumber8:'Please enter serial number', |
| | | pleaseNumber9:'Correct number of completions or breakdowns', |
| | | pleaseNumber10:'The number of completions cannot be greater than the number of process cards', |
| | | pleaseNumber11:'完工+次破数量不能大于可完工数量', |
| | | pleaseNumber12:'本工序报工数:', |
| | | pleaseNumber13:'下工序报工数:', |
| | | pleaseNumber14:'本工序修改数不能小于下工序报工数', |
| | | |
| | | }, |
| | | productStock:{ |
| | |
| | | pleaseNumber8:'일련번호를 입력해 주세요', |
| | | pleaseNumber9:'정확한 양품 혹은 불량 수량', |
| | | pleaseNumber10:'양품 수량은 프로세스 카드 총량을 초과할 수 없습니다.', |
| | | pleaseNumber11:'完工+次破数量不能大于可完工数量', |
| | | pleaseNumber12:'本工序报工数:', |
| | | pleaseNumber13:'下工序报工数:', |
| | | pleaseNumber14:'本工序修改数不能小于下工序报工数', |
| | | }, |
| | | productStock:{ |
| | | page:{ |
| | |
| | | pleaseNumber8:'Введите серийный номер.', |
| | | pleaseNumber9:'Правильное завершение и количество поврежденных', |
| | | pleaseNumber10:'完工数不能大于流程卡数量', |
| | | pleaseNumber11:'完工+次破数量不能大于可完工数量', |
| | | pleaseNumber12:'本工序报工数:', |
| | | pleaseNumber13:'下工序报工数:', |
| | | pleaseNumber14:'本工序修改数不能小于下工序报工数', |
| | | }, |
| | | productStock:{ |
| | | page:{ |
| | |
| | | pleaseNumber8:'请输入序号', |
| | | pleaseNumber9:'正确的完工或次破数量', |
| | | pleaseNumber10:'完工数不能大于流程卡数量', |
| | | pleaseNumber11:'可修改数量不足', |
| | | pleaseNumber11:'完工+次破数量不能大于可完工数量', |
| | | pleaseNumber12:'本工序报工数:', |
| | | pleaseNumber13:'下工序报工数:', |
| | | pleaseNumber14:'本工序修改数不能小于下工序报工数', |
| | | }, |
| | | productStock:{ |
| | | page:{ |
| | |
| | | }) |
| | | const gridEventsRight = { |
| | | toolbarButtonClick({code}) { |
| | | const $grid = xGridLeft.value |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'sorting': { |
| | | request.post(`/processCard/selectSortingCard/${orderId}/${productionId}/${flashback.value}/${optionVal.value}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | maxProcseeId = res.data.maxFlowCard[0].process_id |
| | | orderOtherMoney.value = res.data.orderOtherMoney |
| | | |
| | | //已有的不添加 |
| | | const dynamicFields = orderOtherMoney.value.map(item => item.column) |
| | | gridOptions.columns = gridOptions.columns.filter(col => !dynamicFields.includes(col.field)) |
| | | |
| | | // 添加新的动态列 |
| | | orderOtherMoney.value.forEach(item => { |
| | | let column = { |
| | | field: `${item.column}`, |
| | | width: 100, |
| | | title: item.alias, |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged, |
| | | sortable: true |
| | | } |
| | | |
| | | gridOptions.columns.push(column) |
| | | |
| | | }) |
| | | produceList = res.data.data |
| | | produceList.forEach(item => { |
| | | |
| | | item.shape = (item.shape == 2) ? t('order.alien') : t('order.universalShape'); |
| | | }) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | return; |
| | | |
| | | const rightData = $grid.getTableData().fullData |
| | | let sortedRule = optionVal.value // "0 宽高" 或 "1 高宽" |
| | | let sortedData = [] |
| | | if (sortedRule == 0) { |
| | | sortedData = rightData.sort((a, b) => { |
| | | if (a.width === b.width) { |
| | | return a.height - b.height |
| | | } |
| | | return a.width - b.width |
| | | }) |
| | | } else if (sortedRule == 1) { |
| | | sortedData = rightData.sort((a, b) => { |
| | | if (a.height === b.height) { |
| | | return a.width - b.width |
| | | } |
| | | return a.height - b.height |
| | | }) |
| | | } |
| | | // 排序后更新表格数据 |
| | | $grid.loadData(sortedData) |
| | | return |
| | | } |
| | | |
| | | } |
| | |
| | | {{ t('processCard.sorting') }} |
| | | </el-button> |
| | | |
| | | <el-checkbox |
| | | :model-value="flashback === 0" |
| | | @change="onFlashbackChange" |
| | | > |
| | | {{ t('processCard.flashback') }} |
| | | </el-checkbox> |
| | | <!-- <el-checkbox--> |
| | | <!-- :model-value="flashback === 0"--> |
| | | <!-- @change="onFlashbackChange"--> |
| | | <!-- >--> |
| | | <!-- {{ t('processCard.flashback') }}--> |
| | | <!-- </el-checkbox>--> |
| | | |
| | | |
| | | </template> |
| | |
| | | import {computed, nextTick, onMounted, onUnmounted, reactive, ref, toRefs} from "vue"; |
| | | import {useRouter,useRoute} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {ElCheckbox, ElMessage} from "element-plus"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import domZIndex from 'dom-zindex' |
| | | import {indexOf} from "xe-utils"; |
| | |
| | | return new Error(t('reportingWorks.enterIntegerGreaterThanEqualTo')) |
| | | //完工+次破数量不能大于可完工数量 |
| | | }else if((row.completedQuantity*1+brokenNum*1)>row.quantity*1){ |
| | | return new Error((`完工+次破数量不能大于可完工数量`)) |
| | | return new Error(t('reportingWorks.pleaseNumber11')) |
| | | //本次完工数量不能大于完工数量 |
| | | }else if(row.quantity_card<row.completedQuantity){ |
| | | return new Error(t('reportingWorks.pleaseNumber10')) |
| | |
| | | |
| | | //当可操作数量为0,并且完工数量不等于可完工数量时 |
| | | if(row.minQuantity===0 && val!==totalQuantity ){ |
| | | return new Error(`本工序报工数:${okVal}+${val}=${okVal+val}\n |
| | | 下工序报工数:${nextQuantitySum}\n |
| | | 本工序修改数不能小于下工序报工数 |
| | | return new Error(`${t('reportingWorks.pleaseNumber12')} ${okVal}+${val}=${okVal+val}\n |
| | | ${t('reportingWorks.pleaseNumber13')} ${nextQuantitySum}\n |
| | | ${t('reportingWorks.pleaseNumber14')} |
| | | `) |
| | | } |
| | | if(titleUploadData.value.reportingWorkId!=null && (val>totalQuantity || val<(row.quantity-row.minQuantity) )){ |
| | |
| | | and g.technology_number = a.technology_number |
| | | </if> |
| | | where b.reporting_work_id = #{reportingWorkId} |
| | | GROUP BY c.order_number,c.technology_number) as result |
| | | GROUP BY c.order_number,c.technology_number |
| | | order BY c.order_number,c.technology_number) as result |
| | | </select> |
| | | <select id="selectReportingWorkMp" resultMap="reportingWorkMap"> |
| | | select rw.reporting_work_id, |