| | |
| | | toRefs, |
| | | getCurrentInstance, |
| | | nextTick, |
| | | computed, |
| | | } from "vue"; |
| | | import InspectionFormDia from "@/views/qualityManagement/finalInspection/components/inspectionFormDia.vue"; |
| | | import FormDia from "@/views/qualityManagement/finalInspection/components/formDia.vue"; |
| | |
| | | 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; |
| | | }, |
| | |
| | | const inspectionFormDia = ref(); |
| | | const { proxy } = getCurrentInstance(); |
| | | const userStore = useUserStore(); |
| | | const isAdminUser = computed(() => |
| | | ["admin", "普通2", "最高1"].some(r => (userStore.roles || []).includes(r)) |
| | | ); |
| | | const userList = ref([]); |
| | | const form = ref({ |
| | | checkName: "", |
| | |
| | | checkName: "", |
| | | checkTime: "", |
| | | testStandardId: "", |
| | | checkCompany: "", |
| | | checkCompany: "天津阳光彩印股份有限公司", |
| | | }); |
| | | const quickCheckRef = ref(null); |
| | | const testStandardOptions = ref([]); // 指标选择下拉框数据 |
| | |
| | | checkName: detailData.checkName || userStore.nickName || "", |
| | | checkTime: detailData.checkTime || dayjs().format("YYYY-MM-DD"), |
| | | testStandardId: detailData.testStandardId || "", |
| | | checkCompany: detailData.checkCompany || "", |
| | | checkCompany: detailData.checkCompany || "天津阳光彩印股份有限公司", |
| | | }; |
| | | // 如果有检验参数数据,回显到表格 |
| | | if ( |
| | |
| | | checkName: "", |
| | | checkTime: "", |
| | | testStandardId: "", |
| | | checkCompany: "", |
| | | checkCompany: "天津阳光彩印股份有限公司", |
| | | }; |
| | | quickCheckTableData.value = []; |
| | | testStandardOptions.value = []; |