| | |
| | | }, |
| | | ] |
| | | let hidePrintLabels = company.printLabel.hideButton; |
| | | let btnType = company.printBtn; |
| | | |
| | | if (hidePrintLabels == 'true') { |
| | | filteredOptions = lableTypeOptions.filter((option, index) => index !== 2); |
| | |
| | | request.post(`/processCard/selectPrintDetails/${inquiryMode}/${type}`, data.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | let newDataCollection = []; |
| | | for (let i = 0; i < res.data.data.length; i++) { |
| | | res.data.data[i].detail.forEach((item) => { |
| | |
| | | filterMethod: filterChanged, width: 100 |
| | | }, |
| | | { |
| | | field: 'width', |
| | | title: t('order.width'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged, width: 100 |
| | | }, |
| | | { |
| | | field: 'height', |
| | | title: t('order.height'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged, width: 100 |
| | | }, |
| | | { |
| | | field: 'glassNumber', |
| | | title: t('reportingWorks.glassNumber'), |
| | | filters: [{data: ''}], |
| | |
| | | let lableTitle = lableType.text |
| | | if ($grid) { |
| | | switch (code) { |
| | | //打印流程卡 |
| | | case 'print': { |
| | | if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) { |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | |
| | | dialogTableVisible.value = true |
| | | break |
| | | } |
| | | |
| | | //标签打印 常州 |
| | | case 'printLabel': { |
| | | if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) { |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | |
| | | |
| | | break |
| | | } |
| | | //标签打印2 常州 |
| | | case 'printLabel2': { |
| | | if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) { |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | |
| | | }) |
| | | break |
| | | } |
| | | //自定义成品标签打印 |
| | | case 'customLabel': { |
| | | if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) { |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | //成品标签1 |
| | | if (lableTypes == 1) { |
| | | labelRow.value.list = JSON.stringify(selectRecords) |
| | | labelRow.value.faceOrientation = faceOrientation |
| | |
| | | lastList.value = [] |
| | | if (company.label === 1) { |
| | | dialogTableVisibleLabel.value = true |
| | | } else if (company.label === 2) { |
| | | } |
| | | //常州项目 |
| | | else if (company.label === 2) { |
| | | router.push({ |
| | | path: '/main/processCard/PrintCustomLabelCZ', |
| | | query: { |
| | |
| | | }) |
| | | } |
| | | |
| | | } else if (lableTypes == 2) { |
| | | } |
| | | //成品标签2 |
| | | else if (lableTypes == 2) { |
| | | labelRow.value.list = JSON.stringify(selectRecords) |
| | | labelRow.value.faceOrientation = faceOrientation |
| | | labelRow.value.type = type |
| | |
| | | lastList.value = [] |
| | | if (company.label === 1) { |
| | | dialogTableVisibleCustomLabel.value = true |
| | | } else if (company.label === 2) { |
| | | } |
| | | //常州项目 |
| | | else if (company.label === 2) { |
| | | router.push({ |
| | | path: '/main/processCard/PrintCustomLabelSemiCZ', |
| | | query: { |
| | |
| | | } |
| | | }) |
| | | } |
| | | } else if (lableTypes == 3) { |
| | | } |
| | | //成品标签3 |
| | | else if (lableTypes == 3) { |
| | | router.push({ |
| | | path: '/main/processCard/PrintLabel1', |
| | | query: { |
| | |
| | | } |
| | | |
| | | const hideButton = () => { |
| | | // 根据条件值 hidePrintLabels 过滤按钮数组 |
| | | gridOptions.toolbarConfig.buttons = gridOptions.toolbarConfig.buttons.filter(button => { |
| | | // 这里根据 hidePrintLabels 的值决定是否隐藏 printLabel 和 printLabel2 |
| | | // 如果 type 不为空时,隐藏 print 按钮 |
| | | if (btnType == 1 && button.code === 'print') { |
| | | return false; // 隐藏 print 按钮 |
| | | } |
| | | |
| | | // 根据 hidePrintLabels 的值判断是否隐藏 printLabel、printLabel2 和 customLabel |
| | | if (hidePrintLabels == 'true') { |
| | | return button.code !== 'printLabel' && button.code !== 'printLabel2' && button.code !== 'customLabel'; |
| | | } else { |
| | | return true && button.code !== 'printLike' && button.code !== 'printLabel3' && button.code !== 'printTest'; // 显示该按钮 |
| | | // 如果 hidePrintLabels 不是 'true',则隐藏 printLike、printLabel3 和 printTest |
| | | return button.code !== 'printLike' && button.code !== 'printLabel3' && button.code !== 'printTest'; |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 默认返回 true,表示保留按钮 |
| | | return true; |
| | | }); |
| | | }; |
| | | |
| | | |
| | | // 监听打印完成事件 |
| | | |
| | | // 监听打印次数事件 |
| | | const printNumber = () => { |
| | | |
| | | selectRecordsData.value.printList = selectRecords |
| | | let printState = 0 |
| | | request.post(`/processCard/updatePrintState/${printState}`, selectRecordsData.value).then((res) => { |
| | | request.post(`/processCard/updatePrintNumber`, selectRecordsData.value).then((res) => { |
| | | if (res.code == 200 && res.data === true) { |
| | | } else { |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | destroy-on-close |
| | | style="width: 80%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button v-print="printContentLabel" :icon="Printer" circle/> |
| | | <el-button v-print="printContentLabel" :icon="Printer" circle @click="printNumber"/> |
| | | </template> |
| | | <print-custom-label id="childLabel" |
| | | :faceOrientation="labelRow.faceOrientation" |