| | |
| | | import PrintCustomLabel from '@/views/pp/processCard/PrintCustomLabel.vue' |
| | | import footSum from "@/hook/footSum" |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global"; |
| | | import SortDetail from "@/components/pp/SelectSortDetailProcessCard.vue"; |
| | | |
| | | const company = companyInfo() |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | request.post(`/processCard/printFlowCardDetails/${row.process_id}/${row.technology_number}`,filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | case 'edit' : { |
| | | editRow.value.processId = row.process_id |
| | | editRow.value.technologyNumber = row.technology_number |
| | | printVisible.value = true |
| | | |
| | | produceDetailList.value = (res.data.data) |
| | | printVisible.value=true |
| | | |
| | | } else { |
| | | |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }) |
| | | // router.push({path: '/sort-detail', query: {processId: row.process_id,technologyNumber:row.technology_number}}) |
| | | break |
| | | } |
| | | |
| | |
| | | date1: '', |
| | | }) |
| | | |
| | | //排序 |
| | | let editRow = ref({ |
| | | processId:null, |
| | | technologyNumber:null |
| | | }) |
| | | |
| | | //打印 |
| | | let printRow = ref({ |
| | | list:null, |
| | | printMergeVal:null |
| | | }) |
| | | |
| | | //室内室外面 |
| | | const stateValue = ref('') |
| | | const stateOptions = [ |
| | |
| | | }, |
| | | ] |
| | | |
| | | //室内室外面 |
| | | //标签类型 |
| | | let filteredOptions=[] |
| | | const lableType = ref('1') |
| | | const lableTypeOptions = [ |
| | | { |
| | | value: '1', |
| | | label: t('processCard.finishedProductLabel'), |
| | | }, |
| | | /* { |
| | | value: '2', |
| | | label: t('processCard.halfProductLabel'), |
| | | },*/ |
| | | { |
| | | 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 printType = ref() |
| | |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | hideButton() |
| | | }) |
| | | |
| | | //点击查询 |
| | |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | hideButton() |
| | | } |
| | | |
| | | |
| | |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | router.push({path: '/main/Replenish/PrintRepairProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMerge.value}}) |
| | | |
| | | printRow.value.list = JSON.stringify(selectRecords) |
| | | printRow.value.printMergeVal=printMerge.value |
| | | // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}}) |
| | | dialogTableVisible.value=true |
| | | break |
| | | } |
| | | |
| | |
| | | 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('/main/processCard/SplittingDetails?orderId=${orderId}') |
| | | router.push({ |
| | | path: '/main/processCard/PrintFlowCard', |
| | | query: {orderId: orderId,random: Math.random()} |
| | |
| | | xGridDetail.value.reloadData(detail.value) |
| | | } |
| | | |
| | | 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; // 不隐藏任何按钮 |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 监听打印完成事件 |
| | | 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> |
| | | |
| | |
| | | |
| | | <el-select v-model="lableType" class="m-2" :placeholder="lableTypeOptions[0].label" style="width: 140px"> |
| | | <el-option |
| | | v-for="item in lableTypeOptions" |
| | | v-for="item in filteredOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | |
| | | |
| | | </vxe-grid> |
| | | <el-dialog |
| | | id="sizePrintCalrd" |
| | | v-model="dialogTableVisible" |
| | | destroy-on-close |
| | | :title="$t('processCard.print')" |
| | | style="width: 80%;height:75% "> |
| | | <PrintProcess :printList="selectRecords" |
| | | style="width: 100%;height: 100%" /> |
| | | destroy-on-close |
| | | style="width: 75%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button v-print="printContent" @click="printNumber" :icon="Printer" circle /> |
| | | </template> |
| | | <print-process id="child" :printList="printRow.list" :printMerge="printRow.printMergeVal" |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | @opened="openedTable" |
| | | id="sizeCheck" |
| | | v-model="printVisible" |
| | | :title="$t('processCard.processCardDetails')" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | destroy-on-close |
| | | style="width: 80%;height:75% "> |
| | | <vxe-grid |
| | | ref="xGridDetail" |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | height="600px" |
| | | size="small" |
| | | v-bind="detailGridOptions" |
| | | v-on="gridEvents"> |
| | | |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in detailGridOptions.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> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="text" |
| | | v-model="option.data" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | <sort-detail id="child" :processId="editRow.processId" :technologyNumber="editRow.technologyNumber" /> |
| | | </el-dialog> |
| | | |
| | | |