Commit 74a0ab2b608f21da1d96a9c5f4f0ee0e676a3e9a
1 parent
759061a7
增加权限控制
Showing
7 changed files
with
367 additions
and
6 deletions
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/WarehouseList.vue
@@ -234,7 +234,7 @@ | @@ -234,7 +234,7 @@ | ||
234 | deleteBatch: "/config/warehouse/deleteBatch", | 234 | deleteBatch: "/config/warehouse/deleteBatch", |
235 | exportXlsUrl: "/config/warehouse/exportXls", | 235 | exportXlsUrl: "/config/warehouse/exportXls", |
236 | importExcelUrl: "config/warehouse/importExcel", | 236 | importExcelUrl: "config/warehouse/importExcel", |
237 | - | 237 | + |
238 | }, | 238 | }, |
239 | dictOptions:{}, | 239 | dictOptions:{}, |
240 | superFieldList:[], | 240 | superFieldList:[], |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptDetailList.vue
@@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
62 | </template> | 62 | </template> |
63 | 63 | ||
64 | <span slot="action" slot-scope="text, record"> | 64 | <span slot="action" slot-scope="text, record"> |
65 | - <a @click="handleEdit(record)">编辑</a> | 65 | + <a @click="edit(record)">编辑</a> |
66 | <a-divider type="vertical" /> | 66 | <a-divider type="vertical" /> |
67 | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | 67 | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
68 | <a>删除</a> | 68 | <a>删除</a> |
@@ -73,6 +73,7 @@ | @@ -73,6 +73,7 @@ | ||
73 | </div> | 73 | </div> |
74 | 74 | ||
75 | <receiptDetail-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></receiptDetail-modal> | 75 | <receiptDetail-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></receiptDetail-modal> |
76 | + <receipt-detail-edit-modal ref="modalEditForm" @ok="modalFormOk" :mainId="mainId"></receipt-detail-edit-modal> | ||
76 | </a-card> | 77 | </a-card> |
77 | </template> | 78 | </template> |
78 | 79 | ||
@@ -80,11 +81,12 @@ | @@ -80,11 +81,12 @@ | ||
80 | 81 | ||
81 | import { JeecgListMixin } from '@/mixins/JeecgListMixin' | 82 | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
82 | import ReceiptDetailModal from './modules/ReceiptDetailModal' | 83 | import ReceiptDetailModal from './modules/ReceiptDetailModal' |
84 | + import ReceiptDetailEditModal from './modules/ReceiptDetailEditModal' | ||
83 | 85 | ||
84 | export default { | 86 | export default { |
85 | name: "ReceiptDetailList", | 87 | name: "ReceiptDetailList", |
86 | mixins:[JeecgListMixin], | 88 | mixins:[JeecgListMixin], |
87 | - components: { ReceiptDetailModal }, | 89 | + components: { ReceiptDetailEditModal, ReceiptDetailModal }, |
88 | props:{ | 90 | props:{ |
89 | mainId:{ | 91 | mainId:{ |
90 | type:String, | 92 | type:String, |
@@ -215,8 +217,12 @@ | @@ -215,8 +217,12 @@ | ||
215 | this.dataSource=[] | 217 | this.dataSource=[] |
216 | this.selectedRowKeys=[] | 218 | this.selectedRowKeys=[] |
217 | this.ipagination.current = 1 | 219 | this.ipagination.current = 1 |
218 | - } | ||
219 | - | 220 | + }, |
221 | + edit (record) { | ||
222 | + this.$refs.modalEditForm.edit(record); | ||
223 | + this.$refs.modalEditForm.title = "编辑"; | ||
224 | + this.$refs.modalEditForm.disableSubmit = false; | ||
225 | + }, | ||
220 | } | 226 | } |
221 | } | 227 | } |
222 | </script> | 228 | </script> |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptDetailEditModal.vue
0 → 100644
1 | +<template> | ||
2 | + <j-modal | ||
3 | + :title="title" | ||
4 | + :width="width" | ||
5 | + :visible="visible" | ||
6 | + :confirmLoading="confirmLoading" | ||
7 | + switchFullscreen | ||
8 | + @ok="handleOk" | ||
9 | + @cancel="handleCancel" | ||
10 | + cancelText="关闭"> | ||
11 | + <a-spin :spinning="confirmLoading"> | ||
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | ||
13 | + <a-row> | ||
14 | + <a-col :span="24"> | ||
15 | + <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode"> | ||
16 | + <a-input v-model="model.materialCode"placeholder="请输入物料编码" style="width: 100%" /> | ||
17 | + </a-form-model-item> | ||
18 | + </a-col> | ||
19 | + <a-col :span="24"> | ||
20 | + <a-form-model-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName"> | ||
21 | + <a-input v-model="model.materialName"placeholder="请输入物料名称" style="width: 100%" /> | ||
22 | + </a-form-model-item> | ||
23 | + </a-col> | ||
24 | + <a-col :span="24"> | ||
25 | + <a-form-model-item label="物料规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialSpec"> | ||
26 | + <a-input v-model="model.materialSpec"placeholder="请输入单据数量" style="width: 100%" /> | ||
27 | + </a-form-model-item> | ||
28 | + </a-col> | ||
29 | + <a-col :span="24"> | ||
30 | + <a-form-model-item label="物料单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialUnit"> | ||
31 | + <a-input v-model="model.materialUnit"placeholder="请输入物料单位" style="width: 100%" /> | ||
32 | + </a-form-model-item> | ||
33 | + </a-col> | ||
34 | + <a-col :span="24"> | ||
35 | + <a-form-model-item label="单据数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qty"> | ||
36 | + <a-input-number v-model="model.qty"placeholder="请输入单据数量" style="width: 100%" /> | ||
37 | + </a-form-model-item> | ||
38 | + </a-col> | ||
39 | + <a-col :span="24"> | ||
40 | + <a-form-model-item label="已收数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taskQty"> | ||
41 | + <a-input-number v-model="model.taskQty"placeholder="请输入已收数量" style="width: 100%" /> | ||
42 | + </a-form-model-item> | ||
43 | + </a-col> | ||
44 | + <a-col :span="24"> | ||
45 | + <a-form-model-item label="库存状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryStatus"> | ||
46 | + <j-dict-select-tag type="list" v-model="model.inventoryStatus" dictCode="inventory_status" placeholder="请选择库存状态" /> | ||
47 | + </a-form-model-item> | ||
48 | + </a-col> | ||
49 | + <a-col :span="24"> | ||
50 | + <a-form-model-item label="批次" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batch"> | ||
51 | + <a-input v-model="model.batch"placeholder="请输入批次" ></a-input> | ||
52 | + </a-form-model-item> | ||
53 | + </a-col> | ||
54 | + <a-col :span="24"> | ||
55 | + <a-form-model-item label="单据状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> | ||
56 | + <j-dict-select-tag type="list" v-model="model.status" dictCode="receipt_status" placeholder="请选择单据状态" /> | ||
57 | + </a-form-model-item> | ||
58 | + </a-col> | ||
59 | + </a-row> | ||
60 | + </a-form-model> | ||
61 | + </a-spin> | ||
62 | + </j-modal> | ||
63 | +</template> | ||
64 | + | ||
65 | +<script> | ||
66 | + | ||
67 | + import { httpAction } from '@/api/manage' | ||
68 | + import { validateDuplicateValue } from '@/utils/util' | ||
69 | + import {searchMaterialByCode} from '@/api/api' | ||
70 | + | ||
71 | + export default { | ||
72 | + name: "ReceiptDetailEditModal", | ||
73 | + components: { | ||
74 | + }, | ||
75 | + props:{ | ||
76 | + mainId:{ | ||
77 | + type:String, | ||
78 | + required:false, | ||
79 | + default:'' | ||
80 | + } | ||
81 | + }, | ||
82 | + data () { | ||
83 | + return { | ||
84 | + title:"操作", | ||
85 | + width:800, | ||
86 | + visible: false, | ||
87 | + materialList:{}, | ||
88 | + querySource:{}, | ||
89 | + model:{ | ||
90 | + }, | ||
91 | + labelCol: { | ||
92 | + xs: { span: 24 }, | ||
93 | + sm: { span: 5 }, | ||
94 | + }, | ||
95 | + wrapperCol: { | ||
96 | + xs: { span: 24 }, | ||
97 | + sm: { span: 16 }, | ||
98 | + }, | ||
99 | + confirmLoading: false, | ||
100 | + validatorRules: { | ||
101 | + materialCode: [ | ||
102 | + { required: true, message: '请输入物料编码!'}, | ||
103 | + ], | ||
104 | + qty: [ | ||
105 | + { required: true, message: '请输入单据数量!'}, | ||
106 | + ], | ||
107 | + inventoryStatus: [ | ||
108 | + { required: true, message: '请输入库存状态!'}, | ||
109 | + ], | ||
110 | + }, | ||
111 | + url: { | ||
112 | + add: "/receipt/receiptHeader/addReceiptDetail", | ||
113 | + edit: "/receipt/receiptHeader/editReceiptDetail", | ||
114 | + } | ||
115 | + | ||
116 | + } | ||
117 | + }, | ||
118 | + created () { | ||
119 | + //备份model原始值 | ||
120 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
121 | + this.searchMaterial(); | ||
122 | + }, | ||
123 | + methods: { | ||
124 | + add () { | ||
125 | + this.edit(this.modelDefault); | ||
126 | + this.model.inventoryStatus = "good"; | ||
127 | + }, | ||
128 | + edit (record) { | ||
129 | + this.model = Object.assign({}, record); | ||
130 | + this.visible = true; | ||
131 | + }, | ||
132 | + close () { | ||
133 | + this.$emit('close'); | ||
134 | + this.visible = false; | ||
135 | + this.$refs.form.clearValidate(); | ||
136 | + }, | ||
137 | + searchMaterial() { | ||
138 | + const that = this; | ||
139 | + that.querySource.materialCode = that.model.materialCode; | ||
140 | + searchMaterialByCode(that.querySource).then((res) => { | ||
141 | + that.materialList = res.result; | ||
142 | + }) | ||
143 | + }, | ||
144 | + handleOk () { | ||
145 | + const that = this; | ||
146 | + // 触发表单验证 | ||
147 | + this.$refs.form.validate(valid => { | ||
148 | + if (valid) { | ||
149 | + that.confirmLoading = true; | ||
150 | + let httpurl = ''; | ||
151 | + let method = ''; | ||
152 | + if(!this.model.id){ | ||
153 | + httpurl+=this.url.add; | ||
154 | + method = 'post'; | ||
155 | + }else{ | ||
156 | + httpurl+=this.url.edit; | ||
157 | + method = 'put'; | ||
158 | + } | ||
159 | + this.model['receiptId'] = this.mainId | ||
160 | + httpAction(httpurl,this.model,method).then((res)=>{ | ||
161 | + if(res.success){ | ||
162 | + that.$message.success(res.message); | ||
163 | + that.$emit('ok'); | ||
164 | + }else{ | ||
165 | + that.$message.warning(res.message); | ||
166 | + } | ||
167 | + }).finally(() => { | ||
168 | + that.confirmLoading = false; | ||
169 | + that.close(); | ||
170 | + }) | ||
171 | + }else{ | ||
172 | + return false | ||
173 | + } | ||
174 | + }) | ||
175 | + }, | ||
176 | + handleCancel () { | ||
177 | + this.close() | ||
178 | + }, | ||
179 | + | ||
180 | + | ||
181 | + } | ||
182 | + } | ||
183 | +</script> |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptDetailModal.vue
@@ -116,7 +116,6 @@ | @@ -116,7 +116,6 @@ | ||
116 | searchMaterial() { | 116 | searchMaterial() { |
117 | const that = this; | 117 | const that = this; |
118 | that.querySource.materialCode = that.model.materialCode; | 118 | that.querySource.materialCode = that.model.materialCode; |
119 | - console.log("model.materialCode:" + that.model.materialCode); | ||
120 | searchMaterialByCode(that.querySource).then((res) => { | 119 | searchMaterialByCode(that.querySource).then((res) => { |
121 | that.materialList = res.result; | 120 | that.materialList = res.result; |
122 | }) | 121 | }) |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/modules/ShipmentDetailEditModal.vue
0 → 100644
1 | +<template> | ||
2 | + <j-modal | ||
3 | + :title="title" | ||
4 | + :width="width" | ||
5 | + :visible="visible" | ||
6 | + :confirmLoading="confirmLoading" | ||
7 | + switchFullscreen | ||
8 | + @ok="handleOk" | ||
9 | + @cancel="handleCancel" | ||
10 | + cancelText="关闭"> | ||
11 | + <a-spin :spinning="confirmLoading"> | ||
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | ||
13 | + <a-row> | ||
14 | + <a-form-model-item label="物料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode"> | ||
15 | + <j-search-select-tag | ||
16 | + v-model="model.materialCode" | ||
17 | + :dictOptions="materialList" | ||
18 | + :trigger-change="true" | ||
19 | + placeholder="请选择物料编码" | ||
20 | + @change="searchMaterial"> | ||
21 | + </j-search-select-tag> | ||
22 | + </a-form-model-item> | ||
23 | + <a-col :span="24"> | ||
24 | + <a-form-model-item label="单据数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qty"> | ||
25 | + <a-input-number v-model="model.qty"placeholder="请输入单据数量" style="width: 100%" /> | ||
26 | + </a-form-model-item> | ||
27 | + </a-col> | ||
28 | + <a-col :span="24"> | ||
29 | + <a-form-model-item label="库存状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryStatus"> | ||
30 | + <j-dict-select-tag type="list" v-model="model.inventoryStatus" dictCode="inventory_status" placeholder="请选择库存状态" /> | ||
31 | + </a-form-model-item> | ||
32 | + </a-col> | ||
33 | + <a-col :span="24"> | ||
34 | + <a-form-model-item label="批次" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batch"> | ||
35 | + <a-input v-model="model.batch"placeholder="请输入批次" ></a-input> | ||
36 | + </a-form-model-item> | ||
37 | + </a-col> | ||
38 | + </a-row> | ||
39 | + </a-form-model> | ||
40 | + </a-spin> | ||
41 | + </j-modal> | ||
42 | +</template> | ||
43 | + | ||
44 | +<script> | ||
45 | + | ||
46 | + import { httpAction } from '@/api/manage' | ||
47 | + import { validateDuplicateValue } from '@/utils/util' | ||
48 | + import {searchMaterialByCode} from '@/api/api' | ||
49 | + | ||
50 | + export default { | ||
51 | + name: "ShipmentDetailModal", | ||
52 | + components: { | ||
53 | + }, | ||
54 | + props:{ | ||
55 | + mainId:{ | ||
56 | + type:String, | ||
57 | + required:false, | ||
58 | + default:'' | ||
59 | + } | ||
60 | + }, | ||
61 | + data () { | ||
62 | + return { | ||
63 | + title:"操作", | ||
64 | + width:800, | ||
65 | + visible: false, | ||
66 | + materialList:{}, | ||
67 | + querySource:{}, | ||
68 | + model:{ | ||
69 | + }, | ||
70 | + labelCol: { | ||
71 | + xs: { span: 24 }, | ||
72 | + sm: { span: 5 }, | ||
73 | + }, | ||
74 | + wrapperCol: { | ||
75 | + xs: { span: 24 }, | ||
76 | + sm: { span: 16 }, | ||
77 | + }, | ||
78 | + | ||
79 | + confirmLoading: false, | ||
80 | + validatorRules: { | ||
81 | + materialCode: [ | ||
82 | + { required: true, message: '请输入物料编码!'}, | ||
83 | + ], | ||
84 | + qty: [ | ||
85 | + { required: true, message: '请输入单据数量!'}, | ||
86 | + ], | ||
87 | + inventoryStatus: [ | ||
88 | + { required: true, message: '请输入库存状态!'}, | ||
89 | + ], | ||
90 | + }, | ||
91 | + url: { | ||
92 | + add: "/shipment/shipmentHeader/addShipmentDetail", | ||
93 | + edit: "/shipment/shipmentHeader/editShipmentDetail", | ||
94 | + } | ||
95 | + | ||
96 | + } | ||
97 | + }, | ||
98 | + created () { | ||
99 | + //备份model原始值 | ||
100 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
101 | + this.searchMaterial(); | ||
102 | + }, | ||
103 | + methods: { | ||
104 | + add () { | ||
105 | + this.edit(this.modelDefault); | ||
106 | + this.model.inventoryStatus = "good"; | ||
107 | + }, | ||
108 | + edit (record) { | ||
109 | + this.model = Object.assign({}, record); | ||
110 | + this.visible = true; | ||
111 | + }, | ||
112 | + close () { | ||
113 | + this.$emit('close'); | ||
114 | + this.visible = false; | ||
115 | + this.$refs.form.clearValidate(); | ||
116 | + }, | ||
117 | + handleOk () { | ||
118 | + const that = this; | ||
119 | + // 触发表单验证 | ||
120 | + this.$refs.form.validate(valid => { | ||
121 | + if (valid) { | ||
122 | + that.confirmLoading = true; | ||
123 | + let httpurl = ''; | ||
124 | + let method = ''; | ||
125 | + if(!this.model.id){ | ||
126 | + httpurl+=this.url.add; | ||
127 | + method = 'post'; | ||
128 | + }else{ | ||
129 | + httpurl+=this.url.edit; | ||
130 | + method = 'put'; | ||
131 | + } | ||
132 | + this.model['shipmentId'] = this.mainId | ||
133 | + httpAction(httpurl,this.model,method).then((res)=>{ | ||
134 | + if(res.success){ | ||
135 | + that.$message.success(res.message); | ||
136 | + that.$emit('ok'); | ||
137 | + }else{ | ||
138 | + that.$message.warning(res.message); | ||
139 | + } | ||
140 | + }).finally(() => { | ||
141 | + that.confirmLoading = false; | ||
142 | + that.close(); | ||
143 | + }) | ||
144 | + }else{ | ||
145 | + return false | ||
146 | + } | ||
147 | + }) | ||
148 | + }, | ||
149 | + handleCancel () { | ||
150 | + this.close() | ||
151 | + }, | ||
152 | + searchMaterial() { | ||
153 | + const that = this; | ||
154 | + that.querySource.materialCode = that.model.materialCode; | ||
155 | + console.log("model.materialCode:" + that.model.materialCode); | ||
156 | + searchMaterialByCode(that.querySource).then((res) => { | ||
157 | + that.materialList = res.result; | ||
158 | + }) | ||
159 | + }, | ||
160 | + | ||
161 | + } | ||
162 | + } | ||
163 | +</script> |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/warehouse/controller/WarehouseController.java
@@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | ||
9 | import java.net.URLDecoder; | 9 | import java.net.URLDecoder; |
10 | import javax.servlet.http.HttpServletRequest; | 10 | import javax.servlet.http.HttpServletRequest; |
11 | import javax.servlet.http.HttpServletResponse; | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | ||
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
12 | import org.jeecg.common.api.vo.Result; | 14 | import org.jeecg.common.api.vo.Result; |
13 | import org.jeecg.common.system.query.QueryGenerator; | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | import org.jeecg.common.util.oConvertUtils; | 16 | import org.jeecg.common.util.oConvertUtils; |
@@ -81,6 +83,7 @@ public class WarehouseController extends JeecgController<Warehouse, IWarehouseSe | @@ -81,6 +83,7 @@ public class WarehouseController extends JeecgController<Warehouse, IWarehouseSe | ||
81 | @AutoLog(value = "仓库-添加") | 83 | @AutoLog(value = "仓库-添加") |
82 | @ApiOperation(value="仓库-添加", notes="仓库-添加") | 84 | @ApiOperation(value="仓库-添加", notes="仓库-添加") |
83 | @PostMapping(value = "/add") | 85 | @PostMapping(value = "/add") |
86 | + @RequiresPermissions("warehouse:add") | ||
84 | public Result<String> add(@RequestBody Warehouse warehouse) { | 87 | public Result<String> add(@RequestBody Warehouse warehouse) { |
85 | warehouseService.save(warehouse); | 88 | warehouseService.save(warehouse); |
86 | return Result.OK("添加成功!"); | 89 | return Result.OK("添加成功!"); |
@@ -95,6 +98,7 @@ public class WarehouseController extends JeecgController<Warehouse, IWarehouseSe | @@ -95,6 +98,7 @@ public class WarehouseController extends JeecgController<Warehouse, IWarehouseSe | ||
95 | @AutoLog(value = "仓库-编辑") | 98 | @AutoLog(value = "仓库-编辑") |
96 | @ApiOperation(value="仓库-编辑", notes="仓库-编辑") | 99 | @ApiOperation(value="仓库-编辑", notes="仓库-编辑") |
97 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 100 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
101 | + @RequiresPermissions("warehouse:edit") | ||
98 | public Result<String> edit(@RequestBody Warehouse warehouse) { | 102 | public Result<String> edit(@RequestBody Warehouse warehouse) { |
99 | warehouseService.updateById(warehouse); | 103 | warehouseService.updateById(warehouse); |
100 | return Result.OK("编辑成功!"); | 104 | return Result.OK("编辑成功!"); |
@@ -109,6 +113,7 @@ public class WarehouseController extends JeecgController<Warehouse, IWarehouseSe | @@ -109,6 +113,7 @@ public class WarehouseController extends JeecgController<Warehouse, IWarehouseSe | ||
109 | @AutoLog(value = "仓库-通过id删除") | 113 | @AutoLog(value = "仓库-通过id删除") |
110 | @ApiOperation(value="仓库-通过id删除", notes="仓库-通过id删除") | 114 | @ApiOperation(value="仓库-通过id删除", notes="仓库-通过id删除") |
111 | @DeleteMapping(value = "/delete") | 115 | @DeleteMapping(value = "/delete") |
116 | + @RequiresPermissions("warehouse:delete") | ||
112 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 117 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
113 | warehouseService.removeById(id); | 118 | warehouseService.removeById(id); |
114 | return Result.OK("删除成功!"); | 119 | return Result.OK("删除成功!"); |
@@ -123,6 +128,7 @@ public class WarehouseController extends JeecgController<Warehouse, IWarehouseSe | @@ -123,6 +128,7 @@ public class WarehouseController extends JeecgController<Warehouse, IWarehouseSe | ||
123 | @AutoLog(value = "仓库-批量删除") | 128 | @AutoLog(value = "仓库-批量删除") |
124 | @ApiOperation(value="仓库-批量删除", notes="仓库-批量删除") | 129 | @ApiOperation(value="仓库-批量删除", notes="仓库-批量删除") |
125 | @DeleteMapping(value = "/deleteBatch") | 130 | @DeleteMapping(value = "/deleteBatch") |
131 | + @RequiresPermissions("warehouse:delete") | ||
126 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 132 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
127 | this.warehouseService.removeByIds(Arrays.asList(ids.split(","))); | 133 | this.warehouseService.removeByIds(Arrays.asList(ids.split(","))); |
128 | return Result.OK("批量删除成功!"); | 134 | return Result.OK("批量删除成功!"); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentDetailServiceImpl.java
@@ -51,10 +51,14 @@ public class ShipmentDetailServiceImpl extends ServiceImpl<ShipmentDetailMapper, | @@ -51,10 +51,14 @@ public class ShipmentDetailServiceImpl extends ServiceImpl<ShipmentDetailMapper, | ||
51 | if(shipmentHeader == null) { | 51 | if(shipmentHeader == null) { |
52 | return Result.error("添加失败,没有找到出库单头"); | 52 | return Result.error("添加失败,没有找到出库单头"); |
53 | } | 53 | } |
54 | + if(shipmentHeader.getFirstStatus().intValue() != QuantityConstant.SHIPMENT_HEADER_BUILD) { | ||
55 | + return Result.error("添加失败,出库单非创建状态不能新增详情"); | ||
56 | + } | ||
54 | String shipmentCode = shipmentHeader.getCode(); | 57 | String shipmentCode = shipmentHeader.getCode(); |
55 | if(StringUtils.isEmpty(shipmentCode)) { | 58 | if(StringUtils.isEmpty(shipmentCode)) { |
56 | return Result.error("添加失败,没有找到出库单编码"); | 59 | return Result.error("添加失败,没有找到出库单编码"); |
57 | } | 60 | } |
61 | + | ||
58 | String warehouseCode = shipmentHeader.getWarehouseCode(); | 62 | String warehouseCode = shipmentHeader.getWarehouseCode(); |
59 | String companyCode = shipmentHeader.getCompanyCode(); | 63 | String companyCode = shipmentHeader.getCompanyCode(); |
60 | String materialCode = shipmentDetail.getMaterialCode(); | 64 | String materialCode = shipmentDetail.getMaterialCode(); |