新增鉴定申请

main
mo 1 year ago
parent c3411d3f71
commit 3ce1d7ffae

@ -62,3 +62,12 @@ export function exportAuthenticateExcel(query) {
responseType: 'blob' responseType: 'blob'
}) })
} }
// 新增鉴定申请
export function createAuthenticateApply(data) {
return request({
url: '/archives/authenticate/create/apply',
method: 'post',
data: data
})
}

@ -49,15 +49,7 @@
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column label="档案类型" align="center" prop="type" /> <el-table-column label="档案类型" align="center" prop="type" />
<el-table-column label="档案位置" align="center" prop="position" /> <el-table-column label="档案位置" align="center" prop="position" />
<el-table-column <el-table-column label="保存期限" align="center" prop="timeLimit">
label="保存期限"
align="center"
prop="timeLimit"
width="180"
>
<template v-slot="scope">
<span>{{ parseTime(scope.row.timeLimit) }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="鉴定人" align="center" prop="userName" /> <el-table-column label="鉴定人" align="center" prop="userName" />
<el-table-column label="业务实体" align="center" prop="company" /> <el-table-column label="业务实体" align="center" prop="company" />
@ -66,7 +58,11 @@
<span>{{ parseTime(scope.row.date) }}</span> <span>{{ parseTime(scope.row.date) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="鉴定结果" align="center" prop="result" /> <el-table-column label="鉴定结果" align="center" prop="result">
<template v-slot="scope">
<span>{{ scope.row.result == 0 ? "销毁" : "延长期限" }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->

@ -78,6 +78,7 @@
plain plain
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
:disabled="multiple"
@click="handleAuth" @click="handleAuth"
>鉴定</el-button >鉴定</el-button
> >
@ -129,15 +130,80 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="98px">
<el-row>
<el-col :span="14">
<el-form-item label="鉴定人" prop="userName">
<el-select
v-model="userName"
filterable
placeholder="请选择鉴定人"
value-key="id"
@change="handleSelectUser"
>
<el-option
v-for="item in userOptions"
:key="item.id"
:value="item"
:label="item.username"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="14">
<el-form-item label="鉴定结果" prop="result">
<el-radio v-model="form.result" label="0"></el-radio>
<el-radio v-model="form.result" label="1"></el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="form.result == 1">
<el-col :span="12">
<el-form-item label="延长期限" prop="timeLimit">
<el-select v-model="form.timeLimit" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listData } from "@/api/system/dict/data"; import { listData } from "@/api/system/dict/data";
import { getAuthenticateList } from "@/api/fileAuth/authenticate"; import { listUser } from "@/api/system/user";
import {
getAuthenticateList,
createAuthenticateApply,
} from "@/api/fileAuth/authenticate";
export default { export default {
name: "Record", name: "FileAuth",
components: {}, components: {},
data() { data() {
return { return {
@ -174,11 +240,33 @@ export default {
fileStatusOptions: [], // fileStatusOptions: [], //
catalogNumOptions: [], // catalogNumOptions: [], //
caseNumOptions: [], // caseNumOptions: [], //
userOptions: [], //
userName: null,
options: [
{
value: 10,
label: "10年",
},
{
value: 20,
label: "20年",
},
{
value: 30,
label: "30年",
},
{
value: null,
label: "永久保存",
},
],
selectList: [],
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.handleInitList(); this.handleInitList();
this.getUserList();
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
@ -193,6 +281,13 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.selectList = selection.map((item) => {
return {
recordId: item["id"],
};
});
console.log(this.selectList);
this.ids = selection.map((item) => item.id); this.ids = selection.map((item) => item.id);
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
@ -231,6 +326,16 @@ export default {
this.fileStatusOptions = res.data.list || []; this.fileStatusOptions = res.data.list || [];
}); });
}, },
//
getUserList() {
listUser().then((response) => {
this.userOptions = response.data.list;
});
},
handleSelectUser(val) {
this.form.userId = val.id;
this.form.userName = val.username;
},
/** 取消按钮 */ /** 取消按钮 */
cancel() { cancel() {
this.open = false; this.open = false;
@ -239,15 +344,13 @@ export default {
/** 表单重置 */ /** 表单重置 */
reset() { reset() {
this.form = { this.form = {
id: undefined, userId: undefined,
companyId: undefined, userName: undefined,
company: undefined, timeLimit: undefined,
frequency: undefined, result: undefined,
fileType: undefined, remark: undefined,
year: undefined,
period: undefined,
vouNum: undefined,
}; };
this.userName = undefined;
this.resetForm("form"); this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -261,7 +364,30 @@ export default {
this.handleQuery(); this.handleQuery();
}, },
// //
handleAuth() {}, handleAuth() {
this.reset();
this.open = true;
this.title = "鉴定";
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
this.selectList.forEach((item) => {
item.userId = this.form.userId;
item.userName = this.form.userName;
item.timeLimit = this.form.timeLimit;
item.result = this.form.result;
item.remark = this.form.remark;
});
console.log(this.selectList);
createAuthenticateApply(this.selectList).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
});
},
}, },
}; };
</script> </script>

Loading…
Cancel
Save