diff --git a/src/api/filesTransfer/audit.js b/src/api/filesTransfer/audit.js
index 48e3a59..bb0c597 100644
--- a/src/api/filesTransfer/audit.js
+++ b/src/api/filesTransfer/audit.js
@@ -7,4 +7,13 @@ export function getTransferAuditListApi(params) {
method: 'GET',
params: params,
})
+}
+
+// 审核
+export function auditTransferApplyApi(data) {
+ return request({
+ url: '/smartArchives/transferApply/auditTransferApply',
+ method: 'POST',
+ data: data,
+ })
}
\ No newline at end of file
diff --git a/src/views/filesTransfer/apply/index.vue b/src/views/filesTransfer/apply/index.vue
index 0bb4cda..8ccbf32 100644
--- a/src/views/filesTransfer/apply/index.vue
+++ b/src/views/filesTransfer/apply/index.vue
@@ -152,11 +152,11 @@ export default {
getStatusType(status) {
switch (status) {
case '0':
- return 'danger'
- case '1':
return 'warning'
- case '2':
+ case '1':
return 'success'
+ case '2':
+ return 'danger'
default:
return 'info'
}
diff --git a/src/views/filesTransfer/audit/index.vue b/src/views/filesTransfer/audit/index.vue
index 7b213b7..04d1f48 100644
--- a/src/views/filesTransfer/audit/index.vue
+++ b/src/views/filesTransfer/audit/index.vue
@@ -93,11 +93,11 @@ export default {
getStatusType(status) {
switch (status) {
case '0':
- return 'danger'
- case '1':
return 'warning'
- case '2':
+ case '1':
return 'success'
+ case '2':
+ return 'danger'
default:
return 'info'
}
diff --git a/src/views/filesTransfer/detail-data.vue b/src/views/filesTransfer/detail-data.vue
index ee4988a..61af318 100644
--- a/src/views/filesTransfer/detail-data.vue
+++ b/src/views/filesTransfer/detail-data.vue
@@ -35,7 +35,7 @@
- {{ scope.row.proName || '--'}}
+ {{ scope.row.proName || '--' }}
@@ -75,7 +75,8 @@
- 同意
+ 同意
驳回
@@ -109,8 +110,9 @@
import { decryptWithSM4 } from '@/utils/sm'
import {
getTransferApplyFilesByApplyIdApi,
- getTransferApplyApi
+ getTransferApplyApi,
} from '@/api/filesTransfer/apply'
+import {auditTransferApplyApi} from '@/api/filesTransfer/audit'
export default {
name: 'DetailData',
data() {
@@ -160,15 +162,15 @@ export default {
// 恢复页面滚动
document.body.style.overflow = 'auto';
},
- created(){
+ created() {
this.initData();
},
methods: {
handleClose() {
- if(this.viewStatus === 'audit'){
+ if (this.viewStatus === 'audit') {
const obj = { path: "/archivesManagement/filesTransfer/audit" }
this.$tab.closeOpenPage(obj)
- }else{
+ } else {
const obj = { path: "/archivesManagement/filesTransfer/apply" }
this.$tab.closeOpenPage(obj)
}
@@ -177,14 +179,14 @@ export default {
this.fileList = [];
const res = await getTransferApplyFilesByApplyIdApi({ id: this.id });
console.log(res);
-
+
const res2 = await getTransferApplyApi({ id: this.id });
this.projectName = res2?.data?.proName || '/';
this.receivingOrg = res2?.data?.deptName || '/';
- // 审批信息
- this.auditUserName = res2?.data?.auditUserName || '--';
- this.auditDate = res2?.data?.transfertTime || '--';
- this.auditOpinion = res2?.data?.auditOpinion || '--';
+ // 审批信息
+ this.auditUserName = res2?.data?.auditUserName || '--';
+ this.auditDate = res2?.data?.transfertTime || '--';
+ this.auditOpinion = res2?.data?.auditOpinion || '--';
if (Array.isArray(res.data) && res.data.length > 0) {
res.data.map(item => {
const newFile = {
@@ -197,7 +199,7 @@ export default {
this.fileList.push(newFile);
})
}
-
+
},
handleApprove() {
if (!this.approvalComment.trim()) {
@@ -211,9 +213,7 @@ export default {
type: 'success'
}).then(() => {
this.status = 'approved'
- this.$message.success('审批通过')
- // 这里可以调用API提交审批结果
- console.log('审批意见:', this.approvalComment)
+ this.auditTransferApply(1)
}).catch(() => {
// 取消操作
})
@@ -230,12 +230,22 @@ export default {
type: 'warning'
}).then(() => {
this.status = 'rejected'
- this.$message.success('已驳回申请')
- // 这里可以调用API提交审批结果
- console.log('驳回原因:', this.approvalComment)
+ this.auditTransferApply(2)
}).catch(() => {
// 取消操作
})
+ },
+ // 审核
+ auditTransferApply(auditStatus) {
+ auditTransferApplyApi({
+ id: this.id,
+ auditOpinion: this.approvalComment.trim(),
+ auditStatus: auditStatus
+ }).then(res => {
+ this.$message.success(res.msg || '审核成功');
+ this.handleClose();
+ })
+
}
}
}
@@ -245,27 +255,28 @@ export default {
.detail-container {
padding: 20px;
background: #fff;
- height: calc(100vh - 120px); /* 减去头部导航栏的高度 */
+ height: calc(100vh - 120px);
+ /* 减去头部导航栏的高度 */
overflow-y: auto;
box-sizing: border-box;
-
+
/* 自定义滚动条样式 */
&::-webkit-scrollbar {
width: 6px;
background: #f5f5f5;
}
-
+
&::-webkit-scrollbar-track {
background: #f5f5f5;
border-radius: 3px;
}
-
+
&::-webkit-scrollbar-thumb {
background: #c0c4cc;
border-radius: 3px;
transition: background 0.3s;
}
-
+
&::-webkit-scrollbar-thumb:hover {
background: #909399;
}
@@ -368,19 +379,23 @@ export default {
.audit-info {
padding: 4px 0 0 6px;
}
+
.audit-row {
margin-bottom: 10px;
font-size: 14px;
color: #333;
}
+
.audit-label {
display: inline-block;
min-width: 80px;
color: #666;
}
+
.audit-value {
color: #333;
}
+
.form-item {
margin-bottom: 20px;