Commit f134a85023541a164769d8c8a26deba68b7a94a0
1 parent
f9b85463
优化快速入库页面,容器选取
Showing
5 changed files
with
111 additions
and
15 deletions
ant-design-vue-jeecg/src/components/jeecgbiz/JSelectMultiAllEmptyContainer.vue
0 → 100644
1 | +<template> | |
2 | + <!-- 定义在这里的参数都是不可在外部覆盖的,防止出现问题 --> | |
3 | + <j-select-biz-component | |
4 | + :value="value" | |
5 | + :multiple="false" | |
6 | + :ellipsisLength="25" | |
7 | + :listUrl="url.list" | |
8 | + :columns="columns" | |
9 | + v-on="$listeners" | |
10 | + v-bind="attrs" | |
11 | + /> | |
12 | + | |
13 | + | |
14 | +</template> | |
15 | + | |
16 | +<script> | |
17 | +import JDate from '@comp/jeecg/JDate' | |
18 | +import JSelectBizComponent from './JSelectBizComponent' | |
19 | + | |
20 | +export default { | |
21 | + name: 'JSelectMultiAllEmptyContainer', | |
22 | + components: {JDate, JSelectBizComponent}, | |
23 | + props: { | |
24 | + value: null, // any type | |
25 | + queryConfig: { | |
26 | + type: Array, | |
27 | + default: () => [] | |
28 | + }, | |
29 | + }, | |
30 | + data() { | |
31 | + return { | |
32 | + url: {list: '/config/container/getEmptyAllContainer'}, | |
33 | + columns: [ | |
34 | + {title: '容器编码', align: 'center', width: '25%', dataIndex: 'code'}, | |
35 | + {title: '库位编码', align: 'center', width: '25%', dataIndex: 'locationCode'}, | |
36 | + {title: '容器类型', align: 'center', width: '20%', dataIndex: 'containerTypeCode'}, | |
37 | + {title: '填充状态', align: 'center', width: '20%', dataIndex: 'fillStatus'} | |
38 | + ], | |
39 | + // 定义在这里的参数都是可以在外部传递覆盖的,可以更灵活的定制化使用的组件 | |
40 | + default: { | |
41 | + name: "编码", | |
42 | + width: 1200, | |
43 | + displayKey: 'code', | |
44 | + returnKeys: ['id', 'code'], | |
45 | + queryParamText: '容器编码', | |
46 | + }, | |
47 | + // 多条件查询配置 | |
48 | + queryConfigDefault: [ | |
49 | + { | |
50 | + key: 'locationCode', | |
51 | + label: '库位编码', | |
52 | + }, | |
53 | + ], | |
54 | + } | |
55 | + }, | |
56 | + computed: { | |
57 | + attrs() { | |
58 | + return Object.assign(this.default, this.$attrs, { | |
59 | + queryConfig: this.queryConfigDefault.concat(this.queryConfig) | |
60 | + }) | |
61 | + } | |
62 | + } | |
63 | +} | |
64 | +</script> | |
65 | + | |
66 | +<style lang="less" scoped></style> | |
0 | 67 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/task/modules/MaterialTaskModal.vue
1 | 1 | <template> |
2 | 2 | <a-modal |
3 | 3 | :title="title" |
4 | - :width="800" | |
4 | + :width="900" | |
5 | 5 | :visible="visible" |
6 | 6 | :maskClosable="false" |
7 | 7 | :confirmLoading="confirmLoading" |
... | ... | @@ -12,16 +12,18 @@ |
12 | 12 | <a-form-model ref="form" :label-col="labelCol" :wrapper-col="wrapperCol" :model="model"> |
13 | 13 | <!-- 主表单区域 --> |
14 | 14 | <a-row class="form-row" :gutter="0"> |
15 | - <a-col :lg="8"> | |
16 | - <a-form-model-item label="托盘号" :rules="[{ required: true, message: '请输入托盘号!' }]"> | |
17 | -<!-- <a-input placeholder="请输入托盘号" v-model="quickMainModel.containerCode"/>--> | |
18 | - <j-search-select-tag | |
19 | - placeholder="请输入托盘号" | |
20 | - v-model="quickMainModel.containerCode" | |
21 | - dict="container,code,code,status='empty'" | |
22 | - :pageSize="10" | |
23 | - :async="true"> | |
24 | - </j-search-select-tag> | |
15 | + <a-col :lg="10"> | |
16 | +<!-- <a-form-model-item label="托盘号" :rules="[{ required: true, message: '请输入托盘号!' }]"> --> | |
17 | +<!-- <j-search-select-tag--> | |
18 | +<!-- placeholder="请输入托盘号"--> | |
19 | +<!-- v-model="quickMainModel.containerCode"--> | |
20 | +<!-- dict="container,code,code,status='empty'"--> | |
21 | +<!-- :pageSize="10"--> | |
22 | +<!-- :async="true">--> | |
23 | +<!-- </j-search-select-tag>--> | |
24 | +<!-- </a-form-model-item>--> | |
25 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
26 | + <j-select-multi-all-empty-container v-model="quickMainModel.containerCode"></j-select-multi-all-empty-container> | |
25 | 27 | </a-form-model-item> |
26 | 28 | </a-col> |
27 | 29 | |
... | ... | @@ -61,9 +63,9 @@ |
61 | 63 | <a-col :span="8"> |
62 | 64 | <a-form-model-item> |
63 | 65 | <j-search-select-tag |
64 | - placeholder="请做出你的选择" | |
66 | + placeholder="请选择" | |
65 | 67 | v-model="item.materialCode" |
66 | - dict="material,name,code" | |
68 | + :dict="'material,name,code '" | |
67 | 69 | :pageSize="5" |
68 | 70 | :async="true"> |
69 | 71 | </j-search-select-tag> |
... | ... | @@ -98,15 +100,16 @@ |
98 | 100 | import JEditableTable from '@/components/jeecg/JEditableTable' |
99 | 101 | import {execute, quickReceipt} from '@/api/api' |
100 | 102 | import JDate from '@/components/jeecg/JDate' |
103 | +import JSelectMultiAllEmptyContainer from "../../../../components/jeecgbiz/JSelectMultiAllEmptyContainer"; | |
101 | 104 | |
102 | 105 | export default { |
103 | 106 | name: 'MaterialTaskModal', |
104 | 107 | components: { |
105 | - JDate, JEditableTable | |
108 | + JDate, JEditableTable,JSelectMultiAllEmptyContainer | |
106 | 109 | }, |
107 | 110 | data() { |
108 | 111 | return { |
109 | - title: '操作', | |
112 | + title: '快速入库', | |
110 | 113 | visible: false, |
111 | 114 | confirmLoading: false, |
112 | 115 | model: {}, |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/controller/ContainerController.java
... | ... | @@ -31,6 +31,7 @@ import org.jeecg.modules.wms.config.container.service.IContainerService; |
31 | 31 | import org.jeecg.modules.wms.config.location.entity.Location; |
32 | 32 | import org.jeecg.modules.wms.config.location.service.ILocationService; |
33 | 33 | import org.jeecg.utils.StringUtils; |
34 | +import org.jeecg.utils.constant.QuantityConstant; | |
34 | 35 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
35 | 36 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
36 | 37 | import org.jeecgframework.poi.excel.entity.ExportParams; |
... | ... | @@ -206,4 +207,18 @@ public class ContainerController extends JeecgController<Container, IContainerSe |
206 | 207 | return super.importExcel(request, response, Container.class); |
207 | 208 | } |
208 | 209 | |
210 | + /** | |
211 | + * 选取空闲的托盘 | |
212 | + * @param container | |
213 | + * @return | |
214 | + */ | |
215 | + @AutoLog(value = "选取空闲的托盘") | |
216 | + @ApiOperation(value = "库位管理-选取空闲的托盘", notes = "库位管理-选取空闲的托盘") | |
217 | + @GetMapping(value = "/getEmptyAllContainer") | |
218 | + public Result getEmptyAllContainer(Container container, HttpServletRequest req) { | |
219 | + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); | |
220 | + List<Container>containerList=containerService.getEmptyAllContainer(container,warehouseCode); | |
221 | + return Result.OK(containerList); | |
222 | + } | |
223 | + | |
209 | 224 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/IContainerService.java
... | ... | @@ -34,5 +34,7 @@ public interface IContainerService extends IService<Container> { |
34 | 34 | |
35 | 35 | List<Container> getContainerListByStatus(String status, String warehouseCode); |
36 | 36 | |
37 | + List<Container> getEmptyAllContainer(Container container, String warehouseCode); | |
38 | + | |
37 | 39 | List<Container> getContainerListByCodeList(List<String> containerCodeList, String warehouseCode); |
38 | 40 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java
... | ... | @@ -178,4 +178,14 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container |
178 | 178 | return 0; |
179 | 179 | } |
180 | 180 | |
181 | + @Override | |
182 | + public List<Container> getEmptyAllContainer(Container container, String warehouseCode) { | |
183 | + LambdaQueryWrapper<Container>lambdaQueryWrapper=new LambdaQueryWrapper<>(); | |
184 | + lambdaQueryWrapper.eq(Container::getStatus,QuantityConstant.STATUS_CONTAINER_FILL_EMPTY) | |
185 | + .eq(Container::getWarehouseCode,warehouseCode) | |
186 | + .eq(StringUtils.isNotEmpty(container.getCode()),Container::getCode,container.getCode()) | |
187 | + .eq(StringUtils.isNotEmpty(container.getLocationCode()),Container::getLocationCode,container.getLocationCode()); | |
188 | + List<Container>list=this.list(lambdaQueryWrapper); | |
189 | + return list; | |
190 | + } | |
181 | 191 | } |
... | ... |