Commit 7a73609bb4efddc1498d16403b496a2af0d6c01e

Authored by yiming
1 parent 1ef3bf92

档案上架及下架

ruoyi-archives/src/main/resources/mapper/archives/ArchivesBoxMapper.xml
@@ -39,6 +39,7 @@ @@ -39,6 +39,7 @@
39 where apprvoal='4' 39 where apprvoal='4'
40 <if test="archivesBox.deportNodeId =='isNull'"> and deport_node_id is null</if> 40 <if test="archivesBox.deportNodeId =='isNull'"> and deport_node_id is null</if>
41 <if test="archivesBox.deportNodeId =='isNotNull'"> and deport_node_id is not null</if> 41 <if test="archivesBox.deportNodeId =='isNotNull'"> and deport_node_id is not null</if>
  42 + <if test="archivesBox.deportNodeId !='' and archivesBox.deportNodeId !='isNull' and archivesBox.deportNodeId !='isNotNull'"> and deport_node_id = #{archivesBox.deportNodeId}</if>
42 <if test="ids !=null and ids.length>0"> 43 <if test="ids !=null and ids.length>0">
43 and id in 44 and id in
44 <foreach item="id" collection="ids" open="(" separator="," close=")"> 45 <foreach item="id" collection="ids" open="(" separator="," close=")">
ruoyi-service/src/main/java/com/ruoyi/service/domain/DepotNode.java
@@ -40,7 +40,7 @@ public class DepotNode extends BaseEntity @@ -40,7 +40,7 @@ public class DepotNode extends BaseEntity
40 /** 删除标志(0代表存在 2代表删除) */ 40 /** 删除标志(0代表存在 2代表删除) */
41 private String delFlag; 41 private String delFlag;
42 42
43 - /** 是否是架子(0不是 1是) */ 43 + /** 是否是架子( 1是 2不是) */
44 private String nodeFlag; 44 private String nodeFlag;
45 45
46 /** 库位码 */ 46 /** 库位码 */
ruoyi-service/src/main/java/com/ruoyi/service/util/TreeSelect.java
@@ -24,6 +24,12 @@ public class TreeSelect implements Serializable @@ -24,6 +24,12 @@ public class TreeSelect implements Serializable
24 /** 节点名称 */ 24 /** 节点名称 */
25 private String label; 25 private String label;
26 26
  27 + /** 库位码 */
  28 + private String depotCode;
  29 +
  30 + private boolean disabled;
  31 +
  32 +
27 /** 子节点 */ 33 /** 子节点 */
28 @JsonInclude(JsonInclude.Include.NON_EMPTY) 34 @JsonInclude(JsonInclude.Include.NON_EMPTY)
29 private List<TreeSelect> children; 35 private List<TreeSelect> children;
@@ -38,6 +44,8 @@ public class TreeSelect implements Serializable @@ -38,6 +44,8 @@ public class TreeSelect implements Serializable
38 this.id = depotNode.getId(); 44 this.id = depotNode.getId();
39 this.label = depotNode.getNodeName(); 45 this.label = depotNode.getNodeName();
40 this.children = depotNode.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); 46 this.children = depotNode.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
  47 + this.depotCode = depotNode.getDepotCode();
  48 + this.disabled ="2".equalsIgnoreCase(depotNode.getNodeFlag());
41 } 49 }
42 50
43 51
@@ -78,4 +86,20 @@ public class TreeSelect implements Serializable @@ -78,4 +86,20 @@ public class TreeSelect implements Serializable
78 { 86 {
79 this.children = children; 87 this.children = children;
80 } 88 }
  89 +
  90 + public String getDepotCode() {
  91 + return depotCode;
  92 + }
  93 +
  94 + public void setDepotCode(String depotCode) {
  95 + this.depotCode = depotCode;
  96 + }
  97 +
  98 + public boolean isDisabled() {
  99 + return disabled;
  100 + }
  101 +
  102 + public void setDisabled(boolean disabled) {
  103 + this.disabled = disabled;
  104 + }
81 } 105 }
ruoyi-ui/src/api/service/depot.js
@@ -5,7 +5,7 @@ import {parseStrEmpty} from &quot;@/utils/ruoyi&quot;; @@ -5,7 +5,7 @@ import {parseStrEmpty} from &quot;@/utils/ruoyi&quot;;
5 // 查询库房树结构 5 // 查询库房树结构
6 export function treeselect() { 6 export function treeselect() {
7 return request({ 7 return request({
8 - url: '/service/depot/treeselect', 8 + url: '/service/depotNode/treeselect',
9 method: 'get' 9 method: 'get'
10 }) 10 })
11 } 11 }
ruoyi-ui/src/views/archives/box/filingindex.vue
@@ -334,6 +334,7 @@ export default { @@ -334,6 +334,7 @@ export default {
334 this.shelveType=1; 334 this.shelveType=1;
335 this.shelveOpen = true; 335 this.shelveOpen = true;
336 this.$nextTick(()=>{ 336 this.$nextTick(()=>{
  337 + this.$refs.shelve.clearCheck();
337 this.$refs.shelve.getList(); 338 this.$refs.shelve.getList();
338 }) 339 })
339 }, 340 },
@@ -342,6 +343,7 @@ export default { @@ -342,6 +343,7 @@ export default {
342 this.shelveType=2; 343 this.shelveType=2;
343 this.shelveOpen = true; 344 this.shelveOpen = true;
344 this.$nextTick(()=>{ 345 this.$nextTick(()=>{
  346 + this.$refs.shelve.clearCheck();
345 this.$refs.shelve.getList(); 347 this.$refs.shelve.getList();
346 }) 348 })
347 },handleCheckShelve(){ 349 },handleCheckShelve(){
ruoyi-ui/src/views/archives/box/shelveindex.vue
@@ -11,8 +11,9 @@ @@ -11,8 +11,9 @@
11 :default-expand-all=true 11 :default-expand-all=true
12 node-key="id" 12 node-key="id"
13 ref="tree" 13 ref="tree"
  14 + show-checkbox
14 highlight-current 15 highlight-current
15 - @node-click="handleNodeClick" 16 + @check="handleNodeClick"
16 /> 17 />
17 </div> 18 </div>
18 </el-col> 19 </el-col>
@@ -56,7 +57,6 @@ export default { @@ -56,7 +57,6 @@ export default {
56 single:true, 57 single:true,
57 loading: true, 58 loading: true,
58 list: [], 59 list: [],
59 - level:undefined,  
60 queryParams:{ 60 queryParams:{
61 depotNodeId:undefined 61 depotNodeId:undefined
62 }, 62 },
@@ -84,16 +84,25 @@ export default { @@ -84,16 +84,25 @@ export default {
84 }, 84 },
85 // 节点单击事件 85 // 节点单击事件
86 handleNodeClick(data) { 86 handleNodeClick(data) {
87 - this.level=data.level;  
88 - this.params.depotNodeId=data.dbId;  
89 - this.params.depotCode=data.label; 87 + this.clearCheck();
  88 + this.$refs.tree.setChecked(data.id,true,false);
  89 + this.params.depotNodeId=data.id;
  90 + this.params.depotCode=data.depotCode;
  91 + this.queryParams.deportNodeId=data.depotCode;
  92 + this.getList();
  93 + },
  94 + clearCheck(){
  95 + let arr=this.$refs.tree.getCheckedKeys(true);
  96 + arr.forEach(k=>{
  97 + this.$refs.tree.setChecked(k,false,false);
  98 + })
90 }, 99 },
91 getList() { 100 getList() {
92 this.loading = true; 101 this.loading = true;
93 if(this.shelveType==1){ 102 if(this.shelveType==1){
94 this.queryParams.deportNodeId='isNull' 103 this.queryParams.deportNodeId='isNull'
95 } 104 }
96 - else if(this.shelveType==2){ 105 + else if(this.shelveType==2 && this.queryParams.deportNodeId==undefined){
97 this.queryParams.deportNodeId='isNotNull' 106 this.queryParams.deportNodeId='isNotNull'
98 } 107 }
99 listByIds(this.queryParams,this.ids).then(response => { 108 listByIds(this.queryParams,this.ids).then(response => {
@@ -108,8 +117,8 @@ export default { @@ -108,8 +117,8 @@ export default {
108 this.multiple = !selection.length 117 this.multiple = !selection.length
109 }, 118 },
110 shelve(){ 119 shelve(){
111 - if(this.level!=6){  
112 - this.$message.error('只能上架节点') 120 + if(this.params.ids==undefined){
  121 + this.$modal.msgWarning("至少选择一条")
113 return; 122 return;
114 } 123 }
115 shelve(this.params).then(response => { 124 shelve(this.params).then(response => {
@@ -118,6 +127,10 @@ export default { @@ -118,6 +127,10 @@ export default {
118 }); 127 });
119 }, 128 },
120 shelveDown(){ 129 shelveDown(){
  130 + if(this.params.ids==undefined){
  131 + this.$modal.msgWarning("至少选择一条")
  132 + return;
  133 + }
121 shelveDown(this.params).then(response => { 134 shelveDown(this.params).then(response => {
122 this.$modal.msgSuccess("修改成功"); 135 this.$modal.msgSuccess("修改成功");
123 this.getList(); 136 this.getList();
ruoyi-ui/src/views/service/depotNode/index.vue
1 <template> 1 <template>
2 <div class="app-container"> 2 <div class="app-container">
3 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> 3 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
4 - <el-form-item label="部门名称" prop="nodeName"> 4 + <el-form-item label="库房名称" prop="nodeName">
5 <el-input 5 <el-input
6 v-model="queryParams.nodeName" 6 v-model="queryParams.nodeName"
7 - placeholder="请输入部门名称" 7 + placeholder="请输入库房名称"
8 clearable 8 clearable
9 @keyup.enter.native="handleQuery" 9 @keyup.enter.native="handleQuery"
10 /> 10 />
11 </el-form-item> 11 </el-form-item>
12 <el-form-item label="状态" prop="status"> 12 <el-form-item label="状态" prop="status">
13 - <el-select v-model="queryParams.status" placeholder="部门状态" clearable> 13 + <el-select v-model="queryParams.status" placeholder="库房状态" clearable>
14 <el-option 14 <el-option
15 v-for="dict in dict.type.sys_normal_disable" 15 v-for="dict in dict.type.sys_normal_disable"
16 :key="dict.value" 16 :key="dict.value"
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 icon="el-icon-plus" 33 icon="el-icon-plus"
34 size="mini" 34 size="mini"
35 @click="handleAdd" 35 @click="handleAdd"
36 - v-hasPermi="['system:dept:add']" 36 + v-hasPermi="['service:depotNode:add']"
37 >新增</el-button> 37 >新增</el-button>
38 </el-col> 38 </el-col>
39 <el-col :span="1.5"> 39 <el-col :span="1.5">
@@ -97,20 +97,20 @@ @@ -97,20 +97,20 @@
97 </el-table-column> 97 </el-table-column>
98 </el-table> 98 </el-table>
99 99
100 - <!-- 添加或修改部门对话框 --> 100 + <!-- 添加或修改库房对话框 -->
101 <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> 101 <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
102 <el-form ref="form" :model="form" :rules="rules" label-width="80px"> 102 <el-form ref="form" :model="form" :rules="rules" label-width="80px">
103 <el-row> 103 <el-row>
104 <el-col :span="24" v-if="form.parentId !== 0" > 104 <el-col :span="24" v-if="form.parentId !== 0" >
105 <el-form-item label="上级" prop="parentId" > 105 <el-form-item label="上级" prop="parentId" >
106 - <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" :disabled="type==2"/> 106 + <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级" :disabled="type==2"/>
107 </el-form-item> 107 </el-form-item>
108 </el-col> 108 </el-col>
109 </el-row> 109 </el-row>
110 <el-row> 110 <el-row>
111 <el-col :span="12"> 111 <el-col :span="12">
112 <el-form-item label="名称" prop="nodeName"> 112 <el-form-item label="名称" prop="nodeName">
113 - <el-input v-model="form.nodeName" placeholder="请输入部门名称" /> 113 + <el-input v-model="form.nodeName" placeholder="请输入库房名称" />
114 </el-form-item> 114 </el-form-item>
115 </el-col> 115 </el-col>
116 <el-col :span="12"> 116 <el-col :span="12">
@@ -132,7 +132,7 @@ @@ -132,7 +132,7 @@
132 </el-form-item> 132 </el-form-item>
133 </el-col> 133 </el-col>
134 <el-col :span="12"> 134 <el-col :span="12">
135 - <el-form-item label="部门状态"> 135 + <el-form-item label="库房状态">
136 <el-radio-group v-model="form.status"> 136 <el-radio-group v-model="form.status">
137 <el-radio 137 <el-radio
138 v-for="dict in dict.type.sys_normal_disable" 138 v-for="dict in dict.type.sys_normal_disable"
@@ -158,7 +158,7 @@ import Treeselect from &quot;@riophae/vue-treeselect&quot;; @@ -158,7 +158,7 @@ import Treeselect from &quot;@riophae/vue-treeselect&quot;;
158 import "@riophae/vue-treeselect/dist/vue-treeselect.css"; 158 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
159 159
160 export default { 160 export default {
161 - name: "Dept", 161 + name: "DepotNode",
162 dicts: ['sys_normal_disable','yes_no'], 162 dicts: ['sys_normal_disable','yes_no'],
163 components: { Treeselect }, 163 components: { Treeselect },
164 data() { 164 data() {
@@ -169,7 +169,7 @@ export default { @@ -169,7 +169,7 @@ export default {
169 showSearch: true, 169 showSearch: true,
170 // 表格树数据 170 // 表格树数据
171 deptList: [], 171 deptList: [],
172 - // 部门树选项 172 + // 库房树选项
173 deptOptions: [], 173 deptOptions: [],
174 // 弹出层标题 174 // 弹出层标题
175 title: "", 175 title: "",
@@ -189,27 +189,16 @@ export default { @@ -189,27 +189,16 @@ export default {
189 // 表单校验 189 // 表单校验
190 rules: { 190 rules: {
191 parentId: [ 191 parentId: [
192 - { required: true, message: "上级部门不能为空", trigger: "blur" } 192 + { required: true, message: "上级库房不能为空", trigger: "blur" }
193 ], 193 ],
194 nodeName: [ 194 nodeName: [
195 - { required: true, message: "部门名称不能为空", trigger: "blur" } 195 + { required: true, message: "库房名称不能为空", trigger: "blur" }
196 ], 196 ],
197 orderNum: [ 197 orderNum: [
198 { required: true, message: "显示排序不能为空", trigger: "blur" } 198 { required: true, message: "显示排序不能为空", trigger: "blur" }
199 ], 199 ],
200 - email: [  
201 - {  
202 - type: "email",  
203 - message: "请输入正确的邮箱地址",  
204 - trigger: ["blur", "change"]  
205 - }  
206 - ],  
207 - phone: [  
208 - {  
209 - pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,  
210 - message: "请输入正确的手机号码",  
211 - trigger: "blur"  
212 - } 200 + nodeFlag: [
  201 + { required: true, message: "档案架不能为空", trigger: "blur" }
213 ] 202 ]
214 }, 203 },
215 type:undefined 204 type:undefined
@@ -219,7 +208,7 @@ export default { @@ -219,7 +208,7 @@ export default {
219 this.getList(); 208 this.getList();
220 }, 209 },
221 methods: { 210 methods: {
222 - /** 查询部门列表 */ 211 + /** 查询库房列表 */
223 getList() { 212 getList() {
224 this.loading = true; 213 this.loading = true;
225 listDept(this.queryParams).then(response => { 214 listDept(this.queryParams).then(response => {
@@ -227,7 +216,7 @@ export default { @@ -227,7 +216,7 @@ export default {
227 this.loading = false; 216 this.loading = false;
228 }); 217 });
229 }, 218 },
230 - /** 转换部门数据结构 */ 219 + /** 转换库房数据结构 */
231 normalizer(node) { 220 normalizer(node) {
232 if (node.children && !node.children.length) { 221 if (node.children && !node.children.length) {
233 delete node.children; 222 delete node.children;
@@ -250,9 +239,7 @@ export default { @@ -250,9 +239,7 @@ export default {
250 parentId: undefined, 239 parentId: undefined,
251 nodeName: undefined, 240 nodeName: undefined,
252 orderNum: undefined, 241 orderNum: undefined,
253 - leader: undefined,  
254 - phone: undefined,  
255 - email: undefined, 242 + nodeFlag: undefined,
256 status: "0" 243 status: "0"
257 }; 244 };
258 this.resetForm("form"); 245 this.resetForm("form");
@@ -274,7 +261,7 @@ export default { @@ -274,7 +261,7 @@ export default {
274 this.form.parentId = row.id; 261 this.form.parentId = row.id;
275 } 262 }
276 this.open = true; 263 this.open = true;
277 - this.title = "添加部门"; 264 + this.title = "添加库房";
278 listDept().then(response => { 265 listDept().then(response => {
279 this.deptOptions = this.handleTree(response.data, "id"); 266 this.deptOptions = this.handleTree(response.data, "id");
280 }); 267 });