新增档案设置

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) {
return request({

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

@ -79,6 +79,18 @@
>导出</el-button
>
</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
:showSearch.sync="showSearch"
@queryTable="getList"
@ -86,7 +98,12 @@
</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="frequency" />
<el-table-column label="档案类型" align="center" prop="fileType">
@ -115,7 +132,7 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</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="fileStatus">
<template v-slot="scope">
@ -128,7 +145,7 @@
<el-table-column label="借阅状态" align="center" prop="borrowStatus" />
<el-table-column label="鉴定状态" align="center" prop="identifyStatus" />
<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="操作"
@ -176,14 +193,27 @@
<el-row>
<el-col :span="8">
<el-form-item label="业务实体" prop="company">
<el-cascader
<!-- <el-cascader
v-model="companyArray"
:options="companyOptions"
:props="propName"
placeholder="请选择业务实体"
clearable
@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-col>
<el-col :span="8">
@ -240,8 +270,14 @@
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="全宗号" prop="company">
<el-select
<el-form-item label="全宗号" prop="caseNum">
<el-input
v-model="form.caseNum"
placeholder="选择业务实体后自动带入"
readonly
@change="changeCaseNum"
/>
<!-- <el-select
v-model="form.caseNum"
placeholder="请选择全宗号"
@change="changeCaseNum"
@ -253,7 +289,7 @@
:label="item.label"
>
</el-option>
</el-select>
</el-select> -->
</el-form-item>
</el-col>
<el-col :span="8">
@ -275,14 +311,21 @@
</el-col>
<el-col :span="8">
<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-col>
</el-row>
<el-row>
<el-col :span="8">
<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-col>
<el-col :span="8">
@ -290,13 +333,13 @@
<el-input v-model="form.flowId" placeholder="请输入关联号" />
</el-form-item>
</el-col>
<el-col :span="8">
<!-- <el-col :span="8">
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-col> -->
</el-row>
<el-row>
<el-col :span="8">
@ -305,63 +348,40 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="归档状态" prop="fileStatus">
<el-select v-model="form.fileStatus" placeholder="请选择归档状态">
<el-option
v-for="item in fileStatusOptions"
:key="item.id"
:value="item.value"
:label="item.label"
>
</el-option>
</el-select>
<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-col :span="8">
<!-- <el-col :span="8">
<el-form-item label="借阅状态" prop="borrowStatus">
<el-radio-group v-model="form.borrowStatus">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-col> -->
</el-row>
<el-row>
<el-col :span="8">
<!-- <el-col :span="8">
<el-form-item label="鉴定状态" prop="identifyStatus">
<el-radio-group v-model="form.identifyStatus">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
</el-col> -->
</el-row>
<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-input
v-model="form.remark"
type="textarea"
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-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -380,9 +400,12 @@ import {
getRecordPage,
exportRecordExcel,
createCodeRule,
archivesRecord,
} from "@/api/archives/record";
import { listDept } from "@/api/system/dept";
// import { listDept } from "@/api/system/dept";
import { listData } from "@/api/system/dict/data";
import { getSiteTree } from "@/api/setting/organization";
import { getOrganizationPage } from "@/api/setting/organization";
export default {
name: "Record",
@ -395,10 +418,19 @@ export default {
value: "id",
multiple: false,
},
propName1: {
label: "pName",
value: "pId",
multiple: false,
},
companyOptions: [], //
companyArray: [], //
siteOptions: [], //
siteArray: [], //
//
loading: true,
//
multiple: true,
//
exportLoading: false,
//
@ -442,21 +474,28 @@ export default {
attr3: null,
attr4: null,
userId: null,
organizationId: null, //
depotId: null, //
cabinetId: null, //
},
//
form: {},
Fileform: {},
//
ids: [],
//
rules: {},
fileTypeOptions: [], //
fileStatusOptions: [], //
catalogNumOptions: [], //
caseNumOptions: [], //
organizationList: [],
};
},
created() {
this.getList();
this.getCompanyList();
this.getOrganizationList();
this.getSiteList();
this.handleInitList();
},
methods: {
@ -470,17 +509,35 @@ export default {
this.loading = false;
});
},
//
getCompanyList() {
listDept().then((response) => {
this.companyOptions = this.handleTree(response.data, "id", "parentId");
console.log(this.companyOptions);
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.multiple = !selection.length;
},
// //
// 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) {
console.log(value, value[value.length - 1]);
this.form.companyId = value[value.length - 1]; //id
handleCompanyChange(val) {
var data = this.organizationList.find((item) => item.id == val);
console.log(data);
this.form.caseNum = data.caseNum;
this.Fileform.caseNum = data.caseNum;
},
//
handleInitList() {
//
@ -516,23 +573,60 @@ export default {
this.fileStatusOptions = res.data.list || [];
});
},
changeCaseNum(val) {
this.Fileform.catalogNum = val;
//
changeCaseNum() {
if (this.Fileform.catalogNum != null && this.Fileform.caseNum != null) {
this.creatFilesNum();
}
},
//
changeCatalogNum(val) {
this.Fileform.caseNum = val;
this.Fileform.catalogNum = val;
console.log(this.Fileform);
if (this.Fileform.catalogNum != null && this.Fileform.caseNum != null) {
this.creatFilesNum();
}
},
//
creatFilesNum() {
createCodeRule(this.Fileform).then((response) => {
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() {
this.open = false;
@ -574,6 +668,7 @@ export default {
caseNum: null,
};
this.companyArray = [];
this.siteArray = [];
this.resetForm("form");
},
/** 搜索按钮操作 */
@ -598,6 +693,10 @@ export default {
const id = row.id;
getRecord(id).then((response) => {
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.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) {
const id = row.id;

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

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

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

Loading…
Cancel
Save