| | |
| | | // 不合格入库来源类型 |
| | | export function findAllUnQualifiedStockInRecordTypeOptions() { |
| | | return request({ |
| | | url: '/basic/enum/StockInUnQualifiedRecordTypeEnum', |
| | | url: '/basic/enum/StockInQualifiedRecordTypeEnum', |
| | | method: 'get' |
| | | }) |
| | | } |
| | |
| | | // 不合格出库来源类型 |
| | | export function findAllUnQualifiedStockOutRecordTypeOptions() { |
| | | return request({ |
| | | url: '/basic/enum/StockOutUnQualifiedRecordTypeEnum', |
| | | url: '/basic/enum/StockOutQualifiedRecordTypeEnum', |
| | | method: 'get' |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | // 查询检验详情 |
| | | export function qualityInspectDetail(id) { |
| | | return request({ |
| | | url: '/quality/qualityInspect/' + id, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | // 新增原材料检验 |
| | | export function qualityInspectAdd(query) { |
| | | return request({ |
| | |
| | | }) |
| | | } |
| | | |
| | | // 导出检验记录(新接口,支持选中导出和检验参数) |
| | | export function qualityInspectExportNew(data) { |
| | | return request({ |
| | | url: '/quality/qualityInspect/exportNew', |
| | | method: 'post', |
| | | data: data, |
| | | responseType: "blob", |
| | | }) |
| | | } |
| | | |
| | |
| | | clickFun: row => { |
| | | showReportDialog(row); |
| | | }, |
| | | // 用户当前id |
| | | disabled: row => row.completeQuantity >= row.planQuantity || |
| | | !isCurrentUserInUserIds(row) || row.hasUnreportedMachine |
| | | // // 用户当前id |
| | | // disabled: row => row.completeQuantity >= row.planQuantity || |
| | | // !isCurrentUserInUserIds(row) || row.hasUnreportedMachine |
| | | }, |
| | | { |
| | | name: "生产排产", |
| | |
| | | <FormDia ref="formDia" @close="handleQuery"></FormDia> |
| | | <files-dia ref="filesDia" @close="handleQuery"></files-dia> |
| | | <!-- 检验结果选择对话框 --> |
| | | <el-dialog v-model="quickCheckVisible" title="检验结果" width="30%" @close="closeQuickCheck"> |
| | | <el-dialog v-model="quickCheckVisible" title="检验" width="40%" @close="closeQuickCheck"> |
| | | <el-form :model="quickCheckForm" label-width="140px" label-position="top" ref="quickCheckRef"> |
| | | <el-form-item label="检测结果:" required> |
| | | <el-radio-group v-model="quickCheckForm.checkResult"> |
| | | <el-radio value="合格">合格</el-radio> |
| | | <el-radio value="不合格">不合格</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="检验员:"> |
| | | <el-select v-model="quickCheckForm.checkName" placeholder="请选择" clearable style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" :value="item.nickName"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="检测日期:"> |
| | | <el-date-picker |
| | | v-model="quickCheckForm.checkTime" |
| | | type="date" |
| | | placeholder="请选择日期" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | clearable |
| | | style="width: 100%" |
| | | /> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检测结果:" required> |
| | | <el-radio-group v-model="quickCheckForm.checkResult"> |
| | | <el-radio value="合格">合格</el-radio> |
| | | <el-radio value="不合格">不合格</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检验员:" required> |
| | | <el-select v-model="quickCheckForm.checkName" placeholder="请选择" clearable style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" :value="item.nickName"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检测日期:" required> |
| | | <el-date-picker |
| | | v-model="quickCheckForm.checkTime" |
| | | type="date" |
| | | placeholder="请选择日期" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | clearable |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="指标选择:"> |
| | | <el-select |
| | | v-model="quickCheckForm.testStandardId" |
| | | placeholder="请选择指标" |
| | | clearable |
| | | @change="handleTestStandardChange" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in testStandardOptions" |
| | | :key="item.id" |
| | | :label="item.standardName || item.standardNo" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检测单位:"> |
| | | <el-input v-model="quickCheckForm.checkCompany" placeholder="请输入" clearable style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- 检验值表格 --> |
| | | <el-form-item label="检验值:" v-if="quickCheckTableData.length > 0"> |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="quickCheckTableColumn" |
| | | :tableData="quickCheckTableData" |
| | | :tableLoading="quickCheckTableLoading" |
| | | height="200" |
| | | > |
| | | <template #slot="{ row }"> |
| | | <el-input v-model="row.testValue" clearable placeholder="请输入检验值"/> |
| | | </template> |
| | | </PIMTable> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | |
| | | import { |
| | | downloadQualityInspect, |
| | | qualityInspectDel, |
| | | qualityInspectDetail, |
| | | qualityInspectListPage, qualityInspectUpdate, |
| | | submitQualityInspect |
| | | submitQualityInspect, |
| | | qualityInspectExportNew |
| | | } from "@/api/qualityManagement/rawMaterialInspection.js"; |
| | | import {qualityInspectDetailByProductId, getQualityTestStandardParamByTestStandardId} from "@/api/qualityManagement/metricMaintenance.js"; |
| | | import FilesDia from "@/views/qualityManagement/finalInspection/components/filesDia.vue"; |
| | | import dayjs from "dayjs"; |
| | | import {userListNoPage} from "@/api/system/user.js"; |
| | |
| | | const quickCheckForm = ref({ |
| | | checkResult: "合格", |
| | | checkName: "", |
| | | checkTime: "" |
| | | checkTime: "", |
| | | testStandardId: "", |
| | | checkCompany: "" |
| | | }); |
| | | const quickCheckRef = ref(null); |
| | | const testStandardOptions = ref([]); // 指标选择下拉框数据 |
| | | const quickCheckTableColumn = ref([ |
| | | { |
| | | label: "指标", |
| | | prop: "parameterItem", |
| | | }, |
| | | { |
| | | label: "单位", |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "标准值", |
| | | prop: "standardValue", |
| | | }, |
| | | { |
| | | label: "内控值", |
| | | prop: "controlValue", |
| | | }, |
| | | { |
| | | label: "检验值", |
| | | prop: "testValue", |
| | | dataType: 'slot', |
| | | slot: 'slot', |
| | | }, |
| | | ]); |
| | | const quickCheckTableData = ref([]); |
| | | const quickCheckTableLoading = ref(false); |
| | | |
| | | const changeDaterange = (value) => { |
| | | searchForm.value.entryDateStart = undefined; |
| | |
| | | }; |
| | | // 导出 |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/quality/qualityInspect/export", {inspectType: 2}, "出厂检验.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | | }); |
| | | // 判断是否有选中数据 |
| | | const hasSelected = selectedRows.value.length > 0; |
| | | |
| | | const confirmMsg = hasSelected |
| | | ? "选中的内容将被导出,是否确认导出?" |
| | | : "将导出全部数据,是否确认导出?"; |
| | | |
| | | ElMessageBox.confirm(confirmMsg, "导出", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | // 构建导出参数 |
| | | const exportData = { |
| | | inspectType: 2, |
| | | productName: searchForm.value.productName || "", |
| | | entryDateStart: searchForm.value.entryDateStart || "", |
| | | entryDateEnd: searchForm.value.entryDateEnd || "", |
| | | }; |
| | | |
| | | // 如果有选中数据,添加ids |
| | | if (hasSelected) { |
| | | exportData.ids = selectedRows.value.map(item => item.id); |
| | | } |
| | | |
| | | // 调用新导出接口 |
| | | qualityInspectExportNew(exportData).then((blobData) => { |
| | | const blob = new Blob([blobData], { |
| | | type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', |
| | | }); |
| | | const downloadUrl = window.URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = downloadUrl; |
| | | link.download = '出厂检验.xlsx'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | window.URL.revokeObjectURL(downloadUrl); |
| | | }).catch((error) => { |
| | | proxy.$modal.msgError("导出失败"); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | | }); |
| | | }; |
| | | |
| | | // 提价 |
| | |
| | | |
| | | // 打开检验结果选择对话框 |
| | | const openQuickCheck = async (row) => { |
| | | currentRow.value = row; |
| | | // 先调用详情接口获取完整数据(包含指标和检验值) |
| | | let detailData = row; |
| | | try { |
| | | const detailRes = await qualityInspectDetail(row.id); |
| | | if (detailRes.code === 200 && detailRes.data) { |
| | | detailData = detailRes.data; |
| | | } |
| | | } catch (e) { |
| | | console.error("获取检验详情失败", e); |
| | | } |
| | | currentRow.value = detailData; |
| | | |
| | | // 加载用户列表,筛选 roleIds 包含 106 的用户 |
| | | try { |
| | | const userLists = await userListNoPage(); |
| | |
| | | console.error("加载检验员列表失败", e); |
| | | userList.value = []; |
| | | } |
| | | // 设置默认值(检验员默认为当前登录用户) |
| | | // 加载指标选项(根据产品ID) |
| | | if (detailData.productId) { |
| | | try { |
| | | const params = { |
| | | productId: detailData.productId, |
| | | inspectType: 2 |
| | | }; |
| | | const res = await qualityInspectDetailByProductId(params); |
| | | testStandardOptions.value = res.data || []; |
| | | } catch (e) { |
| | | console.error("加载指标选项失败", e); |
| | | testStandardOptions.value = []; |
| | | } |
| | | } else { |
| | | testStandardOptions.value = []; |
| | | } |
| | | // 设置默认值(优先使用详情数据,检验员默认为当前登录用户) |
| | | quickCheckForm.value = { |
| | | checkResult: "合格", |
| | | checkName: userStore.nickName || "", |
| | | checkTime: dayjs().format("YYYY-MM-DD") |
| | | checkResult: detailData.checkResult || "合格", |
| | | checkName: detailData.checkName || userStore.nickName || "", |
| | | checkTime: detailData.checkTime || dayjs().format("YYYY-MM-DD"), |
| | | testStandardId: detailData.testStandardId || "", |
| | | checkCompany: detailData.checkCompany || "" |
| | | }; |
| | | // 如果有检验参数数据,回显到表格 |
| | | if (detailData.qualityInspectParams && detailData.qualityInspectParams.length > 0) { |
| | | quickCheckTableData.value = detailData.qualityInspectParams; |
| | | } else { |
| | | quickCheckTableData.value = []; |
| | | } |
| | | quickCheckVisible.value = true; |
| | | }; |
| | | |
| | | // 指标选择变化处理 |
| | | const handleTestStandardChange = (testStandardId) => { |
| | | if (!testStandardId) { |
| | | quickCheckTableData.value = []; |
| | | return; |
| | | } |
| | | quickCheckTableLoading.value = true; |
| | | getQualityTestStandardParamByTestStandardId(testStandardId).then(res => { |
| | | quickCheckTableData.value = res.data || []; |
| | | }).catch(error => { |
| | | console.error('获取标准参数失败:', error); |
| | | quickCheckTableData.value = []; |
| | | }).finally(() => { |
| | | quickCheckTableLoading.value = false; |
| | | }); |
| | | }; |
| | | |
| | | // 关闭检验结果选择对话框 |
| | |
| | | quickCheckForm.value = { |
| | | checkResult: "合格", |
| | | checkName: "", |
| | | checkTime: "" |
| | | checkTime: "", |
| | | testStandardId: "", |
| | | checkCompany: "" |
| | | }; |
| | | quickCheckTableData.value = []; |
| | | testStandardOptions.value = []; |
| | | }; |
| | | |
| | | // 确认检验结果 |
| | |
| | | return; |
| | | } |
| | | |
| | | const checkNameToPass = quickCheckForm.value.checkName; |
| | | const checkResultToPass = quickCheckForm.value.checkResult; |
| | | const checkTimeToPass = quickCheckForm.value.checkTime; |
| | | const testStandardIdToPass = quickCheckForm.value.testStandardId; |
| | | const checkCompanyToPass = quickCheckForm.value.checkCompany; |
| | | const qualityInspectParamsToPass = [...quickCheckTableData.value]; |
| | | |
| | | if (quickCheckForm.value.checkResult === "合格") { |
| | | // 合格:直接提交 |
| | | const data = { |
| | | id: currentRow.value.id, |
| | | checkResult: "合格", |
| | | checkName: quickCheckForm.value.checkName, |
| | | checkTime: quickCheckForm.value.checkTime, |
| | | inspectType: 2 |
| | | checkName: checkNameToPass, |
| | | checkTime: checkTimeToPass, |
| | | testStandardId: testStandardIdToPass, |
| | | checkCompany: checkCompanyToPass, |
| | | inspectType: 2, |
| | | qualityInspectParams: qualityInspectParamsToPass |
| | | }; |
| | | qualityInspectUpdate(data).then(res => { |
| | | proxy.$modal.msgSuccess("检验成功"); |
| | |
| | | getList(); |
| | | }); |
| | | } else { |
| | | // 不合格:打开详细填写页面,传递检验员信息 |
| | | // 先保存检验员值,避免 closeQuickCheck 重置后丢失 |
| | | const checkNameToPass = quickCheckForm.value.checkName; |
| | | // 不合格:打开详细填写页面 |
| | | closeQuickCheck(); |
| | | nextTick(() => { |
| | | formDia.value?.openDialog("edit", currentRow.value, "不合格", checkNameToPass); |
| | | currentRow.value.checkTime = checkTimeToPass; |
| | | currentRow.value.checkCompany = checkCompanyToPass; |
| | | currentRow.value.testStandardId = testStandardIdToPass; |
| | | formDia.value?.openDialog("edit", currentRow.value, checkResultToPass, checkNameToPass, testStandardIdToPass, checkCompanyToPass, qualityInspectParamsToPass); |
| | | }); |
| | | } |
| | | }; |
| | |
| | | const modelOptions = ref([]); |
| | | |
| | | // 打开弹框 |
| | | const openDialog = async (type, row, defaultCheckResult = "", defaultCheckName = "") => { |
| | | const openDialog = async (type, row, defaultCheckResult = "", defaultCheckName = "", defaultTestStandardId = "", defaultCheckCompany = "", defaultQualityInspectParams = []) => { |
| | | operationType.value = type; |
| | | getOptions().then((res) => { |
| | | supplierList.value = res.data; |
| | |
| | | <FormDia ref="formDia" @close="handleQuery"></FormDia> |
| | | <files-dia ref="filesDia" @close="handleQuery"></files-dia> |
| | | <!-- 检验结果选择对话框 --> |
| | | <el-dialog v-model="quickCheckVisible" title="检验结果" width="30%" @close="closeQuickCheck"> |
| | | <el-dialog v-model="quickCheckVisible" title="检验" width="40%" @close="closeQuickCheck"> |
| | | <el-form :model="quickCheckForm" label-width="140px" label-position="top" ref="quickCheckRef"> |
| | | <el-form-item label="检测结果:" required> |
| | | <el-radio-group v-model="quickCheckForm.checkResult"> |
| | | <el-radio value="合格">合格</el-radio> |
| | | <el-radio value="不合格">不合格</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="检验员:"> |
| | | <el-select v-model="quickCheckForm.checkName" placeholder="请选择" clearable style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" :value="item.nickName"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="检测日期:"> |
| | | <el-date-picker |
| | | v-model="quickCheckForm.checkTime" |
| | | type="date" |
| | | placeholder="请选择日期" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | clearable |
| | | style="width: 100%" |
| | | /> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检测结果:" required> |
| | | <el-radio-group v-model="quickCheckForm.checkResult"> |
| | | <el-radio value="合格">合格</el-radio> |
| | | <el-radio value="不合格">不合格</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检验员:" required> |
| | | <el-select v-model="quickCheckForm.checkName" placeholder="请选择" clearable style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" :value="item.nickName"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检测日期:" required> |
| | | <el-date-picker |
| | | v-model="quickCheckForm.checkTime" |
| | | type="date" |
| | | placeholder="请选择日期" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | clearable |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="指标选择:"> |
| | | <el-select |
| | | v-model="quickCheckForm.testStandardId" |
| | | placeholder="请选择指标" |
| | | clearable |
| | | @change="handleTestStandardChange" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in testStandardOptions" |
| | | :key="item.id" |
| | | :label="item.standardName || item.standardNo" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检测单位:"> |
| | | <el-input v-model="quickCheckForm.checkCompany" placeholder="请输入" clearable style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- 检验值表格 --> |
| | | <el-form-item label="检验值:" v-if="quickCheckTableData.length > 0"> |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="quickCheckTableColumn" |
| | | :tableData="quickCheckTableData" |
| | | :tableLoading="quickCheckTableLoading" |
| | | height="200" |
| | | > |
| | | <template #slot="{ row }"> |
| | | <el-input v-model="row.testValue" clearable placeholder="请输入检验值"/> |
| | | </template> |
| | | </PIMTable> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | |
| | | import { |
| | | downloadQualityInspect, |
| | | qualityInspectDel, |
| | | qualityInspectDetail, |
| | | qualityInspectListPage, qualityInspectUpdate, |
| | | submitQualityInspect |
| | | submitQualityInspect, |
| | | qualityInspectExportNew |
| | | } from "@/api/qualityManagement/rawMaterialInspection.js"; |
| | | import {qualityInspectDetailByProductId, getQualityTestStandardParamByTestStandardId} from "@/api/qualityManagement/metricMaintenance.js"; |
| | | import FilesDia from "@/views/qualityManagement/processInspection/components/filesDia.vue"; |
| | | import dayjs from "dayjs"; |
| | | import {userListNoPage} from "@/api/system/user.js"; |
| | |
| | | const quickCheckForm = ref({ |
| | | checkResult: "合格", |
| | | checkName: "", |
| | | checkTime: "" |
| | | checkTime: "", |
| | | testStandardId: "", |
| | | checkCompany: "" |
| | | }); |
| | | const quickCheckRef = ref(null); |
| | | const testStandardOptions = ref([]); // 指标选择下拉框数据 |
| | | const quickCheckTableColumn = ref([ |
| | | { |
| | | label: "指标", |
| | | prop: "parameterItem", |
| | | }, |
| | | { |
| | | label: "单位", |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "标准值", |
| | | prop: "standardValue", |
| | | }, |
| | | { |
| | | label: "内控值", |
| | | prop: "controlValue", |
| | | }, |
| | | { |
| | | label: "检验值", |
| | | prop: "testValue", |
| | | dataType: 'slot', |
| | | slot: 'slot', |
| | | }, |
| | | ]); |
| | | const quickCheckTableData = ref([]); |
| | | const quickCheckTableLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | |
| | | }; |
| | | // 导出 |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/quality/qualityInspect/export", {inspectType: 1}, "过程检验.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | | }); |
| | | // 判断是否有选中数据 |
| | | const hasSelected = selectedRows.value.length > 0; |
| | | |
| | | const confirmMsg = hasSelected |
| | | ? "选中的内容将被导出,是否确认导出?" |
| | | : "将导出全部数据,是否确认导出?"; |
| | | |
| | | ElMessageBox.confirm(confirmMsg, "导出", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | // 构建导出参数 |
| | | const exportData = { |
| | | inspectType: 1, |
| | | process: searchForm.value.process || "", |
| | | entryDateStart: searchForm.value.entryDateStart || "", |
| | | entryDateEnd: searchForm.value.entryDateEnd || "", |
| | | }; |
| | | |
| | | // 如果有选中数据,添加ids |
| | | if (hasSelected) { |
| | | exportData.ids = selectedRows.value.map(item => item.id); |
| | | } |
| | | |
| | | // 调用新导出接口 |
| | | qualityInspectExportNew(exportData).then((blobData) => { |
| | | const blob = new Blob([blobData], { |
| | | type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', |
| | | }); |
| | | const downloadUrl = window.URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = downloadUrl; |
| | | link.download = '过程检验.xlsx'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | window.URL.revokeObjectURL(downloadUrl); |
| | | }).catch((error) => { |
| | | proxy.$modal.msgError("导出失败"); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | | }); |
| | | }; |
| | | |
| | | // 打开检验结果选择对话框 |
| | | const openQuickCheck = async (row) => { |
| | | currentRow.value = row; |
| | | // 先调用详情接口获取完整数据(包含指标和检验值) |
| | | let detailData = row; |
| | | try { |
| | | const detailRes = await qualityInspectDetail(row.id); |
| | | if (detailRes.code === 200 && detailRes.data) { |
| | | detailData = detailRes.data; |
| | | } |
| | | } catch (e) { |
| | | console.error("获取检验详情失败", e); |
| | | } |
| | | currentRow.value = detailData; |
| | | |
| | | // 加载用户列表,筛选 roleIds 包含 106 的用户 |
| | | try { |
| | | const userLists = await userListNoPage(); |
| | |
| | | console.error("加载检验员列表失败", e); |
| | | userList.value = []; |
| | | } |
| | | // 设置默认值(检验员默认为当前登录用户) |
| | | // 加载指标选项(根据产品ID) |
| | | if (detailData.productId) { |
| | | try { |
| | | const params = { |
| | | productId: detailData.productId, |
| | | inspectType: 1, |
| | | process: detailData.process || '' |
| | | }; |
| | | const res = await qualityInspectDetailByProductId(params); |
| | | testStandardOptions.value = res.data || []; |
| | | } catch (e) { |
| | | console.error("加载指标选项失败", e); |
| | | testStandardOptions.value = []; |
| | | } |
| | | } else { |
| | | testStandardOptions.value = []; |
| | | } |
| | | // 设置默认值(优先使用详情数据,检验员默认为当前登录用户) |
| | | quickCheckForm.value = { |
| | | checkResult: "合格", |
| | | checkName: userStore.nickName || "", |
| | | checkTime: dayjs().format("YYYY-MM-DD") |
| | | checkResult: detailData.checkResult || "合格", |
| | | checkName: detailData.checkName || userStore.nickName || "", |
| | | checkTime: detailData.checkTime || dayjs().format("YYYY-MM-DD"), |
| | | testStandardId: detailData.testStandardId || "", |
| | | checkCompany: detailData.checkCompany || "" |
| | | }; |
| | | // 如果有检验参数数据,回显到表格 |
| | | if (detailData.qualityInspectParams && detailData.qualityInspectParams.length > 0) { |
| | | quickCheckTableData.value = detailData.qualityInspectParams; |
| | | } else { |
| | | quickCheckTableData.value = []; |
| | | } |
| | | quickCheckVisible.value = true; |
| | | }; |
| | | |
| | | // 指标选择变化处理 |
| | | const handleTestStandardChange = (testStandardId) => { |
| | | if (!testStandardId) { |
| | | quickCheckTableData.value = []; |
| | | return; |
| | | } |
| | | quickCheckTableLoading.value = true; |
| | | getQualityTestStandardParamByTestStandardId(testStandardId).then(res => { |
| | | quickCheckTableData.value = res.data || []; |
| | | }).catch(error => { |
| | | console.error('获取标准参数失败:', error); |
| | | quickCheckTableData.value = []; |
| | | }).finally(() => { |
| | | quickCheckTableLoading.value = false; |
| | | }); |
| | | }; |
| | | |
| | | // 关闭检验结果选择对话框 |
| | |
| | | quickCheckForm.value = { |
| | | checkResult: "合格", |
| | | checkName: "", |
| | | checkTime: "" |
| | | checkTime: "", |
| | | testStandardId: "", |
| | | checkCompany: "" |
| | | }; |
| | | quickCheckTableData.value = []; |
| | | testStandardOptions.value = []; |
| | | }; |
| | | |
| | | // 确认检验结果 |
| | |
| | | return; |
| | | } |
| | | |
| | | const checkNameToPass = quickCheckForm.value.checkName; |
| | | const checkResultToPass = quickCheckForm.value.checkResult; |
| | | const checkTimeToPass = quickCheckForm.value.checkTime; |
| | | const testStandardIdToPass = quickCheckForm.value.testStandardId; |
| | | const checkCompanyToPass = quickCheckForm.value.checkCompany; |
| | | const qualityInspectParamsToPass = [...quickCheckTableData.value]; |
| | | |
| | | if (quickCheckForm.value.checkResult === "合格") { |
| | | // 合格:直接提交 |
| | | const data = { |
| | | id: currentRow.value.id, |
| | | checkResult: "合格", |
| | | checkName: quickCheckForm.value.checkName, |
| | | checkTime: quickCheckForm.value.checkTime, |
| | | inspectType: 1 |
| | | checkName: checkNameToPass, |
| | | checkTime: checkTimeToPass, |
| | | testStandardId: testStandardIdToPass, |
| | | checkCompany: checkCompanyToPass, |
| | | inspectType: 1, |
| | | qualityInspectParams: qualityInspectParamsToPass |
| | | }; |
| | | qualityInspectUpdate(data).then(res => { |
| | | proxy.$modal.msgSuccess("检验成功"); |
| | |
| | | getList(); |
| | | }); |
| | | } else { |
| | | // 不合格:打开详细填写页面,传递检验员信息 |
| | | // 先保存检验员值,避免 closeQuickCheck 重置后丢失 |
| | | const checkNameToPass = quickCheckForm.value.checkName; |
| | | // 不合格:打开详细填写页面 |
| | | closeQuickCheck(); |
| | | nextTick(() => { |
| | | formDia.value?.openDialog("edit", currentRow.value, "不合格", checkNameToPass); |
| | | currentRow.value.checkTime = checkTimeToPass; |
| | | currentRow.value.checkCompany = checkCompanyToPass; |
| | | currentRow.value.testStandardId = testStandardIdToPass; |
| | | formDia.value?.openDialog("edit", currentRow.value, checkResultToPass, checkNameToPass, testStandardIdToPass, checkCompanyToPass, qualityInspectParamsToPass); |
| | | }); |
| | | } |
| | | }; |
| | |
| | | }); |
| | | |
| | | // 打开弹框 |
| | | const openDialog = async (type, row, defaultCheckResult = "", defaultCheckName = "") => { |
| | | const openDialog = async (type, row, defaultCheckResult = "", defaultCheckName = "", defaultTestStandardId = "", defaultCheckCompany = "", defaultQualityInspectParams = []) => { |
| | | operationType.value = type; |
| | | getOptions().then((res) => { |
| | | supplierList.value = res.data; |
| | |
| | | productId: "", |
| | | productModelId: "", |
| | | model: "", |
| | | testStandardId: "", |
| | | testStandardId: defaultTestStandardId || "", |
| | | unit: "", |
| | | quantity: "", |
| | | checkCompany: "", |
| | | checkCompany: defaultCheckCompany || "", |
| | | checkResult: defaultCheckResult || "", |
| | | } |
| | | testStandardOptions.value = []; |
| | | tableData.value = []; |
| | | // 如果从检验弹窗传入了参数数据,直接使用;否则清空 |
| | | if (defaultQualityInspectParams && defaultQualityInspectParams.length > 0) { |
| | | tableData.value = defaultQualityInspectParams; |
| | | } else { |
| | | tableData.value = []; |
| | | } |
| | | // 先确保产品树已加载,否则编辑时产品/规格型号无法反显 |
| | | await getProductOptions(); |
| | | if (operationType.value === 'edit') { |
| | |
| | | form.value.checkResult = defaultCheckResult; |
| | | } |
| | | // 如果传入了默认检验员,覆盖row中的值(优先使用传入的检验员) |
| | | console.log('formDia checkName debug:', { defaultCheckName, rowCheckName: row.checkName }); |
| | | form.value.checkName = defaultCheckName || row.checkName || ""; |
| | | // 如果传入了默认指标选择,覆盖row中的值 |
| | | if (defaultTestStandardId) { |
| | | form.value.testStandardId = defaultTestStandardId; |
| | | } |
| | | // 如果传入了默认检测单位,覆盖row中的值 |
| | | if (defaultCheckCompany) { |
| | | form.value.checkCompany = defaultCheckCompany; |
| | | } |
| | | currentProductId.value = row.productId || 0 |
| | | // 关键:编辑时加载规格型号下拉选项,才能反显 productModelId |
| | | if (currentProductId.value) { |
| | |
| | | modelOptions.value = []; |
| | | } |
| | | } |
| | | // 编辑模式下,先加载指标选项,然后加载参数列表 |
| | | // 编辑模式下,先加载指标选项 |
| | | if (currentProductId.value) { |
| | | // 先加载指标选项 |
| | | let params = { |
| | | productId: currentProductId.value, |
| | | inspectType: 0 |
| | | } |
| | | qualityInspectDetailByProductId(params).then(res => { |
| | | testStandardOptions.value = res.data || []; |
| | | // 使用 nextTick 和 setTimeout 确保选项已经渲染到 DOM |
| | | nextTick(() => { |
| | | setTimeout(() => { |
| | | // 如果编辑数据中有 testStandardId,则设置并加载对应的参数 |
| | | if (savedTestStandardId) { |
| | | // 确保类型匹配(item.id 可能是数字或字符串) |
| | | const matchedOption = testStandardOptions.value.find(item => |
| | | // 如果从检验弹窗传入了参数数据,直接使用;否则加载原参数数据 |
| | | if (defaultQualityInspectParams && defaultQualityInspectParams.length > 0) { |
| | | // 已经在上面设置了 tableData,这里只需要设置 testStandardId |
| | | if (defaultTestStandardId) { |
| | | form.value.testStandardId = defaultTestStandardId; |
| | | } |
| | | } else if (savedTestStandardId) { |
| | | // 没有传入参数数据,使用原有逻辑 |
| | | const matchedOption = testStandardOptions.value.find(item => |
| | | item.id == savedTestStandardId || String(item.id) === String(savedTestStandardId) |
| | | ); |
| | | if (matchedOption) { |
| | | // 确保使用匹配项的 id(保持类型一致) |
| | | form.value.testStandardId = matchedOption.id; |
| | | // 编辑保留原检验值,直接拉取原参数数据 |
| | | getQualityInspectParamList(row.id); |
| | | } else { |
| | | // 如果找不到匹配项,尝试直接使用原值 |
| | | console.warn('未找到匹配的指标选项,testStandardId:', savedTestStandardId, '可用选项:', testStandardOptions.value); |
| | | form.value.testStandardId = savedTestStandardId; |
| | | getQualityInspectParamList(row.id); |
| | | } |
| | | } else { |
| | | // 否则使用旧的逻辑 |
| | | getQualityInspectParamList(row.id); |
| | | } |
| | | }, 100); |
| | |
| | | <FormDia ref="formDia" @close="handleQuery"></FormDia> |
| | | <files-dia ref="filesDia" @close="handleQuery"></files-dia> |
| | | <!-- 检验结果选择对话框 --> |
| | | <el-dialog v-model="quickCheckVisible" title="检验结果" width="30%" @close="closeQuickCheck"> |
| | | <el-dialog v-model="quickCheckVisible" title="检验" width="40%" @close="closeQuickCheck"> |
| | | <el-form :model="quickCheckForm" label-width="140px" label-position="top" ref="quickCheckRef"> |
| | | <el-form-item label="检测结果:" required> |
| | | <el-radio-group v-model="quickCheckForm.checkResult"> |
| | | <el-radio value="合格">合格</el-radio> |
| | | <el-radio value="不合格">不合格</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="检验员:"> |
| | | <el-select v-model="quickCheckForm.checkName" placeholder="请选择" clearable style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" :value="item.nickName"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="检测日期:"> |
| | | <el-date-picker |
| | | v-model="quickCheckForm.checkTime" |
| | | type="date" |
| | | placeholder="请选择日期" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | clearable |
| | | style="width: 100%" |
| | | /> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检测结果:" required> |
| | | <el-radio-group v-model="quickCheckForm.checkResult"> |
| | | <el-radio value="合格">合格</el-radio> |
| | | <el-radio value="不合格">不合格</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检验员:" required> |
| | | <el-select v-model="quickCheckForm.checkName" placeholder="请选择" clearable style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" :value="item.nickName"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检测日期:" required> |
| | | <el-date-picker |
| | | v-model="quickCheckForm.checkTime" |
| | | type="date" |
| | | placeholder="请选择日期" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | clearable |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="指标选择:"> |
| | | <el-select |
| | | v-model="quickCheckForm.testStandardId" |
| | | placeholder="请选择指标" |
| | | clearable |
| | | @change="handleTestStandardChange" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in testStandardOptions" |
| | | :key="item.id" |
| | | :label="item.standardName || item.standardNo" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检测单位:"> |
| | | <el-input v-model="quickCheckForm.checkCompany" placeholder="请输入" clearable style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- 检验值表格 --> |
| | | <el-form-item label="检验值:" v-if="quickCheckTableData.length > 0"> |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="quickCheckTableColumn" |
| | | :tableData="quickCheckTableData" |
| | | :tableLoading="quickCheckTableLoading" |
| | | height="200" |
| | | > |
| | | <template #slot="{ row }"> |
| | | <el-input v-model="row.testValue" clearable placeholder="请输入检验值"/> |
| | | </template> |
| | | </PIMTable> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | |
| | | import { |
| | | downloadQualityInspect, |
| | | qualityInspectDel, |
| | | qualityInspectDetail, |
| | | qualityInspectListPage, qualityInspectUpdate, |
| | | submitQualityInspect |
| | | submitQualityInspect, |
| | | qualityInspectExportNew |
| | | } from "@/api/qualityManagement/rawMaterialInspection.js"; |
| | | import {qualityInspectDetailByProductId, getQualityTestStandardParamByTestStandardId} from "@/api/qualityManagement/metricMaintenance.js"; |
| | | import FilesDia from "@/views/qualityManagement/rawMaterialInspection/components/filesDia.vue"; |
| | | import dayjs from "dayjs"; |
| | | import {userListNoPage} from "@/api/system/user.js"; |
| | |
| | | const quickCheckForm = ref({ |
| | | checkResult: "合格", |
| | | checkName: "", |
| | | checkTime: "" |
| | | checkTime: "", |
| | | testStandardId: "", |
| | | checkCompany: "" |
| | | }); |
| | | const quickCheckRef = ref(null); |
| | | const testStandardOptions = ref([]); // 指标选择下拉框数据 |
| | | const quickCheckTableColumn = ref([ |
| | | { |
| | | label: "指标", |
| | | prop: "parameterItem", |
| | | }, |
| | | { |
| | | label: "单位", |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "标准值", |
| | | prop: "standardValue", |
| | | }, |
| | | { |
| | | label: "内控值", |
| | | prop: "controlValue", |
| | | }, |
| | | { |
| | | label: "检验值", |
| | | prop: "testValue", |
| | | dataType: 'slot', |
| | | slot: 'slot', |
| | | }, |
| | | ]); |
| | | const quickCheckTableData = ref([]); |
| | | const quickCheckTableLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | |
| | | }; |
| | | // 导出 |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", { |
| | | // 判断是否有选中数据 |
| | | const hasSelected = selectedRows.value.length > 0; |
| | | |
| | | const confirmMsg = hasSelected |
| | | ? "选中的内容将被导出,是否确认导出?" |
| | | : "将导出全部数据,是否确认导出?"; |
| | | |
| | | ElMessageBox.confirm(confirmMsg, "导出", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/quality/qualityInspect/export", {inspectType: 0}, "原材料检验.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | | .then(() => { |
| | | // 构建导出参数 |
| | | const exportData = { |
| | | inspectType: 0, |
| | | supplier: searchForm.value.supplier || "", |
| | | entryDateStart: searchForm.value.entryDateStart || "", |
| | | entryDateEnd: searchForm.value.entryDateEnd || "", |
| | | }; |
| | | |
| | | // 如果有选中数据,添加ids |
| | | if (hasSelected) { |
| | | exportData.ids = selectedRows.value.map(item => item.id); |
| | | } |
| | | |
| | | // 调用新导出接口 |
| | | qualityInspectExportNew(exportData).then((blobData) => { |
| | | const blob = new Blob([blobData], { |
| | | type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', |
| | | }); |
| | | const downloadUrl = window.URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = downloadUrl; |
| | | link.download = '原材料检验.xlsx'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | window.URL.revokeObjectURL(downloadUrl); |
| | | }).catch((error) => { |
| | | proxy.$modal.msgError("导出失败"); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | | }); |
| | | }; |
| | | |
| | | // 提价 |
| | |
| | | |
| | | // 打开检验结果选择对话框 |
| | | const openQuickCheck = async (row) => { |
| | | currentRow.value = row; |
| | | // 先调用详情接口获取完整数据(包含指标和检验值) |
| | | let detailData = row; |
| | | try { |
| | | const detailRes = await qualityInspectDetail(row.id); |
| | | if (detailRes.code === 200 && detailRes.data) { |
| | | detailData = detailRes.data; |
| | | } |
| | | } catch (e) { |
| | | console.error("获取检验详情失败", e); |
| | | } |
| | | currentRow.value = detailData; |
| | | |
| | | // 加载用户列表,筛选 roleIds 包含 106 的用户 |
| | | try { |
| | | const userLists = await userListNoPage(); |
| | |
| | | console.error("加载检验员列表失败", e); |
| | | userList.value = []; |
| | | } |
| | | // 设置默认值(检验员默认为当前登录用户) |
| | | // 加载指标选项(根据产品ID) |
| | | if (detailData.productId) { |
| | | try { |
| | | const params = { |
| | | productId: detailData.productId, |
| | | inspectType: 0 |
| | | }; |
| | | const res = await qualityInspectDetailByProductId(params); |
| | | testStandardOptions.value = res.data || []; |
| | | } catch (e) { |
| | | console.error("加载指标选项失败", e); |
| | | testStandardOptions.value = []; |
| | | } |
| | | } else { |
| | | testStandardOptions.value = []; |
| | | } |
| | | // 设置默认值(优先使用详情数据,检验员默认为当前登录用户) |
| | | quickCheckForm.value = { |
| | | checkResult: "合格", |
| | | checkName: userStore.nickName || "", |
| | | checkTime: dayjs().format("YYYY-MM-DD") |
| | | checkResult: detailData.checkResult || "合格", |
| | | checkName: detailData.checkName || userStore.nickName || "", |
| | | checkTime: detailData.checkTime || dayjs().format("YYYY-MM-DD"), |
| | | testStandardId: detailData.testStandardId || "", |
| | | checkCompany: detailData.checkCompany || "" |
| | | }; |
| | | // 如果有检验参数数据,回显到表格 |
| | | if (detailData.qualityInspectParams && detailData.qualityInspectParams.length > 0) { |
| | | quickCheckTableData.value = detailData.qualityInspectParams; |
| | | } else { |
| | | quickCheckTableData.value = []; |
| | | } |
| | | quickCheckVisible.value = true; |
| | | }; |
| | | |
| | | // 指标选择变化处理 |
| | | const handleTestStandardChange = (testStandardId) => { |
| | | if (!testStandardId) { |
| | | quickCheckTableData.value = []; |
| | | return; |
| | | } |
| | | quickCheckTableLoading.value = true; |
| | | getQualityTestStandardParamByTestStandardId(testStandardId).then(res => { |
| | | quickCheckTableData.value = res.data || []; |
| | | }).catch(error => { |
| | | console.error('获取标准参数失败:', error); |
| | | quickCheckTableData.value = []; |
| | | }).finally(() => { |
| | | quickCheckTableLoading.value = false; |
| | | }); |
| | | }; |
| | | |
| | | // 关闭检验结果选择对话框 |
| | |
| | | quickCheckForm.value = { |
| | | checkResult: "合格", |
| | | checkName: "", |
| | | checkTime: "" |
| | | checkTime: "", |
| | | testStandardId: "", |
| | | checkCompany: "" |
| | | }; |
| | | quickCheckTableData.value = []; |
| | | testStandardOptions.value = []; |
| | | }; |
| | | |
| | | // 确认检验结果 |
| | |
| | | return; |
| | | } |
| | | |
| | | const checkNameToPass = quickCheckForm.value.checkName; |
| | | const checkResultToPass = quickCheckForm.value.checkResult; |
| | | const checkTimeToPass = quickCheckForm.value.checkTime; |
| | | const testStandardIdToPass = quickCheckForm.value.testStandardId; |
| | | const checkCompanyToPass = quickCheckForm.value.checkCompany; |
| | | const qualityInspectParamsToPass = [...quickCheckTableData.value]; |
| | | |
| | | if (quickCheckForm.value.checkResult === "合格") { |
| | | // 合格:直接提交 |
| | | const data = { |
| | | id: currentRow.value.id, |
| | | checkResult: "合格", |
| | | checkName: quickCheckForm.value.checkName, |
| | | checkTime: quickCheckForm.value.checkTime, |
| | | inspectType: 0 |
| | | checkName: checkNameToPass, |
| | | checkTime: checkTimeToPass, |
| | | testStandardId: testStandardIdToPass, |
| | | checkCompany: checkCompanyToPass, |
| | | inspectType: 0, |
| | | qualityInspectParams: qualityInspectParamsToPass |
| | | }; |
| | | qualityInspectUpdate(data).then(res => { |
| | | proxy.$modal.msgSuccess("检验成功"); |
| | |
| | | getList(); |
| | | }); |
| | | } else { |
| | | // 不合格:打开详细填写页面,传递检验员信息 |
| | | // 先保存检验员值,避免 closeQuickCheck 重置后丢失 |
| | | const checkNameToPass = quickCheckForm.value.checkName; |
| | | // 不合格:打开详细填写页面 |
| | | closeQuickCheck(); |
| | | nextTick(() => { |
| | | formDia.value?.openDialog("edit", currentRow.value, "不合格", checkNameToPass); |
| | | currentRow.value.checkTime = checkTimeToPass; |
| | | currentRow.value.checkCompany = checkCompanyToPass; |
| | | currentRow.value.testStandardId = testStandardIdToPass; |
| | | formDia.value?.openDialog("edit", currentRow.value, checkResultToPass, checkNameToPass, testStandardIdToPass, checkCompanyToPass, qualityInspectParamsToPass); |
| | | }); |
| | | } |
| | | }; |