Commit a35b246f659ac8e6d464d52d1e1acdb506fb0b38
Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4.git into develop
Showing
19 changed files
with
343 additions
and
368 deletions
ant-design-vue-jeecg/src/views/system/inventory/InventoryChildList.vue
1 | 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-select | |
10 | - show-search | |
11 | - placeholder="请选择货主" | |
12 | - option-filter-prop="children" | |
13 | - v-model="queryParam.companyCode"> | |
14 | - <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{ | |
15 | - item.name | |
16 | - }} | |
17 | - </a-select-option> | |
18 | - </a-select> | |
19 | - </a-form-item> | |
20 | - </a-col> | |
21 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
22 | - <a-form-item label="库区"> | |
23 | - <a-select | |
24 | - show-search | |
25 | - placeholder="请选择库区" | |
26 | - option-filter-prop="children" | |
27 | - v-model="queryParam.zoneCode"> | |
28 | - <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code"> | |
29 | - {{item.name}} | |
30 | - </a-select-option> | |
31 | - </a-select> | |
32 | - </a-form-item> | |
33 | - </a-col> | |
34 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
35 | - <a-form-item label="库位编码"> | |
36 | - <a-input placeholder="请输入库位编码" v-model="queryParam.locationCode"></a-input> | |
37 | - </a-form-item> | |
38 | - </a-col> | |
39 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
40 | - <a-form-item label="容器编码"> | |
41 | - <a-input placeholder="请输入容器编码" v-model="queryParam.containerCode"></a-input> | |
42 | - </a-form-item> | |
43 | - </a-col> | |
44 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
45 | - <a-form-item label="库存状态"> | |
46 | - <j-dict-select-tag placeholder="请选择库存状态" v-model="queryParam.inventoryStatus" dictCode="inventory_status"/> | |
47 | - </a-form-item> | |
48 | - </a-col> | |
49 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
50 | - <a-form-item label="物料编码"> | |
51 | - <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input> | |
52 | - </a-form-item> | |
53 | - </a-col> | |
54 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
55 | - <a-form-item label="物料名称"> | |
56 | - <a-input placeholder="请输入物料名称" v-model="queryParam.materialName"></a-input> | |
57 | - </a-form-item> | |
58 | - </a-col> | |
59 | - <template v-if="toggleSearchStatus"> | |
60 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
61 | - <a-form-item label="物料规格"> | |
62 | - <a-input placeholder="请输入物料规格" v-model="queryParam.materialSpec"></a-input> | |
63 | - </a-form-item> | |
64 | - </a-col> | |
65 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
66 | - <a-form-item label="物料单位"> | |
67 | - <a-input placeholder="请输入物料单位" v-model="queryParam.materialUnit"></a-input> | |
68 | - </a-form-item> | |
69 | - </a-col> | |
70 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
71 | - <a-form-item label="容器状态"> | |
72 | - <j-dict-select-tag placeholder="请选择容器状态" v-model="queryParam.containerStatus" dictCode="container_status"/> | |
73 | - </a-form-item> | |
74 | - </a-col> | |
75 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
76 | - <a-form-item label="库龄(天)"> | |
77 | - <a-input placeholder="请输入库龄(天)" v-model="queryParam.inventoryAge"></a-input> | |
78 | - </a-form-item> | |
79 | - </a-col> | |
80 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
81 | - <a-form-item label="唯一号"> | |
82 | - <a-input placeholder="请输入唯一号" v-model="queryParam.uniqueCode"></a-input> | |
83 | - </a-form-item> | |
84 | - </a-col> | |
85 | - <a-col :xl="10" :lg="11" :md="12" :sm="24"> | |
86 | - <a-form-item label="创建日期"> | |
87 | - <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> | |
88 | - <span class="query-group-split-cust"></span> | |
89 | - <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> | |
90 | - </a-form-item> | |
91 | - </a-col> | |
92 | - </template> | |
93 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
94 | - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | |
95 | - <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | |
96 | - <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | |
97 | - <a @click="handleToggleSearch" style="margin-left: 8px"> | |
98 | - {{ toggleSearchStatus ? '收起' : '展开' }} | |
99 | - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |
100 | - </a> | |
101 | - </span> | |
102 | - </a-col> | |
103 | - </a-row> | |
104 | - </a-form> | |
105 | - </div> | |
106 | - <!-- 查询区域-END --> | |
107 | - | |
2 | + <a-card :bordered="false" :class="'cust-erp-sub-tab'"> | |
108 | 3 | <!-- 操作按钮区域 --> |
109 | - <div class="table-operator"> | |
110 | - <a-button v-has="'inventoryChild:superSearch'" @click="handleAdd" type="primary" icon="plus">新增</a-button> | |
111 | - <a-button v-has="'inventoryChild:export'" type="primary" icon="download" @click="handleExportXls('库存明细')">导出</a-button> | |
112 | - <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | |
113 | - <a-button v-has="'inventoryChild:import'" type="primary" icon="import">导入</a-button> | |
4 | + <div class="table-operator" v-if="mainId"> | |
5 | + <a-button v-has="'inventoryDetail:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> | |
6 | + <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')" | |
7 | + >导出 | |
8 | + </a-button | |
9 | + > | |
10 | + <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')">导出</a-button> | |
11 | + <a-upload | |
12 | + v-has="'inventoryDetail:import'" | |
13 | + name="file" | |
14 | + :showUploadList="false" | |
15 | + :multiple="false" | |
16 | + :headers="tokenHeader" | |
17 | + :action="importExcelUrl" | |
18 | + @change="handleImportExcel" | |
19 | + > | |
20 | + <a-button type="primary" icon="import">导入</a-button> | |
114 | 21 | </a-upload> |
115 | 22 | <a-dropdown v-if="selectedRowKeys.length > 0"> |
116 | - <a-menu slot="overlay"> | |
117 | - <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | |
23 | + <a-menu slot="overlay" v-has="'inventoryDetail:deleteBatch'"> | |
24 | + <a-menu-item key="1" @click="batchDel"> | |
25 | + <a-icon type="delete"/> | |
26 | + 删除 | |
27 | + </a-menu-item> | |
118 | 28 | </a-menu> |
119 | - <a-button v-has="'inventoryChild:delete'" style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | |
29 | + <a-button style="margin-left: 8px"> | |
30 | + 批量操作 | |
31 | + <a-icon type="down"/> | |
32 | + </a-button> | |
120 | 33 | </a-dropdown> |
121 | 34 | </div> |
122 | 35 | |
123 | 36 | <!-- table区域-begin --> |
124 | 37 | <div> |
125 | 38 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
126 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | |
39 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 | |
40 | + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | |
127 | 41 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
128 | 42 | </div> |
129 | 43 | |
130 | 44 | <a-table |
131 | 45 | ref="table" |
132 | 46 | size="middle" |
133 | - :scroll="{x:true}" | |
134 | 47 | bordered |
135 | 48 | rowKey="id" |
49 | + :scroll="{ x: true }" | |
136 | 50 | :columns="columns" |
137 | 51 | :dataSource="dataSource" |
138 | 52 | :pagination="ipagination" |
139 | 53 | :loading="loading" |
140 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | |
141 | - class="j-table-force-nowrap" | |
142 | - @change="handleTableChange"> | |
54 | + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" | |
55 | + @change="handleTableChange" | |
56 | + > | |
57 | + <span slot="inventoryStatus_dictText" slot-scope="inventoryStatus_dictText"> | |
58 | + <a-tag :key="inventoryStatus_dictText" :color="getStatusColor(inventoryStatus_dictText)"> | |
59 | + {{ inventoryStatus_dictText }} | |
60 | + </a-tag> | |
61 | + </span> | |
143 | 62 | |
144 | 63 | <span slot="companyCode" slot-scope="companyCode"> |
145 | 64 | <a-tag :key="companyCode" color="blue"> |
... | ... | @@ -147,197 +66,248 @@ |
147 | 66 | </a-tag> |
148 | 67 | </span> |
149 | 68 | |
150 | - <span slot="zoneCode" slot-scope="zoneCode"> | |
151 | - <a-tag :key="zoneCode" color=blue> | |
152 | - {{ solutionZoneCode(zoneCode) }} | |
153 | - </a-tag> | |
154 | - </span> | |
155 | - | |
156 | 69 | <template slot="htmlSlot" slot-scope="text"> |
157 | 70 | <div v-html="text"></div> |
158 | 71 | </template> |
159 | 72 | <template slot="imgSlot" slot-scope="text"> |
160 | 73 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
161 | - <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |
74 | + <img | |
75 | + v-else | |
76 | + :src="getImgView(text)" | |
77 | + height="25px" | |
78 | + alt="" | |
79 | + style="max-width:80px;font-size: 12px;font-style: italic;" | |
80 | + /> | |
162 | 81 | </template> |
163 | 82 | <template slot="fileSlot" slot-scope="text"> |
164 | 83 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
165 | - <a-button | |
166 | - v-else | |
167 | - :ghost="true" | |
168 | - type="primary" | |
169 | - icon="download" | |
170 | - size="small" | |
171 | - @click="downloadFile(text)"> | |
84 | + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> | |
172 | 85 | 下载 |
173 | 86 | </a-button> |
174 | 87 | </template> |
88 | + | |
175 | 89 | <span slot="action" slot-scope="text, record"> |
176 | - <a v-has="'inventoryChild:edit'" @click="handleEdit(record)">编辑</a> | |
90 | + <a v-has="'inventoryDetail:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> | |
91 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
92 | + <a v-has="'inventoryDetail:delete'">删除</a> | |
93 | + </a-popconfirm> | |
177 | 94 | </span> |
178 | 95 | </a-table> |
179 | 96 | </div> |
180 | 97 | |
181 | - <inventory-child-modal ref="modalForm" @ok="modalFormOk"></inventory-child-modal> | |
98 | + <inventoryDetail-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></inventoryDetail-modal> | |
182 | 99 | </a-card> |
183 | 100 | </template> |
184 | 101 | |
185 | 102 | <script> |
186 | - | |
187 | -import '@/assets/less/TableExpand.less' | |
188 | -import { mixinDevice } from '@/utils/mixin' | |
189 | -import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
190 | -import InventoryChildModal from './modules/InventoryChildModal' | |
191 | -import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |
192 | - | |
193 | -import {getCompanyList, getZoneList} from "@api/api"; | |
103 | +import {JeecgListMixin} from '@/mixins/JeecgListMixin' | |
104 | +import InventoryDetailModal from './modules/InventoryDetailModal' | |
105 | +import {getCompanyList, getZoneList} from '@/api/api' | |
194 | 106 | |
195 | 107 | export default { |
196 | - name: 'InventoryChildList', | |
197 | - mixins:[JeecgListMixin, mixinDevice], | |
198 | - components: { | |
199 | - InventoryChildModal | |
108 | + name: 'InventoryDetailList', | |
109 | + mixins: [JeecgListMixin], | |
110 | + components: {InventoryDetailModal}, | |
111 | + props: { | |
112 | + mainId: { | |
113 | + type: String, | |
114 | + default: '', | |
115 | + required: false | |
116 | + } | |
117 | + }, | |
118 | + watch: { | |
119 | + mainId: { | |
120 | + immediate: true, | |
121 | + handler(val) { | |
122 | + if (!this.mainId) { | |
123 | + this.clearList() | |
124 | + } else { | |
125 | + this.queryParam['inventoryHeaderId'] = val | |
126 | + this.loadData(1) | |
127 | + } | |
128 | + } | |
129 | + } | |
200 | 130 | }, |
201 | - data () { | |
131 | + data() { | |
202 | 132 | return { |
203 | - zoneList: [], | |
133 | + description: '库存表管理页面', | |
134 | + disableMixinCreated: true, | |
204 | 135 | companyList: [], |
205 | - description: '库存明细管理页面', | |
206 | 136 | // 表头 |
207 | 137 | columns: [ |
208 | 138 | { |
209 | - title: '#', | |
210 | - dataIndex: '', | |
211 | - key:'rowIndex', | |
212 | - width:60, | |
213 | - align:"center", | |
214 | - customRender:function (t,r,index) { | |
215 | - return parseInt(index)+1; | |
216 | - } | |
217 | - }, | |
218 | - { | |
219 | - title:'货主', | |
220 | - align:"center", | |
221 | - dataIndex: 'companyCode' | |
222 | - }, | |
223 | - { | |
224 | - title:'库区', | |
225 | - align:"center", | |
226 | - dataIndex: 'zoneCode' | |
139 | + title: '库存详情ID', | |
140 | + align: 'center', | |
141 | + dataIndex: 'id' | |
227 | 142 | }, |
228 | 143 | { |
229 | - title:'容器状态', | |
230 | - align:"center", | |
231 | - dataIndex: 'containerStatus_dictText' | |
144 | + title: '货主', | |
145 | + align: 'center', | |
146 | + dataIndex: 'companyCode', | |
147 | + key: 'companyCode', | |
148 | + scopedSlots: {customRender: 'companyCode'} | |
232 | 149 | }, |
150 | + // { | |
151 | + // title: '库区', | |
152 | + // align: "center", | |
153 | + // dataIndex: 'zoneCode' | |
154 | + // }, | |
233 | 155 | { |
234 | - title:'容器编码', | |
235 | - align:"center", | |
156 | + title: '容器编码', | |
157 | + align: 'center', | |
236 | 158 | dataIndex: 'containerCode' |
237 | 159 | }, |
238 | 160 | { |
239 | - title:'库位编码', | |
240 | - align:"center", | |
161 | + title: '库位编码', | |
162 | + align: 'center', | |
241 | 163 | dataIndex: 'locationCode' |
242 | 164 | }, |
243 | 165 | { |
244 | - title:'物料编码', | |
245 | - align:"center", | |
166 | + title: '物料编码', | |
167 | + align: 'center', | |
246 | 168 | dataIndex: 'materialCode' |
247 | 169 | }, |
248 | 170 | { |
249 | - title:'物料名称', | |
250 | - align:"center", | |
171 | + title: '物料名称', | |
172 | + align: 'center', | |
251 | 173 | dataIndex: 'materialName' |
252 | 174 | }, |
253 | 175 | { |
254 | - title:'物料规格', | |
255 | - align:"center", | |
176 | + title: '物料规格', | |
177 | + align: 'center', | |
256 | 178 | dataIndex: 'materialSpec' |
257 | 179 | }, |
258 | 180 | { |
259 | - title:'物料单位', | |
260 | - align:"center", | |
181 | + title: '物料单位', | |
182 | + align: 'center', | |
261 | 183 | dataIndex: 'materialUnit' |
262 | 184 | }, |
263 | 185 | { |
264 | - title:'库存状态', | |
265 | - align:"center", | |
266 | - dataIndex: 'inventoryStatus_dictText' | |
186 | + title: '数量', | |
187 | + align: 'center', | |
188 | + dataIndex: 'qty' | |
267 | 189 | }, |
268 | 190 | { |
269 | - title:'库龄(天)', | |
270 | - align:"center", | |
271 | - dataIndex: 'inventoryAge' | |
191 | + title: '任务锁定数量', | |
192 | + align: 'center', | |
193 | + dataIndex: 'taskQty' | |
272 | 194 | }, |
273 | 195 | { |
274 | - title:'唯一号', | |
275 | - align:"center", | |
276 | - dataIndex: 'uniqueCode' | |
196 | + title: '托盘填充度', | |
197 | + align: 'center', | |
198 | + dataIndex: 'fillDensity', | |
199 | + customRender: text => { | |
200 | + return text == null ? '' : text + '%' | |
201 | + } | |
277 | 202 | }, |
278 | 203 | { |
279 | - title:'创建人', | |
280 | - align:"center", | |
204 | + title: '库存状态', | |
205 | + align: 'center', | |
206 | + dataIndex: 'inventoryStatus_dictText', | |
207 | + scopedSlots: {customRender: 'inventoryStatus_dictText'} | |
208 | + }, | |
209 | + { | |
210 | + title: '批次', | |
211 | + align: 'center', | |
212 | + dataIndex: 'batch' | |
213 | + }, | |
214 | + { | |
215 | + title: '序列号', | |
216 | + align: "center", | |
217 | + dataIndex: 'sn' | |
218 | + }, | |
219 | + { | |
220 | + title: '入库日期', | |
221 | + align: 'center', | |
222 | + dataIndex: 'receiptDate' | |
223 | + }, | |
224 | + { | |
225 | + title: '库龄(天)', | |
226 | + align: 'center', | |
227 | + dataIndex: 'inventoryAge' | |
228 | + }, | |
229 | + { | |
230 | + title: '创建人', | |
231 | + align: 'center', | |
281 | 232 | dataIndex: 'createBy' |
282 | 233 | }, |
283 | 234 | { |
284 | - title:'创建日期', | |
285 | - align:"center", | |
235 | + title: '创建日期', | |
236 | + align: 'center', | |
286 | 237 | dataIndex: 'createTime' |
287 | 238 | }, |
288 | 239 | { |
289 | - title:'更新人', | |
290 | - align:"center", | |
240 | + title: '更新人', | |
241 | + align: 'center', | |
291 | 242 | dataIndex: 'updateBy' |
292 | 243 | }, |
293 | 244 | { |
294 | - title:'更新日期', | |
295 | - align:"center", | |
245 | + title: '更新日期', | |
246 | + align: 'center', | |
296 | 247 | dataIndex: 'updateTime' |
297 | 248 | }, |
298 | 249 | { |
299 | 250 | title: '操作', |
300 | 251 | dataIndex: 'action', |
301 | - align:"center", | |
302 | - fixed:"right", | |
303 | - width:147, | |
304 | - scopedSlots: { customRender: 'action' } | |
252 | + align: 'center', | |
253 | + fixed: 'right', | |
254 | + width: 147, | |
255 | + scopedSlots: {customRender: 'action'} | |
305 | 256 | } |
306 | 257 | ], |
307 | 258 | url: { |
308 | - list: "/inventory/inventoryChild/list", | |
309 | - delete: "/inventory/inventoryChild/delete", | |
310 | - deleteBatch: "/inventory/inventoryChild/deleteBatch", | |
311 | - exportXlsUrl: "/inventory/inventoryChild/exportXls", | |
312 | - importExcelUrl: "inventory/inventoryChild/importExcel", | |
313 | - | |
259 | + list: '/inventory/inventoryHeader/listInventoryDetailByMainId', | |
260 | + delete: '/inventory/inventoryHeader/deleteInventoryDetail', | |
261 | + deleteBatch: '/inventory/inventoryHeader/deleteBatchInventoryDetail', | |
262 | + exportXlsUrl: '/inventory/inventoryHeader/exportInventoryDetail', | |
263 | + importUrl: '/inventory/inventoryHeader/importInventoryDetail' | |
314 | 264 | }, |
315 | - dictOptions:{}, | |
316 | - superFieldList:[], | |
265 | + dictOptions: { | |
266 | + containerStatus: [] | |
267 | + } | |
317 | 268 | } |
318 | 269 | }, |
319 | 270 | created() { |
320 | - this.getSuperFieldList(); | |
321 | - this.loadFrom(); | |
271 | + this.loadFrom() | |
322 | 272 | }, |
323 | 273 | computed: { |
324 | - importExcelUrl: function(){ | |
325 | - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |
326 | - }, | |
274 | + importExcelUrl() { | |
275 | + return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}` | |
276 | + } | |
327 | 277 | }, |
328 | 278 | methods: { |
279 | + getStatusColor(status) { | |
280 | + const colors = { | |
281 | + '良品': 'green', | |
282 | + '报废品': 'purple', | |
283 | + '待确认 ': 'grey', | |
284 | + '次品': 'red', | |
285 | + default: 'blue' | |
286 | + }; | |
287 | + return colors[status] || colors.default; | |
288 | + }, | |
329 | 289 | loadFrom() { |
330 | - getZoneList().then((res) => { | |
331 | - if (res.success) { | |
332 | - this.zoneList = res.result | |
333 | - } | |
334 | - }); | |
290 | + // getZoneList().then((res) => { | |
291 | + // if (res.success) { | |
292 | + // this.zoneList = res.result | |
293 | + // } | |
294 | + // }); | |
335 | 295 | getCompanyList().then(res => { |
336 | 296 | if (res.success) { |
337 | 297 | this.companyList = res.result |
338 | 298 | } |
339 | 299 | }) |
340 | 300 | }, |
301 | + // solutionZoneCode(value) { | |
302 | + // var actions = [] | |
303 | + // Object.keys(this.zoneList).some((key) => { | |
304 | + // if (this.zoneList[key].code == ('' + value)) { | |
305 | + // actions.push(this.zoneList[key].name) | |
306 | + // return true | |
307 | + // } | |
308 | + // }) | |
309 | + // return actions.join('') | |
310 | + // }, | |
341 | 311 | solutionCompany(value) { |
342 | 312 | var actions = [] |
343 | 313 | Object.keys(this.companyList).some(key => { |
... | ... | @@ -348,41 +318,14 @@ export default { |
348 | 318 | }) |
349 | 319 | return actions.join('') |
350 | 320 | }, |
351 | - solutionZoneCode(value) { | |
352 | - var actions = [] | |
353 | - Object.keys(this.zoneList).some((key) => { | |
354 | - if (this.zoneList[key].code == ('' + value)) { | |
355 | - actions.push(this.zoneList[key].name) | |
356 | - return true | |
357 | - } | |
358 | - }) | |
359 | - return actions.join('') | |
360 | - }, | |
361 | - initDictConfig(){ | |
362 | - }, | |
363 | - getSuperFieldList(){ | |
364 | - let fieldList=[]; | |
365 | - fieldList.push({type:'string',value:'companyCode',text:'货主',dictCode:''}) | |
366 | - fieldList.push({type:'string',value:'zoneCode',text:'库区',dictCode:''}) | |
367 | - fieldList.push({type:'string',value:'containerStatus',text:'容器状态',dictCode:'container_status'}) | |
368 | - fieldList.push({type:'string',value:'containerCode',text:'容器编码',dictCode:''}) | |
369 | - fieldList.push({type:'string',value:'locationCode',text:'库位编码',dictCode:''}) | |
370 | - fieldList.push({type:'string',value:'materialCode',text:'物料编码',dictCode:''}) | |
371 | - fieldList.push({type:'string',value:'materialName',text:'物料名称',dictCode:''}) | |
372 | - fieldList.push({type:'string',value:'materialSpec',text:'物料规格',dictCode:''}) | |
373 | - fieldList.push({type:'string',value:'materialUnit',text:'物料单位',dictCode:''}) | |
374 | - fieldList.push({type:'string',value:'inventoryStatus',text:'库存状态',dictCode:'inventory_status'}) | |
375 | - fieldList.push({type:'int',value:'inventoryAge',text:'库龄(天)',dictCode:''}) | |
376 | - fieldList.push({type:'string',value:'uniqueCode',text:'唯一号',dictCode:''}) | |
377 | - fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''}) | |
378 | - fieldList.push({type:'datetime',value:'createTime',text:'创建日期'}) | |
379 | - fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''}) | |
380 | - fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'}) | |
381 | - this.superFieldList = fieldList | |
321 | + clearList() { | |
322 | + this.dataSource = [] | |
323 | + this.selectedRowKeys = [] | |
324 | + this.ipagination.current = 1 | |
382 | 325 | } |
383 | 326 | } |
384 | 327 | } |
385 | 328 | </script> |
386 | 329 | <style scoped> |
387 | - @import '~@assets/less/common.less'; | |
330 | +@import '~@assets/less/common.less'; | |
388 | 331 | </style> |
389 | 332 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue
ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue
... | ... | @@ -77,8 +77,8 @@ |
77 | 77 | </a-form-item> |
78 | 78 | </a-col> |
79 | 79 | <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
80 | - <a-form-item label="唯一号"> | |
81 | - <a-input placeholder="请输入唯一号" v-model="queryParam.uniqueCode"></a-input> | |
80 | + <a-form-item label="序列号"> | |
81 | + <a-input placeholder="请输入序列号" v-model="queryParam.sn"></a-input> | |
82 | 82 | </a-form-item> |
83 | 83 | </a-col> --> |
84 | 84 | <a-col :xl="12" :lg="14" :md="16" :sm="24"> |
... | ... | @@ -320,9 +320,9 @@ export default { |
320 | 320 | dataIndex: 'batch' |
321 | 321 | }, |
322 | 322 | // { |
323 | - // title:'唯一号', | |
323 | + // title:'序列号', | |
324 | 324 | // align:"center", |
325 | - // dataIndex: 'uniqueCode' | |
325 | + // dataIndex: 'sn' | |
326 | 326 | // }, |
327 | 327 | { |
328 | 328 | title: '入库日期', |
... | ... | @@ -443,7 +443,7 @@ export default { |
443 | 443 | fieldList.push({type: 'BigDecimal', value: 'taskQty', text: '任务锁定数量', dictCode: ''}) |
444 | 444 | fieldList.push({type: 'string', value: 'inventoryStatus', text: '库存状态', dictCode: 'inventory_status'}) |
445 | 445 | fieldList.push({type: 'string', value: 'batch', text: '批次', dictCode: ''}) |
446 | - // fieldList.push({type:'string',value:'uniqueCode',text:'唯一号',dictCode:''}) | |
446 | + // fieldList.push({type:'string',value:'sn',text:'序列号',dictCode:''}) | |
447 | 447 | fieldList.push({type: 'datetime', value: 'receiptDate', text: '入库日期'}) |
448 | 448 | fieldList.push({type: 'int', value: 'inventoryAge', text: '库龄(天)', dictCode: ''}) |
449 | 449 | fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/modules/InventoryChildForm.vue
... | ... | @@ -59,8 +59,8 @@ |
59 | 59 | </a-form-model-item> |
60 | 60 | </a-col> |
61 | 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> | |
62 | + <a-form-model-item label="序列号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sn"> | |
63 | + <a-input v-model="model.sn" placeholder="请输入序列号" ></a-input> | |
64 | 64 | </a-form-model-item> |
65 | 65 | </a-col> |
66 | 66 | </a-row> |
... | ... | @@ -106,8 +106,8 @@ validatorRules: { |
106 | 106 | materialName: [ |
107 | 107 | { required: true, message: '请输入物料名称!'}, |
108 | 108 | ], |
109 | - uniqueCode: [ | |
110 | - { required: true, message: '请输入唯一号!'}, | |
109 | + sn: [ | |
110 | + { required: true, message: '请输入序列号!'}, | |
111 | 111 | ], |
112 | 112 | }, |
113 | 113 | url: { |
... | ... | @@ -160,7 +160,7 @@ validatorRules: { |
160 | 160 | that.confirmLoading = false; |
161 | 161 | }) |
162 | 162 | } |
163 | - | |
163 | + | |
164 | 164 | }) |
165 | 165 | }, |
166 | 166 | } |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/subTables/InventoryDetailSubTable.vue
... | ... | @@ -2,33 +2,33 @@ |
2 | 2 | <a-card :bordered="false" :class="'cust-erp-sub-tab'"> |
3 | 3 | <!-- 操作按钮区域 --> |
4 | 4 | <div class="table-operator" v-if="mainId"> |
5 | - <!-- <a-button v-has="'inventoryDetail:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> --> | |
5 | + <a-button v-has="'inventoryDetail:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> | |
6 | 6 | <a-button type="primary" icon="download" @click="handleExportXls('库存详情')">导出</a-button> |
7 | 7 | </div> |
8 | 8 | |
9 | 9 | <!-- table区域-begin --> |
10 | 10 | <div> |
11 | - <a-table | |
11 | + <a-table | |
12 | 12 | ref="table" |
13 | 13 | size="middle" |
14 | 14 | bordered |
15 | 15 | rowKey="id" |
16 | - :scroll="{ x: true }" | |
16 | + :scroll="{x:true}" | |
17 | 17 | :columns="columns" |
18 | 18 | :dataSource="dataSource" |
19 | 19 | :pagination="ipagination" |
20 | 20 | :loading="loading" |
21 | - @change="handleTableChange" | |
22 | - class='j-table-force-nowrap' | |
23 | - > | |
24 | - | |
25 | - <span slot="inventoryStatus_dictText" slot-scope="inventoryStatus_dictText"> | |
21 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | |
22 | + @change="handleTableChange"> | |
23 | + | |
24 | + <span slot="inventoryStatus_dictText" slot-scope="inventoryStatus_dictText"> | |
26 | 25 | <a-tag :key="inventoryStatus_dictText" :color="getStatusColor(inventoryStatus_dictText)"> |
27 | 26 | {{ inventoryStatus_dictText }} |
28 | 27 | </a-tag> |
29 | 28 | </span> |
30 | - | |
29 | + | |
31 | 30 | <span slot="companyCode" slot-scope="companyCode"> |
31 | + | |
32 | 32 | <a-tag :key="companyCode" color="blue"> |
33 | 33 | {{ solutionCompany(companyCode) }} |
34 | 34 | </a-tag> |
... | ... | @@ -47,13 +47,17 @@ |
47 | 47 | </template> |
48 | 48 | |
49 | 49 | <script> |
50 | + | |
50 | 51 | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
51 | 52 | import InventoryDetailModal from '../modules/InventoryDetailModal' |
53 | + | |
52 | 54 | import { getCompanyList, getZoneList } from '@/api/api' |
53 | 55 | |
54 | 56 | export default { |
57 | + | |
55 | 58 | name: 'InventoryDetailSubTable', |
56 | 59 | mixins: [JeecgListMixin], |
60 | + | |
57 | 61 | components: { InventoryDetailModal }, |
58 | 62 | props: { |
59 | 63 | mainId: { |
... | ... | @@ -69,6 +73,7 @@ export default { |
69 | 73 | if (!this.mainId) { |
70 | 74 | this.clearList() |
71 | 75 | } else { |
76 | + | |
72 | 77 | this.queryParam['zoneCode'] = val.split("_")[0]; |
73 | 78 | this.queryParam['materialCode'] = val.split("_")[1]; |
74 | 79 | this.loadData(1) |
... | ... | @@ -78,6 +83,7 @@ export default { |
78 | 83 | }, |
79 | 84 | data() { |
80 | 85 | return { |
86 | + | |
81 | 87 | description: '库存物料汇总详情页面', |
82 | 88 | disableMixinCreated: true, |
83 | 89 | companyList: [], |
... | ... | @@ -86,18 +92,22 @@ export default { |
86 | 92 | columns: [ |
87 | 93 | { |
88 | 94 | title: '库存详情ID', |
95 | + | |
89 | 96 | align: 'center', |
90 | 97 | dataIndex: 'id' |
91 | 98 | }, |
92 | 99 | { |
93 | 100 | title: '货主', |
101 | + | |
94 | 102 | align: 'center', |
95 | 103 | dataIndex: 'companyCode', |
96 | 104 | key: 'companyCode', |
105 | + | |
97 | 106 | scopedSlots: { customRender: 'companyCode' } |
98 | 107 | }, |
99 | 108 | { |
100 | 109 | title: '库区', |
110 | + | |
101 | 111 | align: 'center', |
102 | 112 | dataIndex: 'zoneCode', |
103 | 113 | key: 'zoneCode', |
... | ... | @@ -123,11 +133,6 @@ export default { |
123 | 133 | align: 'center', |
124 | 134 | dataIndex: 'materialName' |
125 | 135 | }, |
126 | - // { | |
127 | - // title: '物料规格', | |
128 | - // align: 'center', | |
129 | - // dataIndex: 'materialSpec' | |
130 | - // }, | |
131 | 136 | { |
132 | 137 | title: '物料单位', |
133 | 138 | align: 'center', |
... | ... | @@ -160,9 +165,9 @@ export default { |
160 | 165 | dataIndex: 'batch' |
161 | 166 | }, |
162 | 167 | { |
163 | - title: '唯一号', | |
168 | + title: '序列号', | |
164 | 169 | align: 'center', |
165 | - dataIndex: 'uniqueCode' | |
170 | + dataIndex: 'sn' | |
166 | 171 | }, |
167 | 172 | { |
168 | 173 | title: '入库日期', |
... | ... | @@ -191,21 +196,12 @@ export default { |
191 | 196 | }, |
192 | 197 | { |
193 | 198 | title: '更新日期', |
194 | - align: 'center' | |
199 | + align: 'center', | |
200 | + dataIndex: 'updateTime' | |
195 | 201 | }, |
196 | - // { | |
197 | - // title: '操作', | |
198 | - // dataIndex: 'action', | |
199 | - // align: 'center', | |
200 | - // fixed: 'right', | |
201 | - // width: 147, | |
202 | - // scopedSlots: { customRender: 'action' } | |
203 | - // } | |
204 | 202 | ], |
205 | 203 | url: { |
206 | - list: '/InventoryMaterialSummary/inventoryMaterialSummary/inventoryMaterialSummaryChild', | |
207 | - exportXlsUrl: '/inventory/inventoryHeader/exportInventoryDetail', | |
208 | - importUrl: '/inventory/inventoryHeader/importInventoryDetail' | |
204 | + importUrl: "/inventory/inventoryHeader/importInventoryDetail", | |
209 | 205 | }, |
210 | 206 | dictOptions: { |
211 | 207 | containerStatus: [] |
... | ... | @@ -213,7 +209,7 @@ export default { |
213 | 209 | } |
214 | 210 | }, |
215 | 211 | created() { |
216 | - this.loadFrom() | |
212 | + this.loadFrom(); | |
217 | 213 | }, |
218 | 214 | computed: { |
219 | 215 | importExcelUrl() { |
... | ... | @@ -232,6 +228,7 @@ export default { |
232 | 228 | return colors[status] || colors.default; |
233 | 229 | }, |
234 | 230 | loadFrom() { |
231 | + | |
235 | 232 | getCompanyList().then(res => { |
236 | 233 | if (res.success) { |
237 | 234 | this.companyList = res.result |
... | ... | @@ -244,6 +241,7 @@ export default { |
244 | 241 | }) |
245 | 242 | }, |
246 | 243 | solutionCompany(value) { |
244 | + | |
247 | 245 | let actions = [] |
248 | 246 | Object.keys(this.companyList).some(key => { |
249 | 247 | if (this.companyList[key].code === '' + value) { |
... | ... |
ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
... | ... | @@ -117,8 +117,8 @@ |
117 | 117 | </a-button> |
118 | 118 | </template> |
119 | 119 | <span slot="action" slot-scope="text, record"> |
120 | - <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:fill'"><a-button type="primary">生成任务</a-button> <a-divider type="vertical"/></a> | |
121 | - <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:fill'"><a-button type="primary">生成任务</a-button> <a-divider type="vertical"/></a> | |
120 | + <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button> <a-divider type="vertical"/></a> | |
121 | + <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button> <a-divider type="vertical"/></a> | |
122 | 122 | <!-- <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a>--> |
123 | 123 | <!-- <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a>--> |
124 | 124 | <a-popconfirm v-if="record.status == 0" v-has="'receiptContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/LocationAllocationServiceImpl.java
... | ... | @@ -123,6 +123,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
123 | 123 | if (roadWays == null || roadWays.size() == 0) { |
124 | 124 | throw new JeecgBootException("分配库位时, 巷道为空"); |
125 | 125 | } |
126 | + Collections.shuffle(roadWays); | |
126 | 127 | Integer roadWay = locationAllocationService.getRoadWay(roadWays, warehouseCode); |
127 | 128 | // 优先找外侧库位 |
128 | 129 | LambdaQueryWrapper<Location> locationLambda = Wrappers.lambdaQuery(); |
... | ... | @@ -176,6 +177,10 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
176 | 177 | roadWays = locationList.stream().map(Location::getRoadWay).distinct().collect(toList()); |
177 | 178 | } |
178 | 179 | String lastString = "ORDER BY high asc, layer asc, id asc limit 1"; |
180 | + if (roadWays == null || roadWays.size() == 0) { | |
181 | + throw new JeecgBootException("分配库位时, 巷道为空"); | |
182 | + } | |
183 | + Collections.shuffle(roadWays); | |
179 | 184 | Integer roadWay = locationAllocationService.getRoadWay(roadWays, warehouseCode); |
180 | 185 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); |
181 | 186 | locationLambdaQueryWrapper.eq(Location::getZoneCode, zoneCode).eq(Location::getWarehouseCode, warehouseCode).eq(Location::getRoadWay, roadWay) |
... | ... | @@ -194,11 +199,18 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
194 | 199 | @Override |
195 | 200 | @Transactional(rollbackFor = Exception.class) |
196 | 201 | public Integer getRoadWay(List<Integer> roadWays, String warehouseCode) { |
202 | + if (StringUtils.isEmpty(roadWays)) { | |
203 | + throw new JeecgBootException("分配库位错误,没有巷道"); | |
204 | + } | |
205 | + int roadWay = roadWays.get(0); | |
197 | 206 | if (roadWays.size() == 1) { |
198 | - return roadWays.get(0); | |
207 | + return roadWay; | |
199 | 208 | } |
200 | 209 | roadWays = locationAllocationService.removeRoadWaysByPreLocations(roadWays, warehouseCode); |
201 | - int roadWay = getRoadWayByMaxFreeLocation(roadWays, warehouseCode); | |
210 | + if (StringUtils.isEmpty(roadWays)) { | |
211 | + return roadWay; | |
212 | + } | |
213 | + roadWay = getRoadWayByMaxFreeLocation(roadWays, warehouseCode); | |
202 | 214 | return roadWay; |
203 | 215 | } |
204 | 216 | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
... | ... | @@ -119,6 +119,7 @@ public class WcsServiceImpl implements WcsService { |
119 | 119 | String height = warecellDomain.getHeight(); |
120 | 120 | String taskNo = warecellDomain.getTaskNo(); |
121 | 121 | String locationCode = null; |
122 | + Integer preTaskNo = 0; | |
122 | 123 | List<Integer> roadWays = warecellDomain.getRoadWays(); |
123 | 124 | if (height == null) { |
124 | 125 | return Result.error("分配库位时,高度为空"); |
... | ... | @@ -139,6 +140,13 @@ public class WcsServiceImpl implements WcsService { |
139 | 140 | } |
140 | 141 | int taskType = taskHeader.getTaskType(); |
141 | 142 | String containerCode = taskHeader.getContainerCode(); |
143 | + String toLocationCode = taskHeader.getToLocationCode(); | |
144 | + if (StringUtils.isNotEmpty(toLocationCode)) { | |
145 | + WcsTask wcsTask2 = new WcsTask(); | |
146 | + wcsTask2.setToLocationCode(toLocationCode); | |
147 | + wcsTask2.setPreTaskNo(String.valueOf(preTaskNo)); | |
148 | + return Result.OK(wcsTask2); | |
149 | + } | |
142 | 150 | Container container = containerService.getContainerByCode(containerCode, warehouseCode); |
143 | 151 | if (container == null) { |
144 | 152 | return Result.error("分配库位时,任务托盘为空"); |
... | ... | @@ -228,7 +236,6 @@ public class WcsServiceImpl implements WcsService { |
228 | 236 | // 修改任务明细目标库位 |
229 | 237 | Location location = locationService.getLocationByCode(locationCode, warehouseCode); |
230 | 238 | int rowFlag = location.getRowFlag().intValue(); |
231 | - Integer preTaskNo = 0; | |
232 | 239 | // 如果是外侧库位,那么就要判断该库位对应的内侧库位是不是有托盘 |
233 | 240 | if (rowFlag == QuantityConstant.ROW_OUT) { |
234 | 241 | Location insideLocation = locationService.getInsideNear(location); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryChild/entity/InventoryChild.java
1 | 1 | package org.jeecg.modules.wms.inventory.inventoryChild.entity; |
2 | 2 | |
3 | 3 | import java.io.Serializable; |
4 | -import java.io.UnsupportedEncodingException; | |
5 | 4 | import java.util.Date; |
6 | -import java.math.BigDecimal; | |
5 | + | |
6 | +import org.jeecg.common.aspect.annotation.Dict; | |
7 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
8 | + | |
7 | 9 | import com.baomidou.mybatisplus.annotation.IdType; |
8 | 10 | import com.baomidou.mybatisplus.annotation.TableId; |
9 | 11 | 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; | |
12 | + | |
15 | 13 | import io.swagger.annotations.ApiModel; |
16 | 14 | import io.swagger.annotations.ApiModelProperty; |
15 | +import lombok.Data; | |
17 | 16 | import lombok.EqualsAndHashCode; |
18 | 17 | import lombok.experimental.Accessors; |
19 | 18 | |
20 | 19 | /** |
21 | 20 | * @Description: 库存明细 |
22 | - * @Author: jeecg-boot | |
23 | - * @Date: 2023-03-24 | |
24 | - * @Version: V1.0 | |
21 | + * @Author: jeecg-boot | |
22 | + * @Date: 2023-03-24 | |
23 | + * @Version: V1.0 | |
25 | 24 | */ |
26 | 25 | @Data |
27 | 26 | @TableName("inventory_child") |
28 | 27 | @Accessors(chain = true) |
29 | 28 | @EqualsAndHashCode(callSuper = false) |
30 | -@ApiModel(value="inventory_child对象", description="库存明细") | |
29 | +@ApiModel(value = "inventory_child对象", description = "库存明细") | |
31 | 30 | public class InventoryChild implements Serializable { |
32 | 31 | private static final long serialVersionUID = 1L; |
33 | 32 | |
34 | - /**主键*/ | |
35 | - @TableId(type = IdType.ASSIGN_ID) | |
33 | + /** 主键 */ | |
34 | + @TableId(type = IdType.ASSIGN_ID) | |
36 | 35 | @ApiModelProperty(value = "主键") |
37 | 36 | private String id; |
38 | - /**库存头ID*/ | |
39 | - @Excel(name = "库存头ID", width = 15) | |
37 | + /** 库存头ID */ | |
38 | + @Excel(name = "库存头ID", width = 15) | |
40 | 39 | @ApiModelProperty(value = "库存头ID") |
41 | 40 | private Integer inventoryHeaderId; |
42 | - /**仓库编码*/ | |
43 | - @Excel(name = "仓库编码", width = 15) | |
41 | + /** 仓库编码 */ | |
42 | + @Excel(name = "仓库编码", width = 15) | |
44 | 43 | @ApiModelProperty(value = "仓库编码") |
45 | 44 | private String warehouseCode; |
46 | - /**货主*/ | |
47 | - @Excel(name = "货主", width = 15) | |
45 | + /** 货主 */ | |
46 | + @Excel(name = "货主", width = 15) | |
48 | 47 | @ApiModelProperty(value = "货主") |
49 | 48 | private String companyCode; |
50 | - /**库区*/ | |
51 | - @Excel(name = "库区", width = 15) | |
49 | + /** 库区 */ | |
50 | + @Excel(name = "库区", width = 15) | |
52 | 51 | @ApiModelProperty(value = "库区") |
53 | 52 | private String zoneCode; |
54 | - /**容器状态*/ | |
55 | - @Excel(name = "容器状态", width = 15, dicCode = "container_status") | |
56 | - @Dict(dicCode = "container_status") | |
53 | + /** 容器状态 */ | |
54 | + @Excel(name = "容器状态", width = 15, dicCode = "container_status") | |
55 | + @Dict(dicCode = "container_status") | |
57 | 56 | @ApiModelProperty(value = "容器状态") |
58 | 57 | private String containerStatus; |
59 | - /**容器编码*/ | |
60 | - @Excel(name = "容器编码", width = 15) | |
58 | + /** 容器编码 */ | |
59 | + @Excel(name = "容器编码", width = 15) | |
61 | 60 | @ApiModelProperty(value = "容器编码") |
62 | 61 | private String containerCode; |
63 | - /**库位编码*/ | |
64 | - @Excel(name = "库位编码", width = 15) | |
62 | + /** 库位编码 */ | |
63 | + @Excel(name = "库位编码", width = 15) | |
65 | 64 | @ApiModelProperty(value = "库位编码") |
66 | 65 | private String locationCode; |
67 | - /**物料编码*/ | |
68 | - @Excel(name = "物料编码", width = 15) | |
66 | + /** 物料编码 */ | |
67 | + @Excel(name = "物料编码", width = 15) | |
69 | 68 | @ApiModelProperty(value = "物料编码") |
70 | 69 | private String materialCode; |
71 | - /**物料名称*/ | |
72 | - @Excel(name = "物料名称", width = 15) | |
70 | + /** 物料名称 */ | |
71 | + @Excel(name = "物料名称", width = 15) | |
73 | 72 | @ApiModelProperty(value = "物料名称") |
74 | 73 | private String materialName; |
75 | - /**物料规格*/ | |
76 | - @Excel(name = "物料规格", width = 15) | |
74 | + /** 物料规格 */ | |
75 | + @Excel(name = "物料规格", width = 15) | |
77 | 76 | @ApiModelProperty(value = "物料规格") |
78 | 77 | private String materialSpec; |
79 | - /**物料单位*/ | |
80 | - @Excel(name = "物料单位", width = 15) | |
78 | + /** 物料单位 */ | |
79 | + @Excel(name = "物料单位", width = 15) | |
81 | 80 | @ApiModelProperty(value = "物料单位") |
82 | 81 | private String materialUnit; |
83 | - /**库存状态*/ | |
84 | - @Excel(name = "库存状态", width = 15, dicCode = "inventory_status") | |
85 | - @Dict(dicCode = "inventory_status") | |
82 | + /** 库存状态 */ | |
83 | + @Excel(name = "库存状态", width = 15, dicCode = "inventory_status") | |
84 | + @Dict(dicCode = "inventory_status") | |
86 | 85 | @ApiModelProperty(value = "库存状态") |
87 | 86 | private String inventoryStatus; |
88 | - /**库龄(天)*/ | |
89 | - @Excel(name = "库龄(天)", width = 15) | |
87 | + /** 库龄(天) */ | |
88 | + @Excel(name = "库龄(天)", width = 15) | |
90 | 89 | @ApiModelProperty(value = "库龄(天)") |
91 | 90 | private Integer inventoryAge; |
92 | - /**唯一号*/ | |
93 | - @Excel(name = "唯一号", width = 15) | |
94 | - @ApiModelProperty(value = "唯一号") | |
95 | - private String uniqueCode; | |
96 | - /**创建人*/ | |
91 | + /** 序列号 */ | |
92 | + @Excel(name = "序列号", width = 15) | |
93 | + @ApiModelProperty(value = "序列号") | |
94 | + private String sn; | |
95 | + /** 创建人 */ | |
97 | 96 | @ApiModelProperty(value = "创建人") |
98 | 97 | private String createBy; |
99 | - /**创建日期*/ | |
98 | + /** 创建日期 */ | |
100 | 99 | @ApiModelProperty(value = "创建日期") |
101 | 100 | private Date createTime; |
102 | - /**更新人*/ | |
101 | + /** 更新人 */ | |
103 | 102 | @ApiModelProperty(value = "更新人") |
104 | 103 | private String updateBy; |
105 | - /**更新日期*/ | |
104 | + /** 更新日期 */ | |
106 | 105 | @ApiModelProperty(value = "更新日期") |
107 | 106 | private Date updateTime; |
108 | 107 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/entity/InventoryDetail.java
... | ... | @@ -106,14 +106,17 @@ public class InventoryDetail implements Serializable { |
106 | 106 | @Excel(name = "项目号", width = 15) |
107 | 107 | @ApiModelProperty(value = "项目号") |
108 | 108 | private String project; |
109 | - /** 唯一号 */ | |
110 | - @Excel(name = "唯一号", width = 15) | |
111 | - @ApiModelProperty(value = "唯一号") | |
112 | - private String uniqueCode; | |
109 | + /** 序列号 */ | |
110 | + @Excel(name = "序列号", width = 15) | |
111 | + @ApiModelProperty(value = "序列号") | |
112 | + private String sn; | |
113 | 113 | /** 箱码 */ |
114 | 114 | @Excel(name = "箱码", width = 15) |
115 | 115 | @ApiModelProperty(value = "箱码") |
116 | 116 | private String boxCode; |
117 | + @Excel(name = "收货日期", width = 15) | |
118 | + @ApiModelProperty(value = "收货日期") | |
119 | + private Date receiveTime; | |
117 | 120 | /** 入库日期 */ |
118 | 121 | @Excel(name = "入库日期", width = 15) |
119 | 122 | @ApiModelProperty(value = "入库日期") |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryTransaction/entity/InventoryTransaction.java
... | ... | @@ -125,10 +125,10 @@ public class InventoryTransaction implements Serializable { |
125 | 125 | @Excel(name = "项目号", width = 15) |
126 | 126 | @ApiModelProperty(value = "项目号") |
127 | 127 | private String project; |
128 | - /** 唯一号 */ | |
129 | - @Excel(name = "唯一号", width = 15) | |
130 | - @ApiModelProperty(value = "唯一号") | |
131 | - private String uniqueCode; | |
128 | + /** 序列号 */ | |
129 | + @Excel(name = "序列号", width = 15) | |
130 | + @ApiModelProperty(value = "序列号") | |
131 | + private String sn; | |
132 | 132 | /** 备用字段1 */ |
133 | 133 | @Excel(name = "备用字段1", width = 15) |
134 | 134 | @ApiModelProperty(value = "备用字段1") |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/operation/service/impl/OperationLogServiceImpl.java
... | ... | @@ -48,7 +48,7 @@ public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, Ope |
48 | 48 | switch (logDTO.getTag()) { |
49 | 49 | case "入库组盘": |
50 | 50 | message = "容器编码:{},物料编码:{},数量:{}"; |
51 | - operationLogList.addAll(createOperationLogs(logDTO, ReceiptContainerDetail.class, "getUniqueCode", message, "getReferCode", | |
51 | + operationLogList.addAll(createOperationLogs(logDTO, ReceiptContainerDetail.class, "getsn", message, "getReferCode", | |
52 | 52 | "getReceiptCode", "getWarehouseCode", "getContainerCode", "getMaterialCode", "getQty")); |
53 | 53 | break; |
54 | 54 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
... | ... | @@ -2,6 +2,7 @@ package org.jeecg.modules.wms.receipt.receiptContainerHeader.controller; |
2 | 2 | |
3 | 3 | import java.io.IOException; |
4 | 4 | import java.util.Arrays; |
5 | +import java.util.Date; | |
5 | 6 | import java.util.List; |
6 | 7 | import java.util.Map; |
7 | 8 | import java.util.stream.Collectors; |
... | ... | @@ -208,6 +209,7 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon |
208 | 209 | @PostMapping(value = "/addReceiptContainerDetail") |
209 | 210 | @RequiresPermissions("receiptContainerDetail:add") |
210 | 211 | public Result<String> addReceiptContainerDetail(@RequestBody ReceiptContainerDetail receiptContainerDetail) { |
212 | + receiptContainerDetail.setReceiveTime(new Date()); | |
211 | 213 | receiptContainerDetailService.save(receiptContainerDetail); |
212 | 214 | return Result.OK("添加成功!"); |
213 | 215 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/entity/ReceiptContainerDetail.java
... | ... | @@ -97,9 +97,12 @@ public class ReceiptContainerDetail implements Serializable { |
97 | 97 | @Excel(name = "项目号", width = 15) |
98 | 98 | @ApiModelProperty(value = "项目号") |
99 | 99 | private String project; |
100 | - @Excel(name = "唯一号", width = 15) | |
101 | - @ApiModelProperty(value = "唯一号") | |
102 | - private String uniqueCode; | |
100 | + @Excel(name = "序列号", width = 15) | |
101 | + @ApiModelProperty(value = "序列号") | |
102 | + private String sn; | |
103 | + @Excel(name = "收货日期", width = 15) | |
104 | + @ApiModelProperty(value = "收货日期") | |
105 | + private Date receiveTime; | |
103 | 106 | /** 备用字段1 */ |
104 | 107 | @Excel(name = "备用字段1", width = 15) |
105 | 108 | @ApiModelProperty(value = "备用字段1") |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -179,6 +179,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
179 | 179 | taskDetail.setBatch(receiptContainerDetail.getBatch()); |
180 | 180 | taskDetail.setLot(receiptContainerDetail.getLot()); |
181 | 181 | taskDetail.setProject(receiptContainerDetail.getProject()); |
182 | + taskDetail.setReceiveTime(receiptContainerDetail.getReceiveTime()); | |
182 | 183 | taskDetailList.add(taskDetail); |
183 | 184 | ReceiptDetail receiptDetail = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()); |
184 | 185 | if (receiptDetail == null) { |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/domain/Receive.java
1 | 1 | package org.jeecg.modules.wms.receipt.receiving.domain; |
2 | 2 | |
3 | -import lombok.Data; | |
4 | - | |
5 | 3 | import java.io.Serializable; |
6 | 4 | import java.math.BigDecimal; |
7 | 5 | |
8 | 6 | import org.jeecg.common.aspect.annotation.Dict; |
9 | 7 | |
8 | +import lombok.Data; | |
9 | + | |
10 | 10 | @Data |
11 | 11 | public class Receive implements Serializable { |
12 | 12 | private static final long serialVersionUID = 1L; |
... | ... | @@ -15,7 +15,7 @@ public class Receive implements Serializable { |
15 | 15 | |
16 | 16 | private String containerCode; // 托盘号 |
17 | 17 | |
18 | - private String uniqueCode;// 唯一号 | |
18 | + private String sn;// 序列号 | |
19 | 19 | |
20 | 20 | private String materialCode; |
21 | 21 | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
... | ... | @@ -2,6 +2,7 @@ package org.jeecg.modules.wms.receipt.receiving.service.impl; |
2 | 2 | |
3 | 3 | import java.math.BigDecimal; |
4 | 4 | import java.util.ArrayList; |
5 | +import java.util.Date; | |
5 | 6 | import java.util.List; |
6 | 7 | import java.util.stream.Collectors; |
7 | 8 | |
... | ... | @@ -234,7 +235,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl |
234 | 235 | receiptContainerDetail = new ReceiptContainerDetail(); |
235 | 236 | receiptContainerDetail.setCompanyCode(receiptDetail.getCompanyCode()); |
236 | 237 | receiptContainerDetail.setReferCode(receiptDetail.getReferCode()); |
237 | - receiptContainerDetail.setUniqueCode(receive.getUniqueCode()); | |
238 | + receiptContainerDetail.setSn(receive.getSn()); | |
238 | 239 | receiptContainerDetail.setContainerCode(receive.getContainerCode()); |
239 | 240 | receiptContainerDetail.setReceiptDetailId(receiptDetail.getId()); |
240 | 241 | receiptContainerDetail.setReceiptId(receiptDetail.getReceiptId()); |
... | ... | @@ -250,6 +251,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl |
250 | 251 | receiptContainerDetail.setLot(receiptDetail.getLot()); |
251 | 252 | receiptContainerDetail.setProject(receiptDetail.getProject()); |
252 | 253 | receiptContainerDetail.setInventoryStatus(receiptDetail.getInventoryStatus()); |
254 | + receiptContainerDetail.setReceiveTime(new Date()); | |
253 | 255 | receiptContainerDetailList.add(receiptContainerDetail); |
254 | 256 | } |
255 | 257 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskDetail.java
... | ... | @@ -145,9 +145,13 @@ public class TaskDetail implements Serializable { |
145 | 145 | @ApiModelProperty(value = "入库的库存详情id") |
146 | 146 | private Integer toInventoryDetailId; |
147 | 147 | |
148 | - @Excel(name = "唯一号", width = 15) | |
149 | - @ApiModelProperty(value = "唯一号") | |
150 | - private String uniqueCode; | |
148 | + @Excel(name = "序列号", width = 15) | |
149 | + @ApiModelProperty(value = "序列号") | |
150 | + private String sn; | |
151 | + | |
152 | + @Excel(name = "收货日期", width = 15) | |
153 | + @ApiModelProperty(value = "收货日期") | |
154 | + private Date receiveTime; | |
151 | 155 | |
152 | 156 | /** 备用字段1 */ |
153 | 157 | @Excel(name = "备用字段1", width = 15) |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... | ... | @@ -1108,6 +1108,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1108 | 1108 | inventoryDetail.setBatch(taskDetail.getBatch()); |
1109 | 1109 | inventoryDetail.setLot(taskDetail.getLot()); |
1110 | 1110 | inventoryDetail.setProject(taskDetail.getProject()); |
1111 | + inventoryDetail.setReceiveTime(taskDetail.getReceiveTime()); | |
1111 | 1112 | inventoryDetail.setReceiptDate(new Date()); |
1112 | 1113 | inventoryDetailList.add(inventoryDetail); |
1113 | 1114 | |
... | ... |