Commit 1c9e341c4b00531db25829e314c289090579b188
Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4.git into develop
Showing
20 changed files
with
1028 additions
and
48 deletions
ant-design-vue-jeecg/src/views/system/inventory/InventoryChildList.vue
0 → 100644
1 | +<template> | |
2 | + <a-card :bordered="false"> | |
3 | + <!-- 查询区域 --> | |
4 | + <div class="table-page-search-wrapper"> | |
5 | + <a-form layout="inline" @keyup.enter.native="searchQuery"> | |
6 | + <a-row :gutter="24"> | |
7 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
8 | + <a-form-item label="货主"> | |
9 | + <a-input placeholder="请输入货主" v-model="queryParam.companyCode"></a-input> | |
10 | + </a-form-item> | |
11 | + </a-col> | |
12 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
13 | + <a-form-item label="库区"> | |
14 | + <a-input placeholder="请输入库区" v-model="queryParam.zoneCode"></a-input> | |
15 | + </a-form-item> | |
16 | + </a-col> | |
17 | + <template v-if="toggleSearchStatus"> | |
18 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
19 | + <a-form-item label="容器状态"> | |
20 | + <j-dict-select-tag placeholder="请选择容器状态" v-model="queryParam.containerStatus" dictCode="container_status"/> | |
21 | + </a-form-item> | |
22 | + </a-col> | |
23 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
24 | + <a-form-item label="容器编码"> | |
25 | + <a-input placeholder="请输入容器编码" v-model="queryParam.containerCode"></a-input> | |
26 | + </a-form-item> | |
27 | + </a-col> | |
28 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
29 | + <a-form-item label="库位编码"> | |
30 | + <a-input placeholder="请输入库位编码" v-model="queryParam.locationCode"></a-input> | |
31 | + </a-form-item> | |
32 | + </a-col> | |
33 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
34 | + <a-form-item label="物料编码"> | |
35 | + <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input> | |
36 | + </a-form-item> | |
37 | + </a-col> | |
38 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
39 | + <a-form-item label="物料名称"> | |
40 | + <a-input placeholder="请输入物料名称" v-model="queryParam.materialName"></a-input> | |
41 | + </a-form-item> | |
42 | + </a-col> | |
43 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
44 | + <a-form-item label="物料规格"> | |
45 | + <a-input placeholder="请输入物料规格" v-model="queryParam.materialSpec"></a-input> | |
46 | + </a-form-item> | |
47 | + </a-col> | |
48 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
49 | + <a-form-item label="物料单位"> | |
50 | + <a-input placeholder="请输入物料单位" v-model="queryParam.materialUnit"></a-input> | |
51 | + </a-form-item> | |
52 | + </a-col> | |
53 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
54 | + <a-form-item label="库存状态"> | |
55 | + <j-dict-select-tag placeholder="请选择库存状态" v-model="queryParam.inventoryStatus" dictCode="inventory_status"/> | |
56 | + </a-form-item> | |
57 | + </a-col> | |
58 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
59 | + <a-form-item label="库龄(天)"> | |
60 | + <a-input placeholder="请输入库龄(天)" v-model="queryParam.inventoryAge"></a-input> | |
61 | + </a-form-item> | |
62 | + </a-col> | |
63 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
64 | + <a-form-item label="唯一号"> | |
65 | + <a-input placeholder="请输入唯一号" v-model="queryParam.uniqueCode"></a-input> | |
66 | + </a-form-item> | |
67 | + </a-col> | |
68 | + <a-col :xl="10" :lg="11" :md="12" :sm="24"> | |
69 | + <a-form-item label="创建日期"> | |
70 | + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.createTime_begin"></j-date> | |
71 | + <span class="query-group-split-cust"></span> | |
72 | + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.createTime_end"></j-date> | |
73 | + </a-form-item> | |
74 | + </a-col> | |
75 | + </template> | |
76 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
77 | + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | |
78 | + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | |
79 | + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | |
80 | + <a @click="handleToggleSearch" style="margin-left: 8px"> | |
81 | + {{ toggleSearchStatus ? '收起' : '展开' }} | |
82 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |
83 | + </a> | |
84 | + </span> | |
85 | + </a-col> | |
86 | + </a-row> | |
87 | + </a-form> | |
88 | + </div> | |
89 | + <!-- 查询区域-END --> | |
90 | + | |
91 | + <!-- 操作按钮区域 --> | |
92 | + <div class="table-operator"> | |
93 | + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> | |
94 | + <a-button type="primary" icon="download" @click="handleExportXls('库存明细')">导出</a-button> | |
95 | + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | |
96 | + <a-button type="primary" icon="import">导入</a-button> | |
97 | + </a-upload> | |
98 | + <!-- 高级查询区域 --> | |
99 | + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> | |
100 | + <a-dropdown v-if="selectedRowKeys.length > 0"> | |
101 | + <a-menu slot="overlay"> | |
102 | + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | |
103 | + </a-menu> | |
104 | + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | |
105 | + </a-dropdown> | |
106 | + </div> | |
107 | + | |
108 | + <!-- table区域-begin --> | |
109 | + <div> | |
110 | + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | |
111 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | |
112 | + <a style="margin-left: 24px" @click="onClearSelected">清空</a> | |
113 | + </div> | |
114 | + | |
115 | + <a-table | |
116 | + ref="table" | |
117 | + size="middle" | |
118 | + :scroll="{x:true}" | |
119 | + bordered | |
120 | + rowKey="id" | |
121 | + :columns="columns" | |
122 | + :dataSource="dataSource" | |
123 | + :pagination="ipagination" | |
124 | + :loading="loading" | |
125 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | |
126 | + class="j-table-force-nowrap" | |
127 | + @change="handleTableChange"> | |
128 | + | |
129 | + <template slot="htmlSlot" slot-scope="text"> | |
130 | + <div v-html="text"></div> | |
131 | + </template> | |
132 | + <template slot="imgSlot" slot-scope="text"> | |
133 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |
134 | + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |
135 | + </template> | |
136 | + <template slot="fileSlot" slot-scope="text"> | |
137 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
138 | + <a-button | |
139 | + v-else | |
140 | + :ghost="true" | |
141 | + type="primary" | |
142 | + icon="download" | |
143 | + size="small" | |
144 | + @click="downloadFile(text)"> | |
145 | + 下载 | |
146 | + </a-button> | |
147 | + </template> | |
148 | + | |
149 | + <span slot="action" slot-scope="text, record"> | |
150 | + <a @click="handleEdit(record)">编辑</a> | |
151 | + | |
152 | + <a-divider type="vertical" /> | |
153 | + <a-dropdown> | |
154 | + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | |
155 | + <a-menu slot="overlay"> | |
156 | + <a-menu-item> | |
157 | + <a @click="handleDetail(record)">详情</a> | |
158 | + </a-menu-item> | |
159 | + <a-menu-item> | |
160 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
161 | + <a>删除</a> | |
162 | + </a-popconfirm> | |
163 | + </a-menu-item> | |
164 | + </a-menu> | |
165 | + </a-dropdown> | |
166 | + </span> | |
167 | + | |
168 | + </a-table> | |
169 | + </div> | |
170 | + | |
171 | + <inventory-child-modal ref="modalForm" @ok="modalFormOk"></inventory-child-modal> | |
172 | + </a-card> | |
173 | +</template> | |
174 | + | |
175 | +<script> | |
176 | + | |
177 | + import '@/assets/less/TableExpand.less' | |
178 | + import { mixinDevice } from '@/utils/mixin' | |
179 | + import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
180 | + import InventoryChildModal from './modules/InventoryChildModal' | |
181 | + import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |
182 | + | |
183 | + export default { | |
184 | + name: 'InventoryChildList', | |
185 | + mixins:[JeecgListMixin, mixinDevice], | |
186 | + components: { | |
187 | + InventoryChildModal | |
188 | + }, | |
189 | + data () { | |
190 | + return { | |
191 | + description: '库存明细管理页面', | |
192 | + // 表头 | |
193 | + columns: [ | |
194 | + { | |
195 | + title: '#', | |
196 | + dataIndex: '', | |
197 | + key:'rowIndex', | |
198 | + width:60, | |
199 | + align:"center", | |
200 | + customRender:function (t,r,index) { | |
201 | + return parseInt(index)+1; | |
202 | + } | |
203 | + }, | |
204 | + { | |
205 | + title:'货主', | |
206 | + align:"center", | |
207 | + dataIndex: 'companyCode' | |
208 | + }, | |
209 | + { | |
210 | + title:'库区', | |
211 | + align:"center", | |
212 | + dataIndex: 'zoneCode' | |
213 | + }, | |
214 | + { | |
215 | + title:'容器状态', | |
216 | + align:"center", | |
217 | + dataIndex: 'containerStatus_dictText' | |
218 | + }, | |
219 | + { | |
220 | + title:'容器编码', | |
221 | + align:"center", | |
222 | + dataIndex: 'containerCode' | |
223 | + }, | |
224 | + { | |
225 | + title:'库位编码', | |
226 | + align:"center", | |
227 | + dataIndex: 'locationCode' | |
228 | + }, | |
229 | + { | |
230 | + title:'物料编码', | |
231 | + align:"center", | |
232 | + dataIndex: 'materialCode' | |
233 | + }, | |
234 | + { | |
235 | + title:'物料名称', | |
236 | + align:"center", | |
237 | + dataIndex: 'materialName' | |
238 | + }, | |
239 | + { | |
240 | + title:'物料规格', | |
241 | + align:"center", | |
242 | + dataIndex: 'materialSpec' | |
243 | + }, | |
244 | + { | |
245 | + title:'物料单位', | |
246 | + align:"center", | |
247 | + dataIndex: 'materialUnit' | |
248 | + }, | |
249 | + { | |
250 | + title:'库存状态', | |
251 | + align:"center", | |
252 | + dataIndex: 'inventoryStatus_dictText' | |
253 | + }, | |
254 | + { | |
255 | + title:'库龄(天)', | |
256 | + align:"center", | |
257 | + dataIndex: 'inventoryAge' | |
258 | + }, | |
259 | + { | |
260 | + title:'唯一号', | |
261 | + align:"center", | |
262 | + dataIndex: 'uniqueCode' | |
263 | + }, | |
264 | + { | |
265 | + title:'创建人', | |
266 | + align:"center", | |
267 | + dataIndex: 'createBy' | |
268 | + }, | |
269 | + { | |
270 | + title:'创建日期', | |
271 | + align:"center", | |
272 | + dataIndex: 'createTime' | |
273 | + }, | |
274 | + { | |
275 | + title:'更新人', | |
276 | + align:"center", | |
277 | + dataIndex: 'updateBy' | |
278 | + }, | |
279 | + { | |
280 | + title:'更新日期', | |
281 | + align:"center", | |
282 | + dataIndex: 'updateTime' | |
283 | + }, | |
284 | + { | |
285 | + title: '操作', | |
286 | + dataIndex: 'action', | |
287 | + align:"center", | |
288 | + fixed:"right", | |
289 | + width:147, | |
290 | + scopedSlots: { customRender: 'action' } | |
291 | + } | |
292 | + ], | |
293 | + url: { | |
294 | + list: "/inventory/inventoryChild/list", | |
295 | + delete: "/inventory/inventoryChild/delete", | |
296 | + deleteBatch: "/inventory/inventoryChild/deleteBatch", | |
297 | + exportXlsUrl: "/inventory/inventoryChild/exportXls", | |
298 | + importExcelUrl: "inventory/inventoryChild/importExcel", | |
299 | + | |
300 | + }, | |
301 | + dictOptions:{}, | |
302 | + superFieldList:[], | |
303 | + } | |
304 | + }, | |
305 | + created() { | |
306 | + this.getSuperFieldList(); | |
307 | + }, | |
308 | + computed: { | |
309 | + importExcelUrl: function(){ | |
310 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |
311 | + }, | |
312 | + }, | |
313 | + methods: { | |
314 | + initDictConfig(){ | |
315 | + }, | |
316 | + getSuperFieldList(){ | |
317 | + let fieldList=[]; | |
318 | + fieldList.push({type:'string',value:'companyCode',text:'货主',dictCode:''}) | |
319 | + fieldList.push({type:'string',value:'zoneCode',text:'库区',dictCode:''}) | |
320 | + fieldList.push({type:'string',value:'containerStatus',text:'容器状态',dictCode:'container_status'}) | |
321 | + fieldList.push({type:'string',value:'containerCode',text:'容器编码',dictCode:''}) | |
322 | + fieldList.push({type:'string',value:'locationCode',text:'库位编码',dictCode:''}) | |
323 | + fieldList.push({type:'string',value:'materialCode',text:'物料编码',dictCode:''}) | |
324 | + fieldList.push({type:'string',value:'materialName',text:'物料名称',dictCode:''}) | |
325 | + fieldList.push({type:'string',value:'materialSpec',text:'物料规格',dictCode:''}) | |
326 | + fieldList.push({type:'string',value:'materialUnit',text:'物料单位',dictCode:''}) | |
327 | + fieldList.push({type:'string',value:'inventoryStatus',text:'库存状态',dictCode:'inventory_status'}) | |
328 | + fieldList.push({type:'int',value:'inventoryAge',text:'库龄(天)',dictCode:''}) | |
329 | + fieldList.push({type:'string',value:'uniqueCode',text:'唯一号',dictCode:''}) | |
330 | + fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''}) | |
331 | + fieldList.push({type:'datetime',value:'createTime',text:'创建日期'}) | |
332 | + fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''}) | |
333 | + fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'}) | |
334 | + this.superFieldList = fieldList | |
335 | + } | |
336 | + } | |
337 | + } | |
338 | +</script> | |
339 | +<style scoped> | |
340 | + @import '~@assets/less/common.less'; | |
341 | +</style> | |
0 | 342 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/modules/InventoryChildForm.vue
0 → 100644
1 | +<template> | |
2 | + <a-spin :spinning="confirmLoading"> | |
3 | + <j-form-container :disabled="formDisabled"> | |
4 | + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | |
5 | + <a-row> | |
6 | + <a-col :span="24"> | |
7 | + <a-form-model-item label="货主" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode"> | |
8 | + <a-input v-model="model.companyCode" placeholder="请输入货主" ></a-input> | |
9 | + </a-form-model-item> | |
10 | + </a-col> | |
11 | + <a-col :span="24"> | |
12 | + <a-form-model-item label="库区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zoneCode"> | |
13 | + <a-input v-model="model.zoneCode" placeholder="请输入库区" ></a-input> | |
14 | + </a-form-model-item> | |
15 | + </a-col> | |
16 | + <a-col :span="24"> | |
17 | + <a-form-model-item label="容器状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerStatus"> | |
18 | + <j-dict-select-tag type="list" v-model="model.containerStatus" dictCode="container_status" placeholder="请选择容器状态" /> | |
19 | + </a-form-model-item> | |
20 | + </a-col> | |
21 | + <a-col :span="24"> | |
22 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
23 | + <a-input v-model="model.containerCode" placeholder="请输入容器编码" ></a-input> | |
24 | + </a-form-model-item> | |
25 | + </a-col> | |
26 | + <a-col :span="24"> | |
27 | + <a-form-model-item label="库位编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationCode"> | |
28 | + <a-input v-model="model.locationCode" placeholder="请输入库位编码" ></a-input> | |
29 | + </a-form-model-item> | |
30 | + </a-col> | |
31 | + <a-col :span="24"> | |
32 | + <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode"> | |
33 | + <a-input v-model="model.materialCode" placeholder="请输入物料编码" ></a-input> | |
34 | + </a-form-model-item> | |
35 | + </a-col> | |
36 | + <a-col :span="24"> | |
37 | + <a-form-model-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName"> | |
38 | + <a-input v-model="model.materialName" placeholder="请输入物料名称" ></a-input> | |
39 | + </a-form-model-item> | |
40 | + </a-col> | |
41 | + <a-col :span="24"> | |
42 | + <a-form-model-item label="物料规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialSpec"> | |
43 | + <a-input v-model="model.materialSpec" placeholder="请输入物料规格" ></a-input> | |
44 | + </a-form-model-item> | |
45 | + </a-col> | |
46 | + <a-col :span="24"> | |
47 | + <a-form-model-item label="物料单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialUnit"> | |
48 | + <a-input v-model="model.materialUnit" placeholder="请输入物料单位" ></a-input> | |
49 | + </a-form-model-item> | |
50 | + </a-col> | |
51 | + <a-col :span="24"> | |
52 | + <a-form-model-item label="库存状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryStatus"> | |
53 | + <j-dict-select-tag type="list" v-model="model.inventoryStatus" dictCode="inventory_status" placeholder="请选择库存状态" /> | |
54 | + </a-form-model-item> | |
55 | + </a-col> | |
56 | + <a-col :span="24"> | |
57 | + <a-form-model-item label="库龄(天)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryAge"> | |
58 | + <a-input-number v-model="model.inventoryAge" placeholder="请输入库龄(天)" style="width: 100%" /> | |
59 | + </a-form-model-item> | |
60 | + </a-col> | |
61 | + <a-col :span="24"> | |
62 | + <a-form-model-item label="唯一号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="uniqueCode"> | |
63 | + <a-input v-model="model.uniqueCode" placeholder="请输入唯一号" ></a-input> | |
64 | + </a-form-model-item> | |
65 | + </a-col> | |
66 | + </a-row> | |
67 | + </a-form-model> | |
68 | + </j-form-container> | |
69 | + </a-spin> | |
70 | +</template> | |
71 | + | |
72 | +<script> | |
73 | + | |
74 | + import { httpAction, getAction } from '@/api/manage' | |
75 | + import { validateDuplicateValue } from '@/utils/util' | |
76 | + | |
77 | + export default { | |
78 | + name: 'InventoryChildForm', | |
79 | + components: { | |
80 | + }, | |
81 | + props: { | |
82 | + //表单禁用 | |
83 | + disabled: { | |
84 | + type: Boolean, | |
85 | + default: false, | |
86 | + required: false | |
87 | + } | |
88 | + }, | |
89 | + data () { | |
90 | + return { | |
91 | + model:{ | |
92 | + }, | |
93 | + labelCol: { | |
94 | + xs: { span: 24 }, | |
95 | + sm: { span: 5 }, | |
96 | + }, | |
97 | + wrapperCol: { | |
98 | + xs: { span: 24 }, | |
99 | + sm: { span: 16 }, | |
100 | + }, | |
101 | + confirmLoading: false, | |
102 | +validatorRules: { | |
103 | + materialCode: [ | |
104 | + { required: true, message: '请输入物料编码!'}, | |
105 | + ], | |
106 | + materialName: [ | |
107 | + { required: true, message: '请输入物料名称!'}, | |
108 | + ], | |
109 | + uniqueCode: [ | |
110 | + { required: true, message: '请输入唯一号!'}, | |
111 | + ], | |
112 | +}, | |
113 | + url: { | |
114 | + add: "/inventory/inventoryChild/add", | |
115 | + edit: "/inventory/inventoryChild/edit", | |
116 | + queryById: "/inventory/inventoryChild/queryById" | |
117 | + } | |
118 | + } | |
119 | + }, | |
120 | + computed: { | |
121 | + formDisabled(){ | |
122 | + return this.disabled | |
123 | + }, | |
124 | + }, | |
125 | + created () { | |
126 | + //备份model原始值 | |
127 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
128 | + }, | |
129 | + methods: { | |
130 | + add () { | |
131 | + this.edit(this.modelDefault); | |
132 | + }, | |
133 | + edit (record) { | |
134 | + this.model = Object.assign({}, record); | |
135 | + this.visible = true; | |
136 | + }, | |
137 | + submitForm () { | |
138 | + const that = this; | |
139 | + // 触发表单验证 | |
140 | + this.$refs.form.validate(valid => { | |
141 | + if (valid) { | |
142 | + that.confirmLoading = true; | |
143 | + let httpurl = ''; | |
144 | + let method = ''; | |
145 | + if(!this.model.id){ | |
146 | + httpurl+=this.url.add; | |
147 | + method = 'post'; | |
148 | + }else{ | |
149 | + httpurl+=this.url.edit; | |
150 | + method = 'put'; | |
151 | + } | |
152 | + httpAction(httpurl,this.model,method).then((res)=>{ | |
153 | + if(res.success){ | |
154 | + that.$message.success(res.message); | |
155 | + that.$emit('ok'); | |
156 | + }else{ | |
157 | + that.$message.warning(res.message); | |
158 | + } | |
159 | + }).finally(() => { | |
160 | + that.confirmLoading = false; | |
161 | + }) | |
162 | + } | |
163 | + | |
164 | + }) | |
165 | + }, | |
166 | + } | |
167 | + } | |
168 | +</script> | |
0 | 169 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/modules/InventoryChildModal.Style#Drawer.vue
0 → 100644
1 | +<template> | |
2 | + <a-drawer | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + placement="right" | |
6 | + :closable="false" | |
7 | + @close="close" | |
8 | + destroyOnClose | |
9 | + :visible="visible"> | |
10 | + <inventory-child-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></inventory-child-form> | |
11 | + <div class="drawer-footer"> | |
12 | + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> | |
13 | + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> | |
14 | + </div> | |
15 | + </a-drawer> | |
16 | +</template> | |
17 | + | |
18 | +<script> | |
19 | + | |
20 | + import InventoryChildForm from './InventoryChildForm' | |
21 | + | |
22 | + export default { | |
23 | + name: 'InventoryChildModal', | |
24 | + components: { | |
25 | + InventoryChildForm | |
26 | + }, | |
27 | + data () { | |
28 | + return { | |
29 | + title:"操作", | |
30 | + width:800, | |
31 | + visible: false, | |
32 | + disableSubmit: false | |
33 | + } | |
34 | + }, | |
35 | + methods: { | |
36 | + add () { | |
37 | + this.visible=true | |
38 | + this.$nextTick(()=>{ | |
39 | + this.$refs.realForm.add(); | |
40 | + }) | |
41 | + }, | |
42 | + edit (record) { | |
43 | + this.visible=true | |
44 | + this.$nextTick(()=>{ | |
45 | + this.$refs.realForm.edit(record); | |
46 | + }); | |
47 | + }, | |
48 | + close () { | |
49 | + this.$emit('close'); | |
50 | + this.visible = false; | |
51 | + }, | |
52 | + submitCallback(){ | |
53 | + this.$emit('ok'); | |
54 | + this.visible = false; | |
55 | + }, | |
56 | + handleOk () { | |
57 | + this.$refs.realForm.submitForm(); | |
58 | + }, | |
59 | + handleCancel () { | |
60 | + this.close() | |
61 | + } | |
62 | + } | |
63 | + } | |
64 | +</script> | |
65 | + | |
66 | +<style lang="less" scoped> | |
67 | +/** Button按钮间距 */ | |
68 | + .ant-btn { | |
69 | + margin-left: 30px; | |
70 | + margin-bottom: 30px; | |
71 | + float: right; | |
72 | + } | |
73 | + .drawer-footer{ | |
74 | + position: absolute; | |
75 | + bottom: -8px; | |
76 | + width: 100%; | |
77 | + border-top: 1px solid #e8e8e8; | |
78 | + padding: 10px 16px; | |
79 | + text-align: right; | |
80 | + left: 0; | |
81 | + background: #fff; | |
82 | + border-radius: 0 0 2px 2px; | |
83 | + } | |
84 | +</style> | |
0 | 85 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/modules/InventoryChildModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + switchFullscreen | |
7 | + @ok="handleOk" | |
8 | + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <inventory-child-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></inventory-child-form> | |
12 | + </j-modal> | |
13 | +</template> | |
14 | + | |
15 | +<script> | |
16 | + | |
17 | + import InventoryChildForm from './InventoryChildForm' | |
18 | + export default { | |
19 | + name: 'InventoryChildModal', | |
20 | + components: { | |
21 | + InventoryChildForm | |
22 | + }, | |
23 | + data () { | |
24 | + return { | |
25 | + title:'', | |
26 | + width:800, | |
27 | + visible: false, | |
28 | + disableSubmit: false | |
29 | + } | |
30 | + }, | |
31 | + methods: { | |
32 | + add () { | |
33 | + this.visible=true | |
34 | + this.$nextTick(()=>{ | |
35 | + this.$refs.realForm.add(); | |
36 | + }) | |
37 | + }, | |
38 | + edit (record) { | |
39 | + this.visible=true | |
40 | + this.$nextTick(()=>{ | |
41 | + this.$refs.realForm.edit(record); | |
42 | + }) | |
43 | + }, | |
44 | + close () { | |
45 | + this.$emit('close'); | |
46 | + this.visible = false; | |
47 | + }, | |
48 | + handleOk () { | |
49 | + this.$refs.realForm.submitForm(); | |
50 | + }, | |
51 | + submitCallback(){ | |
52 | + this.$emit('ok'); | |
53 | + this.visible = false; | |
54 | + }, | |
55 | + handleCancel () { | |
56 | + this.close() | |
57 | + } | |
58 | + } | |
59 | + } | |
60 | +</script> | |
0 | 61 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderList.vue
... | ... | @@ -178,7 +178,7 @@ |
178 | 178 | </template> |
179 | 179 | <span slot="action" slot-scope="text, record"> |
180 | 180 | <a-popconfirm v-has="'shipmentHeader:back'" v-if="record.lastStatus == 800" title="确定回传吗?" @confirm="() => hanleBack(record)"> |
181 | - <a>回传</a> | |
181 | + <a>回传<a-divider type="vertical"/></a> | |
182 | 182 | </a-popconfirm> |
183 | 183 | <a v-if="record.lastStatus < 800" @click="autoShipmentCombine(record)" v-has="'shipmentHeader:autoShipmentCombine'">自动配盘<a-divider type="vertical"/></a> |
184 | 184 | <a-dropdown> |
... | ... |
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
... | ... | @@ -21,7 +21,6 @@ |
21 | 21 | show-search |
22 | 22 | placeholder="请选择库区" |
23 | 23 | option-filter-prop="children" |
24 | - | |
25 | 24 | v-model="queryParam.zoneCode"> |
26 | 25 | <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code"> |
27 | 26 | {{item.name}} |
... | ... | @@ -142,20 +141,7 @@ |
142 | 141 | <a-divider type="vertical"/></a> |
143 | 142 | <a v-if="record.isDoubleIn == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleDoubleInTask(record)">修复重入数据 |
144 | 143 | <a-divider type="vertical"/></a> |
145 | - <a v-if="record.status < 100" v-has="'taskHeader:cancelTask'" @click="cancelTask(record)">取消<a-divider type="vertical"/></a> | |
146 | - <a-dropdown> | |
147 | - <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> | |
148 | - <a-menu slot="overlay"> | |
149 | - <a-menu-item v-has="'taskHeader:edit'"> | |
150 | - <a @click="handleEdit(record)">编辑</a> | |
151 | - </a-menu-item> | |
152 | - <a-menu-item v-has="'taskHeader:delete'"> | |
153 | - <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
154 | - <a>删除</a> | |
155 | - </a-popconfirm> | |
156 | - </a-menu-item> | |
157 | - </a-menu> | |
158 | - </a-dropdown> | |
144 | + <a v-if="record.status < 100" v-has="'taskHeader:cancelTask'" @click="cancelTask(record)" >取消</a> | |
159 | 145 | </span> |
160 | 146 | |
161 | 147 | </a-table> |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/IContainerService.java
... | ... | @@ -33,7 +33,7 @@ public interface IContainerService extends IService<Container> { |
33 | 33 | /** |
34 | 34 | * 判断系统是否已经有同样的库位号,如果有证明数据混乱了 |
35 | 35 | */ |
36 | - boolean havaLocationCodeByContainer(String locationCode, String warehouseCode); | |
36 | + boolean havaLocationCodeByContainer(String locationCode, String containerCode, String warehouseCode); | |
37 | 37 | |
38 | 38 | List<Container> getContainerListByCodeList(List<String> containCodeList, String warehouseCode); |
39 | 39 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java
... | ... | @@ -100,7 +100,7 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container |
100 | 100 | } |
101 | 101 | boolean success = false; |
102 | 102 | if (StringUtils.isNotEmpty(locationCode)) { |
103 | - success = havaLocationCodeByContainer(locationCode, warehouseCode); | |
103 | + success = havaLocationCodeByContainer(locationCode, containerCode, warehouseCode); | |
104 | 104 | if (success) { |
105 | 105 | throw new JeecgBootException("容器表已经存在这个库位号,不能再写入"); |
106 | 106 | } |
... | ... | @@ -133,9 +133,10 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container |
133 | 133 | } |
134 | 134 | |
135 | 135 | @Override |
136 | - public boolean havaLocationCodeByContainer(String locationCode, String warehouseCode) { | |
136 | + public boolean havaLocationCodeByContainer(String locationCode, String containerCode, String warehouseCode) { | |
137 | 137 | LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); |
138 | - containerLambdaQueryWrapper.eq(Container::getLocationCode, locationCode).eq(Container::getWarehouseCode, warehouseCode); | |
138 | + containerLambdaQueryWrapper.eq(Container::getLocationCode, locationCode).ne(Container::getCode, containerCode).eq(Container::getWarehouseCode, | |
139 | + warehouseCode); | |
139 | 140 | Container container = getOne(containerLambdaQueryWrapper); |
140 | 141 | if (container == null) { |
141 | 142 | return false; |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/ILocationService.java
... | ... | @@ -54,7 +54,7 @@ public interface ILocationService extends IService<Location> { |
54 | 54 | /** |
55 | 55 | * 判断系统是否已经有同样的托盘号,如果有证明数据混乱了 |
56 | 56 | */ |
57 | - boolean havaContainerCodeInLocation(String containerCode, String warehouseCode); | |
57 | + boolean havaContainerCodeInLocation(String containerCode, String locationCode, String warehouseCode); | |
58 | 58 | |
59 | 59 | List<Location> getContainerInLocation(String containerCode, String containerStatus, String locationCode, String warehouseCode); |
60 | 60 | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java
... | ... | @@ -114,7 +114,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i |
114 | 114 | boolean success = false; |
115 | 115 | // 如果这个托盘号已经在库位表里,那么不能再写入 |
116 | 116 | if (StringUtils.isNotEmpty(containerCode)) { |
117 | - success = havaContainerCodeInLocation(containerCode, warehouseCode); | |
117 | + success = havaContainerCodeInLocation(containerCode, locationCode, warehouseCode); | |
118 | 118 | if (success) { |
119 | 119 | throw new JeecgBootException("库位表已经存在这个容器号,不能再写入"); |
120 | 120 | } |
... | ... | @@ -359,9 +359,9 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i |
359 | 359 | } |
360 | 360 | |
361 | 361 | @Override |
362 | - public boolean havaContainerCodeInLocation(String containerCode, String warehouseCode) { | |
362 | + public boolean havaContainerCodeInLocation(String containerCode, String locationCode, String warehouseCode) { | |
363 | 363 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); |
364 | - locationLambdaQueryWrapper.eq(Location::getContainerCode, containerCode).eq(Location::getWarehouseCode, warehouseCode); | |
364 | + locationLambdaQueryWrapper.eq(Location::getContainerCode, containerCode).ne(Location::getCode, locationCode).eq(Location::getWarehouseCode, warehouseCode); | |
365 | 365 | Location location = getOne(locationLambdaQueryWrapper); |
366 | 366 | if (location == null) { |
367 | 367 | return false; |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryChild/controller/InventoryChildController.java
0 → 100644
1 | +package org.jeecg.modules.wms.inventory.inventoryChild.controller; | |
2 | + | |
3 | +import java.util.Arrays; | |
4 | + | |
5 | +import javax.servlet.http.HttpServletRequest; | |
6 | +import javax.servlet.http.HttpServletResponse; | |
7 | + | |
8 | +import org.jeecg.common.api.vo.Result; | |
9 | +import org.jeecg.common.aspect.annotation.AutoLog; | |
10 | +import org.jeecg.common.system.base.controller.JeecgController; | |
11 | +import org.jeecg.common.system.query.QueryGenerator; | |
12 | +import org.jeecg.modules.wms.inventory.inventoryChild.entity.InventoryChild; | |
13 | +import org.jeecg.modules.wms.inventory.inventoryChild.service.IInventoryChildService; | |
14 | +import org.springframework.beans.factory.annotation.Autowired; | |
15 | +import org.springframework.web.bind.annotation.*; | |
16 | +import org.springframework.web.servlet.ModelAndView; | |
17 | + | |
18 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
19 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
20 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
21 | + | |
22 | +import io.swagger.annotations.Api; | |
23 | +import io.swagger.annotations.ApiOperation; | |
24 | +import lombok.extern.slf4j.Slf4j; | |
25 | + | |
26 | +/** | |
27 | + * @Description: 库存明细 | |
28 | + * @Author: jeecg-boot | |
29 | + * @Date: 2023-03-24 | |
30 | + * @Version: V1.0 | |
31 | + */ | |
32 | +@Api(tags = "库存明细") | |
33 | +@RestController | |
34 | +@RequestMapping("/inventory/inventoryChild") | |
35 | +@Slf4j | |
36 | +public class InventoryChildController extends JeecgController<InventoryChild, IInventoryChildService> { | |
37 | + @Autowired | |
38 | + private IInventoryChildService inventoryChildService; | |
39 | + | |
40 | + /** | |
41 | + * 分页列表查询 | |
42 | + * @param inventoryChild | |
43 | + * @param pageNo | |
44 | + * @param pageSize | |
45 | + * @param req | |
46 | + * @return | |
47 | + */ | |
48 | + // @AutoLog(value = "库存明细-分页列表查询") | |
49 | + @ApiOperation(value = "库存明细-分页列表查询", notes = "库存明细-分页列表查询") | |
50 | + @GetMapping(value = "/list") | |
51 | + public Result<IPage<InventoryChild>> queryPageList(InventoryChild inventoryChild, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | |
52 | + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { | |
53 | + QueryWrapper<InventoryChild> queryWrapper = QueryGenerator.initQueryWrapper(inventoryChild, req.getParameterMap()); | |
54 | + Page<InventoryChild> page = new Page<InventoryChild>(pageNo, pageSize); | |
55 | + IPage<InventoryChild> pageList = inventoryChildService.page(page, queryWrapper); | |
56 | + return Result.OK(pageList); | |
57 | + } | |
58 | + | |
59 | + /** | |
60 | + * 添加 | |
61 | + * @param inventoryChild | |
62 | + * @return | |
63 | + */ | |
64 | + @AutoLog(value = "库存明细-添加") | |
65 | + @ApiOperation(value = "库存明细-添加", notes = "库存明细-添加") | |
66 | + @PostMapping(value = "/add") | |
67 | + public Result<String> add(@RequestBody InventoryChild inventoryChild) { | |
68 | + inventoryChildService.save(inventoryChild); | |
69 | + return Result.OK("添加成功!"); | |
70 | + } | |
71 | + | |
72 | + /** | |
73 | + * 编辑 | |
74 | + * @param inventoryChild | |
75 | + * @return | |
76 | + */ | |
77 | + @AutoLog(value = "库存明细-编辑") | |
78 | + @ApiOperation(value = "库存明细-编辑", notes = "库存明细-编辑") | |
79 | + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) | |
80 | + public Result<String> edit(@RequestBody InventoryChild inventoryChild) { | |
81 | + inventoryChildService.updateById(inventoryChild); | |
82 | + return Result.OK("编辑成功!"); | |
83 | + } | |
84 | + | |
85 | + /** | |
86 | + * 通过id删除 | |
87 | + * @param id | |
88 | + * @return | |
89 | + */ | |
90 | + @AutoLog(value = "库存明细-通过id删除") | |
91 | + @ApiOperation(value = "库存明细-通过id删除", notes = "库存明细-通过id删除") | |
92 | + @DeleteMapping(value = "/delete") | |
93 | + public Result<String> delete(@RequestParam(name = "id", required = true) String id) { | |
94 | + inventoryChildService.removeById(id); | |
95 | + return Result.OK("删除成功!"); | |
96 | + } | |
97 | + | |
98 | + /** | |
99 | + * 批量删除 | |
100 | + * @param ids | |
101 | + * @return | |
102 | + */ | |
103 | + @AutoLog(value = "库存明细-批量删除") | |
104 | + @ApiOperation(value = "库存明细-批量删除", notes = "库存明细-批量删除") | |
105 | + @DeleteMapping(value = "/deleteBatch") | |
106 | + public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { | |
107 | + this.inventoryChildService.removeByIds(Arrays.asList(ids.split(","))); | |
108 | + return Result.OK("批量删除成功!"); | |
109 | + } | |
110 | + | |
111 | + /** | |
112 | + * 通过id查询 | |
113 | + * @param id | |
114 | + * @return | |
115 | + */ | |
116 | + // @AutoLog(value = "库存明细-通过id查询") | |
117 | + @ApiOperation(value = "库存明细-通过id查询", notes = "库存明细-通过id查询") | |
118 | + @GetMapping(value = "/queryById") | |
119 | + public Result<InventoryChild> queryById(@RequestParam(name = "id", required = true) String id) { | |
120 | + InventoryChild inventoryChild = inventoryChildService.getById(id); | |
121 | + if (inventoryChild == null) { | |
122 | + return Result.error("未找到对应数据"); | |
123 | + } | |
124 | + return Result.OK(inventoryChild); | |
125 | + } | |
126 | + | |
127 | + /** | |
128 | + * 导出excel | |
129 | + * @param request | |
130 | + * @param inventoryChild | |
131 | + */ | |
132 | + @RequestMapping(value = "/exportXls") | |
133 | + public ModelAndView exportXls(HttpServletRequest request, InventoryChild inventoryChild) { | |
134 | + return super.exportXls(request, inventoryChild, InventoryChild.class, "库存明细"); | |
135 | + } | |
136 | + | |
137 | + /** | |
138 | + * 通过excel导入数据 | |
139 | + * @param request | |
140 | + * @param response | |
141 | + * @return | |
142 | + */ | |
143 | + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) | |
144 | + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | |
145 | + return super.importExcel(request, response, InventoryChild.class); | |
146 | + } | |
147 | + | |
148 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryChild/entity/InventoryChild.java
0 → 100644
1 | +package org.jeecg.modules.wms.inventory.inventoryChild.entity; | |
2 | + | |
3 | +import java.io.Serializable; | |
4 | +import java.io.UnsupportedEncodingException; | |
5 | +import java.util.Date; | |
6 | +import java.math.BigDecimal; | |
7 | +import com.baomidou.mybatisplus.annotation.IdType; | |
8 | +import com.baomidou.mybatisplus.annotation.TableId; | |
9 | +import com.baomidou.mybatisplus.annotation.TableName; | |
10 | +import lombok.Data; | |
11 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
12 | +import org.springframework.format.annotation.DateTimeFormat; | |
13 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
14 | +import org.jeecg.common.aspect.annotation.Dict; | |
15 | +import io.swagger.annotations.ApiModel; | |
16 | +import io.swagger.annotations.ApiModelProperty; | |
17 | +import lombok.EqualsAndHashCode; | |
18 | +import lombok.experimental.Accessors; | |
19 | + | |
20 | +/** | |
21 | + * @Description: 库存明细 | |
22 | + * @Author: jeecg-boot | |
23 | + * @Date: 2023-03-24 | |
24 | + * @Version: V1.0 | |
25 | + */ | |
26 | +@Data | |
27 | +@TableName("inventory_child") | |
28 | +@Accessors(chain = true) | |
29 | +@EqualsAndHashCode(callSuper = false) | |
30 | +@ApiModel(value="inventory_child对象", description="库存明细") | |
31 | +public class InventoryChild implements Serializable { | |
32 | + private static final long serialVersionUID = 1L; | |
33 | + | |
34 | + /**主键*/ | |
35 | + @TableId(type = IdType.ASSIGN_ID) | |
36 | + @ApiModelProperty(value = "主键") | |
37 | + private String id; | |
38 | + /**库存头ID*/ | |
39 | + @Excel(name = "库存头ID", width = 15) | |
40 | + @ApiModelProperty(value = "库存头ID") | |
41 | + private Integer inventoryHeaderId; | |
42 | + /**仓库编码*/ | |
43 | + @Excel(name = "仓库编码", width = 15) | |
44 | + @ApiModelProperty(value = "仓库编码") | |
45 | + private String warehouseCode; | |
46 | + /**货主*/ | |
47 | + @Excel(name = "货主", width = 15) | |
48 | + @ApiModelProperty(value = "货主") | |
49 | + private String companyCode; | |
50 | + /**库区*/ | |
51 | + @Excel(name = "库区", width = 15) | |
52 | + @ApiModelProperty(value = "库区") | |
53 | + private String zoneCode; | |
54 | + /**容器状态*/ | |
55 | + @Excel(name = "容器状态", width = 15, dicCode = "container_status") | |
56 | + @Dict(dicCode = "container_status") | |
57 | + @ApiModelProperty(value = "容器状态") | |
58 | + private String containerStatus; | |
59 | + /**容器编码*/ | |
60 | + @Excel(name = "容器编码", width = 15) | |
61 | + @ApiModelProperty(value = "容器编码") | |
62 | + private String containerCode; | |
63 | + /**库位编码*/ | |
64 | + @Excel(name = "库位编码", width = 15) | |
65 | + @ApiModelProperty(value = "库位编码") | |
66 | + private String locationCode; | |
67 | + /**物料编码*/ | |
68 | + @Excel(name = "物料编码", width = 15) | |
69 | + @ApiModelProperty(value = "物料编码") | |
70 | + private String materialCode; | |
71 | + /**物料名称*/ | |
72 | + @Excel(name = "物料名称", width = 15) | |
73 | + @ApiModelProperty(value = "物料名称") | |
74 | + private String materialName; | |
75 | + /**物料规格*/ | |
76 | + @Excel(name = "物料规格", width = 15) | |
77 | + @ApiModelProperty(value = "物料规格") | |
78 | + private String materialSpec; | |
79 | + /**物料单位*/ | |
80 | + @Excel(name = "物料单位", width = 15) | |
81 | + @ApiModelProperty(value = "物料单位") | |
82 | + private String materialUnit; | |
83 | + /**库存状态*/ | |
84 | + @Excel(name = "库存状态", width = 15, dicCode = "inventory_status") | |
85 | + @Dict(dicCode = "inventory_status") | |
86 | + @ApiModelProperty(value = "库存状态") | |
87 | + private String inventoryStatus; | |
88 | + /**库龄(天)*/ | |
89 | + @Excel(name = "库龄(天)", width = 15) | |
90 | + @ApiModelProperty(value = "库龄(天)") | |
91 | + private Integer inventoryAge; | |
92 | + /**唯一号*/ | |
93 | + @Excel(name = "唯一号", width = 15) | |
94 | + @ApiModelProperty(value = "唯一号") | |
95 | + private String uniqueCode; | |
96 | + /**创建人*/ | |
97 | + @ApiModelProperty(value = "创建人") | |
98 | + private String createBy; | |
99 | + /**创建日期*/ | |
100 | + @ApiModelProperty(value = "创建日期") | |
101 | + private Date createTime; | |
102 | + /**更新人*/ | |
103 | + @ApiModelProperty(value = "更新人") | |
104 | + private String updateBy; | |
105 | + /**更新日期*/ | |
106 | + @ApiModelProperty(value = "更新日期") | |
107 | + private Date updateTime; | |
108 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryChild/mapper/InventoryChildMapper.java
0 → 100644
1 | +package org.jeecg.modules.wms.inventory.inventoryChild.mapper; | |
2 | + | |
3 | +import org.jeecg.modules.wms.inventory.inventoryChild.entity.InventoryChild; | |
4 | + | |
5 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
6 | + | |
7 | +/** | |
8 | + * @Description: 库存明细 | |
9 | + * @Author: jeecg-boot | |
10 | + * @Date: 2023-03-24 | |
11 | + * @Version: V1.0 | |
12 | + */ | |
13 | +public interface InventoryChildMapper extends BaseMapper<InventoryChild> { | |
14 | + | |
15 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryChild/mapper/xml/InventoryChildMapper.xml
0 → 100644
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryChild/service/IInventoryChildService.java
0 → 100644
1 | +package org.jeecg.modules.wms.inventory.inventoryChild.service; | |
2 | + | |
3 | +import org.jeecg.modules.wms.inventory.inventoryChild.entity.InventoryChild; | |
4 | + | |
5 | +import com.baomidou.mybatisplus.extension.service.IService; | |
6 | + | |
7 | +/** | |
8 | + * @Description: 库存明细 | |
9 | + * @Author: jeecg-boot | |
10 | + * @Date: 2023-03-24 | |
11 | + * @Version: V1.0 | |
12 | + */ | |
13 | +public interface IInventoryChildService extends IService<InventoryChild> { | |
14 | + | |
15 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryChild/service/impl/InventoryChildServiceImpl.java
0 → 100644
1 | +package org.jeecg.modules.wms.inventory.inventoryChild.service.impl; | |
2 | + | |
3 | +import org.jeecg.modules.wms.inventory.inventoryChild.entity.InventoryChild; | |
4 | +import org.jeecg.modules.wms.inventory.inventoryChild.mapper.InventoryChildMapper; | |
5 | +import org.jeecg.modules.wms.inventory.inventoryChild.service.IInventoryChildService; | |
6 | +import org.springframework.stereotype.Service; | |
7 | + | |
8 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
9 | + | |
10 | +/** | |
11 | + * @Description: 库存明细 | |
12 | + * @Author: jeecg-boot | |
13 | + * @Date: 2023-03-24 | |
14 | + * @Version: V1.0 | |
15 | + */ | |
16 | +@Service | |
17 | +public class InventoryChildServiceImpl extends ServiceImpl<InventoryChildMapper, InventoryChild> implements IInventoryChildService { | |
18 | + | |
19 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/IInventoryHeaderService.java
1 | 1 | package org.jeecg.modules.wms.inventory.inventoryHeader.service; |
2 | 2 | |
3 | -import com.alipay.api.domain.Inventory; | |
4 | -import com.baomidou.mybatisplus.extension.service.IService; | |
5 | -import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; | |
6 | -import org.springframework.beans.factory.annotation.Autowired; | |
7 | 3 | import java.io.Serializable; |
8 | 4 | import java.util.Collection; |
9 | -import java.util.List; | |
5 | + | |
6 | +import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; | |
7 | + | |
8 | +import com.baomidou.mybatisplus.extension.service.IService; | |
10 | 9 | |
11 | 10 | /** |
12 | 11 | * @Description: 库存表 |
... | ... | @@ -27,4 +26,6 @@ public interface IInventoryHeaderService extends IService<InventoryHeader> { |
27 | 26 | public void delBatchMain(Collection<? extends Serializable> idList); |
28 | 27 | |
29 | 28 | InventoryHeader getInventoryHeaderByContainerCode(String containerCode, String warehouseCode); |
29 | + | |
30 | + boolean updateInventoryContainerStatusByContainerCode(String containerCode, String warehouseCode); | |
30 | 31 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryHeaderServiceImpl.java
1 | 1 | package org.jeecg.modules.wms.inventory.inventoryHeader.service.impl; |
2 | 2 | |
3 | -import com.alipay.api.domain.Inventory; | |
4 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
5 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
3 | +import java.io.Serializable; | |
4 | +import java.util.Collection; | |
5 | + | |
6 | +import javax.annotation.Resource; | |
7 | + | |
8 | +import org.jeecg.modules.wms.config.container.entity.Container; | |
9 | +import org.jeecg.modules.wms.config.container.service.IContainerService; | |
6 | 10 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; |
7 | 11 | import org.jeecg.modules.wms.inventory.inventoryHeader.mapper.InventoryDetailMapper; |
8 | 12 | import org.jeecg.modules.wms.inventory.inventoryHeader.mapper.InventoryHeaderMapper; |
9 | 13 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryHeaderService; |
10 | -import org.springframework.stereotype.Service; | |
11 | -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
12 | 14 | import org.springframework.beans.factory.annotation.Autowired; |
15 | +import org.springframework.stereotype.Service; | |
13 | 16 | import org.springframework.transaction.annotation.Transactional; |
14 | -import java.io.Serializable; | |
15 | -import java.lang.ref.WeakReference; | |
16 | -import java.util.List; | |
17 | -import java.util.Collection; | |
17 | + | |
18 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
19 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
20 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
18 | 21 | |
19 | 22 | /** |
20 | 23 | * @Description: 库存表 |
... | ... | @@ -29,6 +32,10 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe |
29 | 32 | private InventoryHeaderMapper inventoryHeaderMapper; |
30 | 33 | @Autowired |
31 | 34 | private InventoryDetailMapper inventoryDetailMapper; |
35 | + @Resource | |
36 | + private IContainerService containerService; | |
37 | + @Resource | |
38 | + private IInventoryHeaderService inventoryHeaderService; | |
32 | 39 | |
33 | 40 | @Override |
34 | 41 | @Transactional |
... | ... | @@ -54,4 +61,19 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe |
54 | 61 | return inventoryHeader; |
55 | 62 | } |
56 | 63 | |
64 | + @Override | |
65 | + public boolean updateInventoryContainerStatusByContainerCode(String containerCode, String warehouseCode) { | |
66 | + Container container = containerService.getContainerByCode(containerCode, warehouseCode); | |
67 | + if (container == null) { | |
68 | + return false; | |
69 | + } | |
70 | + InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByContainerCode(containerCode, warehouseCode); | |
71 | + if (inventoryHeader != null) { | |
72 | + inventoryHeader.setContainerStatus(container.getStatus()); | |
73 | + boolean success = inventoryHeaderService.updateById(inventoryHeader); | |
74 | + return success; | |
75 | + } | |
76 | + return false; | |
77 | + } | |
78 | + | |
57 | 79 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -9,10 +9,12 @@ import java.util.stream.Collectors; |
9 | 9 | import javax.annotation.Resource; |
10 | 10 | |
11 | 11 | import org.jeecg.common.api.vo.Result; |
12 | +import org.jeecg.common.exception.JeecgBootException; | |
12 | 13 | import org.jeecg.modules.wms.config.container.entity.Container; |
13 | 14 | import org.jeecg.modules.wms.config.container.service.IContainerService; |
14 | 15 | import org.jeecg.modules.wms.config.location.entity.Location; |
15 | 16 | import org.jeecg.modules.wms.config.location.service.ILocationService; |
17 | +import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryHeaderService; | |
16 | 18 | import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerDetail; |
17 | 19 | import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader; |
18 | 20 | import org.jeecg.modules.wms.receipt.receiptContainerHeader.mapper.ReceiptContainerDetailMapper; |
... | ... | @@ -33,7 +35,6 @@ import org.springframework.stereotype.Service; |
33 | 35 | import org.springframework.transaction.annotation.Transactional; |
34 | 36 | |
35 | 37 | import com.alibaba.fastjson.JSON; |
36 | -import org.jeecg.common.exception.JeecgBootException; | |
37 | 38 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
38 | 39 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
39 | 40 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
... | ... | @@ -70,6 +71,8 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
70 | 71 | private IReceiptDetailService receiptDetailService; |
71 | 72 | @Resource |
72 | 73 | private IReceiptHeaderService receiptHeaderService; |
74 | + @Resource | |
75 | + private IInventoryHeaderService inventoryHeaderService; | |
73 | 76 | |
74 | 77 | @Override |
75 | 78 | @Transactional |
... | ... | @@ -208,6 +211,12 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
208 | 211 | if (!success) { |
209 | 212 | throw new JeecgBootException("生成任务时,更新入库组盘头失败"); |
210 | 213 | } |
214 | + if (receiptContainerHeader.getTaskType() == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) { | |
215 | + success = inventoryHeaderService.updateInventoryContainerStatusByContainerCode(containerCode, warehouseCode); | |
216 | + if (!success) { | |
217 | + throw new JeecgBootException("生成任务时, 更新库存头失败"); | |
218 | + } | |
219 | + } | |
211 | 220 | success = receiptDetailService.updateBatchById(receiptDetailList); |
212 | 221 | if (!success) { |
213 | 222 | throw new JeecgBootException("更新入库单明细失败"); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
... | ... | @@ -15,7 +15,6 @@ import org.jeecg.modules.wms.config.material.entity.Material; |
15 | 15 | import org.jeecg.modules.wms.config.material.service.IMaterialService; |
16 | 16 | import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService; |
17 | 17 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; |
18 | -import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; | |
19 | 18 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; |
20 | 19 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryHeaderService; |
21 | 20 | import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader; |
... | ... | @@ -41,6 +40,7 @@ import org.springframework.stereotype.Service; |
41 | 40 | import org.springframework.transaction.annotation.Transactional; |
42 | 41 | |
43 | 42 | import com.alibaba.fastjson.JSON; |
43 | +import com.aliyun.oss.ServiceException; | |
44 | 44 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
45 | 45 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
46 | 46 | |
... | ... | @@ -342,7 +342,9 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi |
342 | 342 | if (shipmentContainerHeader != null) { |
343 | 343 | if (taskType != shipmentContainerHeader.getTaskType()) { |
344 | 344 | shipmentContainerHeader.setTaskType(taskType); |
345 | - shipmentContainerHeaderService.updateById(shipmentContainerHeader); | |
345 | + if (!shipmentContainerHeaderService.updateById(shipmentContainerHeader)) { | |
346 | + throw new ServiceException("更新出库组盘头任务类型失败"); | |
347 | + } | |
346 | 348 | } |
347 | 349 | } else { |
348 | 350 | shipmentContainerHeader = new ShipmentContainerHeader(); |
... | ... | @@ -560,13 +562,9 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi |
560 | 562 | if (!success) { |
561 | 563 | throw new JeecgBootException("生成出库任务时, 更新出库组盘头失败"); |
562 | 564 | } |
563 | - InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByContainerCode(containerCode, warehouseCode); | |
564 | - if (inventoryHeader != null) { | |
565 | - inventoryHeader.setContainerStatus(container.getStatus()); | |
566 | - success = inventoryHeaderService.updateById(inventoryHeader); | |
567 | - if (!success) { | |
568 | - throw new JeecgBootException("生成出库任务时, 更新库存头失败"); | |
569 | - } | |
565 | + success = inventoryHeaderService.updateInventoryContainerStatusByContainerCode(containerCode, warehouseCode); | |
566 | + if (!success) { | |
567 | + throw new JeecgBootException("生成出库任务时, 更新库存头失败"); | |
570 | 568 | } |
571 | 569 | LogRecordContext.putVariable("taskHeader", taskHeader);// 操作日志收集 |
572 | 570 | LogRecordContext.putVariable("shipmentContainerDetailList", shipmentContainerDetailList);// 操作日志收集 |
... | ... |