| | |
| | | <!-- 审核表单 --> |
| | | <div style=" padding: 15px; border-radius: 4px;"> |
| | | <el-form ref="auditFormRef" :model="form" :rules="auditFormRules" label-width="100px"> |
| | | <el-form-item label="最终审核人" prop="sureAuditUserName"> |
| | | <el-input |
| | | v-model="form.sureAuditUserName" |
| | | :rows="4" |
| | | disabled |
| | | show-word-limit |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="审核结果" prop="auditResult"> |
| | | <el-radio-group v-model="form.auditResult" @change="handleAuditResultChange" size="large"> |
| | | <el-radio label=1 >通过</el-radio> |
| | |
| | | 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, |
| | | }, |
| | | { |
| | |
| | | const typeMap = { 0: "info", 1: "success", 2: "danger" }; |
| | | return typeMap[val] ?? ""; |
| | | }, |
| | | }, |
| | | { |
| | | label: "最终审核人", |
| | | prop: "sureAuditUserName", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "工单编号", |
| | |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "审核人", |
| | | prop: "auditUserName", |
| | | 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 && (Number(row?.auditUserId) === -1 || Number(row?.auditUserId) === Number(userStore.id))) |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | |
| | | // 审核 |
| | | const handleAudit = (row) => { |
| | | if (Number(row?.auditStatus) === 1) { |
| | | ElMessage.warning("该工单已审核"); |
| | | return; |
| | | } |
| | | // 重置表单,默认选择通过 |
| | | form.value = { |
| | | sureAuditUserId: userStore.id, |
| | | sureAuditUserName: userStore.nickName, |
| | | auditResult: "1", |
| | | remarks: "", |
| | | }; |
| | |
| | | }; |
| | | |
| | | // 提交审核 |
| | | const submitAudit = (auditResult) => { |
| | | const submitAudit = () => { |
| | | auditFormRef.value?.validate().then(() => { |
| | | auditLoading.value = true; |
| | | console.log(form); |
| | | const auditData = { |
| | | id: auditRowData.value.id, |
| | | auditStatus: Number(form.value.auditResult), |