| | |
| | | import { productionProductMainListPage, productAudit } from "@/api/productionManagement/productionProductMain.js"; |
| | | import { userListNoPageByTenantId } from "@/api/system/user.js"; |
| | | import InputModal from "@/views/productionManagement/productionReporting/Input.vue"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | |
| | | const userStore = useUserStore(); |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "工序", |
| | | prop: "process", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "报工人员", |
| | | prop: "nickName", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "工序", |
| | | prop: "process", |
| | | { |
| | | label: "审核人", |
| | | prop: "auditUserName", |
| | | width: 120, |
| | | }, |
| | | { |
| | |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "审核人", |
| | | prop: "sureAuditUserName", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "备注信息", |
| | | prop: "auditOpinion", |
| | | minWidth: 120, |
| | |
| | | }, |
| | | { |
| | | name:"审核", |
| | | color: "#E6A23C", |
| | | clickFun: row => { |
| | | handleAudit(row); |
| | | }, |
| | | disabled: row => Number(row?.auditStatus) !== 0, // 已审核时禁用审核按钮 |
| | | disabled: row => Number(row?.auditStatus) !== 0 || row.auditUserId !== userStore.id, // 已审核或不是指定审核人时禁用 |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | |
| | | // 审核 |
| | | const handleAudit = (row) => { |
| | | if (Number(row?.auditStatus) === 1) { |
| | | if (Number(row?.auditStatus) !== 0) { |
| | | ElMessage.warning("该工单已审核"); |
| | | return; |
| | | } |
| | | if (row.auditUserId !== userStore.id) { |
| | | ElMessage.warning("您不是该工单的指定审核人"); |
| | | return; |
| | | } |
| | | // 重置表单,默认选择通过 |
| | | form.value = { |
| | | auditResult: "1", |