新增档案设置

main
mo 1 year ago
parent 766979a94d
commit da80ea880c

@ -18,6 +18,14 @@ export function updateRecord(data) {
}) })
} }
// 批量归档
export function archivesRecord(data) {
return request({
url: '/archives/record/record?ids=' + data,
method: 'put',
})
}
// 删除归档 // 删除归档
export function deleteRecord(id) { export function deleteRecord(id) {
return request({ return request({

@ -52,3 +52,12 @@ export function exportOrganizationExcel(query) {
responseType: 'blob' responseType: 'blob'
}) })
} }
// 获取立档单位-库房-档案柜树状
export function getSiteTree(query) {
return request({
url: '/setting/organization/getTree',
method: 'get',
params: query
})
}

@ -79,6 +79,18 @@
>导出</el-button >导出</el-button
> >
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-s-claim"
size="mini"
:disabled="multiple"
@click="handleArchive"
v-hasPermi="['setting:organization:create']"
>归档</el-button
>
</el-col>
<right-toolbar <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
@queryTable="getList" @queryTable="getList"
@ -86,7 +98,12 @@
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table
v-loading="loading"
:data="list"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="业务实体" align="center" prop="company" /> <el-table-column label="业务实体" align="center" prop="company" />
<el-table-column label="归档频次" align="center" prop="frequency" /> <el-table-column label="归档频次" align="center" prop="frequency" />
<el-table-column label="档案类型" align="center" prop="fileType"> <el-table-column label="档案类型" align="center" prop="fileType">
@ -115,7 +132,7 @@
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" prop="status" /> <!-- <el-table-column label="状态" align="center" prop="status" /> -->
<el-table-column label="归档详情" align="center" prop="note" /> <el-table-column label="归档详情" align="center" prop="note" />
<el-table-column label="归档状态" align="center" prop="fileStatus"> <el-table-column label="归档状态" align="center" prop="fileStatus">
<template v-slot="scope"> <template v-slot="scope">
@ -128,7 +145,7 @@
<el-table-column label="借阅状态" align="center" prop="borrowStatus" /> <el-table-column label="借阅状态" align="center" prop="borrowStatus" />
<el-table-column label="鉴定状态" align="center" prop="identifyStatus" /> <el-table-column label="鉴定状态" align="center" prop="identifyStatus" />
<el-table-column label="归档时间" align="center" prop="recordTime" /> <el-table-column label="归档时间" align="center" prop="recordTime" />
<el-table-column label="所属部门" align="center" prop="deptName" /> <!-- <el-table-column label="所属部门" align="center" prop="deptName" /> -->
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column <el-table-column
label="操作" label="操作"
@ -176,14 +193,27 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="业务实体" prop="company"> <el-form-item label="业务实体" prop="company">
<el-cascader <!-- <el-cascader
v-model="companyArray" v-model="companyArray"
:options="companyOptions" :options="companyOptions"
:props="propName" :props="propName"
placeholder="请选择业务实体" placeholder="请选择业务实体"
clearable clearable
@change="handleChange" @change="handleChange"
/> /> -->
<el-select
v-model="form.company"
placeholder="请选择业务实体"
@change="handleCompanyChange"
>
<el-option
v-for="item in organizationList"
:key="item.id"
:value="item.id"
:label="item.organizationName"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -240,8 +270,14 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="全宗号" prop="company"> <el-form-item label="全宗号" prop="caseNum">
<el-select <el-input
v-model="form.caseNum"
placeholder="选择业务实体后自动带入"
readonly
@change="changeCaseNum"
/>
<!-- <el-select
v-model="form.caseNum" v-model="form.caseNum"
placeholder="请选择全宗号" placeholder="请选择全宗号"
@change="changeCaseNum" @change="changeCaseNum"
@ -253,7 +289,7 @@
:label="item.label" :label="item.label"
> >
</el-option> </el-option>
</el-select> </el-select> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -275,14 +311,21 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="案卷号" prop="filesNum"> <el-form-item label="案卷号" prop="filesNum">
<el-input v-model="form.filesNum" placeholder="请输入案卷号" /> <el-input v-model="form.filesNum" readonly placeholder="" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="档案位置" prop="site"> <el-form-item label="档案位置" prop="site">
<el-input v-model="form.site" placeholder="请输入档案位置" /> <el-cascader
v-model="siteArray"
:options="siteOptions"
:props="propName1"
placeholder="请选择档案位置"
clearable
@change="handleSiteChanged"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -290,13 +333,13 @@
<el-input v-model="form.flowId" placeholder="请输入关联号" /> <el-input v-model="form.flowId" placeholder="请输入关联号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <!-- <el-col :span="8">
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status"> <el-radio-group v-model="form.status">
<el-radio label="1">请选择字典生成</el-radio> <el-radio label="1">请选择字典生成</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
@ -305,63 +348,40 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="归档状态" prop="fileStatus"> <el-form-item label="归档时间" prop="recordTime">
<el-select v-model="form.fileStatus" placeholder="请选择归档状态"> <el-date-picker
<el-option clearable
v-for="item in fileStatusOptions" v-model="form.recordTime"
:key="item.id" type="date"
:value="item.value" value-format="yyyy-MM-dd"
:label="item.label" placeholder="选择归档时间"
> />
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <!-- <el-col :span="8">
<el-form-item label="借阅状态" prop="borrowStatus"> <el-form-item label="借阅状态" prop="borrowStatus">
<el-radio-group v-model="form.borrowStatus"> <el-radio-group v-model="form.borrowStatus">
<el-radio label="1">请选择字典生成</el-radio> <el-radio label="1">请选择字典生成</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <!-- <el-col :span="8">
<el-form-item label="鉴定状态" prop="identifyStatus"> <el-form-item label="鉴定状态" prop="identifyStatus">
<el-radio-group v-model="form.identifyStatus"> <el-radio-group v-model="form.identifyStatus">
<el-radio label="1">请选择字典生成</el-radio> <el-radio label="1">请选择字典生成</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="8">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="归档时间" prop="recordTime">
<el-date-picker
clearable
v-model="form.recordTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择归档时间"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="所属部门" prop="deptName">
<el-input v-model="form.deptName" placeholder="请输入所属部门" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="用户id" prop="userId">
<el-input v-model="form.userId" placeholder="请输入用户id" />
</el-form-item>
</el-col>
</el-row> </el-row>
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -380,9 +400,12 @@ import {
getRecordPage, getRecordPage,
exportRecordExcel, exportRecordExcel,
createCodeRule, createCodeRule,
archivesRecord,
} from "@/api/archives/record"; } from "@/api/archives/record";
import { listDept } from "@/api/system/dept"; // import { listDept } from "@/api/system/dept";
import { listData } from "@/api/system/dict/data"; import { listData } from "@/api/system/dict/data";
import { getSiteTree } from "@/api/setting/organization";
import { getOrganizationPage } from "@/api/setting/organization";
export default { export default {
name: "Record", name: "Record",
@ -395,10 +418,19 @@ export default {
value: "id", value: "id",
multiple: false, multiple: false,
}, },
propName1: {
label: "pName",
value: "pId",
multiple: false,
},
companyOptions: [], // companyOptions: [], //
companyArray: [], // companyArray: [], //
siteOptions: [], //
siteArray: [], //
// //
loading: true, loading: true,
//
multiple: true,
// //
exportLoading: false, exportLoading: false,
// //
@ -442,21 +474,28 @@ export default {
attr3: null, attr3: null,
attr4: null, attr4: null,
userId: null, userId: null,
organizationId: null, //
depotId: null, //
cabinetId: null, //
}, },
// //
form: {}, form: {},
Fileform: {}, Fileform: {},
//
ids: [],
// //
rules: {}, rules: {},
fileTypeOptions: [], // fileTypeOptions: [], //
fileStatusOptions: [], // fileStatusOptions: [], //
catalogNumOptions: [], // catalogNumOptions: [], //
caseNumOptions: [], // caseNumOptions: [], //
organizationList: [],
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getCompanyList(); this.getOrganizationList();
this.getSiteList();
this.handleInitList(); this.handleInitList();
}, },
methods: { methods: {
@ -470,17 +509,35 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
// //
getCompanyList() { handleSelectionChange(selection) {
listDept().then((response) => { this.ids = selection.map((item) => item.id);
this.companyOptions = this.handleTree(response.data, "id", "parentId"); this.multiple = !selection.length;
console.log(this.companyOptions); },
// //
// getCompanyList() {
// listDept().then((response) => {
// this.companyOptions = this.handleTree(response.data, "id", "parentId");
// console.log(this.companyOptions);
// });
// },
// handleChange(value) {
// console.log(value, value[value.length - 1]);
// this.form.companyId = value[value.length - 1]; //id
// },
//
getOrganizationList() {
getOrganizationPage().then((response) => {
this.organizationList = response.data.list;
}); });
}, },
handleChange(value) { handleCompanyChange(val) {
console.log(value, value[value.length - 1]); var data = this.organizationList.find((item) => item.id == val);
this.form.companyId = value[value.length - 1]; //id console.log(data);
this.form.caseNum = data.caseNum;
this.Fileform.caseNum = data.caseNum;
}, },
// //
handleInitList() { handleInitList() {
// //
@ -516,23 +573,60 @@ export default {
this.fileStatusOptions = res.data.list || []; this.fileStatusOptions = res.data.list || [];
}); });
}, },
changeCaseNum(val) { //
this.Fileform.catalogNum = val; changeCaseNum() {
if (this.Fileform.catalogNum != null && this.Fileform.caseNum != null) { if (this.Fileform.catalogNum != null && this.Fileform.caseNum != null) {
this.creatFilesNum(); this.creatFilesNum();
} }
}, },
//
changeCatalogNum(val) { changeCatalogNum(val) {
this.Fileform.caseNum = val; this.Fileform.catalogNum = val;
console.log(this.Fileform);
if (this.Fileform.catalogNum != null && this.Fileform.caseNum != null) { if (this.Fileform.catalogNum != null && this.Fileform.caseNum != null) {
this.creatFilesNum(); this.creatFilesNum();
} }
}, },
//
creatFilesNum() { creatFilesNum() {
createCodeRule(this.Fileform).then((response) => { createCodeRule(this.Fileform).then((response) => {
this.form.filesNum = response.data; this.form.filesNum = response.data;
}); });
}, },
//
getSiteList() {
getSiteTree().then((response) => {
this.siteOptions = response.data;
this.siteOptions.map((w) => {
w.children.map((l) => {
let lstr = JSON.stringify(l.children)
.replace(/depotId/g, "lId")
.replace(/cabinetId/g, "pId")
.replace(/cabinetName/g, "pName");
l.children = JSON.parse(lstr);
});
let wstr = JSON.stringify(w.children)
.replace(/organizationId/g, "wId")
.replace(/depotId/g, "pId")
.replace(/depotName/g, "pName");
w.children = JSON.parse(wstr);
});
let ostr = JSON.stringify(this.siteOptions)
.replace(/organizationId/g, "pId")
.replace(/organizationName/g, "pName");
this.siteOptions = JSON.parse(ostr);
console.log(this.siteOptions);
});
},
//
handleSiteChanged(obj) {
if (obj != null) {
this.form.organizationId = obj[0];
this.form.depotId = obj[1];
this.form.cabinetId = obj[2];
}
},
/** 取消按钮 */ /** 取消按钮 */
cancel() { cancel() {
this.open = false; this.open = false;
@ -574,6 +668,7 @@ export default {
caseNum: null, caseNum: null,
}; };
this.companyArray = []; this.companyArray = [];
this.siteArray = [];
this.resetForm("form"); this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -598,6 +693,10 @@ export default {
const id = row.id; const id = row.id;
getRecord(id).then((response) => { getRecord(id).then((response) => {
this.form = response.data; this.form = response.data;
this.siteArray[0] = response.data.organizationId;
this.siteArray[1] = response.data.depotId;
this.siteArray[2] = response.data.cabinetId;
console.log(this.siteArray);
this.open = true; this.open = true;
this.title = "修改归档"; this.title = "修改归档";
}); });
@ -625,6 +724,21 @@ export default {
}); });
}); });
}, },
/** 归档按钮操作 */
handleArchive() {
const data = this.ids;
console.log(data);
this.$modal
.confirm("是否确认归档")
.then(function () {
return archivesRecord(data);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("归档成功");
})
.catch(() => {});
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;

@ -1,56 +1,62 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="98px"
>
<el-form-item label="库房名称" prop="name"> <el-form-item label="库房名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入库房名称" clearable @keyup.enter.native="handleQuery"/> <el-input
v-model="queryParams.name"
placeholder="请输入库房名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="库房编号" prop="code"> <el-form-item label="库房编号" prop="code">
<el-input v-model="queryParams.code" placeholder="请输入库房编号" clearable @keyup.enter.native="handleQuery"/> <el-input
v-model="queryParams.code"
placeholder="请输入库房编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="库房地址" prop="address"> <el-form-item label="库房地址" prop="address">
<el-input v-model="queryParams.address" placeholder="请输入库房地址" clearable @keyup.enter.native="handleQuery"/> <el-input
</el-form-item> v-model="queryParams.address"
<el-form-item label="立党单位id" prop="organizationId"> placeholder="请输入库房地址"
<el-input v-model="queryParams.organizationId" placeholder="请输入立党单位id" clearable @keyup.enter.native="handleQuery"/> clearable
</el-form-item> @keyup.enter.native="handleQuery"
<el-form-item label="管理者ID" prop="manegerId"> />
<el-input v-model="queryParams.manegerId" placeholder="请输入管理者ID" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item label="创建时间" prop="createTime"> <el-form-item label="创建时间" prop="createTime">
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange" <el-date-picker
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" /> v-model="queryParams.createTime"
</el-form-item> style="width: 240px"
<el-form-item label="管理者姓名" prop="manegerName"> value-format="yyyy-MM-dd HH:mm:ss"
<el-input v-model="queryParams.manegerName" placeholder="请输入管理者姓名" clearable @keyup.enter.native="handleQuery"/> type="daterange"
</el-form-item> range-separator="-"
<el-form-item label="所属部门ID" prop="deptId"> start-placeholder="开始日期"
<el-input v-model="queryParams.deptId" placeholder="请输入所属部门ID" clearable @keyup.enter.native="handleQuery"/> end-placeholder="结束日期"
</el-form-item> :default-time="['00:00:00', '23:59:59']"
<el-form-item label="所属部门" prop="deptName"> />
<el-input v-model="queryParams.deptName" placeholder="请输入所属部门" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="业务实体ID" prop="companyId">
<el-input v-model="queryParams.companyId" placeholder="请输入业务实体ID" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="业务实体" prop="company">
<el-input v-model="queryParams.company" placeholder="请输入业务实体" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="queryParams.remark" placeholder="请输入备注" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="用户ID" prop="userId">
<el-input v-model="queryParams.userId" placeholder="请输入用户ID" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="立档单位名称" prop="organizationName">
<el-input v-model="queryParams.organizationName" placeholder="请输入立档单位名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="立档单位编码" prop="organizationCode">
<el-input v-model="queryParams.organizationCode" placeholder="请输入立档单位编码" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="立档单位名称" prop="organizationName">
<el-input
v-model="queryParams.organizationName"
placeholder="请输入立档单位名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -58,95 +64,158 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button
v-hasPermi="['setting:depot:create']">新增</el-button> type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['setting:depot:create']"
>新增</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" <el-button
v-hasPermi="['setting:depot:export']">导出</el-button> type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['setting:depot:export']"
>导出</el-button
>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column label="主键ID" align="center" prop="id" /> <!-- <el-table-column label="主键ID" align="center" prop="id" /> -->
<el-table-column label="库房名称" align="center" prop="name" /> <el-table-column label="库房名称" align="center" prop="name" />
<el-table-column label="库房编号" align="center" prop="code" /> <el-table-column label="库房编号" align="center" prop="code" />
<el-table-column label="库房地址" align="center" prop="address" /> <el-table-column label="库房地址" align="center" prop="address" />
<el-table-column label="立党单位id" align="center" prop="organizationId" /> <el-table-column label="管理者姓名" align="center" prop="manegerName" />
<el-table-column label="管理者ID" align="center" prop="manegerId" /> <el-table-column
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> label="立档单位名称"
align="center"
prop="organizationName"
/>
<el-table-column
label="创建时间"
align="center"
prop="createTime"
width="180"
>
<template v-slot="scope"> <template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="管理者姓名" align="center" prop="manegerName" />
<el-table-column label="所属部门ID" align="center" prop="deptId" />
<el-table-column label="所属部门" align="center" prop="deptName" />
<el-table-column label="业务实体ID" align="center" prop="companyId" />
<el-table-column label="业务实体" align="center" prop="company" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="用户ID" align="center" prop="userId" /> <el-table-column
<el-table-column label="立档单位名称" align="center" prop="organizationName" /> label="操作"
<el-table-column label="立档单位编码" align="center" prop="organizationCode" /> align="center"
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> class-name="small-padding fixed-width"
>
<template v-slot="scope"> <template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button
v-hasPermi="['setting:depot:update']">修改</el-button> size="mini"
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" type="text"
v-hasPermi="['setting:depot:delete']">删除</el-button> icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['setting:depot:update']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['setting:depot:delete']"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" <pagination
@pagination="getList"/> v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body> <el-dialog
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> :title="title"
<el-form-item label="库房名称" prop="name"> :visible.sync="open"
<el-input v-model="form.name" placeholder="请输入库房名称" /> width="1000px"
</el-form-item> append-to-body
<el-form-item label="库房编号" prop="code"> >
<el-input v-model="form.code" placeholder="请输入库房编号" /> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
</el-form-item> <el-row>
<el-form-item label="库房地址" prop="address"> <el-col :span="8">
<el-input v-model="form.address" placeholder="请输入库房地址" /> <el-form-item label="库房名称" prop="name">
</el-form-item> <el-input v-model="form.name" placeholder="请输入库房名称" />
<el-form-item label="立党单位id" prop="organizationId"> </el-form-item>
<el-input v-model="form.organizationId" placeholder="请输入立党单位id" /> </el-col>
</el-form-item> <el-col :span="8">
<el-form-item label="管理者ID" prop="manegerId"> <el-form-item label="库房编号" prop="code">
<el-input v-model="form.manegerId" placeholder="请输入管理者ID" /> <el-input v-model="form.code" placeholder="请输入库房编号" />
</el-form-item> </el-form-item>
<el-form-item label="管理者姓名" prop="manegerName"> </el-col>
<el-input v-model="form.manegerName" placeholder="请输入管理者姓名" /> <el-col :span="8">
</el-form-item> <el-form-item label="库房地址" prop="address">
<el-form-item label="所属部门ID" prop="deptId"> <el-input v-model="form.address" placeholder="请输入库房地址" />
<el-input v-model="form.deptId" placeholder="请输入所属部门ID" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="所属部门" prop="deptName"> </el-row>
<el-input v-model="form.deptName" placeholder="请输入所属部门" /> <el-row>
</el-form-item> <el-col :span="8">
<el-form-item label="业务实体ID" prop="companyId"> <el-form-item label="管理者姓名" prop="manegerName">
<el-input v-model="form.companyId" placeholder="请输入业务实体ID" /> <el-select
</el-form-item> v-model="form.manegerName"
<el-form-item label="业务实体" prop="company"> filterable
<el-input v-model="form.company" placeholder="请输入业务实体" /> placeholder="请选择管理者"
</el-form-item> >
<el-option
v-for="item in userOptions"
:key="item.id"
:value="item.id"
:label="item.username"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="立档单位" prop="organizationName">
<el-select
v-model="form.organizationName"
placeholder="请选择立档单位"
>
<el-option
v-for="item in organizationList"
:key="item.id"
:value="item.id"
:label="item.organizationName"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" /> <el-input
</el-form-item> v-model="form.remark"
<el-form-item label="用户ID" prop="userId"> type="textarea"
<el-input v-model="form.userId" placeholder="请输入用户ID" /> placeholder="请输入备注"
</el-form-item> />
<el-form-item label="立档单位名称" prop="organizationName">
<el-input v-model="form.organizationName" placeholder="请输入立档单位名称" />
</el-form-item>
<el-form-item label="立档单位编码" prop="organizationCode">
<el-input v-model="form.organizationCode" placeholder="请输入立档单位编码" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -158,12 +227,20 @@
</template> </template>
<script> <script>
import { createDepot, updateDepot, deleteDepot, getDepot, getDepotPage, exportDepotExcel } from "@/api/setting/depot"; import {
createDepot,
updateDepot,
deleteDepot,
getDepot,
getDepotPage,
exportDepotExcel,
} from "@/api/setting/depot";
import { getOrganizationPage } from "@/api/setting/organization";
import { listUser } from "@/api/system/user";
export default { export default {
name: "Depot", name: "Depot",
components: { components: {},
},
data() { data() {
return { return {
// //
@ -203,24 +280,39 @@ export default {
// //
form: {}, form: {},
// //
rules: { rules: {},
} organizationList: [], //
userOptions: [], //
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getOrganizationList();
this.getUserList();
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
// //
getDepotPage(this.queryParams).then(response => { getDepotPage(this.queryParams).then((response) => {
this.list = response.data.list; this.list = response.data.list;
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
}); });
}, },
//
getOrganizationList() {
getOrganizationPage().then((response) => {
this.organizationList = response.data.list;
});
},
//
getUserList() {
listUser().then((response) => {
this.userOptions = response.data.list;
});
},
/** 取消按钮 */ /** 取消按钮 */
cancel() { cancel() {
this.open = false; this.open = false;
@ -267,7 +359,7 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id; const id = row.id;
getDepot(id).then(response => { getDepot(id).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改库房管理"; this.title = "修改库房管理";
@ -275,13 +367,13 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (!valid) { if (!valid) {
return; return;
} }
// //
if (this.form.id != null) { if (this.form.id != null) {
updateDepot(this.form).then(response => { updateDepot(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@ -289,7 +381,7 @@ export default {
return; return;
} }
// //
createDepot(this.form).then(response => { createDepot(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@ -299,27 +391,35 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal.confirm('是否确认删除库房管理编号为"' + id + '"的数据项?').then(function() { this.$modal
.confirm('是否确认删除库房管理编号为"' + id + '"的数据项?')
.then(function () {
return deleteDepot(id); return deleteDepot(id);
}).then(() => { })
.then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); })
.catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
// //
let params = {...this.queryParams}; let params = { ...this.queryParams };
params.pageNo = undefined; params.pageNo = undefined;
params.pageSize = undefined; params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有库房管理数据项?').then(() => { this.$modal
.confirm("是否确认导出所有库房管理数据项?")
.then(() => {
this.exportLoading = true; this.exportLoading = true;
return exportDepotExcel(params); return exportDepotExcel(params);
}).then(response => { })
this.$download.excel(response, '库房管理.xls'); .then((response) => {
this.$download.excel(response, "库房管理.xls");
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); })
} .catch(() => {});
} },
},
}; };
</script> </script>

@ -1,50 +1,63 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
<el-form-item label="所属库房ID" prop="depotId"> :model="queryParams"
<el-input v-model="queryParams.depotId" placeholder="请输入所属库房ID" clearable @keyup.enter.native="handleQuery"/> ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="98px"
>
<el-form-item label="所属库房" prop="depotId">
<el-input
v-model="queryParams.depotId"
placeholder="请输入所属库房"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="柜子名称" prop="name"> <el-form-item label="柜子名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入柜子名称" clearable @keyup.enter.native="handleQuery"/> <el-input
v-model="queryParams.name"
placeholder="请输入柜子名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="柜子编号" prop="code"> <el-form-item label="柜子编号" prop="code">
<el-input v-model="queryParams.code" placeholder="请输入柜子编号" clearable @keyup.enter.native="handleQuery"/> <el-input
</el-form-item> v-model="queryParams.code"
<el-form-item label="库房地址" prop="address"> placeholder="请输入柜子编号"
<el-input v-model="queryParams.address" placeholder="请输入库房地址" clearable @keyup.enter.native="handleQuery"/> clearable
</el-form-item> @keyup.enter.native="handleQuery"
<el-form-item label="管理者ID" prop="manegerId"> />
<el-input v-model="queryParams.manegerId" placeholder="请输入管理者ID" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item label="创建时间" prop="createTime"> <el-form-item label="创建时间" prop="createTime">
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange" <el-date-picker
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" /> v-model="queryParams.createTime"
</el-form-item> style="width: 240px"
<el-form-item label="管理者姓名" prop="manegerName"> value-format="yyyy-MM-dd HH:mm:ss"
<el-input v-model="queryParams.manegerName" placeholder="请输入管理者姓名" clearable @keyup.enter.native="handleQuery"/> type="daterange"
</el-form-item> range-separator="-"
<el-form-item label="所属部门ID" prop="deptId"> start-placeholder="开始日期"
<el-input v-model="queryParams.deptId" placeholder="请输入所属部门ID" clearable @keyup.enter.native="handleQuery"/> end-placeholder="结束日期"
</el-form-item> :default-time="['00:00:00', '23:59:59']"
<el-form-item label="所属部门" prop="deptName"> />
<el-input v-model="queryParams.deptName" placeholder="请输入所属部门" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="业务实体ID" prop="companyId">
<el-input v-model="queryParams.companyId" placeholder="请输入业务实体ID" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="业务实体" prop="company">
<el-input v-model="queryParams.company" placeholder="请输入业务实体" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="用户ID" prop="userId">
<el-input v-model="queryParams.userId" placeholder="请输入用户ID" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="queryParams.remark" placeholder="请输入备注" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="管理者姓名" prop="manegerName">
<el-input
v-model="queryParams.manegerName"
placeholder="请输入管理者姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -52,87 +65,142 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button
v-hasPermi="['setting:depot-cabinet:create']">新增</el-button> type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['setting:depot-cabinet:create']"
>新增</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" <el-button
v-hasPermi="['setting:depot-cabinet:export']">导出</el-button> type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['setting:depot-cabinet:export']"
>导出</el-button
>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column label="主键ID" align="center" prop="id" /> <!-- <el-table-column label="所属库房ID" align="center" prop="depotId" /> -->
<el-table-column label="所属库房ID" align="center" prop="depotId" />
<el-table-column label="柜子名称" align="center" prop="name" /> <el-table-column label="柜子名称" align="center" prop="name" />
<el-table-column label="柜子编号" align="center" prop="code" /> <el-table-column label="柜子编号" align="center" prop="code" />
<el-table-column label="库房地址" align="center" prop="address" /> <el-table-column label="库房地址" align="center" prop="address" />
<el-table-column label="管理者ID" align="center" prop="manegerId" /> <el-table-column label="管理者姓名" align="center" prop="manegerName" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column
label="创建时间"
align="center"
prop="createTime"
width="180"
>
<template v-slot="scope"> <template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="管理者姓名" align="center" prop="manegerName" />
<el-table-column label="所属部门ID" align="center" prop="deptId" />
<el-table-column label="所属部门" align="center" prop="deptName" />
<el-table-column label="业务实体ID" align="center" prop="companyId" />
<el-table-column label="业务实体" align="center" prop="company" />
<el-table-column label="用户ID" align="center" prop="userId" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template v-slot="scope"> <template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button
v-hasPermi="['setting:depot-cabinet:update']">修改</el-button> size="mini"
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" type="text"
v-hasPermi="['setting:depot-cabinet:delete']">删除</el-button> icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['setting:depot-cabinet:update']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['setting:depot-cabinet:delete']"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" <pagination
@pagination="getList"/> v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body> <el-dialog
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> :title="title"
<el-form-item label="所属库房ID" prop="depotId"> :visible.sync="open"
<el-input v-model="form.depotId" placeholder="请输入所属库房ID" /> width="1000px"
</el-form-item> append-to-body
<el-form-item label="柜子名称" prop="name"> >
<el-input v-model="form.name" placeholder="请输入柜子名称" /> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
</el-form-item> <el-row>
<el-form-item label="柜子编号" prop="code"> <el-col :span="8">
<el-input v-model="form.code" placeholder="请输入柜子编号" /> <el-form-item label="柜子类型" prop="name">
</el-form-item> <el-input v-model="form.name" placeholder="请输入柜子类型" />
<el-form-item label="库房地址" prop="address"> </el-form-item>
<el-input v-model="form.address" placeholder="请输入库房地址" /> </el-col>
</el-form-item> <el-col :span="8">
<el-form-item label="管理者ID" prop="manegerId"> <el-form-item label="柜子编号" prop="code">
<el-input v-model="form.manegerId" placeholder="请输入管理者ID" /> <el-input v-model="form.code" placeholder="请输入柜子编号" />
</el-form-item> </el-form-item>
<el-form-item label="管理者姓名" prop="manegerName"> </el-col>
<el-input v-model="form.manegerName" placeholder="请输入管理者姓名" /> <el-col :span="8">
</el-form-item> <el-form-item label="柜子数量" prop="code">
<el-form-item label="所属部门ID" prop="deptId"> <el-input v-model="form.code" placeholder="请输入柜子数量" />
<el-input v-model="form.deptId" placeholder="请输入所属部门ID" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="所属部门" prop="deptName"> </el-row>
<el-input v-model="form.deptName" placeholder="请输入所属部门" /> <el-row>
</el-form-item> <el-col :span="8">
<el-form-item label="业务实体ID" prop="companyId"> <el-form-item label="库房地址" prop="address">
<el-input v-model="form.companyId" placeholder="请输入业务实体ID" /> <el-input v-model="form.address" placeholder="请输入库房地址" />
</el-form-item> </el-form-item>
<el-form-item label="业务实体" prop="company"> </el-col>
<el-input v-model="form.company" placeholder="请输入业务实体" /> <el-col :span="8">
</el-form-item> <el-form-item label="管理者姓名" prop="manegerName">
<el-form-item label="用户ID" prop="userId"> <el-select
<el-input v-model="form.userId" placeholder="请输入用户ID" /> v-model="form.manegerName"
</el-form-item> filterable
placeholder="请选择管理者"
>
<el-option
v-for="item in userOptions"
:key="item.id"
:value="item.id"
:label="item.username"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" /> <el-input
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -144,12 +212,20 @@
</template> </template>
<script> <script>
import { createDepotCabinet, updateDepotCabinet, deleteDepotCabinet, getDepotCabinet, getDepotCabinetPage, exportDepotCabinetExcel } from "@/api/setting/depotCabinet"; import {
createDepotCabinet,
updateDepotCabinet,
deleteDepotCabinet,
getDepotCabinet,
getDepotCabinetPage,
exportDepotCabinetExcel,
} from "@/api/setting/depotCabinet";
// import { getDepotPage } from "@/api/setting/depot";
import { listUser } from "@/api/system/user";
export default { export default {
name: "DepotCabinet", name: "DepotCabinet",
components: { components: {},
},
data() { data() {
return { return {
// //
@ -187,24 +263,31 @@ export default {
// //
form: {}, form: {},
// //
rules: { rules: {},
} userOptions: [], //
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getUserList();
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
// //
getDepotCabinetPage(this.queryParams).then(response => { getDepotCabinetPage(this.queryParams).then((response) => {
this.list = response.data.list; this.list = response.data.list;
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
}); });
}, },
//
getUserList() {
listUser().then((response) => {
this.userOptions = response.data.list;
});
},
/** 取消按钮 */ /** 取消按钮 */
cancel() { cancel() {
this.open = false; this.open = false;
@ -249,7 +332,7 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id; const id = row.id;
getDepotCabinet(id).then(response => { getDepotCabinet(id).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改档案柜管理"; this.title = "修改档案柜管理";
@ -257,13 +340,13 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (!valid) { if (!valid) {
return; return;
} }
// //
if (this.form.id != null) { if (this.form.id != null) {
updateDepotCabinet(this.form).then(response => { updateDepotCabinet(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@ -271,7 +354,7 @@ export default {
return; return;
} }
// //
createDepotCabinet(this.form).then(response => { createDepotCabinet(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@ -281,27 +364,35 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal.confirm('是否确认删除档案柜管理编号为"' + id + '"的数据项?').then(function() { this.$modal
.confirm('是否确认删除档案柜管理编号为"' + id + '"的数据项?')
.then(function () {
return deleteDepotCabinet(id); return deleteDepotCabinet(id);
}).then(() => { })
.then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); })
.catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
// //
let params = {...this.queryParams}; let params = { ...this.queryParams };
params.pageNo = undefined; params.pageNo = undefined;
params.pageSize = undefined; params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有档案柜管理数据项?').then(() => { this.$modal
.confirm("是否确认导出所有档案柜管理数据项?")
.then(() => {
this.exportLoading = true; this.exportLoading = true;
return exportDepotCabinetExcel(params); return exportDepotCabinetExcel(params);
}).then(response => { })
this.$download.excel(response, '档案柜管理.xls'); .then((response) => {
this.$download.excel(response, "档案柜管理.xls");
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); })
} .catch(() => {});
} },
},
}; };
</script> </script>

@ -1,41 +1,61 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="单位名称" prop="organizationName"> <el-form-item label="单位名称" prop="organizationName">
<el-input v-model="queryParams.organizationName" placeholder="请输入单位名称" clearable @keyup.enter.native="handleQuery"/> <el-input
v-model="queryParams.organizationName"
placeholder="请输入单位名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="单位编码" prop="organizationCode"> <el-form-item label="单位编码" prop="organizationCode">
<el-input v-model="queryParams.organizationCode" placeholder="请输入单位编码" clearable @keyup.enter.native="handleQuery"/> <el-input
v-model="queryParams.organizationCode"
placeholder="请输入单位编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="全宗号" prop="caseNum"> <el-form-item label="全宗号" prop="caseNum">
<el-input v-model="queryParams.caseNum" placeholder="请输入全宗号" clearable @keyup.enter.native="handleQuery"/> <el-select
</el-form-item> v-model="queryParams.caseNum"
<el-form-item label="备注" prop="remark"> placeholder="请选择全宗号"
<el-input v-model="queryParams.remark" placeholder="请输入备注" clearable @keyup.enter.native="handleQuery"/> clearable
>
<el-option
v-for="item in caseNumOptions"
:key="item.id"
:value="item.value"
:label="item.label"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="创建时间" prop="createTime"> <el-form-item label="创建时间" prop="createTime">
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange" <el-date-picker
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" /> v-model="queryParams.createTime"
</el-form-item> style="width: 240px"
<el-form-item label="所属部门id" prop="deptId"> value-format="yyyy-MM-dd HH:mm:ss"
<el-input v-model="queryParams.deptId" placeholder="请输入所属部门id" clearable @keyup.enter.native="handleQuery"/> type="daterange"
</el-form-item> range-separator="-"
<el-form-item label="所属部门" prop="deptName"> start-placeholder="开始日期"
<el-input v-model="queryParams.deptName" placeholder="请输入所属部门" clearable @keyup.enter.native="handleQuery"/> end-placeholder="结束日期"
</el-form-item> :default-time="['00:00:00', '23:59:59']"
<el-form-item label="用户id" prop="userId"> />
<el-input v-model="queryParams.userId" placeholder="请输入用户id" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="业务实体id" prop="companyId">
<el-input v-model="queryParams.companyId" placeholder="请输入业务实体id" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="业务实体" prop="company">
<el-input v-model="queryParams.company" placeholder="请输入业务实体" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -43,75 +63,139 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button
v-hasPermi="['setting:organization:create']">新增</el-button> type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['setting:organization:create']"
>新增</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" <el-button
v-hasPermi="['setting:organization:export']">导出</el-button> type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['setting:organization:export']"
>导出</el-button
>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column label="单位id" align="center" prop="id" /> <!-- <el-table-column label="单位id" align="center" prop="id" /> -->
<el-table-column label="单位名称" align="center" prop="organizationName" /> <el-table-column
<el-table-column label="单位编码" align="center" prop="organizationCode" /> label="单位名称"
align="center"
prop="organizationName"
/>
<el-table-column
label="单位编码"
align="center"
prop="organizationCode"
/>
<el-table-column label="全宗号" align="center" prop="caseNum" /> <el-table-column label="全宗号" align="center" prop="caseNum" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="用户id" align="center" prop="userId" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column
label="创建时间"
align="center"
prop="createTime"
width="180"
>
<template v-slot="scope"> <template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="所属部门id" align="center" prop="deptId" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="所属部门" align="center" prop="deptName" /> <el-table-column
<el-table-column label="用户id" align="center" prop="userId" /> label="操作"
<el-table-column label="业务实体id" align="center" prop="companyId" /> align="center"
<el-table-column label="业务实体" align="center" prop="company" /> class-name="small-padding fixed-width"
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> >
<template v-slot="scope"> <template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button
v-hasPermi="['setting:organization:update']">修改</el-button> size="mini"
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" type="text"
v-hasPermi="['setting:organization:delete']">删除</el-button> icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['setting:organization:update']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['setting:organization:delete']"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" <pagination
@pagination="getList"/> v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body> <el-dialog
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> :title="title"
<el-form-item label="单位名称" prop="organizationName"> :visible.sync="open"
<el-input v-model="form.organizationName" placeholder="请输入单位名称" /> width="1000px"
</el-form-item> append-to-body
<el-form-item label="单位编码" prop="organizationCode"> >
<el-input v-model="form.organizationCode" placeholder="请输入单位编码" /> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
</el-form-item> <el-row>
<el-form-item label="全宗号" prop="caseNum"> <el-col :span="8">
<el-input v-model="form.caseNum" placeholder="请输入全宗号" /> <el-form-item label="单位名称" prop="organizationName">
</el-form-item> <el-input
v-model="form.organizationName"
placeholder="请输入单位名称"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位编码" prop="organizationCode">
<el-input
v-model="form.organizationCode"
placeholder="请输入单位编码"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="全宗号" prop="caseNum">
<el-select v-model="form.caseNum" placeholder="请选择全宗号">
<el-option
v-for="item in caseNumOptions"
:key="item.id"
:value="item.value"
:label="item.label"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" /> <el-input
</el-form-item> v-model="form.remark"
<el-form-item label="所属部门id" prop="deptId"> type="textarea"
<el-input v-model="form.deptId" placeholder="请输入所属部门id" /> placeholder="请输入备注"
</el-form-item> />
<el-form-item label="所属部门" prop="deptName">
<el-input v-model="form.deptName" placeholder="请输入所属部门" />
</el-form-item>
<el-form-item label="用户id" prop="userId">
<el-input v-model="form.userId" placeholder="请输入用户id" />
</el-form-item>
<el-form-item label="业务实体id" prop="companyId">
<el-input v-model="form.companyId" placeholder="请输入业务实体id" />
</el-form-item>
<el-form-item label="业务实体" prop="company">
<el-input v-model="form.company" placeholder="请输入业务实体" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -123,12 +207,20 @@
</template> </template>
<script> <script>
import { createOrganization, updateOrganization, deleteOrganization, getOrganization, getOrganizationPage, exportOrganizationExcel } from "@/api/setting/organization"; import {
createOrganization,
updateOrganization,
deleteOrganization,
getOrganization,
getOrganizationPage,
exportOrganizationExcel,
} from "@/api/setting/organization";
import { listData } from "@/api/system/dict/data";
import { listUser } from "@/api/system/user";
export default { export default {
name: "Organization", name: "Organization",
components: { components: {},
},
data() { data() {
return { return {
// //
@ -164,23 +256,53 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
} organizationName: [
{ required: true, message: "立档单位名称不能为空", trigger: "blur" },
],
organizationCode: [
{ required: true, message: "立档单位编码不能为空", trigger: "blur" },
],
caseNum: [
{ required: true, message: "全宗号不能为空", trigger: "blur" },
],
},
caseNumOptions: [], //
userOptions: [], //
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.handleInitList();
this.getUserList();
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
// //
getOrganizationPage(this.queryParams).then(response => { getOrganizationPage(this.queryParams).then((response) => {
this.list = response.data.list; this.list = response.data.list;
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
}); });
}, },
//
handleInitList() {
//
listData({
pageNo: 1,
pageSize: 100,
dictType: "archives_case_num",
}).then((res) => {
this.caseNumOptions = res.data.list || [];
});
},
//
getUserList() {
listUser().then((response) => {
this.userOptions = response.data.list;
});
},
/** 取消按钮 */ /** 取消按钮 */
cancel() { cancel() {
this.open = false; this.open = false;
@ -222,7 +344,7 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id; const id = row.id;
getOrganization(id).then(response => { getOrganization(id).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改立档单位"; this.title = "修改立档单位";
@ -230,13 +352,13 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (!valid) { if (!valid) {
return; return;
} }
// //
if (this.form.id != null) { if (this.form.id != null) {
updateOrganization(this.form).then(response => { updateOrganization(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@ -244,7 +366,7 @@ export default {
return; return;
} }
// //
createOrganization(this.form).then(response => { createOrganization(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@ -254,27 +376,35 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal.confirm('是否确认删除立档单位编号为"' + id + '"的数据项?').then(function() { this.$modal
.confirm('是否确认删除立档单位编号为"' + id + '"的数据项?')
.then(function () {
return deleteOrganization(id); return deleteOrganization(id);
}).then(() => { })
.then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); })
.catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
// //
let params = {...this.queryParams}; let params = { ...this.queryParams };
params.pageNo = undefined; params.pageNo = undefined;
params.pageSize = undefined; params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有立档单位数据项?').then(() => { this.$modal
.confirm("是否确认导出所有立档单位数据项?")
.then(() => {
this.exportLoading = true; this.exportLoading = true;
return exportOrganizationExcel(params); return exportOrganizationExcel(params);
}).then(response => { })
this.$download.excel(response, '立档单位.xls'); .then((response) => {
this.$download.excel(response, "立档单位.xls");
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); })
} .catch(() => {});
} },
},
}; };
</script> </script>

Loading…
Cancel
Save