Commit 522ea14579df9bfb36a222913b58fc968ead308c
Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4 into develop
Showing
147 changed files
with
3301 additions
and
1649 deletions
ant-design-vue-jeecg/.env.production
1 | NODE_ENV=production | 1 | NODE_ENV=production |
2 | VUE_APP_ENV=production | 2 | VUE_APP_ENV=production |
3 | outputDir=dist | 3 | outputDir=dist |
4 | -VUE_APP_API_BASE_URL=http://172.16.29.77:8081/wms | 4 | +VUE_APP_API_BASE_URL=http://127.0.0.1:8080/wms |
5 | VUE_APP_CAS_BASE_URL=http://localhost:8443/cas | 5 | VUE_APP_CAS_BASE_URL=http://localhost:8443/cas |
6 | VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview | 6 | VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview |
7 | \ No newline at end of file | 7 | \ No newline at end of file |
ant-design-vue-jeecg/pom.xml
@@ -68,7 +68,7 @@ | @@ -68,7 +68,7 @@ | ||
68 | <goal>npm</goal> | 68 | <goal>npm</goal> |
69 | </goals> | 69 | </goals> |
70 | <configuration> | 70 | <configuration> |
71 | - <arguments>run build_development</arguments> | 71 | + <arguments>run build</arguments> |
72 | </configuration> | 72 | </configuration> |
73 | </execution> | 73 | </execution> |
74 | </executions> | 74 | </executions> |
ant-design-vue-jeecg/src/components/jeecg/modal/JPopupOnlReport.vue
@@ -8,22 +8,28 @@ | @@ -8,22 +8,28 @@ | ||
8 | wrapClassName="j-popup-modal" | 8 | wrapClassName="j-popup-modal" |
9 | @ok="handleSubmit" | 9 | @ok="handleSubmit" |
10 | @cancel="handleCancel" | 10 | @cancel="handleCancel" |
11 | - cancelText="关闭"> | ||
12 | - | 11 | + cancelText="关闭" |
12 | + > | ||
13 | <div class="table-page-search-wrapper"> | 13 | <div class="table-page-search-wrapper"> |
14 | <a-form layout="inline" @keyup.enter.native="searchByquery"> | 14 | <a-form layout="inline" @keyup.enter.native="searchByquery"> |
15 | <a-row :gutter="24" v-if="showSearchFlag"> | 15 | <a-row :gutter="24" v-if="showSearchFlag"> |
16 | - <template v-for="(item,index) in queryInfo"> | ||
17 | - <template v-if=" item.hidden==='1' "> | ||
18 | - <a-col :md="8" :sm="24" :key=" 'query'+index " v-show="toggleSearchStatus"> | ||
19 | - <online-query-form-item :queryParam="queryParam" :item="item" | ||
20 | - :dictOptions="dictOptions"></online-query-form-item> | 16 | + <template v-for="(item, index) in queryInfo"> |
17 | + <template v-if="item.hidden === '1'"> | ||
18 | + <a-col :md="8" :sm="24" :key="'query' + index" v-show="toggleSearchStatus"> | ||
19 | + <online-query-form-item | ||
20 | + :queryParam="queryParam" | ||
21 | + :item="item" | ||
22 | + :dictOptions="dictOptions" | ||
23 | + ></online-query-form-item> | ||
21 | </a-col> | 24 | </a-col> |
22 | </template> | 25 | </template> |
23 | <template v-else> | 26 | <template v-else> |
24 | - <a-col :md="8" :sm="24" :key=" 'query'+index "> | ||
25 | - <online-query-form-item :queryParam="queryParam" :item="item" | ||
26 | - :dictOptions="dictOptions"></online-query-form-item> | 27 | + <a-col :md="8" :sm="24" :key="'query' + index"> |
28 | + <online-query-form-item | ||
29 | + :queryParam="queryParam" | ||
30 | + :item="item" | ||
31 | + :dictOptions="dictOptions" | ||
32 | + ></online-query-form-item> | ||
27 | </a-col> | 33 | </a-col> |
28 | </template> | 34 | </template> |
29 | </template> | 35 | </template> |
@@ -34,18 +40,17 @@ | @@ -34,18 +40,17 @@ | ||
34 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | 40 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
35 | <a @click="handleToggleSearch" style="margin-left: 8px"> | 41 | <a @click="handleToggleSearch" style="margin-left: 8px"> |
36 | {{ toggleSearchStatus ? '收起' : '展开' }} | 42 | {{ toggleSearchStatus ? '收起' : '展开' }} |
37 | - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | 43 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> |
38 | </a> | 44 | </a> |
39 | </span> | 45 | </span> |
40 | </a-col> | 46 | </a-col> |
41 | - | ||
42 | </a-row> | 47 | </a-row> |
43 | </a-form> | 48 | </a-form> |
44 | </div> | 49 | </div> |
45 | 50 | ||
46 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 51 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
47 | <i class="anticon anticon-info-circle ant-alert-icon"></i> | 52 | <i class="anticon anticon-info-circle ant-alert-icon"></i> |
48 | - 已选择 <a style="font-weight: 600">{{ table.selectedRowKeys.length }}</a>项 | 53 | + 已选择 <a style="font-weight: 600">{{ table.selectedRowKeys.length }}</a> 项 |
49 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 54 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
50 | 55 | ||
51 | <a v-if="!showSearchFlag" style="margin-left: 24px" @click="onlyReload">刷新</a> | 56 | <a v-if="!showSearchFlag" style="margin-left: 24px" @click="onlyReload">刷新</a> |
@@ -60,25 +65,29 @@ | @@ -60,25 +65,29 @@ | ||
60 | :dataSource="table.dataSource" | 65 | :dataSource="table.dataSource" |
61 | :pagination="table.pagination" | 66 | :pagination="table.pagination" |
62 | :loading="table.loading" | 67 | :loading="table.loading" |
63 | - :rowSelection="{type:rowSelectionType,fixed:true,selectedRowKeys: table.selectedRowKeys, onChange: handleChangeInTableSelect}" | 68 | + :rowSelection="{ |
69 | + type: rowSelectionType, | ||
70 | + fixed: true, | ||
71 | + selectedRowKeys: table.selectedRowKeys, | ||
72 | + onChange: handleChangeInTableSelect | ||
73 | + }" | ||
64 | @change="handleChangeInTable" | 74 | @change="handleChangeInTable" |
65 | style="min-height: 300px" | 75 | style="min-height: 300px" |
66 | :scroll="tableScroll" | 76 | :scroll="tableScroll" |
67 | - :customRow="clickThenCheck"> | 77 | + :customRow="clickThenCheck" |
78 | + > | ||
68 | </a-table> | 79 | </a-table> |
69 | - | ||
70 | - | ||
71 | </j-modal> | 80 | </j-modal> |
72 | </template> | 81 | </template> |
73 | 82 | ||
74 | <script> | 83 | <script> |
75 | -import {getAction} from '@/api/manage' | ||
76 | -import {filterObj} from '@/utils/util' | ||
77 | -import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | ||
78 | -import {httpGroupRequest} from '@/api/GroupRequest.js' | 84 | +import { getAction } from '@/api/manage' |
85 | +import { filterObj } from '@/utils/util' | ||
86 | +import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' | ||
87 | +import { httpGroupRequest } from '@/api/GroupRequest.js' | ||
79 | import md5 from 'md5' | 88 | import md5 from 'md5' |
80 | 89 | ||
81 | -const MODAL_WIDTH = 1200; | 90 | +const MODAL_WIDTH = 1200 |
82 | export default { | 91 | export default { |
83 | name: 'JPopupOnlReport', | 92 | name: 'JPopupOnlReport', |
84 | props: ['multi', 'code', 'sorter', 'groupId', 'param'], | 93 | props: ['multi', 'code', 'sorter', 'groupId', 'param'], |
@@ -86,7 +95,7 @@ export default { | @@ -86,7 +95,7 @@ export default { | ||
86 | data() { | 95 | data() { |
87 | return { | 96 | return { |
88 | visible: false, | 97 | visible: false, |
89 | - title: "", | 98 | + title: '', |
90 | confirmLoading: false, | 99 | confirmLoading: false, |
91 | queryInfo: [], | 100 | queryInfo: [], |
92 | toggleSearchStatus: false, | 101 | toggleSearchStatus: false, |
@@ -119,12 +128,12 @@ export default { | @@ -119,12 +128,12 @@ export default { | ||
119 | total: 0 | 128 | total: 0 |
120 | } | 129 | } |
121 | }, | 130 | }, |
122 | - cgRpConfigId: "", | 131 | + cgRpConfigId: '', |
123 | modalWidth: MODAL_WIDTH, | 132 | modalWidth: MODAL_WIDTH, |
124 | - tableScroll: {x: true}, | 133 | + tableScroll: { x: true }, |
125 | dynamicParam: {}, | 134 | dynamicParam: {}, |
126 | // 排序字段,默认无排序 | 135 | // 排序字段,默认无排序 |
127 | - iSorter: null, | 136 | + iSorter: null |
128 | } | 137 | } |
129 | }, | 138 | }, |
130 | mounted() { | 139 | mounted() { |
@@ -140,10 +149,10 @@ export default { | @@ -140,10 +149,10 @@ export default { | ||
140 | // update--begin--autor:liusq-----date:20210706------for:JPopup组件在modal中使用报错#2729------ | 149 | // update--begin--autor:liusq-----date:20210706------for:JPopup组件在modal中使用报错#2729------ |
141 | if (this.visible) { | 150 | if (this.visible) { |
142 | this.dynamicParamHandler() | 151 | this.dynamicParamHandler() |
143 | - this.loadData(); | 152 | + this.loadData() |
144 | } | 153 | } |
145 | // update--begin--autor:liusq-----date:20210706------for:JPopup组件在modal中使用报错#2729------ | 154 | // update--begin--autor:liusq-----date:20210706------for:JPopup组件在modal中使用报错#2729------ |
146 | - }, | 155 | + } |
147 | }, | 156 | }, |
148 | sorter: { | 157 | sorter: { |
149 | immediate: true, | 158 | immediate: true, |
@@ -151,7 +160,7 @@ export default { | @@ -151,7 +160,7 @@ export default { | ||
151 | if (this.sorter) { | 160 | if (this.sorter) { |
152 | let arr = this.sorter.split('=') | 161 | let arr = this.sorter.split('=') |
153 | if (arr.length === 2 && ['asc', 'desc'].includes(arr[1].toLowerCase())) { | 162 | if (arr.length === 2 && ['asc', 'desc'].includes(arr[1].toLowerCase())) { |
154 | - this.iSorter = {column: arr[0], order: arr[1].toLowerCase()} | 163 | + this.iSorter = { column: arr[0], order: arr[1].toLowerCase() } |
155 | // 排序字段受控 | 164 | // 排序字段受控 |
156 | this.table.columns.forEach(col => { | 165 | this.table.columns.forEach(col => { |
157 | if (col.dataIndex === this.iSorter.column) { | 166 | if (col.dataIndex === this.iSorter.column) { |
@@ -164,8 +173,8 @@ export default { | @@ -164,8 +173,8 @@ export default { | ||
164 | console.warn('【JPopup】sorter参数不合法') | 173 | console.warn('【JPopup】sorter参数不合法') |
165 | } | 174 | } |
166 | } | 175 | } |
167 | - }, | ||
168 | - }, | 176 | + } |
177 | + } | ||
169 | }, | 178 | }, |
170 | computed: { | 179 | computed: { |
171 | showSearchFlag() { | 180 | showSearchFlag() { |
@@ -174,7 +183,7 @@ export default { | @@ -174,7 +183,7 @@ export default { | ||
174 | // 行选择框类型,根据是否多选来控制显示为单选框还是多选框 | 183 | // 行选择框类型,根据是否多选来控制显示为单选框还是多选框 |
175 | rowSelectionType() { | 184 | rowSelectionType() { |
176 | return this.multi ? 'checkbox' : 'radio' | 185 | return this.multi ? 'checkbox' : 'radio' |
177 | - }, | 186 | + } |
178 | }, | 187 | }, |
179 | methods: { | 188 | methods: { |
180 | loadColumnsInfo() { | 189 | loadColumnsInfo() { |
@@ -186,15 +195,15 @@ export default { | @@ -186,15 +195,15 @@ export default { | ||
186 | } | 195 | } |
187 | httpGroupRequest(() => getAction(url), groupIdKey).then(res => { | 196 | httpGroupRequest(() => getAction(url), groupIdKey).then(res => { |
188 | if (res.success) { | 197 | if (res.success) { |
189 | - this.initDictOptionData(res.result.dictOptions); | 198 | + this.initDictOptionData(res.result.dictOptions) |
190 | this.cgRpConfigId = res.result.cgRpConfigId | 199 | this.cgRpConfigId = res.result.cgRpConfigId |
191 | this.title = res.result.cgRpConfigName | 200 | this.title = res.result.cgRpConfigName |
192 | let currColumns = res.result.columns | 201 | let currColumns = res.result.columns |
193 | for (let a = 0; a < currColumns.length; a++) { | 202 | for (let a = 0; a < currColumns.length; a++) { |
194 | if (currColumns[a].customRender) { | 203 | if (currColumns[a].customRender) { |
195 | - let dictCode = currColumns[a].customRender; | ||
196 | - currColumns[a].customRender = (text) => { | ||
197 | - return filterMultiDictText(this.dictOptions[dictCode], text + ""); | 204 | + let dictCode = currColumns[a].customRender |
205 | + currColumns[a].customRender = text => { | ||
206 | + return filterMultiDictText(this.dictOptions[dictCode], text + '') | ||
198 | } | 207 | } |
199 | } | 208 | } |
200 | // 排序字段受控 | 209 | // 排序字段受控 |
@@ -207,8 +216,14 @@ export default { | @@ -207,8 +216,14 @@ export default { | ||
207 | } else { | 216 | } else { |
208 | this.$error({ | 217 | this.$error({ |
209 | title: '出错了', | 218 | title: '出错了', |
210 | - content: (<p>Popup初始化失败,请检查你的配置或稍后重试!<br/>错误信息如下:{res.message}</p>), | ||
211 | - onOk: () => this.close(), | 219 | + content: ( |
220 | + <p> | ||
221 | + Popup初始化失败,请检查你的配置或稍后重试! | ||
222 | + <br /> | ||
223 | + 错误信息如下:{res.message} | ||
224 | + </p> | ||
225 | + ), | ||
226 | + onOk: () => this.close() | ||
212 | }) | 227 | }) |
213 | } | 228 | } |
214 | }) | 229 | }) |
@@ -220,7 +235,7 @@ export default { | @@ -220,7 +235,7 @@ export default { | ||
220 | if (this.groupId) { | 235 | if (this.groupId) { |
221 | groupIdKey = this.groupId + url | 236 | groupIdKey = this.groupId + url |
222 | } | 237 | } |
223 | - httpGroupRequest(() => getAction(url), groupIdKey).then((res) => { | 238 | + httpGroupRequest(() => getAction(url), groupIdKey).then(res => { |
224 | // console.log("获取查询条件", res); | 239 | // console.log("获取查询条件", res); |
225 | if (res.success) { | 240 | if (res.success) { |
226 | this.dynamicParamHandler(res.result) | 241 | this.dynamicParamHandler(res.result) |
@@ -242,7 +257,7 @@ export default { | @@ -242,7 +257,7 @@ export default { | ||
242 | queryTemp[item.field] = '' | 257 | queryTemp[item.field] = '' |
243 | } | 258 | } |
244 | } | 259 | } |
245 | - this.queryParam = {...queryTemp} | 260 | + this.queryParam = { ...queryTemp } |
246 | } | 261 | } |
247 | let dynamicTemp = {} | 262 | let dynamicTemp = {} |
248 | if (this.param) { | 263 | if (this.param) { |
@@ -258,13 +273,13 @@ export default { | @@ -258,13 +273,13 @@ export default { | ||
258 | dynamicTemp[key] = this.param[key] | 273 | dynamicTemp[key] = this.param[key] |
259 | }) | 274 | }) |
260 | } | 275 | } |
261 | - this.dynamicParam = {...dynamicTemp} | 276 | + this.dynamicParam = { ...dynamicTemp } |
262 | }, | 277 | }, |
263 | loadData(arg) { | 278 | loadData(arg) { |
264 | if (arg == 1) { | 279 | if (arg == 1) { |
265 | this.table.pagination.current = 1 | 280 | this.table.pagination.current = 1 |
266 | } | 281 | } |
267 | - let params = this.getQueryParams();//查询条件 | 282 | + let params = this.getQueryParams() //查询条件 |
268 | this.table.loading = true | 283 | this.table.loading = true |
269 | let url = `${this.url.getData}${this.cgRpConfigId}` | 284 | let url = `${this.url.getData}${this.cgRpConfigId}` |
270 | //缓存key | 285 | //缓存key |
@@ -293,10 +308,10 @@ export default { | @@ -293,10 +308,10 @@ export default { | ||
293 | paramTarget['self_' + key] = this.dynamicParam[key] | 308 | paramTarget['self_' + key] = this.dynamicParam[key] |
294 | }) | 309 | }) |
295 | } | 310 | } |
296 | - let param = Object.assign(paramTarget, this.queryParam, this.iSorter); | ||
297 | - param.pageNo = this.table.pagination.current; | ||
298 | - param.pageSize = this.table.pagination.pageSize; | ||
299 | - return filterObj(param); | 311 | + let param = Object.assign(paramTarget, this.queryParam, this.iSorter) |
312 | + param.pageNo = this.table.pagination.current | ||
313 | + param.pageSize = this.table.pagination.pageSize | ||
314 | + return filterObj(param) | ||
300 | }, | 315 | }, |
301 | handleChangeInTableSelect(selectedRowKeys, selectionRows) { | 316 | handleChangeInTableSelect(selectedRowKeys, selectionRows) { |
302 | //update-begin-author:taoyan date:2020902 for:【issue】开源online的几个问题 LOWCOD-844 | 317 | //update-begin-author:taoyan date:2020902 for:【issue】开源online的几个问题 LOWCOD-844 |
@@ -307,7 +322,7 @@ export default { | @@ -307,7 +322,7 @@ export default { | ||
307 | } else { | 322 | } else { |
308 | //当两者长度不一的时候 需要判断 | 323 | //当两者长度不一的时候 需要判断 |
309 | let keys = this.table.selectedRowKeys | 324 | let keys = this.table.selectedRowKeys |
310 | - let rows = this.table.selectionRows; | 325 | + let rows = this.table.selectionRows |
311 | //这个循环 添加新的记录 | 326 | //这个循环 添加新的记录 |
312 | for (let i = 0; i < selectionRows.length; i++) { | 327 | for (let i = 0; i < selectionRows.length; i++) { |
313 | let combineKey = this.combineRowKey(selectionRows[i]) | 328 | let combineKey = this.combineRowKey(selectionRows[i]) |
@@ -350,20 +365,20 @@ export default { | @@ -350,20 +365,20 @@ export default { | ||
350 | handleSubmit() { | 365 | handleSubmit() { |
351 | if (!this.multi) { | 366 | if (!this.multi) { |
352 | if (this.table.selectionRows && this.table.selectionRows.length > 1) { | 367 | if (this.table.selectionRows && this.table.selectionRows.length > 1) { |
353 | - this.$message.warning("请选择一条记录") | 368 | + this.$message.warning('请选择一条记录') |
354 | return false | 369 | return false |
355 | } | 370 | } |
356 | } | 371 | } |
357 | if (!this.table.selectionRows || this.table.selectionRows.length == 0) { | 372 | if (!this.table.selectionRows || this.table.selectionRows.length == 0) { |
358 | - this.$message.warning("请选择一条记录") | 373 | + this.$message.warning('请选择一条记录') |
359 | return false | 374 | return false |
360 | } | 375 | } |
361 | - this.$emit('ok', this.table.selectionRows); | 376 | + this.$emit('ok', this.table.selectionRows) |
362 | this.close() | 377 | this.close() |
363 | }, | 378 | }, |
364 | close() { | 379 | close() { |
365 | - this.$emit('close'); | ||
366 | - this.visible = false; | 380 | + this.$emit('close') |
381 | + this.visible = false | ||
367 | this.onClearSelected() | 382 | this.onClearSelected() |
368 | }, | 383 | }, |
369 | show() { | 384 | show() { |
@@ -371,19 +386,19 @@ export default { | @@ -371,19 +386,19 @@ export default { | ||
371 | this.loadColumnsInfo() | 386 | this.loadColumnsInfo() |
372 | }, | 387 | }, |
373 | handleToggleSearch() { | 388 | handleToggleSearch() { |
374 | - this.toggleSearchStatus = !this.toggleSearchStatus; | 389 | + this.toggleSearchStatus = !this.toggleSearchStatus |
375 | }, | 390 | }, |
376 | searchByquery() { | 391 | searchByquery() { |
377 | - this.loadData(1); | 392 | + this.loadData(1) |
378 | }, | 393 | }, |
379 | onlyReload() { | 394 | onlyReload() { |
380 | - this.loadData(); | 395 | + this.loadData() |
381 | }, | 396 | }, |
382 | searchReset() { | 397 | searchReset() { |
383 | Object.keys(this.queryParam).forEach(key => { | 398 | Object.keys(this.queryParam).forEach(key => { |
384 | - this.queryParam[key] = "" | 399 | + this.queryParam[key] = '' |
385 | }) | 400 | }) |
386 | - this.loadData(1); | 401 | + this.loadData(1) |
387 | }, | 402 | }, |
388 | onClearSelected() { | 403 | onClearSelected() { |
389 | this.table.selectedRowKeys = [] | 404 | this.table.selectedRowKeys = [] |
@@ -415,7 +430,8 @@ export default { | @@ -415,7 +430,8 @@ export default { | ||
415 | click: () => { | 430 | click: () => { |
416 | let rowKey = this.combineRowKey(record) | 431 | let rowKey = this.combineRowKey(record) |
417 | if (!this.table.selectedRowKeys || this.table.selectedRowKeys.length == 0) { | 432 | if (!this.table.selectedRowKeys || this.table.selectedRowKeys.length == 0) { |
418 | - let arr1 = [], arr2 = [] | 433 | + let arr1 = [], |
434 | + arr2 = [] | ||
419 | arr1.push(record) | 435 | arr1.push(record) |
420 | arr2.push(rowKey) | 436 | arr2.push(rowKey) |
421 | this.table.selectedRowKeys = arr2 | 437 | this.table.selectedRowKeys = arr2 |
@@ -426,8 +442,8 @@ export default { | @@ -426,8 +442,8 @@ export default { | ||
426 | this.table.selectionRows.push(record) | 442 | this.table.selectionRows.push(record) |
427 | } else { | 443 | } else { |
428 | let rowKey_index = this.table.selectedRowKeys.indexOf(rowKey) | 444 | let rowKey_index = this.table.selectedRowKeys.indexOf(rowKey) |
429 | - this.table.selectedRowKeys.splice(rowKey_index, 1); | ||
430 | - this.table.selectionRows.splice(rowKey_index, 1); | 445 | + this.table.selectedRowKeys.splice(rowKey_index, 1) |
446 | + this.table.selectionRows.splice(rowKey_index, 1) | ||
431 | } | 447 | } |
432 | } | 448 | } |
433 | // 判断是否允许多选,如果不允许多选,就只存储最后一个选中的行 | 449 | // 判断是否允许多选,如果不允许多选,就只存储最后一个选中的行 |
@@ -445,15 +461,13 @@ export default { | @@ -445,15 +461,13 @@ export default { | ||
445 | Object.keys(dictOptions).map(k => { | 461 | Object.keys(dictOptions).map(k => { |
446 | obj[k] = dictOptions[k].filter(item => { | 462 | obj[k] = dictOptions[k].filter(item => { |
447 | return item != null | 463 | return item != null |
448 | - }); | ||
449 | - }); | 464 | + }) |
465 | + }) | ||
450 | this.dictOptions = obj | 466 | this.dictOptions = obj |
451 | } | 467 | } |
452 | - | ||
453 | } | 468 | } |
454 | } | 469 | } |
455 | </script> | 470 | </script> |
456 | 471 | ||
457 | <style scoped> | 472 | <style scoped> |
458 | - | ||
459 | </style> | 473 | </style> |
460 | \ No newline at end of file | 474 | \ No newline at end of file |
ant-design-vue-jeecg/src/components/tools/DepartSelect.vue
@@ -136,14 +136,14 @@ export default { | @@ -136,14 +136,14 @@ export default { | ||
136 | }) | 136 | }) |
137 | }, | 137 | }, |
138 | show() { | 138 | show() { |
139 | - //如果组件传值username此处就不用loadDepartList了 | ||
140 | - this.loadDepartList().then(() => { | ||
141 | - this.visible = true | ||
142 | - if (!this.departList || this.departList.length <= 0) { | ||
143 | - this.$message.warning("您尚未设置部门信息!") | ||
144 | - this.departClear() | ||
145 | - } | ||
146 | - }) | 139 | + // 如果组件传值username此处就不用loadDepartList了 |
140 | + // this.loadDepartList().then(() => { | ||
141 | + // this.visible = true | ||
142 | + // if (!this.departList || this.departList.length <= 0) { | ||
143 | + // this.$message.warning("您尚未设置部门信息!") | ||
144 | + // this.departClear() | ||
145 | + // } | ||
146 | + // }) | ||
147 | }, | 147 | }, |
148 | departClear() { | 148 | departClear() { |
149 | this.departList = [] | 149 | this.departList = [] |
ant-design-vue-jeecg/src/components/tools/UserMenu.vue
@@ -40,12 +40,12 @@ | @@ -40,12 +40,12 @@ | ||
40 | <span v-if="isDesktop()">欢迎您,{{ nickname() }}</span> | 40 | <span v-if="isDesktop()">欢迎您,{{ nickname() }}</span> |
41 | </span> | 41 | </span> |
42 | <a-menu slot="overlay" class="user-dropdown-menu-wrapper"> | 42 | <a-menu slot="overlay" class="user-dropdown-menu-wrapper"> |
43 | - <a-menu-item key="0"> | 43 | + <!-- <a-menu-item key="0"> |
44 | <router-link :to="{ name: 'account-center' }"> | 44 | <router-link :to="{ name: 'account-center' }"> |
45 | <a-icon type="user"/> | 45 | <a-icon type="user"/> |
46 | <span>个人中心</span> | 46 | <span>个人中心</span> |
47 | </router-link> | 47 | </router-link> |
48 | - </a-menu-item> | 48 | + </a-menu-item> --> |
49 | <a-menu-item key="1"> | 49 | <a-menu-item key="1"> |
50 | <router-link :to="{ name: 'account-settings-base' }"> | 50 | <router-link :to="{ name: 'account-settings-base' }"> |
51 | <a-icon type="setting"/> | 51 | <a-icon type="setting"/> |
@@ -60,10 +60,10 @@ | @@ -60,10 +60,10 @@ | ||
60 | <a-icon type="setting"/> | 60 | <a-icon type="setting"/> |
61 | <span>密码修改</span> | 61 | <span>密码修改</span> |
62 | </a-menu-item> | 62 | </a-menu-item> |
63 | - <a-menu-item key="5" @click="updateCurrentDepart"> | 63 | + <!-- <a-menu-item key="5" @click="updateCurrentDepart"> |
64 | <a-icon type="cluster"/> | 64 | <a-icon type="cluster"/> |
65 | <span>切换部门</span> | 65 | <span>切换部门</span> |
66 | - </a-menu-item> | 66 | + </a-menu-item> --> |
67 | <a-menu-item key="6" @click="clearCache"> | 67 | <a-menu-item key="6" @click="clearCache"> |
68 | <a-icon type="sync"/> | 68 | <a-icon type="sync"/> |
69 | <span>清理缓存</span> | 69 | <span>清理缓存</span> |
ant-design-vue-jeecg/src/views/account/settings/BaseSetting.vue
@@ -51,7 +51,7 @@ | @@ -51,7 +51,7 @@ | ||
51 | </a-form> | 51 | </a-form> |
52 | 52 | ||
53 | </a-col> | 53 | </a-col> |
54 | - <a-col :md="24" :lg="8" :style="{ minHeight: '180px' }"> | 54 | + <!-- <a-col :md="24" :lg="8" :style="{ minHeight: '180px' }"> |
55 | <div class="ant-upload-preview" @click="$refs.modal.edit(1)"> | 55 | <div class="ant-upload-preview" @click="$refs.modal.edit(1)"> |
56 | <a-icon type="cloud-upload-o" class="upload-icon"/> | 56 | <a-icon type="cloud-upload-o" class="upload-icon"/> |
57 | <div class="mask"> | 57 | <div class="mask"> |
@@ -59,7 +59,7 @@ | @@ -59,7 +59,7 @@ | ||
59 | </div> | 59 | </div> |
60 | <img :src="option.img"/> | 60 | <img :src="option.img"/> |
61 | </div> | 61 | </div> |
62 | - </a-col> | 62 | + </a-col> --> |
63 | 63 | ||
64 | </a-row> | 64 | </a-row> |
65 | 65 |
ant-design-vue-jeecg/src/views/jeecg/JeecgOrderMainList.vue
@@ -57,7 +57,7 @@ | @@ -57,7 +57,7 @@ | ||
57 | <div> | 57 | <div> |
58 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 58 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
59 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 59 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
60 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 60 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
61 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 61 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
62 | </div> | 62 | </div> |
63 | 63 |
ant-design-vue-jeecg/src/views/jeecg/TableExpandeSub.vue
@@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
52 | <div> | 52 | <div> |
53 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 53 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
54 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 54 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
55 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 55 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
56 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 56 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
57 | </div> | 57 | </div> |
58 | 58 |
ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderCustomerList.vue
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | <div> | 22 | <div> |
23 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 23 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
24 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 24 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
25 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 25 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
26 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 26 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
27 | </div> | 27 | </div> |
28 | 28 |
ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderDMainList.vue
@@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
53 | <div> | 53 | <div> |
54 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 54 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
55 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 55 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
56 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 56 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
57 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 57 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
58 | </div> | 58 | </div> |
59 | 59 |
ant-design-vue-jeecg/src/views/jeecg/tablist/JeecgOrderTicketList.vue
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | <div> | 22 | <div> |
23 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 23 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
24 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 24 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
25 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 25 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
26 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 26 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
27 | </div> | 27 | </div> |
28 | 28 |
ant-design-vue-jeecg/src/views/system/DataLogList.vue
@@ -34,8 +34,8 @@ | @@ -34,8 +34,8 @@ | ||
34 | <div> | 34 | <div> |
35 | <!--已选择的清空 --> | 35 | <!--已选择的清空 --> |
36 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 36 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
37 | - <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择 <a | ||
38 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 37 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
38 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | ||
39 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 39 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
40 | </div> | 40 | </div> |
41 | <a-table | 41 | <a-table |
@@ -51,7 +51,7 @@ | @@ -51,7 +51,7 @@ | ||
51 | @change="handleTableChange" | 51 | @change="handleTableChange" |
52 | > | 52 | > |
53 | <!-- 字符串超长截取省略号显示--> | 53 | <!-- 字符串超长截取省略号显示--> |
54 | - <span slot="dataContent" slot-scope="text, record"> | 54 | + <span slot="dataContent" slot-scope="text"> |
55 | <j-ellipsis :value="text" :length="80"/> | 55 | <j-ellipsis :value="text" :length="80"/> |
56 | </span> | 56 | </span> |
57 | </a-table> | 57 | </a-table> |
ant-design-vue-jeecg/src/views/system/DepartList2.vue
@@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
25 | <div> | 25 | <div> |
26 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 26 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
27 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 27 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
28 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 28 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
29 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 29 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
30 | </div> | 30 | </div> |
31 | <a-table | 31 | <a-table |
ant-design-vue-jeecg/src/views/system/NewPermissionList.vue
@@ -17,9 +17,9 @@ | @@ -17,9 +17,9 @@ | ||
17 | <div> | 17 | <div> |
18 | 18 | ||
19 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 19 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
20 | - <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择 <a style="font-weight: 600">{{ | 20 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ |
21 | selectedRowKeys.length | 21 | selectedRowKeys.length |
22 | - }}</a>项 | 22 | + }}</a> 项 |
23 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 23 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
24 | </div> | 24 | </div> |
25 | 25 |
ant-design-vue-jeecg/src/views/system/PermissionList.vue
@@ -18,9 +18,9 @@ | @@ -18,9 +18,9 @@ | ||
18 | <div> | 18 | <div> |
19 | 19 | ||
20 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 20 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
21 | - <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择 <a style="font-weight: 600">{{ | 21 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ |
22 | selectedRowKeys.length | 22 | selectedRowKeys.length |
23 | - }}</a>项 | 23 | + }}</a> 项 |
24 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 24 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
25 | </div> | 25 | </div> |
26 | 26 |
ant-design-vue-jeecg/src/views/system/RoleList.vue
@@ -56,8 +56,8 @@ | @@ -56,8 +56,8 @@ | ||
56 | <!-- table区域-begin --> | 56 | <!-- table区域-begin --> |
57 | <div> | 57 | <div> |
58 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 58 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
59 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | ||
60 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 59 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
60 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | ||
61 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 61 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
62 | </div> | 62 | </div> |
63 | 63 |
ant-design-vue-jeecg/src/views/system/RoleUserList.vue
@@ -31,23 +31,22 @@ | @@ -31,23 +31,22 @@ | ||
31 | </a-form> | 31 | </a-form> |
32 | </div> | 32 | </div> |
33 | <!-- 操作按钮区域 --> | 33 | <!-- 操作按钮区域 --> |
34 | - <div class="table-operator" style="margin: 5px 0 10px 2px"> | 34 | + <div class="table-operator"> |
35 | <a-button @click="handleAdd" v-has="'role:add'" type="primary" icon="plus">新建角色</a-button> | 35 | <a-button @click="handleAdd" v-has="'role:add'" type="primary" icon="plus">新建角色</a-button> |
36 | <!--<a-button @click="handleEdit(model1)" type="primary" icon="plus">角色编辑</a-button>--> | 36 | <!--<a-button @click="handleEdit(model1)" type="primary" icon="plus">角色编辑</a-button>--> |
37 | - <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" | ||
38 | - :action="importExcelUrl" @change="handleImportExcel"> | 37 | + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
39 | <a-button v-has="'role:import'" type="primary" icon="import">导入</a-button> | 38 | <a-button v-has="'role:import'" type="primary" icon="import">导入</a-button> |
40 | </a-upload> | 39 | </a-upload> |
41 | <a-button v-has="'role:export'" type="primary" icon="download" @click="handleExportXls('角色管理')">导出</a-button> | 40 | <a-button v-has="'role:export'" type="primary" icon="download" @click="handleExportXls('角色管理')">导出</a-button> |
42 | </div> | 41 | </div> |
43 | 42 | ||
44 | - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | ||
45 | - <i class="anticon anticon-info-circle ant-alert-icon"> | ||
46 | - </i> 已选择 <a><b>{{ selectedRowKeys1.length }}</b></a>项 | ||
47 | - <a style="margin-left: 24px" @click="onClearSelected1">清空</a> | ||
48 | - </div> | 43 | + <div> |
44 | + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | ||
45 | + <i class="anticon anticon-info-circle ant-alert-icon"> | ||
46 | + </i> 已选择 <a><b>{{ selectedRowKeys1.length }}</b></a> 项 | ||
47 | + <a style="margin-left: 24px" @click="onClearSelected1">清空</a> | ||
48 | + </div> | ||
49 | 49 | ||
50 | - <div style="margin-top: 15px"> | ||
51 | <a-table | 50 | <a-table |
52 | style="height:500px" | 51 | style="height:500px" |
53 | ref="table" | 52 | ref="table" |
@@ -60,30 +59,26 @@ | @@ -60,30 +59,26 @@ | ||
60 | :loading="loading" | 59 | :loading="loading" |
61 | :rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}" | 60 | :rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}" |
62 | @change="handleTableChange"> | 61 | @change="handleTableChange"> |
63 | - <span slot="action" slot-scope="text, record"> | ||
64 | - <a @click="handleOpen(record)">用户</a> | ||
65 | - <a-divider type="vertical"/> | ||
66 | - | ||
67 | - | ||
68 | - <a-dropdown> | ||
69 | - <a class="ant-dropdown-link"> | ||
70 | - 更多 <a-icon type="down"/> | ||
71 | - </a> | ||
72 | - <a-menu slot="overlay"> | ||
73 | - <a-menu-item> | ||
74 | - <a v-has="'role:authorize'" @click="handlePerssion(record.id)">授权</a> | ||
75 | - </a-menu-item> | ||
76 | - <a-menu-item> | ||
77 | - <a v-has="'role:edit'" @click="handleEdit(record)">编辑</a> | ||
78 | - </a-menu-item> | ||
79 | - <a-menu-item> | ||
80 | - <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete1(record.id)"> | ||
81 | - <a v-has="'role:delete'">删除</a> | ||
82 | - </a-popconfirm> | ||
83 | - </a-menu-item> | ||
84 | - </a-menu> | ||
85 | - </a-dropdown> | ||
86 | - </span> | 62 | + <span slot="action" slot-scope="text, record"> |
63 | + <a @click="handleOpen(record)">用户</a> | ||
64 | + <a-divider type="vertical"/> | ||
65 | + <a-dropdown> | ||
66 | + <a class="ant-dropdown-link">更多<a-icon type="down"/></a> | ||
67 | + <a-menu slot="overlay"> | ||
68 | + <a-menu-item> | ||
69 | + <a v-has="'role:authorize'" @click="handlePerssion(record.id)">授权</a> | ||
70 | + </a-menu-item> | ||
71 | + <a-menu-item> | ||
72 | + <a v-has="'role:edit'" @click="handleEdit(record)">编辑</a> | ||
73 | + </a-menu-item> | ||
74 | + <a-menu-item> | ||
75 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete1(record.id)"> | ||
76 | + <a v-has="'role:delete'">删除</a> | ||
77 | + </a-popconfirm> | ||
78 | + </a-menu-item> | ||
79 | + </a-menu> | ||
80 | + </a-dropdown> | ||
81 | + </span> | ||
87 | </a-table> | 82 | </a-table> |
88 | </div> | 83 | </div> |
89 | <!-- 右侧的角色权限配置 --> | 84 | <!-- 右侧的角色权限配置 --> |
ant-design-vue-jeecg/src/views/system/SysAnnouncementList.vue
@@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
52 | <div> | 52 | <div> |
53 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 53 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
54 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 54 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
55 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 55 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
56 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 56 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
57 | </div> | 57 | </div> |
58 | 58 |
ant-design-vue-jeecg/src/views/system/SysCategoryList.vue
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | <div> | 26 | <div> |
27 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 27 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
28 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 28 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
29 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 29 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
30 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 30 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
31 | </div> | 31 | </div> |
32 | 32 |
ant-design-vue-jeecg/src/views/system/SysPositionList.vue
@@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
64 | <div> | 64 | <div> |
65 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 65 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
66 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 66 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
67 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 67 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
68 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 68 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
69 | </div> | 69 | </div> |
70 | 70 |
ant-design-vue-jeecg/src/views/system/SysUserOnlineList.vue
@@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
24 | <div> | 24 | <div> |
25 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 25 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
26 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 26 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
27 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 27 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
28 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 28 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
29 | </div> | 29 | </div> |
30 | 30 |
ant-design-vue-jeecg/src/views/system/TenantList.vue
@@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
29 | <div> | 29 | <div> |
30 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 30 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
31 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 31 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
32 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 32 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
33 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 33 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
34 | </div> | 34 | </div> |
35 | 35 |
ant-design-vue-jeecg/src/views/system/UserList.vue
@@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
61 | </div> | 61 | </div> |
62 | 62 | ||
63 | <!-- 操作按钮区域 --> | 63 | <!-- 操作按钮区域 --> |
64 | - <div class="table-operator" style="border-top: 5px"> | 64 | + <div class="table-operator"> |
65 | <a-button v-has="'user:add'" @click="handleAdd" type="primary" icon="plus">添加用户</a-button> | 65 | <a-button v-has="'user:add'" @click="handleAdd" type="primary" icon="plus">添加用户</a-button> |
66 | <a-button v-has="'user:export'" type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button> | 66 | <a-button v-has="'user:export'" type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button> |
67 | <a-upload v-has="'user:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" | 67 | <a-upload v-has="'user:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" |
@@ -97,8 +97,8 @@ | @@ -97,8 +97,8 @@ | ||
97 | <!-- table区域-begin --> | 97 | <!-- table区域-begin --> |
98 | <div> | 98 | <div> |
99 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 99 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
100 | - <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择 <a | ||
101 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 100 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 |
101 | + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | ||
102 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 102 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
103 | </div> | 103 | </div> |
104 | 104 |
ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocationTask.vue
@@ -23,6 +23,25 @@ | @@ -23,6 +23,25 @@ | ||
23 | /> | 23 | /> |
24 | </a-form-item> | 24 | </a-form-item> |
25 | </a-col> | 25 | </a-col> |
26 | + <a-col :xl="12" :lg="14" :md="16" :sm="24"> | ||
27 | + <a-form-item label="任务创建时间"> | ||
28 | + <j-date | ||
29 | + :show-time="true" | ||
30 | + date-format="YYYY-MM-DD HH:mm:ss" | ||
31 | + placeholder="请选择开始时间" | ||
32 | + class="query-group-cust" | ||
33 | + v-model="queryParam.taskCreateTimeBegin" | ||
34 | + ></j-date> | ||
35 | + <span class="query-group-split-cust"></span> | ||
36 | + <j-date | ||
37 | + :show-time="true" | ||
38 | + date-format="YYYY-MM-DD HH:mm:ss" | ||
39 | + placeholder="请选择结束时间" | ||
40 | + class="query-group-cust" | ||
41 | + v-model="queryParam.taskCreateTimeEnd" | ||
42 | + ></j-date> | ||
43 | + </a-form-item> | ||
44 | + </a-col> | ||
26 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 45 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
27 | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | 46 | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
28 | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | 47 | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
@@ -90,20 +109,40 @@ export default { | @@ -90,20 +109,40 @@ export default { | ||
90 | required: false | 109 | required: false |
91 | } | 110 | } |
92 | }, | 111 | }, |
112 | + | ||
93 | watch: { | 113 | watch: { |
94 | mainId: { | 114 | mainId: { |
95 | immediate: true, | 115 | immediate: true, |
96 | handler(val) { | 116 | handler(val) { |
97 | - if (!this.mainId) { | ||
98 | - this.clearList() | ||
99 | - } else { | ||
100 | - this.queryParam['locationCode'] = val | ||
101 | - this.loadData(1) | ||
102 | - } | 117 | + var nowDate = new Date() |
118 | + this.queryParam['taskCreateTimeBegin'] = new Date(nowDate.getTime() - 90 * 24 * 60 * 60 * 1000).format('yyyy-MM-dd hh:mm:ss') | ||
119 | + this.queryParam['taskCreateTimeEnd'] = nowDate.format('yyyy-MM-dd hh:mm:ss') | ||
120 | + this.queryParam['locationCode'] = val | ||
121 | + this.loadData(1) | ||
103 | } | 122 | } |
104 | } | 123 | } |
105 | }, | 124 | }, |
106 | data() { | 125 | data() { |
126 | + Date.prototype.format = function(fmt) { | ||
127 | + var o = { | ||
128 | + 'M+': this.getMonth() + 1, //月份 | ||
129 | + 'd+': this.getDate(), //日 | ||
130 | + 'h+': this.getHours(), //小时 | ||
131 | + 'm+': this.getMinutes(), //分 | ||
132 | + 's+': this.getSeconds(), //秒 | ||
133 | + 'q+': Math.floor((this.getMonth() + 3) / 3), //季度 | ||
134 | + S: this.getMilliseconds() //毫秒 | ||
135 | + } | ||
136 | + if (/(y+)/.test(fmt)) { | ||
137 | + fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)) | ||
138 | + } | ||
139 | + for (var k in o) { | ||
140 | + if (new RegExp('(' + k + ')').test(fmt)) { | ||
141 | + fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)) | ||
142 | + } | ||
143 | + } | ||
144 | + return fmt | ||
145 | + } | ||
107 | return { | 146 | return { |
108 | description: '库位任务信息比较页面', | 147 | description: '库位任务信息比较页面', |
109 | disableMixinCreated: true, | 148 | disableMixinCreated: true, |
@@ -227,7 +266,6 @@ export default { | @@ -227,7 +266,6 @@ export default { | ||
227 | } | 266 | } |
228 | }) | 267 | }) |
229 | } | 268 | } |
230 | - | ||
231 | // 获取 wcs_task_status | 269 | // 获取 wcs_task_status |
232 | if (getDictItemsFromCache('wcs_task_status')) { | 270 | if (getDictItemsFromCache('wcs_task_status')) { |
233 | this.wcsTaskStatusList = getDictItemsFromCache('wcs_task_status') | 271 | this.wcsTaskStatusList = getDictItemsFromCache('wcs_task_status') |
ant-design-vue-jeecg/src/views/system/config/AddressList.vue
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | <div> | 49 | <div> |
50 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 50 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
51 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 51 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
52 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 52 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
53 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 53 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
54 | </div> | 54 | </div> |
55 | 55 |
ant-design-vue-jeecg/src/views/system/config/AgvPortList.vue
@@ -47,7 +47,7 @@ | @@ -47,7 +47,7 @@ | ||
47 | <!-- table区域-begin --> | 47 | <!-- table区域-begin --> |
48 | <div> | 48 | <div> |
49 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 49 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
50 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 50 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
51 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 51 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
52 | </div> | 52 | </div> |
53 | 53 |
ant-design-vue-jeecg/src/views/system/config/BomDetailList.vue
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | <div> | 31 | <div> |
32 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 32 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
33 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 33 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
34 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 34 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
35 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 35 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
36 | </div> | 36 | </div> |
37 | 37 |
ant-design-vue-jeecg/src/views/system/config/BomHeaderList.vue
@@ -43,7 +43,7 @@ | @@ -43,7 +43,7 @@ | ||
43 | <div> | 43 | <div> |
44 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 44 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
45 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 45 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
46 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 46 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
47 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 47 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
48 | </div> | 48 | </div> |
49 | 49 |
ant-design-vue-jeecg/src/views/system/config/CarrierList.vue
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | <div> | 34 | <div> |
35 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 35 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
36 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 36 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
37 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 37 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
38 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 38 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
39 | </div> | 39 | </div> |
40 | 40 |
ant-design-vue-jeecg/src/views/system/config/CompanyList.vue
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | 20 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
21 | <a @click="handleToggleSearch" style="margin-left: 8px"> | 21 | <a @click="handleToggleSearch" style="margin-left: 8px"> |
22 | {{ toggleSearchStatus ? '收起' : '展开' }} | 22 | {{ toggleSearchStatus ? '收起' : '展开' }} |
23 | - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | 23 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> |
24 | </a> | 24 | </a> |
25 | </span> | 25 | </span> |
26 | </a-col> | 26 | </a-col> |
@@ -33,19 +33,27 @@ | @@ -33,19 +33,27 @@ | ||
33 | <div class="table-operator"> | 33 | <div class="table-operator"> |
34 | <a-button @click="handleAdd" v-has="'company:add'" type="primary" icon="plus">新增</a-button> | 34 | <a-button @click="handleAdd" v-has="'company:add'" type="primary" icon="plus">新增</a-button> |
35 | <a-button v-has="'company:export'" type="primary" icon="download" @click="handleExportXls('货主')">导出</a-button> | 35 | <a-button v-has="'company:export'" type="primary" icon="download" @click="handleExportXls('货主')">导出</a-button> |
36 | - <a-upload v-has="'company:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" | ||
37 | - @change="handleImportExcel"> | 36 | + <a-upload |
37 | + v-has="'company:import'" | ||
38 | + name="file" | ||
39 | + :showUploadList="false" | ||
40 | + :multiple="false" | ||
41 | + :headers="tokenHeader" | ||
42 | + :action="importExcelUrl" | ||
43 | + @change="handleImportExcel" | ||
44 | + > | ||
38 | <a-button type="primary" icon="import">导入</a-button> | 45 | <a-button type="primary" icon="import">导入</a-button> |
39 | </a-upload> | 46 | </a-upload> |
40 | <a-dropdown v-if="selectedRowKeys.length > 0"> | 47 | <a-dropdown v-if="selectedRowKeys.length > 0"> |
41 | <a-menu slot="overlay" v-has="'company:deleteBatch'"> | 48 | <a-menu slot="overlay" v-has="'company:deleteBatch'"> |
42 | <a-menu-item key="1" @click="batchDel"> | 49 | <a-menu-item key="1" @click="batchDel"> |
43 | - <a-icon type="deleteBatch"/> | 50 | + <a-icon type="deleteBatch" /> |
44 | 删除 | 51 | 删除 |
45 | </a-menu-item> | 52 | </a-menu-item> |
46 | </a-menu> | 53 | </a-menu> |
47 | - <a-button style="margin-left: 8px"> 批量操作 | ||
48 | - <a-icon type="down"/> | 54 | + <a-button style="margin-left: 8px"> |
55 | + 批量操作 | ||
56 | + <a-icon type="down" /> | ||
49 | </a-button> | 57 | </a-button> |
50 | </a-dropdown> | 58 | </a-dropdown> |
51 | </div> | 59 | </div> |
@@ -53,49 +61,47 @@ | @@ -53,49 +61,47 @@ | ||
53 | <!-- table区域-begin --> | 61 | <!-- table区域-begin --> |
54 | <div> | 62 | <div> |
55 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 63 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
56 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | ||
57 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 64 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 |
65 | + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | ||
58 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 66 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
59 | </div> | 67 | </div> |
60 | 68 | ||
61 | <a-table | 69 | <a-table |
62 | ref="table" | 70 | ref="table" |
63 | size="middle" | 71 | size="middle" |
64 | - :scroll="{x:true}" | 72 | + :scroll="{ x: true }" |
65 | bordered | 73 | bordered |
66 | rowKey="id" | 74 | rowKey="id" |
67 | :columns="columns" | 75 | :columns="columns" |
68 | :dataSource="dataSource" | 76 | :dataSource="dataSource" |
69 | :pagination="ipagination" | 77 | :pagination="ipagination" |
70 | :loading="loading" | 78 | :loading="loading" |
71 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | 79 | + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" |
72 | class="j-table-force-nowrap" | 80 | class="j-table-force-nowrap" |
73 | - @change="handleTableChange"> | ||
74 | - | 81 | + @change="handleTableChange" |
82 | + > | ||
75 | <template slot="htmlSlot" slot-scope="text"> | 83 | <template slot="htmlSlot" slot-scope="text"> |
76 | <div v-html="text"></div> | 84 | <div v-html="text"></div> |
77 | </template> | 85 | </template> |
78 | <template slot="imgSlot" slot-scope="text"> | 86 | <template slot="imgSlot" slot-scope="text"> |
79 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | 87 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
80 | - <img v-else :src="getImgView(text)" height="25px" alt="" | ||
81 | - style="max-width:80px;font-size: 12px;font-style: italic;"/> | 88 | + <img |
89 | + v-else | ||
90 | + :src="getImgView(text)" | ||
91 | + height="25px" | ||
92 | + alt="" | ||
93 | + style="max-width:80px;font-size: 12px;font-style: italic;" | ||
94 | + /> | ||
82 | </template> | 95 | </template> |
83 | <template slot="fileSlot" slot-scope="text"> | 96 | <template slot="fileSlot" slot-scope="text"> |
84 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | 97 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
85 | - <a-button | ||
86 | - v-else | ||
87 | - :ghost="true" | ||
88 | - type="primary" | ||
89 | - icon="download" | ||
90 | - size="small" | ||
91 | - @click="downloadFile(text)"> | 98 | + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> |
92 | 下载 | 99 | 下载 |
93 | </a-button> | 100 | </a-button> |
94 | </template> | 101 | </template> |
95 | 102 | ||
96 | <span slot="action" slot-scope="text, record"> | 103 | <span slot="action" slot-scope="text, record"> |
97 | - <a v-has="'company:edit'" @click="handleEdit(record)">编辑</a> | ||
98 | - <a-divider type="vertical"/> | 104 | + <a v-has="'company:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical" /></a> |
99 | <a-dropdown> | 105 | <a-dropdown> |
100 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> | 106 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
101 | <a-menu slot="overlay"> | 107 | <a-menu slot="overlay"> |
@@ -110,7 +116,6 @@ | @@ -110,7 +116,6 @@ | ||
110 | </a-menu> | 116 | </a-menu> |
111 | </a-dropdown> | 117 | </a-dropdown> |
112 | </span> | 118 | </span> |
113 | - | ||
114 | </a-table> | 119 | </a-table> |
115 | </div> | 120 | </div> |
116 | 121 | ||
@@ -119,10 +124,9 @@ | @@ -119,10 +124,9 @@ | ||
119 | </template> | 124 | </template> |
120 | 125 | ||
121 | <script> | 126 | <script> |
122 | - | ||
123 | import '@/assets/less/TableExpand.less' | 127 | import '@/assets/less/TableExpand.less' |
124 | -import {mixinDevice} from '@/utils/mixin' | ||
125 | -import {JeecgListMixin} from '@/mixins/JeecgListMixin' | 128 | +import { mixinDevice } from '@/utils/mixin' |
129 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
126 | import CompanyModal from './modules/CompanyModal' | 130 | import CompanyModal from './modules/CompanyModal' |
127 | 131 | ||
128 | export default { | 132 | export default { |
@@ -141,105 +145,103 @@ export default { | @@ -141,105 +145,103 @@ export default { | ||
141 | dataIndex: '', | 145 | dataIndex: '', |
142 | key: 'rowIndex', | 146 | key: 'rowIndex', |
143 | width: 60, | 147 | width: 60, |
144 | - align: "center", | ||
145 | - customRender: function (t, r, index) { | ||
146 | - return parseInt(index) + 1; | 148 | + align: 'center', |
149 | + customRender: function(t, r, index) { | ||
150 | + return parseInt(index) + 1 | ||
147 | } | 151 | } |
148 | }, | 152 | }, |
149 | { | 153 | { |
150 | title: '货主编码', | 154 | title: '货主编码', |
151 | - align: "center", | 155 | + align: 'center', |
152 | dataIndex: 'code' | 156 | dataIndex: 'code' |
153 | }, | 157 | }, |
154 | { | 158 | { |
155 | title: '货主名称', | 159 | title: '货主名称', |
156 | - align: "center", | 160 | + align: 'center', |
157 | dataIndex: 'name' | 161 | dataIndex: 'name' |
158 | }, | 162 | }, |
159 | { | 163 | { |
160 | title: '地址', | 164 | title: '地址', |
161 | - align: "center", | 165 | + align: 'center', |
162 | dataIndex: 'address' | 166 | dataIndex: 'address' |
163 | }, | 167 | }, |
164 | { | 168 | { |
165 | title: '区县', | 169 | title: '区县', |
166 | - align: "center", | 170 | + align: 'center', |
167 | dataIndex: 'district' | 171 | dataIndex: 'district' |
168 | }, | 172 | }, |
169 | { | 173 | { |
170 | title: '城市', | 174 | title: '城市', |
171 | - align: "center", | 175 | + align: 'center', |
172 | dataIndex: 'city' | 176 | dataIndex: 'city' |
173 | }, | 177 | }, |
174 | { | 178 | { |
175 | title: '省份', | 179 | title: '省份', |
176 | - align: "center", | 180 | + align: 'center', |
177 | dataIndex: 'province' | 181 | dataIndex: 'province' |
178 | }, | 182 | }, |
179 | { | 183 | { |
180 | title: '国家', | 184 | title: '国家', |
181 | - align: "center", | 185 | + align: 'center', |
182 | dataIndex: 'country' | 186 | dataIndex: 'country' |
183 | }, | 187 | }, |
184 | { | 188 | { |
185 | title: '邮编', | 189 | title: '邮编', |
186 | - align: "center", | 190 | + align: 'center', |
187 | dataIndex: 'postalcode' | 191 | dataIndex: 'postalcode' |
188 | }, | 192 | }, |
189 | { | 193 | { |
190 | title: '联系人', | 194 | title: '联系人', |
191 | - align: "center", | 195 | + align: 'center', |
192 | dataIndex: 'attentionto' | 196 | dataIndex: 'attentionto' |
193 | }, | 197 | }, |
194 | { | 198 | { |
195 | title: '联系电话', | 199 | title: '联系电话', |
196 | - align: "center", | 200 | + align: 'center', |
197 | dataIndex: 'phonenum' | 201 | dataIndex: 'phonenum' |
198 | }, | 202 | }, |
199 | { | 203 | { |
200 | title: '操作', | 204 | title: '操作', |
201 | dataIndex: 'action', | 205 | dataIndex: 'action', |
202 | - align: "center", | ||
203 | - fixed: "right", | 206 | + align: 'center', |
207 | + fixed: 'right', | ||
204 | width: 147, | 208 | width: 147, |
205 | - scopedSlots: {customRender: 'action'} | 209 | + scopedSlots: { customRender: 'action' } |
206 | } | 210 | } |
207 | ], | 211 | ], |
208 | url: { | 212 | url: { |
209 | - list: "/config/company/list", | ||
210 | - delete: "/config/company/delete", | ||
211 | - deleteBatch: "/config/company/deleteBatch", | ||
212 | - exportXlsUrl: "/config/company/exportXls", | ||
213 | - importExcelUrl: "config/company/importExcel", | ||
214 | - | 213 | + list: '/config/company/list', |
214 | + delete: '/config/company/delete', | ||
215 | + deleteBatch: '/config/company/deleteBatch', | ||
216 | + exportXlsUrl: '/config/company/exportXls', | ||
217 | + importExcelUrl: 'config/company/importExcel' | ||
215 | }, | 218 | }, |
216 | dictOptions: {}, | 219 | dictOptions: {}, |
217 | - superFieldList: [], | 220 | + superFieldList: [] |
218 | } | 221 | } |
219 | }, | 222 | }, |
220 | created() { | 223 | created() { |
221 | - this.getSuperFieldList(); | 224 | + this.getSuperFieldList() |
222 | }, | 225 | }, |
223 | computed: { | 226 | computed: { |
224 | - importExcelUrl: function () { | ||
225 | - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
226 | - }, | 227 | + importExcelUrl: function() { |
228 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` | ||
229 | + } | ||
227 | }, | 230 | }, |
228 | methods: { | 231 | methods: { |
229 | - initDictConfig() { | ||
230 | - }, | 232 | + initDictConfig() {}, |
231 | getSuperFieldList() { | 233 | getSuperFieldList() { |
232 | - let fieldList = []; | ||
233 | - fieldList.push({type: 'string', value: 'code', text: '货主编码', dictCode: ''}) | ||
234 | - fieldList.push({type: 'string', value: 'name', text: '货主名称', dictCode: ''}) | ||
235 | - fieldList.push({type: 'string', value: 'address', text: '地址', dictCode: ''}) | ||
236 | - fieldList.push({type: 'string', value: 'district', text: '区县', dictCode: ''}) | ||
237 | - fieldList.push({type: 'string', value: 'city', text: '城市', dictCode: ''}) | ||
238 | - fieldList.push({type: 'string', value: 'province', text: '省份', dictCode: ''}) | ||
239 | - fieldList.push({type: 'string', value: 'country', text: '国家', dictCode: ''}) | ||
240 | - fieldList.push({type: 'string', value: 'postalcode', text: '邮编', dictCode: ''}) | ||
241 | - fieldList.push({type: 'string', value: 'attentionto', text: '联系人', dictCode: ''}) | ||
242 | - fieldList.push({type: 'string', value: 'phonenum', text: '联系电话', dictCode: ''}) | 234 | + let fieldList = [] |
235 | + fieldList.push({ type: 'string', value: 'code', text: '货主编码', dictCode: '' }) | ||
236 | + fieldList.push({ type: 'string', value: 'name', text: '货主名称', dictCode: '' }) | ||
237 | + fieldList.push({ type: 'string', value: 'address', text: '地址', dictCode: '' }) | ||
238 | + fieldList.push({ type: 'string', value: 'district', text: '区县', dictCode: '' }) | ||
239 | + fieldList.push({ type: 'string', value: 'city', text: '城市', dictCode: '' }) | ||
240 | + fieldList.push({ type: 'string', value: 'province', text: '省份', dictCode: '' }) | ||
241 | + fieldList.push({ type: 'string', value: 'country', text: '国家', dictCode: '' }) | ||
242 | + fieldList.push({ type: 'string', value: 'postalcode', text: '邮编', dictCode: '' }) | ||
243 | + fieldList.push({ type: 'string', value: 'attentionto', text: '联系人', dictCode: '' }) | ||
244 | + fieldList.push({ type: 'string', value: 'phonenum', text: '联系电话', dictCode: '' }) | ||
243 | this.superFieldList = fieldList | 245 | this.superFieldList = fieldList |
244 | } | 246 | } |
245 | } | 247 | } |
ant-design-vue-jeecg/src/views/system/config/ContainerCapacityList.vue
@@ -6,7 +6,16 @@ | @@ -6,7 +6,16 @@ | ||
6 | <a-row :gutter="24"> | 6 | <a-row :gutter="24"> |
7 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 7 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
8 | <a-form-item label="容器类型"> | 8 | <a-form-item label="容器类型"> |
9 | - <a-input placeholder="请输入容器类型" v-model="queryParam.containerTypeCode"></a-input> | 9 | + <a-select |
10 | + show-search | ||
11 | + placeholder="请选择容器类型" | ||
12 | + option-filter-prop="children" | ||
13 | + v-model="queryParam.containerTypeCode" | ||
14 | + > | ||
15 | + <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code"> | ||
16 | + {{ item.name }} | ||
17 | + </a-select-option> | ||
18 | + </a-select> | ||
10 | </a-form-item> | 19 | </a-form-item> |
11 | </a-col> | 20 | </a-col> |
12 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 21 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
@@ -14,21 +23,15 @@ | @@ -14,21 +23,15 @@ | ||
14 | <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input> | 23 | <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input> |
15 | </a-form-item> | 24 | </a-form-item> |
16 | </a-col> | 25 | </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.enable" dictCode="enable_status"/> | ||
21 | - </a-form-item> | ||
22 | - </a-col> | ||
23 | - </template> | 26 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
27 | + <a-form-item label="是否可用"> | ||
28 | + <j-dict-select-tag placeholder="请选择是否可用" v-model="queryParam.enable" dictCode="enable_status" /> | ||
29 | + </a-form-item> | ||
30 | + </a-col> | ||
24 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 31 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
25 | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | 32 | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
26 | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | 33 | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
27 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | 34 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
28 | - <a @click="handleToggleSearch" style="margin-left: 8px"> | ||
29 | - {{ toggleSearchStatus ? '收起' : '展开' }} | ||
30 | - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | ||
31 | - </a> | ||
32 | </span> | 35 | </span> |
33 | </a-col> | 36 | </a-col> |
34 | </a-row> | 37 | </a-row> |
@@ -39,20 +42,35 @@ | @@ -39,20 +42,35 @@ | ||
39 | <!-- 操作按钮区域 --> | 42 | <!-- 操作按钮区域 --> |
40 | <div class="table-operator"> | 43 | <div class="table-operator"> |
41 | <a-button @click="handleAdd" v-has="'containerCapacity:add'" type="primary" icon="plus">新增</a-button> | 44 | <a-button @click="handleAdd" v-has="'containerCapacity:add'" type="primary" icon="plus">新增</a-button> |
42 | - <a-button v-has="'containerCapacity:export'" type="primary" icon="download" @click="handleExportXls('容器容量管理')">导出</a-button> | ||
43 | - <a-upload v-has="'containerCapacity:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" | ||
44 | - @change="handleImportExcel"> | 45 | + <a-button |
46 | + v-has="'containerCapacity:export'" | ||
47 | + type="primary" | ||
48 | + icon="download" | ||
49 | + @click="handleExportXls('容器容量管理')" | ||
50 | + > | ||
51 | + 导出 | ||
52 | + </a-button> | ||
53 | + <a-upload | ||
54 | + v-has="'containerCapacity:import'" | ||
55 | + name="file" | ||
56 | + :showUploadList="false" | ||
57 | + :multiple="false" | ||
58 | + :headers="tokenHeader" | ||
59 | + :action="importExcelUrl" | ||
60 | + @change="handleImportExcel" | ||
61 | + > | ||
45 | <a-button type="primary" icon="import">导入</a-button> | 62 | <a-button type="primary" icon="import">导入</a-button> |
46 | </a-upload> | 63 | </a-upload> |
47 | <a-dropdown v-if="selectedRowKeys.length > 0"> | 64 | <a-dropdown v-if="selectedRowKeys.length > 0"> |
48 | <a-menu slot="overlay" v-has="'containerCapacity:deleteBatch'"> | 65 | <a-menu slot="overlay" v-has="'containerCapacity:deleteBatch'"> |
49 | <a-menu-item key="1" @click="batchDel"> | 66 | <a-menu-item key="1" @click="batchDel"> |
50 | - <a-icon type="delete"/> | 67 | + <a-icon type="delete" /> |
51 | 删除 | 68 | 删除 |
52 | </a-menu-item> | 69 | </a-menu-item> |
53 | </a-menu> | 70 | </a-menu> |
54 | - <a-button style="margin-left: 8px"> 批量操作 | ||
55 | - <a-icon type="down"/> | 71 | + <a-button style="margin-left: 8px"> |
72 | + 批量操作 | ||
73 | + <a-icon type="down" /> | ||
56 | </a-button> | 74 | </a-button> |
57 | </a-dropdown> | 75 | </a-dropdown> |
58 | </div> | 76 | </div> |
@@ -60,50 +78,52 @@ | @@ -60,50 +78,52 @@ | ||
60 | <!-- table区域-begin --> | 78 | <!-- table区域-begin --> |
61 | <div> | 79 | <div> |
62 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 80 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
63 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | ||
64 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 81 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 |
82 | + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | ||
65 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 83 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
66 | </div> | 84 | </div> |
67 | 85 | ||
68 | <a-table | 86 | <a-table |
69 | ref="table" | 87 | ref="table" |
70 | size="middle" | 88 | size="middle" |
71 | - :scroll="{x:true}" | 89 | + :scroll="{ x: true }" |
72 | bordered | 90 | bordered |
73 | rowKey="id" | 91 | rowKey="id" |
74 | :columns="columns" | 92 | :columns="columns" |
75 | :dataSource="dataSource" | 93 | :dataSource="dataSource" |
76 | :pagination="ipagination" | 94 | :pagination="ipagination" |
77 | :loading="loading" | 95 | :loading="loading" |
78 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | 96 | + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" |
79 | class="j-table-force-nowrap" | 97 | class="j-table-force-nowrap" |
80 | - @change="handleTableChange"> | 98 | + @change="handleTableChange" |
99 | + > | ||
100 | + <span slot="containerTypeCode" slot-scope="containerTypeCode"> | ||
101 | + <a-tag :key="containerTypeCode" color="pink"> | ||
102 | + {{ solutionContainerType(containerTypeCode) }} | ||
103 | + </a-tag> | ||
104 | + </span> | ||
81 | 105 | ||
82 | <template slot="htmlSlot" slot-scope="text"> | 106 | <template slot="htmlSlot" slot-scope="text"> |
83 | <div v-html="text"></div> | 107 | <div v-html="text"></div> |
84 | </template> | 108 | </template> |
85 | <template slot="imgSlot" slot-scope="text"> | 109 | <template slot="imgSlot" slot-scope="text"> |
86 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | 110 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
87 | - <img v-else :src="getImgView(text)" height="25px" alt="" | ||
88 | - style="max-width:80px;font-size: 12px;font-style: italic;"/> | 111 | + <img |
112 | + v-else | ||
113 | + :src="getImgView(text)" | ||
114 | + height="25px" | ||
115 | + alt="" | ||
116 | + style="max-width:80px;font-size: 12px;font-style: italic;" | ||
117 | + /> | ||
89 | </template> | 118 | </template> |
90 | <template slot="fileSlot" slot-scope="text"> | 119 | <template slot="fileSlot" slot-scope="text"> |
91 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | 120 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
92 | - <a-button | ||
93 | - v-else | ||
94 | - :ghost="true" | ||
95 | - type="primary" | ||
96 | - icon="download" | ||
97 | - size="small" | ||
98 | - @click="downloadFile(text)"> | 121 | + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> |
99 | 下载 | 122 | 下载 |
100 | </a-button> | 123 | </a-button> |
101 | </template> | 124 | </template> |
102 | - | ||
103 | <span slot="action" slot-scope="text, record"> | 125 | <span slot="action" slot-scope="text, record"> |
104 | - <a v-has="'containerCapacity:edit'" @click="handleEdit(record)">编辑</a> | ||
105 | - | ||
106 | - <a-divider type="vertical"/> | 126 | + <a v-has="'containerCapacity:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> |
107 | <a-dropdown> | 127 | <a-dropdown> |
108 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> | 128 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
109 | <a-menu slot="overlay"> | 129 | <a-menu slot="overlay"> |
@@ -118,7 +138,6 @@ | @@ -118,7 +138,6 @@ | ||
118 | </a-menu> | 138 | </a-menu> |
119 | </a-dropdown> | 139 | </a-dropdown> |
120 | </span> | 140 | </span> |
121 | - | ||
122 | </a-table> | 141 | </a-table> |
123 | </div> | 142 | </div> |
124 | 143 | ||
@@ -127,13 +146,12 @@ | @@ -127,13 +146,12 @@ | ||
127 | </template> | 146 | </template> |
128 | 147 | ||
129 | <script> | 148 | <script> |
130 | - | ||
131 | import '@/assets/less/TableExpand.less' | 149 | import '@/assets/less/TableExpand.less' |
132 | -import {mixinDevice} from '@/utils/mixin' | ||
133 | -import {JeecgListMixin} from '@/mixins/JeecgListMixin' | 150 | +import { mixinDevice } from '@/utils/mixin' |
151 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
134 | import ContainerCapacityModal from './modules/ContainerCapacityModal' | 152 | import ContainerCapacityModal from './modules/ContainerCapacityModal' |
135 | -import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | ||
136 | -import {getZoneList} from '@/api/api' | 153 | +import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' |
154 | +import { getZoneList, getContainerTypeList } from '@/api/api' | ||
137 | 155 | ||
138 | export default { | 156 | export default { |
139 | name: 'ContainerCapacityList', | 157 | name: 'ContainerCapacityList', |
@@ -144,6 +162,7 @@ export default { | @@ -144,6 +162,7 @@ export default { | ||
144 | data() { | 162 | data() { |
145 | return { | 163 | return { |
146 | description: '容器容量管理管理页面', | 164 | description: '容器容量管理管理页面', |
165 | + containerTypeList: [], | ||
147 | // 表头 | 166 | // 表头 |
148 | columns: [ | 167 | columns: [ |
149 | { | 168 | { |
@@ -151,112 +170,125 @@ export default { | @@ -151,112 +170,125 @@ export default { | ||
151 | dataIndex: '', | 170 | dataIndex: '', |
152 | key: 'rowIndex', | 171 | key: 'rowIndex', |
153 | width: 60, | 172 | width: 60, |
154 | - align: "center", | ||
155 | - customRender: function (t, r, index) { | ||
156 | - return parseInt(index) + 1; | 173 | + align: 'center', |
174 | + customRender: function(t, r, index) { | ||
175 | + return parseInt(index) + 1 | ||
157 | } | 176 | } |
158 | }, | 177 | }, |
159 | { | 178 | { |
160 | title: '容器类型', | 179 | title: '容器类型', |
161 | - align: "center", | ||
162 | - dataIndex: 'containerTypeCode' | ||
163 | - }, | ||
164 | - { | ||
165 | - title: '货主', | ||
166 | - align: "center", | ||
167 | - dataIndex: 'companyCode' | 180 | + align: 'center', |
181 | + dataIndex: 'containerTypeCode', | ||
182 | + key: 'containerTypeCode', | ||
183 | + scopedSlots: { customRender: 'containerTypeCode' } | ||
168 | }, | 184 | }, |
169 | { | 185 | { |
170 | title: '物料编码', | 186 | title: '物料编码', |
171 | - align: "center", | 187 | + align: 'center', |
172 | dataIndex: 'materialCode' | 188 | dataIndex: 'materialCode' |
173 | }, | 189 | }, |
174 | { | 190 | { |
175 | title: '物料名称', | 191 | title: '物料名称', |
176 | - align: "center", | 192 | + align: 'center', |
177 | dataIndex: 'materialName' | 193 | dataIndex: 'materialName' |
178 | }, | 194 | }, |
179 | { | 195 | { |
180 | title: '物料单位', | 196 | title: '物料单位', |
181 | - align: "center", | 197 | + align: 'center', |
182 | dataIndex: 'materialUnit' | 198 | dataIndex: 'materialUnit' |
183 | }, | 199 | }, |
184 | { | 200 | { |
185 | title: '存放数量', | 201 | title: '存放数量', |
186 | - align: "center", | 202 | + align: 'center', |
187 | dataIndex: 'qty' | 203 | dataIndex: 'qty' |
188 | }, | 204 | }, |
189 | { | 205 | { |
190 | title: '是否可用', | 206 | title: '是否可用', |
191 | - align: "center", | 207 | + align: 'center', |
192 | dataIndex: 'enable_dictText' | 208 | dataIndex: 'enable_dictText' |
193 | }, | 209 | }, |
194 | { | 210 | { |
195 | title: '创建人', | 211 | title: '创建人', |
196 | - align: "center", | 212 | + align: 'center', |
197 | dataIndex: 'createBy' | 213 | dataIndex: 'createBy' |
198 | }, | 214 | }, |
199 | { | 215 | { |
200 | title: '创建日期', | 216 | title: '创建日期', |
201 | - align: "center", | 217 | + align: 'center', |
202 | dataIndex: 'createTime' | 218 | dataIndex: 'createTime' |
203 | }, | 219 | }, |
204 | { | 220 | { |
205 | title: '更新人', | 221 | title: '更新人', |
206 | - align: "center", | 222 | + align: 'center', |
207 | dataIndex: 'updateBy' | 223 | dataIndex: 'updateBy' |
208 | }, | 224 | }, |
209 | { | 225 | { |
210 | title: '更新日期', | 226 | title: '更新日期', |
211 | - align: "center", | 227 | + align: 'center', |
212 | dataIndex: 'updateTime' | 228 | dataIndex: 'updateTime' |
213 | }, | 229 | }, |
214 | { | 230 | { |
215 | title: '操作', | 231 | title: '操作', |
216 | dataIndex: 'action', | 232 | dataIndex: 'action', |
217 | - align: "center", | ||
218 | - fixed: "right", | 233 | + align: 'center', |
234 | + fixed: 'right', | ||
219 | width: 147, | 235 | width: 147, |
220 | - scopedSlots: {customRender: 'action'} | 236 | + scopedSlots: { customRender: 'action' } |
221 | } | 237 | } |
222 | ], | 238 | ], |
223 | url: { | 239 | url: { |
224 | - list: "/config/containerCapacity/list", | ||
225 | - delete: "/config/containerCapacity/delete", | ||
226 | - deleteBatch: "/config/containerCapacity/deleteBatch", | ||
227 | - exportXlsUrl: "/config/containerCapacity/exportXls", | ||
228 | - importExcelUrl: "config/containerCapacity/importExcel", | ||
229 | - | 240 | + list: '/config/containerCapacity/list', |
241 | + delete: '/config/containerCapacity/delete', | ||
242 | + deleteBatch: '/config/containerCapacity/deleteBatch', | ||
243 | + exportXlsUrl: '/config/containerCapacity/exportXls', | ||
244 | + importExcelUrl: 'config/containerCapacity/importExcel' | ||
230 | }, | 245 | }, |
231 | dictOptions: {}, | 246 | dictOptions: {}, |
232 | - superFieldList: [], | 247 | + superFieldList: [] |
233 | } | 248 | } |
234 | }, | 249 | }, |
235 | created() { | 250 | created() { |
236 | - this.getSuperFieldList(); | 251 | + this.getSuperFieldList() |
252 | + this.loadFrom() | ||
237 | }, | 253 | }, |
238 | computed: { | 254 | computed: { |
239 | - importExcelUrl: function () { | ||
240 | - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
241 | - }, | 255 | + importExcelUrl: function() { |
256 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` | ||
257 | + } | ||
242 | }, | 258 | }, |
243 | methods: { | 259 | methods: { |
244 | - initDictConfig() { | 260 | + initDictConfig() {}, |
261 | + solutionContainerType(value) { | ||
262 | + var actions = [] | ||
263 | + Object.keys(this.containerTypeList).some(key => { | ||
264 | + if (this.containerTypeList[key].code == '' + value) { | ||
265 | + actions.push(this.containerTypeList[key].name) | ||
266 | + return true | ||
267 | + } | ||
268 | + }) | ||
269 | + return actions.join('') | ||
270 | + }, | ||
271 | + loadFrom() { | ||
272 | + getContainerTypeList().then(res => { | ||
273 | + if (res.success) { | ||
274 | + this.containerTypeList = res.result | ||
275 | + } | ||
276 | + }) | ||
245 | }, | 277 | }, |
246 | getSuperFieldList() { | 278 | getSuperFieldList() { |
247 | - let fieldList = []; | ||
248 | - fieldList.push({type: 'string', value: 'containerTypeCode', text: '容器类型', dictCode: ''}) | ||
249 | - fieldList.push({type: 'string', value: 'warehouseCode', text: '仓库编码', dictCode: ''}) | ||
250 | - fieldList.push({type: 'string', value: 'companyCode', text: '货主', dictCode: ''}) | ||
251 | - fieldList.push({type: 'string', value: 'materialCode', text: '物料编码', dictCode: ''}) | ||
252 | - fieldList.push({type: 'string', value: 'materialName', text: '物料名称', dictCode: ''}) | ||
253 | - fieldList.push({type: 'string', value: 'materialUnit', text: '物料单位', dictCode: ''}) | ||
254 | - fieldList.push({type: 'BigDecimal', value: 'qty', text: '存放数量', dictCode: ''}) | ||
255 | - fieldList.push({type: 'int', value: 'enable', text: '是否可用', dictCode: 'enable_status'}) | ||
256 | - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) | ||
257 | - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) | ||
258 | - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) | ||
259 | - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'}) | 279 | + let fieldList = [] |
280 | + fieldList.push({ type: 'string', value: 'containerTypeCode', text: '容器类型', dictCode: '' }) | ||
281 | + fieldList.push({ type: 'string', value: 'warehouseCode', text: '仓库编码', dictCode: '' }) | ||
282 | + fieldList.push({ type: 'string', value: 'companyCode', text: '货主', dictCode: '' }) | ||
283 | + fieldList.push({ type: 'string', value: 'materialCode', text: '物料编码', dictCode: '' }) | ||
284 | + fieldList.push({ type: 'string', value: 'materialName', text: '物料名称', dictCode: '' }) | ||
285 | + fieldList.push({ type: 'string', value: 'materialUnit', text: '物料单位', dictCode: '' }) | ||
286 | + fieldList.push({ type: 'BigDecimal', value: 'qty', text: '存放数量', dictCode: '' }) | ||
287 | + fieldList.push({ type: 'int', value: 'enable', text: '是否可用', dictCode: 'enable_status' }) | ||
288 | + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) | ||
289 | + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) | ||
290 | + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) | ||
291 | + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) | ||
260 | this.superFieldList = fieldList | 292 | this.superFieldList = fieldList |
261 | } | 293 | } |
262 | } | 294 | } |
ant-design-vue-jeecg/src/views/system/config/ContainerList.vue
@@ -21,18 +21,30 @@ | @@ -21,18 +21,30 @@ | ||
21 | show-search | 21 | show-search |
22 | placeholder="请选择容器类型" | 22 | placeholder="请选择容器类型" |
23 | option-filter-prop="children" | 23 | option-filter-prop="children" |
24 | - | ||
25 | - v-model="queryParam.containerTypeCode"> | ||
26 | - <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code">{{ | ||
27 | - item.name | ||
28 | - }} | 24 | + v-model="queryParam.containerTypeCode" |
25 | + > | ||
26 | + <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code" | ||
27 | + >{{ item.name }} | ||
29 | </a-select-option> | 28 | </a-select-option> |
30 | </a-select> | 29 | </a-select> |
31 | </a-form-item> | 30 | </a-form-item> |
32 | </a-col> | 31 | </a-col> |
33 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 32 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
34 | <a-form-item label="容器状态"> | 33 | <a-form-item label="容器状态"> |
35 | - <j-dict-select-tag placeholder="请选择容器状态" v-model="queryParam.status" dictCode="container_status"/> | 34 | + <j-dict-select-tag |
35 | + placeholder="请选择容器状态" | ||
36 | + v-model="queryParam.status" | ||
37 | + dictCode="container_status" | ||
38 | + /> | ||
39 | + </a-form-item> | ||
40 | + </a-col> | ||
41 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
42 | + <a-form-item label="容器填充状态"> | ||
43 | + <j-dict-select-tag | ||
44 | + placeholder="请选择容器填充状态" | ||
45 | + v-model="queryParam.fillStatus" | ||
46 | + dictCode="fill_status" | ||
47 | + /> | ||
36 | </a-form-item> | 48 | </a-form-item> |
37 | </a-col> | 49 | </a-col> |
38 | </template> | 50 | </template> |
@@ -42,7 +54,7 @@ | @@ -42,7 +54,7 @@ | ||
42 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | 54 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
43 | <a @click="handleToggleSearch" style="margin-left: 8px"> | 55 | <a @click="handleToggleSearch" style="margin-left: 8px"> |
44 | {{ toggleSearchStatus ? '收起' : '展开' }} | 56 | {{ toggleSearchStatus ? '收起' : '展开' }} |
45 | - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | 57 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> |
46 | </a> | 58 | </a> |
47 | </span> | 59 | </span> |
48 | </a-col> | 60 | </a-col> |
@@ -54,21 +66,30 @@ | @@ -54,21 +66,30 @@ | ||
54 | <!-- 操作按钮区域 --> | 66 | <!-- 操作按钮区域 --> |
55 | <div class="table-operator"> | 67 | <div class="table-operator"> |
56 | <a-button @click="handleAdd" v-has="'container:add'" type="primary" icon="plus">新增</a-button> | 68 | <a-button @click="handleAdd" v-has="'container:add'" type="primary" icon="plus">新增</a-button> |
57 | - <a-button v-has="'container:export'" type="primary" icon="download" @click="handleExportXls('容器管理')">导出</a-button> | ||
58 | - <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" | ||
59 | - @change="handleImportExcel"> | 69 | + <a-button v-has="'container:export'" type="primary" icon="download" @click="handleExportXls('容器管理')"> |
70 | + 导出 | ||
71 | + </a-button> | ||
72 | + <a-upload | ||
73 | + name="file" | ||
74 | + :showUploadList="false" | ||
75 | + :multiple="false" | ||
76 | + :headers="tokenHeader" | ||
77 | + :action="importExcelUrl" | ||
78 | + @change="handleImportExcel" | ||
79 | + > | ||
60 | <a-button v-has="'container:import'" type="primary" icon="import">导入</a-button> | 80 | <a-button v-has="'container:import'" type="primary" icon="import">导入</a-button> |
61 | </a-upload> | 81 | </a-upload> |
62 | <a-button v-has="'container:print'" @click="batchPrint()" type="primary">打印</a-button> | 82 | <a-button v-has="'container:print'" @click="batchPrint()" type="primary">打印</a-button> |
63 | <a-dropdown v-if="selectedRowKeys.length > 0"> | 83 | <a-dropdown v-if="selectedRowKeys.length > 0"> |
64 | <a-menu slot="overlay" v-has="'container:deleteBatch'"> | 84 | <a-menu slot="overlay" v-has="'container:deleteBatch'"> |
65 | <a-menu-item key="1" @click="batchDel"> | 85 | <a-menu-item key="1" @click="batchDel"> |
66 | - <a-icon type="delete"/> | 86 | + <a-icon type="delete" /> |
67 | 删除 | 87 | 删除 |
68 | </a-menu-item> | 88 | </a-menu-item> |
69 | </a-menu> | 89 | </a-menu> |
70 | - <a-button style="margin-left: 8px"> 批量操作 | ||
71 | - <a-icon type="down"/> | 90 | + <a-button style="margin-left: 8px"> |
91 | + 批量操作 | ||
92 | + <a-icon type="down" /> | ||
72 | </a-button> | 93 | </a-button> |
73 | </a-dropdown> | 94 | </a-dropdown> |
74 | </div> | 95 | </div> |
@@ -76,33 +97,33 @@ | @@ -76,33 +97,33 @@ | ||
76 | <!-- table区域-begin --> | 97 | <!-- table区域-begin --> |
77 | <div> | 98 | <div> |
78 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 99 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
79 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | ||
80 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 100 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 |
101 | + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | ||
81 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 102 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
82 | </div> | 103 | </div> |
83 | 104 | ||
84 | <a-table | 105 | <a-table |
85 | ref="table" | 106 | ref="table" |
86 | size="middle" | 107 | size="middle" |
87 | - :scroll="{x:true}" | 108 | + :scroll="{ x: true }" |
88 | bordered | 109 | bordered |
89 | rowKey="id" | 110 | rowKey="id" |
90 | :columns="columns" | 111 | :columns="columns" |
91 | :dataSource="dataSource" | 112 | :dataSource="dataSource" |
92 | :pagination="ipagination" | 113 | :pagination="ipagination" |
93 | :loading="loading" | 114 | :loading="loading" |
94 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | 115 | + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" |
95 | class="j-table-force-nowrap" | 116 | class="j-table-force-nowrap" |
96 | - @change="handleTableChange"> | ||
97 | - | 117 | + @change="handleTableChange" |
118 | + > | ||
98 | <span slot="zoneCode" slot-scope="zoneCode"> | 119 | <span slot="zoneCode" slot-scope="zoneCode"> |
99 | - <a-tag :key="zoneCode" color=blue> | 120 | + <a-tag :key="zoneCode" color="blue"> |
100 | {{ solutionZoneCode(zoneCode) }} | 121 | {{ solutionZoneCode(zoneCode) }} |
101 | </a-tag> | 122 | </a-tag> |
102 | </span> | 123 | </span> |
103 | 124 | ||
104 | <span slot="containerTypeCode" slot-scope="containerTypeCode"> | 125 | <span slot="containerTypeCode" slot-scope="containerTypeCode"> |
105 | - <a-tag :key="containerTypeCode" color=pink> | 126 | + <a-tag :key="containerTypeCode" color="pink"> |
106 | {{ solutionContainerType(containerTypeCode) }} | 127 | {{ solutionContainerType(containerTypeCode) }} |
107 | </a-tag> | 128 | </a-tag> |
108 | </span> | 129 | </span> |
@@ -112,26 +133,23 @@ | @@ -112,26 +133,23 @@ | ||
112 | </template> | 133 | </template> |
113 | <template slot="imgSlot" slot-scope="text"> | 134 | <template slot="imgSlot" slot-scope="text"> |
114 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | 135 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
115 | - <img v-else :src="getImgView(text)" height="25px" alt="" | ||
116 | - style="max-width:80px;font-size: 12px;font-style: italic;"/> | 136 | + <img |
137 | + v-else | ||
138 | + :src="getImgView(text)" | ||
139 | + height="25px" | ||
140 | + alt="" | ||
141 | + style="max-width:80px;font-size: 12px;font-style: italic;" | ||
142 | + /> | ||
117 | </template> | 143 | </template> |
118 | <template slot="fileSlot" slot-scope="text"> | 144 | <template slot="fileSlot" slot-scope="text"> |
119 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | 145 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
120 | - <a-button | ||
121 | - v-else | ||
122 | - :ghost="true" | ||
123 | - type="primary" | ||
124 | - icon="download" | ||
125 | - size="small" | ||
126 | - @click="downloadFile(text)"> | 146 | + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> |
127 | 下载 | 147 | 下载 |
128 | </a-button> | 148 | </a-button> |
129 | </template> | 149 | </template> |
130 | 150 | ||
131 | <span slot="action" slot-scope="text, record"> | 151 | <span slot="action" slot-scope="text, record"> |
132 | - <a v-has="'container:add'" @click="editForm(record)">编辑</a> | ||
133 | - | ||
134 | - <a-divider type="vertical"/> | 152 | + <a v-has="'container:add'" @click="editForm(record)">编辑<a-divider type="vertical"/></a> |
135 | <a-dropdown> | 153 | <a-dropdown> |
136 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> | 154 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
137 | <a-menu slot="overlay"> | 155 | <a-menu slot="overlay"> |
@@ -146,7 +164,6 @@ | @@ -146,7 +164,6 @@ | ||
146 | </a-menu> | 164 | </a-menu> |
147 | </a-dropdown> | 165 | </a-dropdown> |
148 | </span> | 166 | </span> |
149 | - | ||
150 | </a-table> | 167 | </a-table> |
151 | </div> | 168 | </div> |
152 | 169 | ||
@@ -157,16 +174,15 @@ | @@ -157,16 +174,15 @@ | ||
157 | </template> | 174 | </template> |
158 | 175 | ||
159 | <script> | 176 | <script> |
160 | - | ||
161 | import '@/assets/less/TableExpand.less' | 177 | import '@/assets/less/TableExpand.less' |
162 | -import {mixinDevice} from '@/utils/mixin' | ||
163 | -import {JeecgListMixin} from '@/mixins/JeecgListMixin' | 178 | +import { mixinDevice } from '@/utils/mixin' |
179 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
164 | import ContainerModal from './modules/ContainerModal' | 180 | import ContainerModal from './modules/ContainerModal' |
165 | -import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | ||
166 | -import {getZoneList} from '@/api/api' | ||
167 | -import {getContainerTypeList} from '@/api/api' | ||
168 | -import ContainerEditModal from "./modules/ContainerEditModal"; | ||
169 | -import ContainerPrintModal from "./modules/ContainerPrintModal"; | 181 | +import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' |
182 | +import { getZoneList } from '@/api/api' | ||
183 | +import { getContainerTypeList } from '@/api/api' | ||
184 | +import ContainerEditModal from './modules/ContainerEditModal' | ||
185 | +import ContainerPrintModal from './modules/ContainerPrintModal' | ||
170 | 186 | ||
171 | export default { | 187 | export default { |
172 | name: 'ContainerList', | 188 | name: 'ContainerList', |
@@ -188,125 +204,132 @@ export default { | @@ -188,125 +204,132 @@ export default { | ||
188 | dataIndex: '', | 204 | dataIndex: '', |
189 | key: 'rowIndex', | 205 | key: 'rowIndex', |
190 | width: 60, | 206 | width: 60, |
191 | - align: "center", | ||
192 | - customRender: function (t, r, index) { | ||
193 | - return parseInt(index) + 1; | 207 | + align: 'center', |
208 | + customRender: function(t, r, index) { | ||
209 | + return parseInt(index) + 1 | ||
194 | } | 210 | } |
195 | }, | 211 | }, |
196 | { | 212 | { |
197 | title: '容器编码', | 213 | title: '容器编码', |
198 | - align: "center", | 214 | + align: 'center', |
199 | dataIndex: 'code' | 215 | dataIndex: 'code' |
200 | }, | 216 | }, |
201 | { | 217 | { |
202 | title: '库位编码', | 218 | title: '库位编码', |
203 | - align: "center", | 219 | + align: 'center', |
204 | dataIndex: 'locationCode' | 220 | dataIndex: 'locationCode' |
205 | }, | 221 | }, |
206 | { | 222 | { |
207 | title: '容器类型', | 223 | title: '容器类型', |
208 | - align: "center", | 224 | + align: 'center', |
209 | dataIndex: 'containerTypeCode', | 225 | dataIndex: 'containerTypeCode', |
210 | key: 'containerTypeCode', | 226 | key: 'containerTypeCode', |
211 | - scopedSlots: {customRender: 'containerTypeCode'} | 227 | + scopedSlots: { customRender: 'containerTypeCode' } |
212 | }, | 228 | }, |
213 | { | 229 | { |
214 | title: '容器状态', | 230 | title: '容器状态', |
215 | - align: "center", | 231 | + align: 'center', |
216 | dataIndex: 'status_dictText' | 232 | dataIndex: 'status_dictText' |
217 | }, | 233 | }, |
218 | { | 234 | { |
235 | + title: '容器填充状态', | ||
236 | + align: 'center', | ||
237 | + dataIndex: 'fillStatus_dictText' | ||
238 | + }, | ||
239 | + { | ||
219 | title: '创建人', | 240 | title: '创建人', |
220 | - align: "center", | 241 | + align: 'center', |
221 | dataIndex: 'createBy' | 242 | dataIndex: 'createBy' |
222 | }, | 243 | }, |
223 | { | 244 | { |
224 | title: '创建日期', | 245 | title: '创建日期', |
225 | - align: "center", | 246 | + align: 'center', |
226 | dataIndex: 'createTime' | 247 | dataIndex: 'createTime' |
227 | }, | 248 | }, |
228 | { | 249 | { |
229 | title: '更新人', | 250 | title: '更新人', |
230 | - align: "center", | 251 | + align: 'center', |
231 | dataIndex: 'updateBy' | 252 | dataIndex: 'updateBy' |
232 | }, | 253 | }, |
233 | { | 254 | { |
234 | title: '更新日期', | 255 | title: '更新日期', |
235 | - align: "center", | 256 | + align: 'center', |
236 | dataIndex: 'updateTime' | 257 | dataIndex: 'updateTime' |
237 | }, | 258 | }, |
238 | { | 259 | { |
239 | title: '操作', | 260 | title: '操作', |
240 | dataIndex: 'action', | 261 | dataIndex: 'action', |
241 | - align: "center", | ||
242 | - fixed: "right", | 262 | + align: 'center', |
263 | + fixed: 'right', | ||
243 | width: 147, | 264 | width: 147, |
244 | - scopedSlots: {customRender: 'action'} | 265 | + scopedSlots: { customRender: 'action' } |
245 | } | 266 | } |
246 | ], | 267 | ], |
247 | url: { | 268 | url: { |
248 | - list: "/config/container/list", | ||
249 | - delete: "/config/container/delete", | ||
250 | - deleteBatch: "/config/container/deleteBatch", | ||
251 | - exportXlsUrl: "/config/container/exportXls", | ||
252 | - importExcelUrl: "config/container/importExcel", | ||
253 | - | 269 | + list: '/config/container/list', |
270 | + delete: '/config/container/delete', | ||
271 | + deleteBatch: '/config/container/deleteBatch', | ||
272 | + exportXlsUrl: '/config/container/exportXls', | ||
273 | + importExcelUrl: 'config/container/importExcel' | ||
254 | }, | 274 | }, |
255 | dictOptions: {}, | 275 | dictOptions: {}, |
256 | - superFieldList: [], | 276 | + superFieldList: [] |
257 | } | 277 | } |
258 | }, | 278 | }, |
259 | created() { | 279 | created() { |
260 | - this.getSuperFieldList(); | ||
261 | - this.loadFrom(); | 280 | + this.getSuperFieldList() |
281 | + this.loadFrom() | ||
262 | }, | 282 | }, |
263 | computed: { | 283 | computed: { |
264 | - importExcelUrl: function () { | ||
265 | - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
266 | - }, | 284 | + importExcelUrl: function() { |
285 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` | ||
286 | + } | ||
267 | }, | 287 | }, |
268 | methods: { | 288 | methods: { |
269 | - initDictConfig() { | ||
270 | - }, | 289 | + initDictConfig() {}, |
271 | getSuperFieldList() { | 290 | getSuperFieldList() { |
272 | - let fieldList = []; | ||
273 | - fieldList.push({type: 'string', value: 'code', text: '容器编码', dictCode: ''}) | ||
274 | - fieldList.push({type: 'string', value: 'companyCode', text: '货主', dictCode: ''}) | ||
275 | - fieldList.push({type: 'string', value: 'locationCode', text: '库位编码', dictCode: ''}) | 291 | + let fieldList = [] |
292 | + fieldList.push({ type: 'string', value: 'code', text: '容器编码', dictCode: '' }) | ||
293 | + fieldList.push({ type: 'string', value: 'companyCode', text: '货主', dictCode: '' }) | ||
294 | + fieldList.push({ type: 'string', value: 'locationCode', text: '库位编码', dictCode: '' }) | ||
276 | // fieldList.push({type:'string',value:'zoneCode',text:'库区编码',dictCode:''}) | 295 | // fieldList.push({type:'string',value:'zoneCode',text:'库区编码',dictCode:''}) |
277 | - fieldList.push({type: 'string', value: 'containerTypeCode', text: '容器类型', dictCode: ''}) | ||
278 | - fieldList.push({type: 'string', value: 'status', text: '容器状态', dictCode: 'container_status'}) | ||
279 | - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) | ||
280 | - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) | ||
281 | - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) | ||
282 | - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'}) | 296 | + fieldList.push({ type: 'string', value: 'containerTypeCode', text: '容器类型', dictCode: '' }) |
297 | + fieldList.push({ type: 'string', value: 'status', text: '容器状态', dictCode: 'container_status' }) | ||
298 | + fieldList.push({ type: 'string', value: 'fillStatus', text: '容器填充状态', dictCode: 'fill_status' }) | ||
299 | + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) | ||
300 | + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) | ||
301 | + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) | ||
302 | + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) | ||
283 | this.superFieldList = fieldList | 303 | this.superFieldList = fieldList |
284 | }, | 304 | }, |
285 | editForm(record) { | 305 | editForm(record) { |
286 | - this.$refs.modalEditForm.edit(record); | ||
287 | - this.$refs.modalEditForm.title = "编辑容器"; | ||
288 | - this.$refs.modalEditForm.disableSubmit = false; | 306 | + this.$refs.modalEditForm.edit(record) |
307 | + this.$refs.modalEditForm.title = '编辑容器' | ||
308 | + this.$refs.modalEditForm.disableSubmit = false | ||
289 | }, | 309 | }, |
290 | batchPrint() { | 310 | batchPrint() { |
291 | if (this.selectedRowKeys.length <= 0) { | 311 | if (this.selectedRowKeys.length <= 0) { |
292 | - this.$message.warning('请选择一条记录!'); | ||
293 | - return; | 312 | + this.$message.warning('请选择一条记录!') |
313 | + return | ||
294 | } else { | 314 | } else { |
295 | - var ids = ""; | 315 | + var ids = '' |
296 | for (var a = 0; a < this.selectedRowKeys.length; a++) { | 316 | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
297 | - ids += this.selectedRowKeys[a] + ","; | 317 | + ids += this.selectedRowKeys[a] + ',' |
298 | } | 318 | } |
299 | - window.open(window._CONFIG['domianURL'] + "/jmreport/view/768644669245833216/?id=" + ids, "newWindow", "toolbar=no,scrollbars=no,menubar=no,screenX=100,screenY=100"); | ||
300 | - | 319 | + window.open( |
320 | + window._CONFIG['domianURL'] + '/jmreport/view/768644669245833216/?id=' + ids, | ||
321 | + 'newWindow', | ||
322 | + 'toolbar=no,scrollbars=no,menubar=no,screenX=100,screenY=100' | ||
323 | + ) | ||
301 | } | 324 | } |
302 | }, | 325 | }, |
303 | loadFrom() { | 326 | loadFrom() { |
304 | - getZoneList().then((res) => { | 327 | + getZoneList().then(res => { |
305 | if (res.success) { | 328 | if (res.success) { |
306 | this.zoneList = res.result | 329 | this.zoneList = res.result |
307 | } | 330 | } |
308 | }) | 331 | }) |
309 | - getContainerTypeList().then((res) => { | 332 | + getContainerTypeList().then(res => { |
310 | if (res.success) { | 333 | if (res.success) { |
311 | this.containerTypeList = res.result | 334 | this.containerTypeList = res.result |
312 | } | 335 | } |
@@ -314,8 +337,8 @@ export default { | @@ -314,8 +337,8 @@ export default { | ||
314 | }, | 337 | }, |
315 | solutionZoneCode(value) { | 338 | solutionZoneCode(value) { |
316 | var actions = [] | 339 | var actions = [] |
317 | - Object.keys(this.zoneList).some((key) => { | ||
318 | - if (this.zoneList[key].code == ('' + value)) { | 340 | + Object.keys(this.zoneList).some(key => { |
341 | + if (this.zoneList[key].code == '' + value) { | ||
319 | actions.push(this.zoneList[key].name) | 342 | actions.push(this.zoneList[key].name) |
320 | return true | 343 | return true |
321 | } | 344 | } |
@@ -324,14 +347,14 @@ export default { | @@ -324,14 +347,14 @@ export default { | ||
324 | }, | 347 | }, |
325 | solutionContainerType(value) { | 348 | solutionContainerType(value) { |
326 | var actions = [] | 349 | var actions = [] |
327 | - Object.keys(this.containerTypeList).some((key) => { | ||
328 | - if (this.containerTypeList[key].code == ('' + value)) { | 350 | + Object.keys(this.containerTypeList).some(key => { |
351 | + if (this.containerTypeList[key].code == '' + value) { | ||
329 | actions.push(this.containerTypeList[key].name) | 352 | actions.push(this.containerTypeList[key].name) |
330 | return true | 353 | return true |
331 | } | 354 | } |
332 | }) | 355 | }) |
333 | return actions.join('') | 356 | return actions.join('') |
334 | - }, | 357 | + } |
335 | } | 358 | } |
336 | } | 359 | } |
337 | </script> | 360 | </script> |
ant-design-vue-jeecg/src/views/system/config/ContainerTypeList.vue
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | 20 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
21 | <a @click="handleToggleSearch" style="margin-left: 8px"> | 21 | <a @click="handleToggleSearch" style="margin-left: 8px"> |
22 | {{ toggleSearchStatus ? '收起' : '展开' }} | 22 | {{ toggleSearchStatus ? '收起' : '展开' }} |
23 | - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | 23 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> |
24 | </a> | 24 | </a> |
25 | </span> | 25 | </span> |
26 | </a-col> | 26 | </a-col> |
@@ -32,20 +32,30 @@ | @@ -32,20 +32,30 @@ | ||
32 | <!-- 操作按钮区域 --> | 32 | <!-- 操作按钮区域 --> |
33 | <div class="table-operator"> | 33 | <div class="table-operator"> |
34 | <a-button @click="handleAdd" v-has="'containerType:add'" type="primary" icon="plus">新增</a-button> | 34 | <a-button @click="handleAdd" v-has="'containerType:add'" type="primary" icon="plus">新增</a-button> |
35 | - <a-button v-has="'containerType:export'" type="primary" icon="download" @click="handleExportXls('容器类型')">导出</a-button> | ||
36 | - <a-upload v-has="'containerType:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" | ||
37 | - @change="handleImportExcel"> | 35 | + <a-button v-has="'containerType:export'" type="primary" icon="download" @click="handleExportXls('容器类型')"> |
36 | + 导出 | ||
37 | + </a-button> | ||
38 | + <a-upload | ||
39 | + v-has="'containerType:import'" | ||
40 | + name="file" | ||
41 | + :showUploadList="false" | ||
42 | + :multiple="false" | ||
43 | + :headers="tokenHeader" | ||
44 | + :action="importExcelUrl" | ||
45 | + @change="handleImportExcel" | ||
46 | + > | ||
38 | <a-button type="primary" icon="import">导入</a-button> | 47 | <a-button type="primary" icon="import">导入</a-button> |
39 | </a-upload> | 48 | </a-upload> |
40 | <a-dropdown v-if="selectedRowKeys.length > 0"> | 49 | <a-dropdown v-if="selectedRowKeys.length > 0"> |
41 | <a-menu slot="overlay" v-has="'containerType:deleteBatch'"> | 50 | <a-menu slot="overlay" v-has="'containerType:deleteBatch'"> |
42 | <a-menu-item key="1" @click="batchDel"> | 51 | <a-menu-item key="1" @click="batchDel"> |
43 | - <a-icon type="delete"/> | 52 | + <a-icon type="delete" /> |
44 | 删除 | 53 | 删除 |
45 | </a-menu-item> | 54 | </a-menu-item> |
46 | </a-menu> | 55 | </a-menu> |
47 | - <a-button style="margin-left: 8px"> 批量操作 | ||
48 | - <a-icon type="down"/> | 56 | + <a-button style="margin-left: 8px"> |
57 | + 批量操作 | ||
58 | + <a-icon type="down" /> | ||
49 | </a-button> | 59 | </a-button> |
50 | </a-dropdown> | 60 | </a-dropdown> |
51 | </div> | 61 | </div> |
@@ -53,50 +63,59 @@ | @@ -53,50 +63,59 @@ | ||
53 | <!-- table区域-begin --> | 63 | <!-- table区域-begin --> |
54 | <div> | 64 | <div> |
55 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 65 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
56 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | ||
57 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 66 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 |
67 | + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | ||
58 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 68 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
59 | </div> | 69 | </div> |
60 | 70 | ||
61 | <a-table | 71 | <a-table |
62 | ref="table" | 72 | ref="table" |
63 | size="middle" | 73 | size="middle" |
64 | - :scroll="{x:true}" | 74 | + :scroll="{ x: true }" |
65 | bordered | 75 | bordered |
66 | rowKey="id" | 76 | rowKey="id" |
67 | :columns="columns" | 77 | :columns="columns" |
68 | :dataSource="dataSource" | 78 | :dataSource="dataSource" |
69 | :pagination="ipagination" | 79 | :pagination="ipagination" |
70 | :loading="loading" | 80 | :loading="loading" |
71 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | 81 | + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" |
72 | class="j-table-force-nowrap" | 82 | class="j-table-force-nowrap" |
73 | - @change="handleTableChange"> | 83 | + @change="handleTableChange" |
84 | + > | ||
85 | + <span slot="companyCode" slot-scope="companyCode"> | ||
86 | + <a-tag :key="companyCode" color=blue> | ||
87 | + {{ solutionCompany(companyCode) }} | ||
88 | + </a-tag> | ||
89 | + </span> | ||
90 | + | ||
91 | + <span slot="locationTypes" slot-scope="locationTypes" > | ||
92 | + <a-tag v-for="locationType in locationTypes" :key="locationType" color=pink> | ||
93 | + {{ solutionLocationType(locationType) }} | ||
94 | + </a-tag> | ||
95 | + </span> | ||
74 | 96 | ||
75 | <template slot="htmlSlot" slot-scope="text"> | 97 | <template slot="htmlSlot" slot-scope="text"> |
76 | <div v-html="text"></div> | 98 | <div v-html="text"></div> |
77 | </template> | 99 | </template> |
78 | <template slot="imgSlot" slot-scope="text"> | 100 | <template slot="imgSlot" slot-scope="text"> |
79 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | 101 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
80 | - <img v-else :src="getImgView(text)" height="25px" alt="" | ||
81 | - style="max-width:80px;font-size: 12px;font-style: italic;"/> | 102 | + <img |
103 | + v-else | ||
104 | + :src="getImgView(text)" | ||
105 | + height="25px" | ||
106 | + alt="" | ||
107 | + style="max-width:80px;font-size: 12px;font-style: italic;" | ||
108 | + /> | ||
82 | </template> | 109 | </template> |
83 | <template slot="fileSlot" slot-scope="text"> | 110 | <template slot="fileSlot" slot-scope="text"> |
84 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | 111 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
85 | - <a-button | ||
86 | - v-else | ||
87 | - :ghost="true" | ||
88 | - type="primary" | ||
89 | - icon="download" | ||
90 | - size="small" | ||
91 | - @click="downloadFile(text)"> | 112 | + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> |
92 | 下载 | 113 | 下载 |
93 | </a-button> | 114 | </a-button> |
94 | </template> | 115 | </template> |
95 | 116 | ||
96 | <span slot="action" slot-scope="text, record"> | 117 | <span slot="action" slot-scope="text, record"> |
97 | - <a v-has="'containerType:edit'" @click="handleEdit(record)">编辑</a> | ||
98 | - | ||
99 | - <a-divider type="vertical"/> | 118 | + <a v-has="'containerType:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> |
100 | <a-dropdown> | 119 | <a-dropdown> |
101 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> | 120 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
102 | <a-menu slot="overlay"> | 121 | <a-menu slot="overlay"> |
@@ -111,7 +130,6 @@ | @@ -111,7 +130,6 @@ | ||
111 | </a-menu> | 130 | </a-menu> |
112 | </a-dropdown> | 131 | </a-dropdown> |
113 | </span> | 132 | </span> |
114 | - | ||
115 | </a-table> | 133 | </a-table> |
116 | </div> | 134 | </div> |
117 | 135 | ||
@@ -120,11 +138,11 @@ | @@ -120,11 +138,11 @@ | ||
120 | </template> | 138 | </template> |
121 | 139 | ||
122 | <script> | 140 | <script> |
123 | - | ||
124 | import '@/assets/less/TableExpand.less' | 141 | import '@/assets/less/TableExpand.less' |
125 | -import {mixinDevice} from '@/utils/mixin' | ||
126 | -import {JeecgListMixin} from '@/mixins/JeecgListMixin' | 142 | +import { mixinDevice } from '@/utils/mixin' |
143 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
127 | import ContainerTypeModal from './modules/ContainerTypeModal' | 144 | import ContainerTypeModal from './modules/ContainerTypeModal' |
145 | +import {getCompanyList, getLocationTypeList } from '@/api/api' | ||
128 | 146 | ||
129 | export default { | 147 | export default { |
130 | name: 'ContainerTypeList', | 148 | name: 'ContainerTypeList', |
@@ -134,6 +152,8 @@ export default { | @@ -134,6 +152,8 @@ export default { | ||
134 | }, | 152 | }, |
135 | data() { | 153 | data() { |
136 | return { | 154 | return { |
155 | + companyList: [], | ||
156 | + locationTypeList: [], | ||
137 | description: '容器类型管理页面', | 157 | description: '容器类型管理页面', |
138 | // 表头 | 158 | // 表头 |
139 | columns: [ | 159 | columns: [ |
@@ -142,123 +162,158 @@ export default { | @@ -142,123 +162,158 @@ export default { | ||
142 | dataIndex: '', | 162 | dataIndex: '', |
143 | key: 'rowIndex', | 163 | key: 'rowIndex', |
144 | width: 60, | 164 | width: 60, |
145 | - align: "center", | ||
146 | - customRender: function (t, r, index) { | ||
147 | - return parseInt(index) + 1; | 165 | + align: 'center', |
166 | + customRender: function(t, r, index) { | ||
167 | + return parseInt(index) + 1 | ||
148 | } | 168 | } |
149 | }, | 169 | }, |
150 | { | 170 | { |
151 | title: '编码', | 171 | title: '编码', |
152 | - align: "center", | 172 | + align: 'center', |
153 | dataIndex: 'code' | 173 | dataIndex: 'code' |
154 | }, | 174 | }, |
155 | { | 175 | { |
156 | title: '名称', | 176 | title: '名称', |
157 | - align: "center", | 177 | + align: 'center', |
158 | dataIndex: 'name' | 178 | dataIndex: 'name' |
159 | }, | 179 | }, |
160 | - { | ||
161 | - title: '货主编码', | ||
162 | - align: "center", | ||
163 | - dataIndex: 'companyCode' | ||
164 | - }, | 180 | + // { |
181 | + // title: '货主', | ||
182 | + // align: 'center', | ||
183 | + // dataIndex: 'companyCode', | ||
184 | + // key: 'companyCode', | ||
185 | + // scopedSlots: {customRender: 'companyCode'} | ||
186 | + // }, | ||
165 | { | 187 | { |
166 | title: '绑定的库位类型', | 188 | title: '绑定的库位类型', |
167 | - align: "center", | ||
168 | - dataIndex: 'locationType' | 189 | + align: 'center', |
190 | + dataIndex: 'locationTypes', | ||
191 | + key: 'locationTypes', | ||
192 | + scopedSlots: {customRender: 'locationTypes'} | ||
169 | }, | 193 | }, |
170 | { | 194 | { |
171 | title: '长', | 195 | title: '长', |
172 | - align: "center", | 196 | + align: 'center', |
173 | dataIndex: 'length' | 197 | dataIndex: 'length' |
174 | }, | 198 | }, |
175 | { | 199 | { |
176 | title: '宽', | 200 | title: '宽', |
177 | - align: "center", | 201 | + align: 'center', |
178 | dataIndex: 'width' | 202 | dataIndex: 'width' |
179 | }, | 203 | }, |
180 | { | 204 | { |
181 | title: '高', | 205 | title: '高', |
182 | - align: "center", | 206 | + align: 'center', |
183 | dataIndex: 'height' | 207 | dataIndex: 'height' |
184 | }, | 208 | }, |
185 | { | 209 | { |
186 | title: '空容器重量', | 210 | title: '空容器重量', |
187 | - align: "center", | 211 | + align: 'center', |
188 | dataIndex: 'emptyweight' | 212 | dataIndex: 'emptyweight' |
189 | }, | 213 | }, |
190 | { | 214 | { |
191 | title: '容器最大承重', | 215 | title: '容器最大承重', |
192 | - align: "center", | 216 | + align: 'center', |
193 | dataIndex: 'maxweight' | 217 | dataIndex: 'maxweight' |
194 | }, | 218 | }, |
195 | { | 219 | { |
196 | title: '创建人', | 220 | title: '创建人', |
197 | - align: "center", | 221 | + align: 'center', |
198 | dataIndex: 'createBy' | 222 | dataIndex: 'createBy' |
199 | }, | 223 | }, |
200 | { | 224 | { |
201 | title: '创建日期', | 225 | title: '创建日期', |
202 | - align: "center", | 226 | + align: 'center', |
203 | dataIndex: 'createTime' | 227 | dataIndex: 'createTime' |
204 | }, | 228 | }, |
205 | { | 229 | { |
206 | title: '更新人', | 230 | title: '更新人', |
207 | - align: "center", | 231 | + align: 'center', |
208 | dataIndex: 'updateBy' | 232 | dataIndex: 'updateBy' |
209 | }, | 233 | }, |
210 | { | 234 | { |
211 | title: '更新日期', | 235 | title: '更新日期', |
212 | - align: "center", | 236 | + align: 'center', |
213 | dataIndex: 'updateTime' | 237 | dataIndex: 'updateTime' |
214 | }, | 238 | }, |
215 | { | 239 | { |
216 | title: '操作', | 240 | title: '操作', |
217 | dataIndex: 'action', | 241 | dataIndex: 'action', |
218 | - align: "center", | ||
219 | - fixed: "right", | 242 | + align: 'center', |
243 | + fixed: 'right', | ||
220 | width: 147, | 244 | width: 147, |
221 | - scopedSlots: {customRender: 'action'} | 245 | + scopedSlots: { customRender: 'action' } |
222 | } | 246 | } |
223 | ], | 247 | ], |
224 | url: { | 248 | url: { |
225 | - list: "/config/containerType/list", | ||
226 | - delete: "/config/containerType/delete", | ||
227 | - deleteBatch: "/config/containerType/deleteBatch", | ||
228 | - exportXlsUrl: "/config/containerType/exportXls", | ||
229 | - importExcelUrl: "config/containerType/importExcel", | ||
230 | - | 249 | + list: '/config/containerType/list', |
250 | + delete: '/config/containerType/delete', | ||
251 | + deleteBatch: '/config/containerType/deleteBatch', | ||
252 | + exportXlsUrl: '/config/containerType/exportXls', | ||
253 | + importExcelUrl: 'config/containerType/importExcel' | ||
231 | }, | 254 | }, |
232 | dictOptions: {}, | 255 | dictOptions: {}, |
233 | - superFieldList: [], | 256 | + superFieldList: [] |
234 | } | 257 | } |
235 | }, | 258 | }, |
236 | created() { | 259 | created() { |
237 | - this.getSuperFieldList(); | 260 | + this.getSuperFieldList() |
261 | + this.loadFrom() | ||
238 | }, | 262 | }, |
239 | computed: { | 263 | computed: { |
240 | - importExcelUrl: function () { | ||
241 | - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
242 | - }, | 264 | + importExcelUrl: function() { |
265 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` | ||
266 | + } | ||
243 | }, | 267 | }, |
244 | methods: { | 268 | methods: { |
245 | - initDictConfig() { | 269 | + initDictConfig() {}, |
270 | + loadFrom() { | ||
271 | + getCompanyList().then((res) => { | ||
272 | + if (res.success) { | ||
273 | + this.companyList = res.result | ||
274 | + } | ||
275 | + }); | ||
276 | + getLocationTypeList().then(res => { | ||
277 | + if (res.success) { | ||
278 | + this.locationTypeList = res.result | ||
279 | + } | ||
280 | + }); | ||
281 | + }, | ||
282 | + solutionCompany(value) { | ||
283 | + var actions = [] | ||
284 | + Object.keys(this.companyList).some((key) => { | ||
285 | + if (this.companyList[key].code == ('' + value)) { | ||
286 | + actions.push(this.companyList[key].name) | ||
287 | + return true | ||
288 | + } | ||
289 | + }) | ||
290 | + return actions.join('') | ||
291 | + }, | ||
292 | + solutionLocationType(value) { | ||
293 | + var actions = [] | ||
294 | + Object.keys(this.locationTypeList).some(key => { | ||
295 | + if (this.locationTypeList[key].code == '' + value) { | ||
296 | + actions.push(this.locationTypeList[key].name) | ||
297 | + return true | ||
298 | + } | ||
299 | + }) | ||
300 | + return actions.join('') | ||
246 | }, | 301 | }, |
247 | getSuperFieldList() { | 302 | getSuperFieldList() { |
248 | - let fieldList = []; | ||
249 | - fieldList.push({type: 'string', value: 'code', text: '编码', dictCode: ''}) | ||
250 | - fieldList.push({type: 'string', value: 'name', text: '名称', dictCode: ''}) | ||
251 | - fieldList.push({type: 'string', value: 'companyCode', text: '货主编码', dictCode: ''}) | ||
252 | - fieldList.push({type: 'string', value: 'locationType', text: '绑定的库位类型', dictCode: ''}) | ||
253 | - fieldList.push({type: 'int', value: 'length', text: '长', dictCode: ''}) | ||
254 | - fieldList.push({type: 'int', value: 'width', text: '宽', dictCode: ''}) | ||
255 | - fieldList.push({type: 'int', value: 'height', text: '高', dictCode: ''}) | ||
256 | - fieldList.push({type: 'int', value: 'emptyweight', text: '空容器重量', dictCode: ''}) | ||
257 | - fieldList.push({type: 'int', value: 'maxweight', text: '容器最大承重', dictCode: ''}) | ||
258 | - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) | ||
259 | - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) | ||
260 | - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) | ||
261 | - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'}) | 303 | + let fieldList = [] |
304 | + fieldList.push({ type: 'string', value: 'code', text: '编码', dictCode: '' }) | ||
305 | + fieldList.push({ type: 'string', value: 'name', text: '名称', dictCode: '' }) | ||
306 | + fieldList.push({ type: 'string', value: 'companyCode', text: '货主编码', dictCode: '' }) | ||
307 | + fieldList.push({ type: 'string', value: 'locationType', text: '绑定的库位类型', dictCode: '' }) | ||
308 | + fieldList.push({ type: 'int', value: 'length', text: '长', dictCode: '' }) | ||
309 | + fieldList.push({ type: 'int', value: 'width', text: '宽', dictCode: '' }) | ||
310 | + fieldList.push({ type: 'int', value: 'height', text: '高', dictCode: '' }) | ||
311 | + fieldList.push({ type: 'int', value: 'emptyweight', text: '空容器重量', dictCode: '' }) | ||
312 | + fieldList.push({ type: 'int', value: 'maxweight', text: '容器最大承重', dictCode: '' }) | ||
313 | + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) | ||
314 | + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) | ||
315 | + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) | ||
316 | + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) | ||
262 | this.superFieldList = fieldList | 317 | this.superFieldList = fieldList |
263 | } | 318 | } |
264 | } | 319 | } |
ant-design-vue-jeecg/src/views/system/config/CustomerList.vue
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | <div> | 34 | <div> |
35 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 35 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
36 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 36 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
37 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 37 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
38 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 38 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
39 | </div> | 39 | </div> |
40 | 40 |
ant-design-vue-jeecg/src/views/system/config/CycleCountPreferenceList.vue
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | <div> | 34 | <div> |
35 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 35 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
36 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 36 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
37 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 37 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
38 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 38 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
39 | </div> | 39 | </div> |
40 | 40 |
ant-design-vue-jeecg/src/views/system/config/LocationHighList.vue
@@ -54,7 +54,7 @@ | @@ -54,7 +54,7 @@ | ||
54 | <div> | 54 | <div> |
55 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 55 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
56 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 56 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
57 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 57 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
58 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 58 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
59 | </div> | 59 | </div> |
60 | 60 |
ant-design-vue-jeecg/src/views/system/config/LocationList.vue
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | </a-col> | 16 | </a-col> |
17 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 17 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
18 | <a-form-item label="状态"> | 18 | <a-form-item label="状态"> |
19 | - <j-dict-select-tag placeholder="请选择状态" v-model="queryParam.status" dictCode="location_status"/> | 19 | + <j-dict-select-tag placeholder="请选择状态" v-model="queryParam.status" dictCode="location_status" /> |
20 | </a-form-item> | 20 | </a-form-item> |
21 | </a-col> | 21 | </a-col> |
22 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 22 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
@@ -25,10 +25,10 @@ | @@ -25,10 +25,10 @@ | ||
25 | show-search | 25 | show-search |
26 | placeholder="请选择库位类型" | 26 | placeholder="请选择库位类型" |
27 | option-filter-prop="children" | 27 | option-filter-prop="children" |
28 | - | ||
29 | - v-model="queryParam.locationTypeCode"> | 28 | + v-model="queryParam.locationTypeCode" |
29 | + > | ||
30 | <a-select-option v-for="item in locationTypeList" :key="item.name" :value="item.code"> | 30 | <a-select-option v-for="item in locationTypeList" :key="item.name" :value="item.code"> |
31 | - {{item.name}} | 31 | + {{ item.name }} |
32 | </a-select-option> | 32 | </a-select-option> |
33 | </a-select> | 33 | </a-select> |
34 | </a-form-item> | 34 | </a-form-item> |
@@ -40,10 +40,10 @@ | @@ -40,10 +40,10 @@ | ||
40 | show-search | 40 | show-search |
41 | placeholder="请选择库区编码" | 41 | placeholder="请选择库区编码" |
42 | option-filter-prop="children" | 42 | option-filter-prop="children" |
43 | - | ||
44 | - v-model="queryParam.zoneCode"> | 43 | + v-model="queryParam.zoneCode" |
44 | + > | ||
45 | <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code"> | 45 | <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code"> |
46 | - {{item.name}} | 46 | + {{ item.name }} |
47 | </a-select-option> | 47 | </a-select-option> |
48 | </a-select> | 48 | </a-select> |
49 | </a-form-item> | 49 | </a-form-item> |
@@ -70,17 +70,17 @@ | @@ -70,17 +70,17 @@ | ||
70 | </a-col> | 70 | </a-col> |
71 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 71 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
72 | <a-form-item label="高低位"> | 72 | <a-form-item label="高低位"> |
73 | - <j-dict-select-tag placeholder="请输入高低位" v-model="queryParam.high" dictCode="high_status"/> | 73 | + <j-dict-select-tag placeholder="请输入高低位" v-model="queryParam.high" dictCode="high_status" /> |
74 | </a-form-item> | 74 | </a-form-item> |
75 | </a-col> | 75 | </a-col> |
76 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 76 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
77 | <a-form-item label="内外侧"> | 77 | <a-form-item label="内外侧"> |
78 | - <j-dict-select-tag placeholder="请选择内外侧" v-model="queryParam.rowFlag" dictCode="row_type"/> | 78 | + <j-dict-select-tag placeholder="请选择内外侧" v-model="queryParam.rowFlag" dictCode="row_type" /> |
79 | </a-form-item> | 79 | </a-form-item> |
80 | </a-col> | 80 | </a-col> |
81 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 81 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
82 | <a-form-item label="是否可用"> | 82 | <a-form-item label="是否可用"> |
83 | - <j-dict-select-tag placeholder="请选择是否可用" v-model="queryParam.enable" dictCode="enable_status"/> | 83 | + <j-dict-select-tag placeholder="请选择是否可用" v-model="queryParam.enable" dictCode="enable_status" /> |
84 | </a-form-item> | 84 | </a-form-item> |
85 | </a-col> | 85 | </a-col> |
86 | </template> | 86 | </template> |
@@ -90,7 +90,7 @@ | @@ -90,7 +90,7 @@ | ||
90 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | 90 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
91 | <a @click="handleToggleSearch" style="margin-left: 8px"> | 91 | <a @click="handleToggleSearch" style="margin-left: 8px"> |
92 | {{ toggleSearchStatus ? '收起' : '展开' }} | 92 | {{ toggleSearchStatus ? '收起' : '展开' }} |
93 | - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | 93 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> |
94 | </a> | 94 | </a> |
95 | </span> | 95 | </span> |
96 | </a-col> | 96 | </a-col> |
@@ -103,21 +103,31 @@ | @@ -103,21 +103,31 @@ | ||
103 | <div class="table-operator"> | 103 | <div class="table-operator"> |
104 | <a-button @click="batchAdd()" v-has="'location:batchAdd'" type="primary" icon="plus">批量新增</a-button> | 104 | <a-button @click="batchAdd()" v-has="'location:batchAdd'" type="primary" icon="plus">批量新增</a-button> |
105 | <a-button v-has="'location:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> | 105 | <a-button v-has="'location:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> |
106 | - <a-button v-has="'location:export'" type="primary" icon="download" @click="handleExportXls('库位管理')">导出</a-button> | ||
107 | - <a-upload v-has="'location:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" | ||
108 | - @change="handleImportExcel"> | 106 | + <a-button v-has="'location:export'" type="primary" icon="download" @click="handleExportXls('库位管理')"> |
107 | + 导出 | ||
108 | + </a-button> | ||
109 | + <a-upload | ||
110 | + v-has="'location:import'" | ||
111 | + name="file" | ||
112 | + :showUploadList="false" | ||
113 | + :multiple="false" | ||
114 | + :headers="tokenHeader" | ||
115 | + :action="importExcelUrl" | ||
116 | + @change="handleImportExcel" | ||
117 | + > | ||
109 | <a-button type="primary" icon="import">导入</a-button> | 118 | <a-button type="primary" icon="import">导入</a-button> |
110 | </a-upload> | 119 | </a-upload> |
111 | <a-button v-has="'material:print'" @click="batchPrint()" type="primary">打印</a-button> | 120 | <a-button v-has="'material:print'" @click="batchPrint()" type="primary">打印</a-button> |
112 | <a-dropdown v-if="selectedRowKeys.length > 0"> | 121 | <a-dropdown v-if="selectedRowKeys.length > 0"> |
113 | <a-menu slot="overlay" v-has="'location:deleteBatch'"> | 122 | <a-menu slot="overlay" v-has="'location:deleteBatch'"> |
114 | <a-menu-item key="1" @click="batchDel"> | 123 | <a-menu-item key="1" @click="batchDel"> |
115 | - <a-icon type="delete"/> | 124 | + <a-icon type="delete" /> |
116 | 删除 | 125 | 删除 |
117 | </a-menu-item> | 126 | </a-menu-item> |
118 | </a-menu> | 127 | </a-menu> |
119 | - <a-button style="margin-left: 8px"> 批量操作 | ||
120 | - <a-icon type="down"/> | 128 | + <a-button style="margin-left: 8px"> |
129 | + 批量操作 | ||
130 | + <a-icon type="down" /> | ||
121 | </a-button> | 131 | </a-button> |
122 | </a-dropdown> | 132 | </a-dropdown> |
123 | </div> | 133 | </div> |
@@ -125,33 +135,33 @@ | @@ -125,33 +135,33 @@ | ||
125 | <!-- table区域-begin --> | 135 | <!-- table区域-begin --> |
126 | <div> | 136 | <div> |
127 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 137 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
128 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | ||
129 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 138 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 |
139 | + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | ||
130 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 140 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
131 | </div> | 141 | </div> |
132 | 142 | ||
133 | <a-table | 143 | <a-table |
134 | ref="table" | 144 | ref="table" |
135 | size="middle" | 145 | size="middle" |
136 | - :scroll="{x:true}" | 146 | + :scroll="{ x: true }" |
137 | bordered | 147 | bordered |
138 | rowKey="id" | 148 | rowKey="id" |
139 | :columns="columns" | 149 | :columns="columns" |
140 | :dataSource="dataSource" | 150 | :dataSource="dataSource" |
141 | :pagination="ipagination" | 151 | :pagination="ipagination" |
142 | :loading="loading" | 152 | :loading="loading" |
143 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | 153 | + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" |
144 | class="j-table-force-nowrap" | 154 | class="j-table-force-nowrap" |
145 | - @change="handleTableChange"> | ||
146 | - | ||
147 | - <span slot="locationTypeCode" slot-scope="locationTypeCode"> | ||
148 | - <a-tag :key="locationTypeCode" color=pink> | 155 | + @change="handleTableChange" |
156 | + > | ||
157 | + <span slot="locationTypeCode" slot-scope="locationTypeCode"> | ||
158 | + <a-tag :key="locationTypeCode" color="pink"> | ||
149 | {{ solutionLocationType(locationTypeCode) }} | 159 | {{ solutionLocationType(locationTypeCode) }} |
150 | </a-tag> | 160 | </a-tag> |
151 | </span> | 161 | </span> |
152 | 162 | ||
153 | <span slot="zoneCode" slot-scope="zoneCode"> | 163 | <span slot="zoneCode" slot-scope="zoneCode"> |
154 | - <a-tag :key="zoneCode" color=blue> | 164 | + <a-tag :key="zoneCode" color="blue"> |
155 | {{ solutionZoneCode(zoneCode) }} | 165 | {{ solutionZoneCode(zoneCode) }} |
156 | </a-tag> | 166 | </a-tag> |
157 | </span> | 167 | </span> |
@@ -161,26 +171,23 @@ | @@ -161,26 +171,23 @@ | ||
161 | </template> | 171 | </template> |
162 | <template slot="imgSlot" slot-scope="text"> | 172 | <template slot="imgSlot" slot-scope="text"> |
163 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | 173 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
164 | - <img v-else :src="getImgView(text)" height="25px" alt="" | ||
165 | - style="max-width:80px;font-size: 12px;font-style: italic;"/> | 174 | + <img |
175 | + v-else | ||
176 | + :src="getImgView(text)" | ||
177 | + height="25px" | ||
178 | + alt="" | ||
179 | + style="max-width:80px;font-size: 12px;font-style: italic;" | ||
180 | + /> | ||
166 | </template> | 181 | </template> |
167 | <template slot="fileSlot" slot-scope="text"> | 182 | <template slot="fileSlot" slot-scope="text"> |
168 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | 183 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
169 | - <a-button | ||
170 | - v-else | ||
171 | - :ghost="true" | ||
172 | - type="primary" | ||
173 | - icon="download" | ||
174 | - size="small" | ||
175 | - @click="downloadFile(text)"> | 184 | + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> |
176 | 下载 | 185 | 下载 |
177 | </a-button> | 186 | </a-button> |
178 | </template> | 187 | </template> |
179 | 188 | ||
180 | <span slot="action" slot-scope="text, record"> | 189 | <span slot="action" slot-scope="text, record"> |
181 | - <a v-has="'location:edit'" @click="handleEdit(record)">编辑</a> | ||
182 | - | ||
183 | - <a-divider type="vertical"/> | 190 | + <a v-has="'location:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> |
184 | <a-dropdown> | 191 | <a-dropdown> |
185 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> | 192 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
186 | <a-menu slot="overlay"> | 193 | <a-menu slot="overlay"> |
@@ -195,7 +202,6 @@ | @@ -195,7 +202,6 @@ | ||
195 | </a-menu> | 202 | </a-menu> |
196 | </a-dropdown> | 203 | </a-dropdown> |
197 | </span> | 204 | </span> |
198 | - | ||
199 | </a-table> | 205 | </a-table> |
200 | </div> | 206 | </div> |
201 | 207 | ||
@@ -206,15 +212,14 @@ | @@ -206,15 +212,14 @@ | ||
206 | </template> | 212 | </template> |
207 | 213 | ||
208 | <script> | 214 | <script> |
209 | - | ||
210 | import '@/assets/less/TableExpand.less' | 215 | import '@/assets/less/TableExpand.less' |
211 | -import {mixinDevice} from '@/utils/mixin' | ||
212 | -import {JeecgListMixin} from '@/mixins/JeecgListMixin' | 216 | +import { mixinDevice } from '@/utils/mixin' |
217 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
213 | import LocationModal from './modules/LocationModal' | 218 | import LocationModal from './modules/LocationModal' |
214 | -import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | ||
215 | -import {getLocationTypeList} from '@/api/api' | ||
216 | -import {getZoneList} from '@/api/api' | ||
217 | -import LocationBatchAddModal from "./modules/LocationBatchAddModal"; | 219 | +import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' |
220 | +import { getLocationTypeList } from '@/api/api' | ||
221 | +import { getZoneList } from '@/api/api' | ||
222 | +import LocationBatchAddModal from './modules/LocationBatchAddModal' | ||
218 | import LocationPrintModal from './modules/LocationPrintModal' | 223 | import LocationPrintModal from './modules/LocationPrintModal' |
219 | 224 | ||
220 | export default { | 225 | export default { |
@@ -234,114 +239,113 @@ export default { | @@ -234,114 +239,113 @@ export default { | ||
234 | columns: [ | 239 | columns: [ |
235 | { | 240 | { |
236 | title: 'ID', | 241 | title: 'ID', |
237 | - align: "center", | 242 | + align: 'center', |
238 | dataIndex: 'id' | 243 | dataIndex: 'id' |
239 | }, | 244 | }, |
240 | { | 245 | { |
241 | title: '库位编码', | 246 | title: '库位编码', |
242 | - align: "center", | 247 | + align: 'center', |
243 | dataIndex: 'code' | 248 | dataIndex: 'code' |
244 | }, | 249 | }, |
245 | { | 250 | { |
246 | title: '容器编码', | 251 | title: '容器编码', |
247 | - align: "center", | 252 | + align: 'center', |
248 | dataIndex: 'containerCode' | 253 | dataIndex: 'containerCode' |
249 | }, | 254 | }, |
250 | { | 255 | { |
251 | title: '状态', | 256 | title: '状态', |
252 | - align: "center", | 257 | + align: 'center', |
253 | dataIndex: 'status_dictText' | 258 | dataIndex: 'status_dictText' |
254 | }, | 259 | }, |
255 | { | 260 | { |
256 | title: '库区', | 261 | title: '库区', |
257 | - align: "center", | 262 | + align: 'center', |
258 | dataIndex: 'zoneCode', | 263 | dataIndex: 'zoneCode', |
259 | key: 'zoneCode', | 264 | key: 'zoneCode', |
260 | - scopedSlots: {customRender: 'zoneCode'} | 265 | + scopedSlots: { customRender: 'zoneCode' } |
261 | }, | 266 | }, |
262 | { | 267 | { |
263 | title: '库位类型', | 268 | title: '库位类型', |
264 | - align: "center", | 269 | + align: 'center', |
265 | dataIndex: 'locationTypeCode', | 270 | dataIndex: 'locationTypeCode', |
266 | key: 'locationTypeCode', | 271 | key: 'locationTypeCode', |
267 | - scopedSlots: {customRender: 'locationTypeCode'} | 272 | + scopedSlots: { customRender: 'locationTypeCode' } |
268 | }, | 273 | }, |
269 | { | 274 | { |
270 | title: '巷道', | 275 | title: '巷道', |
271 | - align: "center", | 276 | + align: 'center', |
272 | dataIndex: 'roadWay' | 277 | dataIndex: 'roadWay' |
273 | }, | 278 | }, |
274 | { | 279 | { |
275 | title: '行', | 280 | title: '行', |
276 | - align: "center", | 281 | + align: 'center', |
277 | dataIndex: 'row' | 282 | dataIndex: 'row' |
278 | }, | 283 | }, |
279 | { | 284 | { |
280 | title: '列', | 285 | title: '列', |
281 | - align: "center", | 286 | + align: 'center', |
282 | dataIndex: 'icolumn' | 287 | dataIndex: 'icolumn' |
283 | }, | 288 | }, |
284 | { | 289 | { |
285 | title: '层', | 290 | title: '层', |
286 | - align: "center", | 291 | + align: 'center', |
287 | dataIndex: 'layer' | 292 | dataIndex: 'layer' |
288 | }, | 293 | }, |
289 | { | 294 | { |
290 | title: '高低位', | 295 | title: '高低位', |
291 | - align: "center", | 296 | + align: 'center', |
292 | dataIndex: 'high_dictText' | 297 | dataIndex: 'high_dictText' |
293 | }, | 298 | }, |
294 | { | 299 | { |
295 | title: '内外侧', | 300 | title: '内外侧', |
296 | - align: "center", | 301 | + align: 'center', |
297 | dataIndex: 'rowFlag_dictText' | 302 | dataIndex: 'rowFlag_dictText' |
298 | }, | 303 | }, |
299 | { | 304 | { |
300 | title: '物料分区存放', | 305 | title: '物料分区存放', |
301 | - align: "center", | 306 | + align: 'center', |
302 | dataIndex: 'materialAreaCode' | 307 | dataIndex: 'materialAreaCode' |
303 | }, | 308 | }, |
304 | { | 309 | { |
305 | title: '是否可用', | 310 | title: '是否可用', |
306 | - align: "center", | 311 | + align: 'center', |
307 | dataIndex: 'enable_dictText' | 312 | dataIndex: 'enable_dictText' |
308 | }, | 313 | }, |
309 | { | 314 | { |
310 | title: '创建人', | 315 | title: '创建人', |
311 | - align: "center", | 316 | + align: 'center', |
312 | dataIndex: 'createBy' | 317 | dataIndex: 'createBy' |
313 | }, | 318 | }, |
314 | { | 319 | { |
315 | title: '创建日期', | 320 | title: '创建日期', |
316 | - align: "center", | 321 | + align: 'center', |
317 | dataIndex: 'createTime' | 322 | dataIndex: 'createTime' |
318 | }, | 323 | }, |
319 | { | 324 | { |
320 | title: '更新人', | 325 | title: '更新人', |
321 | - align: "center", | 326 | + align: 'center', |
322 | dataIndex: 'updateBy' | 327 | dataIndex: 'updateBy' |
323 | }, | 328 | }, |
324 | { | 329 | { |
325 | title: '更新日期', | 330 | title: '更新日期', |
326 | - align: "center", | 331 | + align: 'center', |
327 | dataIndex: 'updateTime' | 332 | dataIndex: 'updateTime' |
328 | }, | 333 | }, |
329 | { | 334 | { |
330 | title: '操作', | 335 | title: '操作', |
331 | dataIndex: 'action', | 336 | dataIndex: 'action', |
332 | - align: "center", | ||
333 | - fixed: "right", | 337 | + align: 'center', |
338 | + fixed: 'right', | ||
334 | width: 147, | 339 | width: 147, |
335 | - scopedSlots: {customRender: 'action'} | 340 | + scopedSlots: { customRender: 'action' } |
336 | } | 341 | } |
337 | ], | 342 | ], |
338 | url: { | 343 | url: { |
339 | - list: "/config/location/list", | ||
340 | - delete: "/config/location/delete", | ||
341 | - deleteBatch: "/config/location/deleteBatch", | ||
342 | - exportXlsUrl: "/config/location/exportXls", | ||
343 | - importExcelUrl: "config/location/importExcel", | ||
344 | - | 344 | + list: '/config/location/list', |
345 | + delete: '/config/location/delete', | ||
346 | + deleteBatch: '/config/location/deleteBatch', | ||
347 | + exportXlsUrl: '/config/location/exportXls', | ||
348 | + importExcelUrl: 'config/location/importExcel' | ||
345 | }, | 349 | }, |
346 | /* 分页参数 */ | 350 | /* 分页参数 */ |
347 | ipagination: { | 351 | ipagination: { |
@@ -349,83 +353,86 @@ export default { | @@ -349,83 +353,86 @@ export default { | ||
349 | pageSize: 10, | 353 | pageSize: 10, |
350 | pageSizeOptions: ['10', '20', '50'], | 354 | pageSizeOptions: ['10', '20', '50'], |
351 | showTotal: (total, range) => { | 355 | showTotal: (total, range) => { |
352 | - return range[0] + "-" + range[1] + " 共" + total + "条" | 356 | + return range[0] + '-' + range[1] + ' 共' + total + '条' |
353 | }, | 357 | }, |
354 | showQuickJumper: true, | 358 | showQuickJumper: true, |
355 | showSizeChanger: true, | 359 | showSizeChanger: true, |
356 | total: 0 | 360 | total: 0 |
357 | }, | 361 | }, |
358 | dictOptions: {}, | 362 | dictOptions: {}, |
359 | - superFieldList: [], | 363 | + superFieldList: [] |
360 | } | 364 | } |
361 | }, | 365 | }, |
362 | created() { | 366 | created() { |
363 | - this.getSuperFieldList(); | ||
364 | - this.loadFrom(); | 367 | + this.getSuperFieldList() |
368 | + this.loadFrom() | ||
365 | }, | 369 | }, |
366 | computed: { | 370 | computed: { |
367 | - importExcelUrl: function () { | ||
368 | - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
369 | - }, | 371 | + importExcelUrl: function() { |
372 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` | ||
373 | + } | ||
370 | }, | 374 | }, |
371 | methods: { | 375 | methods: { |
372 | - initDictConfig() { | ||
373 | - }, | 376 | + initDictConfig() {}, |
374 | getSuperFieldList() { | 377 | getSuperFieldList() { |
375 | - let fieldList = []; | ||
376 | - fieldList.push({type: 'string', value: 'code', text: '库位编码', dictCode: ''}) | ||
377 | - fieldList.push({type: 'string', value: 'zoneCode', text: '库区编码', dictCode: ''}) | ||
378 | - fieldList.push({type: 'string', value: 'locationTypeCode', text: '库位类型', dictCode: ''}) | ||
379 | - fieldList.push({type: 'string', value: 'containerCode', text: '容器编码', dictCode: ''}) | ||
380 | - fieldList.push({type: 'string', value: 'status', text: '状态', dictCode: 'location_status'}) | ||
381 | - fieldList.push({type: 'int', value: 'roadWay', text: '巷道', dictCode: ''}) | ||
382 | - fieldList.push({type: 'int', value: 'row', text: '行', dictCode: ''}) | ||
383 | - fieldList.push({type: 'int', value: 'icolumn', text: '列', dictCode: ''}) | ||
384 | - fieldList.push({type: 'int', value: 'layer', text: '层', dictCode: ''}) | ||
385 | - fieldList.push({type: 'int', value: 'grid', text: '格', dictCode: ''}) | ||
386 | - fieldList.push({type: 'int', value: 'high', text: '高低位', dictCode: ''}) | ||
387 | - fieldList.push({type: 'int', value: 'rowFlag', text: '内外侧', dictCode: 'row_type'}) | ||
388 | - fieldList.push({type: 'string', value: 'materialAreaCode', text: '物料分区存放', dictCode: ''}) | ||
389 | - fieldList.push({type: 'int', value: 'enable', text: '是否可用', dictCode: 'enable_status'}) | ||
390 | - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) | ||
391 | - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) | ||
392 | - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) | ||
393 | - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'}) | 378 | + let fieldList = [] |
379 | + fieldList.push({ type: 'string', value: 'code', text: '库位编码', dictCode: '' }) | ||
380 | + fieldList.push({ type: 'string', value: 'zoneCode', text: '库区编码', dictCode: '' }) | ||
381 | + fieldList.push({ type: 'string', value: 'locationTypeCode', text: '库位类型', dictCode: '' }) | ||
382 | + fieldList.push({ type: 'string', value: 'containerCode', text: '容器编码', dictCode: '' }) | ||
383 | + fieldList.push({ type: 'string', value: 'status', text: '状态', dictCode: 'location_status' }) | ||
384 | + fieldList.push({ type: 'int', value: 'roadWay', text: '巷道', dictCode: '' }) | ||
385 | + fieldList.push({ type: 'int', value: 'row', text: '行', dictCode: '' }) | ||
386 | + fieldList.push({ type: 'int', value: 'icolumn', text: '列', dictCode: '' }) | ||
387 | + fieldList.push({ type: 'int', value: 'layer', text: '层', dictCode: '' }) | ||
388 | + fieldList.push({ type: 'int', value: 'grid', text: '格', dictCode: '' }) | ||
389 | + fieldList.push({ type: 'int', value: 'high', text: '高低位', dictCode: '' }) | ||
390 | + fieldList.push({ type: 'int', value: 'rowFlag', text: '内外侧', dictCode: 'row_type' }) | ||
391 | + fieldList.push({ type: 'string', value: 'materialAreaCode', text: '物料分区存放', dictCode: '' }) | ||
392 | + fieldList.push({ type: 'int', value: 'enable', text: '是否可用', dictCode: 'enable_status' }) | ||
393 | + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) | ||
394 | + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) | ||
395 | + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) | ||
396 | + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) | ||
394 | this.superFieldList = fieldList | 397 | this.superFieldList = fieldList |
395 | }, | 398 | }, |
396 | loadFrom() { | 399 | loadFrom() { |
397 | - getZoneList().then((res) => { | 400 | + getZoneList().then(res => { |
398 | if (res.success) { | 401 | if (res.success) { |
399 | this.zoneList = res.result | 402 | this.zoneList = res.result |
400 | } | 403 | } |
401 | - }); | ||
402 | - getLocationTypeList().then((res) => { | 404 | + }) |
405 | + getLocationTypeList().then(res => { | ||
403 | if (res.success) { | 406 | if (res.success) { |
404 | this.locationTypeList = res.result | 407 | this.locationTypeList = res.result |
405 | } | 408 | } |
406 | }) | 409 | }) |
407 | }, | 410 | }, |
408 | batchAdd() { | 411 | batchAdd() { |
409 | - this.$refs.batchAddModalForm.add(); | ||
410 | - this.$refs.batchAddModalForm.title = "批量新增"; | ||
411 | - this.$refs.batchAddModalForm.disableSubmit = false; | 412 | + this.$refs.batchAddModalForm.add() |
413 | + this.$refs.batchAddModalForm.title = '批量新增' | ||
414 | + this.$refs.batchAddModalForm.disableSubmit = false | ||
412 | }, | 415 | }, |
413 | batchPrint() { | 416 | batchPrint() { |
414 | if (this.selectedRowKeys.length <= 0) { | 417 | if (this.selectedRowKeys.length <= 0) { |
415 | - this.$message.warning('请选择一条记录!'); | ||
416 | - return; | 418 | + this.$message.warning('请选择一条记录!') |
419 | + return | ||
417 | } else { | 420 | } else { |
418 | - var ids = ""; | 421 | + var ids = '' |
419 | for (var a = 0; a < this.selectedRowKeys.length; a++) { | 422 | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
420 | - ids += this.selectedRowKeys[a] + ","; | 423 | + ids += this.selectedRowKeys[a] + ',' |
421 | } | 424 | } |
422 | - window.open(window._CONFIG['domianURL'] + "/jmreport/view/768700106074832896/?id=" + ids, "newWindow", "toolbar=no,scrollbars=no,menubar=no,screenX=100,screenY=100"); | 425 | + window.open( |
426 | + window._CONFIG['domianURL'] + '/jmreport/view/768700106074832896/?id=' + ids, | ||
427 | + 'newWindow', | ||
428 | + 'toolbar=no,scrollbars=no,menubar=no,screenX=100,screenY=100' | ||
429 | + ) | ||
423 | } | 430 | } |
424 | }, | 431 | }, |
425 | solutionZoneCode(value) { | 432 | solutionZoneCode(value) { |
426 | var actions = [] | 433 | var actions = [] |
427 | - Object.keys(this.zoneList).some((key) => { | ||
428 | - if (this.zoneList[key].code == ('' + value)) { | 434 | + Object.keys(this.zoneList).some(key => { |
435 | + if (this.zoneList[key].code == '' + value) { | ||
429 | actions.push(this.zoneList[key].name) | 436 | actions.push(this.zoneList[key].name) |
430 | return true | 437 | return true |
431 | } | 438 | } |
@@ -434,14 +441,14 @@ export default { | @@ -434,14 +441,14 @@ export default { | ||
434 | }, | 441 | }, |
435 | solutionLocationType(value) { | 442 | solutionLocationType(value) { |
436 | var actions = [] | 443 | var actions = [] |
437 | - Object.keys(this.locationTypeList).some((key) => { | ||
438 | - if (this.locationTypeList[key].code == ('' + value)) { | 444 | + Object.keys(this.locationTypeList).some(key => { |
445 | + if (this.locationTypeList[key].code == '' + value) { | ||
439 | actions.push(this.locationTypeList[key].name) | 446 | actions.push(this.locationTypeList[key].name) |
440 | return true | 447 | return true |
441 | } | 448 | } |
442 | }) | 449 | }) |
443 | return actions.join('') | 450 | return actions.join('') |
444 | - }, | 451 | + } |
445 | } | 452 | } |
446 | } | 453 | } |
447 | </script> | 454 | </script> |
ant-design-vue-jeecg/src/views/system/config/LocationTypeList.vue
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | 20 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
21 | <a @click="handleToggleSearch" style="margin-left: 8px"> | 21 | <a @click="handleToggleSearch" style="margin-left: 8px"> |
22 | {{ toggleSearchStatus ? '收起' : '展开' }} | 22 | {{ toggleSearchStatus ? '收起' : '展开' }} |
23 | - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | 23 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> |
24 | </a> | 24 | </a> |
25 | </span> | 25 | </span> |
26 | </a-col> | 26 | </a-col> |
@@ -32,20 +32,30 @@ | @@ -32,20 +32,30 @@ | ||
32 | <!-- 操作按钮区域 --> | 32 | <!-- 操作按钮区域 --> |
33 | <div class="table-operator"> | 33 | <div class="table-operator"> |
34 | <a-button v-has="'locationType:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> | 34 | <a-button v-has="'locationType:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> |
35 | - <a-button v-has="'locationType:export'" type="primary" icon="download" @click="handleExportXls('库位类型')">导出</a-button> | ||
36 | - <a-upload v-has="'locationType:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" | ||
37 | - @change="handleImportExcel"> | 35 | + <a-button v-has="'locationType:export'" type="primary" icon="download" @click="handleExportXls('库位类型')"> |
36 | + 导出 | ||
37 | + </a-button> | ||
38 | + <a-upload | ||
39 | + v-has="'locationType:import'" | ||
40 | + name="file" | ||
41 | + :showUploadList="false" | ||
42 | + :multiple="false" | ||
43 | + :headers="tokenHeader" | ||
44 | + :action="importExcelUrl" | ||
45 | + @change="handleImportExcel" | ||
46 | + > | ||
38 | <a-button type="primary" icon="import">导入</a-button> | 47 | <a-button type="primary" icon="import">导入</a-button> |
39 | </a-upload> | 48 | </a-upload> |
40 | <a-dropdown v-if="selectedRowKeys.length > 0"> | 49 | <a-dropdown v-if="selectedRowKeys.length > 0"> |
41 | <a-menu slot="overlay" v-has="'locationType:deleteBatch'"> | 50 | <a-menu slot="overlay" v-has="'locationType:deleteBatch'"> |
42 | <a-menu-item key="1" @click="batchDel"> | 51 | <a-menu-item key="1" @click="batchDel"> |
43 | - <a-icon type="delete"/> | 52 | + <a-icon type="delete" /> |
44 | 删除 | 53 | 删除 |
45 | </a-menu-item> | 54 | </a-menu-item> |
46 | </a-menu> | 55 | </a-menu> |
47 | - <a-button style="margin-left: 8px"> 批量操作 | ||
48 | - <a-icon type="down"/> | 56 | + <a-button style="margin-left: 8px"> |
57 | + 批量操作 | ||
58 | + <a-icon type="down" /> | ||
49 | </a-button> | 59 | </a-button> |
50 | </a-dropdown> | 60 | </a-dropdown> |
51 | </div> | 61 | </div> |
@@ -53,50 +63,47 @@ | @@ -53,50 +63,47 @@ | ||
53 | <!-- table区域-begin --> | 63 | <!-- table区域-begin --> |
54 | <div> | 64 | <div> |
55 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 65 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
56 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | ||
57 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 66 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 |
67 | + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | ||
58 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 68 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
59 | </div> | 69 | </div> |
60 | 70 | ||
61 | <a-table | 71 | <a-table |
62 | ref="table" | 72 | ref="table" |
63 | size="middle" | 73 | size="middle" |
64 | - :scroll="{x:true}" | 74 | + :scroll="{ x: true }" |
65 | bordered | 75 | bordered |
66 | rowKey="id" | 76 | rowKey="id" |
67 | :columns="columns" | 77 | :columns="columns" |
68 | :dataSource="dataSource" | 78 | :dataSource="dataSource" |
69 | :pagination="ipagination" | 79 | :pagination="ipagination" |
70 | :loading="loading" | 80 | :loading="loading" |
71 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | 81 | + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" |
72 | class="j-table-force-nowrap" | 82 | class="j-table-force-nowrap" |
73 | - @change="handleTableChange"> | ||
74 | - | 83 | + @change="handleTableChange" |
84 | + > | ||
75 | <template slot="htmlSlot" slot-scope="text"> | 85 | <template slot="htmlSlot" slot-scope="text"> |
76 | <div v-html="text"></div> | 86 | <div v-html="text"></div> |
77 | </template> | 87 | </template> |
78 | <template slot="imgSlot" slot-scope="text"> | 88 | <template slot="imgSlot" slot-scope="text"> |
79 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | 89 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
80 | - <img v-else :src="getImgView(text)" height="25px" alt="" | ||
81 | - style="max-width:80px;font-size: 12px;font-style: italic;"/> | 90 | + <img |
91 | + v-else | ||
92 | + :src="getImgView(text)" | ||
93 | + height="25px" | ||
94 | + alt="" | ||
95 | + style="max-width:80px;font-size: 12px;font-style: italic;" | ||
96 | + /> | ||
82 | </template> | 97 | </template> |
83 | <template slot="fileSlot" slot-scope="text"> | 98 | <template slot="fileSlot" slot-scope="text"> |
84 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | 99 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
85 | - <a-button | ||
86 | - v-else | ||
87 | - :ghost="true" | ||
88 | - type="primary" | ||
89 | - icon="download" | ||
90 | - size="small" | ||
91 | - @click="downloadFile(text)"> | 100 | + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> |
92 | 下载 | 101 | 下载 |
93 | </a-button> | 102 | </a-button> |
94 | </template> | 103 | </template> |
95 | 104 | ||
96 | <span slot="action" slot-scope="text, record"> | 105 | <span slot="action" slot-scope="text, record"> |
97 | - <a v-has="'locationType:edit'" @click="handleEdit(record)">编辑</a> | ||
98 | - | ||
99 | - <a-divider type="vertical"/> | 106 | + <a v-has="'locationType:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> |
100 | <a-dropdown> | 107 | <a-dropdown> |
101 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> | 108 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
102 | <a-menu slot="overlay"> | 109 | <a-menu slot="overlay"> |
@@ -111,7 +118,6 @@ | @@ -111,7 +118,6 @@ | ||
111 | </a-menu> | 118 | </a-menu> |
112 | </a-dropdown> | 119 | </a-dropdown> |
113 | </span> | 120 | </span> |
114 | - | ||
115 | </a-table> | 121 | </a-table> |
116 | </div> | 122 | </div> |
117 | 123 | ||
@@ -120,10 +126,9 @@ | @@ -120,10 +126,9 @@ | ||
120 | </template> | 126 | </template> |
121 | 127 | ||
122 | <script> | 128 | <script> |
123 | - | ||
124 | import '@/assets/less/TableExpand.less' | 129 | import '@/assets/less/TableExpand.less' |
125 | -import {mixinDevice} from '@/utils/mixin' | ||
126 | -import {JeecgListMixin} from '@/mixins/JeecgListMixin' | 130 | +import { mixinDevice } from '@/utils/mixin' |
131 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
127 | import LocationTypeModal from './modules/LocationTypeModal' | 132 | import LocationTypeModal from './modules/LocationTypeModal' |
128 | 133 | ||
129 | export default { | 134 | export default { |
@@ -142,114 +147,111 @@ export default { | @@ -142,114 +147,111 @@ export default { | ||
142 | dataIndex: '', | 147 | dataIndex: '', |
143 | key: 'rowIndex', | 148 | key: 'rowIndex', |
144 | width: 60, | 149 | width: 60, |
145 | - align: "center", | ||
146 | - customRender: function (t, r, index) { | ||
147 | - return parseInt(index) + 1; | 150 | + align: 'center', |
151 | + customRender: function(t, r, index) { | ||
152 | + return parseInt(index) + 1 | ||
148 | } | 153 | } |
149 | }, | 154 | }, |
150 | { | 155 | { |
151 | title: '编码', | 156 | title: '编码', |
152 | - align: "center", | 157 | + align: 'center', |
153 | dataIndex: 'code' | 158 | dataIndex: 'code' |
154 | }, | 159 | }, |
155 | { | 160 | { |
156 | title: '名称', | 161 | title: '名称', |
157 | - align: "center", | 162 | + align: 'center', |
158 | dataIndex: 'name' | 163 | dataIndex: 'name' |
159 | }, | 164 | }, |
160 | { | 165 | { |
161 | title: '库区', | 166 | title: '库区', |
162 | - align: "center", | 167 | + align: 'center', |
163 | dataIndex: 'zoneCode' | 168 | dataIndex: 'zoneCode' |
164 | }, | 169 | }, |
165 | { | 170 | { |
166 | title: '长度', | 171 | title: '长度', |
167 | - align: "center", | 172 | + align: 'center', |
168 | dataIndex: 'length' | 173 | dataIndex: 'length' |
169 | }, | 174 | }, |
170 | { | 175 | { |
171 | title: '宽度', | 176 | title: '宽度', |
172 | - align: "center", | 177 | + align: 'center', |
173 | dataIndex: 'weight' | 178 | dataIndex: 'weight' |
174 | }, | 179 | }, |
175 | { | 180 | { |
176 | title: '高度', | 181 | title: '高度', |
177 | - align: "center", | 182 | + align: 'center', |
178 | dataIndex: 'height' | 183 | dataIndex: 'height' |
179 | }, | 184 | }, |
180 | { | 185 | { |
181 | title: '最大承重', | 186 | title: '最大承重', |
182 | - align: "center", | 187 | + align: 'center', |
183 | dataIndex: 'maxWeight' | 188 | dataIndex: 'maxWeight' |
184 | }, | 189 | }, |
185 | { | 190 | { |
186 | title: '创建人', | 191 | title: '创建人', |
187 | - align: "center", | 192 | + align: 'center', |
188 | dataIndex: 'createBy' | 193 | dataIndex: 'createBy' |
189 | }, | 194 | }, |
190 | { | 195 | { |
191 | title: '创建日期', | 196 | title: '创建日期', |
192 | - align: "center", | 197 | + align: 'center', |
193 | dataIndex: 'createTime' | 198 | dataIndex: 'createTime' |
194 | }, | 199 | }, |
195 | { | 200 | { |
196 | title: '更新人', | 201 | title: '更新人', |
197 | - align: "center", | 202 | + align: 'center', |
198 | dataIndex: 'updateBy' | 203 | dataIndex: 'updateBy' |
199 | }, | 204 | }, |
200 | { | 205 | { |
201 | title: '更新日期', | 206 | title: '更新日期', |
202 | - align: "center", | 207 | + align: 'center', |
203 | dataIndex: 'updateTime' | 208 | dataIndex: 'updateTime' |
204 | }, | 209 | }, |
205 | { | 210 | { |
206 | title: '操作', | 211 | title: '操作', |
207 | dataIndex: 'action', | 212 | dataIndex: 'action', |
208 | - align: "center", | ||
209 | - fixed: "right", | 213 | + align: 'center', |
214 | + fixed: 'right', | ||
210 | width: 147, | 215 | width: 147, |
211 | - scopedSlots: {customRender: 'action'} | 216 | + scopedSlots: { customRender: 'action' } |
212 | } | 217 | } |
213 | ], | 218 | ], |
214 | url: { | 219 | url: { |
215 | - list: "/config/locationType/list", | ||
216 | - delete: "/config/locationType/delete", | ||
217 | - deleteBatch: "/config/locationType/deleteBatch", | ||
218 | - exportXlsUrl: "/config/locationType/exportXls", | ||
219 | - importExcelUrl: "config/locationType/importExcel", | ||
220 | - | 220 | + list: '/config/locationType/list', |
221 | + delete: '/config/locationType/delete', | ||
222 | + deleteBatch: '/config/locationType/deleteBatch', | ||
223 | + exportXlsUrl: '/config/locationType/exportXls', | ||
224 | + importExcelUrl: 'config/locationType/importExcel' | ||
221 | }, | 225 | }, |
222 | dictOptions: {}, | 226 | dictOptions: {}, |
223 | - superFieldList: [], | 227 | + superFieldList: [] |
224 | } | 228 | } |
225 | }, | 229 | }, |
226 | created() { | 230 | created() { |
227 | - this.getSuperFieldList(); | ||
228 | - this.loadFrom(); | 231 | + this.getSuperFieldList() |
229 | }, | 232 | }, |
230 | computed: { | 233 | computed: { |
231 | - importExcelUrl: function () { | ||
232 | - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
233 | - }, | 234 | + importExcelUrl: function() { |
235 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` | ||
236 | + } | ||
234 | }, | 237 | }, |
235 | methods: { | 238 | methods: { |
236 | - initDictConfig() { | ||
237 | - }, | 239 | + initDictConfig() {}, |
238 | getSuperFieldList() { | 240 | getSuperFieldList() { |
239 | - let fieldList = []; | ||
240 | - fieldList.push({type: 'string', value: 'code', text: '编码', dictCode: ''}) | ||
241 | - fieldList.push({type: 'string', value: 'name', text: '名称', dictCode: ''}) | ||
242 | - fieldList.push({type: 'int', value: 'length', text: '长度', dictCode: ''}) | ||
243 | - fieldList.push({type: 'int', value: 'weight', text: '宽度', dictCode: ''}) | ||
244 | - fieldList.push({type: 'int', value: 'height', text: '高度', dictCode: ''}) | ||
245 | - fieldList.push({type: 'int', value: 'maxWeight', text: '最大承重', dictCode: ''}) | ||
246 | - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) | ||
247 | - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) | ||
248 | - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) | ||
249 | - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'}) | 241 | + let fieldList = [] |
242 | + fieldList.push({ type: 'string', value: 'code', text: '编码', dictCode: '' }) | ||
243 | + fieldList.push({ type: 'string', value: 'name', text: '名称', dictCode: '' }) | ||
244 | + fieldList.push({ type: 'int', value: 'length', text: '长度', dictCode: '' }) | ||
245 | + fieldList.push({ type: 'int', value: 'weight', text: '宽度', dictCode: '' }) | ||
246 | + fieldList.push({ type: 'int', value: 'height', text: '高度', dictCode: '' }) | ||
247 | + fieldList.push({ type: 'int', value: 'maxWeight', text: '最大承重', dictCode: '' }) | ||
248 | + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) | ||
249 | + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) | ||
250 | + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) | ||
251 | + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) | ||
250 | this.superFieldList = fieldList | 252 | this.superFieldList = fieldList |
251 | - }, | ||
252 | - }, | 253 | + } |
254 | + } | ||
253 | } | 255 | } |
254 | </script> | 256 | </script> |
255 | <style scoped> | 257 | <style scoped> |
ant-design-vue-jeecg/src/views/system/config/MaterialAreaList.vue
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | <div> | 34 | <div> |
35 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 35 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
36 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 36 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
37 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 37 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
38 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 38 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
39 | </div> | 39 | </div> |
40 | 40 |
ant-design-vue-jeecg/src/views/system/config/MaterialList.vue
@@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
62 | <div> | 62 | <div> |
63 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 63 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
64 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 64 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
65 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 65 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
66 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 66 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
67 | </div> | 67 | </div> |
68 | 68 |
ant-design-vue-jeecg/src/views/system/config/MaterialMultipleList.vue
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | <div> | 34 | <div> |
35 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 35 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
36 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 36 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
37 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 37 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
38 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 38 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
39 | </div> | 39 | </div> |
40 | 40 |
ant-design-vue-jeecg/src/views/system/config/MaterialTypeList.vue
@@ -54,7 +54,7 @@ | @@ -54,7 +54,7 @@ | ||
54 | <div> | 54 | <div> |
55 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 55 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
56 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 56 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
57 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 57 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
58 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 58 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
59 | </div> | 59 | </div> |
60 | 60 |
ant-design-vue-jeecg/src/views/system/config/MaterialUnitList.vue
@@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
61 | <div> | 61 | <div> |
62 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 62 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
63 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 63 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
64 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 64 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
65 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 65 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
66 | </div> | 66 | </div> |
67 | 67 |
ant-design-vue-jeecg/src/views/system/config/MaterialWarningList.vue
@@ -54,7 +54,7 @@ | @@ -54,7 +54,7 @@ | ||
54 | <div> | 54 | <div> |
55 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 55 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
56 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 56 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
57 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 57 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
58 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 58 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
59 | </div> | 59 | </div> |
60 | 60 |
ant-design-vue-jeecg/src/views/system/config/ParameterConfigurationList.vue
@@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
61 | <div> | 61 | <div> |
62 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 62 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
63 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 63 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
64 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 64 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
65 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 65 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
66 | </div> | 66 | </div> |
67 | 67 |
ant-design-vue-jeecg/src/views/system/config/PortList.vue
@@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
61 | <div> | 61 | <div> |
62 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 62 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
63 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 63 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
64 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 64 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
65 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 65 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
66 | </div> | 66 | </div> |
67 | 67 |
ant-design-vue-jeecg/src/views/system/config/ReceiptTypeList.vue
@@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
53 | <div> | 53 | <div> |
54 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 54 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
55 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 55 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
56 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 56 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
57 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 57 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
58 | </div> | 58 | </div> |
59 | 59 |
ant-design-vue-jeecg/src/views/system/config/ShipmentTypeList.vue
@@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
53 | <div> | 53 | <div> |
54 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 54 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
55 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 55 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
56 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 56 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
57 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 57 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
58 | </div> | 58 | </div> |
59 | 59 |
ant-design-vue-jeecg/src/views/system/config/StrategyList.vue
@@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
29 | <!-- table区域-begin --> | 29 | <!-- table区域-begin --> |
30 | <div> | 30 | <div> |
31 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 31 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
32 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 32 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
33 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 33 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
34 | </div> | 34 | </div> |
35 | 35 |
ant-design-vue-jeecg/src/views/system/config/SupplierList.vue
@@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
61 | <div> | 61 | <div> |
62 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 62 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
63 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 63 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
64 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 64 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
65 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 65 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
66 | </div> | 66 | </div> |
67 | 67 |
ant-design-vue-jeecg/src/views/system/config/SysUserWarehouseList.vue
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | <div> | 49 | <div> |
50 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 50 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
51 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 51 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
52 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 52 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
53 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 53 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
54 | </div> | 54 | </div> |
55 | 55 |
ant-design-vue-jeecg/src/views/system/config/WarehouseList.vue
@@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
56 | <div> | 56 | <div> |
57 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 57 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
58 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 58 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
59 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 59 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
60 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 60 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
61 | </div> | 61 | </div> |
62 | 62 |
ant-design-vue-jeecg/src/views/system/config/ZoneList.vue
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | 20 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
21 | <a @click="handleToggleSearch" style="margin-left: 8px"> | 21 | <a @click="handleToggleSearch" style="margin-left: 8px"> |
22 | {{ toggleSearchStatus ? '收起' : '展开' }} | 22 | {{ toggleSearchStatus ? '收起' : '展开' }} |
23 | - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | 23 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> |
24 | </a> | 24 | </a> |
25 | </span> | 25 | </span> |
26 | </a-col> | 26 | </a-col> |
@@ -32,20 +32,30 @@ | @@ -32,20 +32,30 @@ | ||
32 | <!-- 操作按钮区域 --> | 32 | <!-- 操作按钮区域 --> |
33 | <div class="table-operator"> | 33 | <div class="table-operator"> |
34 | <a-button v-has="'zone:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> | 34 | <a-button v-has="'zone:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> |
35 | - <a-button v-has="'zone:export'" type="primary" icon="download" @click="handleExportXls('库区管理')">导出</a-button> | ||
36 | - <a-upload v-has="'zone:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" | ||
37 | - @change="handleImportExcel"> | 35 | + <a-button v-has="'zone:export'" type="primary" icon="download" @click="handleExportXls('库区管理')" |
36 | + >导出</a-button | ||
37 | + > | ||
38 | + <a-upload | ||
39 | + v-has="'zone:import'" | ||
40 | + name="file" | ||
41 | + :showUploadList="false" | ||
42 | + :multiple="false" | ||
43 | + :headers="tokenHeader" | ||
44 | + :action="importExcelUrl" | ||
45 | + @change="handleImportExcel" | ||
46 | + > | ||
38 | <a-button type="primary" icon="import">导入</a-button> | 47 | <a-button type="primary" icon="import">导入</a-button> |
39 | </a-upload> | 48 | </a-upload> |
40 | <a-dropdown v-if="selectedRowKeys.length > 0"> | 49 | <a-dropdown v-if="selectedRowKeys.length > 0"> |
41 | <a-menu slot="overlay" v-has="'zone:deleteBatch'"> | 50 | <a-menu slot="overlay" v-has="'zone:deleteBatch'"> |
42 | <a-menu-item key="1" @click="batchDel"> | 51 | <a-menu-item key="1" @click="batchDel"> |
43 | - <a-icon type="delete"/> | 52 | + <a-icon type="delete" /> |
44 | 删除 | 53 | 删除 |
45 | </a-menu-item> | 54 | </a-menu-item> |
46 | </a-menu> | 55 | </a-menu> |
47 | - <a-button style="margin-left: 8px"> 批量操作 | ||
48 | - <a-icon type="down"/> | 56 | + <a-button style="margin-left: 8px"> |
57 | + 批量操作 | ||
58 | + <a-icon type="down" /> | ||
49 | </a-button> | 59 | </a-button> |
50 | </a-dropdown> | 60 | </a-dropdown> |
51 | </div> | 61 | </div> |
@@ -53,27 +63,27 @@ | @@ -53,27 +63,27 @@ | ||
53 | <!-- table区域-begin --> | 63 | <!-- table区域-begin --> |
54 | <div> | 64 | <div> |
55 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 65 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
56 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | ||
57 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 66 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 |
67 | + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | ||
58 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 68 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
59 | </div> | 69 | </div> |
60 | 70 | ||
61 | <a-table | 71 | <a-table |
62 | ref="table" | 72 | ref="table" |
63 | size="middle" | 73 | size="middle" |
64 | - :scroll="{x:true}" | 74 | + :scroll="{ x: true }" |
65 | bordered | 75 | bordered |
66 | rowKey="id" | 76 | rowKey="id" |
67 | :columns="columns" | 77 | :columns="columns" |
68 | :dataSource="dataSource" | 78 | :dataSource="dataSource" |
69 | :pagination="ipagination" | 79 | :pagination="ipagination" |
70 | :loading="loading" | 80 | :loading="loading" |
71 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | 81 | + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" |
72 | class="j-table-force-nowrap" | 82 | class="j-table-force-nowrap" |
73 | - @change="handleTableChange"> | ||
74 | - | ||
75 | - <span slot="locationTypeCode" slot-scope="locationTypeCode"> | ||
76 | - <a-tag :key="locationTypeCode" color=pink> | 83 | + @change="handleTableChange" |
84 | + > | ||
85 | + <span slot="locationTypeCodes" slot-scope="locationTypeCodes" > | ||
86 | + <a-tag v-for="locationTypeCode in locationTypeCodes" :key="locationTypeCode" color=pink> | ||
77 | {{ solutionLocationType(locationTypeCode) }} | 87 | {{ solutionLocationType(locationTypeCode) }} |
78 | </a-tag> | 88 | </a-tag> |
79 | </span> | 89 | </span> |
@@ -83,26 +93,23 @@ | @@ -83,26 +93,23 @@ | ||
83 | </template> | 93 | </template> |
84 | <template slot="imgSlot" slot-scope="text"> | 94 | <template slot="imgSlot" slot-scope="text"> |
85 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | 95 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
86 | - <img v-else :src="getImgView(text)" height="25px" alt="" | ||
87 | - style="max-width:80px;font-size: 12px;font-style: italic;"/> | 96 | + <img |
97 | + v-else | ||
98 | + :src="getImgView(text)" | ||
99 | + height="25px" | ||
100 | + alt="" | ||
101 | + style="max-width:80px;font-size: 12px;font-style: italic;" | ||
102 | + /> | ||
88 | </template> | 103 | </template> |
89 | <template slot="fileSlot" slot-scope="text"> | 104 | <template slot="fileSlot" slot-scope="text"> |
90 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | 105 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
91 | - <a-button | ||
92 | - v-else | ||
93 | - :ghost="true" | ||
94 | - type="primary" | ||
95 | - icon="download" | ||
96 | - size="small" | ||
97 | - @click="downloadFile(text)"> | 106 | + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> |
98 | 下载 | 107 | 下载 |
99 | </a-button> | 108 | </a-button> |
100 | </template> | 109 | </template> |
101 | 110 | ||
102 | <span slot="action" slot-scope="text, record"> | 111 | <span slot="action" slot-scope="text, record"> |
103 | - <a v-has="'zone:edit'" @click="handleEdit(record)">编辑</a> | ||
104 | - | ||
105 | - <a-divider type="vertical"/> | 112 | + <a v-has="'zone:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> |
106 | <a-dropdown> | 113 | <a-dropdown> |
107 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> | 114 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
108 | <a-menu slot="overlay"> | 115 | <a-menu slot="overlay"> |
@@ -117,7 +124,6 @@ | @@ -117,7 +124,6 @@ | ||
117 | </a-menu> | 124 | </a-menu> |
118 | </a-dropdown> | 125 | </a-dropdown> |
119 | </span> | 126 | </span> |
120 | - | ||
121 | </a-table> | 127 | </a-table> |
122 | </div> | 128 | </div> |
123 | 129 | ||
@@ -126,12 +132,11 @@ | @@ -126,12 +132,11 @@ | ||
126 | </template> | 132 | </template> |
127 | 133 | ||
128 | <script> | 134 | <script> |
129 | - | ||
130 | import '@/assets/less/TableExpand.less' | 135 | import '@/assets/less/TableExpand.less' |
131 | -import {mixinDevice} from '@/utils/mixin' | ||
132 | -import {JeecgListMixin} from '@/mixins/JeecgListMixin' | 136 | +import { mixinDevice } from '@/utils/mixin' |
137 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
133 | import ZoneModal from './modules/ZoneModal' | 138 | import ZoneModal from './modules/ZoneModal' |
134 | -import {getLocationTypeList} from '@/api/api' | 139 | +import { getLocationTypeList } from '@/api/api' |
135 | 140 | ||
136 | export default { | 141 | export default { |
137 | name: 'ZoneList', | 142 | name: 'ZoneList', |
@@ -150,93 +155,93 @@ export default { | @@ -150,93 +155,93 @@ export default { | ||
150 | dataIndex: '', | 155 | dataIndex: '', |
151 | key: 'rowIndex', | 156 | key: 'rowIndex', |
152 | width: 60, | 157 | width: 60, |
153 | - align: "center", | ||
154 | - customRender: function (t, r, index) { | ||
155 | - return parseInt(index) + 1; | 158 | + align: 'center', |
159 | + customRender: function(t, r, index) { | ||
160 | + return parseInt(index) + 1 | ||
156 | } | 161 | } |
157 | }, | 162 | }, |
158 | { | 163 | { |
159 | title: '编码', | 164 | title: '编码', |
160 | - align: "center", | 165 | + align: 'center', |
161 | dataIndex: 'code' | 166 | dataIndex: 'code' |
162 | }, | 167 | }, |
163 | { | 168 | { |
164 | title: '名称', | 169 | title: '名称', |
165 | - align: "center", | 170 | + align: 'center', |
166 | dataIndex: 'name' | 171 | dataIndex: 'name' |
167 | }, | 172 | }, |
168 | { | 173 | { |
169 | title: '包含库位类型', | 174 | title: '包含库位类型', |
170 | - align: "center", | ||
171 | - dataIndex: 'locationTypeCode', | 175 | + align: 'center', |
176 | + dataIndex: 'locationTypeCodes', | ||
177 | + key: 'locationTypeCodes', | ||
178 | + scopedSlots: {customRender: 'locationTypeCodes'} | ||
172 | }, | 179 | }, |
173 | { | 180 | { |
174 | title: '创建人', | 181 | title: '创建人', |
175 | - align: "center", | 182 | + align: 'center', |
176 | dataIndex: 'createBy' | 183 | dataIndex: 'createBy' |
177 | }, | 184 | }, |
178 | { | 185 | { |
179 | title: '创建日期', | 186 | title: '创建日期', |
180 | - align: "center", | 187 | + align: 'center', |
181 | dataIndex: 'createTime' | 188 | dataIndex: 'createTime' |
182 | }, | 189 | }, |
183 | { | 190 | { |
184 | title: '更新人', | 191 | title: '更新人', |
185 | - align: "center", | 192 | + align: 'center', |
186 | dataIndex: 'updateBy' | 193 | dataIndex: 'updateBy' |
187 | }, | 194 | }, |
188 | { | 195 | { |
189 | title: '更新日期', | 196 | title: '更新日期', |
190 | - align: "center", | 197 | + align: 'center', |
191 | dataIndex: 'updateTime' | 198 | dataIndex: 'updateTime' |
192 | }, | 199 | }, |
193 | { | 200 | { |
194 | title: '操作', | 201 | title: '操作', |
195 | dataIndex: 'action', | 202 | dataIndex: 'action', |
196 | - align: "center", | ||
197 | - fixed: "right", | 203 | + align: 'center', |
204 | + fixed: 'right', | ||
198 | width: 147, | 205 | width: 147, |
199 | - scopedSlots: {customRender: 'action'} | 206 | + scopedSlots: { customRender: 'action' } |
200 | } | 207 | } |
201 | ], | 208 | ], |
202 | url: { | 209 | url: { |
203 | - list: "/config/zone/list", | ||
204 | - delete: "/config/zone/delete", | ||
205 | - deleteBatch: "/config/zone/deleteBatch", | ||
206 | - exportXlsUrl: "/config/zone/exportXls", | ||
207 | - importExcelUrl: "config/zone/importExcel", | ||
208 | - | 210 | + list: '/config/zone/list', |
211 | + delete: '/config/zone/delete', | ||
212 | + deleteBatch: '/config/zone/deleteBatch', | ||
213 | + exportXlsUrl: '/config/zone/exportXls', | ||
214 | + importExcelUrl: 'config/zone/importExcel' | ||
209 | }, | 215 | }, |
210 | dictOptions: {}, | 216 | dictOptions: {}, |
211 | - superFieldList: [], | 217 | + superFieldList: [] |
212 | } | 218 | } |
213 | }, | 219 | }, |
214 | created() { | 220 | created() { |
215 | - this.getSuperFieldList(); | ||
216 | - this.loadFrom(); | 221 | + this.getSuperFieldList() |
222 | + this.loadFrom() | ||
217 | }, | 223 | }, |
218 | computed: { | 224 | computed: { |
219 | - importExcelUrl: function () { | ||
220 | - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
221 | - }, | 225 | + importExcelUrl: function() { |
226 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` | ||
227 | + } | ||
222 | }, | 228 | }, |
223 | methods: { | 229 | methods: { |
224 | - initDictConfig() { | ||
225 | - }, | 230 | + initDictConfig() {}, |
226 | getSuperFieldList() { | 231 | getSuperFieldList() { |
227 | - let fieldList = []; | ||
228 | - fieldList.push({type: 'string', value: 'code', text: '编码', dictCode: ''}) | ||
229 | - fieldList.push({type: 'string', value: 'name', text: '名称', dictCode: ''}) | ||
230 | - fieldList.push({type: 'string', value: 'companyCode', text: '货主编码', dictCode: ''}) | ||
231 | - fieldList.push({type: 'string', value: 'locationTypeCode', text: '库位类型', dictCode: ''}) | ||
232 | - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) | ||
233 | - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) | ||
234 | - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) | ||
235 | - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'}) | 232 | + let fieldList = [] |
233 | + fieldList.push({ type: 'string', value: 'code', text: '编码', dictCode: '' }) | ||
234 | + fieldList.push({ type: 'string', value: 'name', text: '名称', dictCode: '' }) | ||
235 | + fieldList.push({ type: 'string', value: 'companyCode', text: '货主编码', dictCode: '' }) | ||
236 | + fieldList.push({ type: 'string', value: 'locationTypeCode', text: '库位类型', dictCode: '' }) | ||
237 | + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) | ||
238 | + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) | ||
239 | + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) | ||
240 | + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) | ||
236 | this.superFieldList = fieldList | 241 | this.superFieldList = fieldList |
237 | }, | 242 | }, |
238 | loadFrom() { | 243 | loadFrom() { |
239 | - getLocationTypeList().then((res) => { | 244 | + getLocationTypeList().then(res => { |
240 | if (res.success) { | 245 | if (res.success) { |
241 | this.locationTypeList = res.result | 246 | this.locationTypeList = res.result |
242 | } | 247 | } |
@@ -244,8 +249,8 @@ export default { | @@ -244,8 +249,8 @@ export default { | ||
244 | }, | 249 | }, |
245 | solutionLocationType(value) { | 250 | solutionLocationType(value) { |
246 | var actions = [] | 251 | var actions = [] |
247 | - Object.keys(this.locationTypeList).some((key) => { | ||
248 | - if (this.locationTypeList[key].code == ('' + value)) { | 252 | + Object.keys(this.locationTypeList).some(key => { |
253 | + if (this.locationTypeList[key].code == '' + value) { | ||
249 | actions.push(this.locationTypeList[key].name) | 254 | actions.push(this.locationTypeList[key].name) |
250 | return true | 255 | return true |
251 | } | 256 | } |
ant-design-vue-jeecg/src/views/system/config/modules/ContainerCapacityForm.vue
@@ -5,12 +5,15 @@ | @@ -5,12 +5,15 @@ | ||
5 | <a-row> | 5 | <a-row> |
6 | <a-col :span="24"> | 6 | <a-col :span="24"> |
7 | <a-form-model-item label="容器类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerTypeCode"> | 7 | <a-form-model-item label="容器类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerTypeCode"> |
8 | - <a-input v-model="model.containerTypeCode" 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="companyCode"> | ||
13 | - <a-input v-model="model.companyCode" placeholder="请输入货主"></a-input> | 8 | + <a-select |
9 | + show-search | ||
10 | + placeholder="请选择容器类型" | ||
11 | + option-filter-prop="children" | ||
12 | + v-model="model.containerTypeCode"> | ||
13 | + <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code"> | ||
14 | + {{ item.name }} | ||
15 | + </a-select-option> | ||
16 | + </a-select> | ||
14 | </a-form-model-item> | 17 | </a-form-model-item> |
15 | </a-col> | 18 | </a-col> |
16 | <a-col :span="24"> | 19 | <a-col :span="24"> |
@@ -19,18 +22,8 @@ | @@ -19,18 +22,8 @@ | ||
19 | </a-form-model-item> | 22 | </a-form-model-item> |
20 | </a-col> | 23 | </a-col> |
21 | <a-col :span="24"> | 24 | <a-col :span="24"> |
22 | - <a-form-model-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName"> | ||
23 | - <a-input v-model="model.materialName" 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="materialUnit"> | ||
28 | - <a-input v-model="model.materialUnit" 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="qty"> | ||
33 | - <a-input-number v-model="model.qty" placeholder="请输入存放数量" style="width: 100%"/> | 25 | + <a-form-model-item label="容量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qty"> |
26 | + <a-input-number v-model="model.qty" placeholder="请输入容量" style="width: 100%"/> | ||
34 | </a-form-model-item> | 27 | </a-form-model-item> |
35 | </a-col> | 28 | </a-col> |
36 | <a-col :span="24"> | 29 | <a-col :span="24"> |
@@ -48,6 +41,7 @@ | @@ -48,6 +41,7 @@ | ||
48 | 41 | ||
49 | import {httpAction, getAction} from '@/api/manage' | 42 | import {httpAction, getAction} from '@/api/manage' |
50 | import {validateDuplicateValue} from '@/utils/util' | 43 | import {validateDuplicateValue} from '@/utils/util' |
44 | +import {getContainerTypeList} from '@/api/api' | ||
51 | 45 | ||
52 | export default { | 46 | export default { |
53 | name: 'ContainerCapacityForm', | 47 | name: 'ContainerCapacityForm', |
@@ -63,6 +57,7 @@ export default { | @@ -63,6 +57,7 @@ export default { | ||
63 | data() { | 57 | data() { |
64 | return { | 58 | return { |
65 | model: {}, | 59 | model: {}, |
60 | + containerTypeList: [], | ||
66 | labelCol: { | 61 | labelCol: { |
67 | xs: {span: 24}, | 62 | xs: {span: 24}, |
68 | sm: {span: 5}, | 63 | sm: {span: 5}, |
@@ -80,10 +75,10 @@ export default { | @@ -80,10 +75,10 @@ export default { | ||
80 | {required: true, message: '请输入物料编码!'}, | 75 | {required: true, message: '请输入物料编码!'}, |
81 | ], | 76 | ], |
82 | qty: [ | 77 | qty: [ |
83 | - {required: true, message: '请输入存放数量!'}, | 78 | + {required: true, message: '请输入容量!'}, |
84 | ], | 79 | ], |
85 | enable: [ | 80 | enable: [ |
86 | - {required: true, message: '请输入是否可用!'}, | 81 | + {required: true, message: '请选择是否可用!'}, |
87 | ], | 82 | ], |
88 | }, | 83 | }, |
89 | url: { | 84 | url: { |
@@ -101,8 +96,16 @@ export default { | @@ -101,8 +96,16 @@ export default { | ||
101 | created() { | 96 | created() { |
102 | //备份model原始值 | 97 | //备份model原始值 |
103 | this.modelDefault = JSON.parse(JSON.stringify(this.model)); | 98 | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
99 | + this.loadFrom(); | ||
104 | }, | 100 | }, |
105 | methods: { | 101 | methods: { |
102 | + loadFrom() { | ||
103 | + getContainerTypeList().then((res) => { | ||
104 | + if (res.success) { | ||
105 | + this.containerTypeList = res.result | ||
106 | + } | ||
107 | + }); | ||
108 | + }, | ||
106 | add() { | 109 | add() { |
107 | this.edit(this.modelDefault); | 110 | this.edit(this.modelDefault); |
108 | }, | 111 | }, |
ant-design-vue-jeecg/src/views/system/config/modules/ContainerForm.vue
@@ -9,11 +9,9 @@ | @@ -9,11 +9,9 @@ | ||
9 | show-search | 9 | show-search |
10 | placeholder="请选择容器类型" | 10 | placeholder="请选择容器类型" |
11 | option-filter-prop="children" | 11 | option-filter-prop="children" |
12 | - | ||
13 | v-model="model.containerTypeCode"> | 12 | v-model="model.containerTypeCode"> |
14 | - <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code">{{ | ||
15 | - item.name | ||
16 | - }} | 13 | + <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code"> |
14 | + {{ item.name }} | ||
17 | </a-select-option> | 15 | </a-select-option> |
18 | </a-select> | 16 | </a-select> |
19 | </a-form-model-item> | 17 | </a-form-model-item> |
ant-design-vue-jeecg/src/views/system/config/modules/ContainerTypeForm.vue
@@ -13,14 +13,26 @@ | @@ -13,14 +13,26 @@ | ||
13 | <a-input v-model="model.name" placeholder="请输入名称"></a-input> | 13 | <a-input v-model="model.name" placeholder="请输入名称"></a-input> |
14 | </a-form-model-item> | 14 | </a-form-model-item> |
15 | </a-col> | 15 | </a-col> |
16 | - <a-col :span="24"> | ||
17 | - <a-form-model-item label="货主编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode"> | ||
18 | - <a-input v-model="model.companyCode" placeholder="请输入货主编码"></a-input> | 16 | + <!-- <a-col :span="24"> |
17 | + <a-form-model-item label="货主" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode"> | ||
18 | + <a-select | ||
19 | + show-search | ||
20 | + placeholder="请选择货主编码" | ||
21 | + option-filter-prop="children" | ||
22 | + v-model="model.companyCode"> | ||
23 | + <a-select-option v-for="item in companyList" :key="item.name" :value="item.code"> | ||
24 | + {{ item.name }} | ||
25 | + </a-select-option> | ||
26 | + </a-select> | ||
19 | </a-form-model-item> | 27 | </a-form-model-item> |
20 | - </a-col> | 28 | + </a-col> --> |
21 | <a-col :span="24"> | 29 | <a-col :span="24"> |
22 | <a-form-model-item label="绑定的库位类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationType"> | 30 | <a-form-model-item label="绑定的库位类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationType"> |
23 | - <a-input v-model="model.locationType" placeholder="请输入绑定的库位类型"></a-input> | 31 | + <j-select-multiple |
32 | + v-model="model.locationType" | ||
33 | + :options="locationTypeOptions" | ||
34 | + placeholder="请选择库位类型"> | ||
35 | + </j-select-multiple> | ||
24 | </a-form-model-item> | 36 | </a-form-model-item> |
25 | </a-col> | 37 | </a-col> |
26 | <a-col :span="24"> | 38 | <a-col :span="24"> |
@@ -57,7 +69,7 @@ | @@ -57,7 +69,7 @@ | ||
57 | <script> | 69 | <script> |
58 | 70 | ||
59 | import {httpAction, getAction} from '@/api/manage' | 71 | import {httpAction, getAction} from '@/api/manage' |
60 | -import {validateDuplicateValue} from '@/utils/util' | 72 | +import {getLocationTypeList, getCompanyList} from '@/api/api' |
61 | 73 | ||
62 | export default { | 74 | export default { |
63 | name: 'ContainerTypeForm', | 75 | name: 'ContainerTypeForm', |
@@ -73,6 +85,8 @@ export default { | @@ -73,6 +85,8 @@ export default { | ||
73 | data() { | 85 | data() { |
74 | return { | 86 | return { |
75 | model: {}, | 87 | model: {}, |
88 | + companyList: [], | ||
89 | + locationTypeOptions: [], | ||
76 | labelCol: { | 90 | labelCol: { |
77 | xs: {span: 24}, | 91 | xs: {span: 24}, |
78 | sm: {span: 5}, | 92 | sm: {span: 5}, |
@@ -90,7 +104,7 @@ export default { | @@ -90,7 +104,7 @@ export default { | ||
90 | {required: true, message: '请输入名称!'}, | 104 | {required: true, message: '请输入名称!'}, |
91 | ], | 105 | ], |
92 | locationType: [ | 106 | locationType: [ |
93 | - {required: true, message: '请输入库位类型!'}, | 107 | + {required: true, message: '请选择库位类型!'}, |
94 | ], | 108 | ], |
95 | }, | 109 | }, |
96 | url: { | 110 | url: { |
@@ -110,10 +124,26 @@ export default { | @@ -110,10 +124,26 @@ export default { | ||
110 | this.modelDefault = JSON.parse(JSON.stringify(this.model)); | 124 | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
111 | }, | 125 | }, |
112 | methods: { | 126 | methods: { |
127 | + loadFrom() { | ||
128 | + getCompanyList().then((res) => { | ||
129 | + if (res.success) { | ||
130 | + this.companyList = res.result | ||
131 | + } | ||
132 | + }); | ||
133 | + getLocationTypeList().then((res) => { | ||
134 | + if (res.success) { | ||
135 | + this.locationTypeOptions = res.result.map((item, index, arr) => { | ||
136 | + return {label: item.name, value: item.code} | ||
137 | + }) | ||
138 | + } | ||
139 | + }); | ||
140 | + }, | ||
113 | add() { | 141 | add() { |
142 | + this.loadFrom(); | ||
114 | this.edit(this.modelDefault); | 143 | this.edit(this.modelDefault); |
115 | }, | 144 | }, |
116 | edit(record) { | 145 | edit(record) { |
146 | + this.loadFrom(); | ||
117 | this.model = Object.assign({}, record); | 147 | this.model = Object.assign({}, record); |
118 | this.visible = true; | 148 | this.visible = true; |
119 | }, | 149 | }, |
ant-design-vue-jeecg/src/views/system/config/modules/ZoneForm.vue
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | </a-col> | 15 | </a-col> |
16 | <a-col :span="24"> | 16 | <a-col :span="24"> |
17 | <a-form-model-item label="包含库位类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationTypeCode"> | 17 | <a-form-model-item label="包含库位类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationTypeCode"> |
18 | - <a-input v-model="model.locationTypeCode" placeholder="请输入库位类型编码"></a-input> | 18 | + <a-input v-model="model.locationTypeCode" placeholder="请输入包含库位类型编码,用英文逗号分割"></a-input> |
19 | </a-form-model-item> | 19 | </a-form-model-item> |
20 | </a-col> | 20 | </a-col> |
21 | </a-row> | 21 | </a-row> |
ant-design-vue-jeecg/src/views/system/inventory/InventoryChildList.vue
@@ -106,7 +106,7 @@ | @@ -106,7 +106,7 @@ | ||
106 | <!-- table区域-begin --> | 106 | <!-- table区域-begin --> |
107 | <div> | 107 | <div> |
108 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 108 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
109 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 109 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
110 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 110 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
111 | </div> | 111 | </div> |
112 | 112 | ||
@@ -143,12 +143,9 @@ | @@ -143,12 +143,9 @@ | ||
143 | 下载 | 143 | 下载 |
144 | </a-button> | 144 | </a-button> |
145 | </template> | 145 | </template> |
146 | - | ||
147 | <span slot="action" slot-scope="text, record"> | 146 | <span slot="action" slot-scope="text, record"> |
148 | <a v-has="'inventoryChild:edit'" @click="handleEdit(record)">编辑</a> | 147 | <a v-has="'inventoryChild:edit'" @click="handleEdit(record)">编辑</a> |
149 | - | ||
150 | </span> | 148 | </span> |
151 | - | ||
152 | </a-table> | 149 | </a-table> |
153 | </div> | 150 | </div> |
154 | 151 |
ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue
@@ -3,7 +3,9 @@ | @@ -3,7 +3,9 @@ | ||
3 | <!-- 操作按钮区域 --> | 3 | <!-- 操作按钮区域 --> |
4 | <div class="table-operator" v-if="mainId"> | 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 | - <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')">导出</a-button> | 6 | + <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')" |
7 | + >导出</a-button | ||
8 | + > | ||
7 | <a-upload | 9 | <a-upload |
8 | v-has="'inventoryDetail:import'" | 10 | v-has="'inventoryDetail:import'" |
9 | name="file" | 11 | name="file" |
@@ -11,18 +13,20 @@ | @@ -11,18 +13,20 @@ | ||
11 | :multiple="false" | 13 | :multiple="false" |
12 | :headers="tokenHeader" | 14 | :headers="tokenHeader" |
13 | :action="importExcelUrl" | 15 | :action="importExcelUrl" |
14 | - @change="handleImportExcel"> | 16 | + @change="handleImportExcel" |
17 | + > | ||
15 | <a-button type="primary" icon="import">导入</a-button> | 18 | <a-button type="primary" icon="import">导入</a-button> |
16 | </a-upload> | 19 | </a-upload> |
17 | <a-dropdown v-if="selectedRowKeys.length > 0"> | 20 | <a-dropdown v-if="selectedRowKeys.length > 0"> |
18 | <a-menu slot="overlay" v-has="'inventoryDetail:deleteBatch'"> | 21 | <a-menu slot="overlay" v-has="'inventoryDetail:deleteBatch'"> |
19 | <a-menu-item key="1" @click="batchDel"> | 22 | <a-menu-item key="1" @click="batchDel"> |
20 | - <a-icon type="delete"/> | 23 | + <a-icon type="delete" /> |
21 | 删除 | 24 | 删除 |
22 | </a-menu-item> | 25 | </a-menu-item> |
23 | </a-menu> | 26 | </a-menu> |
24 | - <a-button style="margin-left: 8px"> 批量操作 | ||
25 | - <a-icon type="down"/> | 27 | + <a-button style="margin-left: 8px"> |
28 | + 批量操作 | ||
29 | + <a-icon type="down" /> | ||
26 | </a-button> | 30 | </a-button> |
27 | </a-dropdown> | 31 | </a-dropdown> |
28 | </div> | 32 | </div> |
@@ -30,8 +34,8 @@ | @@ -30,8 +34,8 @@ | ||
30 | <!-- table区域-begin --> | 34 | <!-- table区域-begin --> |
31 | <div> | 35 | <div> |
32 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 36 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
33 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | ||
34 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 37 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 |
38 | + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | ||
35 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 39 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
36 | </div> | 40 | </div> |
37 | 41 | ||
@@ -40,16 +44,16 @@ | @@ -40,16 +44,16 @@ | ||
40 | size="middle" | 44 | size="middle" |
41 | bordered | 45 | bordered |
42 | rowKey="id" | 46 | rowKey="id" |
43 | - :scroll="{x:true}" | 47 | + :scroll="{ x: true }" |
44 | :columns="columns" | 48 | :columns="columns" |
45 | :dataSource="dataSource" | 49 | :dataSource="dataSource" |
46 | :pagination="ipagination" | 50 | :pagination="ipagination" |
47 | :loading="loading" | 51 | :loading="loading" |
48 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | ||
49 | - @change="handleTableChange"> | ||
50 | - | 52 | + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" |
53 | + @change="handleTableChange" | ||
54 | + > | ||
51 | <span slot="companyCode" slot-scope="companyCode"> | 55 | <span slot="companyCode" slot-scope="companyCode"> |
52 | - <a-tag :key="companyCode" color=blue> | 56 | + <a-tag :key="companyCode" color="blue"> |
53 | {{ solutionCompany(companyCode) }} | 57 | {{ solutionCompany(companyCode) }} |
54 | </a-tag> | 58 | </a-tag> |
55 | </span> | 59 | </span> |
@@ -59,31 +63,27 @@ | @@ -59,31 +63,27 @@ | ||
59 | </template> | 63 | </template> |
60 | <template slot="imgSlot" slot-scope="text"> | 64 | <template slot="imgSlot" slot-scope="text"> |
61 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | 65 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
62 | - <img v-else :src="getImgView(text)" height="25px" alt="" | ||
63 | - style="max-width:80px;font-size: 12px;font-style: italic;"/> | 66 | + <img |
67 | + v-else | ||
68 | + :src="getImgView(text)" | ||
69 | + height="25px" | ||
70 | + alt="" | ||
71 | + style="max-width:80px;font-size: 12px;font-style: italic;" | ||
72 | + /> | ||
64 | </template> | 73 | </template> |
65 | <template slot="fileSlot" slot-scope="text"> | 74 | <template slot="fileSlot" slot-scope="text"> |
66 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | 75 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
67 | - <a-button | ||
68 | - v-else | ||
69 | - :ghost="true" | ||
70 | - type="primary" | ||
71 | - icon="download" | ||
72 | - size="small" | ||
73 | - @click="downloadFile(text)"> | 76 | + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> |
74 | 下载 | 77 | 下载 |
75 | </a-button> | 78 | </a-button> |
76 | </template> | 79 | </template> |
77 | 80 | ||
78 | <span slot="action" slot-scope="text, record"> | 81 | <span slot="action" slot-scope="text, record"> |
79 | - <a v-has="'inventoryDetail:edit'" @click="handleEdit(record)">编辑</a> | ||
80 | - <a-divider type="vertical"/> | ||
81 | - | 82 | + <a v-has="'inventoryDetail:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> |
82 | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | 83 | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
83 | <a v-has="'inventoryDetail:delete'">删除</a> | 84 | <a v-has="'inventoryDetail:delete'">删除</a> |
84 | </a-popconfirm> | 85 | </a-popconfirm> |
85 | </span> | 86 | </span> |
86 | - | ||
87 | </a-table> | 87 | </a-table> |
88 | </div> | 88 | </div> |
89 | 89 | ||
@@ -92,15 +92,14 @@ | @@ -92,15 +92,14 @@ | ||
92 | </template> | 92 | </template> |
93 | 93 | ||
94 | <script> | 94 | <script> |
95 | - | ||
96 | -import {JeecgListMixin} from '@/mixins/JeecgListMixin' | 95 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
97 | import InventoryDetailModal from './modules/InventoryDetailModal' | 96 | import InventoryDetailModal from './modules/InventoryDetailModal' |
98 | -import {getCompanyList} from '@/api/api' | 97 | +import { getCompanyList } from '@/api/api' |
99 | 98 | ||
100 | export default { | 99 | export default { |
101 | - name: "InventoryDetailList", | 100 | + name: 'InventoryDetailList', |
102 | mixins: [JeecgListMixin], | 101 | mixins: [JeecgListMixin], |
103 | - components: {InventoryDetailModal}, | 102 | + components: { InventoryDetailModal }, |
104 | props: { | 103 | props: { |
105 | mainId: { | 104 | mainId: { |
106 | type: String, | 105 | type: String, |
@@ -116,7 +115,7 @@ export default { | @@ -116,7 +115,7 @@ export default { | ||
116 | this.clearList() | 115 | this.clearList() |
117 | } else { | 116 | } else { |
118 | this.queryParam['inventoryHeaderId'] = val | 117 | this.queryParam['inventoryHeaderId'] = val |
119 | - this.loadData(1); | 118 | + this.loadData(1) |
120 | } | 119 | } |
121 | } | 120 | } |
122 | } | 121 | } |
@@ -130,15 +129,15 @@ export default { | @@ -130,15 +129,15 @@ export default { | ||
130 | columns: [ | 129 | columns: [ |
131 | { | 130 | { |
132 | title: '库存详情ID', | 131 | title: '库存详情ID', |
133 | - align: "center", | 132 | + align: 'center', |
134 | dataIndex: 'id' | 133 | dataIndex: 'id' |
135 | }, | 134 | }, |
136 | { | 135 | { |
137 | title: '货主', | 136 | title: '货主', |
138 | - align: "center", | 137 | + align: 'center', |
139 | dataIndex: 'companyCode', | 138 | dataIndex: 'companyCode', |
140 | key: 'companyCode', | 139 | key: 'companyCode', |
141 | - scopedSlots: {customRender: 'companyCode'} | 140 | + scopedSlots: { customRender: 'companyCode' } |
142 | }, | 141 | }, |
143 | // { | 142 | // { |
144 | // title: '库区', | 143 | // title: '库区', |
@@ -147,130 +146,138 @@ export default { | @@ -147,130 +146,138 @@ export default { | ||
147 | // }, | 146 | // }, |
148 | { | 147 | { |
149 | title: '容器编码', | 148 | title: '容器编码', |
150 | - align: "center", | 149 | + align: 'center', |
151 | dataIndex: 'containerCode' | 150 | dataIndex: 'containerCode' |
152 | }, | 151 | }, |
153 | { | 152 | { |
154 | title: '库位编码', | 153 | title: '库位编码', |
155 | - align: "center", | 154 | + align: 'center', |
156 | dataIndex: 'locationCode' | 155 | dataIndex: 'locationCode' |
157 | }, | 156 | }, |
158 | { | 157 | { |
159 | title: '物料编码', | 158 | title: '物料编码', |
160 | - align: "center", | 159 | + align: 'center', |
161 | dataIndex: 'materialCode' | 160 | dataIndex: 'materialCode' |
162 | }, | 161 | }, |
163 | { | 162 | { |
164 | title: '物料名称', | 163 | title: '物料名称', |
165 | - align: "center", | 164 | + align: 'center', |
166 | dataIndex: 'materialName' | 165 | dataIndex: 'materialName' |
167 | }, | 166 | }, |
168 | { | 167 | { |
169 | title: '物料规格', | 168 | title: '物料规格', |
170 | - align: "center", | 169 | + align: 'center', |
171 | dataIndex: 'materialSpec' | 170 | dataIndex: 'materialSpec' |
172 | }, | 171 | }, |
173 | { | 172 | { |
174 | title: '物料单位', | 173 | title: '物料单位', |
175 | - align: "center", | 174 | + align: 'center', |
176 | dataIndex: 'materialUnit' | 175 | dataIndex: 'materialUnit' |
177 | }, | 176 | }, |
178 | { | 177 | { |
179 | title: '数量', | 178 | title: '数量', |
180 | - align: "center", | 179 | + align: 'center', |
181 | dataIndex: 'qty' | 180 | dataIndex: 'qty' |
182 | }, | 181 | }, |
183 | { | 182 | { |
184 | title: '任务锁定数量', | 183 | title: '任务锁定数量', |
185 | - align: "center", | 184 | + align: 'center', |
186 | dataIndex: 'taskQty' | 185 | dataIndex: 'taskQty' |
187 | }, | 186 | }, |
188 | { | 187 | { |
188 | + title: '托盘填充度', | ||
189 | + align: 'center', | ||
190 | + dataIndex: 'fillDensity', | ||
191 | + customRender: text => { | ||
192 | + return text == null ? '' : text + '%' | ||
193 | + } | ||
194 | + }, | ||
195 | + { | ||
189 | title: '库存状态', | 196 | title: '库存状态', |
190 | - align: "center", | ||
191 | - dataIndex: 'inventoryStatus_dictText', | 197 | + align: 'center', |
198 | + dataIndex: 'inventoryStatus_dictText' | ||
192 | }, | 199 | }, |
193 | { | 200 | { |
194 | title: '批次', | 201 | title: '批次', |
195 | - align: "center", | 202 | + align: 'center', |
196 | dataIndex: 'batch' | 203 | dataIndex: 'batch' |
197 | }, | 204 | }, |
198 | - { | ||
199 | - title: '唯一号', | ||
200 | - align: "center", | ||
201 | - dataIndex: 'uniqueCode' | ||
202 | - }, | 205 | + // { |
206 | + // title: '唯一号', | ||
207 | + // align: "center", | ||
208 | + // dataIndex: 'uniqueCode' | ||
209 | + // }, | ||
203 | { | 210 | { |
204 | title: '入库日期', | 211 | title: '入库日期', |
205 | - align: "center", | 212 | + align: 'center', |
206 | dataIndex: 'receiptDate' | 213 | dataIndex: 'receiptDate' |
207 | }, | 214 | }, |
208 | { | 215 | { |
209 | title: '库龄(天)', | 216 | title: '库龄(天)', |
210 | - align: "center", | 217 | + align: 'center', |
211 | dataIndex: 'inventoryAge' | 218 | dataIndex: 'inventoryAge' |
212 | }, | 219 | }, |
213 | { | 220 | { |
214 | title: '创建人', | 221 | title: '创建人', |
215 | - align: "center", | 222 | + align: 'center', |
216 | dataIndex: 'createBy' | 223 | dataIndex: 'createBy' |
217 | }, | 224 | }, |
218 | { | 225 | { |
219 | title: '创建日期', | 226 | title: '创建日期', |
220 | - align: "center", | 227 | + align: 'center', |
221 | dataIndex: 'createTime' | 228 | dataIndex: 'createTime' |
222 | }, | 229 | }, |
223 | { | 230 | { |
224 | title: '更新人', | 231 | title: '更新人', |
225 | - align: "center", | 232 | + align: 'center', |
226 | dataIndex: 'updateBy' | 233 | dataIndex: 'updateBy' |
227 | }, | 234 | }, |
228 | { | 235 | { |
229 | title: '更新日期', | 236 | title: '更新日期', |
230 | - align: "center", | 237 | + align: 'center', |
231 | dataIndex: 'updateTime' | 238 | dataIndex: 'updateTime' |
232 | }, | 239 | }, |
233 | { | 240 | { |
234 | title: '操作', | 241 | title: '操作', |
235 | dataIndex: 'action', | 242 | dataIndex: 'action', |
236 | - align: "center", | ||
237 | - fixed: "right", | 243 | + align: 'center', |
244 | + fixed: 'right', | ||
238 | width: 147, | 245 | width: 147, |
239 | - scopedSlots: {customRender: 'action'}, | 246 | + scopedSlots: { customRender: 'action' } |
240 | } | 247 | } |
241 | ], | 248 | ], |
242 | url: { | 249 | url: { |
243 | - list: "/inventory/inventoryHeader/listInventoryDetailByMainId", | ||
244 | - delete: "/inventory/inventoryHeader/deleteInventoryDetail", | ||
245 | - deleteBatch: "/inventory/inventoryHeader/deleteBatchInventoryDetail", | ||
246 | - exportXlsUrl: "/inventory/inventoryHeader/exportInventoryDetail", | ||
247 | - importUrl: "/inventory/inventoryHeader/importInventoryDetail", | 250 | + list: '/inventory/inventoryHeader/listInventoryDetailByMainId', |
251 | + delete: '/inventory/inventoryHeader/deleteInventoryDetail', | ||
252 | + deleteBatch: '/inventory/inventoryHeader/deleteBatchInventoryDetail', | ||
253 | + exportXlsUrl: '/inventory/inventoryHeader/exportInventoryDetail', | ||
254 | + importUrl: '/inventory/inventoryHeader/importInventoryDetail' | ||
248 | }, | 255 | }, |
249 | dictOptions: { | 256 | dictOptions: { |
250 | - containerStatus: [], | 257 | + containerStatus: [] |
251 | } | 258 | } |
252 | } | 259 | } |
253 | }, | 260 | }, |
254 | created() { | 261 | created() { |
255 | - this.loadFrom(); | 262 | + this.loadFrom() |
256 | }, | 263 | }, |
257 | computed: { | 264 | computed: { |
258 | importExcelUrl() { | 265 | importExcelUrl() { |
259 | - return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; | 266 | + return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}` |
260 | } | 267 | } |
261 | }, | 268 | }, |
262 | methods: { | 269 | methods: { |
263 | loadFrom() { | 270 | loadFrom() { |
264 | - getCompanyList().then((res) => { | 271 | + getCompanyList().then(res => { |
265 | if (res.success) { | 272 | if (res.success) { |
266 | this.companyList = res.result | 273 | this.companyList = res.result |
267 | } | 274 | } |
268 | - }); | 275 | + }) |
269 | }, | 276 | }, |
270 | solutionCompany(value) { | 277 | solutionCompany(value) { |
271 | var actions = [] | 278 | var actions = [] |
272 | - Object.keys(this.companyList).some((key) => { | ||
273 | - if (this.companyList[key].code == ('' + value)) { | 279 | + Object.keys(this.companyList).some(key => { |
280 | + if (this.companyList[key].code == '' + value) { | ||
274 | actions.push(this.companyList[key].name) | 281 | actions.push(this.companyList[key].name) |
275 | return true | 282 | return true |
276 | } | 283 | } |
@@ -282,10 +289,9 @@ export default { | @@ -282,10 +289,9 @@ export default { | ||
282 | this.selectedRowKeys = [] | 289 | this.selectedRowKeys = [] |
283 | this.ipagination.current = 1 | 290 | this.ipagination.current = 1 |
284 | } | 291 | } |
285 | - | ||
286 | } | 292 | } |
287 | } | 293 | } |
288 | </script> | 294 | </script> |
289 | <style scoped> | 295 | <style scoped> |
290 | -@import '~@assets/less/common.less' | 296 | +@import '~@assets/less/common.less'; |
291 | </style> | 297 | </style> |
ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue
@@ -73,7 +73,7 @@ | @@ -73,7 +73,7 @@ | ||
73 | <div> | 73 | <div> |
74 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> | 74 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
75 | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> | 75 | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> |
76 | -<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> | 76 | +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> |
77 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> | 77 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> |
78 | <!-- </div>--> | 78 | <!-- </div>--> |
79 | 79 |
ant-design-vue-jeecg/src/views/system/inventory/InventoryMaterialSummaryList.vue
@@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
53 | <!-- table区域-begin --> | 53 | <!-- table区域-begin --> |
54 | <div> | 54 | <div> |
55 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> | 55 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
56 | -<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> | 56 | +<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> |
57 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> | 57 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> |
58 | <!-- </div>--> | 58 | <!-- </div>--> |
59 | 59 | ||
@@ -113,7 +113,7 @@ | @@ -113,7 +113,7 @@ | ||
113 | </a-tab-pane> | 113 | </a-tab-pane> |
114 | </a-tabs> | 114 | </a-tabs> |
115 | 115 | ||
116 | - <inventory-material-summary-modal ref="modalForm" @ok="modalFormOk"></inventory-material-summary-modal> | 116 | + <!-- <inventory-material-summary-modal ref="modalForm" @ok="modalFormOk"></inventory-material-summary-modal> --> |
117 | </a-card> | 117 | </a-card> |
118 | </template> | 118 | </template> |
119 | 119 | ||
@@ -213,8 +213,8 @@ | @@ -213,8 +213,8 @@ | ||
213 | methods: { | 213 | methods: { |
214 | solutionZoneCode(value) { | 214 | solutionZoneCode(value) { |
215 | var actions = [] | 215 | var actions = [] |
216 | - Object.keys(this.zoneList).some((key) => { | ||
217 | - if (this.zoneList[key].code == ('' + value)) { | 216 | + Object.keys(this.zoneList).some(key => { |
217 | + if (this.zoneList[key].code == '' + value) { | ||
218 | actions.push(this.zoneList[key].name) | 218 | actions.push(this.zoneList[key].name) |
219 | return true | 219 | return true |
220 | } | 220 | } |
@@ -255,9 +255,7 @@ | @@ -255,9 +255,7 @@ | ||
255 | }, | 255 | }, |
256 | initDictConfig(){ | 256 | initDictConfig(){ |
257 | }, | 257 | }, |
258 | - | ||
259 | solutionCompany(value) { | 258 | solutionCompany(value) { |
260 | - debugger | ||
261 | var actions = [] | 259 | var actions = [] |
262 | Object.keys(this.companyList).some((key) => { | 260 | Object.keys(this.companyList).some((key) => { |
263 | if (this.companyList[key].code == ('' + value)) { | 261 | if (this.companyList[key].code == ('' + value)) { |
ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue
@@ -10,7 +10,6 @@ | @@ -10,7 +10,6 @@ | ||
10 | show-search | 10 | show-search |
11 | placeholder="请选择货主" | 11 | placeholder="请选择货主" |
12 | option-filter-prop="children" | 12 | option-filter-prop="children" |
13 | - | ||
14 | v-model="queryParam.companyCode"> | 13 | v-model="queryParam.companyCode"> |
15 | <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{ | 14 | <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{ |
16 | item.name | 15 | item.name |
@@ -121,7 +120,7 @@ | @@ -121,7 +120,7 @@ | ||
121 | <div> | 120 | <div> |
122 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 121 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
123 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 122 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
124 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 123 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
125 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 124 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
126 | </div> | 125 | </div> |
127 | 126 | ||
@@ -361,7 +360,7 @@ export default { | @@ -361,7 +360,7 @@ export default { | ||
361 | fieldList.push({type: 'string', value: 'materialName', text: '物料名称', dictCode: ''}) | 360 | fieldList.push({type: 'string', value: 'materialName', text: '物料名称', dictCode: ''}) |
362 | fieldList.push({type: 'string', value: 'materialSpec', text: '物料规格', dictCode: ''}) | 361 | fieldList.push({type: 'string', value: 'materialSpec', text: '物料规格', dictCode: ''}) |
363 | fieldList.push({type: 'string', value: 'materialUnit', text: '物料单位', dictCode: ''}) | 362 | fieldList.push({type: 'string', value: 'materialUnit', text: '物料单位', dictCode: ''}) |
364 | - fieldList.push({type: 'string', value: 'inventoryStatus', text: '库存状态', dictCode: ''}) | 363 | + fieldList.push({type: 'string', value: 'inventoryStatus', text: '库存状态', dictCode: 'inventory_status'}) |
365 | fieldList.push({type: 'BigDecimal', value: 'qty', text: '数量', dictCode: ''}) | 364 | fieldList.push({type: 'BigDecimal', value: 'qty', text: '数量', dictCode: ''}) |
366 | fieldList.push({type: 'string', value: 'batch', text: '批次', dictCode: ''}) | 365 | fieldList.push({type: 'string', value: 'batch', text: '批次', dictCode: ''}) |
367 | fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) | 366 | fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) |
ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue
@@ -47,7 +47,11 @@ | @@ -47,7 +47,11 @@ | ||
47 | </a-col> | 47 | </a-col> |
48 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 48 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
49 | <a-form-item label="库存状态"> | 49 | <a-form-item label="库存状态"> |
50 | - <j-dict-select-tag placeholder="请选择库存状态" v-model="queryParam.inventoryStatus" dictCode="inventory_status"/> | 50 | + <j-dict-select-tag |
51 | + placeholder="请选择库存状态" | ||
52 | + v-model="queryParam.inventoryStatus" | ||
53 | + dictCode="inventory_status" | ||
54 | + /> | ||
51 | </a-form-item> | 55 | </a-form-item> |
52 | </a-col> | 56 | </a-col> |
53 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 57 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
@@ -55,14 +59,19 @@ | @@ -55,14 +59,19 @@ | ||
55 | <a-input placeholder="请输入批次" v-model="queryParam.batch"></a-input> | 59 | <a-input placeholder="请输入批次" v-model="queryParam.batch"></a-input> |
56 | </a-form-item> | 60 | </a-form-item> |
57 | </a-col> | 61 | </a-col> |
58 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 62 | + <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
59 | <a-form-item label="唯一号"> | 63 | <a-form-item label="唯一号"> |
60 | <a-input placeholder="请输入唯一号" v-model="queryParam.uniqueCode"></a-input> | 64 | <a-input placeholder="请输入唯一号" v-model="queryParam.uniqueCode"></a-input> |
61 | </a-form-item> | 65 | </a-form-item> |
62 | - </a-col> | 66 | + </a-col> --> |
63 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 67 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
64 | <a-form-item label="入库日期"> | 68 | <a-form-item label="入库日期"> |
65 | - <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择入库日期" v-model="queryParam.receiptDate"></j-date> | 69 | + <j-date |
70 | + :show-time="true" | ||
71 | + date-format="YYYY-MM-DD HH:mm:ss" | ||
72 | + placeholder="请选择入库日期" | ||
73 | + v-model="queryParam.receiptDate" | ||
74 | + ></j-date> | ||
66 | </a-form-item> | 75 | </a-form-item> |
67 | </a-col> | 76 | </a-col> |
68 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 77 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
@@ -77,7 +86,7 @@ | @@ -77,7 +86,7 @@ | ||
77 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | 86 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
78 | <a @click="handleToggleSearch" style="margin-left: 8px"> | 87 | <a @click="handleToggleSearch" style="margin-left: 8px"> |
79 | {{ toggleSearchStatus ? '收起' : '展开' }} | 88 | {{ toggleSearchStatus ? '收起' : '展开' }} |
80 | - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | 89 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> |
81 | </a> | 90 | </a> |
82 | </span> | 91 | </span> |
83 | </a-col> | 92 | </a-col> |
@@ -89,70 +98,81 @@ | @@ -89,70 +98,81 @@ | ||
89 | <!-- 操作按钮区域 --> | 98 | <!-- 操作按钮区域 --> |
90 | <div class="table-operator"> | 99 | <div class="table-operator"> |
91 | <a-button v-has="'inventoryDetail:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> | 100 | <a-button v-has="'inventoryDetail:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> |
92 | - <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')">导出</a-button> | ||
93 | - <a-upload v-has="'inventoryDetail:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | 101 | + <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')" |
102 | + >导出</a-button | ||
103 | + > | ||
104 | + <a-upload | ||
105 | + v-has="'inventoryDetail:import'" | ||
106 | + name="file" | ||
107 | + :showUploadList="false" | ||
108 | + :multiple="false" | ||
109 | + :headers="tokenHeader" | ||
110 | + :action="importExcelUrl" | ||
111 | + @change="handleImportExcel" | ||
112 | + > | ||
94 | <a-button type="primary" icon="import">导入</a-button> | 113 | <a-button type="primary" icon="import">导入</a-button> |
95 | </a-upload> | 114 | </a-upload> |
96 | <!-- 高级查询区域 --> | 115 | <!-- 高级查询区域 --> |
97 | - <j-super-query :fieldList="superFieldList" v-has="'inventoryDetail:superSearch'" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> | ||
98 | -<!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> | ||
99 | -<!-- <a-menu slot="overlay">--> | ||
100 | -<!-- <a-menu-item v-has="'inventoryDetail:delete'" key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>--> | ||
101 | -<!-- </a-menu>--> | ||
102 | -<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>--> | ||
103 | -<!-- </a-dropdown>--> | 116 | + <j-super-query |
117 | + :fieldList="superFieldList" | ||
118 | + v-has="'inventoryDetail:superSearch'" | ||
119 | + ref="superQueryModal" | ||
120 | + @handleSuperQuery="handleSuperQuery" | ||
121 | + ></j-super-query> | ||
122 | + <!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> | ||
123 | + <!-- <a-menu slot="overlay">--> | ||
124 | + <!-- <a-menu-item v-has="'inventoryDetail:delete'" key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>--> | ||
125 | + <!-- </a-menu>--> | ||
126 | + <!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>--> | ||
127 | + <!-- </a-dropdown>--> | ||
104 | </div> | 128 | </div> |
105 | 129 | ||
106 | <!-- table区域-begin --> | 130 | <!-- table区域-begin --> |
107 | <div> | 131 | <div> |
108 | -<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> | ||
109 | -<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> | ||
110 | -<!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> | ||
111 | -<!-- </div>--> | 132 | + <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
133 | + <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> | ||
134 | + <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> | ||
135 | + <!-- </div>--> | ||
112 | 136 | ||
113 | <a-table | 137 | <a-table |
114 | ref="table" | 138 | ref="table" |
115 | size="middle" | 139 | size="middle" |
116 | - :scroll="{x:true}" | 140 | + :scroll="{ x: true }" |
117 | bordered | 141 | bordered |
118 | rowKey="id" | 142 | rowKey="id" |
119 | :columns="columns" | 143 | :columns="columns" |
120 | :dataSource="dataSource" | 144 | :dataSource="dataSource" |
121 | :pagination="ipagination" | 145 | :pagination="ipagination" |
122 | :loading="loading" | 146 | :loading="loading" |
123 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | 147 | + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" |
124 | class="j-table-force-nowrap" | 148 | class="j-table-force-nowrap" |
125 | - @change="handleTableChange"> | ||
126 | - | 149 | + @change="handleTableChange" |
150 | + > | ||
127 | <template slot="htmlSlot" slot-scope="text"> | 151 | <template slot="htmlSlot" slot-scope="text"> |
128 | <div v-html="text"></div> | 152 | <div v-html="text"></div> |
129 | </template> | 153 | </template> |
130 | <template slot="imgSlot" slot-scope="text"> | 154 | <template slot="imgSlot" slot-scope="text"> |
131 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | 155 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
132 | - <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | 156 | + <img |
157 | + v-else | ||
158 | + :src="getImgView(text)" | ||
159 | + height="25px" | ||
160 | + alt="" | ||
161 | + style="max-width:80px;font-size: 12px;font-style: italic;" | ||
162 | + /> | ||
133 | </template> | 163 | </template> |
134 | <template slot="fileSlot" slot-scope="text"> | 164 | <template slot="fileSlot" slot-scope="text"> |
135 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | 165 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
136 | - <a-button | ||
137 | - v-else | ||
138 | - :ghost="true" | ||
139 | - type="primary" | ||
140 | - icon="download" | ||
141 | - size="small" | ||
142 | - @click="downloadFile(text)"> | 166 | + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> |
143 | 下载 | 167 | 下载 |
144 | </a-button> | 168 | </a-button> |
145 | </template> | 169 | </template> |
146 | - | ||
147 | <span slot="action" slot-scope="text, record"> | 170 | <span slot="action" slot-scope="text, record"> |
148 | - <a v-has="'inventoryDetail:edit'"@click="handleEdit(record)">编辑</a> | ||
149 | - | ||
150 | - <a-divider type="vertical" /> | 171 | + <a v-has="'inventoryDetail:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> |
151 | <a-popconfirm v-has="'inventoryDetail:delete'" title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | 172 | <a-popconfirm v-has="'inventoryDetail:delete'" title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
152 | <a>删除</a> | 173 | <a>删除</a> |
153 | </a-popconfirm> | 174 | </a-popconfirm> |
154 | </span> | 175 | </span> |
155 | - | ||
156 | </a-table> | 176 | </a-table> |
157 | </div> | 177 | </div> |
158 | 178 | ||
@@ -161,187 +181,192 @@ | @@ -161,187 +181,192 @@ | ||
161 | </template> | 181 | </template> |
162 | 182 | ||
163 | <script> | 183 | <script> |
184 | +import '@/assets/less/TableExpand.less' | ||
185 | +import { mixinDevice } from '@/utils/mixin' | ||
186 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
187 | +import SimpleInventoryDetailModal from './modules/SimpleInventoryDetailModal' | ||
188 | +import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' | ||
164 | 189 | ||
165 | - import '@/assets/less/TableExpand.less' | ||
166 | - import { mixinDevice } from '@/utils/mixin' | ||
167 | - import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
168 | - import SimpleInventoryDetailModal from './modules/SimpleInventoryDetailModal' | ||
169 | - import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | ||
170 | - | ||
171 | - export default { | ||
172 | - name: 'InventoryDetailList', | ||
173 | - mixins:[JeecgListMixin, mixinDevice], | ||
174 | - components: { | ||
175 | - SimpleInventoryDetailModal | ||
176 | - }, | ||
177 | - data () { | ||
178 | - return { | ||
179 | - description: '库存详情管理页面', | ||
180 | - // 表头 | ||
181 | - columns: [ | ||
182 | - { | ||
183 | - title: '#', | ||
184 | - dataIndex: '', | ||
185 | - key:'rowIndex', | ||
186 | - width:60, | ||
187 | - align:"center", | ||
188 | - customRender:function (t,r,index) { | ||
189 | - return parseInt(index)+1; | ||
190 | - } | ||
191 | - }, | ||
192 | - { | ||
193 | - title:'货主', | ||
194 | - align:"center", | ||
195 | - dataIndex: 'companyCode' | ||
196 | - }, | ||
197 | - { | ||
198 | - title:'库区', | ||
199 | - align:"center", | ||
200 | - dataIndex: 'zoneCode' | ||
201 | - }, | ||
202 | - { | ||
203 | - title:'容器编码', | ||
204 | - align:"center", | ||
205 | - dataIndex: 'containerCode' | ||
206 | - }, | ||
207 | - { | ||
208 | - title:'库位编码', | ||
209 | - align:"center", | ||
210 | - dataIndex: 'locationCode' | ||
211 | - }, | ||
212 | - { | ||
213 | - title:'物料编码', | ||
214 | - align:"center", | ||
215 | - dataIndex: 'materialCode' | ||
216 | - }, | ||
217 | - { | ||
218 | - title:'物料名称', | ||
219 | - align:"center", | ||
220 | - dataIndex: 'materialName' | ||
221 | - }, | ||
222 | - { | ||
223 | - title:'物料规格', | ||
224 | - align:"center", | ||
225 | - dataIndex: 'materialSpec' | ||
226 | - }, | ||
227 | - { | ||
228 | - title:'物料单位', | ||
229 | - align:"center", | ||
230 | - dataIndex: 'materialUnit' | ||
231 | - }, | ||
232 | - { | ||
233 | - title:'数量', | ||
234 | - align:"center", | ||
235 | - dataIndex: 'qty' | ||
236 | - }, | ||
237 | - { | ||
238 | - title:'任务锁定数量', | ||
239 | - align:"center", | ||
240 | - dataIndex: 'taskQty' | ||
241 | - }, | ||
242 | - { | ||
243 | - title:'库存状态', | ||
244 | - align:"center", | ||
245 | - dataIndex: 'inventoryStatus_dictText' | ||
246 | - }, | ||
247 | - { | ||
248 | - title:'批次', | ||
249 | - align:"center", | ||
250 | - dataIndex: 'batch' | ||
251 | - }, | ||
252 | - { | ||
253 | - title:'唯一号', | ||
254 | - align:"center", | ||
255 | - dataIndex: 'uniqueCode' | ||
256 | - }, | ||
257 | - { | ||
258 | - title:'入库日期', | ||
259 | - align:"center", | ||
260 | - dataIndex: 'receiptDate' | ||
261 | - }, | ||
262 | - { | ||
263 | - title:'库龄(天)', | ||
264 | - align:"center", | ||
265 | - dataIndex: 'inventoryAge' | ||
266 | - }, | ||
267 | - { | ||
268 | - title:'创建人', | ||
269 | - align:"center", | ||
270 | - dataIndex: 'createBy' | ||
271 | - }, | ||
272 | - { | ||
273 | - title:'创建日期', | ||
274 | - align:"center", | ||
275 | - dataIndex: 'createTime' | ||
276 | - }, | ||
277 | - { | ||
278 | - title:'更新人', | ||
279 | - align:"center", | ||
280 | - dataIndex: 'updateBy' | ||
281 | - }, | ||
282 | - { | ||
283 | - title:'更新日期', | ||
284 | - align:"center", | ||
285 | - dataIndex: 'updateTime' | ||
286 | - }, | ||
287 | - { | ||
288 | - title: '操作', | ||
289 | - dataIndex: 'action', | ||
290 | - align:"center", | ||
291 | - fixed:"right", | ||
292 | - width:147, | ||
293 | - scopedSlots: { customRender: 'action' } | 190 | +export default { |
191 | + name: 'InventoryDetailList', | ||
192 | + mixins: [JeecgListMixin, mixinDevice], | ||
193 | + components: { | ||
194 | + SimpleInventoryDetailModal | ||
195 | + }, | ||
196 | + data() { | ||
197 | + return { | ||
198 | + description: '库存详情管理页面', | ||
199 | + // 表头 | ||
200 | + columns: [ | ||
201 | + { | ||
202 | + title: '#', | ||
203 | + dataIndex: '', | ||
204 | + key: 'rowIndex', | ||
205 | + width: 60, | ||
206 | + align: 'center', | ||
207 | + customRender: function(t, r, index) { | ||
208 | + return parseInt(index) + 1 | ||
294 | } | 209 | } |
295 | - ], | ||
296 | - url: { | ||
297 | - list: "/inventory/inventoryDetail/list", | ||
298 | - delete: "/inventory/inventoryDetail/delete", | ||
299 | - deleteBatch: "/inventory/inventoryDetail/deleteBatch", | ||
300 | - exportXlsUrl: "/inventory/inventoryDetail/exportXls", | ||
301 | - importExcelUrl: "inventory/inventoryDetail/importExcel", | ||
302 | - | ||
303 | }, | 210 | }, |
304 | - dictOptions:{}, | ||
305 | - superFieldList:[], | ||
306 | - } | ||
307 | - }, | ||
308 | - created() { | ||
309 | - this.getSuperFieldList(); | ||
310 | - }, | ||
311 | - computed: { | ||
312 | - importExcelUrl: function(){ | ||
313 | - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
314 | - }, | ||
315 | - }, | ||
316 | - methods: { | ||
317 | - initDictConfig(){ | 211 | + { |
212 | + title: '货主', | ||
213 | + align: 'center', | ||
214 | + dataIndex: 'companyCode' | ||
215 | + }, | ||
216 | + { | ||
217 | + title: '库区', | ||
218 | + align: 'center', | ||
219 | + dataIndex: 'zoneCode' | ||
220 | + }, | ||
221 | + { | ||
222 | + title: '容器编码', | ||
223 | + align: 'center', | ||
224 | + dataIndex: 'containerCode' | ||
225 | + }, | ||
226 | + { | ||
227 | + title: '库位编码', | ||
228 | + align: 'center', | ||
229 | + dataIndex: 'locationCode' | ||
230 | + }, | ||
231 | + { | ||
232 | + title: '物料编码', | ||
233 | + align: 'center', | ||
234 | + dataIndex: 'materialCode' | ||
235 | + }, | ||
236 | + { | ||
237 | + title: '物料名称', | ||
238 | + align: 'center', | ||
239 | + dataIndex: 'materialName' | ||
240 | + }, | ||
241 | + { | ||
242 | + title: '物料规格', | ||
243 | + align: 'center', | ||
244 | + dataIndex: 'materialSpec' | ||
245 | + }, | ||
246 | + { | ||
247 | + title: '物料单位', | ||
248 | + align: 'center', | ||
249 | + dataIndex: 'materialUnit' | ||
250 | + }, | ||
251 | + { | ||
252 | + title: '数量', | ||
253 | + align: 'center', | ||
254 | + dataIndex: 'qty' | ||
255 | + }, | ||
256 | + { | ||
257 | + title: '任务锁定数量', | ||
258 | + align: 'center', | ||
259 | + dataIndex: 'taskQty' | ||
260 | + }, | ||
261 | + { | ||
262 | + title: '托盘填充度', | ||
263 | + align: 'center', | ||
264 | + dataIndex: 'fillDensity', | ||
265 | + customRender: text => { | ||
266 | + return text == null ? '' : text + '%' | ||
267 | + } | ||
268 | + }, | ||
269 | + { | ||
270 | + title: '库存状态', | ||
271 | + align: 'center', | ||
272 | + dataIndex: 'inventoryStatus_dictText' | ||
273 | + }, | ||
274 | + { | ||
275 | + title: '批次', | ||
276 | + align: 'center', | ||
277 | + dataIndex: 'batch' | ||
278 | + }, | ||
279 | + // { | ||
280 | + // title:'唯一号', | ||
281 | + // align:"center", | ||
282 | + // dataIndex: 'uniqueCode' | ||
283 | + // }, | ||
284 | + { | ||
285 | + title: '入库日期', | ||
286 | + align: 'center', | ||
287 | + dataIndex: 'receiptDate' | ||
288 | + }, | ||
289 | + { | ||
290 | + title: '库龄(天)', | ||
291 | + align: 'center', | ||
292 | + dataIndex: 'inventoryAge' | ||
293 | + }, | ||
294 | + { | ||
295 | + title: '创建人', | ||
296 | + align: 'center', | ||
297 | + dataIndex: 'createBy' | ||
298 | + }, | ||
299 | + { | ||
300 | + title: '创建日期', | ||
301 | + align: 'center', | ||
302 | + dataIndex: 'createTime' | ||
303 | + }, | ||
304 | + { | ||
305 | + title: '更新人', | ||
306 | + align: 'center', | ||
307 | + dataIndex: 'updateBy' | ||
308 | + }, | ||
309 | + { | ||
310 | + title: '更新日期', | ||
311 | + align: 'center', | ||
312 | + dataIndex: 'updateTime' | ||
313 | + }, | ||
314 | + { | ||
315 | + title: '操作', | ||
316 | + dataIndex: 'action', | ||
317 | + align: 'center', | ||
318 | + fixed: 'right', | ||
319 | + width: 147, | ||
320 | + scopedSlots: { customRender: 'action' } | ||
321 | + } | ||
322 | + ], | ||
323 | + url: { | ||
324 | + list: '/inventory/inventoryDetail/list', | ||
325 | + delete: '/inventory/inventoryDetail/delete', | ||
326 | + deleteBatch: '/inventory/inventoryDetail/deleteBatch', | ||
327 | + exportXlsUrl: '/inventory/inventoryDetail/exportXls', | ||
328 | + importExcelUrl: 'inventory/inventoryDetail/importExcel' | ||
318 | }, | 329 | }, |
319 | - getSuperFieldList(){ | ||
320 | - let fieldList=[]; | ||
321 | - fieldList.push({type:'string',value:'companyCode',text:'货主',dictCode:''}) | ||
322 | - fieldList.push({type:'string',value:'zoneCode',text:'库区',dictCode:''}) | ||
323 | - fieldList.push({type:'string',value:'containerCode',text:'容器编码',dictCode:''}) | ||
324 | - fieldList.push({type:'string',value:'locationCode',text:'库位编码',dictCode:''}) | ||
325 | - fieldList.push({type:'string',value:'materialCode',text:'物料编码',dictCode:''}) | ||
326 | - fieldList.push({type:'string',value:'materialName',text:'物料名称',dictCode:''}) | ||
327 | - fieldList.push({type:'string',value:'materialSpec',text:'物料规格',dictCode:''}) | ||
328 | - fieldList.push({type:'string',value:'materialUnit',text:'物料单位',dictCode:''}) | ||
329 | - fieldList.push({type:'BigDecimal',value:'qty',text:'数量',dictCode:''}) | ||
330 | - fieldList.push({type:'BigDecimal',value:'taskQty',text:'任务锁定数量',dictCode:''}) | ||
331 | - fieldList.push({type:'string',value:'inventoryStatus',text:'库存状态',dictCode:'inventory_status'}) | ||
332 | - fieldList.push({type:'string',value:'batch',text:'批次',dictCode:''}) | ||
333 | - fieldList.push({type:'string',value:'uniqueCode',text:'唯一号',dictCode:''}) | ||
334 | - fieldList.push({type:'datetime',value:'receiptDate',text:'入库日期'}) | ||
335 | - fieldList.push({type:'int',value:'inventoryAge',text:'库龄(天)',dictCode:''}) | ||
336 | - fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''}) | ||
337 | - fieldList.push({type:'datetime',value:'createTime',text:'创建日期'}) | ||
338 | - fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''}) | ||
339 | - fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'}) | ||
340 | - this.superFieldList = fieldList | ||
341 | - } | 330 | + dictOptions: {}, |
331 | + superFieldList: [] | ||
332 | + } | ||
333 | + }, | ||
334 | + created() { | ||
335 | + this.getSuperFieldList() | ||
336 | + }, | ||
337 | + computed: { | ||
338 | + importExcelUrl: function() { | ||
339 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` | ||
340 | + } | ||
341 | + }, | ||
342 | + methods: { | ||
343 | + initDictConfig() {}, | ||
344 | + getSuperFieldList() { | ||
345 | + let fieldList = [] | ||
346 | + fieldList.push({ type: 'string', value: 'companyCode', text: '货主', dictCode: '' }) | ||
347 | + fieldList.push({ type: 'string', value: 'zoneCode', text: '库区', dictCode: '' }) | ||
348 | + fieldList.push({ type: 'string', value: 'containerCode', text: '容器编码', dictCode: '' }) | ||
349 | + fieldList.push({ type: 'string', value: 'locationCode', text: '库位编码', dictCode: '' }) | ||
350 | + fieldList.push({ type: 'string', value: 'materialCode', text: '物料编码', dictCode: '' }) | ||
351 | + fieldList.push({ type: 'string', value: 'materialName', text: '物料名称', dictCode: '' }) | ||
352 | + fieldList.push({ type: 'string', value: 'materialSpec', text: '物料规格', dictCode: '' }) | ||
353 | + fieldList.push({ type: 'string', value: 'materialUnit', text: '物料单位', dictCode: '' }) | ||
354 | + fieldList.push({ type: 'BigDecimal', value: 'qty', text: '数量', dictCode: '' }) | ||
355 | + fieldList.push({ type: 'BigDecimal', value: 'taskQty', text: '任务锁定数量', dictCode: '' }) | ||
356 | + fieldList.push({ type: 'string', value: 'inventoryStatus', text: '库存状态', dictCode: 'inventory_status' }) | ||
357 | + fieldList.push({ type: 'string', value: 'batch', text: '批次', dictCode: '' }) | ||
358 | + // fieldList.push({type:'string',value:'uniqueCode',text:'唯一号',dictCode:''}) | ||
359 | + fieldList.push({ type: 'datetime', value: 'receiptDate', text: '入库日期' }) | ||
360 | + fieldList.push({ type: 'int', value: 'inventoryAge', text: '库龄(天)', dictCode: '' }) | ||
361 | + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) | ||
362 | + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) | ||
363 | + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) | ||
364 | + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) | ||
365 | + this.superFieldList = fieldList | ||
342 | } | 366 | } |
343 | } | 367 | } |
368 | +} | ||
344 | </script> | 369 | </script> |
345 | <style scoped> | 370 | <style scoped> |
346 | - @import '~@assets/less/common.less'; | 371 | +@import '~@assets/less/common.less'; |
347 | </style> | 372 | </style> |
348 | \ No newline at end of file | 373 | \ No newline at end of file |
ant-design-vue-jeecg/src/views/system/inventory/subTables/InventoryDetailSubTable.vue
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | <div> | 30 | <div> |
31 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 31 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
32 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 32 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
33 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 33 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
34 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 34 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
35 | </div> | 35 | </div> |
36 | 36 |
ant-design-vue-jeecg/src/views/system/modules/DeptRoleInfo.vue
@@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
38 | <div> | 38 | <div> |
39 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 39 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
40 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600"> | 40 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600"> |
41 | - {{ selectedRowKeys.length }}</a>项 | 41 | + {{ selectedRowKeys.length }}</a> 项 |
42 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 42 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
43 | </div> | 43 | </div> |
44 | <a-table | 44 | <a-table |
ant-design-vue-jeecg/src/views/system/monitor/ApkInfoList.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.pkgname"></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.versioncode"></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 | + <a-input placeholder="请输入版本名称" v-model="queryParam.versionname"></a-input> | ||
21 | + </a-form-item> | ||
22 | + </a-col> | ||
23 | + </template> | ||
24 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
25 | + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | ||
26 | + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | ||
27 | + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | ||
28 | + <a @click="handleToggleSearch" style="margin-left: 8px"> | ||
29 | + {{ toggleSearchStatus ? '收起' : '展开' }} | ||
30 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | ||
31 | + </a> | ||
32 | + </span> | ||
33 | + </a-col> | ||
34 | + </a-row> | ||
35 | + </a-form> | ||
36 | + </div> | ||
37 | + <!-- 查询区域-END --> | ||
38 | + | ||
39 | + <!-- 操作按钮区域 --> | ||
40 | + <div class="table-operator"> | ||
41 | + <a-upload | ||
42 | + name="file" | ||
43 | + :multiple="false" | ||
44 | + :action="uploadAction" | ||
45 | + :headers="tokenHeader" | ||
46 | + :showUploadList="false" | ||
47 | + :beforeUpload="beforeUpload" | ||
48 | + @change="handleChange"> | ||
49 | + <a-button> | ||
50 | + <a-icon type="upload"/> | ||
51 | + 上传APK | ||
52 | + </a-button> | ||
53 | + </a-upload> | ||
54 | + <!--<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> | ||
55 | + <a-button type="primary" icon="download" @click="handleExportXls('apk_info')">导出</a-button> | ||
56 | + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | ||
57 | + <a-button type="primary" icon="import">导入</a-button> | ||
58 | + </a-upload> | ||
59 | + <!-- 高级查询区域 --> | ||
60 | + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> | ||
61 | + <a-dropdown v-if="selectedRowKeys.length > 0"> | ||
62 | + <a-menu slot="overlay"> | ||
63 | + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | ||
64 | + </a-menu> | ||
65 | + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | ||
66 | + </a-dropdown> | ||
67 | + </div> | ||
68 | + | ||
69 | + <!-- table区域-begin --> | ||
70 | + <div> | ||
71 | + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | ||
72 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | ||
73 | + <a style="margin-left: 24px" @click="onClearSelected">清空</a> | ||
74 | + </div> | ||
75 | + | ||
76 | + <a-table | ||
77 | + ref="table" | ||
78 | + size="middle" | ||
79 | + :scroll="{x:true}" | ||
80 | + bordered | ||
81 | + rowKey="id" | ||
82 | + :columns="columns" | ||
83 | + :dataSource="dataSource" | ||
84 | + :pagination="ipagination" | ||
85 | + :loading="loading" | ||
86 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | ||
87 | + class="j-table-force-nowrap" | ||
88 | + @change="handleTableChange"> | ||
89 | + | ||
90 | + <template slot="htmlSlot" slot-scope="text"> | ||
91 | + <div v-html="text"></div> | ||
92 | + </template> | ||
93 | + <template slot="imgSlot" slot-scope="text"> | ||
94 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | ||
95 | + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | ||
96 | + </template> | ||
97 | + <template slot="fileSlot" slot-scope="text"> | ||
98 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | ||
99 | + <a-button | ||
100 | + v-else | ||
101 | + :ghost="true" | ||
102 | + type="primary" | ||
103 | + icon="download" | ||
104 | + size="small" | ||
105 | + @click="downloadFile(text)"> | ||
106 | + 下载 | ||
107 | + </a-button> | ||
108 | + </template> | ||
109 | + | ||
110 | + <span slot="action" slot-scope="text, record"> | ||
111 | + <!--<a @click="handleEdit(record)">编辑</a>--> | ||
112 | +<a @click="handleDetail(record)">详情</a> | ||
113 | + <a-divider type="vertical" /> | ||
114 | + <a-dropdown> | ||
115 | + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | ||
116 | + <a-menu slot="overlay"> | ||
117 | + <a-menu-item> | ||
118 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | ||
119 | + <a>删除</a> | ||
120 | + </a-popconfirm> | ||
121 | + </a-menu-item> | ||
122 | + </a-menu> | ||
123 | + </a-dropdown> | ||
124 | + </span> | ||
125 | + | ||
126 | + </a-table> | ||
127 | + </div> | ||
128 | + | ||
129 | + <apk-info-modal ref="modalForm" @ok="modalFormOk"></apk-info-modal> | ||
130 | + </a-card> | ||
131 | +</template> | ||
132 | + | ||
133 | +<script> | ||
134 | + import {httpAction, getAction} from '@/api/manage' | ||
135 | + import '@/assets/less/TableExpand.less' | ||
136 | + import { mixinDevice } from '@/utils/mixin' | ||
137 | + import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
138 | + import ApkInfoModal from './modules/ApkInfoModal' | ||
139 | + | ||
140 | + export default { | ||
141 | + name: 'ApkInfoList', | ||
142 | + mixins:[JeecgListMixin, mixinDevice], | ||
143 | + components: { | ||
144 | + ApkInfoModal | ||
145 | + }, | ||
146 | + data () { | ||
147 | + return { | ||
148 | + description: 'apk_info管理页面', | ||
149 | + // 表头 | ||
150 | + columns: [ | ||
151 | + { | ||
152 | + title: '#', | ||
153 | + dataIndex: '', | ||
154 | + key:'rowIndex', | ||
155 | + width:60, | ||
156 | + align:"center", | ||
157 | + customRender:function (t,r,index) { | ||
158 | + return parseInt(index)+1; | ||
159 | + } | ||
160 | + }, | ||
161 | + { | ||
162 | + title:'应用名称', | ||
163 | + align:"center", | ||
164 | + dataIndex: 'pkgname' | ||
165 | + }, | ||
166 | + { | ||
167 | + title:'版本号', | ||
168 | + align:"center", | ||
169 | + dataIndex: 'versioncode' | ||
170 | + }, | ||
171 | + { | ||
172 | + title:'版本名称', | ||
173 | + align:"center", | ||
174 | + dataIndex: 'versionname' | ||
175 | + }, | ||
176 | + { | ||
177 | + title:'下载地址', | ||
178 | + align:"center", | ||
179 | + dataIndex: 'url', | ||
180 | + customRender: function (t, r, index) { | ||
181 | + return window._CONFIG['domianURL'] + t | ||
182 | + } | ||
183 | + }, | ||
184 | + { | ||
185 | + title:'md5校验码', | ||
186 | + align:"center", | ||
187 | + dataIndex: 'md5' | ||
188 | + }, | ||
189 | + { | ||
190 | + title: '操作', | ||
191 | + dataIndex: 'action', | ||
192 | + align:"center", | ||
193 | + fixed:"right", | ||
194 | + width:147, | ||
195 | + scopedSlots: { customRender: 'action' } | ||
196 | + } | ||
197 | + ], | ||
198 | + url: { | ||
199 | + list: "/monitor/apkinfo/list", | ||
200 | + delete: "/monitor/apkinfo/delete", | ||
201 | + deleteBatch: "/monitor/apkinfo/deleteBatch", | ||
202 | + exportXlsUrl: "/monitor/apkinfo/exportXls", | ||
203 | + importExcelUrl: "monitor/apkinfo/importExcel", | ||
204 | + upload: "/sys/common/upload", | ||
205 | + parse: "/monitor/apkinfo/parseApk" | ||
206 | + }, | ||
207 | + dictOptions:{}, | ||
208 | + superFieldList:[], | ||
209 | + } | ||
210 | + }, | ||
211 | + created() { | ||
212 | + this.getSuperFieldList(); | ||
213 | + }, | ||
214 | + computed: { | ||
215 | + uploadAction() { | ||
216 | + return window._CONFIG['domianURL'] + this.url.upload; | ||
217 | + }, | ||
218 | + importExcelUrl: function(){ | ||
219 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
220 | + }, | ||
221 | + }, | ||
222 | + methods: { | ||
223 | + beforeUpload(file) { | ||
224 | + var fileType = file.type; | ||
225 | + if (fileType === 'image') { | ||
226 | + if (fileType.indexOf('image') < 0) { | ||
227 | + this.$message.warning('请上传图片'); | ||
228 | + return false; | ||
229 | + } | ||
230 | + } else if (fileType === 'file') { | ||
231 | + if (fileType.indexOf('image') >= 0) { | ||
232 | + this.$message.warning('请上传文件'); | ||
233 | + return false; | ||
234 | + } | ||
235 | + } | ||
236 | + return true | ||
237 | + }, | ||
238 | + handleChange(info) { | ||
239 | + if (info.file.status === 'done') { | ||
240 | + if (info.file.response.success) { | ||
241 | + this.loadData() | ||
242 | + this.$message.success(`${info.file.name} 上传成功!`); | ||
243 | + this.$options.methods.parseApk(this, info.file.name) | ||
244 | + } else { | ||
245 | + this.$message.error(`${info.file.response.message}`); | ||
246 | + } | ||
247 | + } else if (info.file.status === 'error') { | ||
248 | + this.$message.error(`${info.file.response.message}`); | ||
249 | + } | ||
250 | + }, | ||
251 | + | ||
252 | + parseApk(parent, filename){ | ||
253 | + getAction(parent.url.parse, {filename: filename}).then((res) => { | ||
254 | + if (res.success) { | ||
255 | + parent.loadData() | ||
256 | + }else{ | ||
257 | + alert("解析apk失败!") | ||
258 | + } | ||
259 | + }) | ||
260 | + }, | ||
261 | + initDictConfig(){ | ||
262 | + }, | ||
263 | + getSuperFieldList(){ | ||
264 | + let fieldList=[]; | ||
265 | + fieldList.push({type:'string',value:'pkgname',text:'应用名称',dictCode:''}) | ||
266 | + fieldList.push({type:'int',value:'versioncode',text:'版本号',dictCode:''}) | ||
267 | + fieldList.push({type:'string',value:'versionname',text:'版本名称',dictCode:''}) | ||
268 | + fieldList.push({type:'string',value:'url',text:'下载地址',dictCode:''}) | ||
269 | + fieldList.push({type:'string',value:'md5',text:'md5校验码',dictCode:''}) | ||
270 | + this.superFieldList = fieldList | ||
271 | + } | ||
272 | + } | ||
273 | + } | ||
274 | +</script> | ||
275 | +<style scoped> | ||
276 | + @import '~@assets/less/common.less'; | ||
277 | +</style> | ||
0 | \ No newline at end of file | 278 | \ No newline at end of file |
ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue
@@ -8,13 +8,12 @@ | @@ -8,13 +8,12 @@ | ||
8 | <li> | 8 | <li> |
9 | <a-select | 9 | <a-select |
10 | show-search | 10 | show-search |
11 | - placeholder="请选择库位类型" | 11 | + placeholder="请选择库区" |
12 | option-filter-prop="children" | 12 | option-filter-prop="children" |
13 | v-model="zoneCode" | 13 | v-model="zoneCode" |
14 | @change="refresh" | 14 | @change="refresh" |
15 | style="width: 200px"> | 15 | style="width: 200px"> |
16 | - <a-select-option selected="0" id="zoneCode" v-for="item in locationTypeList" :key="item.name" | ||
17 | - :value="item.locationTypeCode">{{ item.name }} | 16 | + <a-select-option selected="0" id="zoneCode" v-for="item in zoneList" :key="item.name" :value="item.code">{{ item.name }} |
18 | </a-select-option> | 17 | </a-select-option> |
19 | </a-select> | 18 | </a-select> |
20 | </li> | 19 | </li> |
@@ -84,7 +83,7 @@ | @@ -84,7 +83,7 @@ | ||
84 | <ul id="info_list"> | 83 | <ul id="info_list"> |
85 | <li><span>库位:</span><input type="text" id="code" disabled/></li> | 84 | <li><span>库位:</span><input type="text" id="code" disabled/></li> |
86 | <li><span>容器编码:</span><input type="text" id="containerCode" disabled/></li> | 85 | <li><span>容器编码:</span><input type="text" id="containerCode" disabled/></li> |
87 | - <li><span>物料信息:<select id="material" style="width: auto"><option>无</option></select></span></li> | 86 | + <li><span>物料信息:<select id="material" style="width: auto;"><option>无</option></select></span></li> |
88 | </ul> | 87 | </ul> |
89 | </div> | 88 | </div> |
90 | </form> | 89 | </form> |
@@ -156,7 +155,7 @@ export default { | @@ -156,7 +155,7 @@ export default { | ||
156 | showPrise: false, | 155 | showPrise: false, |
157 | // loading:true, | 156 | // loading:true, |
158 | zoneCode: '', | 157 | zoneCode: '', |
159 | - locationTypeList: [], | 158 | + zoneList: [], |
160 | model: {}, | 159 | model: {}, |
161 | locationContent: '' | 160 | locationContent: '' |
162 | } | 161 | } |
@@ -172,23 +171,21 @@ export default { | @@ -172,23 +171,21 @@ export default { | ||
172 | }, | 171 | }, |
173 | 172 | ||
174 | mounted() { | 173 | mounted() { |
175 | - //监听浏览器宽度的改变 | ||
176 | - // window.onresize = function(){ | ||
177 | - // _this.changeMargin(); | ||
178 | - // _this.border() | ||
179 | - // }; | ||
180 | - // | ||
181 | - // this.changeMargin(); | ||
182 | - // | ||
183 | - // this.border() | 174 | + // 监听浏览器宽度的改变 |
175 | + const resizeObserver = new ResizeObserver(entries => { | ||
176 | + for (let entry of entries) { | ||
177 | + this.changeMargin(); | ||
178 | + } | ||
179 | + }); | ||
180 | + resizeObserver.observe(document.querySelector('.location')); | ||
184 | }, | 181 | }, |
185 | methods: { | 182 | methods: { |
186 | loadFrom() { | 183 | loadFrom() { |
187 | getZoneList().then((res) => { | 184 | getZoneList().then((res) => { |
188 | if (res.success) { | 185 | if (res.success) { |
189 | - this.locationTypeList = res.result; | ||
190 | - if (this.locationTypeList.length > 0) { | ||
191 | - this.zoneCode = this.locationTypeList[0].locationTypeCode; | 186 | + this.zoneList = res.result; |
187 | + if (this.zoneList.length > 0) { | ||
188 | + this.zoneCode = this.zoneList[0].code; | ||
192 | let _this = this; | 189 | let _this = this; |
193 | this.resetAjax(this.zoneCode); | 190 | this.resetAjax(this.zoneCode); |
194 | } | 191 | } |
@@ -200,7 +197,7 @@ export default { | @@ -200,7 +197,7 @@ export default { | ||
200 | url: window._CONFIG['domianURL'] + prefix + "/getAllLocation", | 197 | url: window._CONFIG['domianURL'] + prefix + "/getAllLocation", |
201 | type: "post", | 198 | type: "post", |
202 | data: { | 199 | data: { |
203 | - type: this.zoneCode | 200 | + zoneCode: this.zoneCode |
204 | }, | 201 | }, |
205 | headers: { | 202 | headers: { |
206 | "X-Access-Token": Vue.ls.get(ACCESS_TOKEN) | 203 | "X-Access-Token": Vue.ls.get(ACCESS_TOKEN) |
@@ -227,7 +224,7 @@ export default { | @@ -227,7 +224,7 @@ export default { | ||
227 | } | 224 | } |
228 | } | 225 | } |
229 | 226 | ||
230 | - let type = $("#zoneCode").val(); | 227 | + let zoneCode = $("#zoneCode").val(); |
231 | this.resetAjax(this.zoneCode); | 228 | this.resetAjax(this.zoneCode); |
232 | // this.show(); | 229 | // this.show(); |
233 | }, | 230 | }, |
@@ -252,7 +249,7 @@ export default { | @@ -252,7 +249,7 @@ export default { | ||
252 | }); | 249 | }); |
253 | 250 | ||
254 | $("#zoneCode").change(function () { | 251 | $("#zoneCode").change(function () { |
255 | - let type = $("#zoneCode").val(); | 252 | + let zoneCode = $("#zoneCode").val(); |
256 | this.resetAjax(this.zoneCode); | 253 | this.resetAjax(this.zoneCode); |
257 | }); | 254 | }); |
258 | }, | 255 | }, |
@@ -266,7 +263,10 @@ export default { | @@ -266,7 +263,10 @@ export default { | ||
266 | 263 | ||
267 | //格子宽度 | 264 | //格子宽度 |
268 | changeMargin() { | 265 | changeMargin() { |
269 | - let box_width = document.getElementById("location").offsetWidth; | 266 | + let box_width = 0; |
267 | + if (document.getElementById("location") != null) { | ||
268 | + box_width = document.getElementById("location").offsetWidth; | ||
269 | + } | ||
270 | box_width = box_width - 80; | 270 | box_width = box_width - 80; |
271 | let num = $("#editable-select").val(); | 271 | let num = $("#editable-select").val(); |
272 | let grid_width; | 272 | let grid_width; |
@@ -535,13 +535,13 @@ export default { | @@ -535,13 +535,13 @@ export default { | ||
535 | }, | 535 | }, |
536 | 536 | ||
537 | //页面初始化请求 | 537 | //页面初始化请求 |
538 | - resetAjax(type) { | 538 | + resetAjax(zoneCode) { |
539 | var _this = this; | 539 | var _this = this; |
540 | $.ajax({ | 540 | $.ajax({ |
541 | url: window._CONFIG['domianURL'] + prefix + "/getAllLocation", | 541 | url: window._CONFIG['domianURL'] + prefix + "/getAllLocation", |
542 | type: "post", | 542 | type: "post", |
543 | data: { | 543 | data: { |
544 | - type: type | 544 | + zoneCode: zoneCode |
545 | }, | 545 | }, |
546 | headers: { | 546 | headers: { |
547 | "X-Access-Token": Vue.ls.get(ACCESS_TOKEN) | 547 | "X-Access-Token": Vue.ls.get(ACCESS_TOKEN) |
@@ -575,7 +575,6 @@ export default { | @@ -575,7 +575,6 @@ export default { | ||
575 | $("#editable-num").append("<option value='" + i + "'>" + i + "</option>") | 575 | $("#editable-num").append("<option value='" + i + "'>" + i + "</option>") |
576 | } | 576 | } |
577 | } | 577 | } |
578 | - _this.changeMargin(); | ||
579 | _this.Search(); | 578 | _this.Search(); |
580 | } | 579 | } |
581 | }); | 580 | }); |
@@ -596,7 +595,7 @@ export default { | @@ -596,7 +595,7 @@ export default { | ||
596 | let data; | 595 | let data; |
597 | this.seachZone(); | 596 | this.seachZone(); |
598 | if (index === "row") { | 597 | if (index === "row") { |
599 | - data = {type: this.zoneCode, row: num}; | 598 | + data = {zoneCode: this.zoneCode, row: num}; |
600 | $("#location").children().remove(); | 599 | $("#location").children().remove(); |
601 | for (let i = grid_layer; i > 0; i--) { | 600 | for (let i = grid_layer; i > 0; i--) { |
602 | $(".location").append("<br><span style='display: inline-block;text-align: right;width: 50px; margin-right: 10px;'>第" + i + "层</span>"); | 601 | $(".location").append("<br><span style='display: inline-block;text-align: right;width: 50px; margin-right: 10px;'>第" + i + "层</span>"); |
@@ -604,10 +603,10 @@ export default { | @@ -604,10 +603,10 @@ export default { | ||
604 | $(".location").append("<img data-i=" + num + " data-j=" + j + " data-k=" + i + " class='grid' onmouseover='lays(this)' onmouseout='Mclose(this)' onclick='gridMsg(this)'>"); | 603 | $(".location").append("<img data-i=" + num + " data-j=" + j + " data-k=" + i + " class='grid' onmouseover='lays(this)' onmouseout='Mclose(this)' onclick='gridMsg(this)'>"); |
605 | } | 604 | } |
606 | } | 605 | } |
607 | - this.changeMargin(); | 606 | + // this.changeMargin(); |
608 | this.ajaxGrid(index, data); | 607 | this.ajaxGrid(index, data); |
609 | } else if (index === "line") { | 608 | } else if (index === "line") { |
610 | - data = {type: this.zoneCode, line: num}; | 609 | + data = {zoneCode: this.zoneCode, line: num}; |
611 | $("#location").children().remove(); | 610 | $("#location").children().remove(); |
612 | for (let k = grid_layer; k > 0; k--) { | 611 | for (let k = grid_layer; k > 0; k--) { |
613 | $(".location").append("<br><span style='display: inline-block;text-align: right;width: 50px; margin-right: 10px;'>第" + k + "层</span>"); | 612 | $(".location").append("<br><span style='display: inline-block;text-align: right;width: 50px; margin-right: 10px;'>第" + k + "层</span>"); |
@@ -615,10 +614,10 @@ export default { | @@ -615,10 +614,10 @@ export default { | ||
615 | $(".location").append("<img data-i=" + l + " data-j=" + num + " data-k=" + k + " class='grid' onmouseover='lays(this)' onmouseout='Mclose(this)' onclick='gridMsg(this)'>"); | 614 | $(".location").append("<img data-i=" + l + " data-j=" + num + " data-k=" + k + " class='grid' onmouseover='lays(this)' onmouseout='Mclose(this)' onclick='gridMsg(this)'>"); |
616 | } | 615 | } |
617 | } | 616 | } |
618 | - this.changeMargin(); | 617 | + // this.changeMargin(); |
619 | this.ajaxGrid(index, data); | 618 | this.ajaxGrid(index, data); |
620 | } else if (index === "layer") { | 619 | } else if (index === "layer") { |
621 | - data = {type: this.zoneCode, layer: num}; | 620 | + data = {zoneCode: this.zoneCode, layer: num}; |
622 | $("#location").children().remove(); | 621 | $("#location").children().remove(); |
623 | for (let m = 1; m <= grid_row; m++) { | 622 | for (let m = 1; m <= grid_row; m++) { |
624 | $(".location").append("<br><span style='display: inline-block;text-align: right;width: 50px; margin-right: 10px;'>第" + m + "行</span>"); | 623 | $(".location").append("<br><span style='display: inline-block;text-align: right;width: 50px; margin-right: 10px;'>第" + m + "行</span>"); |
@@ -626,7 +625,7 @@ export default { | @@ -626,7 +625,7 @@ export default { | ||
626 | $(".location").append("<img data-i=" + m + " data-j=" + n + " data-k=" + num + " class='grid' onmouseover='lays(this)' onmouseout='Mclose(this)' onclick='gridMsg(this)'>"); | 625 | $(".location").append("<img data-i=" + m + " data-j=" + n + " data-k=" + num + " class='grid' onmouseover='lays(this)' onmouseout='Mclose(this)' onclick='gridMsg(this)'>"); |
627 | } | 626 | } |
628 | } | 627 | } |
629 | - this.changeMargin(); | 628 | + // this.changeMargin(); |
630 | this.ajaxGrid(index, data); | 629 | this.ajaxGrid(index, data); |
631 | } | 630 | } |
632 | }, | 631 | }, |
ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoForm.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="pkgname"> | ||
8 | + <a-input v-model="model.pkgname" 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="versioncode"> | ||
13 | + <a-input-number v-model="model.versioncode" placeholder="请输入版本号" style="width: 100%" /> | ||
14 | + </a-form-model-item> | ||
15 | + </a-col> | ||
16 | + <a-col :span="24"> | ||
17 | + <a-form-model-item label="版本名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="versionname"> | ||
18 | + <a-input v-model="model.versionname" placeholder="请输入版本名称" ></a-input> | ||
19 | + </a-form-model-item> | ||
20 | + </a-col> | ||
21 | + <a-col :span="24"> | ||
22 | + <a-form-model-item label="下载地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url"> | ||
23 | + <a-input v-model="model.url" placeholder="请输入下载地址" ></a-input> | ||
24 | + </a-form-model-item> | ||
25 | + </a-col> | ||
26 | + <a-col :span="24"> | ||
27 | + <a-form-model-item label="md5校验码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="md5"> | ||
28 | + <a-input v-model="model.md5" placeholder="请输入md5校验码" ></a-input> | ||
29 | + </a-form-model-item> | ||
30 | + </a-col> | ||
31 | + </a-row> | ||
32 | + </a-form-model> | ||
33 | + </j-form-container> | ||
34 | + </a-spin> | ||
35 | +</template> | ||
36 | + | ||
37 | +<script> | ||
38 | + | ||
39 | + import { httpAction, getAction } from '@/api/manage' | ||
40 | + import { validateDuplicateValue } from '@/utils/util' | ||
41 | + | ||
42 | + export default { | ||
43 | + name: 'ApkInfoForm', | ||
44 | + components: { | ||
45 | + }, | ||
46 | + props: { | ||
47 | + //表单禁用 | ||
48 | + disabled: { | ||
49 | + type: Boolean, | ||
50 | + default: false, | ||
51 | + required: false | ||
52 | + } | ||
53 | + }, | ||
54 | + data () { | ||
55 | + return { | ||
56 | + model:{ | ||
57 | + }, | ||
58 | + labelCol: { | ||
59 | + xs: { span: 24 }, | ||
60 | + sm: { span: 5 }, | ||
61 | + }, | ||
62 | + wrapperCol: { | ||
63 | + xs: { span: 24 }, | ||
64 | + sm: { span: 16 }, | ||
65 | + }, | ||
66 | + confirmLoading: false, | ||
67 | +validatorRules: { | ||
68 | + pkgname: [ | ||
69 | + { required: true, message: '请输入应用名称!'}, | ||
70 | + ], | ||
71 | + versioncode: [ | ||
72 | + { required: true, message: '请输入版本号!'}, | ||
73 | + ], | ||
74 | + versionname: [ | ||
75 | + { required: true, message: '请输入版本名称!'}, | ||
76 | + ], | ||
77 | + url: [ | ||
78 | + { required: true, message: '请输入下载地址!'}, | ||
79 | + ], | ||
80 | + md5: [ | ||
81 | + { required: true, message: '请输入md5校验码!'}, | ||
82 | + ], | ||
83 | +}, | ||
84 | + url: { | ||
85 | + add: "/monitor/apkinfo/add", | ||
86 | + edit: "/monitor/apkinfo/edit", | ||
87 | + queryById: "/monitor/apkinfo/queryById" | ||
88 | + } | ||
89 | + } | ||
90 | + }, | ||
91 | + computed: { | ||
92 | + formDisabled(){ | ||
93 | + return this.disabled | ||
94 | + }, | ||
95 | + }, | ||
96 | + created () { | ||
97 | + //备份model原始值 | ||
98 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
99 | + }, | ||
100 | + methods: { | ||
101 | + add () { | ||
102 | + this.edit(this.modelDefault); | ||
103 | + }, | ||
104 | + edit (record) { | ||
105 | + this.model = Object.assign({}, record); | ||
106 | + this.visible = true; | ||
107 | + }, | ||
108 | + submitForm () { | ||
109 | + const that = this; | ||
110 | + // 触发表单验证 | ||
111 | + this.$refs.form.validate(valid => { | ||
112 | + if (valid) { | ||
113 | + that.confirmLoading = true; | ||
114 | + let httpurl = ''; | ||
115 | + let method = ''; | ||
116 | + if(!this.model.id){ | ||
117 | + httpurl+=this.url.add; | ||
118 | + method = 'post'; | ||
119 | + }else{ | ||
120 | + httpurl+=this.url.edit; | ||
121 | + method = 'put'; | ||
122 | + } | ||
123 | + httpAction(httpurl,this.model,method).then((res)=>{ | ||
124 | + if(res.success){ | ||
125 | + that.$message.success(res.message); | ||
126 | + that.$emit('ok'); | ||
127 | + }else{ | ||
128 | + that.$message.warning(res.message); | ||
129 | + } | ||
130 | + }).finally(() => { | ||
131 | + that.confirmLoading = false; | ||
132 | + }) | ||
133 | + } | ||
134 | + | ||
135 | + }) | ||
136 | + }, | ||
137 | + } | ||
138 | + } | ||
139 | +</script> | ||
0 | \ No newline at end of file | 140 | \ No newline at end of file |
ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoModal.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 | + <apk-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></apk-info-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 ApkInfoForm from './ApkInfoForm' | ||
21 | + | ||
22 | + export default { | ||
23 | + name: 'ApkInfoModal', | ||
24 | + components: { | ||
25 | + ApkInfoForm | ||
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 | \ No newline at end of file | 85 | \ No newline at end of file |
ant-design-vue-jeecg/src/views/system/monitor/modules/ApkInfoModal.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 | + <apk-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></apk-info-form> | ||
12 | + </j-modal> | ||
13 | +</template> | ||
14 | + | ||
15 | +<script> | ||
16 | + | ||
17 | + import ApkInfoForm from './ApkInfoForm' | ||
18 | + export default { | ||
19 | + name: 'ApkInfoModal', | ||
20 | + components: { | ||
21 | + ApkInfoForm | ||
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 | \ No newline at end of file | 61 | \ No newline at end of file |
ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerDetailList.vue
@@ -88,7 +88,7 @@ | @@ -88,7 +88,7 @@ | ||
88 | <div> | 88 | <div> |
89 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 89 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
90 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 90 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
91 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 91 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
92 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 92 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
93 | </div> | 93 | </div> |
94 | 94 |
ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
@@ -106,6 +106,8 @@ | @@ -106,6 +106,8 @@ | ||
106 | </a-button> | 106 | </a-button> |
107 | </template> | 107 | </template> |
108 | <span slot="action" slot-scope="text, record"> | 108 | <span slot="action" slot-scope="text, record"> |
109 | + <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:fill'">生成任务<a-divider type="vertical"/></a> | ||
110 | + <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:fill'">生成任务<a-divider type="vertical"/></a> | ||
109 | <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a> | 111 | <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a> |
110 | <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a> | 112 | <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a> |
111 | <a-popconfirm v-if="record.status == 0" v-has="'receiptContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> | 113 | <a-popconfirm v-if="record.status == 0" v-has="'receiptContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> |
@@ -124,6 +126,8 @@ | @@ -124,6 +126,8 @@ | ||
124 | 126 | ||
125 | <receiptContainerHeader-modal ref="modalForm" @ok="modalFormOk"></receiptContainerHeader-modal> | 127 | <receiptContainerHeader-modal ref="modalForm" @ok="modalFormOk"></receiptContainerHeader-modal> |
126 | <receiptContainerSelect-modal ref="modalForm2" @ok="modalFormOk"></receiptContainerSelect-modal> | 128 | <receiptContainerSelect-modal ref="modalForm2" @ok="modalFormOk"></receiptContainerSelect-modal> |
129 | + <receiptContainerFillSelect-modal ref="modalForm3" @ok="modalFormOk"></receiptContainerFillSelect-modal> | ||
130 | + <receiptContainerStatusSelect-modal ref="modalForm4" @ok="modalFormOk"></receiptContainerStatusSelect-modal> | ||
127 | </a-card> | 131 | </a-card> |
128 | </template> | 132 | </template> |
129 | 133 | ||
@@ -137,6 +141,8 @@ import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelec | @@ -137,6 +141,8 @@ import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelec | ||
137 | import '@/assets/less/TableExpand.less' | 141 | import '@/assets/less/TableExpand.less' |
138 | import {createReceiptTask} from '@/api/api' | 142 | import {createReceiptTask} from '@/api/api' |
139 | import ReceiptContainerSelectModal from "./modules/ReceiptContainerSelectModal"; | 143 | import ReceiptContainerSelectModal from "./modules/ReceiptContainerSelectModal"; |
144 | +import ReceiptContainerFillSelectModal from "./modules/ReceiptContainerFillSelectModal"; | ||
145 | +import ReceiptContainerStatusSelectModal from "./modules/ReceiptContainerStatusSelectModal"; | ||
140 | 146 | ||
141 | export default { | 147 | export default { |
142 | name: "ReceiptContainerHeaderList", | 148 | name: "ReceiptContainerHeaderList", |
@@ -144,7 +150,9 @@ export default { | @@ -144,7 +150,9 @@ export default { | ||
144 | components: { | 150 | components: { |
145 | ReceiptContainerSelectModal, | 151 | ReceiptContainerSelectModal, |
146 | ReceiptContainerDetailList, | 152 | ReceiptContainerDetailList, |
147 | - ReceiptContainerHeaderModal | 153 | + ReceiptContainerHeaderModal, |
154 | + ReceiptContainerStatusSelectModal, | ||
155 | + ReceiptContainerFillSelectModal | ||
148 | }, | 156 | }, |
149 | data() { | 157 | data() { |
150 | return { | 158 | return { |
@@ -291,6 +299,16 @@ export default { | @@ -291,6 +299,16 @@ export default { | ||
291 | this.$refs.modalForm2.title = "选择分拣入库口"; | 299 | this.$refs.modalForm2.title = "选择分拣入库口"; |
292 | console.log("selectPort"); | 300 | console.log("selectPort"); |
293 | }, | 301 | }, |
302 | + selectFillPort(record) { | ||
303 | + this.$refs.modalForm3.edit(record); | ||
304 | + this.$refs.modalForm3.title = "选择分拣入库口"; | ||
305 | + console.log("selectFillPort"); | ||
306 | + }, | ||
307 | + selectContainerStatus(record) { | ||
308 | + this.$refs.modalForm4.edit(record); | ||
309 | + this.$refs.modalForm4.title = "选择容器状态"; | ||
310 | + console.log("selectContainerStatus"); | ||
311 | + }, | ||
294 | loadData(arg) { | 312 | loadData(arg) { |
295 | if (!this.url.list) { | 313 | if (!this.url.list) { |
296 | this.$message.error("请设置url.list属性!") | 314 | this.$message.error("请设置url.list属性!") |
ant-design-vue-jeecg/src/views/system/receipt/ReceiptDetailList.vue
@@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
32 | <div> | 32 | <div> |
33 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 33 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
34 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 34 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
35 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 35 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
36 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 36 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
37 | </div> | 37 | </div> |
38 | 38 |
ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerFillSelectModal.vue
0 → 100644
1 | +<template> | ||
2 | + <j-modal | ||
3 | + :title="title" | ||
4 | + :width="width" | ||
5 | + :visible="visible" | ||
6 | + :confirmLoading="confirmLoading" | ||
7 | + switchFullscreen | ||
8 | + @ok="handleOk" | ||
9 | + @cancel="handleCancel" | ||
10 | + cancelText="关闭"> | ||
11 | + <div class="table-page-search-wrapper"> | ||
12 | + <a-spin :spinning="confirmLoading"> | ||
13 | + <a-form-model ref="form" :model="model" :rules="validatorRules" layout="inline"> | ||
14 | + <a-row> | ||
15 | + <a-col :span="24"> | ||
16 | + <a-form-model-item label="分拣入库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPort" style="margin-left:14px"> | ||
17 | + <a-select | ||
18 | + show-search | ||
19 | + placeholder="请选择分拣入库口" | ||
20 | + option-filter-prop="children" | ||
21 | + v-model="model.toPort"> | ||
22 | + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ | ||
23 | + item.name | ||
24 | + }} | ||
25 | + </a-select-option> | ||
26 | + </a-select> | ||
27 | + </a-form-model-item> | ||
28 | + </a-col> | ||
29 | + <a-col :span="24"> | ||
30 | + <a-form-model-item label="容器填充状态" prop="containerFillStatus"> | ||
31 | + <j-dict-select-tag | ||
32 | + v-model="model.containerFillStatus" | ||
33 | + type="radioButton" | ||
34 | + title="容器填充状态" | ||
35 | + dictCode="container_fill_status" | ||
36 | + placeholder="请选择容器填充状态" | ||
37 | + /> | ||
38 | + </a-form-model-item> | ||
39 | + </a-col> | ||
40 | + </a-row> | ||
41 | + </a-form-model> | ||
42 | + </a-spin> | ||
43 | + </div> | ||
44 | + </j-modal> | ||
45 | +</template> | ||
46 | + | ||
47 | +<script> | ||
48 | + | ||
49 | +import {httpAction} from '@/api/manage' | ||
50 | +import {validateDuplicateValue} from '@/utils/util' | ||
51 | +import {createReceiptTask} from '@/api/api' | ||
52 | +import {selectSupplePort} from '@/api/api' | ||
53 | + | ||
54 | +export default { | ||
55 | + name: "ReceiptContainerSelectModal", | ||
56 | + components: {}, | ||
57 | + props: { | ||
58 | + mainId: { | ||
59 | + type: String, | ||
60 | + required: false, | ||
61 | + default: '' | ||
62 | + } | ||
63 | + }, | ||
64 | + data() { | ||
65 | + return { | ||
66 | + title: "操作", | ||
67 | + portList: [], | ||
68 | + width: 500, | ||
69 | + visible: false, | ||
70 | + model: {}, | ||
71 | + labelCol: { | ||
72 | + xs: {span: 24}, | ||
73 | + sm: {span: 5}, | ||
74 | + }, | ||
75 | + wrapperCol: { | ||
76 | + xs: {span: 24}, | ||
77 | + sm: {span: 16}, | ||
78 | + }, | ||
79 | + confirmLoading: false, | ||
80 | + validatorRules: { | ||
81 | + toPort: [{ required: true, message: '请选择分拣口!' }], | ||
82 | + containerFillStatus: [{ required: true, message: '请选择容器填充状态!' }] | ||
83 | + }, | ||
84 | + url: { | ||
85 | + } | ||
86 | + } | ||
87 | + }, | ||
88 | + created() { | ||
89 | + //备份model原始值 | ||
90 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
91 | + }, | ||
92 | + methods: { | ||
93 | + add() { | ||
94 | + this.edit(this.modelDefault); | ||
95 | + }, | ||
96 | + edit(record) { | ||
97 | + console.log("edit"); | ||
98 | + this.getPortList(record); | ||
99 | + }, | ||
100 | + close() { | ||
101 | + this.$emit('close'); | ||
102 | + this.visible = false; | ||
103 | + this.$refs.form.clearValidate(); | ||
104 | + }, | ||
105 | + handleOk() { | ||
106 | + const that = this; | ||
107 | + // 触发表单验证 | ||
108 | + this.$refs.form.validate(valid => { | ||
109 | + if (valid) { | ||
110 | + that.confirmLoading = true; | ||
111 | + createReceiptTask(this.model).then((res) => { | ||
112 | + if (res.success) { | ||
113 | + that.$message.success(res.message); | ||
114 | + that.$emit('ok'); | ||
115 | + } else { | ||
116 | + that.$message.warning(res.message); | ||
117 | + } | ||
118 | + }).finally(() => { | ||
119 | + that.confirmLoading = false; | ||
120 | + that.close(); | ||
121 | + }); | ||
122 | + } else { | ||
123 | + return false | ||
124 | + } | ||
125 | + }) | ||
126 | + }, | ||
127 | + handleCancel() { | ||
128 | + this.close() | ||
129 | + }, | ||
130 | + getPortList(record) { | ||
131 | + selectSupplePort(record).then((res) => { | ||
132 | + if (res.success) { | ||
133 | + this.portList = res.result; | ||
134 | + this.model = Object.assign({}, record); | ||
135 | + this.visible = true; | ||
136 | + } else { | ||
137 | + this.$message.warning(res.message); | ||
138 | + } | ||
139 | + }); | ||
140 | + } | ||
141 | + } | ||
142 | +} | ||
143 | +</script> |
ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerSelectModal.vue
@@ -8,26 +8,28 @@ | @@ -8,26 +8,28 @@ | ||
8 | @ok="handleOk" | 8 | @ok="handleOk" |
9 | @cancel="handleCancel" | 9 | @cancel="handleCancel" |
10 | cancelText="关闭"> | 10 | cancelText="关闭"> |
11 | - <a-spin :spinning="confirmLoading"> | ||
12 | - <a-form-model ref="form" :model="model" :rules="validatorRules"> | ||
13 | - <a-row> | ||
14 | - <a-col :span="24"> | ||
15 | - <a-form-model-item label="分拣入库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPort"> | ||
16 | - <a-select | ||
17 | - show-search | ||
18 | - placeholder="请选择分拣入库口" | ||
19 | - option-filter-prop="children" | ||
20 | - v-model="model.toPort"> | ||
21 | - <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ | ||
22 | - item.name | ||
23 | - }} | ||
24 | - </a-select-option> | ||
25 | - </a-select> | ||
26 | - </a-form-model-item> | ||
27 | - </a-col> | ||
28 | - </a-row> | ||
29 | - </a-form-model> | ||
30 | - </a-spin> | 11 | + <div class="table-page-search-wrapper"> |
12 | + <a-spin :spinning="confirmLoading"> | ||
13 | + <a-form-model ref="form" :model="model" :rules="validatorRules" > | ||
14 | + <a-row> | ||
15 | + <a-col :span="24"> | ||
16 | + <a-form-model-item label="分拣入库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPort" style="margin-left:14px"> | ||
17 | + <a-select | ||
18 | + show-search | ||
19 | + placeholder="请选择分拣入库口" | ||
20 | + option-filter-prop="children" | ||
21 | + v-model="model.toPort"> | ||
22 | + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ | ||
23 | + item.name | ||
24 | + }} | ||
25 | + </a-select-option> | ||
26 | + </a-select> | ||
27 | + </a-form-model-item> | ||
28 | + </a-col> | ||
29 | + </a-row> | ||
30 | + </a-form-model> | ||
31 | + </a-spin> | ||
32 | + </div> | ||
31 | </j-modal> | 33 | </j-modal> |
32 | </template> | 34 | </template> |
33 | 35 | ||
@@ -63,13 +65,12 @@ export default { | @@ -63,13 +65,12 @@ export default { | ||
63 | xs: {span: 24}, | 65 | xs: {span: 24}, |
64 | sm: {span: 16}, | 66 | sm: {span: 16}, |
65 | }, | 67 | }, |
66 | - | ||
67 | confirmLoading: false, | 68 | confirmLoading: false, |
68 | - validatorRules: {}, | 69 | + validatorRules: { |
70 | + toPort: [{ required: true, message: '请选择分拣口!' }] | ||
71 | + }, | ||
69 | url: { | 72 | url: { |
70 | - createTask: "/shipment/shipmentContainerHeader/createShipmentTask", | ||
71 | } | 73 | } |
72 | - | ||
73 | } | 74 | } |
74 | }, | 75 | }, |
75 | created() { | 76 | created() { |
@@ -125,7 +126,6 @@ export default { | @@ -125,7 +126,6 @@ export default { | ||
125 | } | 126 | } |
126 | }); | 127 | }); |
127 | } | 128 | } |
128 | - | ||
129 | } | 129 | } |
130 | } | 130 | } |
131 | </script> | 131 | </script> |
ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerStatusSelectModal.vue
0 → 100644
1 | +<template> | ||
2 | + <j-modal | ||
3 | + :title="title" | ||
4 | + :width="width" | ||
5 | + :visible="visible" | ||
6 | + :confirmLoading="confirmLoading" | ||
7 | + switchFullscreen | ||
8 | + @ok="handleOk" | ||
9 | + @cancel="handleCancel" | ||
10 | + cancelText="关闭" | ||
11 | + > | ||
12 | + <div class="table-page-search-wrapper"> | ||
13 | + <a-spin :spinning="confirmLoading"> | ||
14 | + <a-form-model ref="form" :model="model" :rules="validatorRules" layout="inline"> | ||
15 | + <a-row> | ||
16 | + <a-col :span="24"> | ||
17 | + <a-form-model-item label="容器填充状态" prop="containerFillStatus"> | ||
18 | + <j-dict-select-tag | ||
19 | + v-model="model.containerFillStatus" | ||
20 | + type="radioButton" | ||
21 | + title="容器填充状态" | ||
22 | + dictCode="container_fill_status" | ||
23 | + placeholder="请选择容器填充状态" | ||
24 | + /> | ||
25 | + </a-form-model-item> | ||
26 | + </a-col> | ||
27 | + </a-row> | ||
28 | + </a-form-model> | ||
29 | + </a-spin> | ||
30 | + </div> | ||
31 | + </j-modal> | ||
32 | +</template> | ||
33 | + | ||
34 | +<script> | ||
35 | +import { httpAction } from '@/api/manage' | ||
36 | +import { validateDuplicateValue } from '@/utils/util' | ||
37 | +import { createReceiptTask } from '@/api/api' | ||
38 | + | ||
39 | +export default { | ||
40 | + name: 'ReceiptContainerSelectModal', | ||
41 | + components: {}, | ||
42 | + props: { | ||
43 | + mainId: { | ||
44 | + type: String, | ||
45 | + required: false, | ||
46 | + default: '' | ||
47 | + } | ||
48 | + }, | ||
49 | + data() { | ||
50 | + return { | ||
51 | + title: '操作', | ||
52 | + width: 500, | ||
53 | + visible: false, | ||
54 | + model: {}, | ||
55 | + labelCol: { | ||
56 | + xs: { span: 24 }, | ||
57 | + sm: { span: 5 } | ||
58 | + }, | ||
59 | + wrapperCol: { | ||
60 | + xs: { span: 24 }, | ||
61 | + sm: { span: 16 } | ||
62 | + }, | ||
63 | + | ||
64 | + confirmLoading: false, | ||
65 | + validatorRules: { | ||
66 | + containerFillStatus: [{ required: true, message: '请选择容器填充状态!' }] | ||
67 | + }, | ||
68 | + url: { | ||
69 | + } | ||
70 | + } | ||
71 | + }, | ||
72 | + created() { | ||
73 | + //备份model原始值 | ||
74 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)) | ||
75 | + }, | ||
76 | + methods: { | ||
77 | + add() { | ||
78 | + this.edit(this.modelDefault) | ||
79 | + }, | ||
80 | + edit(record) { | ||
81 | + this.getPortList(record) | ||
82 | + }, | ||
83 | + close() { | ||
84 | + this.$emit('close') | ||
85 | + this.visible = false | ||
86 | + this.$refs.form.clearValidate() | ||
87 | + }, | ||
88 | + handleOk() { | ||
89 | + const that = this | ||
90 | + // 触发表单验证 | ||
91 | + this.$refs.form.validate(valid => { | ||
92 | + if (valid) { | ||
93 | + that.confirmLoading = true | ||
94 | + createReceiptTask(this.model) | ||
95 | + .then(res => { | ||
96 | + if (res.success) { | ||
97 | + that.$message.success(res.message) | ||
98 | + that.$emit('ok') | ||
99 | + } else { | ||
100 | + that.$message.warning(res.message) | ||
101 | + } | ||
102 | + }) | ||
103 | + .finally(() => { | ||
104 | + that.confirmLoading = false | ||
105 | + that.close() | ||
106 | + }) | ||
107 | + } else { | ||
108 | + return false | ||
109 | + } | ||
110 | + }) | ||
111 | + }, | ||
112 | + handleCancel() { | ||
113 | + this.close() | ||
114 | + }, | ||
115 | + getPortList(record) { | ||
116 | + this.model = Object.assign({}, record) | ||
117 | + this.visible = true | ||
118 | + } | ||
119 | + } | ||
120 | +} | ||
121 | +</script> |
ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiveModal.vue
@@ -7,46 +7,38 @@ | @@ -7,46 +7,38 @@ | ||
7 | switchFullscreen | 7 | switchFullscreen |
8 | @ok="handleOk" | 8 | @ok="handleOk" |
9 | @cancel="handleCancel" | 9 | @cancel="handleCancel" |
10 | - cancelText="关闭"> | 10 | + cancelText="关闭" |
11 | + > | ||
11 | <a-spin :spinning="confirmLoading"> | 12 | <a-spin :spinning="confirmLoading"> |
12 | <a-form-model ref="form" :model="model" :rules="validatorRules"> | 13 | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
13 | <a-row> | 14 | <a-row> |
14 | <a-col :span="24"> | 15 | <a-col :span="24"> |
15 | <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | 16 | <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> |
16 | - <a-input v-model="model.containerCode" placeholder="请输入容器编码" style="width: 100%"/> | 17 | + <a-input v-model="model.containerCode" placeholder="请输入容器编码" style="width: 100%" /> |
17 | </a-form-model-item> | 18 | </a-form-model-item> |
18 | </a-col> | 19 | </a-col> |
19 | </a-row> | 20 | </a-row> |
20 | </a-form-model> | 21 | </a-form-model> |
21 | </a-spin> | 22 | </a-spin> |
22 | - | ||
23 | - <a-table | ||
24 | - ref="table" | ||
25 | - rowKey="id" | ||
26 | - size="middle" | ||
27 | - :columns="columns" | ||
28 | - :dataSource="dataSource" | ||
29 | - :pagination="false"> | ||
30 | - <span slot="action" slot-scope="text, record"> | ||
31 | - <a-input-number | ||
32 | - placeholder="" | ||
33 | - v-model="record.taskQty" | ||
34 | - :value="text" | ||
35 | - /> | ||
36 | - </span> | 23 | + <a-table ref="table" rowKey="id" size="middle" :columns="columns" :dataSource="dataSource" :pagination="false"> |
24 | + <span slot="action" slot-scope="text, record"> | ||
25 | + <a-input-number placeholder="" v-model="record.taskQty" :value="text" /> | ||
26 | + </span> | ||
37 | </a-table> | 27 | </a-table> |
38 | </j-modal> | 28 | </j-modal> |
39 | </template> | 29 | </template> |
40 | 30 | ||
41 | <script> | 31 | <script> |
42 | - | ||
43 | -import {httpAction} from '@/api/manage' | ||
44 | -import {validateDuplicateValue} from '@/utils/util' | ||
45 | -import {searchMaterialByCode} from '@/api/api' | ||
46 | -import {listReceiveByReceiptId} from '@/api/api' | 32 | +import { httpAction } from '@/api/manage' |
33 | +import { mixinDevice } from '@/utils/mixin' | ||
34 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
35 | +import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' | ||
36 | +import { validateDuplicateValue } from '@/utils/util' | ||
37 | +import { searchMaterialByCode } from '@/api/api' | ||
38 | +import { listReceiveByReceiptId } from '@/api/api' | ||
47 | 39 | ||
48 | export default { | 40 | export default { |
49 | - name: "ReceiveModal", | 41 | + name: 'ReceiveModal', |
50 | components: {}, | 42 | components: {}, |
51 | props: { | 43 | props: { |
52 | mainId: { | 44 | mainId: { |
@@ -57,7 +49,7 @@ export default { | @@ -57,7 +49,7 @@ export default { | ||
57 | }, | 49 | }, |
58 | data() { | 50 | data() { |
59 | return { | 51 | return { |
60 | - title: "操作", | 52 | + title: '操作', |
61 | width: 800, | 53 | width: 800, |
62 | visible: false, | 54 | visible: false, |
63 | materialList: {}, | 55 | materialList: {}, |
@@ -65,126 +57,137 @@ export default { | @@ -65,126 +57,137 @@ export default { | ||
65 | dataSource: [], | 57 | dataSource: [], |
66 | model: {}, | 58 | model: {}, |
67 | labelCol: { | 59 | labelCol: { |
68 | - xs: {span: 24}, | ||
69 | - sm: {span: 5}, | 60 | + xs: { span: 24 }, |
61 | + sm: { span: 5 } | ||
70 | }, | 62 | }, |
71 | wrapperCol: { | 63 | wrapperCol: { |
72 | - xs: {span: 24}, | ||
73 | - sm: {span: 16}, | 64 | + xs: { span: 24 }, |
65 | + sm: { span: 16 } | ||
74 | }, | 66 | }, |
75 | columns: [ | 67 | columns: [ |
76 | { | 68 | { |
77 | title: '物料编码', | 69 | title: '物料编码', |
78 | dataIndex: 'materialCode', | 70 | dataIndex: 'materialCode', |
79 | - align: "center", | ||
80 | - width: 124, | ||
81 | - key: 'materialCode' | 71 | + align: 'center', |
72 | + width: 124 | ||
82 | }, | 73 | }, |
83 | { | 74 | { |
84 | title: '物料名称', | 75 | title: '物料名称', |
85 | dataIndex: 'materialName', | 76 | dataIndex: 'materialName', |
86 | - width: 96, | ||
87 | - key: 'materialName' | 77 | + align: 'center', |
78 | + width: 96 | ||
88 | }, | 79 | }, |
89 | { | 80 | { |
90 | title: '物料规格', | 81 | title: '物料规格', |
91 | dataIndex: 'materialSpec', | 82 | dataIndex: 'materialSpec', |
92 | - width: 96, | ||
93 | - key: 'materialSpec' | 83 | + align: 'center', |
84 | + width: 96 | ||
94 | }, | 85 | }, |
95 | { | 86 | { |
96 | title: '库存状态', | 87 | title: '库存状态', |
97 | dataIndex: 'inventoryStatus', | 88 | dataIndex: 'inventoryStatus', |
98 | - key: 'inventoryStatus', | ||
99 | - width: 96, | 89 | + align: 'center', |
90 | + width: 96 | ||
100 | }, | 91 | }, |
101 | { | 92 | { |
102 | title: '批次', | 93 | title: '批次', |
103 | dataIndex: 'batch', | 94 | dataIndex: 'batch', |
104 | - key: 'batch' | 95 | + align: 'center' |
105 | }, | 96 | }, |
106 | { | 97 | { |
107 | title: '可收数量', | 98 | title: '可收数量', |
108 | dataIndex: 'qty', | 99 | dataIndex: 'qty', |
109 | - width: 80, | ||
110 | - key: 'qty' | 100 | + align: 'center', |
101 | + width: 80 | ||
111 | }, | 102 | }, |
112 | { | 103 | { |
113 | title: '收货数量', | 104 | title: '收货数量', |
114 | dataIndex: 'action', | 105 | dataIndex: 'action', |
115 | - scopedSlots: {customRender: 'action'}, | 106 | + align: 'center', |
107 | + key: 'action', | ||
108 | + scopedSlots: { customRender: 'action' } | ||
116 | } | 109 | } |
117 | ], | 110 | ], |
118 | confirmLoading: false, | 111 | confirmLoading: false, |
119 | validatorRules: { | 112 | validatorRules: { |
120 | - containerCode: [ | ||
121 | - {required: true, message: '请输入容器编码!'}, | ||
122 | - ], | 113 | + containerCode: [{ required: true, message: '请输入容器编码!' }] |
123 | }, | 114 | }, |
115 | + dictOptions: {}, | ||
116 | + superFieldList:[], | ||
124 | url: { | 117 | url: { |
125 | - add: "/receipt/receiveHeader/receiving", | ||
126 | - edit: "/receipt/receiptHeader/editReceiptDetail", | 118 | + add: '/receipt/receiveHeader/receiving', |
119 | + edit: '/receipt/receiptHeader/editReceiptDetail' | ||
127 | } | 120 | } |
128 | - | ||
129 | } | 121 | } |
130 | }, | 122 | }, |
131 | created() { | 123 | created() { |
132 | //备份model原始值 | 124 | //备份model原始值 |
133 | - console.log("created"); | ||
134 | - this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
135 | - this.searchReceive(); | 125 | + // this.searchReceive() |
126 | + this.getSuperFieldList() | ||
127 | + // this.modelDefault = JSON.parse(JSON.stringify(this.model)) | ||
136 | }, | 128 | }, |
137 | methods: { | 129 | methods: { |
138 | - add() { | ||
139 | - console.log("add 1"); | ||
140 | - this.edit(this.modelDefault); | ||
141 | - this.model.inventoryStatus = "good"; | ||
142 | - }, | 130 | + // add() { |
131 | + // this.edit(this.modelDefault) | ||
132 | + // this.model.inventoryStatus = 'good' | ||
133 | + // }, | ||
143 | edit(record) { | 134 | edit(record) { |
144 | - console.log("edit 1"); | ||
145 | - this.model = Object.assign({}, record); | ||
146 | - this.visible = true; | ||
147 | - this.searchReceive(); | ||
148 | - }, | ||
149 | - show(record) { | ||
150 | - this.model = Object.assign({}, record); | ||
151 | - this.visible = true; | 135 | + this.model = Object.assign({}, record) |
136 | + this.visible = true | ||
137 | + this.searchReceive() | ||
152 | }, | 138 | }, |
139 | + // show(record) { | ||
140 | + // this.model = Object.assign({}, record) | ||
141 | + // this.visible = true | ||
142 | + // }, | ||
153 | close() { | 143 | close() { |
154 | - this.$emit('close'); | ||
155 | - this.visible = false; | ||
156 | - this.$refs.form.clearValidate(); | 144 | + this.$emit('close') |
145 | + this.visible = false | ||
146 | + this.$refs.form.clearValidate() | ||
157 | }, | 147 | }, |
158 | searchReceive() { | 148 | searchReceive() { |
159 | - const that = this; | ||
160 | - that.querySource.receiptCode = that.model.code; | ||
161 | - listReceiveByReceiptId(that.querySource).then((res) => { | ||
162 | - that.dataSource = res.result; | 149 | + const that = this |
150 | + that.querySource.receiptCode = that.model.code | ||
151 | + listReceiveByReceiptId(that.querySource).then(res => { | ||
152 | + that.dataSource = res.result | ||
163 | }) | 153 | }) |
164 | }, | 154 | }, |
155 | + initDictConfig() {}, | ||
156 | + getSuperFieldList() { | ||
157 | + let fieldList = [] | ||
158 | + fieldList.push({type:'string',value:'inventoryStatus',text:'库存状态',dictCode:'inventory_status'}) | ||
159 | + this.superFieldList = fieldList | ||
160 | + }, | ||
165 | handleOk() { | 161 | handleOk() { |
166 | - console.log("handleOk"); | ||
167 | - const that = this; | 162 | + console.log('handleOk') |
163 | + const that = this | ||
168 | // 触发表单验证 | 164 | // 触发表单验证 |
169 | this.$refs.form.validate(valid => { | 165 | this.$refs.form.validate(valid => { |
170 | if (valid) { | 166 | if (valid) { |
171 | - that.confirmLoading = true; | ||
172 | - let httpurl = ''; | ||
173 | - let method = ''; | ||
174 | - httpurl += this.url.add; | ||
175 | - method = 'post'; | ||
176 | - this.dataSource[0].containerCode = this.model.containerCode; | ||
177 | - httpAction(httpurl, this.dataSource, method).then((res) => { | ||
178 | - if (res.success) { | ||
179 | - that.$message.success(res.message); | ||
180 | - that.$emit('ok'); | ||
181 | - } else { | ||
182 | - that.$message.warning(res.message); | ||
183 | - } | ||
184 | - }).finally(() => { | ||
185 | - that.confirmLoading = false; | ||
186 | - that.close(); | ||
187 | - }) | 167 | + that.confirmLoading = true |
168 | + let httpurl = '' | ||
169 | + let method = '' | ||
170 | + httpurl += this.url.add | ||
171 | + method = 'post' | ||
172 | + if (this.dataSource[0] == null) { | ||
173 | + that.confirmLoading = false | ||
174 | + that.$message.warning('入库单没有详情!') | ||
175 | + return | ||
176 | + } | ||
177 | + this.dataSource[0].containerCode = this.model.containerCode | ||
178 | + httpAction(httpurl, this.dataSource, method) | ||
179 | + .then(res => { | ||
180 | + if (res.success) { | ||
181 | + that.$message.success(res.message) | ||
182 | + that.$emit('ok') | ||
183 | + that.close() | ||
184 | + } else { | ||
185 | + that.$message.warning(res.message) | ||
186 | + } | ||
187 | + }) | ||
188 | + .finally(() => { | ||
189 | + that.confirmLoading = false | ||
190 | + }) | ||
188 | } else { | 191 | } else { |
189 | return false | 192 | return false |
190 | } | 193 | } |
@@ -192,9 +195,7 @@ export default { | @@ -192,9 +195,7 @@ export default { | ||
192 | }, | 195 | }, |
193 | handleCancel() { | 196 | handleCancel() { |
194 | this.close() | 197 | this.close() |
195 | - }, | ||
196 | - | ||
197 | - | 198 | + } |
198 | } | 199 | } |
199 | } | 200 | } |
200 | </script> | 201 | </script> |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerDetailList.vue
@@ -88,7 +88,7 @@ | @@ -88,7 +88,7 @@ | ||
88 | <div> | 88 | <div> |
89 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 89 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
90 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 90 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
91 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 91 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
92 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 92 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
93 | </div> | 93 | </div> |
94 | 94 |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue
@@ -80,7 +80,7 @@ | @@ -80,7 +80,7 @@ | ||
80 | <div> | 80 | <div> |
81 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> | 81 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
82 | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> | 82 | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> |
83 | -<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> | 83 | +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> |
84 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> | 84 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> |
85 | <!-- </div>--> | 85 | <!-- </div>--> |
86 | 86 |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailHistoryList.vue
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | <div> | 30 | <div> |
31 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 31 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
32 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 32 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
33 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 33 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
34 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 34 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
35 | </div> | 35 | </div> |
36 | 36 |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailList.vue
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | <div> | 31 | <div> |
32 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 32 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
33 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 33 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
34 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 34 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
35 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 35 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
36 | </div> | 36 | </div> |
37 | 37 |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderHistoryList.vue
@@ -112,7 +112,7 @@ | @@ -112,7 +112,7 @@ | ||
112 | <div> | 112 | <div> |
113 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 113 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
114 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 114 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
115 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 115 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
116 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 116 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
117 | </div> | 117 | </div> |
118 | 118 |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderList.vue
@@ -120,7 +120,7 @@ | @@ -120,7 +120,7 @@ | ||
120 | <div> | 120 | <div> |
121 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> | 121 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
122 | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> | 122 | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> |
123 | -<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> | 123 | +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> |
124 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> | 124 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> |
125 | <!-- </div>--> | 125 | <!-- </div>--> |
126 | 126 |
ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountHeaderList.vue
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | <!-- table区域-begin --> | 27 | <!-- table区域-begin --> |
28 | <div> | 28 | <div> |
29 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 29 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
30 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 30 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
31 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 31 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
32 | </div> | 32 | </div> |
33 | 33 |
ant-design-vue-jeecg/src/views/system/task/AgvTaskList.vue
@@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
64 | <!-- table区域-begin --> | 64 | <!-- table区域-begin --> |
65 | <div> | 65 | <div> |
66 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> | 66 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
67 | -<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> | 67 | +<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> |
68 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> | 68 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> |
69 | <!-- </div>--> | 69 | <!-- </div>--> |
70 | 70 |
ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue
@@ -94,7 +94,7 @@ | @@ -94,7 +94,7 @@ | ||
94 | <div> | 94 | <div> |
95 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> | 95 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
96 | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> | 96 | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> |
97 | -<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> | 97 | +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> |
98 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> | 98 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> |
99 | <!-- </div>--> | 99 | <!-- </div>--> |
100 | 100 |
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
@@ -88,7 +88,7 @@ | @@ -88,7 +88,7 @@ | ||
88 | <div> | 88 | <div> |
89 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> | 89 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
90 | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> | 90 | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> |
91 | -<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> | 91 | +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> |
92 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> | 92 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> |
93 | <!-- </div>--> | 93 | <!-- </div>--> |
94 | 94 | ||
@@ -188,8 +188,8 @@ export default { | @@ -188,8 +188,8 @@ export default { | ||
188 | description: '任务表管理页面', | 188 | description: '任务表管理页面', |
189 | zoneList: [], | 189 | zoneList: [], |
190 | isorter: { | 190 | isorter: { |
191 | - column: 'status', | ||
192 | - order: 'asc', | 191 | + column: 'id', |
192 | + order: 'desc', | ||
193 | }, | 193 | }, |
194 | // 表头 | 194 | // 表头 |
195 | columns: [ | 195 | columns: [ |
ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
@@ -88,7 +88,7 @@ | @@ -88,7 +88,7 @@ | ||
88 | <div> | 88 | <div> |
89 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> | 89 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
90 | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> | 90 | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> |
91 | -<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> | 91 | +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> |
92 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> | 92 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> |
93 | <!-- </div>--> | 93 | <!-- </div>--> |
94 | 94 |
ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | <div> | 30 | <div> |
31 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | 31 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
32 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | 32 | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
33 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 33 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 |
34 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 34 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
35 | </div> | 35 | </div> |
36 | 36 |
ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue
@@ -94,7 +94,7 @@ | @@ -94,7 +94,7 @@ | ||
94 | <div> | 94 | <div> |
95 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> | 95 | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
96 | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> | 96 | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a--> |
97 | -<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> | 97 | +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> |
98 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> | 98 | <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> |
99 | <!-- </div>--> | 99 | <!-- </div>--> |
100 | 100 |
ant-design-vue-jeecg/src/views/user/LoginSelectTenant.vue
@@ -100,12 +100,12 @@ export default { | @@ -100,12 +100,12 @@ export default { | ||
100 | let multi_depart = loginResult.multi_depart | 100 | let multi_depart = loginResult.multi_depart |
101 | //0:无部门 1:一个部门 2:多个部门 | 101 | //0:无部门 1:一个部门 2:多个部门 |
102 | if (multi_depart == 0) { | 102 | if (multi_depart == 0) { |
103 | - this.$notification.warn({ | ||
104 | - message: '提示', | ||
105 | - description: `您尚未归属部门,请确认账号信息`, | ||
106 | - duration: 3 | ||
107 | - }); | ||
108 | - this.isMultiDepart = false | 103 | + // this.$notification.warn({ |
104 | + // message: '提示', | ||
105 | + // description: `您尚未归属部门,请确认账号信息`, | ||
106 | + // duration: 3 | ||
107 | + // }); | ||
108 | + // this.isMultiDepart = false | ||
109 | } else if (multi_depart == 2) { | 109 | } else if (multi_depart == 2) { |
110 | this.visible = true | 110 | this.visible = true |
111 | this.isMultiDepart = true | 111 | this.isMultiDepart = true |
huaheng-wms-core/pom.xml
@@ -42,12 +42,18 @@ | @@ -42,12 +42,18 @@ | ||
42 | <groupId>org.redisson</groupId> | 42 | <groupId>org.redisson</groupId> |
43 | <artifactId>redisson</artifactId> | 43 | <artifactId>redisson</artifactId> |
44 | </dependency> | 44 | </dependency> |
45 | + | ||
45 | <dependency> | 46 | <dependency> |
46 | <groupId>cn.monitor4all</groupId> | 47 | <groupId>cn.monitor4all</groupId> |
47 | <artifactId>log-record-starter</artifactId> | 48 | <artifactId>log-record-starter</artifactId> |
48 | <version>1.3.1</version> | 49 | <version>1.3.1</version> |
49 | </dependency> | 50 | </dependency> |
50 | <dependency> | 51 | <dependency> |
52 | + <groupId>org.bouncycastle</groupId> | ||
53 | + <artifactId>bcprov-jdk15on</artifactId> | ||
54 | + <version>1.69</version> | ||
55 | + </dependency> | ||
56 | + <dependency> | ||
51 | <groupId>com.googlecode.log4jdbc</groupId> | 57 | <groupId>com.googlecode.log4jdbc</groupId> |
52 | <artifactId>log4jdbc</artifactId> | 58 | <artifactId>log4jdbc</artifactId> |
53 | <version>1.2</version> | 59 | <version>1.2</version> |
@@ -122,6 +128,12 @@ | @@ -122,6 +128,12 @@ | ||
122 | <artifactId>spring-boot-configuration-processor</artifactId> | 128 | <artifactId>spring-boot-configuration-processor</artifactId> |
123 | <optional>true</optional> | 129 | <optional>true</optional> |
124 | </dependency> | 130 | </dependency> |
131 | + <!--获取apk信息--> | ||
132 | + <dependency> | ||
133 | + <groupId>net.dongliu</groupId> | ||
134 | + <artifactId>apk-parser</artifactId> | ||
135 | + <version>2.5.3</version> | ||
136 | + </dependency> | ||
125 | </dependencies> | 137 | </dependencies> |
126 | 138 | ||
127 | <build> | 139 | <build> |
huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/CommonController.java
@@ -245,7 +245,7 @@ public class CommonController { | @@ -245,7 +245,7 @@ public class CommonController { | ||
245 | File file = new File(filePath); | 245 | File file = new File(filePath); |
246 | if (!file.exists()) { | 246 | if (!file.exists()) { |
247 | response.setStatus(404); | 247 | response.setStatus(404); |
248 | - throw new RuntimeException("文件[" + imgPath + "]不存在.."); | 248 | + return; |
249 | } | 249 | } |
250 | response.setContentType("application/force-download");// 设置强制下载不打开 | 250 | response.setContentType("application/force-download");// 设置强制下载不打开 |
251 | response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"), "iso-8859-1")); | 251 | response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"), "iso-8859-1")); |
@@ -277,7 +277,6 @@ public class CommonController { | @@ -277,7 +277,6 @@ public class CommonController { | ||
277 | } | 277 | } |
278 | } | 278 | } |
279 | } | 279 | } |
280 | - | ||
281 | } | 280 | } |
282 | 281 | ||
283 | // /** | 282 | // /** |
huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementSendController.java
@@ -31,6 +31,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | @@ -31,6 +31,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
31 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 31 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
32 | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; | 32 | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
33 | import com.baomidou.mybatisplus.core.metadata.IPage; | 33 | import com.baomidou.mybatisplus.core.metadata.IPage; |
34 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
34 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 35 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
35 | 36 | ||
36 | import lombok.extern.slf4j.Slf4j; | 37 | import lombok.extern.slf4j.Slf4j; |
@@ -198,7 +199,7 @@ public class SysAnnouncementSendController { | @@ -198,7 +199,7 @@ public class SysAnnouncementSendController { | ||
198 | String anntId = json.getString("anntId"); | 199 | String anntId = json.getString("anntId"); |
199 | LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); | 200 | LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); |
200 | String userId = sysUser.getId().toString(); | 201 | String userId = sysUser.getId().toString(); |
201 | - LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); | 202 | + LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = Wrappers.lambdaUpdate(); |
202 | updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); | 203 | updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); |
203 | updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); | 204 | updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); |
204 | updateWrapper.last("where annt_id ='" + anntId + "' and user_id ='" + userId + "'"); | 205 | updateWrapper.last("where annt_id ='" + anntId + "' and user_id ='" + userId + "'"); |
@@ -237,7 +238,7 @@ public class SysAnnouncementSendController { | @@ -237,7 +238,7 @@ public class SysAnnouncementSendController { | ||
237 | Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>(); | 238 | Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>(); |
238 | LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); | 239 | LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); |
239 | String userId = sysUser.getId().toString(); | 240 | String userId = sysUser.getId().toString(); |
240 | - LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); | 241 | + LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = Wrappers.lambdaUpdate(); |
241 | updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); | 242 | updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); |
242 | updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); | 243 | updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); |
243 | updateWrapper.last("where user_id ='" + userId + "'"); | 244 | updateWrapper.last("where user_id ='" + userId + "'"); |
huaheng-wms-core/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java
@@ -48,6 +48,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | @@ -48,6 +48,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
48 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 48 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
49 | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; | 49 | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
50 | import com.baomidou.mybatisplus.core.metadata.IPage; | 50 | import com.baomidou.mybatisplus.core.metadata.IPage; |
51 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
51 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 52 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
52 | import com.google.common.base.Joiner; | 53 | import com.google.common.base.Joiner; |
53 | 54 | ||
@@ -507,7 +508,7 @@ public class SysBaseApiImpl implements ISysBaseAPI { | @@ -507,7 +508,7 @@ public class SysBaseApiImpl implements ISysBaseAPI { | ||
507 | if (announcement != null) { | 508 | if (announcement != null) { |
508 | LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); | 509 | LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); |
509 | String userId = sysUser.getId().toString(); | 510 | String userId = sysUser.getId().toString(); |
510 | - LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); | 511 | + LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = Wrappers.lambdaUpdate(); |
511 | updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); | 512 | updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); |
512 | updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); | 513 | updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); |
513 | updateWrapper.last("where annt_id ='" + announcement.getId() + "' and user_id ='" + userId + "'"); | 514 | updateWrapper.last("where annt_id ='" + announcement.getId() + "' and user_id ='" + userId + "'"); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/acs/controller/AcsController.java
@@ -42,7 +42,6 @@ public class AcsController extends HuahengBaseController { | @@ -42,7 +42,6 @@ public class AcsController extends HuahengBaseController { | ||
42 | // @ApiLogger(apiName = "API接口第三方Token校验测试", from = "TEST") | 42 | // @ApiLogger(apiName = "API接口第三方Token校验测试", from = "TEST") |
43 | @ResponseBody | 43 | @ResponseBody |
44 | @PostMapping(value = "/testTokenCheck") | 44 | @PostMapping(value = "/testTokenCheck") |
45 | - @OperationLog(bizType = "'物料追踪'", tag = "'入库完成'", bizId = "#paramMap.get('bizId')", extra = "#jsonString", msg = "'测试操作日志'", recordReturnValue = true) | ||
46 | public Result<?> testTokenCheck(@RequestBody Map<String, String> paramMap, HttpServletRequest request) { | 45 | public Result<?> testTokenCheck(@RequestBody Map<String, String> paramMap, HttpServletRequest request) { |
47 | return Result.ok(); | 46 | return Result.ok(); |
48 | } | 47 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mes/servuce/impl/MesServiceImpl.java
@@ -126,7 +126,7 @@ public class MesServiceImpl implements IMesService { | @@ -126,7 +126,7 @@ public class MesServiceImpl implements IMesService { | ||
126 | receive.setContainerCode(containerCode); | 126 | receive.setContainerCode(containerCode); |
127 | receive.setMaterialCode(materialCode); | 127 | receive.setMaterialCode(materialCode); |
128 | receive.setMaterialName(receiptDetail.getMaterialName()); | 128 | receive.setMaterialName(receiptDetail.getMaterialName()); |
129 | - receive.setMateiralSpec(receiptDetail.getMaterialSpec()); | 129 | + receive.setMaterialSpec(receiptDetail.getMaterialSpec()); |
130 | receive.setMaterialUnit(receiptDetail.getMaterialUnit()); | 130 | receive.setMaterialUnit(receiptDetail.getMaterialUnit()); |
131 | receive.setInventoryStatus(receiptDetail.getInventoryStatus()); | 131 | receive.setInventoryStatus(receiptDetail.getInventoryStatus()); |
132 | receive.setQty(receiptDetail.getQty()); | 132 | receive.setQty(receiptDetail.getQty()); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/controller/MobileController.java
1 | package org.jeecg.modules.wms.api.mobile.controller; | 1 | package org.jeecg.modules.wms.api.mobile.controller; |
2 | 2 | ||
3 | +import com.alibaba.fastjson.JSONException; | ||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
5 | import io.swagger.annotations.Api; | 6 | import io.swagger.annotations.Api; |
7 | +import io.swagger.annotations.ApiOperation; | ||
6 | import org.jeecg.common.api.vo.Result; | 8 | import org.jeecg.common.api.vo.Result; |
7 | import org.jeecg.modules.system.entity.SysDictItem; | 9 | import org.jeecg.modules.system.entity.SysDictItem; |
8 | import org.jeecg.modules.system.service.impl.SysDictItemServiceImpl; | 10 | import org.jeecg.modules.system.service.impl.SysDictItemServiceImpl; |
9 | import org.jeecg.modules.wms.api.mobile.entity.TvTaskVo; | 11 | import org.jeecg.modules.wms.api.mobile.entity.TvTaskVo; |
12 | +import org.jeecg.modules.wms.monitor.apkinfo.entity.ApkInfo; | ||
13 | +import org.jeecg.modules.wms.monitor.apkinfo.service.IApkInfoService; | ||
10 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskDetail; | 14 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskDetail; |
11 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; | 15 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
12 | import org.jeecg.modules.wms.task.taskHeader.service.impl.TaskDetailServiceImpl; | 16 | import org.jeecg.modules.wms.task.taskHeader.service.impl.TaskDetailServiceImpl; |
13 | import org.jeecg.modules.wms.task.taskHeader.service.impl.TaskHeaderServiceImpl; | 17 | import org.jeecg.modules.wms.task.taskHeader.service.impl.TaskHeaderServiceImpl; |
14 | import org.jeecg.utils.StringUtils; | 18 | import org.jeecg.utils.StringUtils; |
15 | import org.jeecg.utils.constant.QuantityConstant; | 19 | import org.jeecg.utils.constant.QuantityConstant; |
16 | -import org.springframework.web.bind.annotation.GetMapping; | ||
17 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
18 | -import org.springframework.web.bind.annotation.RestController; | 20 | +import org.springframework.beans.factory.annotation.Value; |
21 | +import org.springframework.web.bind.annotation.*; | ||
19 | 22 | ||
20 | import javax.annotation.Resource; | 23 | import javax.annotation.Resource; |
21 | -import java.util.ArrayList; | ||
22 | -import java.util.Arrays; | ||
23 | -import java.util.HashMap; | ||
24 | -import java.util.List; | 24 | +import java.util.*; |
25 | 25 | ||
26 | /** | 26 | /** |
27 | */ | 27 | */ |
@@ -30,6 +30,12 @@ import java.util.List; | @@ -30,6 +30,12 @@ import java.util.List; | ||
30 | @RequestMapping("/api/mobile") | 30 | @RequestMapping("/api/mobile") |
31 | public class MobileController { | 31 | public class MobileController { |
32 | 32 | ||
33 | + @Value(value = "${server.servlet.context-path}") | ||
34 | + private String ctx; | ||
35 | + | ||
36 | + @Resource | ||
37 | + private IApkInfoService apkInfoService; | ||
38 | + | ||
33 | @Resource | 39 | @Resource |
34 | private TaskHeaderServiceImpl taskHeaderService; | 40 | private TaskHeaderServiceImpl taskHeaderService; |
35 | 41 | ||
@@ -87,4 +93,31 @@ public class MobileController { | @@ -87,4 +93,31 @@ public class MobileController { | ||
87 | } | 93 | } |
88 | return Result.OK("", list); | 94 | return Result.OK("", list); |
89 | } | 95 | } |
96 | + | ||
97 | + @PostMapping("/getUpdateApkInfo") | ||
98 | + @ApiOperation("获取apk更新信息") | ||
99 | + public Result getUpdateApkInfo(@RequestBody Map<String, String> param) { | ||
100 | + System.out.println("getUpdateApkInfo pkgName:" + param.get("pkgName")); | ||
101 | + String pkgName = param.get("pkgName"); | ||
102 | + String versionCode = param.get("versionCode"); | ||
103 | + if (StringUtils.isEmpty(pkgName)) { | ||
104 | + throw new JSONException("pkgName不能为空"); | ||
105 | + } | ||
106 | + if (StringUtils.isEmpty(versionCode)) { | ||
107 | + throw new JSONException("versionCode不能为空"); | ||
108 | + } | ||
109 | + | ||
110 | + LambdaQueryWrapper<ApkInfo> query = Wrappers.lambdaQuery(); | ||
111 | + query.eq(ApkInfo::getPkgname, pkgName) | ||
112 | + .orderByDesc(ApkInfo::getVersioncode) | ||
113 | + .last(" limit 1"); | ||
114 | + ApkInfo apkInfo = apkInfoService.getOne(query); | ||
115 | + if (apkInfo == null ){ | ||
116 | + return Result.error("服务器上找不到安装包:" + pkgName); | ||
117 | + }else if(apkInfo.getVersioncode() <= Integer.parseInt(versionCode)){ | ||
118 | + return Result.ok("当前已经是最新版本"); | ||
119 | + } | ||
120 | + apkInfo.setUrl(ctx + apkInfo.getUrl()); | ||
121 | + return Result.ok(apkInfo); | ||
122 | + } | ||
90 | } | 123 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/service/impl/MobileService.java
@@ -169,7 +169,7 @@ public class MobileService implements IMobileService { | @@ -169,7 +169,7 @@ public class MobileService implements IMobileService { | ||
169 | v.setMaterialCode(d.getMaterialCode()); | 169 | v.setMaterialCode(d.getMaterialCode()); |
170 | v.setMaterialName(d.getMaterialName()); | 170 | v.setMaterialName(d.getMaterialName()); |
171 | v.setBatch(d.getBatch()); | 171 | v.setBatch(d.getBatch()); |
172 | - v.setMateiralSpec(d.getMaterialSpec()); | 172 | + v.setMaterialSpec(d.getMaterialSpec()); |
173 | v.setMaterialUnit(d.getMaterialUnit()); | 173 | v.setMaterialUnit(d.getMaterialUnit()); |
174 | v.setContainerCode(bean.getContainerCode()); | 174 | v.setContainerCode(bean.getContainerCode()); |
175 | receiveList.add(v); | 175 | receiveList.add(v); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
@@ -166,19 +166,16 @@ public class WcsServiceImpl implements WcsService { | @@ -166,19 +166,16 @@ public class WcsServiceImpl implements WcsService { | ||
166 | if (StringUtils.isEmpty(locationCode)) { | 166 | if (StringUtils.isEmpty(locationCode)) { |
167 | return Result.error("分配库位时,没有库位可分配"); | 167 | return Result.error("分配库位时,没有库位可分配"); |
168 | } | 168 | } |
169 | - boolean success = | ||
170 | - locationService.updateStatusByOriginStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | 169 | + boolean success = locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
171 | if (!success) { | 170 | if (!success) { |
172 | throw new JeecgBootException("分配库位时,更新库位状态失败"); | 171 | throw new JeecgBootException("分配库位时,更新库位状态失败"); |
173 | } | 172 | } |
174 | if (StringUtils.isNotEmpty(taskHeader.getToLocationCode()) && !locationCode.equals(taskHeader.getToLocationCode())) { | 173 | if (StringUtils.isNotEmpty(taskHeader.getToLocationCode()) && !locationCode.equals(taskHeader.getToLocationCode())) { |
175 | - success = locationService.updateStatusByOriginStatus(taskHeader.getToLocationCode(), QuantityConstant.STATUS_LOCATION_EMPTY, | ||
176 | - QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); | 174 | + success = locationService.updateStatus(taskHeader.getToLocationCode(), QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); |
177 | if (!success) { | 175 | if (!success) { |
178 | throw new JeecgBootException("分配库位时,更新之前分配的库位状态失败"); | 176 | throw new JeecgBootException("分配库位时,更新之前分配的库位状态失败"); |
179 | } | 177 | } |
180 | } | 178 | } |
181 | - | ||
182 | List<ReceiptContainerDetail> receiptContainerDetailList = new ArrayList<>(); | 179 | List<ReceiptContainerDetail> receiptContainerDetailList = new ArrayList<>(); |
183 | if (taskType == QuantityConstant.TASK_TYPE_WHOLERECEIPT || taskType == QuantityConstant.TASK_TYPE_EMPTYRECEIPT) { | 180 | if (taskType == QuantityConstant.TASK_TYPE_WHOLERECEIPT || taskType == QuantityConstant.TASK_TYPE_EMPTYRECEIPT) { |
184 | for (TaskDetail taskDetail : taskDetailList) { | 181 | for (TaskDetail taskDetail : taskDetailList) { |
@@ -594,8 +591,7 @@ public class WcsServiceImpl implements WcsService { | @@ -594,8 +591,7 @@ public class WcsServiceImpl implements WcsService { | ||
594 | } | 591 | } |
595 | } | 592 | } |
596 | // 6. 锁定WMS分配的库位 | 593 | // 6. 锁定WMS分配的库位 |
597 | - boolean success = | ||
598 | - locationService.updateStatusByOriginStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | 594 | + boolean success = locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
599 | if (!success) { | 595 | if (!success) { |
600 | throw new JeecgBootException("重入处理失败, 更新库位状态失败"); | 596 | throw new JeecgBootException("重入处理失败, 更新库位状态失败"); |
601 | } | 597 | } |
@@ -686,7 +682,8 @@ public class WcsServiceImpl implements WcsService { | @@ -686,7 +682,8 @@ public class WcsServiceImpl implements WcsService { | ||
686 | @Transactional(rollbackFor = Exception.class) | 682 | @Transactional(rollbackFor = Exception.class) |
687 | public Result manyEmptyOut(String zoneCode, String port, String warehouseCode) { | 683 | public Result manyEmptyOut(String zoneCode, String port, String warehouseCode) { |
688 | LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); | 684 | LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); |
689 | - containerLambdaQueryWrapper.eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_MANY).eq(Container::getWarehouseCode, warehouseCode); | 685 | + containerLambdaQueryWrapper.eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_EMPTY) |
686 | + .eq(Container::getFillStatus, QuantityConstant.STATUS_CONTAINER_FILL_MANY).eq(Container::getWarehouseCode, warehouseCode); | ||
690 | List<Container> containerList = containerService.list(containerLambdaQueryWrapper); | 687 | List<Container> containerList = containerService.list(containerLambdaQueryWrapper); |
691 | List<Container> removeContainerList = new ArrayList<>(); | 688 | List<Container> removeContainerList = new ArrayList<>(); |
692 | if (containerList != null && containerList.size() > 0) { | 689 | if (containerList != null && containerList.size() > 0) { |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/controller/ContainerController.java
@@ -94,11 +94,10 @@ public class ContainerController extends JeecgController<Container, IContainerSe | @@ -94,11 +94,10 @@ public class ContainerController extends JeecgController<Container, IContainerSe | ||
94 | @ApiOperation(value = "容器管理-添加", notes = "容器管理-添加") | 94 | @ApiOperation(value = "容器管理-添加", notes = "容器管理-添加") |
95 | @PostMapping(value = "/add") | 95 | @PostMapping(value = "/add") |
96 | @RequiresPermissions("container:add") | 96 | @RequiresPermissions("container:add") |
97 | - public Result<String> add(@RequestBody Container container, HttpServletRequest req) { | 97 | + public Result<?> add(@RequestBody Container container, HttpServletRequest req) { |
98 | HuahengJwtUtil.setWarehouseCode(req, container); | 98 | HuahengJwtUtil.setWarehouseCode(req, container); |
99 | int number = Integer.parseInt(container.getUserdef1()); | 99 | int number = Integer.parseInt(container.getUserdef1()); |
100 | - Result result = containerService.batchAddContainers(container, number); | ||
101 | - return result; | 100 | + return containerService.batchAddContainers(container, number); |
102 | } | 101 | } |
103 | 102 | ||
104 | /** | 103 | /** |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/entity/Container.java
@@ -65,10 +65,10 @@ public class Container implements Serializable { | @@ -65,10 +65,10 @@ public class Container implements Serializable { | ||
65 | @Dict(dicCode = "container_status") | 65 | @Dict(dicCode = "container_status") |
66 | @ApiModelProperty(value = "容器状态") | 66 | @ApiModelProperty(value = "容器状态") |
67 | private String status; | 67 | private String status; |
68 | - /** 上次容器状态 */ | ||
69 | - @Excel(name = "上次容器状态", width = 15) | ||
70 | - @ApiModelProperty(value = "上次容器状态") | ||
71 | - private String lastStatus; | 68 | + @Excel(name = "填充状态", width = 15, dicCode = "fill_status") |
69 | + @Dict(dicCode = "fill_status") | ||
70 | + @ApiModelProperty(value = "填充状态") | ||
71 | + private String fillStatus; | ||
72 | /** 备用字段1 */ | 72 | /** 备用字段1 */ |
73 | @Excel(name = "备用字段1", width = 15) | 73 | @Excel(name = "备用字段1", width = 15) |
74 | @ApiModelProperty(value = "备用字段1") | 74 | @ApiModelProperty(value = "备用字段1") |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/IContainerService.java
@@ -19,22 +19,12 @@ public interface IContainerService extends IService<Container> { | @@ -19,22 +19,12 @@ public interface IContainerService extends IService<Container> { | ||
19 | 19 | ||
20 | Container getContainerByCode(String containCode, String warehouseCode); | 20 | Container getContainerByCode(String containCode, String warehouseCode); |
21 | 21 | ||
22 | - boolean updateStatus(String containerCode, String status, String wareohuseCode); | ||
23 | - | ||
24 | - /** | ||
25 | - * 更新容器状态status,条件是originStatus,如果originStatus条件不满足,那么返回false | ||
26 | - * @param containerCode | ||
27 | - * @param status | ||
28 | - * @param originStatus | ||
29 | - * @param wareohuseCode | ||
30 | - * @return | ||
31 | - */ | ||
32 | - boolean updateStatusByOriginStatus(String containerCode, String status, String originStatus, String wareohuseCode); | ||
33 | - | ||
34 | - boolean restoreContainer(String containerCode, String wareohuseCode); | 22 | + boolean updateStatus(String containerCode, String status, String warehouseCode); |
35 | 23 | ||
36 | boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String warehouseCode); | 24 | boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String warehouseCode); |
37 | 25 | ||
26 | + boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String fillStatus, String warehouseCode); | ||
27 | + | ||
38 | // 创建零时容器 | 28 | // 创建零时容器 |
39 | Container createLSContainer(String warehouseCode); | 29 | Container createLSContainer(String warehouseCode); |
40 | 30 | ||
@@ -45,5 +35,5 @@ public interface IContainerService extends IService<Container> { | @@ -45,5 +35,5 @@ public interface IContainerService extends IService<Container> { | ||
45 | */ | 35 | */ |
46 | boolean havaLocationCodeByContainer(String locationCode, String containerCode, String warehouseCode); | 36 | boolean havaLocationCodeByContainer(String locationCode, String containerCode, String warehouseCode); |
47 | 37 | ||
48 | - List<Container> getContainerListByCodeList(List<String> containCodeList, String warehouseCode); | 38 | + List<Container> getContainerListByCodeList(List<String> containerCodeList, String warehouseCode); |
49 | } | 39 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java
@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service; | @@ -19,6 +19,7 @@ import org.springframework.stereotype.Service; | ||
19 | import org.springframework.transaction.annotation.Transactional; | 19 | import org.springframework.transaction.annotation.Transactional; |
20 | 20 | ||
21 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 21 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
22 | +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | ||
22 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 23 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
23 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 24 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
24 | 25 | ||
@@ -50,6 +51,7 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container | @@ -50,6 +51,7 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container | ||
50 | String code = String.format("%s%05d", containerTypeCode, startNumber); | 51 | String code = String.format("%s%05d", containerTypeCode, startNumber); |
51 | container1.setCode(code); | 52 | container1.setCode(code); |
52 | container1.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); | 53 | container1.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); |
54 | + container1.setFillStatus(QuantityConstant.STATUS_CONTAINER_FILL_EMPTY); | ||
53 | container1.setWarehouseCode(warehouseCode); | 55 | container1.setWarehouseCode(warehouseCode); |
54 | containerList.add(container1); | 56 | containerList.add(container1); |
55 | } | 57 | } |
@@ -69,60 +71,27 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container | @@ -69,60 +71,27 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container | ||
69 | } | 71 | } |
70 | 72 | ||
71 | @Override | 73 | @Override |
72 | - public boolean updateStatus(String containerCode, String status, String wareohuseCode) { | ||
73 | - Container container = this.getContainerByCode(containerCode, wareohuseCode); | ||
74 | - if (container == null) { | ||
75 | - return false; | ||
76 | - } | ||
77 | - container.setLastStatus(container.getStatus()); | ||
78 | - container.setStatus(status); | ||
79 | - boolean result = this.updateById(container); | ||
80 | - return result; | ||
81 | - } | ||
82 | - | ||
83 | - @Override | ||
84 | - public boolean updateStatusByOriginStatus(String containerCode, String status, String originStatus, String wareohuseCode) { | ||
85 | - Container container = this.getContainerByCode(containerCode, wareohuseCode); | ||
86 | - if (container == null) { | ||
87 | - return false; | ||
88 | - } | ||
89 | - container.setLastStatus(container.getStatus()); | ||
90 | - container.setStatus(status); | ||
91 | - LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
92 | - containerLambdaQueryWrapper.eq(Container::getCode, containerCode).eq(Container::getStatus, originStatus).eq(Container::getWarehouseCode, wareohuseCode); | ||
93 | - boolean result = this.update(container, containerLambdaQueryWrapper); | ||
94 | - return result; | 74 | + public boolean updateStatus(String containerCode, String status, String warehouseCode) { |
75 | + LambdaUpdateWrapper<Container> updateWrapper = Wrappers.lambdaUpdate(); | ||
76 | + updateWrapper.ne(Container::getStatus, status).eq(Container::getCode, containerCode).eq(Container::getWarehouseCode, warehouseCode).set(Container::getStatus, | ||
77 | + status); | ||
78 | + return update(updateWrapper); | ||
95 | } | 79 | } |
96 | 80 | ||
97 | @Override | 81 | @Override |
98 | - public boolean restoreContainer(String containerCode, String wareohuseCode) { | ||
99 | - Container container = this.getContainerByCode(containerCode, wareohuseCode); | ||
100 | - if (container == null) { | ||
101 | - return false; | ||
102 | - } | ||
103 | - container.setLastStatus(container.getStatus()); | ||
104 | - container.setStatus(container.getLastStatus()); | ||
105 | - boolean result = this.updateById(container); | ||
106 | - return result; | 82 | + public boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String warehouseCode) { |
83 | + LambdaUpdateWrapper<Container> updateWrapper = Wrappers.lambdaUpdate(); | ||
84 | + updateWrapper.ne(Container::getStatus, status).eq(Container::getCode, containerCode).eq(Container::getWarehouseCode, warehouseCode) | ||
85 | + .set(Container::getLocationCode, locationCode).set(Container::getStatus, status); | ||
86 | + return update(updateWrapper); | ||
107 | } | 87 | } |
108 | 88 | ||
109 | @Override | 89 | @Override |
110 | - public boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String warehouseCode) { | ||
111 | - Container container = getContainerByCode(containerCode, warehouseCode); | ||
112 | - if (container == null) { | ||
113 | - return false; | ||
114 | - } | ||
115 | - boolean success = false; | ||
116 | - if (StringUtils.isNotEmpty(locationCode)) { | ||
117 | - success = havaLocationCodeByContainer(locationCode, containerCode, warehouseCode); | ||
118 | - if (success) { | ||
119 | - throw new JeecgBootException("容器表已经存在这个库位号,不能再写入"); | ||
120 | - } | ||
121 | - } | ||
122 | - container.setStatus(status); | ||
123 | - container.setLocationCode(locationCode); | ||
124 | - success = updateById(container); | ||
125 | - return success; | 90 | + public boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String fillStatus, String warehouseCode) { |
91 | + LambdaUpdateWrapper<Container> updateWrapper = Wrappers.lambdaUpdate(); | ||
92 | + updateWrapper.ne(Container::getStatus, status).eq(Container::getCode, containerCode).eq(Container::getWarehouseCode, warehouseCode) | ||
93 | + .set(Container::getLocationCode, locationCode).set(Container::getStatus, status).set(Container::getFillStatus, fillStatus); | ||
94 | + return update(updateWrapper); | ||
126 | } | 95 | } |
127 | 96 | ||
128 | @Override | 97 | @Override |
@@ -132,6 +101,7 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container | @@ -132,6 +101,7 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container | ||
132 | container.setCode(code); | 101 | container.setCode(code); |
133 | container.setWarehouseCode(warehouseCode); | 102 | container.setWarehouseCode(warehouseCode); |
134 | container.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); | 103 | container.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); |
104 | + container.setFillStatus(QuantityConstant.STATUS_CONTAINER_FILL_EMPTY); | ||
135 | if (!save(container)) { | 105 | if (!save(container)) { |
136 | throw new JeecgBootException("新增容器失败"); | 106 | throw new JeecgBootException("新增容器失败"); |
137 | } | 107 | } |
@@ -159,9 +129,9 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container | @@ -159,9 +129,9 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container | ||
159 | } | 129 | } |
160 | 130 | ||
161 | @Override | 131 | @Override |
162 | - public List<Container> getContainerListByCodeList(List<String> containCodeList, String warehouseCode) { | 132 | + public List<Container> getContainerListByCodeList(List<String> containerCodeList, String warehouseCode) { |
163 | LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); | 133 | LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); |
164 | - containerLambdaQueryWrapper.in(Container::getCode, containCodeList).eq(Container::getWarehouseCode, warehouseCode); | 134 | + containerLambdaQueryWrapper.in(Container::getCode, containerCodeList).eq(Container::getWarehouseCode, warehouseCode); |
165 | List<Container> containerList = list(containerLambdaQueryWrapper); | 135 | List<Container> containerList = list(containerLambdaQueryWrapper); |
166 | return containerList; | 136 | return containerList; |
167 | } | 137 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/controller/ContainerCapacityController.java
1 | package org.jeecg.modules.wms.config.containerCapacity.controller; | 1 | package org.jeecg.modules.wms.config.containerCapacity.controller; |
2 | 2 | ||
3 | import java.util.Arrays; | 3 | import java.util.Arrays; |
4 | +import java.util.HashMap; | ||
4 | import java.util.List; | 5 | import java.util.List; |
5 | import java.util.Map; | 6 | import java.util.Map; |
7 | +import java.util.Set; | ||
8 | +import java.util.function.Function; | ||
6 | import java.util.stream.Collectors; | 9 | import java.util.stream.Collectors; |
7 | -import java.io.IOException; | ||
8 | -import java.io.UnsupportedEncodingException; | ||
9 | -import java.net.URLDecoder; | 10 | + |
10 | import javax.servlet.http.HttpServletRequest; | 11 | import javax.servlet.http.HttpServletRequest; |
11 | import javax.servlet.http.HttpServletResponse; | 12 | import javax.servlet.http.HttpServletResponse; |
12 | 13 | ||
13 | import org.apache.shiro.authz.annotation.RequiresPermissions; | 14 | import org.apache.shiro.authz.annotation.RequiresPermissions; |
14 | import org.jeecg.common.api.vo.Result; | 15 | import org.jeecg.common.api.vo.Result; |
16 | +import org.jeecg.common.aspect.annotation.AutoLog; | ||
17 | +import org.jeecg.common.system.base.controller.JeecgController; | ||
15 | import org.jeecg.common.system.query.QueryGenerator; | 18 | import org.jeecg.common.system.query.QueryGenerator; |
19 | +import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity; | ||
20 | +import org.jeecg.modules.wms.config.containerCapacity.service.IContainerCapacityService; | ||
21 | +import org.jeecg.modules.wms.config.location.entity.Location; | ||
22 | +import org.jeecg.modules.wms.config.material.entity.Material; | ||
23 | +import org.jeecg.modules.wms.config.material.service.IMaterialService; | ||
16 | import org.jeecg.utils.HuahengJwtUtil; | 24 | import org.jeecg.utils.HuahengJwtUtil; |
17 | -import org.jeecg.common.util.oConvertUtils; | 25 | +import org.jeecg.utils.StringUtils; |
26 | +import org.springframework.beans.factory.annotation.Autowired; | ||
27 | +import org.springframework.util.CollectionUtils; | ||
28 | +import org.springframework.web.bind.annotation.DeleteMapping; | ||
29 | +import org.springframework.web.bind.annotation.GetMapping; | ||
30 | +import org.springframework.web.bind.annotation.PostMapping; | ||
31 | +import org.springframework.web.bind.annotation.RequestBody; | ||
32 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
33 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
34 | +import org.springframework.web.bind.annotation.RequestParam; | ||
35 | +import org.springframework.web.bind.annotation.RestController; | ||
36 | +import org.springframework.web.servlet.ModelAndView; | ||
18 | 37 | ||
38 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
19 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 39 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
20 | import com.baomidou.mybatisplus.core.metadata.IPage; | 40 | import com.baomidou.mybatisplus.core.metadata.IPage; |
41 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
21 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 42 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
22 | -import lombok.extern.slf4j.Slf4j; | ||
23 | 43 | ||
24 | -import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity; | ||
25 | -import org.jeecg.modules.wms.config.containerCapacity.service.IContainerCapacityService; | ||
26 | -import org.jeecg.utils.StringUtils; | ||
27 | -import org.jeecgframework.poi.excel.ExcelImportUtil; | ||
28 | -import org.jeecgframework.poi.excel.def.NormalExcelConstants; | ||
29 | -import org.jeecgframework.poi.excel.entity.ExportParams; | ||
30 | -import org.jeecgframework.poi.excel.entity.ImportParams; | ||
31 | -import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; | ||
32 | -import org.jeecg.common.system.base.controller.JeecgController; | ||
33 | -import org.springframework.beans.factory.annotation.Autowired; | ||
34 | -import org.springframework.web.bind.annotation.*; | ||
35 | -import org.springframework.web.multipart.MultipartFile; | ||
36 | -import org.springframework.web.multipart.MultipartHttpServletRequest; | ||
37 | -import org.springframework.web.servlet.ModelAndView; | ||
38 | -import com.alibaba.fastjson.JSON; | ||
39 | import io.swagger.annotations.Api; | 44 | import io.swagger.annotations.Api; |
40 | import io.swagger.annotations.ApiOperation; | 45 | import io.swagger.annotations.ApiOperation; |
41 | -import org.jeecg.common.aspect.annotation.AutoLog; | 46 | +import lombok.extern.slf4j.Slf4j; |
42 | 47 | ||
43 | /** | 48 | /** |
44 | * @Description: 容器容量管理 | 49 | * @Description: 容器容量管理 |
@@ -54,6 +59,9 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci | @@ -54,6 +59,9 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci | ||
54 | @Autowired | 59 | @Autowired |
55 | private IContainerCapacityService containerCapacityService; | 60 | private IContainerCapacityService containerCapacityService; |
56 | 61 | ||
62 | + @Autowired | ||
63 | + private IMaterialService materialService; | ||
64 | + | ||
57 | /** | 65 | /** |
58 | * 分页列表查询 | 66 | * 分页列表查询 |
59 | * @param containerCapacity | 67 | * @param containerCapacity |
@@ -71,6 +79,28 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci | @@ -71,6 +79,28 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci | ||
71 | QueryWrapper<ContainerCapacity> queryWrapper = QueryGenerator.initQueryWrapper(containerCapacity, req.getParameterMap()); | 79 | QueryWrapper<ContainerCapacity> queryWrapper = QueryGenerator.initQueryWrapper(containerCapacity, req.getParameterMap()); |
72 | Page<ContainerCapacity> page = new Page<ContainerCapacity>(pageNo, pageSize); | 80 | Page<ContainerCapacity> page = new Page<ContainerCapacity>(pageNo, pageSize); |
73 | IPage<ContainerCapacity> pageList = containerCapacityService.page(page, queryWrapper); | 81 | IPage<ContainerCapacity> pageList = containerCapacityService.page(page, queryWrapper); |
82 | + List<ContainerCapacity> containerCapacityList = pageList.getRecords(); | ||
83 | + Map<String, Material> materialMap = new HashMap<String, Material>(); | ||
84 | + if (!CollectionUtils.isEmpty(containerCapacityList)) { | ||
85 | + Set<String> materialCodeSet = | ||
86 | + containerCapacityList.stream().filter(t -> StringUtils.isNotEmpty(t.getMaterialCode())).map(t -> t.getMaterialCode()).collect(Collectors.toSet()); | ||
87 | + if (!CollectionUtils.isEmpty(materialCodeSet)) { | ||
88 | + LambdaQueryWrapper<Material> materialLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
89 | + HuahengJwtUtil.setWarehouseCode(materialLambdaQueryWrapper, Material.class, req); | ||
90 | + materialLambdaQueryWrapper.in(Material::getCode, materialCodeSet); | ||
91 | + List<Material> materialList = materialService.list(materialLambdaQueryWrapper); | ||
92 | + if (!CollectionUtils.isEmpty(materialList)) { | ||
93 | + materialMap.putAll(materialList.stream().collect(Collectors.toMap(Material::getCode, Function.identity(), (key1, key2) -> key2))); | ||
94 | + } | ||
95 | + } | ||
96 | + } | ||
97 | + for (ContainerCapacity pageObject : containerCapacityList) { | ||
98 | + Material material = materialMap.get(pageObject.getMaterialCode()); | ||
99 | + if (material != null) { | ||
100 | + pageObject.setMaterialName(material.getName()); | ||
101 | + pageObject.setMaterialUnit(material.getUnit()); | ||
102 | + } | ||
103 | + } | ||
74 | return Result.OK(pageList); | 104 | return Result.OK(pageList); |
75 | } | 105 | } |
76 | 106 |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/entity/ContainerCapacity.java
@@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException; | @@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException; | ||
5 | import java.util.Date; | 5 | import java.util.Date; |
6 | import java.math.BigDecimal; | 6 | import java.math.BigDecimal; |
7 | import com.baomidou.mybatisplus.annotation.IdType; | 7 | import com.baomidou.mybatisplus.annotation.IdType; |
8 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
8 | import com.baomidou.mybatisplus.annotation.TableId; | 9 | import com.baomidou.mybatisplus.annotation.TableId; |
9 | import com.baomidou.mybatisplus.annotation.TableName; | 10 | import com.baomidou.mybatisplus.annotation.TableName; |
10 | import lombok.Data; | 11 | import lombok.Data; |
@@ -35,60 +36,57 @@ public class ContainerCapacity implements Serializable { | @@ -35,60 +36,57 @@ public class ContainerCapacity implements Serializable { | ||
35 | @TableId(type = IdType.AUTO) | 36 | @TableId(type = IdType.AUTO) |
36 | @ApiModelProperty(value = "主键") | 37 | @ApiModelProperty(value = "主键") |
37 | private Integer id; | 38 | private Integer id; |
39 | + | ||
38 | /** 容器类型 */ | 40 | /** 容器类型 */ |
39 | @Excel(name = "容器类型", width = 15) | 41 | @Excel(name = "容器类型", width = 15) |
40 | @ApiModelProperty(value = "容器类型") | 42 | @ApiModelProperty(value = "容器类型") |
41 | private String containerTypeCode; | 43 | private String containerTypeCode; |
44 | + | ||
42 | /** 仓库编码 */ | 45 | /** 仓库编码 */ |
43 | @Excel(name = "仓库编码", width = 15) | 46 | @Excel(name = "仓库编码", width = 15) |
44 | @ApiModelProperty(value = "仓库编码") | 47 | @ApiModelProperty(value = "仓库编码") |
45 | private String warehouseCode; | 48 | private String warehouseCode; |
46 | - /** 货主 */ | ||
47 | - @Excel(name = "货主", width = 15) | ||
48 | - @ApiModelProperty(value = "货主") | ||
49 | - private String companyCode; | 49 | + |
50 | /** 物料编码 */ | 50 | /** 物料编码 */ |
51 | @Excel(name = "物料编码", width = 15) | 51 | @Excel(name = "物料编码", width = 15) |
52 | @ApiModelProperty(value = "物料编码") | 52 | @ApiModelProperty(value = "物料编码") |
53 | private String materialCode; | 53 | private String materialCode; |
54 | + | ||
54 | /** 物料名称 */ | 55 | /** 物料名称 */ |
55 | - @Excel(name = "物料名称", width = 15) | 56 | + // @Excel(name = "物料名称", width = 15) |
56 | @ApiModelProperty(value = "物料名称") | 57 | @ApiModelProperty(value = "物料名称") |
58 | + @TableField(exist = false) | ||
57 | private String materialName; | 59 | private String materialName; |
60 | + | ||
58 | /** 物料单位 */ | 61 | /** 物料单位 */ |
59 | - @Excel(name = "物料单位", width = 15) | 62 | + // @Excel(name = "物料单位", width = 15) |
60 | @ApiModelProperty(value = "物料单位") | 63 | @ApiModelProperty(value = "物料单位") |
64 | + @TableField(exist = false) | ||
61 | private String materialUnit; | 65 | private String materialUnit; |
62 | - /** 存放数量 */ | ||
63 | - @Excel(name = "存放数量", width = 15) | ||
64 | - @ApiModelProperty(value = "存放数量") | 66 | + |
67 | + /** 容量 */ | ||
68 | + @Excel(name = "容量", width = 15) | ||
69 | + @ApiModelProperty(value = "容量") | ||
65 | private BigDecimal qty; | 70 | private BigDecimal qty; |
71 | + | ||
66 | /** 是否可用 */ | 72 | /** 是否可用 */ |
67 | @Excel(name = "是否可用", width = 15, dicCode = "enable_status") | 73 | @Excel(name = "是否可用", width = 15, dicCode = "enable_status") |
68 | @Dict(dicCode = "enable_status") | 74 | @Dict(dicCode = "enable_status") |
69 | @ApiModelProperty(value = "是否可用") | 75 | @ApiModelProperty(value = "是否可用") |
70 | private Integer enable; | 76 | private Integer enable; |
71 | - /** 备用字段1 */ | ||
72 | - @Excel(name = "备用字段1", width = 15) | ||
73 | - @ApiModelProperty(value = "备用字段1") | ||
74 | - private String userdef1; | ||
75 | - /** 备用字段2 */ | ||
76 | - @Excel(name = "备用字段2", width = 15) | ||
77 | - @ApiModelProperty(value = "备用字段2") | ||
78 | - private String userdef2; | ||
79 | - /** 备用字段3 */ | ||
80 | - @Excel(name = "备用字段3", width = 15) | ||
81 | - @ApiModelProperty(value = "备用字段3") | ||
82 | - private String userdef3; | 77 | + |
83 | /** 创建人 */ | 78 | /** 创建人 */ |
84 | @ApiModelProperty(value = "创建人") | 79 | @ApiModelProperty(value = "创建人") |
85 | private String createBy; | 80 | private String createBy; |
81 | + | ||
86 | /** 创建日期 */ | 82 | /** 创建日期 */ |
87 | @ApiModelProperty(value = "创建日期") | 83 | @ApiModelProperty(value = "创建日期") |
88 | private Date createTime; | 84 | private Date createTime; |
85 | + | ||
89 | /** 更新人 */ | 86 | /** 更新人 */ |
90 | @ApiModelProperty(value = "更新人") | 87 | @ApiModelProperty(value = "更新人") |
91 | private String updateBy; | 88 | private String updateBy; |
89 | + | ||
92 | /** 更新日期 */ | 90 | /** 更新日期 */ |
93 | @ApiModelProperty(value = "更新日期") | 91 | @ApiModelProperty(value = "更新日期") |
94 | private Date updateTime; | 92 | private Date updateTime; |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/service/IContainerCapacityService.java
@@ -11,4 +11,14 @@ import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity; | @@ -11,4 +11,14 @@ import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity; | ||
11 | */ | 11 | */ |
12 | public interface IContainerCapacityService extends IService<ContainerCapacity> { | 12 | public interface IContainerCapacityService extends IService<ContainerCapacity> { |
13 | 13 | ||
14 | + /** | ||
15 | + * 容器物品容量查询 | ||
16 | + * @author TanYibin | ||
17 | + * @createDate 2023年4月10日 | ||
18 | + * @param warehouseCode | ||
19 | + * @param containerTypeCode | ||
20 | + * @param materialCode | ||
21 | + * @return | ||
22 | + */ | ||
23 | + public ContainerCapacity queryOne(String warehouseCode, String containerTypeCode, String materialCode); | ||
14 | } | 24 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerCapacity/service/impl/ContainerCapacityServiceImpl.java
@@ -3,8 +3,12 @@ package org.jeecg.modules.wms.config.containerCapacity.service.impl; | @@ -3,8 +3,12 @@ package org.jeecg.modules.wms.config.containerCapacity.service.impl; | ||
3 | import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity; | 3 | import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity; |
4 | import org.jeecg.modules.wms.config.containerCapacity.mapper.ContainerCapacityMapper; | 4 | import org.jeecg.modules.wms.config.containerCapacity.mapper.ContainerCapacityMapper; |
5 | import org.jeecg.modules.wms.config.containerCapacity.service.IContainerCapacityService; | 5 | import org.jeecg.modules.wms.config.containerCapacity.service.IContainerCapacityService; |
6 | +import org.jeecg.utils.StringUtils; | ||
7 | +import org.springframework.cache.annotation.Cacheable; | ||
6 | import org.springframework.stereotype.Service; | 8 | import org.springframework.stereotype.Service; |
7 | 9 | ||
10 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
11 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 12 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
9 | 13 | ||
10 | /** | 14 | /** |
@@ -16,4 +20,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | @@ -16,4 +20,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
16 | @Service | 20 | @Service |
17 | public class ContainerCapacityServiceImpl extends ServiceImpl<ContainerCapacityMapper, ContainerCapacity> implements IContainerCapacityService { | 21 | public class ContainerCapacityServiceImpl extends ServiceImpl<ContainerCapacityMapper, ContainerCapacity> implements IContainerCapacityService { |
18 | 22 | ||
23 | + @Override | ||
24 | + @Cacheable(cacheNames = "queryContainerCapacity#60", | ||
25 | + key = "#root.methodName + '_' + #warehouseCode + '_' + #containerTypeCode + '_' + #materialCode") | ||
26 | + public ContainerCapacity queryOne(String warehouseCode, String containerTypeCode, String materialCode) { | ||
27 | + LambdaQueryWrapper<ContainerCapacity> containerCapacityWrapper = Wrappers.lambdaQuery(); | ||
28 | + containerCapacityWrapper.eq(ContainerCapacity::getWarehouseCode, warehouseCode) | ||
29 | + .eq(StringUtils.isNotEmpty(containerTypeCode), ContainerCapacity::getContainerTypeCode, containerTypeCode) | ||
30 | + .eq(StringUtils.isNotEmpty(materialCode), ContainerCapacity::getMaterialCode, materialCode); | ||
31 | + return getOne(containerCapacityWrapper); | ||
32 | + } | ||
33 | + | ||
19 | } | 34 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerType/entity/ContainerType.java
@@ -2,9 +2,12 @@ package org.jeecg.modules.wms.config.containerType.entity; | @@ -2,9 +2,12 @@ package org.jeecg.modules.wms.config.containerType.entity; | ||
2 | 2 | ||
3 | import java.io.Serializable; | 3 | import java.io.Serializable; |
4 | import java.io.UnsupportedEncodingException; | 4 | import java.io.UnsupportedEncodingException; |
5 | +import java.util.Arrays; | ||
5 | import java.util.Date; | 6 | import java.util.Date; |
7 | +import java.util.List; | ||
6 | import java.math.BigDecimal; | 8 | import java.math.BigDecimal; |
7 | import com.baomidou.mybatisplus.annotation.IdType; | 9 | import com.baomidou.mybatisplus.annotation.IdType; |
10 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
8 | import com.baomidou.mybatisplus.annotation.TableId; | 11 | import com.baomidou.mybatisplus.annotation.TableId; |
9 | import com.baomidou.mybatisplus.annotation.TableName; | 12 | import com.baomidou.mybatisplus.annotation.TableName; |
10 | import lombok.Data; | 13 | import lombok.Data; |
@@ -35,67 +38,94 @@ public class ContainerType implements Serializable { | @@ -35,67 +38,94 @@ public class ContainerType implements Serializable { | ||
35 | @TableId(type = IdType.AUTO) | 38 | @TableId(type = IdType.AUTO) |
36 | @ApiModelProperty(value = "主键") | 39 | @ApiModelProperty(value = "主键") |
37 | private Integer id; | 40 | private Integer id; |
41 | + | ||
38 | /** 编码 */ | 42 | /** 编码 */ |
39 | @Excel(name = "编码", width = 15) | 43 | @Excel(name = "编码", width = 15) |
40 | @ApiModelProperty(value = "编码") | 44 | @ApiModelProperty(value = "编码") |
41 | private String code; | 45 | private String code; |
46 | + | ||
42 | /** 名称 */ | 47 | /** 名称 */ |
43 | @Excel(name = "名称", width = 15) | 48 | @Excel(name = "名称", width = 15) |
44 | @ApiModelProperty(value = "名称") | 49 | @ApiModelProperty(value = "名称") |
45 | private String name; | 50 | private String name; |
51 | + | ||
46 | /** 仓库编码 */ | 52 | /** 仓库编码 */ |
47 | @Excel(name = "仓库编码", width = 15) | 53 | @Excel(name = "仓库编码", width = 15) |
48 | @ApiModelProperty(value = "仓库编码") | 54 | @ApiModelProperty(value = "仓库编码") |
49 | private String warehouseCode; | 55 | private String warehouseCode; |
56 | + | ||
50 | /** 货主编码 */ | 57 | /** 货主编码 */ |
51 | @Excel(name = "货主编码", width = 15) | 58 | @Excel(name = "货主编码", width = 15) |
52 | @ApiModelProperty(value = "货主编码") | 59 | @ApiModelProperty(value = "货主编码") |
53 | private String companyCode; | 60 | private String companyCode; |
61 | + | ||
54 | /** 绑定的库位类型 */ | 62 | /** 绑定的库位类型 */ |
55 | @Excel(name = "绑定的库位类型", width = 15) | 63 | @Excel(name = "绑定的库位类型", width = 15) |
56 | @ApiModelProperty(value = "绑定的库位类型") | 64 | @ApiModelProperty(value = "绑定的库位类型") |
57 | private String locationType; | 65 | private String locationType; |
66 | + | ||
67 | + public void setLocationType(String locationType) { | ||
68 | + if (locationType != null) { | ||
69 | + this.locationType = locationType; | ||
70 | + this.locationTypes = Arrays.asList(locationType.split(",")); | ||
71 | + } | ||
72 | + } | ||
73 | + | ||
74 | + @TableField(exist = false) | ||
75 | + private List<String> locationTypes; | ||
76 | + | ||
58 | /** 长 */ | 77 | /** 长 */ |
59 | @Excel(name = "长", width = 15) | 78 | @Excel(name = "长", width = 15) |
60 | @ApiModelProperty(value = "长") | 79 | @ApiModelProperty(value = "长") |
61 | private Integer length; | 80 | private Integer length; |
81 | + | ||
62 | /** 宽 */ | 82 | /** 宽 */ |
63 | @Excel(name = "宽", width = 15) | 83 | @Excel(name = "宽", width = 15) |
64 | @ApiModelProperty(value = "宽") | 84 | @ApiModelProperty(value = "宽") |
65 | private Integer width; | 85 | private Integer width; |
86 | + | ||
66 | /** 高 */ | 87 | /** 高 */ |
67 | @Excel(name = "高", width = 15) | 88 | @Excel(name = "高", width = 15) |
68 | @ApiModelProperty(value = "高") | 89 | @ApiModelProperty(value = "高") |
69 | private Integer height; | 90 | private Integer height; |
91 | + | ||
70 | /** 空容器重量 */ | 92 | /** 空容器重量 */ |
71 | @Excel(name = "空容器重量", width = 15) | 93 | @Excel(name = "空容器重量", width = 15) |
72 | @ApiModelProperty(value = "空容器重量") | 94 | @ApiModelProperty(value = "空容器重量") |
73 | private Integer emptyweight; | 95 | private Integer emptyweight; |
96 | + | ||
74 | /** 容器最大承重 */ | 97 | /** 容器最大承重 */ |
75 | @Excel(name = "容器最大承重", width = 15) | 98 | @Excel(name = "容器最大承重", width = 15) |
76 | @ApiModelProperty(value = "容器最大承重") | 99 | @ApiModelProperty(value = "容器最大承重") |
77 | private Integer maxweight; | 100 | private Integer maxweight; |
101 | + | ||
78 | /** 备用字段1 */ | 102 | /** 备用字段1 */ |
79 | @Excel(name = "备用字段1", width = 15) | 103 | @Excel(name = "备用字段1", width = 15) |
80 | @ApiModelProperty(value = "备用字段1") | 104 | @ApiModelProperty(value = "备用字段1") |
81 | private String userdef1; | 105 | private String userdef1; |
106 | + | ||
82 | /** 备用字段2 */ | 107 | /** 备用字段2 */ |
83 | @Excel(name = "备用字段2", width = 15) | 108 | @Excel(name = "备用字段2", width = 15) |
84 | @ApiModelProperty(value = "备用字段2") | 109 | @ApiModelProperty(value = "备用字段2") |
85 | private String userdef2; | 110 | private String userdef2; |
111 | + | ||
86 | /** 备用字段3 */ | 112 | /** 备用字段3 */ |
87 | @Excel(name = "备用字段3", width = 15) | 113 | @Excel(name = "备用字段3", width = 15) |
88 | @ApiModelProperty(value = "备用字段3") | 114 | @ApiModelProperty(value = "备用字段3") |
89 | private String userdef3; | 115 | private String userdef3; |
116 | + | ||
90 | /** 创建人 */ | 117 | /** 创建人 */ |
91 | @ApiModelProperty(value = "创建人") | 118 | @ApiModelProperty(value = "创建人") |
92 | private String createBy; | 119 | private String createBy; |
120 | + | ||
93 | /** 创建日期 */ | 121 | /** 创建日期 */ |
94 | @ApiModelProperty(value = "创建日期") | 122 | @ApiModelProperty(value = "创建日期") |
95 | private Date createTime; | 123 | private Date createTime; |
124 | + | ||
96 | /** 更新人 */ | 125 | /** 更新人 */ |
97 | @ApiModelProperty(value = "更新人") | 126 | @ApiModelProperty(value = "更新人") |
98 | private String updateBy; | 127 | private String updateBy; |
128 | + | ||
99 | /** 更新日期 */ | 129 | /** 更新日期 */ |
100 | @ApiModelProperty(value = "更新日期") | 130 | @ApiModelProperty(value = "更新日期") |
101 | private Date updateTime; | 131 | private Date updateTime; |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/controller/LocationController.java
@@ -121,7 +121,7 @@ public class LocationController extends JeecgController<Location, ILocationServi | @@ -121,7 +121,7 @@ public class LocationController extends JeecgController<Location, ILocationServi | ||
121 | @ApiOperation(value = "库位管理-批量添加", notes = "库位管理-批量添加") | 121 | @ApiOperation(value = "库位管理-批量添加", notes = "库位管理-批量添加") |
122 | @RequiresPermissions("location:batchAdd") | 122 | @RequiresPermissions("location:batchAdd") |
123 | @PostMapping(value = "/batchAdd") | 123 | @PostMapping(value = "/batchAdd") |
124 | - public Result<String> batchAdd(@RequestBody BatchLocation batchLocation, HttpServletRequest req) { | 124 | + public Result<?> batchAdd(@RequestBody BatchLocation batchLocation, HttpServletRequest req) { |
125 | HuahengJwtUtil.setWarehouseCode(req, batchLocation); | 125 | HuahengJwtUtil.setWarehouseCode(req, batchLocation); |
126 | batchLocation.setStatus(QuantityConstant.STATUS_LOCATION_EMPTY); | 126 | batchLocation.setStatus(QuantityConstant.STATUS_LOCATION_EMPTY); |
127 | Result result = locationService.batchAdd(batchLocation); | 127 | Result result = locationService.batchAdd(batchLocation); |
@@ -252,7 +252,7 @@ public class LocationController extends JeecgController<Location, ILocationServi | @@ -252,7 +252,7 @@ public class LocationController extends JeecgController<Location, ILocationServi | ||
252 | String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); | 252 | String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); |
253 | String containerCode = location.getContainerCode(); | 253 | String containerCode = location.getContainerCode(); |
254 | String locationCode = location.getCode(); | 254 | String locationCode = location.getCode(); |
255 | - List<Location> locationList = locationService.getContainerInLocation(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, locationCode, warehouseCode); | 255 | + List<Location> locationList = locationService.getContainerInLocation(containerCode, QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, locationCode, warehouseCode); |
256 | return Result.OK(locationList); | 256 | return Result.OK(locationList); |
257 | } | 257 | } |
258 | 258 | ||
@@ -268,7 +268,8 @@ public class LocationController extends JeecgController<Location, ILocationServi | @@ -268,7 +268,8 @@ public class LocationController extends JeecgController<Location, ILocationServi | ||
268 | String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); | 268 | String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); |
269 | String containerCode = location.getContainerCode(); | 269 | String containerCode = location.getContainerCode(); |
270 | String locationCode = location.getCode(); | 270 | String locationCode = location.getCode(); |
271 | - List<Location> locationList = locationService.getContainerInLocation(containerCode, QuantityConstant.STATUS_CONTAINER_MANY, locationCode, warehouseCode); | 271 | + List<Location> locationList = |
272 | + locationService.getContainerInLocation(containerCode, QuantityConstant.STATUS_CONTAINER_FILL_MANY, locationCode, warehouseCode); | ||
272 | return Result.OK(locationList); | 273 | return Result.OK(locationList); |
273 | } | 274 | } |
274 | 275 |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/dto/QueryCompareLocationTaskDto.java
@@ -25,6 +25,12 @@ public class QueryCompareLocationTaskDto { | @@ -25,6 +25,12 @@ public class QueryCompareLocationTaskDto { | ||
25 | /** 数据状态 */ | 25 | /** 数据状态 */ |
26 | private Integer consistencyStatus; | 26 | private Integer consistencyStatus; |
27 | 27 | ||
28 | + /** 任务创建时间开始区间 */ | ||
29 | + private String taskCreateTimeBegin; | ||
30 | + | ||
31 | + /** 任务创建时间结束区间 */ | ||
32 | + private String taskCreateTimeEnd; | ||
33 | + | ||
28 | /** 页码 */ | 34 | /** 页码 */ |
29 | private Integer pageNo = 1; | 35 | private Integer pageNo = 1; |
30 | 36 |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/mapper/xml/LocationMapper.xml
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | IFNULL(max(grid),0) as maxGrid, | 9 | IFNULL(max(grid),0) as maxGrid, |
10 | IFNULL(min(row),0) as minRow | 10 | IFNULL(min(row),0) as minRow |
11 | FROM location | 11 | FROM location |
12 | - WHERE location_type_code = #{locationTypeCode} | 12 | + WHERE zone_code = #{zoneCode} |
13 | <if test="warehouseCode != null and warehouseCode !=''"> | 13 | <if test="warehouseCode != null and warehouseCode !=''"> |
14 | AND warehouse_code = #{warehouseCode} | 14 | AND warehouse_code = #{warehouseCode} |
15 | </if> | 15 | </if> |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/ILocationService.java
@@ -34,16 +34,6 @@ public interface ILocationService extends IService<Location> { | @@ -34,16 +34,6 @@ public interface ILocationService extends IService<Location> { | ||
34 | 34 | ||
35 | boolean updateStatus(String locationCode, String status, String warehouseCode); | 35 | boolean updateStatus(String locationCode, String status, String warehouseCode); |
36 | 36 | ||
37 | - /** | ||
38 | - * 更新库位状态status,条件是originStatus,如果originStatus条件不满足,那么返回false | ||
39 | - * @param locationCode | ||
40 | - * @param status | ||
41 | - * @param originStatus | ||
42 | - * @param warehouseCode | ||
43 | - * @return | ||
44 | - */ | ||
45 | - boolean updateStatusByOriginStatus(String locationCode, String status, String originStatus, String warehouseCode); | ||
46 | - | ||
47 | boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode); | 37 | boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode); |
48 | 38 | ||
49 | Location getNear(Location location); | 39 | Location getNear(Location location); |
@@ -60,7 +50,7 @@ public interface ILocationService extends IService<Location> { | @@ -60,7 +50,7 @@ public interface ILocationService extends IService<Location> { | ||
60 | 50 | ||
61 | boolean haveUncompleteTaskInNear(Location location); | 51 | boolean haveUncompleteTaskInNear(Location location); |
62 | 52 | ||
63 | - Result batchAdd(BatchLocation batchLocation); | 53 | + Result<?> batchAdd(BatchLocation batchLocation); |
64 | 54 | ||
65 | LocationInfo getAllLocation(Location location); | 55 | LocationInfo getAllLocation(Location location); |
66 | 56 | ||
@@ -71,7 +61,7 @@ public interface ILocationService extends IService<Location> { | @@ -71,7 +61,7 @@ public interface ILocationService extends IService<Location> { | ||
71 | */ | 61 | */ |
72 | boolean havaContainerCodeInLocation(String containerCode, String locationCode, String warehouseCode); | 62 | boolean havaContainerCodeInLocation(String containerCode, String locationCode, String warehouseCode); |
73 | 63 | ||
74 | - List<Location> getContainerInLocation(String containerCode, String containerStatus, String locationCode, String warehouseCode); | 64 | + List<Location> getContainerInLocation(String containerCode, String containerFillStatus, String locationCode, String warehouseCode); |
75 | 65 | ||
76 | PageUtil<CompareLocationDto> compareWcsLocation(QueryCompareLocationDto queryCompareLocationDto); | 66 | PageUtil<CompareLocationDto> compareWcsLocation(QueryCompareLocationDto queryCompareLocationDto); |
77 | 67 |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java
@@ -53,6 +53,7 @@ import org.springframework.transaction.annotation.Transactional; | @@ -53,6 +53,7 @@ import org.springframework.transaction.annotation.Transactional; | ||
53 | import com.alibaba.fastjson.JSON; | 53 | import com.alibaba.fastjson.JSON; |
54 | import com.alibaba.fastjson.TypeReference; | 54 | import com.alibaba.fastjson.TypeReference; |
55 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 55 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
56 | +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | ||
56 | import com.baomidou.mybatisplus.core.metadata.IPage; | 57 | import com.baomidou.mybatisplus.core.metadata.IPage; |
57 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 58 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
58 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 59 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
@@ -121,46 +122,18 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | @@ -121,46 +122,18 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | ||
121 | 122 | ||
122 | @Override | 123 | @Override |
123 | public boolean updateStatus(String locationCode, String status, String warehouseCode) { | 124 | public boolean updateStatus(String locationCode, String status, String warehouseCode) { |
124 | - Location location = getLocationByCode(locationCode, warehouseCode); | ||
125 | - if (location == null) { | ||
126 | - return false; | ||
127 | - } | ||
128 | - location.setStatus(status); | ||
129 | - boolean result = updateById(location); | ||
130 | - return result; | ||
131 | - } | ||
132 | - | ||
133 | - @Override | ||
134 | - public boolean updateStatusByOriginStatus(String locationCode, String status, String originStatus, String warehouseCode) { | ||
135 | - Location location = getLocationByCode(locationCode, warehouseCode); | ||
136 | - if (location == null) { | ||
137 | - return false; | ||
138 | - } | ||
139 | - LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
140 | - locationLambdaQueryWrapper.eq(Location::getStatus, originStatus).eq(Location::getCode, locationCode).eq(Location::getWarehouseCode, warehouseCode); | ||
141 | - location.setStatus(status); | ||
142 | - boolean result = update(location, locationLambdaQueryWrapper); | ||
143 | - return result; | 125 | + LambdaUpdateWrapper<Location> updateWrapper = Wrappers.lambdaUpdate(); |
126 | + updateWrapper.ne(Location::getStatus, status).eq(Location::getCode, locationCode).eq(Location::getWarehouseCode, warehouseCode).set(Location::getStatus, | ||
127 | + status); | ||
128 | + return update(updateWrapper); | ||
144 | } | 129 | } |
145 | 130 | ||
146 | @Override | 131 | @Override |
147 | public boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode) { | 132 | public boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode) { |
148 | - Location location = getLocationByCode(locationCode, warehouseCode); | ||
149 | - if (location == null) { | ||
150 | - return false; | ||
151 | - } | ||
152 | - boolean success = false; | ||
153 | - // 如果这个托盘号已经在库位表里,那么不能再写入 | ||
154 | - if (StringUtils.isNotEmpty(containerCode)) { | ||
155 | - success = havaContainerCodeInLocation(containerCode, locationCode, warehouseCode); | ||
156 | - if (success) { | ||
157 | - throw new JeecgBootException("库位表已经存在这个容器号,不能再写入"); | ||
158 | - } | ||
159 | - } | ||
160 | - location.setContainerCode(containerCode); | ||
161 | - location.setStatus(status); | ||
162 | - success = updateById(location); | ||
163 | - return success; | 133 | + LambdaUpdateWrapper<Location> updateWrapper = Wrappers.lambdaUpdate(); |
134 | + updateWrapper.ne(Location::getStatus, status).eq(Location::getCode, locationCode) | ||
135 | + .eq(Location::getWarehouseCode, warehouseCode).set(Location::getContainerCode, containerCode).set(Location::getStatus, status); | ||
136 | + return update(updateWrapper); | ||
164 | } | 137 | } |
165 | 138 | ||
166 | @Override | 139 | @Override |
@@ -308,7 +281,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | @@ -308,7 +281,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | ||
308 | 281 | ||
309 | @Override | 282 | @Override |
310 | @Transactional(rollbackFor = Exception.class) | 283 | @Transactional(rollbackFor = Exception.class) |
311 | - public Result batchAdd(BatchLocation batchLocation) { | 284 | + public Result<?> batchAdd(BatchLocation batchLocation) { |
312 | String prefix = batchLocation.getPrefix(); | 285 | String prefix = batchLocation.getPrefix(); |
313 | Integer firstRow = batchLocation.getFirstRow(); | 286 | Integer firstRow = batchLocation.getFirstRow(); |
314 | Integer lastRow = batchLocation.getLastRow(); | 287 | Integer lastRow = batchLocation.getLastRow(); |
@@ -408,9 +381,9 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | @@ -408,9 +381,9 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | ||
408 | } | 381 | } |
409 | 382 | ||
410 | @Override | 383 | @Override |
411 | - public List<Location> getContainerInLocation(String containerCode, String containerStatus, String locationCode, String warehouseCode) { | 384 | + public List<Location> getContainerInLocation(String containerCode, String containerFillStatus, String locationCode, String warehouseCode) { |
412 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); | 385 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); |
413 | - locationLambdaQueryWrapper.eq(Location::getStatus, QuantityConstant.STATUS_CONTAINER_EMPTY).ne(Location::getContainerCode, QuantityConstant.EMPTY_STRING) | 386 | + locationLambdaQueryWrapper.eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY).ne(Location::getContainerCode, QuantityConstant.EMPTY_STRING) |
414 | .eq(StringUtils.isNotEmpty(containerCode), Location::getContainerCode, containerCode) | 387 | .eq(StringUtils.isNotEmpty(containerCode), Location::getContainerCode, containerCode) |
415 | .eq(StringUtils.isNotEmpty(locationCode), Location::getCode, locationCode).eq(Location::getWarehouseCode, warehouseCode); | 388 | .eq(StringUtils.isNotEmpty(locationCode), Location::getCode, locationCode).eq(Location::getWarehouseCode, warehouseCode); |
416 | List<Location> locationList = list(locationLambdaQueryWrapper); | 389 | List<Location> locationList = list(locationLambdaQueryWrapper); |
@@ -418,11 +391,11 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | @@ -418,11 +391,11 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | ||
418 | if (locationList.size() != 0) { | 391 | if (locationList.size() != 0) { |
419 | List<String> containerCodeList = locationList.stream().map(Location::getContainerCode).collect(Collectors.toList()); | 392 | List<String> containerCodeList = locationList.stream().map(Location::getContainerCode).collect(Collectors.toList()); |
420 | List<Container> containerList = containerService.getContainerListByCodeList(containerCodeList, warehouseCode); | 393 | List<Container> containerList = containerService.getContainerListByCodeList(containerCodeList, warehouseCode); |
421 | - for (Location location1 : locationList) { | 394 | + for (Location location : locationList) { |
422 | for (Container container : containerList) { | 395 | for (Container container : containerList) { |
423 | - if (location1.getContainerCode().equals(container.getCode())) { | ||
424 | - if (!container.getStatus().equals(containerStatus)) { | ||
425 | - removeLocationList.add(location1); | 396 | + if (location.getContainerCode().equals(container.getCode())) { |
397 | + if (!container.getFillStatus().equals(containerFillStatus)) { | ||
398 | + removeLocationList.add(location); | ||
426 | } | 399 | } |
427 | } | 400 | } |
428 | } | 401 | } |
@@ -458,7 +431,6 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | @@ -458,7 +431,6 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | ||
458 | Map<String, List<WcsLocationDto>> wcsLocationMap = new HashMap<String, List<WcsLocationDto>>(); | 431 | Map<String, List<WcsLocationDto>> wcsLocationMap = new HashMap<String, List<WcsLocationDto>>(); |
459 | 432 | ||
460 | // 1.获取WMS库位表库位信息 | 433 | // 1.获取WMS库位表库位信息 |
461 | - Page<Location> page = new Page<Location>(queryCompareLocationDto.getPageNo(), queryCompareLocationDto.getPageSize()); | ||
462 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); | 434 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); |
463 | locationLambdaQueryWrapper.select(Location::getWarehouseCode, Location::getCode, Location::getContainerCode, Location::getStatus) | 435 | locationLambdaQueryWrapper.select(Location::getWarehouseCode, Location::getCode, Location::getContainerCode, Location::getStatus) |
464 | .eq(Location::getWarehouseCode, queryCompareLocationDto.getWarehouseCode()) | 436 | .eq(Location::getWarehouseCode, queryCompareLocationDto.getWarehouseCode()) |
@@ -568,9 +540,9 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | @@ -568,9 +540,9 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | ||
568 | @Override | 540 | @Override |
569 | public PageUtil<CompareLocationTaskDto> compareWcsLocationTask(QueryCompareLocationTaskDto queryCompareLocationTaskDto) { | 541 | public PageUtil<CompareLocationTaskDto> compareWcsLocationTask(QueryCompareLocationTaskDto queryCompareLocationTaskDto) { |
570 | List<CompareLocationTaskDto> finalCompareLocationTaskList = new ArrayList<CompareLocationTaskDto>(); | 542 | List<CompareLocationTaskDto> finalCompareLocationTaskList = new ArrayList<CompareLocationTaskDto>(); |
571 | - if (queryCompareLocationTaskDto.getLocationCode() == null) { | ||
572 | - return PageUtil.create(finalCompareLocationTaskList, queryCompareLocationTaskDto.getPageNo(), queryCompareLocationTaskDto.getPageSize()); | ||
573 | - } | 543 | +// if (queryCompareLocationTaskDto.getLocationCode() == null) { |
544 | +// return PageUtil.create(finalCompareLocationTaskList, queryCompareLocationTaskDto.getPageNo(), queryCompareLocationTaskDto.getPageSize()); | ||
545 | +// } | ||
574 | // 只查询近90天的数据 | 546 | // 只查询近90天的数据 |
575 | // String queryCreateTime = DateUtil.format(DateUtil.offsetDay(new Date(), -90), DatePattern.NORM_DATE_PATTERN); | 547 | // String queryCreateTime = DateUtil.format(DateUtil.offsetDay(new Date(), -90), DatePattern.NORM_DATE_PATTERN); |
576 | // 1.获取WMS任务信息 | 548 | // 1.获取WMS任务信息 |
@@ -579,12 +551,14 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | @@ -579,12 +551,14 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | ||
579 | .select(TaskHeader::getId, TaskHeader::getWarehouseCode, TaskHeader::getTaskType, TaskHeader::getFromLocationCode, TaskHeader::getToLocationCode, | 551 | .select(TaskHeader::getId, TaskHeader::getWarehouseCode, TaskHeader::getTaskType, TaskHeader::getFromLocationCode, TaskHeader::getToLocationCode, |
580 | TaskHeader::getContainerCode, TaskHeader::getStatus, TaskHeader::getCreateTime) | 552 | TaskHeader::getContainerCode, TaskHeader::getStatus, TaskHeader::getCreateTime) |
581 | .eq(TaskHeader::getWarehouseCode, queryCompareLocationTaskDto.getWarehouseCode()) | 553 | .eq(TaskHeader::getWarehouseCode, queryCompareLocationTaskDto.getWarehouseCode()) |
554 | + .gt(StringUtils.isNotEmpty(queryCompareLocationTaskDto.getTaskCreateTimeBegin()), TaskHeader::getCreateTime, queryCompareLocationTaskDto.getTaskCreateTimeBegin()) | ||
555 | + .lt(StringUtils.isNotEmpty(queryCompareLocationTaskDto.getTaskCreateTimeEnd()),TaskHeader::getCreateTime, queryCompareLocationTaskDto.getTaskCreateTimeEnd()); | ||
582 | // .ge(TaskHeader::getCreateTime, queryCreateTime) | 556 | // .ge(TaskHeader::getCreateTime, queryCreateTime) |
583 | - .and(t -> t.eq(StringUtils.isNotEmpty(queryCompareLocationTaskDto.getLocationCode()), TaskHeader::getFromLocationCode, | ||
584 | - queryCompareLocationTaskDto.getLocationCode()).or().eq(StringUtils.isNotEmpty(queryCompareLocationTaskDto.getLocationCode()), | ||
585 | - TaskHeader::getToLocationCode, queryCompareLocationTaskDto.getLocationCode())); | 557 | + if (StringUtils.isNotEmpty(queryCompareLocationTaskDto.getLocationCode())) { |
558 | + taskHeaderLambdaQueryWrapper.and(t -> t.eq(TaskHeader::getFromLocationCode, queryCompareLocationTaskDto.getLocationCode()).or() | ||
559 | + .eq(TaskHeader::getToLocationCode, queryCompareLocationTaskDto.getLocationCode())); | ||
560 | + } | ||
586 | List<TaskHeader> taskHeaderList = taskHeaderService.list(taskHeaderLambdaQueryWrapper); | 561 | List<TaskHeader> taskHeaderList = taskHeaderService.list(taskHeaderLambdaQueryWrapper); |
587 | - | ||
588 | // 2.获取WCS任务信息 | 562 | // 2.获取WCS任务信息 |
589 | String url = addressService.getUrlByParam(QuantityConstant.ADDRESS_WCS_TAKS_INFOS); | 563 | String url = addressService.getUrlByParam(QuantityConstant.ADDRESS_WCS_TAKS_INFOS); |
590 | Map<String, Object> queryParamMap = new HashMap<String, Object>(); | 564 | Map<String, Object> queryParamMap = new HashMap<String, Object>(); |
@@ -594,6 +568,12 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | @@ -594,6 +568,12 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | ||
594 | if (StringUtils.isNotEmpty(queryCompareLocationTaskDto.getLocationCode())) { | 568 | if (StringUtils.isNotEmpty(queryCompareLocationTaskDto.getLocationCode())) { |
595 | queryParamMap.put("location", queryCompareLocationTaskDto.getLocationCode()); | 569 | queryParamMap.put("location", queryCompareLocationTaskDto.getLocationCode()); |
596 | } | 570 | } |
571 | + if (StringUtils.isNotEmpty(queryCompareLocationTaskDto.getTaskCreateTimeBegin())) { | ||
572 | + queryParamMap.put("begin", queryCompareLocationTaskDto.getTaskCreateTimeBegin()); | ||
573 | + } | ||
574 | + if (StringUtils.isNotEmpty(queryCompareLocationTaskDto.getTaskCreateTimeEnd())) { | ||
575 | + queryParamMap.put("end", queryCompareLocationTaskDto.getTaskCreateTimeEnd()); | ||
576 | + } | ||
597 | // queryParamMap.put("begin", queryCreateTime); | 577 | // queryParamMap.put("begin", queryCreateTime); |
598 | String jsonStringResult = OkHttpUtils.sendPostByJsonStr(url, JSON.toJSONString(queryParamMap)); | 578 | String jsonStringResult = OkHttpUtils.sendPostByJsonStr(url, JSON.toJSONString(queryParamMap)); |
599 | WcsResultDto<List<WcsTaskDto>> wcsResult = JSON.parseObject(jsonStringResult, new TypeReference<WcsResultDto<List<WcsTaskDto>>>() {}); | 579 | WcsResultDto<List<WcsTaskDto>> wcsResult = JSON.parseObject(jsonStringResult, new TypeReference<WcsResultDto<List<WcsTaskDto>>>() {}); |
@@ -686,8 +666,8 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | @@ -686,8 +666,8 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | ||
686 | finalCompareLocationTaskList.stream().filter(t -> queryCompareLocationTaskDto.getWcsId().equals(t.getWcsId())).collect(Collectors.toList()); | 666 | finalCompareLocationTaskList.stream().filter(t -> queryCompareLocationTaskDto.getWcsId().equals(t.getWcsId())).collect(Collectors.toList()); |
687 | } | 667 | } |
688 | if (queryCompareLocationTaskDto.getConsistencyStatus() != null) { | 668 | if (queryCompareLocationTaskDto.getConsistencyStatus() != null) { |
689 | - finalCompareLocationTaskList = finalCompareLocationTaskList.stream().filter(t -> queryCompareLocationTaskDto.getConsistencyStatus().equals(t.getConsistencyStatus())) | ||
690 | - .collect(Collectors.toList()); | 669 | + finalCompareLocationTaskList = finalCompareLocationTaskList.stream() |
670 | + .filter(t -> queryCompareLocationTaskDto.getConsistencyStatus().equals(t.getConsistencyStatus())).collect(Collectors.toList()); | ||
691 | } | 671 | } |
692 | return PageUtil.create(finalCompareLocationTaskList, queryCompareLocationTaskDto.getPageNo(), queryCompareLocationTaskDto.getPageSize()); | 672 | return PageUtil.create(finalCompareLocationTaskList, queryCompareLocationTaskDto.getPageNo(), queryCompareLocationTaskDto.getPageSize()); |
693 | } | 673 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/locationMonitor/controller/LocationMonitorController.java
@@ -51,29 +51,38 @@ public class LocationMonitorController { | @@ -51,29 +51,38 @@ public class LocationMonitorController { | ||
51 | */ | 51 | */ |
52 | @GetMapping("/getStatus") | 52 | @GetMapping("/getStatus") |
53 | @ResponseBody | 53 | @ResponseBody |
54 | - public Result getStatus(String zoneCode, HttpServletRequest req) { | 54 | + public Result<?> getStatus(String zoneCode, HttpServletRequest req) { |
55 | LambdaQueryWrapper<Location> queryWrapper = Wrappers.lambdaQuery(); | 55 | LambdaQueryWrapper<Location> queryWrapper = Wrappers.lambdaQuery(); |
56 | HuahengJwtUtil.setWarehouseCode(queryWrapper, Location.class, req); | 56 | HuahengJwtUtil.setWarehouseCode(queryWrapper, Location.class, req); |
57 | - queryWrapper.select(Location::getStatus, Location::getContainerCode).eq(Location::getLocationTypeCode, zoneCode); | 57 | + queryWrapper.select(Location::getCode, Location::getStatus, Location::getContainerCode).eq(Location::getZoneCode, zoneCode); |
58 | List<Location> locationList = locationService.list(queryWrapper); | 58 | List<Location> locationList = locationService.list(queryWrapper); |
59 | + List<String> locationCodeList = locationList.stream().map(Location::getCode).collect(Collectors.toList()); | ||
60 | + | ||
59 | HashMap<String, Integer> map = new HashMap<>(); | 61 | HashMap<String, Integer> map = new HashMap<>(); |
60 | map.put("location", locationList.size()); | 62 | map.put("location", locationList.size()); |
61 | // 换stream进行数据拣选速度更快 | 63 | // 换stream进行数据拣选速度更快 |
62 | - List<Location> emptyLocationList = locationList.stream().filter(t -> StringUtils.isEmpty(t.getContainerCode())).collect(Collectors.toList()); | 64 | + List<Location> emptyLocationList = |
65 | + locationList.stream().filter(t -> QuantityConstant.STATUS_LOCATION_EMPTY.equals(t.getStatus())).collect(Collectors.toList()); | ||
63 | map.put("emptyLocation", emptyLocationList.size()); | 66 | map.put("emptyLocation", emptyLocationList.size()); |
67 | + // 查询库位上的托盘信息 | ||
64 | LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); | 68 | LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); |
65 | HuahengJwtUtil.setWarehouseCode(containerLambdaQueryWrapper, Container.class, req); | 69 | HuahengJwtUtil.setWarehouseCode(containerLambdaQueryWrapper, Container.class, req); |
66 | - containerLambdaQueryWrapper.select(Container::getCode, Container::getStatus); | 70 | + containerLambdaQueryWrapper.select(Container::getCode, Container::getStatus, Container::getFillStatus).in(Container::getLocationCode, locationCodeList); |
67 | List<Container> containerList = containerService.list(containerLambdaQueryWrapper); | 71 | List<Container> containerList = containerService.list(containerLambdaQueryWrapper); |
68 | - List<String> containerCodeList = | ||
69 | - containerList.stream().filter(t -> t.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY)).map(Container::getCode).collect(Collectors.toList()); | ||
70 | - List<Location> haveEmptyContainLocation = locationList.stream().filter(t -> t.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY) | ||
71 | - && StringUtils.isNotEmpty(t.getContainerCode()) && containerCodeList.contains(t.getContainerCode())).collect(Collectors.toList()); | 72 | + |
73 | + List<String> containerCodeList = containerList.stream() | ||
74 | + .filter( | ||
75 | + t -> QuantityConstant.STATUS_CONTAINER_FILL_EMPTY.equals(t.getFillStatus()) || QuantityConstant.STATUS_CONTAINER_FILL_MANY.equals(t.getFillStatus())) | ||
76 | + .map(Container::getCode).collect(Collectors.toList()); | ||
77 | + List<Location> haveEmptyContainLocation = locationList.stream().filter(t -> containerCodeList.contains(t.getContainerCode())).collect(Collectors.toList()); | ||
72 | map.put("haveContainLocation", haveEmptyContainLocation.size()); | 78 | map.put("haveContainLocation", haveEmptyContainLocation.size()); |
73 | - List<String> containerCodeList1 = | ||
74 | - containerList.stream().filter(t -> t.getStatus().equals(QuantityConstant.STATUS_CONTAINER_SOME)).map(Container::getCode).collect(Collectors.toList()); | ||
75 | - List<Location> haveInventoryLocationList = locationList.stream().filter(t -> t.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY) | ||
76 | - && StringUtils.isNotEmpty(t.getContainerCode()) && containerCodeList1.contains(t.getContainerCode())).collect(Collectors.toList()); | 79 | + |
80 | + List<String> containerCodeList1 = containerList.stream() | ||
81 | + .filter( | ||
82 | + t -> QuantityConstant.STATUS_CONTAINER_FILL_SOME.equals(t.getFillStatus()) || QuantityConstant.STATUS_CONTAINER_FILL_FULL.equals(t.getFillStatus())) | ||
83 | + .map(Container::getCode).collect(Collectors.toList()); | ||
84 | + | ||
85 | + List<Location> haveInventoryLocationList = locationList.stream().filter(t -> containerCodeList1.contains(t.getContainerCode())).collect(Collectors.toList()); | ||
77 | map.put("haveInventoryLocation", haveInventoryLocationList.size()); | 86 | map.put("haveInventoryLocation", haveInventoryLocationList.size()); |
78 | return Result.ok(map); | 87 | return Result.ok(map); |
79 | } | 88 | } |
@@ -83,16 +92,16 @@ public class LocationMonitorController { | @@ -83,16 +92,16 @@ public class LocationMonitorController { | ||
83 | */ | 92 | */ |
84 | @PostMapping("/getLocationInfo") | 93 | @PostMapping("/getLocationInfo") |
85 | @ResponseBody | 94 | @ResponseBody |
86 | - public Result getLocationInfo(String type, String row, String line, String layer, String grid, HttpServletRequest req) { | ||
87 | - if (StringUtils.isEmpty(type)) { | ||
88 | - return Result.error("type不能为空"); | 95 | + public Result<?> getLocationInfo(String zoneCode, String row, String line, String layer, String grid, HttpServletRequest req) { |
96 | + if (StringUtils.isEmpty(zoneCode)) { | ||
97 | + return Result.error("zoneCode 不能为空"); | ||
89 | } | 98 | } |
90 | /* 查询库位信息 */ | 99 | /* 查询库位信息 */ |
91 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); | 100 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); |
92 | HuahengJwtUtil.setWarehouseCode(locationLambdaQueryWrapper, Location.class, req); | 101 | HuahengJwtUtil.setWarehouseCode(locationLambdaQueryWrapper, Location.class, req); |
93 | locationLambdaQueryWrapper.eq(StringUtils.isNotEmpty(row), Location::getRow, row).eq(StringUtils.isNotEmpty(line), Location::getIcolumn, line) | 102 | locationLambdaQueryWrapper.eq(StringUtils.isNotEmpty(row), Location::getRow, row).eq(StringUtils.isNotEmpty(line), Location::getIcolumn, line) |
94 | .eq(StringUtils.isNotEmpty(layer), Location::getLayer, layer).eq(StringUtils.isNotEmpty(grid), Location::getGrid, grid) | 103 | .eq(StringUtils.isNotEmpty(layer), Location::getLayer, layer).eq(StringUtils.isNotEmpty(grid), Location::getGrid, grid) |
95 | - .eq(StringUtils.isNotEmpty(type), Location::getLocationTypeCode, type); | 104 | + .eq(StringUtils.isNotEmpty(zoneCode), Location::getZoneCode, zoneCode); |
96 | List<Location> locations = locationService.list(locationLambdaQueryWrapper); | 105 | List<Location> locations = locationService.list(locationLambdaQueryWrapper); |
97 | List<Location> locationList = new ArrayList<>(); | 106 | List<Location> locationList = new ArrayList<>(); |
98 | 107 | ||
@@ -103,7 +112,6 @@ public class LocationMonitorController { | @@ -103,7 +112,6 @@ public class LocationMonitorController { | ||
103 | 112 | ||
104 | for (Location location1 : locations) { | 113 | for (Location location1 : locations) { |
105 | InventoryDetail inventoryDetail = null; | 114 | InventoryDetail inventoryDetail = null; |
106 | - String materialName = null; | ||
107 | for (InventoryDetail inventoryDetail2 : inventoryDetailList) { | 115 | for (InventoryDetail inventoryDetail2 : inventoryDetailList) { |
108 | if (location1.getCode().equals(inventoryDetail2.getLocationCode())) { | 116 | if (location1.getCode().equals(inventoryDetail2.getLocationCode())) { |
109 | inventoryDetail = inventoryDetail2; | 117 | inventoryDetail = inventoryDetail2; |
@@ -160,12 +168,12 @@ public class LocationMonitorController { | @@ -160,12 +168,12 @@ public class LocationMonitorController { | ||
160 | */ | 168 | */ |
161 | @PostMapping("/getAllLocation") | 169 | @PostMapping("/getAllLocation") |
162 | @ResponseBody | 170 | @ResponseBody |
163 | - public Result getAllLocation(@RequestParam(name = "type") String type, HttpServletRequest req) { | ||
164 | - if (StringUtils.isEmpty(type)) { | ||
165 | - return Result.error("type不能为空"); | 171 | + public Result<?> getAllLocation(@RequestParam(name = "zoneCode") String zoneCode, HttpServletRequest req) { |
172 | + if (StringUtils.isEmpty(zoneCode)) { | ||
173 | + return Result.error("zoneCode 不能为空"); | ||
166 | } | 174 | } |
167 | Location location = new Location(); | 175 | Location location = new Location(); |
168 | - location.setLocationTypeCode(type); | 176 | + location.setZoneCode(zoneCode); |
169 | HuahengJwtUtil.setWarehouseCode(req, location); | 177 | HuahengJwtUtil.setWarehouseCode(req, location); |
170 | return Result.ok(locationService.getAllLocation(location)); | 178 | return Result.ok(locationService.getAllLocation(location)); |
171 | } | 179 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/entity/Zone.java
@@ -2,9 +2,12 @@ package org.jeecg.modules.wms.config.zone.entity; | @@ -2,9 +2,12 @@ package org.jeecg.modules.wms.config.zone.entity; | ||
2 | 2 | ||
3 | import java.io.Serializable; | 3 | import java.io.Serializable; |
4 | import java.io.UnsupportedEncodingException; | 4 | import java.io.UnsupportedEncodingException; |
5 | +import java.util.Arrays; | ||
5 | import java.util.Date; | 6 | import java.util.Date; |
7 | +import java.util.List; | ||
6 | import java.math.BigDecimal; | 8 | import java.math.BigDecimal; |
7 | import com.baomidou.mybatisplus.annotation.IdType; | 9 | import com.baomidou.mybatisplus.annotation.IdType; |
10 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
8 | import com.baomidou.mybatisplus.annotation.TableId; | 11 | import com.baomidou.mybatisplus.annotation.TableId; |
9 | import com.baomidou.mybatisplus.annotation.TableName; | 12 | import com.baomidou.mybatisplus.annotation.TableName; |
10 | import lombok.Data; | 13 | import lombok.Data; |
@@ -35,46 +38,68 @@ public class Zone implements Serializable { | @@ -35,46 +38,68 @@ public class Zone implements Serializable { | ||
35 | @TableId(type = IdType.AUTO) | 38 | @TableId(type = IdType.AUTO) |
36 | @ApiModelProperty(value = "主键") | 39 | @ApiModelProperty(value = "主键") |
37 | private Integer id; | 40 | private Integer id; |
41 | + | ||
38 | /** 编码 */ | 42 | /** 编码 */ |
39 | @Excel(name = "编码", width = 15) | 43 | @Excel(name = "编码", width = 15) |
40 | @ApiModelProperty(value = "编码") | 44 | @ApiModelProperty(value = "编码") |
41 | private String code; | 45 | private String code; |
46 | + | ||
42 | /** 名称 */ | 47 | /** 名称 */ |
43 | @Excel(name = "名称", width = 15) | 48 | @Excel(name = "名称", width = 15) |
44 | @ApiModelProperty(value = "名称") | 49 | @ApiModelProperty(value = "名称") |
45 | private String name; | 50 | private String name; |
51 | + | ||
46 | /** 仓库编码 */ | 52 | /** 仓库编码 */ |
47 | @Excel(name = "仓库编码", width = 15) | 53 | @Excel(name = "仓库编码", width = 15) |
48 | @ApiModelProperty(value = "仓库编码") | 54 | @ApiModelProperty(value = "仓库编码") |
49 | private String warehouseCode; | 55 | private String warehouseCode; |
56 | + | ||
50 | /** 货主编码 */ | 57 | /** 货主编码 */ |
51 | @Excel(name = "货主编码", width = 15) | 58 | @Excel(name = "货主编码", width = 15) |
52 | @ApiModelProperty(value = "货主编码") | 59 | @ApiModelProperty(value = "货主编码") |
53 | private String companyCode; | 60 | private String companyCode; |
61 | + | ||
54 | /** 库位类型 */ | 62 | /** 库位类型 */ |
55 | @Excel(name = "库位类型", width = 15) | 63 | @Excel(name = "库位类型", width = 15) |
56 | @ApiModelProperty(value = "库位类型") | 64 | @ApiModelProperty(value = "库位类型") |
57 | private String locationTypeCode; | 65 | private String locationTypeCode; |
66 | + | ||
67 | + public void setLocationTypeCode(String locationTypeCode) { | ||
68 | + if (locationTypeCode != null) { | ||
69 | + this.locationTypeCode = locationTypeCode; | ||
70 | + this.locationTypeCodes = Arrays.asList(locationTypeCode.split(",")); | ||
71 | + } | ||
72 | + } | ||
73 | + | ||
74 | + @TableField(exist = false) | ||
75 | + private List<String> locationTypeCodes; | ||
76 | + | ||
58 | /** 创建人 */ | 77 | /** 创建人 */ |
59 | @ApiModelProperty(value = "创建人") | 78 | @ApiModelProperty(value = "创建人") |
60 | private String createBy; | 79 | private String createBy; |
80 | + | ||
61 | /** 创建日期 */ | 81 | /** 创建日期 */ |
62 | @ApiModelProperty(value = "创建日期") | 82 | @ApiModelProperty(value = "创建日期") |
63 | private Date createTime; | 83 | private Date createTime; |
84 | + | ||
64 | /** 更新人 */ | 85 | /** 更新人 */ |
65 | @ApiModelProperty(value = "更新人") | 86 | @ApiModelProperty(value = "更新人") |
66 | private String updateBy; | 87 | private String updateBy; |
88 | + | ||
67 | /** 更新日期 */ | 89 | /** 更新日期 */ |
68 | @ApiModelProperty(value = "更新日期") | 90 | @ApiModelProperty(value = "更新日期") |
69 | private Date updateTime; | 91 | private Date updateTime; |
92 | + | ||
70 | /** 自定义字段1 */ | 93 | /** 自定义字段1 */ |
71 | @Excel(name = "自定义字段1", width = 15) | 94 | @Excel(name = "自定义字段1", width = 15) |
72 | @ApiModelProperty(value = "自定义字段1") | 95 | @ApiModelProperty(value = "自定义字段1") |
73 | private String userdef1; | 96 | private String userdef1; |
97 | + | ||
74 | /** 自定义字段2 */ | 98 | /** 自定义字段2 */ |
75 | @Excel(name = "自定义字段2", width = 15) | 99 | @Excel(name = "自定义字段2", width = 15) |
76 | @ApiModelProperty(value = "自定义字段2") | 100 | @ApiModelProperty(value = "自定义字段2") |
77 | private String userdef2; | 101 | private String userdef2; |
102 | + | ||
78 | /** 自定义字段3 */ | 103 | /** 自定义字段3 */ |
79 | @Excel(name = "自定义字段3", width = 15) | 104 | @Excel(name = "自定义字段3", width = 15) |
80 | @ApiModelProperty(value = "自定义字段3") | 105 | @ApiModelProperty(value = "自定义字段3") |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/controller/TestController.java
@@ -102,7 +102,7 @@ public class TestController extends HuahengBaseController { | @@ -102,7 +102,7 @@ public class TestController extends HuahengBaseController { | ||
102 | // @Override | 102 | // @Override |
103 | // @Transactional(timeout = 10) | 103 | // @Transactional(timeout = 10) |
104 | // public Result<?> doProcess() throws Exception { | 104 | // public Result<?> doProcess() throws Exception { |
105 | -// LambdaUpdateWrapper<SysDataLog> updateWrapper = new UpdateWrapper().lambda(); | 105 | +// LambdaUpdateWrapper<SysDataLog> updateWrapper = Wrappers.lambdaUpdate(); |
106 | // updateWrapper.set(SysDataLog::getUpdateTime, new Date()); | 106 | // updateWrapper.set(SysDataLog::getUpdateTime, new Date()); |
107 | // updateWrapper.eq(SysDataLog::getId, 10); | 107 | // updateWrapper.eq(SysDataLog::getId, 10); |
108 | // Thread.sleep(1000); | 108 | // Thread.sleep(1000); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryDetail/controller/InventoryDetailController.java
@@ -11,6 +11,7 @@ import org.jeecg.common.system.base.controller.JeecgController; | @@ -11,6 +11,7 @@ import org.jeecg.common.system.base.controller.JeecgController; | ||
11 | import org.jeecg.common.system.query.QueryGenerator; | 11 | import org.jeecg.common.system.query.QueryGenerator; |
12 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; | 12 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; |
13 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; | 13 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; |
14 | +import org.jeecg.utils.HuahengJwtUtil; | ||
14 | import org.springframework.beans.factory.annotation.Autowired; | 15 | import org.springframework.beans.factory.annotation.Autowired; |
15 | import org.springframework.web.bind.annotation.*; | 16 | import org.springframework.web.bind.annotation.*; |
16 | import org.springframework.web.servlet.ModelAndView; | 17 | import org.springframework.web.servlet.ModelAndView; |
@@ -50,10 +51,10 @@ public class InventoryDetailController extends JeecgController<InventoryDetail, | @@ -50,10 +51,10 @@ public class InventoryDetailController extends JeecgController<InventoryDetail, | ||
50 | @GetMapping(value = "/list") | 51 | @GetMapping(value = "/list") |
51 | public Result<IPage<InventoryDetail>> queryPageList(InventoryDetail inventoryDetail, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | 52 | public Result<IPage<InventoryDetail>> queryPageList(InventoryDetail inventoryDetail, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
52 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { | 53 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { |
54 | + HuahengJwtUtil.setWarehouseCode(req, inventoryDetail); | ||
53 | QueryWrapper<InventoryDetail> queryWrapper = QueryGenerator.initQueryWrapper(inventoryDetail, req.getParameterMap()); | 55 | QueryWrapper<InventoryDetail> queryWrapper = QueryGenerator.initQueryWrapper(inventoryDetail, req.getParameterMap()); |
54 | Page<InventoryDetail> page = new Page<InventoryDetail>(pageNo, pageSize); | 56 | Page<InventoryDetail> page = new Page<InventoryDetail>(pageNo, pageSize); |
55 | - IPage<InventoryDetail> pageList = inventoryDetailService.page(page, queryWrapper); | ||
56 | - return Result.OK(pageList); | 57 | + return Result.OK(inventoryDetailService.queryPage(page, queryWrapper)); |
57 | } | 58 | } |
58 | 59 | ||
59 | /** | 60 | /** |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/controller/InventoryHeaderController.java
@@ -22,7 +22,6 @@ import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; | @@ -22,7 +22,6 @@ import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; | ||
22 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; | 22 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; |
23 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryHeaderService; | 23 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryHeaderService; |
24 | import org.jeecg.utils.HuahengJwtUtil; | 24 | import org.jeecg.utils.HuahengJwtUtil; |
25 | -import org.jeecg.utils.StringUtils; | ||
26 | import org.jeecg.utils.constant.QuantityConstant; | 25 | import org.jeecg.utils.constant.QuantityConstant; |
27 | import org.jeecgframework.poi.excel.ExcelImportUtil; | 26 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
28 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; | 27 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
@@ -30,7 +29,15 @@ import org.jeecgframework.poi.excel.entity.ExportParams; | @@ -30,7 +29,15 @@ import org.jeecgframework.poi.excel.entity.ExportParams; | ||
30 | import org.jeecgframework.poi.excel.entity.ImportParams; | 29 | import org.jeecgframework.poi.excel.entity.ImportParams; |
31 | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; | 30 | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
32 | import org.springframework.beans.factory.annotation.Autowired; | 31 | import org.springframework.beans.factory.annotation.Autowired; |
33 | -import org.springframework.web.bind.annotation.*; | 32 | +import org.springframework.web.bind.annotation.DeleteMapping; |
33 | +import org.springframework.web.bind.annotation.GetMapping; | ||
34 | +import org.springframework.web.bind.annotation.PathVariable; | ||
35 | +import org.springframework.web.bind.annotation.PostMapping; | ||
36 | +import org.springframework.web.bind.annotation.RequestBody; | ||
37 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
38 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
39 | +import org.springframework.web.bind.annotation.RequestParam; | ||
40 | +import org.springframework.web.bind.annotation.RestController; | ||
34 | import org.springframework.web.multipart.MultipartFile; | 41 | import org.springframework.web.multipart.MultipartFile; |
35 | import org.springframework.web.multipart.MultipartHttpServletRequest; | 42 | import org.springframework.web.multipart.MultipartHttpServletRequest; |
36 | import org.springframework.web.servlet.ModelAndView; | 43 | import org.springframework.web.servlet.ModelAndView; |
@@ -167,11 +174,11 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, | @@ -167,11 +174,11 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, | ||
167 | @GetMapping(value = "/listInventoryDetailByMainId") | 174 | @GetMapping(value = "/listInventoryDetailByMainId") |
168 | public Result<IPage<InventoryDetail>> listInventoryDetailByMainId(InventoryDetail inventoryDetail, | 175 | public Result<IPage<InventoryDetail>> listInventoryDetailByMainId(InventoryDetail inventoryDetail, |
169 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, | 176 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
170 | - HttpServletRequest req) { | ||
171 | - QueryWrapper<InventoryDetail> queryWrapper = QueryGenerator.initQueryWrapper(inventoryDetail, req.getParameterMap()); | 177 | + HttpServletRequest request) { |
178 | + HuahengJwtUtil.setWarehouseCode(request, inventoryDetail); | ||
179 | + QueryWrapper<InventoryDetail> queryWrapper = QueryGenerator.initQueryWrapper(inventoryDetail, request.getParameterMap()); | ||
172 | Page<InventoryDetail> page = new Page<InventoryDetail>(pageNo, pageSize); | 180 | Page<InventoryDetail> page = new Page<InventoryDetail>(pageNo, pageSize); |
173 | - IPage<InventoryDetail> pageList = inventoryDetailService.page(page, queryWrapper); | ||
174 | - return Result.OK(pageList); | 181 | + return Result.OK(inventoryDetailService.queryPage(page, queryWrapper)); |
175 | } | 182 | } |
176 | 183 | ||
177 | /** | 184 | /** |
@@ -261,7 +268,7 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, | @@ -261,7 +268,7 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, | ||
261 | } | 268 | } |
262 | 269 | ||
263 | /** | 270 | /** |
264 | - * 有货非锁定列表查询 | 271 | + * 非锁定列表查询 |
265 | * @param inventoryHeader | 272 | * @param inventoryHeader |
266 | * @param pageNo | 273 | * @param pageNo |
267 | * @param pageSize | 274 | * @param pageSize |
@@ -269,12 +276,12 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, | @@ -269,12 +276,12 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, | ||
269 | * @return | 276 | * @return |
270 | */ | 277 | */ |
271 | // @AutoLog(value = "库存表-分页列表查询") | 278 | // @AutoLog(value = "库存表-分页列表查询") |
272 | - @ApiOperation(value = "库存表-有货非锁定列表查询", notes = "库存表-有货非锁定列表查询") | 279 | + @ApiOperation(value = "库存表-非锁定列表查询", notes = "库存表-非锁定列表查询") |
273 | @GetMapping(value = "/freeList") | 280 | @GetMapping(value = "/freeList") |
274 | public Result<IPage<InventoryHeader>> freeList(InventoryHeader inventoryHeader, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | 281 | public Result<IPage<InventoryHeader>> freeList(InventoryHeader inventoryHeader, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
275 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { | 282 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { |
276 | QueryWrapper<InventoryHeader> queryWrapper = QueryGenerator.initQueryWrapper(inventoryHeader, req.getParameterMap()); | 283 | QueryWrapper<InventoryHeader> queryWrapper = QueryGenerator.initQueryWrapper(inventoryHeader, req.getParameterMap()); |
277 | - queryWrapper.eq("container_status", QuantityConstant.STATUS_CONTAINER_SOME); | 284 | + queryWrapper.eq("container_status", QuantityConstant.STATUS_CONTAINER_EMPTY); |
278 | Page<InventoryHeader> page = new Page<InventoryHeader>(pageNo, pageSize); | 285 | Page<InventoryHeader> page = new Page<InventoryHeader>(pageNo, pageSize); |
279 | IPage<InventoryHeader> pageList = inventoryHeaderService.page(page, queryWrapper); | 286 | IPage<InventoryHeader> pageList = inventoryHeaderService.page(page, queryWrapper); |
280 | return Result.OK(pageList); | 287 | return Result.OK(pageList); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/entity/InventoryDetail.java
@@ -7,6 +7,7 @@ import org.jeecg.common.aspect.annotation.Dict; | @@ -7,6 +7,7 @@ import org.jeecg.common.aspect.annotation.Dict; | ||
7 | import org.jeecgframework.poi.excel.annotation.Excel; | 7 | import org.jeecgframework.poi.excel.annotation.Excel; |
8 | 8 | ||
9 | import com.baomidou.mybatisplus.annotation.IdType; | 9 | import com.baomidou.mybatisplus.annotation.IdType; |
10 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
10 | import com.baomidou.mybatisplus.annotation.TableId; | 11 | import com.baomidou.mybatisplus.annotation.TableId; |
11 | import com.baomidou.mybatisplus.annotation.TableName; | 12 | import com.baomidou.mybatisplus.annotation.TableName; |
12 | 13 | ||
@@ -82,6 +83,10 @@ public class InventoryDetail implements Serializable { | @@ -82,6 +83,10 @@ public class InventoryDetail implements Serializable { | ||
82 | @Excel(name = "任务锁定数量", width = 15) | 83 | @Excel(name = "任务锁定数量", width = 15) |
83 | @ApiModelProperty(value = "任务锁定数量") | 84 | @ApiModelProperty(value = "任务锁定数量") |
84 | private java.math.BigDecimal taskQty; | 85 | private java.math.BigDecimal taskQty; |
86 | + /** 托盘填充度 */ | ||
87 | + @ApiModelProperty(value = "托盘填充度") | ||
88 | + @TableField(exist = false) | ||
89 | + private java.math.BigDecimal fillDensity; | ||
85 | /** 库存状态 */ | 90 | /** 库存状态 */ |
86 | @Excel(name = "库存状态", width = 15) | 91 | @Excel(name = "库存状态", width = 15) |
87 | @Dict(dicCode = "inventory_status") | 92 | @Dict(dicCode = "inventory_status") |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/IInventoryDetailService.java
@@ -3,8 +3,13 @@ package org.jeecg.modules.wms.inventory.inventoryHeader.service; | @@ -3,8 +3,13 @@ package org.jeecg.modules.wms.inventory.inventoryHeader.service; | ||
3 | import java.math.BigDecimal; | 3 | import java.math.BigDecimal; |
4 | import java.util.List; | 4 | import java.util.List; |
5 | 5 | ||
6 | +import javax.servlet.http.HttpServletRequest; | ||
7 | + | ||
6 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; | 8 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; |
7 | 9 | ||
10 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
11 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
12 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
8 | import com.baomidou.mybatisplus.extension.service.IService; | 13 | import com.baomidou.mybatisplus.extension.service.IService; |
9 | 14 | ||
10 | /** | 15 | /** |
@@ -26,4 +31,14 @@ public interface IInventoryDetailService extends IService<InventoryDetail> { | @@ -26,4 +31,14 @@ public interface IInventoryDetailService extends IService<InventoryDetail> { | ||
26 | 31 | ||
27 | // 求一种物料的可出库存之和 | 32 | // 求一种物料的可出库存之和 |
28 | BigDecimal getAvailSumQty(InventoryDetail inventoryDetail); | 33 | BigDecimal getAvailSumQty(InventoryDetail inventoryDetail); |
34 | + | ||
35 | + /** | ||
36 | + * 分页查询库存明细,组装容器填充度 | ||
37 | + * @author TanYibin | ||
38 | + * @createDate 2023年4月7日 | ||
39 | + * @param page | ||
40 | + * @param queryWrapper | ||
41 | + * @return | ||
42 | + */ | ||
43 | + IPage<InventoryDetail> queryPage(Page<InventoryDetail> page, QueryWrapper<InventoryDetail> queryWrapper); | ||
29 | } | 44 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryDetailServiceImpl.java
1 | package org.jeecg.modules.wms.inventory.inventoryHeader.service.impl; | 1 | package org.jeecg.modules.wms.inventory.inventoryHeader.service.impl; |
2 | 2 | ||
3 | import java.math.BigDecimal; | 3 | import java.math.BigDecimal; |
4 | +import java.math.RoundingMode; | ||
4 | import java.util.List; | 5 | import java.util.List; |
6 | +import java.util.Map; | ||
7 | +import java.util.Set; | ||
8 | +import java.util.function.Function; | ||
9 | +import java.util.stream.Collectors; | ||
5 | 10 | ||
11 | +import javax.servlet.http.HttpServletRequest; | ||
12 | + | ||
13 | +import org.jeecg.common.system.query.QueryGenerator; | ||
14 | +import org.jeecg.modules.wms.config.container.entity.Container; | ||
15 | +import org.jeecg.modules.wms.config.container.service.IContainerService; | ||
16 | +import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity; | ||
17 | +import org.jeecg.modules.wms.config.containerCapacity.service.IContainerCapacityService; | ||
18 | +import org.jeecg.modules.wms.config.location.entity.Location; | ||
19 | +import org.jeecg.modules.wms.config.material.entity.Material; | ||
6 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; | 20 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; |
7 | import org.jeecg.modules.wms.inventory.inventoryHeader.mapper.InventoryDetailMapper; | 21 | import org.jeecg.modules.wms.inventory.inventoryHeader.mapper.InventoryDetailMapper; |
8 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; | 22 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; |
9 | import org.jeecg.utils.StringUtils; | 23 | import org.jeecg.utils.StringUtils; |
10 | import org.springframework.beans.factory.annotation.Autowired; | 24 | import org.springframework.beans.factory.annotation.Autowired; |
11 | import org.springframework.stereotype.Service; | 25 | import org.springframework.stereotype.Service; |
26 | +import org.springframework.util.CollectionUtils; | ||
27 | +import org.springframework.web.bind.annotation.RequestParam; | ||
12 | 28 | ||
13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 29 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
30 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
31 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 32 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
33 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
15 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 34 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
16 | 35 | ||
17 | /** | 36 | /** |
@@ -26,6 +45,12 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe | @@ -26,6 +45,12 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe | ||
26 | @Autowired | 45 | @Autowired |
27 | private InventoryDetailMapper inventoryDetailMapper; | 46 | private InventoryDetailMapper inventoryDetailMapper; |
28 | 47 | ||
48 | + @Autowired | ||
49 | + private IContainerService containerService; | ||
50 | + | ||
51 | + @Autowired | ||
52 | + private IContainerCapacityService containerCapacityService; | ||
53 | + | ||
29 | @Override | 54 | @Override |
30 | public List<InventoryDetail> selectByMainId(String mainId) { | 55 | public List<InventoryDetail> selectByMainId(String mainId) { |
31 | return inventoryDetailMapper.selectByMainId(mainId); | 56 | return inventoryDetailMapper.selectByMainId(mainId); |
@@ -82,4 +107,44 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe | @@ -82,4 +107,44 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe | ||
82 | BigDecimal totalQty = inventoryDetailList.stream().map(InventoryDetail::getQty).reduce(BigDecimal.ZERO, BigDecimal::add); | 107 | BigDecimal totalQty = inventoryDetailList.stream().map(InventoryDetail::getQty).reduce(BigDecimal.ZERO, BigDecimal::add); |
83 | return totalQty; | 108 | return totalQty; |
84 | } | 109 | } |
110 | + | ||
111 | + @Override | ||
112 | + public IPage<InventoryDetail> queryPage(Page<InventoryDetail> page, QueryWrapper<InventoryDetail> queryWrapper) { | ||
113 | + IPage<InventoryDetail> pageResult = this.page(page, queryWrapper); | ||
114 | + List<InventoryDetail> inventoryDetailList = pageResult.getRecords(); | ||
115 | + if (!CollectionUtils.isEmpty(inventoryDetailList)) { | ||
116 | + this.calculateFillDensity(inventoryDetailList); | ||
117 | + } | ||
118 | + return pageResult; | ||
119 | + } | ||
120 | + | ||
121 | + /** | ||
122 | + * 计算库存明细托盘填充度 | ||
123 | + * @author TanYibin | ||
124 | + * @createDate 2023年4月7日 | ||
125 | + * @param inventoryDetailList | ||
126 | + */ | ||
127 | + private void calculateFillDensity(List<InventoryDetail> inventoryDetailList) { | ||
128 | + // 根据仓库编码分组库存明细 | ||
129 | + Map<String, List<InventoryDetail>> warehouseInventoryDetailMap = | ||
130 | + inventoryDetailList.stream().collect(Collectors.groupingBy(InventoryDetail::getWarehouseCode)); | ||
131 | + for (String warehouseCode : warehouseInventoryDetailMap.keySet()) { | ||
132 | + List<InventoryDetail> warehouseInventoryDetailList = warehouseInventoryDetailMap.get(warehouseCode); | ||
133 | + List<String> containerCodeList = warehouseInventoryDetailList.stream().filter(t -> StringUtils.isNotEmpty(t.getContainerCode())) | ||
134 | + .map(t -> t.getContainerCode()).collect(Collectors.toList()); | ||
135 | + // 获取 容器信息 | ||
136 | + List<Container> containerList = containerService.getContainerListByCodeList(containerCodeList, warehouseCode); | ||
137 | + Map<String, Container> containerMap = containerList.stream().collect(Collectors.toMap(Container::getCode, Function.identity(), (key1, key2) -> key2)); | ||
138 | + for (InventoryDetail inventoryDetail : warehouseInventoryDetailList) { | ||
139 | + Container container = containerMap.get(inventoryDetail.getContainerCode()); | ||
140 | + ContainerCapacity containerCapacity = | ||
141 | + containerCapacityService.queryOne(warehouseCode, container.getContainerTypeCode(), inventoryDetail.getMaterialCode()); | ||
142 | + if (containerCapacity != null && containerCapacity.getQty() != null && containerCapacity.getQty().compareTo(BigDecimal.ZERO) > 0) { | ||
143 | + // 进行填充度计算 保留2位小数 | ||
144 | + BigDecimal fillDensity = inventoryDetail.getQty().divide(containerCapacity.getQty(), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); | ||
145 | + inventoryDetail.setFillDensity(fillDensity); | ||
146 | + } | ||
147 | + } | ||
148 | + } | ||
149 | + } | ||
85 | } | 150 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/controller/ApkInfoController.java
0 → 100644
1 | +package org.jeecg.modules.wms.monitor.apkinfo.controller; | ||
2 | + | ||
3 | +import java.io.File; | ||
4 | +import java.util.Arrays; | ||
5 | +import java.util.List; | ||
6 | +import java.util.Map; | ||
7 | +import java.util.stream.Collectors; | ||
8 | +import java.io.IOException; | ||
9 | +import java.io.UnsupportedEncodingException; | ||
10 | +import java.net.URLDecoder; | ||
11 | +import javax.servlet.http.HttpServletRequest; | ||
12 | +import javax.servlet.http.HttpServletResponse; | ||
13 | + | ||
14 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
15 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
16 | +import net.dongliu.apk.parser.ApkFile; | ||
17 | +import net.dongliu.apk.parser.bean.ApkMeta; | ||
18 | +import org.jeecg.common.api.vo.Result; | ||
19 | +import org.jeecg.common.system.query.QueryGenerator; | ||
20 | +import org.jeecg.common.util.IPUtils; | ||
21 | +import org.jeecg.common.util.MD5Util; | ||
22 | +import org.jeecg.common.util.oConvertUtils; | ||
23 | +import org.jeecg.modules.wms.monitor.apkinfo.entity.ApkInfo; | ||
24 | +import org.jeecg.modules.wms.monitor.apkinfo.service.IApkInfoService; | ||
25 | + | ||
26 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
27 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
28 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
29 | +import lombok.extern.slf4j.Slf4j; | ||
30 | + | ||
31 | +import org.jeecgframework.poi.excel.ExcelImportUtil; | ||
32 | +import org.jeecgframework.poi.excel.def.NormalExcelConstants; | ||
33 | +import org.jeecgframework.poi.excel.entity.ExportParams; | ||
34 | +import org.jeecgframework.poi.excel.entity.ImportParams; | ||
35 | +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; | ||
36 | +import org.jeecg.common.system.base.controller.JeecgController; | ||
37 | +import org.springframework.beans.factory.annotation.Autowired; | ||
38 | +import org.springframework.beans.factory.annotation.Value; | ||
39 | +import org.springframework.web.bind.annotation.*; | ||
40 | +import org.springframework.web.multipart.MultipartFile; | ||
41 | +import org.springframework.web.multipart.MultipartHttpServletRequest; | ||
42 | +import org.springframework.web.servlet.ModelAndView; | ||
43 | +import com.alibaba.fastjson.JSON; | ||
44 | +import io.swagger.annotations.Api; | ||
45 | +import io.swagger.annotations.ApiOperation; | ||
46 | +import org.jeecg.common.aspect.annotation.AutoLog; | ||
47 | + | ||
48 | + /** | ||
49 | + * @Description: apk_info | ||
50 | + * @Author: jeecg-boot | ||
51 | + * @Date: 2023-04-10 | ||
52 | + * @Version: V1.0 | ||
53 | + */ | ||
54 | +@Api(tags="apk_info") | ||
55 | +@RestController | ||
56 | +@RequestMapping("/monitor/apkinfo") | ||
57 | +@Slf4j | ||
58 | +public class ApkInfoController extends JeecgController<ApkInfo, IApkInfoService> { | ||
59 | + | ||
60 | + @Value(value = "${jeecg.path.upload}") | ||
61 | + private String uploadpath; | ||
62 | + | ||
63 | + @Value(value = "${server.servlet.context-path}") | ||
64 | + private String ctx; | ||
65 | + | ||
66 | + @Autowired | ||
67 | + private IApkInfoService apkInfoService; | ||
68 | + | ||
69 | + /** | ||
70 | + * 分页列表查询 | ||
71 | + * | ||
72 | + * @param apkInfo | ||
73 | + * @param pageNo | ||
74 | + * @param pageSize | ||
75 | + * @param req | ||
76 | + * @return | ||
77 | + */ | ||
78 | + //@AutoLog(value = "apk_info-分页列表查询") | ||
79 | + @ApiOperation(value="apk_info-分页列表查询", notes="apk_info-分页列表查询") | ||
80 | + @GetMapping(value = "/list") | ||
81 | + public Result<IPage<ApkInfo>> queryPageList(ApkInfo apkInfo, | ||
82 | + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | ||
83 | + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | ||
84 | + HttpServletRequest req) { | ||
85 | + QueryWrapper<ApkInfo> queryWrapper = QueryGenerator.initQueryWrapper(apkInfo, req.getParameterMap()); | ||
86 | + queryWrapper.orderByDesc("id"); | ||
87 | + Page<ApkInfo> page = new Page<ApkInfo>(pageNo, pageSize); | ||
88 | + IPage<ApkInfo> pageList = apkInfoService.page(page, queryWrapper); | ||
89 | + return Result.OK(pageList); | ||
90 | + } | ||
91 | + | ||
92 | + /** | ||
93 | + * 添加 | ||
94 | + * | ||
95 | + * @param apkInfo | ||
96 | + * @return | ||
97 | + */ | ||
98 | + @AutoLog(value = "apk_info-添加") | ||
99 | + @ApiOperation(value="apk_info-添加", notes="apk_info-添加") | ||
100 | + @PostMapping(value = "/add") | ||
101 | + public Result<String> add(@RequestBody ApkInfo apkInfo) { | ||
102 | + apkInfoService.save(apkInfo); | ||
103 | + return Result.OK("添加成功!"); | ||
104 | + } | ||
105 | + | ||
106 | + /** | ||
107 | + * 编辑 | ||
108 | + * | ||
109 | + * @param apkInfo | ||
110 | + * @return | ||
111 | + */ | ||
112 | + @AutoLog(value = "apk_info-编辑") | ||
113 | + @ApiOperation(value="apk_info-编辑", notes="apk_info-编辑") | ||
114 | + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | ||
115 | + public Result<String> edit(@RequestBody ApkInfo apkInfo) { | ||
116 | + apkInfoService.updateById(apkInfo); | ||
117 | + return Result.OK("编辑成功!"); | ||
118 | + } | ||
119 | + | ||
120 | + /** | ||
121 | + * 通过id删除 | ||
122 | + * | ||
123 | + * @param id | ||
124 | + * @return | ||
125 | + */ | ||
126 | + @AutoLog(value = "apk_info-通过id删除") | ||
127 | + @ApiOperation(value="apk_info-通过id删除", notes="apk_info-通过id删除") | ||
128 | + @DeleteMapping(value = "/delete") | ||
129 | + public Result<String> delete(@RequestParam(name="id",required=true) String id) { | ||
130 | + apkInfoService.removeById(id); | ||
131 | + return Result.OK("删除成功!"); | ||
132 | + } | ||
133 | + | ||
134 | + /** | ||
135 | + * 批量删除 | ||
136 | + * | ||
137 | + * @param ids | ||
138 | + * @return | ||
139 | + */ | ||
140 | + @AutoLog(value = "apk_info-批量删除") | ||
141 | + @ApiOperation(value="apk_info-批量删除", notes="apk_info-批量删除") | ||
142 | + @DeleteMapping(value = "/deleteBatch") | ||
143 | + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | ||
144 | + this.apkInfoService.removeByIds(Arrays.asList(ids.split(","))); | ||
145 | + return Result.OK("批量删除成功!"); | ||
146 | + } | ||
147 | + | ||
148 | + /** | ||
149 | + * 通过id查询 | ||
150 | + * | ||
151 | + * @param id | ||
152 | + * @return | ||
153 | + */ | ||
154 | + //@AutoLog(value = "apk_info-通过id查询") | ||
155 | + @ApiOperation(value="apk_info-通过id查询", notes="apk_info-通过id查询") | ||
156 | + @GetMapping(value = "/queryById") | ||
157 | + public Result<ApkInfo> queryById(@RequestParam(name="id",required=true) String id) { | ||
158 | + ApkInfo apkInfo = apkInfoService.getById(id); | ||
159 | + if(apkInfo==null) { | ||
160 | + return Result.error("未找到对应数据"); | ||
161 | + } | ||
162 | + return Result.OK(apkInfo); | ||
163 | + } | ||
164 | + | ||
165 | + @ApiOperation(value="解析apk", notes="解析apk") | ||
166 | + @GetMapping(value = "/parseApk") | ||
167 | + public Result<ApkInfo> parseApk(@RequestParam(name="filename",required=true) String filename) { | ||
168 | + try { | ||
169 | + File file = new File(uploadpath + File.separator + filename); | ||
170 | + String md5 = MD5Util.MD5Encode(filename, "utf-8"); | ||
171 | + ApkFile apkFile = new ApkFile(file.getAbsoluteFile()); | ||
172 | + ApkMeta apkMeta = apkFile.getApkMeta(); | ||
173 | + | ||
174 | + LambdaQueryWrapper<ApkInfo> query = Wrappers.lambdaQuery(); | ||
175 | + query.eq(ApkInfo::getPkgname, apkMeta.getPackageName()) | ||
176 | + .eq(ApkInfo::getVersioncode, apkMeta.getVersionCode()); | ||
177 | + | ||
178 | + ApkInfo apkinfo = apkInfoService.getOne(query); | ||
179 | + | ||
180 | + apkinfo.setUrl("/sys/common/static/" + filename); | ||
181 | + apkinfo.setPkgname(apkMeta.getPackageName()); | ||
182 | + apkinfo.setVersioncode(apkMeta.getVersionCode().intValue()); | ||
183 | + apkinfo.setVersionname(apkMeta.getVersionName()); | ||
184 | + apkinfo.setMd5(md5); | ||
185 | + apkInfoService.saveOrUpdate(apkinfo); | ||
186 | + | ||
187 | + return Result.OK(apkinfo); | ||
188 | + }catch (Exception e){ | ||
189 | + return Result.error(e.getMessage()); | ||
190 | + } | ||
191 | + } | ||
192 | + | ||
193 | + /** | ||
194 | + * 导出excel | ||
195 | + * | ||
196 | + * @param request | ||
197 | + * @param apkInfo | ||
198 | + */ | ||
199 | + @RequestMapping(value = "/exportXls") | ||
200 | + public ModelAndView exportXls(HttpServletRequest request, ApkInfo apkInfo) { | ||
201 | + return super.exportXls(request, apkInfo, ApkInfo.class, "apk_info"); | ||
202 | + } | ||
203 | + | ||
204 | + /** | ||
205 | + * 通过excel导入数据 | ||
206 | + * | ||
207 | + * @param request | ||
208 | + * @param response | ||
209 | + * @return | ||
210 | + */ | ||
211 | + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) | ||
212 | + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | ||
213 | + return super.importExcel(request, response, ApkInfo.class); | ||
214 | + } | ||
215 | + | ||
216 | +} |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/entity/ApkInfo.java
0 → 100644
1 | +package org.jeecg.modules.wms.monitor.apkinfo.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: apk_info | ||
22 | + * @Author: jeecg-boot | ||
23 | + * @Date: 2023-04-10 | ||
24 | + * @Version: V1.0 | ||
25 | + */ | ||
26 | +@Data | ||
27 | +@TableName("apk_info") | ||
28 | +@Accessors(chain = true) | ||
29 | +@EqualsAndHashCode(callSuper = false) | ||
30 | +@ApiModel(value="apk_info对象", description="apk_info") | ||
31 | +public class ApkInfo implements Serializable { | ||
32 | + private static final long serialVersionUID = 1L; | ||
33 | + | ||
34 | + /**id*/ | ||
35 | + @TableId(type = IdType.AUTO) | ||
36 | + @ApiModelProperty(value = "id") | ||
37 | + private java.lang.Integer id; | ||
38 | + /**应用名称*/ | ||
39 | + @Excel(name = "应用名称", width = 15) | ||
40 | + @ApiModelProperty(value = "应用名称") | ||
41 | + private java.lang.String pkgname; | ||
42 | + /**版本号*/ | ||
43 | + @Excel(name = "版本号", width = 15) | ||
44 | + @ApiModelProperty(value = "版本号") | ||
45 | + private java.lang.Integer versioncode; | ||
46 | + /**版本名称*/ | ||
47 | + @Excel(name = "版本名称", width = 15) | ||
48 | + @ApiModelProperty(value = "版本名称") | ||
49 | + private java.lang.String versionname; | ||
50 | + /**下载地址*/ | ||
51 | + @Excel(name = "下载地址", width = 15) | ||
52 | + @ApiModelProperty(value = "下载地址") | ||
53 | + private java.lang.String url; | ||
54 | + /**md5校验码*/ | ||
55 | + @Excel(name = "md5校验码", width = 15) | ||
56 | + @ApiModelProperty(value = "md5校验码") | ||
57 | + private java.lang.String md5; | ||
58 | + /** 创建人 */ | ||
59 | + @ApiModelProperty(value = "创建人") | ||
60 | + private String createBy; | ||
61 | + /** 创建日期 */ | ||
62 | + @ApiModelProperty(value = "创建日期") | ||
63 | + private Date createTime; | ||
64 | + /** 更新人 */ | ||
65 | + @ApiModelProperty(value = "更新人") | ||
66 | + private String updateBy; | ||
67 | + /** 更新日期 */ | ||
68 | + @ApiModelProperty(value = "更新日期") | ||
69 | + private Date updateTime; | ||
70 | +} |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/mapper/ApkInfoMapper.java
0 → 100644
1 | +package org.jeecg.modules.wms.monitor.apkinfo.mapper; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import org.apache.ibatis.annotations.Param; | ||
6 | +import org.jeecg.modules.wms.monitor.apkinfo.entity.ApkInfo; | ||
7 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
8 | + | ||
9 | +/** | ||
10 | + * @Description: apk_info | ||
11 | + * @Author: jeecg-boot | ||
12 | + * @Date: 2023-04-10 | ||
13 | + * @Version: V1.0 | ||
14 | + */ | ||
15 | +public interface ApkInfoMapper extends BaseMapper<ApkInfo> { | ||
16 | + | ||
17 | +} |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/mapper/xml/ApkInfoMapper.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | +<mapper namespace="org.jeecg.modules.wms.monitor.apkinfo.mapper.ApkInfoMapper"> | ||
4 | + | ||
5 | +</mapper> | ||
0 | \ No newline at end of file | 6 | \ No newline at end of file |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/service/IApkInfoService.java
0 → 100644
1 | +package org.jeecg.modules.wms.monitor.apkinfo.service; | ||
2 | + | ||
3 | +import org.jeecg.modules.wms.monitor.apkinfo.entity.ApkInfo; | ||
4 | +import com.baomidou.mybatisplus.extension.service.IService; | ||
5 | + | ||
6 | +/** | ||
7 | + * @Description: apk_info | ||
8 | + * @Author: jeecg-boot | ||
9 | + * @Date: 2023-04-10 | ||
10 | + * @Version: V1.0 | ||
11 | + */ | ||
12 | +public interface IApkInfoService extends IService<ApkInfo> { | ||
13 | + | ||
14 | +} |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apkinfo/service/impl/ApkInfoServiceImpl.java
0 → 100644
1 | +package org.jeecg.modules.wms.monitor.apkinfo.service.impl; | ||
2 | + | ||
3 | +import org.jeecg.modules.wms.monitor.apkinfo.entity.ApkInfo; | ||
4 | +import org.jeecg.modules.wms.monitor.apkinfo.mapper.ApkInfoMapper; | ||
5 | +import org.jeecg.modules.wms.monitor.apkinfo.service.IApkInfoService; | ||
6 | +import org.springframework.stereotype.Service; | ||
7 | + | ||
8 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
9 | + | ||
10 | +/** | ||
11 | + * @Description: apk_info | ||
12 | + * @Author: jeecg-boot | ||
13 | + * @Date: 2023-04-10 | ||
14 | + * @Version: V1.0 | ||
15 | + */ | ||
16 | +@Service | ||
17 | +public class ApkInfoServiceImpl extends ServiceImpl<ApkInfoMapper, ApkInfo> implements IApkInfoService { | ||
18 | + | ||
19 | +} |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/entity/ReceiptContainerHeader.java
@@ -4,6 +4,7 @@ import java.io.Serializable; | @@ -4,6 +4,7 @@ import java.io.Serializable; | ||
4 | import java.io.UnsupportedEncodingException; | 4 | import java.io.UnsupportedEncodingException; |
5 | import java.util.Date; | 5 | import java.util.Date; |
6 | import com.baomidou.mybatisplus.annotation.IdType; | 6 | import com.baomidou.mybatisplus.annotation.IdType; |
7 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
7 | import com.baomidou.mybatisplus.annotation.TableId; | 8 | import com.baomidou.mybatisplus.annotation.TableId; |
8 | import com.baomidou.mybatisplus.annotation.TableName; | 9 | import com.baomidou.mybatisplus.annotation.TableName; |
9 | import org.jeecgframework.poi.excel.annotation.Excel; | 10 | import org.jeecgframework.poi.excel.annotation.Excel; |
@@ -68,6 +69,10 @@ public class ReceiptContainerHeader implements Serializable { | @@ -68,6 +69,10 @@ public class ReceiptContainerHeader implements Serializable { | ||
68 | @Excel(name = "目标出入口", width = 15) | 69 | @Excel(name = "目标出入口", width = 15) |
69 | @ApiModelProperty(value = "目标出入口") | 70 | @ApiModelProperty(value = "目标出入口") |
70 | private String toPort; | 71 | private String toPort; |
72 | + /** 物料填充状态 */ | ||
73 | + @ApiModelProperty(value = "物料填充状态") | ||
74 | + @TableField(exist = false) | ||
75 | + private String containerFillStatus; | ||
71 | /** 备用字段1 */ | 76 | /** 备用字段1 */ |
72 | @Excel(name = "备用字段1", width = 15) | 77 | @Excel(name = "备用字段1", width = 15) |
73 | @ApiModelProperty(value = "备用字段1") | 78 | @ApiModelProperty(value = "备用字段1") |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
@@ -127,8 +127,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | @@ -127,8 +127,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | ||
127 | String fromLocationCode = receiptContainerHeader.getFromLocationCode(); | 127 | String fromLocationCode = receiptContainerHeader.getFromLocationCode(); |
128 | String toLocaitonCode = receiptContainerHeader.getToLocationCode(); | 128 | String toLocaitonCode = receiptContainerHeader.getToLocationCode(); |
129 | if (StringUtils.isNotEmpty(fromLocationCode)) { | 129 | if (StringUtils.isNotEmpty(fromLocationCode)) { |
130 | - success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | ||
131 | - warehouseCode); | 130 | + success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
132 | if (!success) { | 131 | if (!success) { |
133 | throw new JeecgBootException("更新起始库位状态失败"); | 132 | throw new JeecgBootException("更新起始库位状态失败"); |
134 | } | 133 | } |
@@ -136,8 +135,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | @@ -136,8 +135,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | ||
136 | String zoneCode = null; | 135 | String zoneCode = null; |
137 | if (StringUtils.isNotEmpty(toLocaitonCode)) { | 136 | if (StringUtils.isNotEmpty(toLocaitonCode)) { |
138 | if (!toLocaitonCode.equals(fromLocationCode)) { | 137 | if (!toLocaitonCode.equals(fromLocationCode)) { |
139 | - success = locationService.updateStatusByOriginStatus(toLocaitonCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | ||
140 | - warehouseCode); | 138 | + success = locationService.updateStatus(toLocaitonCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
141 | if (!success) { | 139 | if (!success) { |
142 | throw new JeecgBootException("更新目标库位状态失败"); | 140 | throw new JeecgBootException("更新目标库位状态失败"); |
143 | } | 141 | } |
@@ -161,8 +159,13 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | @@ -161,8 +159,13 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | ||
161 | if (!success) { | 159 | if (!success) { |
162 | throw new JeecgBootException("更新入库组盘头状态失败"); | 160 | throw new JeecgBootException("更新入库组盘头状态失败"); |
163 | } | 161 | } |
162 | + String containerFillStatus = QuantityConstant.STATUS_CONTAINER_FILL_SOME; | ||
163 | + if (!StringUtils.isEmpty(receiptContainerHeader.getContainerFillStatus())) { | ||
164 | + containerFillStatus = receiptContainerHeader.getContainerFillStatus(); | ||
165 | + } | ||
164 | TaskHeader taskHeader = new TaskHeader(); | 166 | TaskHeader taskHeader = new TaskHeader(); |
165 | taskHeader.setContainerCode(containerCode); | 167 | taskHeader.setContainerCode(containerCode); |
168 | + taskHeader.setContainerFillStatus(containerFillStatus); | ||
166 | taskHeader.setTaskType(receiptContainerHeader.getTaskType()); | 169 | taskHeader.setTaskType(receiptContainerHeader.getTaskType()); |
167 | taskHeader.setInnernalTaskType(QuantityConstant.TASK_INTENERTYPE_RECEIPT); | 170 | taskHeader.setInnernalTaskType(QuantityConstant.TASK_INTENERTYPE_RECEIPT); |
168 | taskHeader.setFromLocationCode(fromLocationCode); | 171 | taskHeader.setFromLocationCode(fromLocationCode); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/controller/ReceiveController.java
@@ -42,7 +42,6 @@ public class ReceiveController { | @@ -42,7 +42,6 @@ public class ReceiveController { | ||
42 | * 通过详情ID查询 | 42 | * 通过详情ID查询 |
43 | * @return | 43 | * @return |
44 | */ | 44 | */ |
45 | - @AutoLog("入库单详情-通过详情ID查询") | ||
46 | @ApiOperation(value = "入库单详情-通过详情ID查询", notes = "入库单详情-通过详情ID查询") | 45 | @ApiOperation(value = "入库单详情-通过详情ID查询", notes = "入库单详情-通过详情ID查询") |
47 | @PostMapping("/listReceiveByReceiptId") | 46 | @PostMapping("/listReceiveByReceiptId") |
48 | @ResponseBody | 47 | @ResponseBody |
@@ -55,7 +54,7 @@ public class ReceiveController { | @@ -55,7 +54,7 @@ public class ReceiveController { | ||
55 | receive.setId(receiptDetail.getId()); | 54 | receive.setId(receiptDetail.getId()); |
56 | receive.setMaterialCode(receiptDetail.getMaterialCode()); | 55 | receive.setMaterialCode(receiptDetail.getMaterialCode()); |
57 | receive.setMaterialName(receiptDetail.getMaterialName()); | 56 | receive.setMaterialName(receiptDetail.getMaterialName()); |
58 | - receive.setMateiralSpec(receiptDetail.getMaterialSpec()); | 57 | + receive.setMaterialSpec(receiptDetail.getMaterialSpec()); |
59 | receive.setMaterialUnit(receiptDetail.getMaterialUnit()); | 58 | receive.setMaterialUnit(receiptDetail.getMaterialUnit()); |
60 | receive.setInventoryStatus(receiptDetail.getInventoryStatus()); | 59 | receive.setInventoryStatus(receiptDetail.getInventoryStatus()); |
61 | receive.setBatch(receiptDetail.getBatch()); | 60 | receive.setBatch(receiptDetail.getBatch()); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/domain/Receive.java
@@ -2,20 +2,35 @@ package org.jeecg.modules.wms.receipt.receiving.domain; | @@ -2,20 +2,35 @@ package org.jeecg.modules.wms.receipt.receiving.domain; | ||
2 | 2 | ||
3 | import lombok.Data; | 3 | import lombok.Data; |
4 | 4 | ||
5 | +import java.io.Serializable; | ||
5 | import java.math.BigDecimal; | 6 | import java.math.BigDecimal; |
6 | 7 | ||
8 | +import org.jeecg.common.aspect.annotation.Dict; | ||
9 | + | ||
7 | @Data | 10 | @Data |
8 | -public class Receive { | 11 | +public class Receive implements Serializable { |
12 | + private static final long serialVersionUID = 1L; | ||
9 | 13 | ||
10 | private Integer id;// 入库详情ID | 14 | private Integer id;// 入库详情ID |
15 | + | ||
11 | private String containerCode; // 托盘号 | 16 | private String containerCode; // 托盘号 |
17 | + | ||
12 | private String uniqueCode;// 唯一号 | 18 | private String uniqueCode;// 唯一号 |
19 | + | ||
13 | private String materialCode; | 20 | private String materialCode; |
21 | + | ||
14 | private String materialName; | 22 | private String materialName; |
15 | - private String mateiralSpec; | 23 | + |
24 | + private String materialSpec; | ||
25 | + | ||
16 | private String materialUnit; | 26 | private String materialUnit; |
27 | + | ||
28 | + @Dict(dicCode = "inventory_status") | ||
17 | private String inventoryStatus; | 29 | private String inventoryStatus; |
30 | + | ||
18 | private String batch; | 31 | private String batch; |
32 | + | ||
19 | private BigDecimal qty; // 可收数量 | 33 | private BigDecimal qty; // 可收数量 |
34 | + | ||
20 | private BigDecimal taskQty; // 实收数量 | 35 | private BigDecimal taskQty; // 实收数量 |
21 | } | 36 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
@@ -30,6 +30,7 @@ import org.jeecg.utils.StringUtils; | @@ -30,6 +30,7 @@ import org.jeecg.utils.StringUtils; | ||
30 | import org.jeecg.utils.constant.QuantityConstant; | 30 | import org.jeecg.utils.constant.QuantityConstant; |
31 | import org.springframework.stereotype.Service; | 31 | import org.springframework.stereotype.Service; |
32 | import org.springframework.transaction.annotation.Transactional; | 32 | import org.springframework.transaction.annotation.Transactional; |
33 | +import org.springframework.util.CollectionUtils; | ||
33 | 34 | ||
34 | import com.alibaba.fastjson.JSON; | 35 | import com.alibaba.fastjson.JSON; |
35 | import org.jeecg.common.exception.JeecgBootException; | 36 | import org.jeecg.common.exception.JeecgBootException; |
@@ -48,18 +49,25 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -48,18 +49,25 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
48 | 49 | ||
49 | @Resource | 50 | @Resource |
50 | private IReceiptDetailService receiptDetailService; | 51 | private IReceiptDetailService receiptDetailService; |
52 | + | ||
51 | @Resource | 53 | @Resource |
52 | private IContainerService containerService; | 54 | private IContainerService containerService; |
55 | + | ||
53 | @Resource | 56 | @Resource |
54 | private IMaterialService materialService; | 57 | private IMaterialService materialService; |
58 | + | ||
55 | @Resource | 59 | @Resource |
56 | private IReceiptContainerHeaderService receiptContainerHeaderService; | 60 | private IReceiptContainerHeaderService receiptContainerHeaderService; |
61 | + | ||
57 | @Resource | 62 | @Resource |
58 | private IContainerTypeService containerTypeService; | 63 | private IContainerTypeService containerTypeService; |
64 | + | ||
59 | @Resource | 65 | @Resource |
60 | private IReceiptContainerDetailService receiptContainerDetailService; | 66 | private IReceiptContainerDetailService receiptContainerDetailService; |
67 | + | ||
61 | @Resource | 68 | @Resource |
62 | private IReceiptHeaderService receiptHeaderService; | 69 | private IReceiptHeaderService receiptHeaderService; |
70 | + | ||
63 | @Resource | 71 | @Resource |
64 | private IParameterConfigurationService parameterConfigurationService; | 72 | private IParameterConfigurationService parameterConfigurationService; |
65 | 73 | ||
@@ -108,10 +116,11 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -108,10 +116,11 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
108 | } | 116 | } |
109 | String containerStatus = container.getStatus(); | 117 | String containerStatus = container.getStatus(); |
110 | if (containerStatus.equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { | 118 | if (containerStatus.equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { |
111 | - return Result.error("容器被锁定,不能用于收货"); | 119 | + return Result.error("容器被锁定,不能用于收货"); |
112 | } | 120 | } |
113 | - if (containerStatus.equals(QuantityConstant.STATUS_CONTAINER_FULL)) { | ||
114 | - return Result.error("容器已经是满盘,不能用于收货"); | 121 | + String containerFillStatus = container.getFillStatus(); |
122 | + if (!StringUtils.isEmpty(containerFillStatus) && containerFillStatus.equals(QuantityConstant.STATUS_CONTAINER_FILL_FULL)) { | ||
123 | + return Result.error("容器已经是满盘,不能用于收货"); | ||
115 | } | 124 | } |
116 | String containerTypeCode = container.getContainerTypeCode(); | 125 | String containerTypeCode = container.getContainerTypeCode(); |
117 | if (StringUtils.isEmpty(containerTypeCode)) { | 126 | if (StringUtils.isEmpty(containerTypeCode)) { |
@@ -121,15 +130,10 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -121,15 +130,10 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
121 | if (containerType == null) { | 130 | if (containerType == null) { |
122 | return Result.error("容器类型为空"); | 131 | return Result.error("容器类型为空"); |
123 | } | 132 | } |
124 | - BigDecimal sumQty = receiveList.stream().map(Receive::getTaskQty).reduce(BigDecimal.ZERO, BigDecimal::add); | ||
125 | - if (sumQty.compareTo(BigDecimal.ZERO) <= 0) { | ||
126 | - return Result.error("总的收货数量必须大于0"); | ||
127 | - } | ||
128 | int taskType = QuantityConstant.TASK_TYPE_WHOLERECEIPT; | 133 | int taskType = QuantityConstant.TASK_TYPE_WHOLERECEIPT; |
129 | String fromLocationCode = container.getLocationCode(); | 134 | String fromLocationCode = container.getLocationCode(); |
130 | if (StringUtils.isNotEmpty(fromLocationCode)) { | 135 | if (StringUtils.isNotEmpty(fromLocationCode)) { |
131 | taskType = QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT; | 136 | taskType = QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT; |
132 | - | ||
133 | } | 137 | } |
134 | ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getUnCompleteReceiptContainerByCode(containerCode, warehouseCode); | 138 | ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getUnCompleteReceiptContainerByCode(containerCode, warehouseCode); |
135 | if (receiptContainerHeader != null) { | 139 | if (receiptContainerHeader != null) { |
@@ -156,7 +160,6 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -156,7 +160,6 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
156 | throw new JeecgBootException("保存入库组盘头失败"); | 160 | throw new JeecgBootException("保存入库组盘头失败"); |
157 | } | 161 | } |
158 | } | 162 | } |
159 | - | ||
160 | List<ReceiptDetail> receiptDetailList = new ArrayList<>(); | 163 | List<ReceiptDetail> receiptDetailList = new ArrayList<>(); |
161 | List<ReceiptContainerDetail> receiptContainerDetailList = new ArrayList<>(); | 164 | List<ReceiptContainerDetail> receiptContainerDetailList = new ArrayList<>(); |
162 | for (Receive receive : receiveList) { | 165 | for (Receive receive : receiveList) { |
@@ -165,24 +168,25 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -165,24 +168,25 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
165 | // 收货数量 | 168 | // 收货数量 |
166 | BigDecimal taskQty = receive.getTaskQty(); | 169 | BigDecimal taskQty = receive.getTaskQty(); |
167 | if (qty == null || taskQty == null) { | 170 | if (qty == null || taskQty == null) { |
168 | - throw new JeecgBootException("收货数量或可收数量为空"); | 171 | + throw new JeecgBootException("物料编码:" + receive.getMaterialCode() + " 收货数量或可收数量为空"); |
169 | } | 172 | } |
170 | if (taskQty.compareTo(qty) > 0) { | 173 | if (taskQty.compareTo(qty) > 0) { |
171 | - throw new JeecgBootException("收货数量不能大于可收数量,收货数量:" + taskQty + "可收数量:" + qty); | 174 | + throw new JeecgBootException("物料编码:" + receive.getMaterialCode() + " 收货数量不能大于可收数量,收货数量:" + taskQty + "可收数量:" + qty); |
172 | } | 175 | } |
176 | + // 入库单明细为0 跳过组盘 | ||
173 | if (taskQty.compareTo(BigDecimal.ZERO) <= 0) { | 177 | if (taskQty.compareTo(BigDecimal.ZERO) <= 0) { |
174 | continue; | 178 | continue; |
175 | } | 179 | } |
176 | ReceiptDetail receiptDetail = receiptDetailService.getById(receive.getId()); | 180 | ReceiptDetail receiptDetail = receiptDetailService.getById(receive.getId()); |
177 | if (receiptDetail == null) { | 181 | if (receiptDetail == null) { |
178 | - throw new JeecgBootException("没有找到入库单详情,id:" + receive.getId()); | 182 | + throw new JeecgBootException("没有找到入库单详情ID:" + receive.getId()); |
179 | } | 183 | } |
180 | ReceiptHeader receiptHeader = receiptHeaderService.getById(receiptDetail.getReceiptId()); | 184 | ReceiptHeader receiptHeader = receiptHeaderService.getById(receiptDetail.getReceiptId()); |
181 | if (receiptHeader == null) { | 185 | if (receiptHeader == null) { |
182 | - throw new JeecgBootException("没有找到入库单,id:" + receiptDetail.getReceiptId()); | 186 | + throw new JeecgBootException("没有找到入库单ID:" + receiptDetail.getReceiptId()); |
183 | } | 187 | } |
184 | if (!receiptHeader.getWarehouseCode().equals(warehouseCode)) { | 188 | if (!receiptHeader.getWarehouseCode().equals(warehouseCode)) { |
185 | - throw new JeecgBootException("仓库编码不一致,不能操作"); | 189 | + throw new JeecgBootException("入库单操作仓库错误,请选择 " + receiptHeader.getWarehouseCode() + " 操作"); |
186 | } | 190 | } |
187 | String materialCode = receiptDetail.getMaterialCode(); | 191 | String materialCode = receiptDetail.getMaterialCode(); |
188 | if (StringUtils.isEmpty(materialCode)) { | 192 | if (StringUtils.isEmpty(materialCode)) { |
@@ -196,7 +200,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -196,7 +200,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
196 | BigDecimal receiptTaskQty = receiptDetail.getTaskQty(); | 200 | BigDecimal receiptTaskQty = receiptDetail.getTaskQty(); |
197 | receiptTaskQty = receiptTaskQty.add(taskQty); | 201 | receiptTaskQty = receiptTaskQty.add(taskQty); |
198 | if (receiptTaskQty.compareTo(receiptQty) > 0) { | 202 | if (receiptTaskQty.compareTo(receiptQty) > 0) { |
199 | - throw new JeecgBootException("收货数量必须小于单据数量"); | 203 | + throw new JeecgBootException("收货数量不能大于单据数量"); |
200 | } | 204 | } |
201 | receiptDetail.setTaskQty(receiptTaskQty); | 205 | receiptDetail.setTaskQty(receiptTaskQty); |
202 | receiptDetailList.add(receiptDetail); | 206 | receiptDetailList.add(receiptDetail); |
@@ -233,12 +237,13 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -233,12 +237,13 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
233 | receiptContainerDetailList.add(receiptContainerDetail); | 237 | receiptContainerDetailList.add(receiptContainerDetail); |
234 | } | 238 | } |
235 | } | 239 | } |
236 | - | 240 | + if (CollectionUtils.isEmpty(receiptDetailList)) { |
241 | + throw new JeecgBootException("请填入收货数量"); | ||
242 | + } | ||
237 | result = receiptDetailService.updateBatchById(receiptDetailList); | 243 | result = receiptDetailService.updateBatchById(receiptDetailList); |
238 | if (!result) { | 244 | if (!result) { |
239 | throw new JeecgBootException("批量更新入库单详情失败"); | 245 | throw new JeecgBootException("批量更新入库单详情失败"); |
240 | } | 246 | } |
241 | - | ||
242 | if (receiptContainerDetailList.size() > 0) { | 247 | if (receiptContainerDetailList.size() > 0) { |
243 | result = receiptContainerDetailService.saveBatch(receiptContainerDetailList); | 248 | result = receiptContainerDetailService.saveBatch(receiptContainerDetailList); |
244 | if (!result) { | 249 | if (!result) { |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
@@ -255,7 +255,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -255,7 +255,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
255 | return Result.error("配盘时, 没有找到容器, 编码" + containerCode); | 255 | return Result.error("配盘时, 没有找到容器, 编码" + containerCode); |
256 | } | 256 | } |
257 | if (container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { | 257 | if (container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { |
258 | - return Result.error("配盘时, 托盘已经锁定,不能再组盘"); | 258 | + return Result.error("配盘时, 容器已经锁定,不能再组盘"); |
259 | } | 259 | } |
260 | BigDecimal shipmentDetailQty = shipmentDetail.getQty(); | 260 | BigDecimal shipmentDetailQty = shipmentDetail.getQty(); |
261 | BigDecimal shipmentDetailTaskQty = shipmentDetail.getTaskQty(); | 261 | BigDecimal shipmentDetailTaskQty = shipmentDetail.getTaskQty(); |
@@ -470,13 +470,11 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -470,13 +470,11 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
470 | if (container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { | 470 | if (container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { |
471 | return Result.error("生成出库任务时, 托盘已经锁定" + containerCode); | 471 | return Result.error("生成出库任务时, 托盘已经锁定" + containerCode); |
472 | } | 472 | } |
473 | - container.setStatus(QuantityConstant.STATUS_CONTAINER_LOCK); | ||
474 | - boolean success = containerService.updateById(container); | 473 | + boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); |
475 | if (!success) { | 474 | if (!success) { |
476 | throw new JeecgBootException("生成出库任务时, 更新容器失败" + containerCode); | 475 | throw new JeecgBootException("生成出库任务时, 更新容器失败" + containerCode); |
477 | } | 476 | } |
478 | - success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | ||
479 | - warehouseCode); | 477 | + success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
480 | if (!success) { | 478 | if (!success) { |
481 | throw new JeecgBootException("生成出库任务时, 更新库位失败" + fromLocationCode); | 479 | throw new JeecgBootException("生成出库任务时, 更新库位失败" + fromLocationCode); |
482 | } | 480 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailServiceImpl.java
@@ -223,8 +223,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap | @@ -223,8 +223,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap | ||
223 | } | 223 | } |
224 | 224 | ||
225 | // 生成任务同时锁定库位 | 225 | // 生成任务同时锁定库位 |
226 | - boolean success = locationService.updateStatusByOriginStatus(location.getCode(), QuantityConstant.STATUS_LOCATION_LOCK, | ||
227 | - QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | 226 | + boolean success = locationService.updateStatus(location.getCode(), QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
228 | if (!success) { | 227 | if (!success) { |
229 | throw new JeecgBootException("更新库位状态失败"); | 228 | throw new JeecgBootException("更新库位状态失败"); |
230 | } | 229 | } |
@@ -313,11 +312,10 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap | @@ -313,11 +312,10 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap | ||
313 | // lambdaQueryWrapper.eq(InventoryDetail::getContainerCode,task.getContainerCode()); | 312 | // lambdaQueryWrapper.eq(InventoryDetail::getContainerCode,task.getContainerCode()); |
314 | // List<InventoryDetail> inventoryDetails = inventoryDetailService.list(lambdaQueryWrapper); | 313 | // List<InventoryDetail> inventoryDetails = inventoryDetailService.list(lambdaQueryWrapper); |
315 | 314 | ||
316 | - Result result = new Result(); | ||
317 | - result.setResult(cycleCountHeader.getId()); | 315 | + Result<Integer> result = new Result<Integer>(); |
318 | result.setCode(200); | 316 | result.setCode(200); |
319 | result.setMessage("盘点任务生成成功"); | 317 | result.setMessage("盘点任务生成成功"); |
320 | - | 318 | + result.setResult(cycleCountHeader.getId()); |
321 | return result; | 319 | return result; |
322 | } | 320 | } |
323 | 321 | ||
@@ -359,11 +357,10 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap | @@ -359,11 +357,10 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap | ||
359 | cycleCountDetailChild.setCountedQty(countedQty); | 357 | cycleCountDetailChild.setCountedQty(countedQty); |
360 | cycleCountDetailChildServiceImpl.save(cycleCountDetailChild); | 358 | cycleCountDetailChildServiceImpl.save(cycleCountDetailChild); |
361 | 359 | ||
362 | - Result result = new Result(); | 360 | + Result<Integer> result = new Result<Integer>(); |
363 | result.setCode(200); | 361 | result.setCode(200); |
364 | result.setMessage("成功"); | 362 | result.setMessage("成功"); |
365 | result.setResult(cycleCountDetail.getCycleCountHeadId()); | 363 | result.setResult(cycleCountDetail.getCycleCountHeadId()); |
366 | - | ||
367 | return result; | 364 | return result; |
368 | } | 365 | } |
369 | 366 |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/service/impl/AgvTaskServiceImpl.java
@@ -167,12 +167,13 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl | @@ -167,12 +167,13 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl | ||
167 | if (container == null) { | 167 | if (container == null) { |
168 | throw new JeecgBootException("取消AGV任务。 根据容器号没有找到容器"); | 168 | throw new JeecgBootException("取消AGV任务。 根据容器号没有找到容器"); |
169 | } | 169 | } |
170 | - String containerStatus = QuantityConstant.STATUS_CONTAINER_EMPTY; | ||
171 | - List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode); | ||
172 | - if (inventoryDetailList.size() != 0) { | ||
173 | - containerStatus = QuantityConstant.STATUS_CONTAINER_SOME; | ||
174 | - } | ||
175 | - success = containerService.updateStatusByOriginStatus(containerCode, containerStatus, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); | 170 | + // 2023-04-11 托盘状态与填充状态分离 |
171 | +// String containerStatus = QuantityConstant.STATUS_CONTAINER_EMPTY; | ||
172 | +// List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode); | ||
173 | +// if (inventoryDetailList.size() != 0) { | ||
174 | +// containerStatus = QuantityConstant.STATUS_CONTAINER_SOME; | ||
175 | +// } | ||
176 | + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); | ||
176 | if (!success) { | 177 | if (!success) { |
177 | throw new JeecgBootException("取消AGV任务。 更新容器状态失败"); | 178 | throw new JeecgBootException("取消AGV任务。 更新容器状态失败"); |
178 | } | 179 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java
@@ -102,7 +102,6 @@ public class TaskHeaderController extends HuahengBaseController { | @@ -102,7 +102,6 @@ public class TaskHeaderController extends HuahengBaseController { | ||
102 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { | 102 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { |
103 | HuahengJwtUtil.setWarehouseCode(req, taskHeader); | 103 | HuahengJwtUtil.setWarehouseCode(req, taskHeader); |
104 | QueryWrapper<TaskHeader> queryWrapper = QueryGenerator.initQueryWrapper(taskHeader, req.getParameterMap()); | 104 | QueryWrapper<TaskHeader> queryWrapper = QueryGenerator.initQueryWrapper(taskHeader, req.getParameterMap()); |
105 | - queryWrapper.orderByDesc("id"); | ||
106 | Page<TaskHeader> page = new Page<TaskHeader>(pageNo, pageSize); | 105 | Page<TaskHeader> page = new Page<TaskHeader>(pageNo, pageSize); |
107 | IPage<TaskHeader> pageList = taskHeaderService.page(page, queryWrapper); | 106 | IPage<TaskHeader> pageList = taskHeaderService.page(page, queryWrapper); |
108 | return Result.OK(pageList); | 107 | return Result.OK(pageList); |
@@ -387,7 +386,6 @@ public class TaskHeaderController extends HuahengBaseController { | @@ -387,7 +386,6 @@ public class TaskHeaderController extends HuahengBaseController { | ||
387 | if (taskHeader == null) { | 386 | if (taskHeader == null) { |
388 | return Result.error("taskHeader不能为空"); | 387 | return Result.error("taskHeader不能为空"); |
389 | } | 388 | } |
390 | - Integer taskId = taskHeader.getId(); | ||
391 | Result result = huahengMultiHandlerService.sendTaskToWcs(taskHeader); | 389 | Result result = huahengMultiHandlerService.sendTaskToWcs(taskHeader); |
392 | return result; | 390 | return result; |
393 | } | 391 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskHeader.java
@@ -9,6 +9,7 @@ import org.jeecg.common.aspect.annotation.Dict; | @@ -9,6 +9,7 @@ import org.jeecg.common.aspect.annotation.Dict; | ||
9 | import org.jeecgframework.poi.excel.annotation.Excel; | 9 | import org.jeecgframework.poi.excel.annotation.Excel; |
10 | 10 | ||
11 | import com.baomidou.mybatisplus.annotation.IdType; | 11 | import com.baomidou.mybatisplus.annotation.IdType; |
12 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
12 | import com.baomidou.mybatisplus.annotation.TableId; | 13 | import com.baomidou.mybatisplus.annotation.TableId; |
13 | import com.baomidou.mybatisplus.annotation.TableName; | 14 | import com.baomidou.mybatisplus.annotation.TableName; |
14 | 15 | ||
@@ -62,6 +63,10 @@ public class TaskHeader implements Serializable { | @@ -62,6 +63,10 @@ public class TaskHeader implements Serializable { | ||
62 | @Dict(dicCode = "task_type") | 63 | @Dict(dicCode = "task_type") |
63 | @ApiModelProperty(value = "任务类型") | 64 | @ApiModelProperty(value = "任务类型") |
64 | private Integer taskType; | 65 | private Integer taskType; |
66 | + /** 容器填充状态 */ | ||
67 | + @Excel(name = "容器填充状态", width = 15) | ||
68 | + @ApiModelProperty(value = "容器填充状态") | ||
69 | + private String containerFillStatus; | ||
65 | /** 内部任务类型 */ | 70 | /** 内部任务类型 */ |
66 | @Excel(name = "内部任务类型", width = 15) | 71 | @Excel(name = "内部任务类型", width = 15) |
67 | @ApiModelProperty(value = "内部任务类型") | 72 | @ApiModelProperty(value = "内部任务类型") |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -246,20 +246,21 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -246,20 +246,21 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
246 | return Result.error("创建移库任务时,目标库位和源库位不在同一个区域"); | 246 | return Result.error("创建移库任务时,目标库位和源库位不在同一个区域"); |
247 | } | 247 | } |
248 | 248 | ||
249 | - // 2. 记住移库前的容器类型,因为空托盘组无法区分 | ||
250 | - Container container = containerService.getContainerByCode(fromLocation.getContainerCode(), warehouseCode); | ||
251 | - container.setLastStatus(container.getStatus()); | ||
252 | - boolean success = containerService.updateById(container); | ||
253 | - if (!success) { | ||
254 | - throw new JeecgBootException("创建移库任务时,更新容器状态失败,容器号" + fromLocation.getContainerCode()); | ||
255 | - } | 249 | + // 2023-04-11 托盘状态与填充状态分离 无需再更新字段 |
250 | +// // 2. 记住移库前的容器类型,因为空托盘组无法区分 | ||
251 | +// Container container = containerService.getContainerByCode(fromLocation.getContainerCode(), warehouseCode); | ||
252 | +// container.setLastStatus(container.getStatus()); | ||
253 | +// boolean success = containerService.updateById(container); | ||
254 | +// if (!success) { | ||
255 | +// throw new JeecgBootException("创建移库任务时,更新容器状态失败,容器号" + fromLocation.getContainerCode()); | ||
256 | +// } | ||
256 | 257 | ||
257 | // 3. 判断源库位旁边有托盘但是没有任务,那么不允许移库 | 258 | // 3. 判断源库位旁边有托盘但是没有任务,那么不允许移库 |
258 | if (fromLocation.getRowFlag() == QuantityConstant.ROW_OUT) { | 259 | if (fromLocation.getRowFlag() == QuantityConstant.ROW_OUT) { |
259 | // 内侧库位 | 260 | // 内侧库位 |
260 | - Location location1 = locationService.getNear(fromLocation); | ||
261 | - String locationCode = location1.getCode(); | ||
262 | - if (StringUtils.isNotEmpty(location1.getContainerCode())) { | 261 | + Location location = locationService.getNear(fromLocation); |
262 | + String locationCode = location.getCode(); | ||
263 | + if (StringUtils.isNotEmpty(location.getContainerCode())) { | ||
263 | TaskHeader taskHeader = getUnCompleteTaskByFromLocationCode(fromLocationCode, warehouseCode); | 264 | TaskHeader taskHeader = getUnCompleteTaskByFromLocationCode(fromLocationCode, warehouseCode); |
264 | if (taskHeader != null) { | 265 | if (taskHeader != null) { |
265 | preTaskNo = taskHeader.getId(); | 266 | preTaskNo = taskHeader.getId(); |
@@ -285,18 +286,16 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -285,18 +286,16 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
285 | taskHeader.setToLocationCode(toLocationCode); | 286 | taskHeader.setToLocationCode(toLocationCode); |
286 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); | 287 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); |
287 | taskHeader.setPreTaskNo(preTaskNo); | 288 | taskHeader.setPreTaskNo(preTaskNo); |
288 | - success = taskHeaderService.save(taskHeader); | 289 | + boolean success = taskHeaderService.save(taskHeader); |
289 | if (!success) { | 290 | if (!success) { |
290 | throw new JeecgBootException("创建移库任务时,创建任务失败"); | 291 | throw new JeecgBootException("创建移库任务时,创建任务失败"); |
291 | } | 292 | } |
292 | 293 | ||
293 | - success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | ||
294 | - warehouseCode); | 294 | + success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
295 | if (!success) { | 295 | if (!success) { |
296 | throw new JeecgBootException("创建移库任务时, 起始库位" + fromLocationCode + "更新失败"); | 296 | throw new JeecgBootException("创建移库任务时, 起始库位" + fromLocationCode + "更新失败"); |
297 | } | 297 | } |
298 | - success = | ||
299 | - locationService.updateStatusByOriginStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | 298 | + success = locationService.updateStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
300 | if (!success) { | 299 | if (!success) { |
301 | throw new JeecgBootException("创建移库任务时, 终点库位" + toLocationCode + "更新失败"); | 300 | throw new JeecgBootException("创建移库任务时, 终点库位" + toLocationCode + "更新失败"); |
302 | } | 301 | } |
@@ -353,8 +352,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -353,8 +352,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
353 | throw new JeecgBootException("创建出库查看任务时,更新库存详情失败"); | 352 | throw new JeecgBootException("创建出库查看任务时,更新库存详情失败"); |
354 | } | 353 | } |
355 | } | 354 | } |
356 | - success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | ||
357 | - warehouseCode); | 355 | + success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
358 | if (!success) { | 356 | if (!success) { |
359 | throw new JeecgBootException("创建出库查看任务时,更新库位状态失败"); | 357 | throw new JeecgBootException("创建出库查看任务时,更新库位状态失败"); |
360 | } | 358 | } |
@@ -403,6 +401,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -403,6 +401,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
403 | return Result.error("创建跨站任务时,容器为空"); | 401 | return Result.error("创建跨站任务时,容器为空"); |
404 | } | 402 | } |
405 | if (!container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY)) { | 403 | if (!container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY)) { |
404 | + return Result.error("创建跨站任务时, 容器状态不为空闲状态"); | ||
405 | + } | ||
406 | + if (!container.getFillStatus().equals(QuantityConstant.STATUS_CONTAINER_FILL_EMPTY)) { | ||
406 | return Result.error("创建跨站任务时,容器状态不为空托盘"); | 407 | return Result.error("创建跨站任务时,容器状态不为空托盘"); |
407 | } | 408 | } |
408 | Port fromPort = portService.getPortByCode(fromPortCode, warehouseCode); | 409 | Port fromPort = portService.getPortByCode(fromPortCode, warehouseCode); |
@@ -516,7 +517,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -516,7 +517,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
516 | return Result.error("创建空托盘组入库任务时, 容器已在库位" + container.getLocationCode() + "上"); | 517 | return Result.error("创建空托盘组入库任务时, 容器已在库位" + container.getLocationCode() + "上"); |
517 | } | 518 | } |
518 | if (!container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY)) { | 519 | if (!container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY)) { |
519 | - return Result.error("创建空托盘组入库任务时,容器状态不为空容器"); | 520 | + return Result.error("创建空托盘组入库任务时,容器状态不为空闲状态"); |
521 | + } | ||
522 | + if (!container.getFillStatus().equals(QuantityConstant.STATUS_CONTAINER_FILL_EMPTY)) { | ||
523 | + return Result.error("创建空托盘组入库任务时,容器状态不为空托盘"); | ||
520 | } | 524 | } |
521 | boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); | 525 | boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); |
522 | if (!success) { | 526 | if (!success) { |
@@ -530,8 +534,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -530,8 +534,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
530 | if (!toLocation.getStatus().equals(QuantityConstant.STATUS_LOCATION_EMPTY)) { | 534 | if (!toLocation.getStatus().equals(QuantityConstant.STATUS_LOCATION_EMPTY)) { |
531 | return Result.error("创建空托盘组入库任务时,目标库位状态不是空闲"); | 535 | return Result.error("创建空托盘组入库任务时,目标库位状态不是空闲"); |
532 | } | 536 | } |
533 | - success = locationService.updateStatusByOriginStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | ||
534 | - warehouseCode); | 537 | + success = locationService.updateStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
535 | if (!success) { | 538 | if (!success) { |
536 | throw new JeecgBootException("创建空托盘组入库任务时, 更新库位状态失败"); | 539 | throw new JeecgBootException("创建空托盘组入库任务时, 更新库位状态失败"); |
537 | } | 540 | } |
@@ -568,8 +571,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -568,8 +571,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
568 | if (container == null) { | 571 | if (container == null) { |
569 | return Result.error("创建空托盘组出库任务时, 没有找到容器:" + containerCode); | 572 | return Result.error("创建空托盘组出库任务时, 没有找到容器:" + containerCode); |
570 | } | 573 | } |
571 | - if (!QuantityConstant.STATUS_CONTAINER_MANY.equals(container.getStatus())) { | ||
572 | - return Result.error("创建空托盘组出库任务时, 容器状态不为空托盘组状态"); | 574 | + if (!QuantityConstant.STATUS_CONTAINER_EMPTY.equals(container.getStatus())) { |
575 | + return Result.error("创建空托盘组出库任务时, 容器状态不为空闲状态"); | ||
576 | + } | ||
577 | + if (!QuantityConstant.STATUS_CONTAINER_FILL_MANY.equals(container.getFillStatus())) { | ||
578 | + return Result.error("创建空托盘组出库任务时, 容器填充状态不为空托盘组状态"); | ||
573 | } | 579 | } |
574 | String fromLocationCode = container.getLocationCode(); | 580 | String fromLocationCode = container.getLocationCode(); |
575 | if (StringUtils.isEmpty(fromLocationCode)) { | 581 | if (StringUtils.isEmpty(fromLocationCode)) { |
@@ -583,13 +589,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -583,13 +589,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
583 | if (StringUtils.isEmpty(zoneCode)) { | 589 | if (StringUtils.isEmpty(zoneCode)) { |
584 | return Result.error("创建空托盘组出库任务时, 库区为空"); | 590 | return Result.error("创建空托盘组出库任务时, 库区为空"); |
585 | } | 591 | } |
586 | - boolean success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, QuantityConstant.STATUS_CONTAINER_MANY, | ||
587 | - warehouseCode); | 592 | + boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); |
588 | if (!success) { | 593 | if (!success) { |
589 | throw new JeecgBootException("创建空托盘组出库任务时, 更新容器状态失败"); | 594 | throw new JeecgBootException("创建空托盘组出库任务时, 更新容器状态失败"); |
590 | } | 595 | } |
591 | - success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | ||
592 | - warehouseCode); | 596 | + success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
593 | if (!success) { | 597 | if (!success) { |
594 | throw new JeecgBootException("创建空托盘组出库任务时, 更新库位状态失败"); | 598 | throw new JeecgBootException("创建空托盘组出库任务时, 更新库位状态失败"); |
595 | } | 599 | } |
@@ -658,9 +662,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -658,9 +662,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
658 | if (fronLocation == null) { | 662 | if (fronLocation == null) { |
659 | return Result.error("处理空出失败,没有找到库位"); | 663 | return Result.error("处理空出失败,没有找到库位"); |
660 | } | 664 | } |
661 | - // 5、删除容器上的库位号,并设置状态为空盘 | ||
662 | - boolean success = | ||
663 | - containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); | 665 | + // 5、删除容器上的库位号,并设置状态为空闲,填充度状态为空盘 |
666 | + boolean success = containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, | ||
667 | + QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, warehouseCode); | ||
664 | if (!success) { | 668 | if (!success) { |
665 | throw new JeecgBootException("处理空出失败, 更新容器状态失败"); | 669 | throw new JeecgBootException("处理空出失败, 更新容器状态失败"); |
666 | } | 670 | } |
@@ -984,15 +988,12 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -984,15 +988,12 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
984 | if (!QuantityConstant.STATUS_LOCATION_EMPTY.equals(toLocation.getStatus())) { | 988 | if (!QuantityConstant.STATUS_LOCATION_EMPTY.equals(toLocation.getStatus())) { |
985 | return Result.error("创建空托盘入库时, 目标库位非空闲"); | 989 | return Result.error("创建空托盘入库时, 目标库位非空闲"); |
986 | } | 990 | } |
987 | - boolean success = locationService.updateStatusByOriginStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, | ||
988 | - QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | 991 | + boolean success = locationService.updateStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
989 | if (!success) { | 992 | if (!success) { |
990 | throw new JeecgBootException("创建空托盘入库时,更新库位状态失败"); | 993 | throw new JeecgBootException("创建空托盘入库时,更新库位状态失败"); |
991 | } | 994 | } |
992 | } | 995 | } |
993 | - | ||
994 | - boolean success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, QuantityConstant.STATUS_CONTAINER_EMPTY, | ||
995 | - warehouseCode); | 996 | + boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); |
996 | if (!success) { | 997 | if (!success) { |
997 | throw new JeecgBootException("创建空托盘入库时,更新容器状态失败"); | 998 | throw new JeecgBootException("创建空托盘入库时,更新容器状态失败"); |
998 | } | 999 | } |
@@ -1052,13 +1053,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1052,13 +1053,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1052 | if (port == null) { | 1053 | if (port == null) { |
1053 | return Result.error("创建空托盘出库时, 没有找到出库口" + toPortCode); | 1054 | return Result.error("创建空托盘出库时, 没有找到出库口" + toPortCode); |
1054 | } | 1055 | } |
1055 | - boolean success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | ||
1056 | - warehouseCode); | 1056 | + boolean success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
1057 | if (!success) { | 1057 | if (!success) { |
1058 | throw new JeecgBootException("创建空托盘出库时,更新库位状态失败"); | 1058 | throw new JeecgBootException("创建空托盘出库时,更新库位状态失败"); |
1059 | } | 1059 | } |
1060 | - success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, QuantityConstant.STATUS_CONTAINER_EMPTY, | ||
1061 | - warehouseCode); | 1060 | + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); |
1062 | if (!success) { | 1061 | if (!success) { |
1063 | throw new JeecgBootException("创建空托盘出库时,更新容器状态失败"); | 1062 | throw new JeecgBootException("创建空托盘出库时,更新容器状态失败"); |
1064 | } | 1063 | } |
@@ -1139,7 +1138,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1139,7 +1138,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1139 | inventoryHeader.setLocationCode(toLocationCode); | 1138 | inventoryHeader.setLocationCode(toLocationCode); |
1140 | inventoryHeader.setTotalWeight(taskHeader.getWeight()); | 1139 | inventoryHeader.setTotalWeight(taskHeader.getWeight()); |
1141 | inventoryHeader.setCreateBy(taskHeader.getCreateBy()); | 1140 | inventoryHeader.setCreateBy(taskHeader.getCreateBy()); |
1142 | - inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_SOME); | 1141 | + inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); |
1143 | inventoryHeader.setEnable(QuantityConstant.STATUS_ENABLE); | 1142 | inventoryHeader.setEnable(QuantityConstant.STATUS_ENABLE); |
1144 | if (!inventoryHeaderService.save(inventoryHeader)) { | 1143 | if (!inventoryHeaderService.save(inventoryHeader)) { |
1145 | throw new JeecgBootException("添加库存头失败"); | 1144 | throw new JeecgBootException("添加库存头失败"); |
@@ -1219,7 +1218,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1219,7 +1218,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1219 | throw new JeecgBootException("完成入库任务时,保存库存交易失败"); | 1218 | throw new JeecgBootException("完成入库任务时,保存库存交易失败"); |
1220 | } | 1219 | } |
1221 | 1220 | ||
1222 | - if (StringUtils.isNotEmpty(fromLocationCode)) { | 1221 | + if (StringUtils.isNotEmpty(fromLocationCode) && !fromLocationCode.equals(toLocationCode)) { |
1223 | success = | 1222 | success = |
1224 | locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | 1223 | locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); |
1225 | if (!success) { | 1224 | if (!success) { |
@@ -1237,7 +1236,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1237,7 +1236,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1237 | if (!success) { | 1236 | if (!success) { |
1238 | throw new JeecgBootException("完成入库任务时,更新任务失败"); | 1237 | throw new JeecgBootException("完成入库任务时,更新任务失败"); |
1239 | } | 1238 | } |
1240 | - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); | 1239 | + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, |
1240 | + taskHeader.getContainerFillStatus(), warehouseCode); | ||
1241 | if (!success) { | 1241 | if (!success) { |
1242 | throw new JeecgBootException("完成入库任务时,更新容器失败"); | 1242 | throw new JeecgBootException("完成入库任务时,更新容器失败"); |
1243 | } | 1243 | } |
@@ -1343,7 +1343,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1343,7 +1343,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1343 | } | 1343 | } |
1344 | if (inventoryDetail.getQty().compareTo(BigDecimal.ZERO) == 0) { | 1344 | if (inventoryDetail.getQty().compareTo(BigDecimal.ZERO) == 0) { |
1345 | if (inventoryDetail.getTaskQty().compareTo(BigDecimal.ZERO) != 0) { | 1345 | if (inventoryDetail.getTaskQty().compareTo(BigDecimal.ZERO) != 0) { |
1346 | - throw new JeecgBootException("完成出库任务,扣减库存的库存详情任务数量不为0"); | 1346 | + throw new JeecgBootException("完成出库任务,已无库存量可以扣减"); |
1347 | } | 1347 | } |
1348 | success = inventoryDetailService.removeById(inventoryDetail.getId()); | 1348 | success = inventoryDetailService.removeById(inventoryDetail.getId()); |
1349 | if (!success) { | 1349 | if (!success) { |
@@ -1377,20 +1377,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1377,20 +1377,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1377 | inventoryTransactionList.add(inventoryTransaction); | 1377 | inventoryTransactionList.add(inventoryTransaction); |
1378 | shipmentIdList.add(taskDetail.getShipmentId()); | 1378 | shipmentIdList.add(taskDetail.getShipmentId()); |
1379 | } | 1379 | } |
1380 | - String containerStatus = QuantityConstant.STATUS_CONTAINER_SOME; | ||
1381 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByInventoryHeaderId(inventoryHeader.getId()); | 1380 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByInventoryHeaderId(inventoryHeader.getId()); |
1382 | if (inventoryDetailList.size() == 0) { | 1381 | if (inventoryDetailList.size() == 0) { |
1383 | success = inventoryHeaderService.removeById(inventoryHeader.getId()); | 1382 | success = inventoryHeaderService.removeById(inventoryHeader.getId()); |
1384 | if (!success) { | 1383 | if (!success) { |
1385 | throw new JeecgBootException("完成出库任务,删除库存头失败"); | 1384 | throw new JeecgBootException("完成出库任务,删除库存头失败"); |
1386 | } | 1385 | } |
1387 | - containerStatus = QuantityConstant.STATUS_CONTAINER_EMPTY; | ||
1388 | } else { | 1386 | } else { |
1389 | if (taskType == QuantityConstant.TASK_TYPE_WHOLESHIPMENT) { | 1387 | if (taskType == QuantityConstant.TASK_TYPE_WHOLESHIPMENT) { |
1390 | throw new JeecgBootException("完成整盘出库任务,不能还剩库存详情"); | 1388 | throw new JeecgBootException("完成整盘出库任务,不能还剩库存详情"); |
1391 | } | 1389 | } |
1392 | - containerStatus = QuantityConstant.STATUS_CONTAINER_SOME; | ||
1393 | - inventoryHeader.setContainerStatus(containerStatus); | 1390 | + inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); |
1394 | inventoryHeader.setLocationCode(toLocationCode); | 1391 | inventoryHeader.setLocationCode(toLocationCode); |
1395 | success = inventoryHeaderService.updateById(inventoryHeader); | 1392 | success = inventoryHeaderService.updateById(inventoryHeader); |
1396 | if (!success) { | 1393 | if (!success) { |
@@ -1412,7 +1409,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1412,7 +1409,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1412 | if (!success) { | 1409 | if (!success) { |
1413 | throw new JeecgBootException("完成整盘出库任务,更新源库位失败"); | 1410 | throw new JeecgBootException("完成整盘出库任务,更新源库位失败"); |
1414 | } | 1411 | } |
1415 | - containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); | 1412 | + success = containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, |
1413 | + QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, warehouseCode); | ||
1416 | if (!success) { | 1414 | if (!success) { |
1417 | throw new JeecgBootException("完成整盘出库任务,更新容器失败"); | 1415 | throw new JeecgBootException("完成整盘出库任务,更新容器失败"); |
1418 | } | 1416 | } |
@@ -1426,7 +1424,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1426,7 +1424,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1426 | if (!success) { | 1424 | if (!success) { |
1427 | throw new JeecgBootException("完成分拣出库任务,更新目标库位失败"); | 1425 | throw new JeecgBootException("完成分拣出库任务,更新目标库位失败"); |
1428 | } | 1426 | } |
1429 | - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, containerStatus, warehouseCode); | 1427 | + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, |
1428 | + inventoryDetailList.size() == 0 ? QuantityConstant.STATUS_CONTAINER_FILL_EMPTY : QuantityConstant.STATUS_CONTAINER_FILL_SOME, warehouseCode); | ||
1430 | if (!success) { | 1429 | if (!success) { |
1431 | throw new JeecgBootException("完成分拣出库任务,更新容器失败"); | 1430 | throw new JeecgBootException("完成分拣出库任务,更新容器失败"); |
1432 | } | 1431 | } |
@@ -1590,7 +1589,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1590,7 +1589,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1590 | if (StringUtils.isEmpty(toLocationCode)) { | 1589 | if (StringUtils.isEmpty(toLocationCode)) { |
1591 | return Result.error("完成盘点任务时,目标库位号为空"); | 1590 | return Result.error("完成盘点任务时,目标库位号为空"); |
1592 | } | 1591 | } |
1593 | - LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); | 1592 | +// LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); |
1594 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED); | 1593 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED); |
1595 | 1594 | ||
1596 | // 1.先拿到盘点单主单据 | 1595 | // 1.先拿到盘点单主单据 |
@@ -1797,17 +1796,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1797,17 +1796,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1797 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode); | 1796 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode); |
1798 | if (inventoryDetailList.size() != 0) { | 1797 | if (inventoryDetailList.size() != 0) { |
1799 | if (fromLocationCode.equals(toLocationCode)) { | 1798 | if (fromLocationCode.equals(toLocationCode)) { |
1800 | - success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_SOME, QuantityConstant.STATUS_CONTAINER_LOCK, | ||
1801 | - warehouseCode); | 1799 | + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); |
1802 | } else { | 1800 | } else { |
1803 | - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); | 1801 | + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); |
1804 | } | 1802 | } |
1805 | if (!success) { | 1803 | if (!success) { |
1806 | throw new JeecgBootException("完成出库查看任务时,更新容器状态失败"); | 1804 | throw new JeecgBootException("完成出库查看任务时,更新容器状态失败"); |
1807 | } | 1805 | } |
1808 | } else { | 1806 | } else { |
1809 | - success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, QuantityConstant.STATUS_CONTAINER_LOCK, | ||
1810 | - warehouseCode); | 1807 | + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); |
1811 | if (!success) { | 1808 | if (!success) { |
1812 | throw new JeecgBootException("完成出库查看任务时,更新容器状态失败"); | 1809 | throw new JeecgBootException("完成出库查看任务时,更新容器状态失败"); |
1813 | } | 1810 | } |
@@ -1933,23 +1930,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1933,23 +1930,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1933 | if (!success) { | 1930 | if (!success) { |
1934 | throw new JeecgBootException("完成移库任务时, 更新任务失败"); | 1931 | throw new JeecgBootException("完成移库任务时, 更新任务失败"); |
1935 | } | 1932 | } |
1936 | - if (inventoryDetailList.size() > 0) { | ||
1937 | - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); | ||
1938 | - if (!success) { | ||
1939 | - throw new JeecgBootException("完成移库任务时, 更新容器状态失败"); | ||
1940 | - } | ||
1941 | - } else { | ||
1942 | - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); | ||
1943 | - if (!success) { | ||
1944 | - throw new JeecgBootException("完成移库任务时, 更新容器状态失败"); | ||
1945 | - } | ||
1946 | - } | ||
1947 | - Container container = containerService.getContainerByCode(containerCode, warehouseCode); | ||
1948 | - container.setLastStatus(QuantityConstant.EMPTY_STRING); | ||
1949 | - success = containerService.updateById(container); | 1933 | + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); |
1950 | if (!success) { | 1934 | if (!success) { |
1951 | throw new JeecgBootException("完成移库任务时, 更新容器状态失败"); | 1935 | throw new JeecgBootException("完成移库任务时, 更新容器状态失败"); |
1952 | } | 1936 | } |
1937 | + // 2023-04-11 托盘状态与填充状态分离 无需再更新字段 | ||
1938 | +// Container container = containerService.getContainerByCode(containerCode, warehouseCode); | ||
1939 | +// container.setLastStatus(QuantityConstant.EMPTY_STRING); | ||
1940 | +// success = containerService.updateById(container); | ||
1941 | +// if (!success) { | ||
1942 | +// throw new JeecgBootException("完成移库任务时, 更新容器状态失败"); | ||
1943 | +// } | ||
1953 | success = | 1944 | success = |
1954 | locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | 1945 | locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); |
1955 | if (!success) { | 1946 | if (!success) { |
@@ -2033,18 +2024,16 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -2033,18 +2024,16 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
2033 | throw new JeecgBootException("完成出库查看任务时,更新库存头失败"); | 2024 | throw new JeecgBootException("完成出库查看任务时,更新库存头失败"); |
2034 | } | 2025 | } |
2035 | if (fromLocationCode.equals(toLocationCode)) { | 2026 | if (fromLocationCode.equals(toLocationCode)) { |
2036 | - success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_SOME, QuantityConstant.STATUS_CONTAINER_LOCK, | ||
2037 | - warehouseCode); | 2027 | + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); |
2038 | } else { | 2028 | } else { |
2039 | - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); | 2029 | + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); |
2040 | } | 2030 | } |
2041 | if (!success) { | 2031 | if (!success) { |
2042 | throw new JeecgBootException("完成出库查看任务时,更新容器状态失败"); | 2032 | throw new JeecgBootException("完成出库查看任务时,更新容器状态失败"); |
2043 | } | 2033 | } |
2044 | } else { | 2034 | } else { |
2045 | if (fromLocationCode.equals(toLocationCode)) { | 2035 | if (fromLocationCode.equals(toLocationCode)) { |
2046 | - success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, QuantityConstant.STATUS_CONTAINER_LOCK, | ||
2047 | - warehouseCode); | 2036 | + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); |
2048 | } else { | 2037 | } else { |
2049 | success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); | 2038 | success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); |
2050 | } | 2039 | } |
@@ -2110,8 +2099,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -2110,8 +2099,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
2110 | if (!success) { | 2099 | if (!success) { |
2111 | throw new JeecgBootException("创建跨站任务时, 更新任务失败"); | 2100 | throw new JeecgBootException("创建跨站任务时, 更新任务失败"); |
2112 | } | 2101 | } |
2113 | - success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, QuantityConstant.STATUS_CONTAINER_LOCK, | ||
2114 | - warehouseCode); | 2102 | + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); |
2115 | if (!success) { | 2103 | if (!success) { |
2116 | throw new JeecgBootException("创建跨站任务时, 更新容器状态失败"); | 2104 | throw new JeecgBootException("创建跨站任务时, 更新容器状态失败"); |
2117 | } | 2105 | } |
@@ -2151,7 +2139,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -2151,7 +2139,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
2151 | if (!success) { | 2139 | if (!success) { |
2152 | throw new JeecgBootException("完成空托盘组入库任务时, 更新任务失败"); | 2140 | throw new JeecgBootException("完成空托盘组入库任务时, 更新任务失败"); |
2153 | } | 2141 | } |
2154 | - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_MANY, warehouseCode); | 2142 | + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, |
2143 | + QuantityConstant.STATUS_CONTAINER_FILL_MANY, warehouseCode); | ||
2155 | if (!success) { | 2144 | if (!success) { |
2156 | throw new JeecgBootException("完成空托盘组入库任务时, 更新容器失败"); | 2145 | throw new JeecgBootException("完成空托盘组入库任务时, 更新容器失败"); |
2157 | } | 2146 | } |
@@ -2199,7 +2188,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -2199,7 +2188,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
2199 | if (!success) { | 2188 | if (!success) { |
2200 | throw new JeecgBootException("完成空托盘组出库任务时, 更新任务失败"); | 2189 | throw new JeecgBootException("完成空托盘组出库任务时, 更新任务失败"); |
2201 | } | 2190 | } |
2202 | - success = containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | 2191 | + success = containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, |
2192 | + QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, warehouseCode); | ||
2203 | if (!success) { | 2193 | if (!success) { |
2204 | throw new JeecgBootException("完成空托盘组出库任务时, 更新容器失败"); | 2194 | throw new JeecgBootException("完成空托盘组出库任务时, 更新容器失败"); |
2205 | } | 2195 | } |
@@ -2269,8 +2259,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -2269,8 +2259,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
2269 | 2259 | ||
2270 | boolean success = false; | 2260 | boolean success = false; |
2271 | if (StringUtils.isNotEmpty(fromLocationCode)) { | 2261 | if (StringUtils.isNotEmpty(fromLocationCode)) { |
2272 | - success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, QuantityConstant.STATUS_LOCATION_LOCK, | ||
2273 | - warehouseCode); | 2262 | + success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); |
2274 | if (!success) { | 2263 | if (!success) { |
2275 | throw new JeecgBootException("取消任务时, 更新起始库位状态失败"); | 2264 | throw new JeecgBootException("取消任务时, 更新起始库位状态失败"); |
2276 | } | 2265 | } |
@@ -2287,28 +2276,25 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -2287,28 +2276,25 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
2287 | throw new JeecgBootException("取消任务时, 没有找到容器"); | 2276 | throw new JeecgBootException("取消任务时, 没有找到容器"); |
2288 | } | 2277 | } |
2289 | if (inventoryHeader != null) { | 2278 | if (inventoryHeader != null) { |
2290 | - container.setStatus(QuantityConstant.STATUS_CONTAINER_SOME); | ||
2291 | - inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_SOME); | 2279 | + inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); |
2292 | success = inventoryHeaderService.updateById(inventoryHeader); | 2280 | success = inventoryHeaderService.updateById(inventoryHeader); |
2293 | if (!success) { | 2281 | if (!success) { |
2294 | throw new JeecgBootException("取消任务时, 更新库存成功"); | 2282 | throw new JeecgBootException("取消任务时, 更新库存成功"); |
2295 | } | 2283 | } |
2296 | - } else { | ||
2297 | - container.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); | ||
2298 | - } | ||
2299 | - String lastStatus = container.getLastStatus(); | ||
2300 | - if (StringUtils.isNotEmpty(lastStatus)) { | ||
2301 | - container.setStatus(lastStatus); // 解决空托盘组移库问题 | ||
2302 | } | 2284 | } |
2285 | +// String lastStatus = container.getLastStatus(); | ||
2286 | +// if (StringUtils.isNotEmpty(lastStatus)) { | ||
2287 | +// container.setStatus(lastStatus); // 解决空托盘组移库问题 | ||
2288 | +// } | ||
2303 | // if (StringUtils.isNotEmpty(fromLocationCode)) { | 2289 | // if (StringUtils.isNotEmpty(fromLocationCode)) { |
2304 | // success = containerService.havaLocationCodeByContainer(fromLocationCode, warehouseCode); | 2290 | // success = containerService.havaLocationCodeByContainer(fromLocationCode, warehouseCode); |
2305 | // if (success) { | 2291 | // if (success) { |
2306 | // throw new JeecgBootException("库位表已经存在这个容器号,不能再写入"); | 2292 | // throw new JeecgBootException("库位表已经存在这个容器号,不能再写入"); |
2307 | // } | 2293 | // } |
2308 | // } | 2294 | // } |
2309 | - container.setLastStatus(QuantityConstant.EMPTY_STRING); | 2295 | +// container.setLastStatus(QuantityConstant.EMPTY_STRING); |
2310 | // container.setLocationCode(fromLocationCode); | 2296 | // container.setLocationCode(fromLocationCode); |
2311 | - success = containerService.updateById(container); | 2297 | + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); |
2312 | if (!success) { | 2298 | if (!success) { |
2313 | throw new JeecgBootException("取消任务时, 更新容器失败"); | 2299 | throw new JeecgBootException("取消任务时, 更新容器失败"); |
2314 | } | 2300 | } |
huaheng-wms-core/src/main/java/org/jeecg/utils/HuahengJwtUtil.java
@@ -43,6 +43,9 @@ public class HuahengJwtUtil { | @@ -43,6 +43,9 @@ public class HuahengJwtUtil { | ||
43 | 43 | ||
44 | /** 全仓CODE */ | 44 | /** 全仓CODE */ |
45 | public static final String ALL_WAREHOUSE_CODE = "ALL_WAREHOUSE"; | 45 | public static final String ALL_WAREHOUSE_CODE = "ALL_WAREHOUSE"; |
46 | + | ||
47 | + /** 定时任务操作人 */ | ||
48 | + public static final String TASK_AUDIENCE_NAME = "SYSTEM_TASK"; | ||
46 | 49 | ||
47 | public static final String SYSTEM_ACTIVATION_CODE_FILE_NAME = "ActivationCode.txt"; | 50 | public static final String SYSTEM_ACTIVATION_CODE_FILE_NAME = "ActivationCode.txt"; |
48 | 51 | ||
@@ -230,7 +233,12 @@ public class HuahengJwtUtil { | @@ -230,7 +233,12 @@ public class HuahengJwtUtil { | ||
230 | * @return | 233 | * @return |
231 | */ | 234 | */ |
232 | public static String getCurrentOperator() { | 235 | public static String getCurrentOperator() { |
233 | - LoginUser loginUser = SecurityUtils.getSubject().getPrincipal() != null ? (LoginUser)SecurityUtils.getSubject().getPrincipal() : null; | 236 | + LoginUser loginUser = null; |
237 | + try { | ||
238 | + loginUser = SecurityUtils.getSubject().getPrincipal() != null ? (LoginUser)SecurityUtils.getSubject().getPrincipal() : null; | ||
239 | + } catch (Exception e) { | ||
240 | + loginUser = null; | ||
241 | + } | ||
234 | if (loginUser != null) { | 242 | if (loginUser != null) { |
235 | return loginUser.getRealname(); | 243 | return loginUser.getRealname(); |
236 | } | 244 | } |
@@ -253,3 +261,4 @@ public class HuahengJwtUtil { | @@ -253,3 +261,4 @@ public class HuahengJwtUtil { | ||
253 | } | 261 | } |
254 | } | 262 | } |
255 | } | 263 | } |
264 | + |
huaheng-wms-core/src/main/java/org/jeecg/utils/aspect/TaskBuildAudienceAspect.java
0 → 100644
1 | +package org.jeecg.utils.aspect; | ||
2 | + | ||
3 | +import org.aspectj.lang.JoinPoint; | ||
4 | +import org.aspectj.lang.annotation.Aspect; | ||
5 | +import org.aspectj.lang.annotation.Before; | ||
6 | +import org.aspectj.lang.annotation.Pointcut; | ||
7 | +import org.jeecg.utils.HuahengJwtUtil; | ||
8 | +import org.jeecg.utils.support.ApiAuthentication; | ||
9 | +import org.springframework.scheduling.annotation.EnableAsync; | ||
10 | +import org.springframework.stereotype.Component; | ||
11 | + | ||
12 | +import lombok.extern.slf4j.Slf4j; | ||
13 | + | ||
14 | +/** | ||
15 | + * 构建定时任务操作人拦截器 | ||
16 | + * @author TanYibin | ||
17 | + * @createDate 2023年4月4日 | ||
18 | + */ | ||
19 | +@Slf4j | ||
20 | +@Aspect | ||
21 | +@Component | ||
22 | +@EnableAsync | ||
23 | +public class TaskBuildAudienceAspect { | ||
24 | + | ||
25 | + @Pointcut("execution(* org.jeecg.modules.wms.monitor.job.*Task.execute(..))") | ||
26 | + public void executeTask() {} | ||
27 | + | ||
28 | + @Before("executeTask()") | ||
29 | + public void doBefore(JoinPoint joinPoint) throws NoSuchMethodException, Throwable { | ||
30 | + new ApiAuthentication.ApiAuthenticationBuild().audience(HuahengJwtUtil.TASK_AUDIENCE_NAME).bulid(); | ||
31 | + } | ||
32 | +} |
huaheng-wms-core/src/main/java/org/jeecg/utils/config/HuahengRedisConfig.java
@@ -38,7 +38,7 @@ public class HuahengRedisConfig { | @@ -38,7 +38,7 @@ public class HuahengRedisConfig { | ||
38 | // 配置序列化(解决乱码的问题) | 38 | // 配置序列化(解决乱码的问题) |
39 | RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig().entryTtl(Duration.ofMillis(-1)) | 39 | RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig().entryTtl(Duration.ofMillis(-1)) |
40 | .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer)) | 40 | .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer)) |
41 | - .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(jackson2JsonRedisSerializer)).disableCachingNullValues(); | 41 | + .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(jackson2JsonRedisSerializer)); |
42 | RedisCacheWriter cacheWriter = RedisCacheWriter.nonLockingRedisCacheWriter(factory); | 42 | RedisCacheWriter cacheWriter = RedisCacheWriter.nonLockingRedisCacheWriter(factory); |
43 | 43 | ||
44 | /* | 44 | /* |
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
@@ -434,12 +434,14 @@ public class QuantityConstant { | @@ -434,12 +434,14 @@ public class QuantityConstant { | ||
434 | public static final int STATION_PICK_AND_OUT = 4; | 434 | public static final int STATION_PICK_AND_OUT = 4; |
435 | 435 | ||
436 | public static final String EMPTY_STRING = ""; | 436 | public static final String EMPTY_STRING = ""; |
437 | - | 437 | + |
438 | public static final String STATUS_CONTAINER_EMPTY = "empty"; | 438 | public static final String STATUS_CONTAINER_EMPTY = "empty"; |
439 | public static final String STATUS_CONTAINER_LOCK = "lock"; | 439 | public static final String STATUS_CONTAINER_LOCK = "lock"; |
440 | - public static final String STATUS_CONTAINER_SOME = "some"; | ||
441 | - public static final String STATUS_CONTAINER_FULL = "full"; | ||
442 | - public static final String STATUS_CONTAINER_MANY = "many"; | 440 | + |
441 | + public static final String STATUS_CONTAINER_FILL_EMPTY = "empty"; | ||
442 | + public static final String STATUS_CONTAINER_FILL_SOME = "some"; | ||
443 | + public static final String STATUS_CONTAINER_FILL_FULL = "full"; | ||
444 | + public static final String STATUS_CONTAINER_FILL_MANY = "many"; | ||
443 | 445 | ||
444 | public static final String STATUS_LOCATION_EMPTY = "empty"; | 446 | public static final String STATUS_LOCATION_EMPTY = "empty"; |
445 | public static final String STATUS_LOCATION_LOCK = "lock"; | 447 | public static final String STATUS_LOCATION_LOCK = "lock"; |
huaheng-wms-core/src/main/java/org/jeecg/utils/support/ExceptionHandlerAdvice.java
1 | package org.jeecg.utils.support; | 1 | package org.jeecg.utils.support; |
2 | 2 | ||
3 | import java.util.HashMap; | 3 | import java.util.HashMap; |
4 | -import java.util.Map; | ||
5 | 4 | ||
6 | import org.jeecg.common.api.vo.Result; | 5 | import org.jeecg.common.api.vo.Result; |
7 | import org.springframework.validation.FieldError; | 6 | import org.springframework.validation.FieldError; |
@@ -19,7 +18,6 @@ public class ExceptionHandlerAdvice { | @@ -19,7 +18,6 @@ public class ExceptionHandlerAdvice { | ||
19 | */ | 18 | */ |
20 | @ExceptionHandler(value = MethodArgumentNotValidException.class) | 19 | @ExceptionHandler(value = MethodArgumentNotValidException.class) |
21 | public Object handerConstraintViolationException(MethodArgumentNotValidException exception) { | 20 | public Object handerConstraintViolationException(MethodArgumentNotValidException exception) { |
22 | - Result<Map> result = new Result<Map>(); | ||
23 | HashMap<String, Object> errors = new HashMap<>(); | 21 | HashMap<String, Object> errors = new HashMap<>(); |
24 | exception.getBindingResult().getAllErrors().forEach(error -> { | 22 | exception.getBindingResult().getAllErrors().forEach(error -> { |
25 | FieldError fieldError = (FieldError)error; | 23 | FieldError fieldError = (FieldError)error; |
huaheng-wms-core/src/main/resources/application-prod.yml
@@ -294,9 +294,9 @@ logging: | @@ -294,9 +294,9 @@ logging: | ||
294 | level: | 294 | level: |
295 | org.jeecg.common: ERROR | 295 | org.jeecg.common: ERROR |
296 | org.jeecg.modules: ERROR | 296 | org.jeecg.modules: ERROR |
297 | - org.jeecg.modules.wms: INFO | 297 | + org.jeecg.modules.wms: DEBUG |
298 | org.jeecg.config.shiro: ERROR | 298 | org.jeecg.config.shiro: ERROR |
299 | - org.jeecg.utils: ERROR | 299 | + org.jeecg.utils: INFO |
300 | #swagger | 300 | #swagger |
301 | knife4j: | 301 | knife4j: |
302 | #开启增强配置 | 302 | #开启增强配置 |
huaheng-wms-core/src/main/resources/application.yml
@@ -8,4 +8,4 @@ huaheng: | @@ -8,4 +8,4 @@ huaheng: | ||
8 | system: | 8 | system: |
9 | verson: '@project.version@' | 9 | verson: '@project.version@' |
10 | artifactId: '@project.artifactId@' | 10 | artifactId: '@project.artifactId@' |
11 | - checkSystemActivationCode: true | ||
12 | \ No newline at end of file | 11 | \ No newline at end of file |
12 | + checkSystemActivationCode: false | ||
13 | \ No newline at end of file | 13 | \ No newline at end of file |
huaheng-wms-core/src/main/resources/logback-spring.xml
@@ -71,10 +71,10 @@ | @@ -71,10 +71,10 @@ | ||
71 | <!-- 每天生成一个html格式的日志结束 --> | 71 | <!-- 每天生成一个html格式的日志结束 --> |
72 | 72 | ||
73 | <!--myibatis log configure --> | 73 | <!--myibatis log configure --> |
74 | - <logger name="com.apache.ibatis" level="TRACE" /> | ||
75 | - <logger name="java.sql.Connection" level="INFO" /> | ||
76 | - <logger name="java.sql.Statement" level="INFO" /> | ||
77 | - <logger name="java.sql.PreparedStatement" level="INFO" /> | 74 | +<!-- <logger name="com.apache.ibatis" level="TRACE" /> --> |
75 | +<!-- <logger name="java.sql.Connection" level="DEBUG" /> --> | ||
76 | +<!-- <logger name="java.sql.Statement" level="DEBUG" /> --> | ||
77 | +<!-- <logger name="java.sql.PreparedStatement" level="DEBUG" /> --> | ||
78 | 78 | ||
79 | <logger name="jdbc.connection" additivity="false" level="off"> | 79 | <logger name="jdbc.connection" additivity="false" level="off"> |
80 | <appender-ref ref="STDOUT" /> | 80 | <appender-ref ref="STDOUT" /> |