| | |
| | | prop: "process", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "审核状态", |
| | | prop: "auditStatus", |
| | | width: 120, |
| | | dataType: "tag", |
| | | formatData: val => { |
| | | const statusMap = { 0: "未审核", 1: "通过", 2: "不通过" }; |
| | | return statusMap[val] ?? "未知"; |
| | | }, |
| | | formatType: val => { |
| | | const typeMap = { 0: "info", 1: "success", 2: "danger" }; |
| | | return typeMap[val] ?? ""; |
| | | }, |
| | | }, |
| | | { |
| | | label: "工单编号", |
| | | prop: "workOrderNo", |
| | |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "审核状态", |
| | | prop: "auditStatus", |
| | | width: 120, |
| | | dataType: "tag", |
| | | formatData: val => { |
| | | const statusMap = { 0: "未审核", 1: "通过", 2: "不通过" }; |
| | | return statusMap[val] ?? "未知"; |
| | | }, |
| | | formatType: val => { |
| | | const typeMap = { 0: "info", 1: "success", 2: "danger" }; |
| | | return typeMap[val] ?? ""; |
| | | }, |
| | | label: "备注信息", |
| | | prop: "auditOpinion", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | label: "创建时间", |
| | |
| | | }, |
| | | }, |
| | | { |
| | | name:"审核", |
| | | // 黄色 |
| | | color: "#E6A23C", |
| | | clickFun: row => { |
| | | handleAudit(row); |
| | | }, |
| | | showHide: row => Number(row?.auditStatus) === 0, // 仅当未审核时显示审核按钮 |
| | | }, |
| | | { |
| | | name: "删除", |
| | | type: "danger", |
| | | clickFun: row => { |
| | | deleteReport(row); |
| | | }, |
| | | }, |
| | | { |
| | | name:"审核", |
| | | color: "#E6A23C", |
| | | clickFun: row => { |
| | | handleAudit(row); |
| | | }, |
| | | disabled: row => Number(row?.auditStatus) !== 0, // 已审核时禁用审核按钮 |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | productAudit(auditData) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | proxy.$modal.msgSuccess(auditResult === 1 ? "审核通过" : "审核不通过"); |
| | | if(form.value.auditResult == 1){ |
| | | proxy.$modal.msgSuccess("审核通过"); |
| | | }else{ |
| | | proxy.$modal.msgError("审核不通过"); |
| | | } |
| | | auditDialogVisible.value = false; |
| | | getList(); |
| | | } else { |