| | |
| | | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick} from "vue"; |
| | | import {onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick, computed} from "vue"; |
| | | import InspectionFormDia from "@/views/qualityManagement/rawMaterialInspection/components/inspectionFormDia.vue"; |
| | | import FormDia from "@/views/qualityManagement/rawMaterialInspection/components/formDia.vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | |
| | | if (row.inspectState == 1) return true; |
| | | // 如果检验员有值,只有当前登录用户能编辑 |
| | | if (row.checkName) { |
| | | return row.checkName !== userStore.nickName; |
| | | return row.checkName !== userStore.nickName && !isAdminUser.value; |
| | | } |
| | | return false; |
| | | } |
| | |
| | | if (row.inspectState == 1) return true; |
| | | // 如果检验员有值,只有当前登录用户能提交 |
| | | if (row.checkName) { |
| | | return row.checkName !== userStore.nickName; |
| | | return row.checkName !== userStore.nickName && !isAdminUser.value; |
| | | } |
| | | return false; |
| | | } |
| | |
| | | checkName: "", |
| | | checkTime: "", |
| | | testStandardId: "", |
| | | checkCompany: "" |
| | | checkCompany: "天津阳光彩印股份有限公司" |
| | | }); |
| | | const quickCheckRef = ref(null); |
| | | const testStandardOptions = ref([]); // 指标选择下拉框数据 |
| | |
| | | const inspectionFormDia = ref() |
| | | const {proxy} = getCurrentInstance() |
| | | const userStore = useUserStore() |
| | | const isAdminUser = computed(() => |
| | | ["admin", "普通2", "最高1"].some(r => (userStore.roles || []).includes(r)) |
| | | ) |
| | | const changeDaterange = (value) => { |
| | | searchForm.value.entryDateStart = undefined; |
| | | searchForm.value.entryDateEnd = undefined; |
| | |
| | | checkName: detailData.checkName || userStore.nickName || "", |
| | | checkTime: detailData.checkTime || dayjs().format("YYYY-MM-DD"), |
| | | testStandardId: detailData.testStandardId || "", |
| | | checkCompany: detailData.checkCompany || "" |
| | | checkCompany: detailData.checkCompany || "天津阳光彩印股份有限公司" |
| | | }; |
| | | // 如果有检验参数数据,回显到表格 |
| | | if (detailData.qualityInspectParams && detailData.qualityInspectParams.length > 0) { |
| | |
| | | checkName: "", |
| | | checkTime: "", |
| | | testStandardId: "", |
| | | checkCompany: "" |
| | | checkCompany: "天津阳光彩印股份有限公司" |
| | | }; |
| | | quickCheckTableData.value = []; |
| | | testStandardOptions.value = []; |