| | |
| | | :value="user.userId"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <ProductionRecordForm ref="productionRecordFormRef" :list="processParamList"/> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | |
| | | <CopperPrintingForm |
| | | v-if="copperPrintingFormVisible" |
| | | v-model:isShow="copperPrintingFormVisible" |
| | | :isEdit="true" |
| | | :row="currentReportRowData" |
| | | @refreshData="getList"/> |
| | | <VoltageSortingForm |
| | | v-if="voltageSortingFormVisible" |
| | | v-model:isShow="voltageSortingFormVisible" |
| | | :isEdit="true" |
| | | :row="currentReportRowData" |
| | | @refreshData="getList"/> |
| | |
| | | import QRCode from "qrcode"; |
| | | import {getCurrentInstance, reactive, toRefs} from "vue"; |
| | | import FilesDia from "./components/filesDia.vue"; |
| | | import { |
| | | listPage as listProcessParamPage, |
| | | } from "@/api/productionManagement/productProcessParameter.js"; |
| | | |
| | | const {proxy} = getCurrentInstance(); |
| | | const {priority_type} = proxy.useDict("priority_type"); |
| | | |
| | | const CopperPrintingForm = defineAsyncComponent(() => import("./components/CopperPrintingForm.vue")); |
| | | const VoltageSortingForm = defineAsyncComponent(() => import("./components/VoltageSortingForm.vue")); |
| | | const ProductionRecordForm = defineAsyncComponent(() => import("./components/ProductionRecordForm.vue")); |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "优先级", |
| | |
| | | clickFun: row => { |
| | | showReportDialog(row); |
| | | }, |
| | | disabled: row => row.planQuantity <= 0, |
| | | disabled: row => !row.isCanReport || row.planQuantity <= 0, |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | const qrRowData = ref(null); |
| | | const editDialogVisible = ref(false); |
| | | const copperPrintingFormVisible = ref(false); |
| | | const voltageSortingFormVisible = ref(false); |
| | | const transferCardVisible = ref(false); |
| | | const transferCardData = ref([]); |
| | | const transferCardQrUrl = ref(""); |
| | |
| | | productProcessRouteItemId: "", |
| | | userId: "", |
| | | productMainId: null, |
| | | otherData: { |
| | | rows: [], |
| | | } |
| | | }); |
| | | const productionRecordFormRef = ref(); |
| | | |
| | | // 本次生产数量验证规则 |
| | | const validateQuantity = (rule, value, callback) => { |
| | |
| | | }); |
| | | }; |
| | | |
| | | const showReportDialog = row => { |
| | | const processParamPage = reactive({ |
| | | current: 1, |
| | | size: 9999, |
| | | total: 0, |
| | | }); |
| | | const getProcessParamList = async (row) => { |
| | | const params = { |
| | | processId: row.processId, |
| | | ...processParamPage, |
| | | }; |
| | | const res = await listProcessParamPage(params) |
| | | return res.data.records |
| | | }; |
| | | |
| | | const processParamList = ref([]) |
| | | const showReportDialog = async row => { |
| | | currentReportRowData.value = row; |
| | | if (row.processName === '印铜') { |
| | | if (row.processName === '印铜' || row.processName === '印银') { |
| | | copperPrintingFormVisible.value = true |
| | | return |
| | | } |
| | | if (row.processName === '电压分选') { |
| | | voltageSortingFormVisible.value = true |
| | | return; |
| | | } |
| | | processParamList.value = await getProcessParamList(row) |
| | | reportForm.planQuantity = row.planQuantity; |
| | | reportForm.quantity = row.quantity !== undefined && row.quantity !== null ? row.quantity : null; |
| | | reportForm.productProcessRouteItemId = row.productProcessRouteItemId; |
| | |
| | | workOrderFilesRef.value?.openDialog(row); |
| | | }; |
| | | |
| | | const handleReport = () => { |
| | | const handleReport = async () => { |
| | | const data = await productionRecordFormRef.value.submitData() |
| | | reportForm.otherData.rows = JSON.stringify(data || {}); |
| | | reportFormRef.value?.validate((valid) => { |
| | | if (!valid) { |
| | | return false; |