移交申请
This commit is contained in:
parent
43ee101b96
commit
a65786aa1a
|
|
@ -35,3 +35,12 @@ export function delTransferApplyApi(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 已移交确认工程下拉选
|
||||||
|
export async function getProSelectApi(data) {
|
||||||
|
return await request({
|
||||||
|
url: '/smartArchives/transferApply/getProSelect',
|
||||||
|
method: 'GET',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -8,3 +8,12 @@ export async function getClassifyMarkSelApi(params) {
|
||||||
params,
|
params,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 部门下拉树
|
||||||
|
export async function getDeptSelectApi(params) {
|
||||||
|
return await request({
|
||||||
|
url: '/smartArchives/transferApply/getDeptSelect',
|
||||||
|
method: 'get',
|
||||||
|
params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -27,11 +27,7 @@ export const formLabel = [
|
||||||
export const columnsList = [
|
export const columnsList = [
|
||||||
{ t_props: 'proName', t_label: '项目名称' },
|
{ t_props: 'proName', t_label: '项目名称' },
|
||||||
{ t_props: 'singleProName', t_label: '单项工程名称' },
|
{ t_props: 'singleProName', t_label: '单项工程名称' },
|
||||||
{ t_props: 'proTypeName', t_label: '工程类型' },
|
{ t_props: 'applyUser', t_label: '申请人' },
|
||||||
{ t_props: 'voltageLevelName', t_label: '电压等级' },
|
{ t_props: 'applyTime', t_label: '申请时间' },
|
||||||
{ t_props: 'planStartDate', t_label: '计划开工日期' },
|
{ t_slot: 'auditStatus', t_label: '审批状态' },
|
||||||
{ t_props: 'planEndDate', t_label: '计划竣工日期' },
|
|
||||||
{ t_props: 'planTcDate', t_label: '计划投产日期' },
|
|
||||||
{ t_props: 'proStatusName', t_label: '工程状态' },
|
|
||||||
{ t_slot: 'contentsName', t_label: '匹配档案目录类型' },
|
|
||||||
]
|
]
|
||||||
|
|
@ -1,25 +1,33 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 档案移交申请 -->
|
<!-- 档案移交申请 -->
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="proTableRef"
|
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="applyTableRef"
|
||||||
:columnsList="columnsList" :request-api="getProListAPI">
|
:columnsList="columnsList" :request-api="getTransferApplyListApi">
|
||||||
<template slot="contentsName" slot-scope="{ data }">
|
<template slot="btn">
|
||||||
<el-tag
|
<el-button plain size="mini" type="primary" icon="el-icon-plus" v-hasPermi="['transfer:apply:add']"
|
||||||
size="mini"
|
@click="handleAdd">
|
||||||
:type="data.contentsName ? 'success' : 'danger'"
|
新增
|
||||||
>
|
</el-button>
|
||||||
{{ data.contentsName ? data.contentsName : '未配置' }}
|
</template>
|
||||||
|
<template slot="auditStatus" slot-scope="{ data }">
|
||||||
|
<el-tag size="mini" :type="getStatusType(data.fileStatus)">
|
||||||
|
{{ getStatusText(data.fileStatus) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot="handle" slot-scope="{ data }">
|
<template slot="handle" slot-scope="{ data }">
|
||||||
<el-button plain size="mini" type="primary" icon="el-icon-edit" v-hasPermi="['data:classify:update']"
|
<el-button plain size="mini" type="primary" icon="el-icon-edit" v-hasPermi="['transfer:apply:edit']"
|
||||||
@click="handleUpdate(data)" v-if="!data.contentsName">
|
@click="handleUpdate(data)">
|
||||||
配置档案类型
|
修改
|
||||||
|
</el-button>
|
||||||
|
<el-button plain size="mini" type="danger" icon="el-icon-delete" v-hasPermi="['transfer:apply:del']"
|
||||||
|
@click="handleDelete(data)">
|
||||||
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableModel>
|
</TableModel>
|
||||||
<!-- 配置 -->
|
<!-- 新增/编辑 -->
|
||||||
<FileSetForm v-if="isflag" :isAdd="isAdd" :rowData="row" @handleQuery="handleQuery" :title="title"
|
<ApplyForm v-if="isflag" :isAdd="isAdd" :rowData="row" @handleQuery="handleQuery" :title="title"
|
||||||
@closeDialog="closeDialog" @showColose="showColose" :dataForm="row" :disabled="loading" :width="600" />
|
@closeDialog="closeDialog" @showColose="showColose" :dataForm="row" :disabled="loading" :width="600" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -28,23 +36,24 @@
|
||||||
import TableModel from '@/components/TableModel'
|
import TableModel from '@/components/TableModel'
|
||||||
import { columnsList, formLabel } from './config'
|
import { columnsList, formLabel } from './config'
|
||||||
import {
|
import {
|
||||||
getProListAPI
|
delTransferApplyApi,
|
||||||
} from '@/api/archivesManagement/project'
|
getTransferApplyListApi,
|
||||||
// import FileSetForm from './prop/fileSetForm'
|
} from '@/api/filesTransfer/apply.js'
|
||||||
|
import ApplyForm from './prop/applyForm'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ProManager',
|
name: 'Apply',
|
||||||
dicts: ['pro_type', 'voltage_level'],
|
dicts: ['pro_type', 'voltage_level'],
|
||||||
components: {
|
components: {
|
||||||
TableModel,
|
TableModel,
|
||||||
// FileSetForm
|
ApplyForm
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formLabel,
|
formLabel,
|
||||||
columnsList,
|
columnsList,
|
||||||
getProListAPI,
|
getTransferApplyListApi,
|
||||||
title: "",
|
title: "",
|
||||||
isflag: false,
|
isflag: false,
|
||||||
isAdd: '',
|
isAdd: '',
|
||||||
|
|
@ -65,23 +74,78 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.title = "新增";
|
||||||
|
this.isAdd = 'add';
|
||||||
|
this.isflag = true;
|
||||||
|
},
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.isflag = false;
|
this.isflag = false;
|
||||||
},
|
},
|
||||||
showColose() {
|
showColose() {
|
||||||
this.isflag = false;
|
this.isflag = false;
|
||||||
},
|
},
|
||||||
/** 配置档案类型 */
|
/** 修改操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.title = "配置档案类型";
|
this.title = "修改";
|
||||||
this.isAdd = 'edit';
|
this.isAdd = 'edit';
|
||||||
this.row = row;
|
this.row = row;
|
||||||
this.isflag = true;
|
this.isflag = true;
|
||||||
},
|
},
|
||||||
/* 搜索操作 */
|
/* 搜索操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.proTableRef.getTableList()
|
this.$refs.applyTableRef.getTableList()
|
||||||
},
|
},
|
||||||
|
/** 删除操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
this.$modal.confirm(`是否确认删除数据类型名称为"${row.dataTypeName}"的数据项?`).then(() => {
|
||||||
|
// 显示加载遮罩
|
||||||
|
this.$modal.loading("正在删除,请稍候...");
|
||||||
|
delTransferApplyApi({ id: row.id }).then(res => {
|
||||||
|
this.$modal.closeLoading();
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
this.handleQuery();
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError(res.msg);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
this.$modal.closeLoading();
|
||||||
|
this.$modal.msgError("删除失败,请重试");
|
||||||
|
console.error('删除失败:', error);
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
// 用户取消删除,不需要处理
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 获取状态
|
||||||
|
getStatusText(status) {
|
||||||
|
switch (status) {
|
||||||
|
case '0':
|
||||||
|
return '待审批'
|
||||||
|
case '1':
|
||||||
|
return '审批通过'
|
||||||
|
case '2':
|
||||||
|
return '审批驳回'
|
||||||
|
default:
|
||||||
|
return '未知状态'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取状态标签类型
|
||||||
|
getStatusType(status) {
|
||||||
|
switch (status) {
|
||||||
|
case '0':
|
||||||
|
return 'danger'
|
||||||
|
case '1':
|
||||||
|
return 'warning'
|
||||||
|
case '2':
|
||||||
|
return 'success'
|
||||||
|
default:
|
||||||
|
return 'info'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,208 @@
|
||||||
|
<template>
|
||||||
|
<!-- 小型弹窗,用于完成,删除,保存等操作 -->
|
||||||
|
<el-dialog class="l-dialog" :class="lDialog" :title="title" :visible.sync="dialogVisible" :showClose="true"
|
||||||
|
:closeOnClickModal="false" @close="handleClose" :append-to-body="true">
|
||||||
|
<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="请选择项目">
|
||||||
|
<el-option v-for="item in proList" :key="item.id" :label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="选择移交档案">
|
||||||
|
<el-button plain type="primary" size="mini" icon="el-icon-plus" @click="handleAddFile">选择</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="接收组织" prop="deptId">
|
||||||
|
<treeselect v-model="form.deptId" :options="treeDataList" placeholder="请选择上级节点" value-key="id"
|
||||||
|
noChildrenText="没有数据了" noOptionsText="没有数据了" noResultsText="没有搜索结果" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button class="clear-btn" @click="handleClose" :disabled="disabled">取消</el-button>
|
||||||
|
<el-button type="primary" class="search-btn" :disabled="disabled"
|
||||||
|
@click="submitForm('ruleForm')">确认</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import _ from 'lodash'
|
||||||
|
import {
|
||||||
|
saveTransferApplyApi,
|
||||||
|
editTransferApplyApi,
|
||||||
|
getProSelectApi
|
||||||
|
} from '@/api/filesTransfer/apply'
|
||||||
|
import { getDeptSelectApi } from '@/api/select'
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
export default {
|
||||||
|
name: "ApplyForm",
|
||||||
|
props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"],
|
||||||
|
dicts: ['data_class_type'],
|
||||||
|
components: { Treeselect },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
lDialog: this.width > 500 ? "w700" : "w500",
|
||||||
|
dialogVisible: true,
|
||||||
|
isDisabled: true,
|
||||||
|
form: {
|
||||||
|
proId: undefined,
|
||||||
|
deptId: undefined,
|
||||||
|
remark: '',
|
||||||
|
},
|
||||||
|
treeDataList: [],
|
||||||
|
proList: [],
|
||||||
|
loading: null,
|
||||||
|
rules: {
|
||||||
|
proId: [
|
||||||
|
{ required: true, message: '请选择项目', trigger: 'change' }
|
||||||
|
],
|
||||||
|
deptId: [
|
||||||
|
{ required: true, message: '请选择接收组织', trigger: 'change' }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.initFormData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 初始化表单数据 */
|
||||||
|
async initFormData() {
|
||||||
|
await getDeptSelectApi().then(res => {
|
||||||
|
this.treeDataList = res.data;
|
||||||
|
});
|
||||||
|
await getProSelectApi().then(res => {
|
||||||
|
this.proList = res.data;
|
||||||
|
});
|
||||||
|
if (this.isAdd === 'edit' && this.rowData) {
|
||||||
|
// 编辑模式:填充表单数据
|
||||||
|
this.form = {
|
||||||
|
id: this.rowData.id,
|
||||||
|
proId: this.rowData.proId || undefined,
|
||||||
|
deptId: this.rowData.deptId || undefined,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
// 新增模式:重置表单
|
||||||
|
this.form = {
|
||||||
|
proId: undefined,
|
||||||
|
deptId: undefined,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 选择移交档案
|
||||||
|
handleAddFile(){
|
||||||
|
|
||||||
|
},
|
||||||
|
/*关闭弹窗 */
|
||||||
|
handleClose() {
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.$emit("closeDialog");
|
||||||
|
setTimeout(() => {
|
||||||
|
this.dialogVisible = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**确认弹窗 */
|
||||||
|
sureBtnClick() {
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.$emit("closeDialog");
|
||||||
|
setTimeout(() => {
|
||||||
|
this.dialogVisible = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**重置表单*/
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
pid: null,
|
||||||
|
dataTypeName: '',
|
||||||
|
remark: '',
|
||||||
|
};
|
||||||
|
this.resetForm("ruleForm");
|
||||||
|
},
|
||||||
|
handleReuslt(res) {
|
||||||
|
this.$modal.msgSuccess(res.msg);
|
||||||
|
this.reset();
|
||||||
|
this.$emit('handleQuery');
|
||||||
|
this.handleClose();
|
||||||
|
},
|
||||||
|
/**验证 */
|
||||||
|
submitForm(formName) {
|
||||||
|
this.$refs[formName].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
// 显示遮罩层
|
||||||
|
this.loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: "数据提交中,请稍候...",
|
||||||
|
background: 'rgba(0,0,0,0.5)',
|
||||||
|
target: this.$el.querySelector('.el-dialog') || document.body
|
||||||
|
})
|
||||||
|
let params = _.cloneDeep(this.form);
|
||||||
|
if (this.isAdd === 'add') {
|
||||||
|
saveTransferApplyApi(params).then(res => {
|
||||||
|
this.loading.close();
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.handleReuslt(res);
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError(res.msg);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
this.loading.close();
|
||||||
|
// this.$modal.msgError('提交失败,请重试');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
|
||||||
|
editTransferApplyApi(params).then(res => {
|
||||||
|
this.loading.close();
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.handleReuslt(res);
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError(res.msg);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
this.loading.close();
|
||||||
|
// this.$modal.msgError('提交失败,请重试');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.w700 .el-dialog {
|
||||||
|
width: 700px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w500 .el-dialog {
|
||||||
|
width: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w500 .el-dialog__header,
|
||||||
|
.w700 .el-dialog__header {
|
||||||
|
// background: #eeeeee;
|
||||||
|
|
||||||
|
.el-dialog__title {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.yxq .el-range-separator {
|
||||||
|
margin-right: 7px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-date-editor--daterange.el-input__inner {
|
||||||
|
width: 260px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-item {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-style {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue