移交申请

This commit is contained in:
cwchen 2025-09-19 15:39:03 +08:00
parent 38145927dd
commit 81bfd4d250
5 changed files with 48 additions and 21 deletions

View File

@ -27,6 +27,15 @@ export function editTransferApplyApi(data) {
})
}
// 档案移交申请详情
export function getTransferApplyApi(params) {
return request({
url: '/smartArchives/transferApply/getTransferApply',
method: 'GET',
params: params
})
}
// 删除档案移交申请
export function delTransferApplyApi(data) {
return request({

View File

@ -2,7 +2,7 @@ export const formLabel = [
{
isShow: false, // 是否展示label
f_type: 'ipt',
f_label: '项目名称',
f_label: '单项工程名称',
f_model: 'proName',
f_max: 32,
},

View File

@ -2,7 +2,7 @@ export const formLabel = [
{
isShow: false, // 是否展示label
f_type: 'ipt',
f_label: '项目名称',
f_label: '单项工程名称',
f_model: 'proName',
f_max: 32,
},
@ -27,7 +27,7 @@ export const formLabel = [
export const columnsList = [
{ t_props: 'proName', t_label: '项目名称' },
{ t_props: 'singleProName', t_label: '单项工程名称' },
{ t_props: 'applyUser', t_label: '申请人' },
{ t_props: 'applyTime', t_label: '申请时间' },
{ t_props: 'createUserName', t_label: '申请人' },
{ t_props: 'createTime', t_label: '申请时间' },
{ t_slot: 'auditStatus', t_label: '审批状态' },
]

View File

@ -14,14 +14,14 @@
</el-button>
</template>
<template slot="auditStatus" slot-scope="{ data }">
<el-tag size="mini" :type="getStatusType(data.fileStatus)">
{{ getStatusText(data.fileStatus) }}
<el-tag size="mini" :type="getStatusType(data.auditStatus)">
{{ getStatusText(data.auditStatus) }}
</el-tag>
</template>
<template slot="handle" slot-scope="{ data }">
<el-button plain size="mini" type="primary" icon="el-icon-edit" v-hasPermi="['transfer:apply:edit']"
@click="handleUpdate(data)" v-if="data.auditStatus === '2'">
@click="handleUpdate(data)">
修改
</el-button>
<el-button plain size="mini" type="danger" icon="el-icon-delete" v-hasPermi="['transfer:apply:del']"

View File

@ -5,7 +5,8 @@
<div>
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="110px">
<el-form-item label="项目" prop="proId">
<el-select class="form-item" v-model="form.proId" filterable clearable placeholder="请选择项目" @change="handleProChange">
<el-select class="form-item" v-model="form.proId" filterable clearable placeholder="请选择项目"
@change="handleProChange">
<el-option v-for="item in proList" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
@ -70,7 +71,8 @@ import {
saveTransferApplyApi,
editTransferApplyApi,
getProSelectApi,
getTransferApplyFilesApi
getTransferApplyFilesApi,
getTransferApplyApi
} from '@/api/filesTransfer/apply'
import { getDeptSelectApi } from '@/api/select'
import Treeselect from "@riophae/vue-treeselect";
@ -131,6 +133,22 @@ export default {
await getProSelectApi().then(res => {
this.proList = res.data;
});
const res = await getTransferApplyApi({ id: this.rowData.id });
if (Array.isArray(res.data.transferFileDtos) && res.data.transferFileDtos.length > 0) {
res.data.transferFileDtos.map(item => {
const newFile = {
proFilesContentsId: item.id,
parParentName: item.parParentName,
parentName: item.parentName,
fileName: item.fileName,
proId: item.proId,
fileSourceId: item.fileId,
filePath: item.filePath
};
this.checkTreeData.push(newFile);
})
}
if (this.isAdd === 'edit' && this.rowData) {
//
this.form = {
@ -146,7 +164,7 @@ export default {
};
}
},
handleProChange(value){
handleProChange(value) {
console.log(value);
this.checkTreeData = [];
},
@ -217,7 +235,7 @@ export default {
params.deptName = obj?.label || '';
params.transferFileDtos = this.checkTreeData;
console.log(params);
if (this.isAdd === 'add') {
saveTransferApplyApi(params).then(res => {
this.loading.close();
@ -269,19 +287,19 @@ export default {
})
},
findNodeById(nodes, id) {
for (const node of nodes) {
if (node.id === id) return node;
if (node.children) {
const found = this.findNodeById(node.children, id);
if (found) return found;
for (const node of nodes) {
if (node.id === id) return node;
if (node.children) {
const found = this.findNodeById(node.children, id);
if (found) return found;
}
}
}
return null;
return null;
},
//
async getTreeData(nodeId) {
this.checkTreeData = [];
const res = await getTransferApplyFilesApi({ proId:this.form.proId,id:nodeId });
const res = await getTransferApplyFilesApi({ proId: this.form.proId, id: nodeId });
if (Array.isArray(res.data) && res.data.length > 0) {
res.data.map(item => {
const newFile = {
@ -290,8 +308,8 @@ export default {
parentName: item.parentName,
fileName: item.fileName,
proId: item.proId,
fileSourceId:item.fileId,
filePath:item.filePath
fileSourceId: item.fileId,
filePath: item.filePath
};
this.checkTreeData.push(newFile);
})