Commit e6fcd213ad3b1878434fb57beaf53194267562b7
Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4 into develop
Showing
42 changed files
with
387 additions
and
280 deletions
ant-design-vue-jeecg/.env.test
1 | NODE_ENV=production | 1 | NODE_ENV=production |
2 | -VUE_APP_ENV=test | 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://172.16.29.77:8081/wms |
5 | VUE_APP_CAS_BASE_URL=http://localhost:8443/cas | 5 | VUE_APP_CAS_BASE_URL=http://localhost:8443/cas |
ant-design-vue-jeecg/src/assets/huaheng.png
ant-design-vue-jeecg/src/components/jeecg/JEditableTable.vue
ant-design-vue-jeecg/src/components/layouts/UserLayout.vue
@@ -59,9 +59,9 @@ export default { | @@ -59,9 +59,9 @@ export default { | ||
59 | .container { | 59 | .container { |
60 | width: 100%; | 60 | width: 100%; |
61 | min-height: 100%; | 61 | min-height: 100%; |
62 | - background: #f0f2f5 url(~@/assets/background.svg) no-repeat 50%; | 62 | + background-color: 255, 255, 255; |
63 | background-size: 100%; | 63 | background-size: 100%; |
64 | - padding: 110px 0 144px; | 64 | + // padding: 110px 0 144px; |
65 | position: relative; | 65 | position: relative; |
66 | 66 | ||
67 | a { | 67 | a { |
@@ -72,8 +72,9 @@ export default { | @@ -72,8 +72,9 @@ export default { | ||
72 | text-align: center; | 72 | text-align: center; |
73 | 73 | ||
74 | .header { | 74 | .header { |
75 | - height: 44px; | ||
76 | - line-height: 44px; | 75 | + height: 59px; |
76 | + line-height: 59px; | ||
77 | + background-color: #111; | ||
77 | 78 | ||
78 | .badge { | 79 | .badge { |
79 | position: absolute; | 80 | position: absolute; |
@@ -86,7 +87,9 @@ export default { | @@ -86,7 +87,9 @@ export default { | ||
86 | } | 87 | } |
87 | 88 | ||
88 | .logo { | 89 | .logo { |
89 | - height: 44px; | 90 | + height: 59px; |
91 | + line-height: 59px; | ||
92 | + padding: 19px; | ||
90 | vertical-align: top; | 93 | vertical-align: top; |
91 | border-style: none; | 94 | border-style: none; |
92 | } | 95 | } |
@@ -102,10 +105,11 @@ export default { | @@ -102,10 +105,11 @@ export default { | ||
102 | } | 105 | } |
103 | 106 | ||
104 | .desc { | 107 | .desc { |
105 | - font-size: 14px; | ||
106 | - color: rgba(0, 0, 0, 0.45); | ||
107 | - margin-top: 12px; | ||
108 | - margin-bottom: 40px; | 108 | + font-size: 24px; |
109 | + color: #111; | ||
110 | + margin-top: 170px; | ||
111 | + margin-bottom: 70px; | ||
112 | + font-weight: bolder; | ||
109 | } | 113 | } |
110 | } | 114 | } |
111 | 115 |
ant-design-vue-jeecg/src/components/page/GlobalHeader.vue
@@ -150,9 +150,9 @@ export default { | @@ -150,9 +150,9 @@ export default { | ||
150 | this.topMenuStyle.headerIndexRight = {} | 150 | this.topMenuStyle.headerIndexRight = {} |
151 | this.topMenuStyle.headerIndexLeft = {} | 151 | this.topMenuStyle.headerIndexLeft = {} |
152 | } else { | 152 | } else { |
153 | - let rightWidth = '400px' | ||
154 | - this.topMenuStyle.topNavHeader = {'min-width': '165px'} | ||
155 | - this.topMenuStyle.topSmenuStyle = {'width': 'calc(100% - 165px)'} | 153 | + let rightWidth = '356px' |
154 | + this.topMenuStyle.topNavHeader = {'min-width': '208px'} | ||
155 | + this.topMenuStyle.topSmenuStyle = {'width': 'calc(100% - 208px)'} | ||
156 | this.topMenuStyle.headerIndexRight = {'min-width': rightWidth, 'white-space': 'nowrap'} | 156 | this.topMenuStyle.headerIndexRight = {'min-width': rightWidth, 'white-space': 'nowrap'} |
157 | this.topMenuStyle.headerIndexLeft = {'width': `calc(100% - ${rightWidth})`} | 157 | this.topMenuStyle.headerIndexLeft = {'width': `calc(100% - ${rightWidth})`} |
158 | } | 158 | } |
@@ -180,7 +180,7 @@ export default { | @@ -180,7 +180,7 @@ export default { | ||
180 | .top-nav-header-index { | 180 | .top-nav-header-index { |
181 | 181 | ||
182 | .header-index-wide { | 182 | .header-index-wide { |
183 | - margin-left: 10px; | 183 | + margin-left: 0px; |
184 | 184 | ||
185 | .ant-menu.ant-menu-horizontal { | 185 | .ant-menu.ant-menu-horizontal { |
186 | height: @height; | 186 | height: @height; |
@@ -201,7 +201,7 @@ export default { | @@ -201,7 +201,7 @@ export default { | ||
201 | z-index: 2; | 201 | z-index: 2; |
202 | color: white; | 202 | color: white; |
203 | height: @height; | 203 | height: @height; |
204 | - background-color: @primary-color; | 204 | + background-color: #111; |
205 | transition: background 300ms; | 205 | transition: background 300ms; |
206 | 206 | ||
207 | /* dark 样式 */ | 207 | /* dark 样式 */ |
ant-design-vue-jeecg/src/components/page/GlobalLayout.vue
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | @close="() => this.collapsed = false" | 9 | @close="() => this.collapsed = false" |
10 | :closable="false" | 10 | :closable="false" |
11 | :visible="collapsed" | 11 | :visible="collapsed" |
12 | - width="200px" | 12 | + width="208px" |
13 | > | 13 | > |
14 | <side-menu | 14 | <side-menu |
15 | mode="inline" | 15 | mode="inline" |
@@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
41 | @close="() => this.collapsed = false" | 41 | @close="() => this.collapsed = false" |
42 | :closable="false" | 42 | :closable="false" |
43 | :visible="collapsed" | 43 | :visible="collapsed" |
44 | - width="200px" | 44 | + width="208px" |
45 | > | 45 | > |
46 | <side-menu | 46 | <side-menu |
47 | mode="inline" | 47 | mode="inline" |
@@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
56 | 56 | ||
57 | <a-layout | 57 | <a-layout |
58 | :class="[layoutMode, `content-width-${contentWidth}`]" | 58 | :class="[layoutMode, `content-width-${contentWidth}`]" |
59 | - :style="{ paddingLeft: fixSiderbar && isDesktop() ? `${sidebarOpened ? 200 : 80}px` : '0' }"> | 59 | + :style="{ paddingLeft: fixSiderbar && isDesktop() ? `${sidebarOpened ? 208 : 80}px` : '0' }"> |
60 | <!-- layout header --> | 60 | <!-- layout header --> |
61 | <global-header | 61 | <global-header |
62 | :mode="layoutMode" | 62 | :mode="layoutMode" |
@@ -259,12 +259,12 @@ body { | @@ -259,12 +259,12 @@ body { | ||
259 | } | 259 | } |
260 | 260 | ||
261 | .trigger { | 261 | .trigger { |
262 | - font-size: 22px; | ||
263 | - line-height: 59px; | ||
264 | - padding: 0 18px; | ||
265 | - cursor: pointer; | 262 | + font-size: 25px; |
263 | + line-height: 20px; | ||
264 | + padding: 17px 18px 17px 18px; | ||
265 | + margin: 0px 0px 0px 0px; | ||
266 | + vertical-align: top; | ||
266 | transition: color 300ms, background 300ms; | 267 | transition: color 300ms, background 300ms; |
267 | - | ||
268 | &:hover { | 268 | &:hover { |
269 | background: rgba(255, 255, 255, 0.3); | 269 | background: rgba(255, 255, 255, 0.3); |
270 | } | 270 | } |
@@ -313,7 +313,7 @@ body { | @@ -313,7 +313,7 @@ body { | ||
313 | transition: width .2s; | 313 | transition: width .2s; |
314 | 314 | ||
315 | &.ant-header-side-opened { | 315 | &.ant-header-side-opened { |
316 | - width: calc(100% - 200px) | 316 | + width: calc(100% - 208px) |
317 | } | 317 | } |
318 | 318 | ||
319 | &.ant-header-side-closed { | 319 | &.ant-header-side-closed { |
@@ -354,10 +354,10 @@ body { | @@ -354,10 +354,10 @@ body { | ||
354 | } | 354 | } |
355 | 355 | ||
356 | .avatar { | 356 | .avatar { |
357 | - margin: 20px 10px 20px 0; | 357 | + margin: 18px 0px 17px 0px; |
358 | color: #1890ff; | 358 | color: #1890ff; |
359 | background: hsla(0, 0%, 100%, .85); | 359 | background: hsla(0, 0%, 100%, .85); |
360 | - vertical-align: middle; | 360 | + vertical-align: top; |
361 | } | 361 | } |
362 | 362 | ||
363 | .icon { | 363 | .icon { |
@@ -403,8 +403,8 @@ body { | @@ -403,8 +403,8 @@ body { | ||
403 | 403 | ||
404 | .logo.top-nav-header { | 404 | .logo.top-nav-header { |
405 | text-align: center; | 405 | text-align: center; |
406 | - width: 58px; | ||
407 | - line-height: 58px; | 406 | + width: 59px; |
407 | + line-height: 59px; | ||
408 | } | 408 | } |
409 | } | 409 | } |
410 | } | 410 | } |
@@ -455,14 +455,14 @@ body { | @@ -455,14 +455,14 @@ body { | ||
455 | .header-index-wide { | 455 | .header-index-wide { |
456 | width: 100%; | 456 | width: 100%; |
457 | margin: auto; | 457 | margin: auto; |
458 | - padding: 0 20px 0 0; | 458 | + padding: 0 12px 0 0; |
459 | display: flex; | 459 | display: flex; |
460 | height: 59px; | 460 | height: 59px; |
461 | 461 | ||
462 | .ant-menu.ant-menu-horizontal { | 462 | .ant-menu.ant-menu-horizontal { |
463 | border: none; | 463 | border: none; |
464 | - height: 64px; | ||
465 | - line-height: 64px; | 464 | + height: 59px; |
465 | + line-height: 59px; | ||
466 | } | 466 | } |
467 | 467 | ||
468 | .header-index-left { | 468 | .header-index-left { |
@@ -470,17 +470,19 @@ body { | @@ -470,17 +470,19 @@ body { | ||
470 | display: flex; | 470 | display: flex; |
471 | 471 | ||
472 | .logo.top-nav-header { | 472 | .logo.top-nav-header { |
473 | - width: 160px; | ||
474 | - height: 58px; | 473 | + width: 208px; |
474 | + height: 59px; | ||
475 | + padding: 0 10px; | ||
476 | + text-align: center; | ||
475 | position: relative; | 477 | position: relative; |
476 | - line-height: 58px; | 478 | + line-height: 54px; |
477 | transition: all .3s; | 479 | transition: all .3s; |
478 | overflow: hidden; | 480 | overflow: hidden; |
479 | 481 | ||
480 | img { | 482 | img { |
481 | display: inline-block; | 483 | display: inline-block; |
482 | vertical-align: middle; | 484 | vertical-align: middle; |
483 | - height: 32px; | 485 | + height: 20px; |
484 | } | 486 | } |
485 | 487 | ||
486 | h1 { | 488 | h1 { |
@@ -595,11 +597,11 @@ body { | @@ -595,11 +597,11 @@ body { | ||
595 | height: 64px; | 597 | height: 64px; |
596 | position: relative; | 598 | position: relative; |
597 | line-height: 64px; | 599 | line-height: 64px; |
598 | - padding-left: 24px; | ||
599 | -webkit-transition: all .3s; | 600 | -webkit-transition: all .3s; |
600 | transition: all .3s; | 601 | transition: all .3s; |
601 | background: #002140; | 602 | background: #002140; |
602 | overflow: hidden; | 603 | overflow: hidden; |
604 | + text-align: center; | ||
603 | 605 | ||
604 | img, h1 { | 606 | img, h1 { |
605 | display: inline-block; | 607 | display: inline-block; |
@@ -607,7 +609,8 @@ body { | @@ -607,7 +609,8 @@ body { | ||
607 | } | 609 | } |
608 | 610 | ||
609 | img { | 611 | img { |
610 | - height: 32px; | 612 | + height: 20px; |
613 | + vertical-align: middle; | ||
611 | } | 614 | } |
612 | 615 | ||
613 | h1 { | 616 | h1 { |
@@ -644,7 +647,7 @@ body { | @@ -644,7 +647,7 @@ body { | ||
644 | padding: 4px 0; | 647 | padding: 4px 0; |
645 | 648 | ||
646 | .ant-dropdown-menu-item { | 649 | .ant-dropdown-menu-item { |
647 | - width: 160px; | 650 | + width: auto; |
648 | } | 651 | } |
649 | 652 | ||
650 | .ant-dropdown-menu-item > .anticon:first-child, | 653 | .ant-dropdown-menu-item > .anticon:first-child, |
ant-design-vue-jeecg/src/components/tools/Logo.vue
ant-design-vue-jeecg/src/components/tools/UserMenu.vue
@@ -36,8 +36,8 @@ | @@ -36,8 +36,8 @@ | ||
36 | <header-notice class="action"/> | 36 | <header-notice class="action"/> |
37 | <a-dropdown> | 37 | <a-dropdown> |
38 | <span class="action action-full ant-dropdown-link user-dropdown-menu"> | 38 | <span class="action action-full ant-dropdown-link user-dropdown-menu"> |
39 | - <!-- <a-avatar class="avatar" size="small" :src="getAvatar()"/> --> | ||
40 | - <span v-if="isDesktop()">欢迎您,{{ nickname() }}</span> | 39 | + <a-avatar class="avatar" size="small" :src="getAvatar()"/> |
40 | + <span v-if="isDesktop()" style="padding: 0px 0px 0px 10px;">欢迎您,{{ 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"> |
@@ -46,12 +46,12 @@ | @@ -46,12 +46,12 @@ | ||
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"/> |
52 | <span>账户设置</span> | 52 | <span>账户设置</span> |
53 | </router-link> | 53 | </router-link> |
54 | - </a-menu-item> | 54 | + </a-menu-item> --> |
55 | <a-menu-item key="3" @click="systemSetting"> | 55 | <a-menu-item key="3" @click="systemSetting"> |
56 | <a-icon type="tool"/> | 56 | <a-icon type="tool"/> |
57 | <span>系统设置</span> | 57 | <span>系统设置</span> |
ant-design-vue-jeecg/src/defaultSettings.js
@@ -18,7 +18,7 @@ export default { | @@ -18,7 +18,7 @@ export default { | ||
18 | navTheme: 'dark', // theme for nav menu | 18 | navTheme: 'dark', // theme for nav menu |
19 | layout: 'sidemenu', // nav menu position: sidemenu or topmenu | 19 | layout: 'sidemenu', // nav menu position: sidemenu or topmenu |
20 | contentWidth: 'Fixed', // layout of content: Fluid or Fixed, only works when layout is topmenu | 20 | contentWidth: 'Fixed', // layout of content: Fluid or Fixed, only works when layout is topmenu |
21 | - fixedHeader: false, // sticky header | 21 | + fixedHeader: true, // sticky header |
22 | fixSiderbar: true, // sticky siderbar | 22 | fixSiderbar: true, // sticky siderbar |
23 | autoHideHeader: false, // auto hide header | 23 | autoHideHeader: false, // auto hide header |
24 | colorWeak: false, | 24 | colorWeak: false, |
ant-design-vue-jeecg/src/views/system/RoleUserList.vue
@@ -543,6 +543,6 @@ export default { | @@ -543,6 +543,6 @@ export default { | ||
543 | @import '~@assets/less/common.less'; | 543 | @import '~@assets/less/common.less'; |
544 | /** Button按钮间距 */ | 544 | /** Button按钮间距 */ |
545 | .ant-btn { | 545 | .ant-btn { |
546 | - margin-left: 8px | 546 | + margin-left: 0px |
547 | } | 547 | } |
548 | </style> | 548 | </style> |
549 | \ No newline at end of file | 549 | \ No newline at end of file |
ant-design-vue-jeecg/src/views/system/config/AddressList.vue
ant-design-vue-jeecg/src/views/system/config/LocationTypeList.vue
@@ -5,6 +5,14 @@ | @@ -5,6 +5,14 @@ | ||
5 | <a-form layout="inline" @keyup.enter.native="searchQuery"> | 5 | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
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="库区"> | ||
9 | + <a-form-model-item prop="zoneOptions"> | ||
10 | + <j-multi-select-tag v-model="queryParam.zoneCode" :options="zoneOptions" placeholder="请选择"> | ||
11 | + </j-multi-select-tag> | ||
12 | + </a-form-model-item> | ||
13 | + </a-form-item> | ||
14 | + </a-col> | ||
15 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
8 | <a-form-item label="编码"> | 16 | <a-form-item label="编码"> |
9 | <a-input placeholder="请输入编码" v-model="queryParam.code"></a-input> | 17 | <a-input placeholder="请输入编码" v-model="queryParam.code"></a-input> |
10 | </a-form-item> | 18 | </a-form-item> |
@@ -78,6 +86,12 @@ | @@ -78,6 +86,12 @@ | ||
78 | class="j-table-force-nowrap" | 86 | class="j-table-force-nowrap" |
79 | @change="handleTableChange" | 87 | @change="handleTableChange" |
80 | > | 88 | > |
89 | + <span slot="zoneCode" slot-scope="zoneCode"> | ||
90 | + <a-tag :key="zoneCode" color="blue"> | ||
91 | + {{ solutionZoneCode(zoneCode) }} | ||
92 | + </a-tag> | ||
93 | + </span> | ||
94 | + | ||
81 | <template slot="htmlSlot" slot-scope="text"> | 95 | <template slot="htmlSlot" slot-scope="text"> |
82 | <div v-html="text"></div> | 96 | <div v-html="text"></div> |
83 | </template> | 97 | </template> |
@@ -126,6 +140,7 @@ import '@/assets/less/TableExpand.less' | @@ -126,6 +140,7 @@ import '@/assets/less/TableExpand.less' | ||
126 | import { mixinDevice } from '@/utils/mixin' | 140 | import { mixinDevice } from '@/utils/mixin' |
127 | import { JeecgListMixin } from '@/mixins/JeecgListMixin' | 141 | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
128 | import LocationTypeModal from './modules/LocationTypeModal' | 142 | import LocationTypeModal from './modules/LocationTypeModal' |
143 | +import { getZoneList } from '@/api/api' | ||
129 | 144 | ||
130 | export default { | 145 | export default { |
131 | name: 'LocationTypeList', | 146 | name: 'LocationTypeList', |
@@ -135,6 +150,8 @@ export default { | @@ -135,6 +150,8 @@ export default { | ||
135 | }, | 150 | }, |
136 | data() { | 151 | data() { |
137 | return { | 152 | return { |
153 | + zoneList: [], | ||
154 | + zoneOptions: [], | ||
138 | description: '库位类型管理页面', | 155 | description: '库位类型管理页面', |
139 | // 表头 | 156 | // 表头 |
140 | columns: [ | 157 | columns: [ |
@@ -161,7 +178,9 @@ export default { | @@ -161,7 +178,9 @@ export default { | ||
161 | { | 178 | { |
162 | title: '库区', | 179 | title: '库区', |
163 | align: 'center', | 180 | align: 'center', |
164 | - dataIndex: 'zoneCode' | 181 | + dataIndex: 'zoneCode', |
182 | + key: 'zoneCode', | ||
183 | + scopedSlots: { customRender: 'zoneCode' } | ||
165 | }, | 184 | }, |
166 | { | 185 | { |
167 | title: '长度', | 186 | title: '长度', |
@@ -225,6 +244,19 @@ export default { | @@ -225,6 +244,19 @@ export default { | ||
225 | }, | 244 | }, |
226 | created() { | 245 | created() { |
227 | this.getSuperFieldList() | 246 | this.getSuperFieldList() |
247 | + getZoneList().then(res => { | ||
248 | + if (res.success) { | ||
249 | + this.zoneList = res.result | ||
250 | + //延迟半秒执行,避免组件未加载完,数据已经加载完 | ||
251 | + setTimeout(() => { | ||
252 | + //slice可以在数组的任何位置进行删除/添加操作 | ||
253 | + this.zoneOptions.splice(0, 1) | ||
254 | + for (let i = 0; i < res.result.length; i++) { | ||
255 | + this.zoneOptions.push({ value: res.result[i].code, text: res.result[i].name }) | ||
256 | + } | ||
257 | + }, 500) | ||
258 | + } | ||
259 | + }) | ||
228 | }, | 260 | }, |
229 | computed: { | 261 | computed: { |
230 | importExcelUrl: function() { | 262 | importExcelUrl: function() { |
@@ -233,6 +265,16 @@ export default { | @@ -233,6 +265,16 @@ export default { | ||
233 | }, | 265 | }, |
234 | methods: { | 266 | methods: { |
235 | initDictConfig() {}, | 267 | initDictConfig() {}, |
268 | + solutionZoneCode(value) { | ||
269 | + var actions = [] | ||
270 | + Object.keys(this.zoneList).some(key => { | ||
271 | + if (this.zoneList[key].code == '' + value) { | ||
272 | + actions.push(this.zoneList[key].name) | ||
273 | + return true | ||
274 | + } | ||
275 | + }) | ||
276 | + return actions.join('') | ||
277 | + }, | ||
236 | getSuperFieldList() { | 278 | getSuperFieldList() { |
237 | let fieldList = [] | 279 | let fieldList = [] |
238 | fieldList.push({ type: 'string', value: 'code', text: '编码', dictCode: '' }) | 280 | fieldList.push({ type: 'string', value: 'code', text: '编码', dictCode: '' }) |
ant-design-vue-jeecg/src/views/system/config/modules/AddressForm.vue
@@ -14,17 +14,13 @@ | @@ -14,17 +14,13 @@ | ||
14 | </a-form-model-item> | 14 | </a-form-model-item> |
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="zoneCode"> | ||
18 | - <a-select | ||
19 | - show-search | ||
20 | - placeholder="请选择库区" | ||
21 | - option-filter-prop="children" | ||
22 | - v-model="model.zoneCode"> | 17 | + <a-form-item label="库区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zoneCode"> |
18 | + <a-select show-search placeholder="请选择库区" option-filter-prop="children" v-model="model.zoneCode"> | ||
23 | <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code"> | 19 | <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code"> |
24 | {{ item.name }} | 20 | {{ item.name }} |
25 | </a-select-option> | 21 | </a-select-option> |
26 | </a-select> | 22 | </a-select> |
27 | - </a-form-model-item> | 23 | + </a-form-item> |
28 | </a-col> | 24 | </a-col> |
29 | <a-col :span="24"> | 25 | <a-col :span="24"> |
30 | <a-form-model-item label="接口地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url"> | 26 | <a-form-model-item label="接口地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url"> |
@@ -38,10 +34,9 @@ | @@ -38,10 +34,9 @@ | ||
38 | </template> | 34 | </template> |
39 | 35 | ||
40 | <script> | 36 | <script> |
41 | - | ||
42 | -import {httpAction, getAction} from '@/api/manage' | ||
43 | -import {validateDuplicateValue} from '@/utils/util' | ||
44 | -import {getZoneList} from '@/api/api' | 37 | +import { httpAction, getAction } from '@/api/manage' |
38 | +import { validateDuplicateValue } from '@/utils/util' | ||
39 | +import { getZoneList } from '@/api/api' | ||
45 | 40 | ||
46 | export default { | 41 | export default { |
47 | name: 'AddressForm', | 42 | name: 'AddressForm', |
@@ -56,79 +51,79 @@ export default { | @@ -56,79 +51,79 @@ export default { | ||
56 | }, | 51 | }, |
57 | data() { | 52 | data() { |
58 | return { | 53 | return { |
59 | - zoneList: [], | ||
60 | model: {}, | 54 | model: {}, |
55 | + zoneList: [], | ||
61 | labelCol: { | 56 | labelCol: { |
62 | - xs: {span: 24}, | ||
63 | - sm: {span: 5}, | 57 | + xs: { span: 24 }, |
58 | + sm: { span: 5 } | ||
64 | }, | 59 | }, |
65 | wrapperCol: { | 60 | wrapperCol: { |
66 | - xs: {span: 24}, | ||
67 | - sm: {span: 16}, | 61 | + xs: { span: 24 }, |
62 | + sm: { span: 16 } | ||
68 | }, | 63 | }, |
69 | confirmLoading: false, | 64 | confirmLoading: false, |
70 | validatorRules: {}, | 65 | validatorRules: {}, |
71 | url: { | 66 | url: { |
72 | - add: "/config/address/add", | ||
73 | - edit: "/config/address/edit", | ||
74 | - queryById: "/config/address/queryById" | 67 | + add: '/config/address/add', |
68 | + edit: '/config/address/edit', | ||
69 | + queryById: '/config/address/queryById' | ||
75 | } | 70 | } |
76 | } | 71 | } |
77 | }, | 72 | }, |
78 | computed: { | 73 | computed: { |
79 | formDisabled() { | 74 | formDisabled() { |
80 | return this.disabled | 75 | return this.disabled |
81 | - }, | 76 | + } |
82 | }, | 77 | }, |
83 | created() { | 78 | created() { |
84 | //备份model原始值 | 79 | //备份model原始值 |
85 | - this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
86 | - this.loadFrom(); | 80 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
81 | + this.loadFrom() | ||
87 | }, | 82 | }, |
88 | methods: { | 83 | methods: { |
89 | - add() { | ||
90 | - this.edit(this.modelDefault); | ||
91 | - }, | ||
92 | - edit(record) { | ||
93 | - this.model = Object.assign({}, record); | ||
94 | - this.visible = true; | ||
95 | - }, | ||
96 | loadFrom() { | 84 | loadFrom() { |
97 | - getZoneList().then((res) => { | 85 | + getZoneList().then(res => { |
98 | if (res.success) { | 86 | if (res.success) { |
99 | this.zoneList = res.result | 87 | this.zoneList = res.result |
100 | } | 88 | } |
101 | - }); | 89 | + }) |
90 | + }, | ||
91 | + add() { | ||
92 | + this.edit(this.modelDefault) | ||
93 | + }, | ||
94 | + edit(record) { | ||
95 | + this.model = Object.assign({}, record) | ||
96 | + this.visible = true | ||
102 | }, | 97 | }, |
103 | submitForm() { | 98 | submitForm() { |
104 | - const that = this; | 99 | + const that = this |
105 | // 触发表单验证 | 100 | // 触发表单验证 |
106 | this.$refs.form.validate(valid => { | 101 | this.$refs.form.validate(valid => { |
107 | if (valid) { | 102 | if (valid) { |
108 | - that.confirmLoading = true; | ||
109 | - let httpurl = ''; | ||
110 | - let method = ''; | 103 | + that.confirmLoading = true |
104 | + let httpurl = '' | ||
105 | + let method = '' | ||
111 | if (!this.model.id) { | 106 | if (!this.model.id) { |
112 | - httpurl += this.url.add; | ||
113 | - method = 'post'; | 107 | + httpurl += this.url.add |
108 | + method = 'post' | ||
114 | } else { | 109 | } else { |
115 | - httpurl += this.url.edit; | ||
116 | - method = 'put'; | 110 | + httpurl += this.url.edit |
111 | + method = 'put' | ||
117 | } | 112 | } |
118 | - httpAction(httpurl, this.model, method).then((res) => { | 113 | + httpAction(httpurl, this.model, method).then(res => { |
119 | if (res.success) { | 114 | if (res.success) { |
120 | - that.$message.success(res.message); | ||
121 | - that.$emit('ok'); | 115 | + that.$message.success(res.message) |
116 | + that.$emit('ok') | ||
122 | } else { | 117 | } else { |
123 | - that.$message.warning(res.message); | 118 | + that.$message.warning(res.message) |
124 | } | 119 | } |
125 | - }).finally(() => { | ||
126 | - that.confirmLoading = false; | 120 | + }) |
121 | + .finally(() => { | ||
122 | + that.confirmLoading = false | ||
127 | }) | 123 | }) |
128 | } | 124 | } |
129 | - | ||
130 | }) | 125 | }) |
131 | - }, | 126 | + } |
132 | } | 127 | } |
133 | } | 128 | } |
134 | </script> | 129 | </script> |
135 | \ No newline at end of file | 130 | \ No newline at end of file |
ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue
@@ -115,7 +115,9 @@ export default { | @@ -115,7 +115,9 @@ export default { | ||
115 | { | 115 | { |
116 | title: '库存详情ID', | 116 | title: '库存详情ID', |
117 | align: 'center', | 117 | align: 'center', |
118 | - dataIndex: 'id' | 118 | + dataIndex: 'id', |
119 | + fixed: "left", | ||
120 | + width: 100, | ||
119 | }, | 121 | }, |
120 | { | 122 | { |
121 | title: '货主', | 123 | title: '货主', |
@@ -229,14 +231,14 @@ export default { | @@ -229,14 +231,14 @@ export default { | ||
229 | align: 'center', | 231 | align: 'center', |
230 | dataIndex: 'updateTime' | 232 | dataIndex: 'updateTime' |
231 | }, | 233 | }, |
232 | - { | ||
233 | - title: '操作', | ||
234 | - dataIndex: 'action', | ||
235 | - align: 'center', | ||
236 | - fixed: 'right', | ||
237 | - width: 147, | ||
238 | - scopedSlots: {customRender: 'action'} | ||
239 | - } | 234 | + // { |
235 | + // title: '操作', | ||
236 | + // dataIndex: 'action', | ||
237 | + // align: 'center', | ||
238 | + // fixed: 'right', | ||
239 | + // width: 147, | ||
240 | + // scopedSlots: {customRender: 'action'} | ||
241 | + // } | ||
240 | ], | 242 | ], |
241 | url: { | 243 | url: { |
242 | list: '/inventory/inventoryHeader/listInventoryDetailByMainId', | 244 | list: '/inventory/inventoryHeader/listInventoryDetailByMainId', |
ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue
@@ -175,6 +175,8 @@ export default { | @@ -175,6 +175,8 @@ export default { | ||
175 | { | 175 | { |
176 | title: '库存ID', | 176 | title: '库存ID', |
177 | align: "center", | 177 | align: "center", |
178 | + fixed: "left", | ||
179 | + width: 100, | ||
178 | dataIndex: 'id' | 180 | dataIndex: 'id' |
179 | }, | 181 | }, |
180 | { | 182 | { |
@@ -230,14 +232,14 @@ export default { | @@ -230,14 +232,14 @@ export default { | ||
230 | align: "center", | 232 | align: "center", |
231 | dataIndex: 'updateTime' | 233 | dataIndex: 'updateTime' |
232 | }, | 234 | }, |
233 | - { | ||
234 | - title: '操作', | ||
235 | - dataIndex: 'action', | ||
236 | - align: "center", | ||
237 | - fixed: "right", | ||
238 | - width: 147, | ||
239 | - scopedSlots: {customRender: 'action'}, | ||
240 | - } | 235 | + // { |
236 | + // title: '操作', | ||
237 | + // dataIndex: 'action', | ||
238 | + // align: "center", | ||
239 | + // fixed: "right", | ||
240 | + // width: 147, | ||
241 | + // scopedSlots: {customRender: 'action'}, | ||
242 | + // } | ||
241 | ], | 243 | ], |
242 | url: { | 244 | url: { |
243 | list: "/inventory/inventoryHeader/list", | 245 | list: "/inventory/inventoryHeader/list", |
ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | </a-form-model-item> | 15 | </a-form-model-item> |
16 | </a-form-item> | 16 | </a-form-item> |
17 | </a-col> | 17 | </a-col> |
18 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 18 | + <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
19 | <a-form-item label="货主"> | 19 | <a-form-item label="货主"> |
20 | <a-select | 20 | <a-select |
21 | show-search | 21 | show-search |
@@ -28,6 +28,16 @@ | @@ -28,6 +28,16 @@ | ||
28 | </a-select-option> | 28 | </a-select-option> |
29 | </a-select> | 29 | </a-select> |
30 | </a-form-item> | 30 | </a-form-item> |
31 | + </a-col> --> | ||
32 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
33 | + <a-form-item label="入库单编码"> | ||
34 | + <a-input placeholder="请输入入库单编码" v-model="queryParam.receiptCode"></a-input> | ||
35 | + </a-form-item> | ||
36 | + </a-col> | ||
37 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
38 | + <a-form-item label="出库单编码"> | ||
39 | + <a-input placeholder="请输入出库单编码" v-model="queryParam.shipmentCode"></a-input> | ||
40 | + </a-form-item> | ||
31 | </a-col> | 41 | </a-col> |
32 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 42 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
33 | <a-form-item label="库位编码"> | 43 | <a-form-item label="库位编码"> |
@@ -49,18 +59,18 @@ | @@ -49,18 +59,18 @@ | ||
49 | <j-dict-select-tag placeholder="请选择库存状态" v-model="queryParam.inventoryStatus" dictCode="inventory_status"/> | 59 | <j-dict-select-tag placeholder="请选择库存状态" v-model="queryParam.inventoryStatus" dictCode="inventory_status"/> |
50 | </a-form-item> | 60 | </a-form-item> |
51 | </a-col> | 61 | </a-col> |
52 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
53 | - <a-form-item label="物料编码"> | ||
54 | - <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input> | ||
55 | - </a-form-item> | ||
56 | - </a-col> | ||
57 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
58 | - <a-form-item label="物料名称"> | ||
59 | - <a-input placeholder="请输入物料名称" v-model="queryParam.materialName"></a-input> | ||
60 | - </a-form-item> | ||
61 | - </a-col> | ||
62 | <template v-if="toggleSearchStatus"> | 62 | <template v-if="toggleSearchStatus"> |
63 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 63 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
64 | + <a-form-item label="物料编码"> | ||
65 | + <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input> | ||
66 | + </a-form-item> | ||
67 | + </a-col> | ||
68 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
69 | + <a-form-item label="物料名称"> | ||
70 | + <a-input placeholder="请输入物料名称" v-model="queryParam.materialName"></a-input> | ||
71 | + </a-form-item> | ||
72 | + </a-col> | ||
73 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
64 | <a-form-item label="物料规格"> | 74 | <a-form-item label="物料规格"> |
65 | <a-input placeholder="请输入物料规格" v-model="queryParam.materialSpec"></a-input> | 75 | <a-input placeholder="请输入物料规格" v-model="queryParam.materialSpec"></a-input> |
66 | </a-form-item> | 76 | </a-form-item> |
@@ -107,36 +117,14 @@ | @@ -107,36 +117,14 @@ | ||
107 | 117 | ||
108 | <!-- 操作按钮区域 --> | 118 | <!-- 操作按钮区域 --> |
109 | <div class="table-operator"> | 119 | <div class="table-operator"> |
110 | - <a-button @click="handleAdd" v-has="'inventoryTransaction:add'" type="primary" icon="plus">新增</a-button> | ||
111 | - <a-button v-has="'inventoryTransaction:export'" type="primary" icon="download" | ||
112 | - @click="handleExportXls('库存交易记录')">导出 | ||
113 | - </a-button> | ||
114 | - <a-upload v-has="'inventoryTransaction:import'" name="file" :showUploadList="false" :multiple="false" | ||
115 | - :headers="tokenHeader" :action="importExcelUrl" | ||
116 | - @change="handleImportExcel"> | 120 | + <a-button v-has="'inventoryTransaction:export'" type="primary" icon="download" @click="handleExportXls('库存交易记录')">导出</a-button> |
121 | + <a-upload v-has="'inventoryTransaction:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | ||
117 | <a-button type="primary" icon="import">导入</a-button> | 122 | <a-button type="primary" icon="import">导入</a-button> |
118 | </a-upload> | 123 | </a-upload> |
119 | - <a-dropdown v-if="selectedRowKeys.length > 0"> | ||
120 | - <a-menu slot="overlay" v-has="'inventoryTransaction:deleteBatch'"> | ||
121 | - <a-menu-item key="1" @click="batchDel"> | ||
122 | - <a-icon type="delete"/> | ||
123 | - 删除 | ||
124 | - </a-menu-item> | ||
125 | - </a-menu> | ||
126 | - <a-button style="margin-left: 8px"> 批量操作 | ||
127 | - <a-icon type="down"/> | ||
128 | - </a-button> | ||
129 | - </a-dropdown> | ||
130 | </div> | 124 | </div> |
131 | 125 | ||
132 | <!-- table区域-begin --> | 126 | <!-- table区域-begin --> |
133 | <div> | 127 | <div> |
134 | - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | ||
135 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | ||
136 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | ||
137 | - <a style="margin-left: 24px" @click="onClearSelected">清空</a> | ||
138 | - </div> | ||
139 | - | ||
140 | <a-table | 128 | <a-table |
141 | ref="table" | 129 | ref="table" |
142 | size="middle" | 130 | size="middle" |
@@ -147,7 +135,6 @@ | @@ -147,7 +135,6 @@ | ||
147 | :dataSource="dataSource" | 135 | :dataSource="dataSource" |
148 | :pagination="ipagination" | 136 | :pagination="ipagination" |
149 | :loading="loading" | 137 | :loading="loading" |
150 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | ||
151 | class="j-table-force-nowrap" | 138 | class="j-table-force-nowrap" |
152 | @change="handleTableChange"> | 139 | @change="handleTableChange"> |
153 | 140 | ||
@@ -168,8 +155,6 @@ | @@ -168,8 +155,6 @@ | ||
168 | {{ solutionZoneCode(zoneCode) }} | 155 | {{ solutionZoneCode(zoneCode) }} |
169 | </a-tag> | 156 | </a-tag> |
170 | </span> | 157 | </span> |
171 | - </a-table> | ||
172 | - | ||
173 | <template slot="htmlSlot" slot-scope="text"> | 158 | <template slot="htmlSlot" slot-scope="text"> |
174 | <div v-html="text"></div> | 159 | <div v-html="text"></div> |
175 | </template> | 160 | </template> |
@@ -190,7 +175,6 @@ | @@ -190,7 +175,6 @@ | ||
190 | 下载 | 175 | 下载 |
191 | </a-button> | 176 | </a-button> |
192 | </template> | 177 | </template> |
193 | - | ||
194 | <span slot="action" slot-scope="text, record"> | 178 | <span slot="action" slot-scope="text, record"> |
195 | <a v-has="'inventoryTransaction:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> | 179 | <a v-has="'inventoryTransaction:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> |
196 | <a-dropdown> | 180 | <a-dropdown> |
@@ -207,7 +191,6 @@ | @@ -207,7 +191,6 @@ | ||
207 | </a-menu> | 191 | </a-menu> |
208 | </a-dropdown> | 192 | </a-dropdown> |
209 | </span> | 193 | </span> |
210 | - | ||
211 | </a-table> | 194 | </a-table> |
212 | </div> | 195 | </div> |
213 | 196 | ||
@@ -241,7 +224,9 @@ export default { | @@ -241,7 +224,9 @@ export default { | ||
241 | { | 224 | { |
242 | title: '库存交易ID', | 225 | title: '库存交易ID', |
243 | align: "center", | 226 | align: "center", |
244 | - dataIndex: 'id' | 227 | + dataIndex: 'id', |
228 | + fixed: 'left', | ||
229 | + width: 100, | ||
245 | }, | 230 | }, |
246 | { | 231 | { |
247 | title: '库区', | 232 | title: '库区', |
@@ -258,6 +243,16 @@ export default { | @@ -258,6 +243,16 @@ export default { | ||
258 | // scopedSlots: {customRender: 'companyCode'} | 243 | // scopedSlots: {customRender: 'companyCode'} |
259 | // }, | 244 | // }, |
260 | { | 245 | { |
246 | + title: '入库单编码', | ||
247 | + align: "center", | ||
248 | + dataIndex: 'receiptCode' | ||
249 | + }, | ||
250 | + { | ||
251 | + title: '出库单编码', | ||
252 | + align: "center", | ||
253 | + dataIndex: 'shipmentCode' | ||
254 | + }, | ||
255 | + { | ||
261 | title: '容器编码', | 256 | title: '容器编码', |
262 | align: "center", | 257 | align: "center", |
263 | dataIndex: 'containerCode' | 258 | dataIndex: 'containerCode' |
@@ -319,16 +314,6 @@ export default { | @@ -319,16 +314,6 @@ export default { | ||
319 | dataIndex: 'batch' | 314 | dataIndex: 'batch' |
320 | }, | 315 | }, |
321 | { | 316 | { |
322 | - title: '入库单编码', | ||
323 | - align: "center", | ||
324 | - dataIndex: 'receiptCode' | ||
325 | - }, | ||
326 | - { | ||
327 | - title: '出库单编码', | ||
328 | - align: "center", | ||
329 | - dataIndex: 'shipmentCode' | ||
330 | - }, | ||
331 | - { | ||
332 | title: '创建人', | 317 | title: '创建人', |
333 | align: "center", | 318 | align: "center", |
334 | dataIndex: 'createBy' | 319 | dataIndex: 'createBy' |
@@ -348,14 +333,14 @@ export default { | @@ -348,14 +333,14 @@ export default { | ||
348 | align: "center", | 333 | align: "center", |
349 | dataIndex: 'updateTime' | 334 | dataIndex: 'updateTime' |
350 | }, | 335 | }, |
351 | - { | ||
352 | - title: '操作', | ||
353 | - dataIndex: 'action', | ||
354 | - align: "center", | ||
355 | - fixed: "right", | ||
356 | - width: 147, | ||
357 | - scopedSlots: {customRender: 'action'} | ||
358 | - } | 336 | + // { |
337 | + // title: '操作', | ||
338 | + // dataIndex: 'action', | ||
339 | + // align: "center", | ||
340 | + // fixed: "right", | ||
341 | + // width: 147, | ||
342 | + // scopedSlots: {customRender: 'action'} | ||
343 | + // } | ||
359 | ], | 344 | ], |
360 | url: { | 345 | url: { |
361 | list: "/inventory/inventoryTransaction/list", | 346 | list: "/inventory/inventoryTransaction/list", |
ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue
@@ -161,7 +161,6 @@ | @@ -161,7 +161,6 @@ | ||
161 | :dataSource="dataSource" | 161 | :dataSource="dataSource" |
162 | :pagination="ipagination" | 162 | :pagination="ipagination" |
163 | :loading="loading" | 163 | :loading="loading" |
164 | - :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" | ||
165 | class="j-table-force-nowrap" | 164 | class="j-table-force-nowrap" |
166 | @change="handleTableChange" | 165 | @change="handleTableChange" |
167 | > | 166 | > |
@@ -198,9 +197,7 @@ | @@ -198,9 +197,7 @@ | ||
198 | </template> | 197 | </template> |
199 | <template slot="fileSlot" slot-scope="text"> | 198 | <template slot="fileSlot" slot-scope="text"> |
200 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | 199 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
201 | - <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> | ||
202 | - 下载 | ||
203 | - </a-button> | 200 | + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">下载</a-button> |
204 | </template> | 201 | </template> |
205 | <span slot="action" slot-scope="text, record"> | 202 | <span slot="action" slot-scope="text, record"> |
206 | <a v-has="'inventoryDetail:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> | 203 | <a v-has="'inventoryDetail:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> |
@@ -238,14 +235,11 @@ export default { | @@ -238,14 +235,11 @@ export default { | ||
238 | // 表头 | 235 | // 表头 |
239 | columns: [ | 236 | columns: [ |
240 | { | 237 | { |
241 | - title: '#', | ||
242 | - dataIndex: '', | ||
243 | - key: 'rowIndex', | ||
244 | - width: 60, | 238 | + title: '库存详情ID', |
245 | align: 'center', | 239 | align: 'center', |
246 | - customRender: function (t, r, index) { | ||
247 | - return parseInt(index) + 1 | ||
248 | - } | 240 | + dataIndex: 'id', |
241 | + fixed: "left", | ||
242 | + width: 100, | ||
249 | }, | 243 | }, |
250 | { | 244 | { |
251 | title: '货主', | 245 | title: '货主', |
@@ -355,14 +349,14 @@ export default { | @@ -355,14 +349,14 @@ export default { | ||
355 | align: 'center', | 349 | align: 'center', |
356 | dataIndex: 'updateTime' | 350 | dataIndex: 'updateTime' |
357 | }, | 351 | }, |
358 | - { | ||
359 | - title: '操作', | ||
360 | - dataIndex: 'action', | ||
361 | - align: 'center', | ||
362 | - fixed: 'right', | ||
363 | - width: 147, | ||
364 | - scopedSlots: {customRender: 'action'} | ||
365 | - } | 352 | + // { |
353 | + // title: '操作', | ||
354 | + // dataIndex: 'action', | ||
355 | + // align: 'center', | ||
356 | + // fixed: 'right', | ||
357 | + // width: 147, | ||
358 | + // scopedSlots: {customRender: 'action'} | ||
359 | + // } | ||
366 | ], | 360 | ], |
367 | url: { | 361 | url: { |
368 | list: '/inventory/inventoryDetail/list', | 362 | list: '/inventory/inventoryDetail/list', |
ant-design-vue-jeecg/src/views/system/inventory/subTables/InventoryDetailSubTable.vue
ant-design-vue-jeecg/src/views/system/monitor/ApiLogList.vue
@@ -103,24 +103,24 @@ | @@ -103,24 +103,24 @@ | ||
103 | <template :slot="expandedRowRender" slot-scope="record"> | 103 | <template :slot="expandedRowRender" slot-scope="record"> |
104 | <div style="margin: 0"> | 104 | <div style="margin: 0"> |
105 | <div> | 105 | <div> |
106 | - <a-badge status="default" style="vertical-align: revert;" /> | 106 | + <a-badge status="default" style="vertical-align: text-bottom;" /> |
107 | <a-button @click="copyToClipboard(record.requestHeader)" type="link" icon="copy" style="vertical-align: revert;"></a-button> | 107 | <a-button @click="copyToClipboard(record.requestHeader)" type="link" icon="copy" style="vertical-align: revert;"></a-button> |
108 | - <span style="vertical-align: left;word-break:break-all;white-space:pre-wrap;overflow:hidden;color:#b3b3b3;">请求头:{{ record.requestHeader }}</span> | 108 | + <span style="vertical-align: text-bottom; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#b3b3b3;">请求头:{{ record.requestHeader }}</span> |
109 | </div> | 109 | </div> |
110 | <div> | 110 | <div> |
111 | - <a-badge status="success" style="vertical-align: middle;" /> | ||
112 | - <a-button @click="copyToClipboard(record.requestBody)" type="link" icon="copy" style="vertical-align: middle;"></a-button> | ||
113 | - <span style="vertical-align: middle; word-break: break-all; white-space: pre-wrap; overflow: hidden; color: saddlebrown;">请求内容:{{ record.requestBody }}</span> | 111 | + <a-badge status="success" style="vertical-align: text-bottom;" /> |
112 | + <a-button @click="copyToClipboard(record.requestBody)" type="link" icon="copy" style="vertical-align: revert;"></a-button> | ||
113 | + <span style="vertical-align: text-bottom; word-break:break-all; white-space:pre-wrap; overflow:hidden; color: saddlebrown;">请求内容:{{ record.requestBody }}</span> | ||
114 | </div> | 114 | </div> |
115 | <div> | 115 | <div> |
116 | - <a-badge status="processing" style="vertical-align: revert;" /> | 116 | + <a-badge status="processing" style="vertical-align: text-bottom;" /> |
117 | <a-button @click="copyToClipboard(record.responseBody)" type="link" icon="copy" style="vertical-align: revert;"></a-button> | 117 | <a-button @click="copyToClipboard(record.responseBody)" type="link" icon="copy" style="vertical-align: revert;"></a-button> |
118 | - <span style="vertical-align: text-bottom;word-break:break-all;white-space:pre-wrap;overflow:hidden;color:#0066CC;">响应内容:{{ record.responseBody }}</span> | 118 | + <span style="vertical-align: text-bottom; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#0066CC;">响应内容:{{ record.responseBody }}</span> |
119 | </div> | 119 | </div> |
120 | <div v-if="record.exception" > | 120 | <div v-if="record.exception" > |
121 | - <a-badge status="error" style="vertical-align: revert;" /> | 121 | + <a-badge status="error" style="vertical-align: text-bottom;" /> |
122 | <a-button @click="copyToClipboard(record.exception)" type="link" icon="copy" style="vertical-align: revert;"></a-button> | 122 | <a-button @click="copyToClipboard(record.exception)" type="link" icon="copy" style="vertical-align: revert;"></a-button> |
123 | - <span style="vertical-align: text-bottom;word-break:break-all;white-space:pre-wrap;overflow:hidden;color:red">异常堆栈信息:{{ record.exception }}</span> | 123 | + <span style="vertical-align: text-bottom; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:red">异常堆栈信息:{{ record.exception }}</span> |
124 | </div> | 124 | </div> |
125 | </div> | 125 | </div> |
126 | </template> | 126 | </template> |
ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
@@ -117,8 +117,8 @@ | @@ -117,8 +117,8 @@ | ||
117 | </a-button> | 117 | </a-button> |
118 | </template> | 118 | </template> |
119 | <span slot="action" slot-scope="text, record"> | 119 | <span slot="action" slot-scope="text, record"> |
120 | - <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button> <a-divider type="vertical"/></a> | ||
121 | - <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button> <a-divider type="vertical"/></a> | 120 | + <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a> |
121 | + <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a> | ||
122 | <!-- <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a>--> | 122 | <!-- <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a>--> |
123 | <!-- <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a>--> | 123 | <!-- <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a>--> |
124 | <a-popconfirm v-if="record.status == 0" v-has="'receiptContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> | 124 | <a-popconfirm v-if="record.status == 0" v-has="'receiptContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue
@@ -126,11 +126,11 @@ | @@ -126,11 +126,11 @@ | ||
126 | </template> | 126 | </template> |
127 | 127 | ||
128 | <span slot="action" slot-scope="text, record"> | 128 | <span slot="action" slot-scope="text, record"> |
129 | - <a v-if="record.status == 0" @click="selectPort(record)"><a-button type="primary">生成任务</a-button> </a> | 129 | + <a v-if="record.status == 0" @click="selectPort(record)"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a> |
130 | <a-popconfirm v-if="record.status == 0" v-has="'shipmentContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> | 130 | <a-popconfirm v-if="record.status == 0" v-has="'shipmentContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> |
131 | - <a><a-divider type="vertical"/><a-button type="danger">取消配盘</a-button> </a> | 131 | + <a><a-button type="danger">取消配盘</a-button><a-divider type="vertical"/></a> |
132 | </a-popconfirm> | 132 | </a-popconfirm> |
133 | - <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)"><a-divider type="vertical"/><a-button type="default">编辑</a-button></a> | 133 | + <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)"><a-button type="default">编辑</a-button></a> |
134 | </span> | 134 | </span> |
135 | </a-table> | 135 | </a-table> |
136 | </div> | 136 | </div> |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailList.vue
@@ -78,7 +78,6 @@ | @@ -78,7 +78,6 @@ | ||
78 | <span slot="action" slot-scope="text, record"> | 78 | <span slot="action" slot-scope="text, record"> |
79 | <a @click="combine(record)"><a-button type="primary">配盘</a-button></a> | 79 | <a @click="combine(record)"><a-button type="primary">配盘</a-button></a> |
80 | <a-divider type="vertical"/> | 80 | <a-divider type="vertical"/> |
81 | - | ||
82 | <a-dropdown> | 81 | <a-dropdown> |
83 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> | 82 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
84 | <a-menu slot="overlay"> | 83 | <a-menu slot="overlay"> |
ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
@@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
46 | </a-form-item> | 46 | </a-form-item> |
47 | </a-col> | 47 | </a-col> |
48 | <template v-if="toggleSearchStatus"> | 48 | <template v-if="toggleSearchStatus"> |
49 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 49 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
50 | <a-form-item label="起始出入口"> | 50 | <a-form-item label="起始出入口"> |
51 | <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> | 51 | <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> |
52 | </a-form-item> | 52 | </a-form-item> |
ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue
@@ -78,8 +78,7 @@ | @@ -78,8 +78,7 @@ | ||
78 | <adjustment-doc-modal ref="adjustmentModal" @ok="modalFormOk" :id="record.id" :taskHeaderId="record.taskHeaderId"/> | 78 | <adjustment-doc-modal ref="adjustmentModal" @ok="modalFormOk" :id="record.id" :taskHeaderId="record.taskHeaderId"/> |
79 | <a v-if="record.taskType==700" @click="createMany(record)">实盘登记</a> | 79 | <a v-if="record.taskType==700" @click="createMany(record)">实盘登记</a> |
80 | <a-divider type="vertical" v-if="record.taskType==700" /> | 80 | <a-divider type="vertical" v-if="record.taskType==700" /> |
81 | - <a v-has="'taskDetail:edit'" @click="handleEdit(record)">编辑</a> | ||
82 | - <a-divider type="vertical"/> | 81 | + <a v-has="'taskDetail:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical" /></a> |
83 | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | 82 | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
84 | <a v-has="'taskDetail:delete'">删除</a> | 83 | <a v-has="'taskDetail:delete'">删除</a> |
85 | </a-popconfirm> | 84 | </a-popconfirm> |
huaheng-wms-core/src/main/java/org/jeecg/modules/cas/controller/CasClientController.java
@@ -5,15 +5,9 @@ import java.util.List; | @@ -5,15 +5,9 @@ import java.util.List; | ||
5 | import javax.servlet.http.HttpServletRequest; | 5 | import javax.servlet.http.HttpServletRequest; |
6 | import javax.servlet.http.HttpServletResponse; | 6 | import javax.servlet.http.HttpServletResponse; |
7 | 7 | ||
8 | -import cn.hutool.crypto.SecureUtil; | ||
9 | -import cn.monitor4all.logRecord.annotation.OperationLog; | ||
10 | - | ||
11 | import org.apache.commons.lang.StringUtils; | 8 | import org.apache.commons.lang.StringUtils; |
12 | import org.jeecg.common.api.vo.Result; | 9 | import org.jeecg.common.api.vo.Result; |
13 | -import org.jeecg.common.constant.CacheConstant; | ||
14 | import org.jeecg.common.constant.CommonConstant; | 10 | import org.jeecg.common.constant.CommonConstant; |
15 | -import org.jeecg.utils.HuahengJwtUtil; | ||
16 | -import org.jeecg.common.system.vo.LoginUser; | ||
17 | import org.jeecg.common.util.RedisUtil; | 11 | import org.jeecg.common.util.RedisUtil; |
18 | import org.jeecg.modules.cas.util.CASServiceUtil; | 12 | import org.jeecg.modules.cas.util.CASServiceUtil; |
19 | import org.jeecg.modules.cas.util.XmlUtils; | 13 | import org.jeecg.modules.cas.util.XmlUtils; |
@@ -21,7 +15,7 @@ import org.jeecg.modules.system.entity.SysDepart; | @@ -21,7 +15,7 @@ import org.jeecg.modules.system.entity.SysDepart; | ||
21 | import org.jeecg.modules.system.entity.SysUser; | 15 | import org.jeecg.modules.system.entity.SysUser; |
22 | import org.jeecg.modules.system.service.ISysDepartService; | 16 | import org.jeecg.modules.system.service.ISysDepartService; |
23 | import org.jeecg.modules.system.service.ISysUserService; | 17 | import org.jeecg.modules.system.service.ISysUserService; |
24 | -import org.springframework.beans.BeanUtils; | 18 | +import org.jeecg.utils.HuahengJwtUtil; |
25 | import org.springframework.beans.factory.annotation.Autowired; | 19 | import org.springframework.beans.factory.annotation.Autowired; |
26 | import org.springframework.beans.factory.annotation.Value; | 20 | import org.springframework.beans.factory.annotation.Value; |
27 | import org.springframework.http.HttpEntity; | 21 | import org.springframework.http.HttpEntity; |
@@ -45,11 +39,21 @@ import lombok.extern.slf4j.Slf4j; | @@ -45,11 +39,21 @@ import lombok.extern.slf4j.Slf4j; | ||
45 | @RestController | 39 | @RestController |
46 | @RequestMapping("/sys/cas/client") | 40 | @RequestMapping("/sys/cas/client") |
47 | public class CasClientController { | 41 | public class CasClientController { |
42 | + | ||
43 | + /** Token失效时间 */ | ||
44 | + private Long TOKEN_EXPIRE_TIME; | ||
45 | + | ||
46 | + @Value("${system.token.expireTime}") | ||
47 | + public void setExpireTime(String expireTime) { | ||
48 | + TOKEN_EXPIRE_TIME = Long.parseLong(expireTime); | ||
49 | + } | ||
48 | 50 | ||
49 | @Autowired | 51 | @Autowired |
50 | private ISysUserService sysUserService; | 52 | private ISysUserService sysUserService; |
53 | + | ||
51 | @Autowired | 54 | @Autowired |
52 | private ISysDepartService sysDepartService; | 55 | private ISysDepartService sysDepartService; |
56 | + | ||
53 | @Autowired | 57 | @Autowired |
54 | private RedisUtil redisUtil; | 58 | private RedisUtil redisUtil; |
55 | 59 | ||
@@ -83,7 +87,7 @@ public class CasClientController { | @@ -83,7 +87,7 @@ public class CasClientController { | ||
83 | String token = HuahengJwtUtil.sign(sysUser.getUsername(), sysUser.getPassword()); | 87 | String token = HuahengJwtUtil.sign(sysUser.getUsername(), sysUser.getPassword()); |
84 | // 设置超时时间 | 88 | // 设置超时时间 |
85 | redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token); | 89 | redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token); |
86 | - redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, HuahengJwtUtil.EXPIRE_TIME / 1000); | 90 | + redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, TOKEN_EXPIRE_TIME / 1000); |
87 | 91 | ||
88 | // 获取用户部门信息 | 92 | // 获取用户部门信息 |
89 | JSONObject obj = new JSONObject(); | 93 | JSONObject obj = new JSONObject(); |
huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/LoginController.java
@@ -50,6 +50,7 @@ import org.jeecg.utils.config.ApplicationConfig; | @@ -50,6 +50,7 @@ import org.jeecg.utils.config.ApplicationConfig; | ||
50 | import org.jeecg.utils.support.SystemRSA256Key; | 50 | import org.jeecg.utils.support.SystemRSA256Key; |
51 | import org.springframework.beans.BeanUtils; | 51 | import org.springframework.beans.BeanUtils; |
52 | import org.springframework.beans.factory.annotation.Autowired; | 52 | import org.springframework.beans.factory.annotation.Autowired; |
53 | +import org.springframework.beans.factory.annotation.Value; | ||
53 | import org.springframework.context.annotation.Bean; | 54 | import org.springframework.context.annotation.Bean; |
54 | import org.springframework.core.io.DefaultResourceLoader; | 55 | import org.springframework.core.io.DefaultResourceLoader; |
55 | import org.springframework.core.io.ResourceLoader; | 56 | import org.springframework.core.io.ResourceLoader; |
@@ -89,6 +90,15 @@ import lombok.extern.slf4j.Slf4j; | @@ -89,6 +90,15 @@ import lombok.extern.slf4j.Slf4j; | ||
89 | @Api(tags = "用户登录") | 90 | @Api(tags = "用户登录") |
90 | @Slf4j | 91 | @Slf4j |
91 | public class LoginController { | 92 | public class LoginController { |
93 | + | ||
94 | + /** Token失效时间 */ | ||
95 | + private Long TOKEN_EXPIRE_TIME; | ||
96 | + | ||
97 | + @Value("${system.token.expireTime}") | ||
98 | + public void setExpireTime(String expireTime) { | ||
99 | + TOKEN_EXPIRE_TIME = Long.parseLong(expireTime); | ||
100 | + } | ||
101 | + | ||
92 | @Autowired | 102 | @Autowired |
93 | private ISysUserService sysUserService; | 103 | private ISysUserService sysUserService; |
94 | 104 | ||
@@ -115,7 +125,7 @@ public class LoginController { | @@ -115,7 +125,7 @@ public class LoginController { | ||
115 | 125 | ||
116 | @Autowired | 126 | @Autowired |
117 | private HuahengRedisUtil huahengRedisUtil; | 127 | private HuahengRedisUtil huahengRedisUtil; |
118 | - | 128 | + |
119 | @Autowired | 129 | @Autowired |
120 | private ApplicationConfig applicationConfig; | 130 | private ApplicationConfig applicationConfig; |
121 | 131 | ||
@@ -226,7 +236,7 @@ public class LoginController { | @@ -226,7 +236,7 @@ public class LoginController { | ||
226 | private Result<JSONObject> checkSystemActivationCode() throws IOException { | 236 | private Result<JSONObject> checkSystemActivationCode() throws IOException { |
227 | Result<JSONObject> result = new Result<JSONObject>(); | 237 | Result<JSONObject> result = new Result<JSONObject>(); |
228 | // 是否需要校验激活码 | 238 | // 是否需要校验激活码 |
229 | - if(applicationConfig.getCheckSystemActivationCode() != null && !applicationConfig.getCheckSystemActivationCode()) { | 239 | + if (applicationConfig.getCheckSystemActivationCode() != null && !applicationConfig.getCheckSystemActivationCode()) { |
230 | return result; | 240 | return result; |
231 | } | 241 | } |
232 | FileInputStream inputStream = null; | 242 | FileInputStream inputStream = null; |
@@ -312,7 +322,7 @@ public class LoginController { | @@ -312,7 +322,7 @@ public class LoginController { | ||
312 | } | 322 | } |
313 | return result; | 323 | return result; |
314 | } | 324 | } |
315 | - | 325 | + |
316 | /** | 326 | /** |
317 | * 退出登录 | 327 | * 退出登录 |
318 | * @param request | 328 | * @param request |
@@ -615,7 +625,7 @@ public class LoginController { | @@ -615,7 +625,7 @@ public class LoginController { | ||
615 | String token = HuahengJwtUtil.sign(username, syspassword, warehouseCode, roles); | 625 | String token = HuahengJwtUtil.sign(username, syspassword, warehouseCode, roles); |
616 | // 设置token缓存有效时间 | 626 | // 设置token缓存有效时间 |
617 | redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token); | 627 | redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token); |
618 | - redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, HuahengJwtUtil.EXPIRE_TIME / 1000); | 628 | + redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, TOKEN_EXPIRE_TIME / 1000); |
619 | obj.put("token", token); | 629 | obj.put("token", token); |
620 | obj.put("userInfo", sysUser); | 630 | obj.put("userInfo", sysUser); |
621 | obj.put("sysAllDictItems", sysDictService.queryAllDictItems()); | 631 | obj.put("sysAllDictItems", sysDictService.queryAllDictItems()); |
@@ -721,7 +731,7 @@ public class LoginController { | @@ -721,7 +731,7 @@ public class LoginController { | ||
721 | String token = JwtUtil.sign(username, syspassword); | 731 | String token = JwtUtil.sign(username, syspassword); |
722 | // 设置超时时间 | 732 | // 设置超时时间 |
723 | redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token); | 733 | redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token); |
724 | - redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, HuahengJwtUtil.EXPIRE_TIME / 1000); | 734 | + redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, TOKEN_EXPIRE_TIME / 1000); |
725 | 735 | ||
726 | // token 信息 | 736 | // token 信息 |
727 | obj.put("token", token); | 737 | obj.put("token", token); |
huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/ThirdLoginController.java
1 | package org.jeecg.modules.system.controller; | 1 | package org.jeecg.modules.system.controller; |
2 | 2 | ||
3 | -import com.alibaba.fastjson.JSONObject; | ||
4 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
5 | -import com.xkcoding.justauth.AuthRequestFactory; | ||
6 | -import io.swagger.annotations.ApiOperation; | ||
7 | -import lombok.extern.slf4j.Slf4j; | ||
8 | -import me.zhyd.oauth.model.AuthCallback; | ||
9 | -import me.zhyd.oauth.model.AuthResponse; | ||
10 | -import me.zhyd.oauth.request.AuthRequest; | ||
11 | -import me.zhyd.oauth.utils.AuthStateUtils; | 3 | +import java.io.IOException; |
4 | +import java.io.UnsupportedEncodingException; | ||
5 | +import java.net.URLEncoder; | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +import javax.servlet.http.HttpServletResponse; | ||
9 | + | ||
12 | import org.jeecg.common.api.vo.Result; | 10 | import org.jeecg.common.api.vo.Result; |
13 | import org.jeecg.common.constant.CommonConstant; | 11 | import org.jeecg.common.constant.CommonConstant; |
14 | -import org.jeecg.utils.HuahengJwtUtil; | ||
15 | import org.jeecg.common.util.PasswordUtil; | 12 | import org.jeecg.common.util.PasswordUtil; |
16 | import org.jeecg.common.util.RedisUtil; | 13 | import org.jeecg.common.util.RedisUtil; |
17 | import org.jeecg.common.util.RestUtil; | 14 | import org.jeecg.common.util.RestUtil; |
@@ -26,16 +23,30 @@ import org.jeecg.modules.system.service.ISysThirdAccountService; | @@ -26,16 +23,30 @@ import org.jeecg.modules.system.service.ISysThirdAccountService; | ||
26 | import org.jeecg.modules.system.service.ISysUserService; | 23 | import org.jeecg.modules.system.service.ISysUserService; |
27 | import org.jeecg.modules.system.service.impl.ThirdAppDingtalkServiceImpl; | 24 | import org.jeecg.modules.system.service.impl.ThirdAppDingtalkServiceImpl; |
28 | import org.jeecg.modules.system.service.impl.ThirdAppWechatEnterpriseServiceImpl; | 25 | import org.jeecg.modules.system.service.impl.ThirdAppWechatEnterpriseServiceImpl; |
26 | +import org.jeecg.utils.HuahengJwtUtil; | ||
29 | import org.springframework.beans.factory.annotation.Autowired; | 27 | import org.springframework.beans.factory.annotation.Autowired; |
28 | +import org.springframework.beans.factory.annotation.Value; | ||
30 | import org.springframework.stereotype.Controller; | 29 | import org.springframework.stereotype.Controller; |
31 | import org.springframework.ui.ModelMap; | 30 | import org.springframework.ui.ModelMap; |
32 | -import org.springframework.web.bind.annotation.*; | 31 | +import org.springframework.web.bind.annotation.GetMapping; |
32 | +import org.springframework.web.bind.annotation.PathVariable; | ||
33 | +import org.springframework.web.bind.annotation.PostMapping; | ||
34 | +import org.springframework.web.bind.annotation.RequestBody; | ||
35 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
36 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
37 | +import org.springframework.web.bind.annotation.RequestParam; | ||
38 | +import org.springframework.web.bind.annotation.ResponseBody; | ||
33 | 39 | ||
34 | -import javax.servlet.http.HttpServletResponse; | ||
35 | -import java.io.IOException; | ||
36 | -import java.io.UnsupportedEncodingException; | ||
37 | -import java.net.URLEncoder; | ||
38 | -import java.util.List; | 40 | +import com.alibaba.fastjson.JSONObject; |
41 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
42 | +import com.xkcoding.justauth.AuthRequestFactory; | ||
43 | + | ||
44 | +import io.swagger.annotations.ApiOperation; | ||
45 | +import lombok.extern.slf4j.Slf4j; | ||
46 | +import me.zhyd.oauth.model.AuthCallback; | ||
47 | +import me.zhyd.oauth.model.AuthResponse; | ||
48 | +import me.zhyd.oauth.request.AuthRequest; | ||
49 | +import me.zhyd.oauth.utils.AuthStateUtils; | ||
39 | 50 | ||
40 | /** | 51 | /** |
41 | * @Author scott | 52 | * @Author scott |
@@ -45,22 +56,36 @@ import java.util.List; | @@ -45,22 +56,36 @@ import java.util.List; | ||
45 | @RequestMapping("/sys/thirdLogin") | 56 | @RequestMapping("/sys/thirdLogin") |
46 | @Slf4j | 57 | @Slf4j |
47 | public class ThirdLoginController { | 58 | public class ThirdLoginController { |
59 | + | ||
60 | + /** Token失效时间 */ | ||
61 | + private Long TOKEN_EXPIRE_TIME; | ||
62 | + | ||
63 | + @Value("${system.token.expireTime}") | ||
64 | + public void setExpireTime(String expireTime) { | ||
65 | + TOKEN_EXPIRE_TIME = Long.parseLong(expireTime); | ||
66 | + } | ||
67 | + | ||
48 | @Autowired | 68 | @Autowired |
49 | private ISysUserService sysUserService; | 69 | private ISysUserService sysUserService; |
70 | + | ||
50 | @Autowired | 71 | @Autowired |
51 | private ISysThirdAccountService sysThirdAccountService; | 72 | private ISysThirdAccountService sysThirdAccountService; |
52 | 73 | ||
53 | @Autowired | 74 | @Autowired |
54 | private BaseCommonService baseCommonService; | 75 | private BaseCommonService baseCommonService; |
76 | + | ||
55 | @Autowired | 77 | @Autowired |
56 | private RedisUtil redisUtil; | 78 | private RedisUtil redisUtil; |
79 | + | ||
57 | @Autowired | 80 | @Autowired |
58 | private AuthRequestFactory factory; | 81 | private AuthRequestFactory factory; |
59 | 82 | ||
60 | @Autowired | 83 | @Autowired |
61 | ThirdAppConfig thirdAppConfig; | 84 | ThirdAppConfig thirdAppConfig; |
85 | + | ||
62 | @Autowired | 86 | @Autowired |
63 | private ThirdAppWechatEnterpriseServiceImpl thirdAppWechatEnterpriseService; | 87 | private ThirdAppWechatEnterpriseServiceImpl thirdAppWechatEnterpriseService; |
88 | + | ||
64 | @Autowired | 89 | @Autowired |
65 | private ThirdAppDingtalkServiceImpl thirdAppDingtalkService; | 90 | private ThirdAppDingtalkServiceImpl thirdAppDingtalkService; |
66 | 91 | ||
@@ -198,7 +223,7 @@ public class ThirdLoginController { | @@ -198,7 +223,7 @@ public class ThirdLoginController { | ||
198 | String token = HuahengJwtUtil.sign(user.getUsername(), user.getPassword()); | 223 | String token = HuahengJwtUtil.sign(user.getUsername(), user.getPassword()); |
199 | redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token); | 224 | redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token); |
200 | // 设置超时时间 | 225 | // 设置超时时间 |
201 | - redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, HuahengJwtUtil.EXPIRE_TIME / 1000); | 226 | + redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, TOKEN_EXPIRE_TIME / 1000); |
202 | return token; | 227 | return token; |
203 | } | 228 | } |
204 | 229 |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mes/servuce/impl/MesServiceImpl.java
@@ -150,7 +150,11 @@ public class MesServiceImpl implements IMesService { | @@ -150,7 +150,11 @@ public class MesServiceImpl implements IMesService { | ||
150 | if (!success) { | 150 | if (!success) { |
151 | throw new JeecgBootException("MES下发入库信息,更新入库组盘头失败"); | 151 | throw new JeecgBootException("MES下发入库信息,更新入库组盘头失败"); |
152 | } | 152 | } |
153 | - return huahengMultiHandlerService.createReceiptTask(receiptContainerHeader, warehouseCode); | 153 | + result = receiptContainerHeaderService.createReceiptTask(receiptContainerHeader, warehouseCode); |
154 | + if (!result.isSuccess()) { | ||
155 | + throw new JeecgBootException(result.getMessage()); | ||
156 | + } | ||
157 | + return result; | ||
154 | } | 158 | } |
155 | 159 | ||
156 | @Override | 160 | @Override |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wms/service/WmsServiceImpl.java
@@ -162,7 +162,11 @@ public class WmsServiceImpl implements WmsService { | @@ -162,7 +162,11 @@ public class WmsServiceImpl implements WmsService { | ||
162 | if (!success) { | 162 | if (!success) { |
163 | throw new JeecgBootException("WMS下发入库信息,更新入库组盘头失败"); | 163 | throw new JeecgBootException("WMS下发入库信息,更新入库组盘头失败"); |
164 | } | 164 | } |
165 | - return huahengMultiHandlerService.createReceiptTask(receiptContainerHeader, warehouseCode); | 165 | + result = receiptContainerHeaderService.createReceiptTask(receiptContainerHeader, warehouseCode); |
166 | + if (!result.isSuccess()) { | ||
167 | + throw new JeecgBootException(result.getMessage()); | ||
168 | + } | ||
169 | + return result; | ||
166 | } | 170 | } |
167 | 171 | ||
168 | @Override | 172 | @Override |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/service/IHuahengMultiHandlerService.java
@@ -18,7 +18,7 @@ public interface IHuahengMultiHandlerService { | @@ -18,7 +18,7 @@ public interface IHuahengMultiHandlerService { | ||
18 | 18 | ||
19 | Result sendTaskToWcs(TaskHeader taskHeader); | 19 | Result sendTaskToWcs(TaskHeader taskHeader); |
20 | 20 | ||
21 | - Result<TaskHeader> createReceiptTask(ReceiptContainerHeader receiptContainerHeader, String warehouseCode); | 21 | + Result createReceiptTask(ReceiptContainerHeader receiptContainerHeader, String warehouseCode); |
22 | 22 | ||
23 | Result combination(CombinationModel combinationModel); | 23 | Result combination(CombinationModel combinationModel); |
24 | 24 |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/service/impl/HuahengMultiHandlerServiceImpl.java
@@ -71,13 +71,11 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem | @@ -71,13 +71,11 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem | ||
71 | 71 | ||
72 | @Override | 72 | @Override |
73 | @Transactional(rollbackFor = Exception.class) | 73 | @Transactional(rollbackFor = Exception.class) |
74 | - public Result<TaskHeader> createReceiptTask(ReceiptContainerHeader receiptContainerHeader, String warehouseCode) { | ||
75 | - String lockKey = warehouseCode; | ||
76 | - Result result = handleMultiProcess("createReceiptTask", lockKey, new MultiProcessListener() { | 74 | + public Result createReceiptTask(ReceiptContainerHeader receiptContainerHeader, String warehouseCode) { |
75 | + Result result = handleMultiProcess("createReceiptTask", warehouseCode, new MultiProcessListener() { | ||
77 | @Override | 76 | @Override |
78 | public Result<?> doProcess() { | 77 | public Result<?> doProcess() { |
79 | - Result result = receiptContainerHeaderService.createReceiptTask(receiptContainerHeader, warehouseCode); | ||
80 | - return result; | 78 | + return receiptContainerHeaderService.createReceiptTask(receiptContainerHeader, warehouseCode); |
81 | } | 79 | } |
82 | }); | 80 | }); |
83 | return result; | 81 | return result; |
@@ -89,8 +87,7 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem | @@ -89,8 +87,7 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem | ||
89 | Result result = handleMultiProcess("combination", new MultiProcessListener() { | 87 | Result result = handleMultiProcess("combination", new MultiProcessListener() { |
90 | @Override | 88 | @Override |
91 | public Result<?> doProcess() { | 89 | public Result<?> doProcess() { |
92 | - Result result = shipmentCombinationService.combination(combinationModel); | ||
93 | - return result; | 90 | + return shipmentCombinationService.combination(combinationModel); |
94 | } | 91 | } |
95 | }); | 92 | }); |
96 | return result; | 93 | return result; |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
@@ -57,26 +57,37 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | @@ -57,26 +57,37 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | ||
57 | 57 | ||
58 | @Autowired | 58 | @Autowired |
59 | private ReceiptContainerHeaderMapper receiptContainerHeaderMapper; | 59 | private ReceiptContainerHeaderMapper receiptContainerHeaderMapper; |
60 | + | ||
60 | @Autowired | 61 | @Autowired |
61 | private ReceiptContainerDetailMapper receiptContainerDetailMapper; | 62 | private ReceiptContainerDetailMapper receiptContainerDetailMapper; |
63 | + | ||
62 | @Resource | 64 | @Resource |
63 | private IContainerService containerService; | 65 | private IContainerService containerService; |
66 | + | ||
64 | @Resource | 67 | @Resource |
65 | private IReceiptContainerDetailService receiptContainerDetailService; | 68 | private IReceiptContainerDetailService receiptContainerDetailService; |
69 | + | ||
66 | @Resource | 70 | @Resource |
67 | private ILocationService locationService; | 71 | private ILocationService locationService; |
72 | + | ||
68 | @Resource | 73 | @Resource |
69 | private IReceiptContainerHeaderService receiptContainerHeaderService; | 74 | private IReceiptContainerHeaderService receiptContainerHeaderService; |
75 | + | ||
70 | @Resource | 76 | @Resource |
71 | private ITaskHeaderService taskHeaderService; | 77 | private ITaskHeaderService taskHeaderService; |
78 | + | ||
72 | @Resource | 79 | @Resource |
73 | private ITaskDetailService taskDetailService; | 80 | private ITaskDetailService taskDetailService; |
81 | + | ||
74 | @Resource | 82 | @Resource |
75 | private IReceiptDetailService receiptDetailService; | 83 | private IReceiptDetailService receiptDetailService; |
84 | + | ||
76 | @Resource | 85 | @Resource |
77 | private IReceiptHeaderService receiptHeaderService; | 86 | private IReceiptHeaderService receiptHeaderService; |
87 | + | ||
78 | @Resource | 88 | @Resource |
79 | private IInventoryHeaderService inventoryHeaderService; | 89 | private IInventoryHeaderService inventoryHeaderService; |
90 | + | ||
80 | @Resource | 91 | @Resource |
81 | private IParameterConfigurationService parameterConfigurationService; | 92 | private IParameterConfigurationService parameterConfigurationService; |
82 | 93 | ||
@@ -106,7 +117,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | @@ -106,7 +117,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | ||
106 | } | 117 | } |
107 | 118 | ||
108 | @Override | 119 | @Override |
109 | - @Transactional(rollbackFor = JeecgBootException.class, propagation = Propagation.REQUIRES_NEW) | 120 | + @Transactional |
110 | @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务生成'", extra = "#extraJsonString1", msg = "'任务ID:' + #taskHeader.getId()", | 121 | @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务生成'", extra = "#extraJsonString1", msg = "'任务ID:' + #taskHeader.getId()", |
111 | condition = "#receiptContainerDetailList.size() > 0", recordReturnValue = true) | 122 | condition = "#receiptContainerDetailList.size() > 0", recordReturnValue = true) |
112 | @OperationLog(bizId = "''", bizType = "'任务追踪'", tag = "'入库任务生成'", extra = "#extraJsonString2", | 123 | @OperationLog(bizId = "''", bizType = "'任务追踪'", tag = "'入库任务生成'", extra = "#extraJsonString2", |
@@ -115,7 +126,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | @@ -115,7 +126,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | ||
115 | public Result<TaskHeader> createReceiptTask(ReceiptContainerHeader receiptContainerHeader, String warehouseCode) { | 126 | public Result<TaskHeader> createReceiptTask(ReceiptContainerHeader receiptContainerHeader, String warehouseCode) { |
116 | log.info("开始创建入库任务"); | 127 | log.info("开始创建入库任务"); |
117 | if (!receiptContainerHeader.getWarehouseCode().equals(warehouseCode)) { | 128 | if (!receiptContainerHeader.getWarehouseCode().equals(warehouseCode)) { |
118 | - return Result.error("创建入库任务, id:" + receiptContainerHeader.getId() + "的入库组盘不能在" + warehouseCode + "仓库操作"); | 129 | + throw new JeecgBootException("创建入库任务, id:" + receiptContainerHeader.getId() + "的入库组盘不能在" + warehouseCode + "仓库操作"); |
119 | } | 130 | } |
120 | String containerCode = receiptContainerHeader.getContainerCode(); | 131 | String containerCode = receiptContainerHeader.getContainerCode(); |
121 | String fromLocationCode = receiptContainerHeader.getFromLocationCode(); | 132 | String fromLocationCode = receiptContainerHeader.getFromLocationCode(); |
@@ -125,11 +136,11 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | @@ -125,11 +136,11 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | ||
125 | List<ReceiptContainerDetail> receiptContainerDetailList = | 136 | List<ReceiptContainerDetail> receiptContainerDetailList = |
126 | receiptContainerDetailService.getReceiptContainerDetailListByHeaderId(receiptContainerHeader.getId()); | 137 | receiptContainerDetailService.getReceiptContainerDetailListByHeaderId(receiptContainerHeader.getId()); |
127 | if (receiptContainerDetailList.size() == 0) { | 138 | if (receiptContainerDetailList.size() == 0) { |
128 | - return Result.error("创建入库任务, id:" + receiptContainerHeader.getId() + "的入库组盘,没有组盘明细,请先组盘!"); | 139 | + throw new JeecgBootException("创建入库任务, id:" + receiptContainerHeader.getId() + "的入库组盘,没有组盘明细,请先组盘!"); |
129 | } | 140 | } |
130 | int receiptContainerStatus = receiptContainerHeader.getStatus(); | 141 | int receiptContainerStatus = receiptContainerHeader.getStatus(); |
131 | if (receiptContainerStatus != QuantityConstant.RECEIPT_CONTAINER_BUILD) { | 142 | if (receiptContainerStatus != QuantityConstant.RECEIPT_CONTAINER_BUILD) { |
132 | - return Result.error("创建入库任务, 入库组盘状态不是创建状态"); | 143 | + throw new JeecgBootException("创建入库任务, 入库组盘状态不是创建状态"); |
133 | } | 144 | } |
134 | String containerFillStatus = QuantityConstant.STATUS_CONTAINER_FILL_SOME; | 145 | String containerFillStatus = QuantityConstant.STATUS_CONTAINER_FILL_SOME; |
135 | if (!StringUtils.isEmpty(receiptContainerHeader.getContainerFillStatus())) { | 146 | if (!StringUtils.isEmpty(receiptContainerHeader.getContainerFillStatus())) { |
@@ -411,30 +422,36 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | @@ -411,30 +422,36 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | ||
411 | } | 422 | } |
412 | 423 | ||
413 | @Override | 424 | @Override |
425 | + @Transactional | ||
414 | public Result cancelReceiving(List<Integer> ids) { | 426 | public Result cancelReceiving(List<Integer> ids) { |
415 | Result result = null; | 427 | Result result = null; |
416 | for (Integer id : ids) { | 428 | for (Integer id : ids) { |
417 | - result = cancelReceiving(id); | 429 | + result = receiptContainerHeaderService.cancelReceiving(id); |
430 | + if (!result.isSuccess()) { | ||
431 | + throw new JeecgBootException(result.getMessage()); | ||
432 | + } | ||
418 | } | 433 | } |
419 | return result; | 434 | return result; |
420 | } | 435 | } |
421 | 436 | ||
422 | @Override | 437 | @Override |
438 | + @Transactional | ||
423 | public boolean updateToPortById(String toPort, int id) { | 439 | public boolean updateToPortById(String toPort, int id) { |
424 | ReceiptContainerHeader receiptContainerHeader = new ReceiptContainerHeader(); | 440 | ReceiptContainerHeader receiptContainerHeader = new ReceiptContainerHeader(); |
425 | receiptContainerHeader.setToPort(toPort); | 441 | receiptContainerHeader.setToPort(toPort); |
426 | receiptContainerHeader.setId(id); | 442 | receiptContainerHeader.setId(id); |
427 | - boolean success = updateById(receiptContainerHeader); | 443 | + boolean success = receiptContainerHeaderService.updateById(receiptContainerHeader); |
428 | return success; | 444 | return success; |
429 | } | 445 | } |
430 | 446 | ||
431 | @Override | 447 | @Override |
448 | + @Transactional | ||
432 | public boolean updateToPortAndStatus(String toPort, int status, int id) { | 449 | public boolean updateToPortAndStatus(String toPort, int status, int id) { |
433 | ReceiptContainerHeader receiptContainerHeader = new ReceiptContainerHeader(); | 450 | ReceiptContainerHeader receiptContainerHeader = new ReceiptContainerHeader(); |
434 | receiptContainerHeader.setToPort(toPort); | 451 | receiptContainerHeader.setToPort(toPort); |
435 | receiptContainerHeader.setStatus(status); | 452 | receiptContainerHeader.setStatus(status); |
436 | receiptContainerHeader.setId(id); | 453 | receiptContainerHeader.setId(id); |
437 | - boolean success = updateById(receiptContainerHeader); | 454 | + boolean success = receiptContainerHeaderService.updateById(receiptContainerHeader); |
438 | return success; | 455 | return success; |
439 | } | 456 | } |
440 | 457 |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java
@@ -181,15 +181,18 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R | @@ -181,15 +181,18 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R | ||
181 | } | 181 | } |
182 | } | 182 | } |
183 | } | 183 | } |
184 | - receiptHeader = new ReceiptHeader(); | ||
185 | - receiptHeader.setId(id); | ||
186 | - receiptHeader.setFirstStatus(maxStatus); | ||
187 | - receiptHeader.setLastStatus(minStatus); | ||
188 | - if (!receiptHeaderService.updateById(receiptHeader)) { | 184 | + ReceiptHeader updateReceiptHeader = new ReceiptHeader(); |
185 | + updateReceiptHeader.setId(id); | ||
186 | + updateReceiptHeader.setCode(receiptHeader.getCode()); | ||
187 | + updateReceiptHeader.setReferCode(receiptHeader.getReferCode()); | ||
188 | + updateReceiptHeader.setWarehouseCode(receiptHeader.getWarehouseCode()); | ||
189 | + updateReceiptHeader.setFirstStatus(maxStatus); | ||
190 | + updateReceiptHeader.setLastStatus(minStatus); | ||
191 | + if (!receiptHeaderService.updateById(updateReceiptHeader)) { | ||
189 | throw new JeecgBootException("更新入库单:" + id + " 状态失败"); | 192 | throw new JeecgBootException("更新入库单:" + id + " 状态失败"); |
190 | } | 193 | } |
191 | LogRecordContext.putVariable("minStatus", minStatus); | 194 | LogRecordContext.putVariable("minStatus", minStatus); |
192 | - LogRecordContext.putVariable("receiptHeader", receiptHeader); | 195 | + LogRecordContext.putVariable("receiptHeader", updateReceiptHeader); |
193 | return true; | 196 | return true; |
194 | } | 197 | } |
195 | 198 |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/controller/ReceiveController.java
@@ -100,7 +100,7 @@ public class ReceiveController extends HuahengBaseController { | @@ -100,7 +100,7 @@ public class ReceiveController extends HuahengBaseController { | ||
100 | @ApiOperation(value = "入库单-生成任务", notes = "入库单-生成任务") | 100 | @ApiOperation(value = "入库单-生成任务", notes = "入库单-生成任务") |
101 | @PostMapping("/receivingAndCreateTask") | 101 | @PostMapping("/receivingAndCreateTask") |
102 | @ResponseBody | 102 | @ResponseBody |
103 | - public Result<TaskHeader> receivingAndCreateTask(@RequestBody List<Receive> receiveList, HttpServletRequest req) { | 103 | + public Result receivingAndCreateTask(@RequestBody List<Receive> receiveList, HttpServletRequest req) { |
104 | String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); | 104 | String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); |
105 | String lockKey = warehouseCode; | 105 | String lockKey = warehouseCode; |
106 | Result result = handleMultiProcess("receivingAndCreateTask", lockKey, new MultiProcessListener() { | 106 | Result result = handleMultiProcess("receivingAndCreateTask", lockKey, new MultiProcessListener() { |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/IReceiveService.java
@@ -2,6 +2,7 @@ package org.jeecg.modules.wms.receipt.receiving.service; | @@ -2,6 +2,7 @@ package org.jeecg.modules.wms.receipt.receiving.service; | ||
2 | 2 | ||
3 | import com.baomidou.mybatisplus.extension.service.IService; | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
4 | import org.jeecg.common.api.vo.Result; | 4 | import org.jeecg.common.api.vo.Result; |
5 | +import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader; | ||
5 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | 6 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; |
6 | import org.jeecg.modules.wms.receipt.receiving.domain.Receive; | 7 | import org.jeecg.modules.wms.receipt.receiving.domain.Receive; |
7 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; | 8 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
@@ -14,7 +15,7 @@ import java.util.List; | @@ -14,7 +15,7 @@ import java.util.List; | ||
14 | */ | 15 | */ |
15 | public interface IReceiveService extends IService<Receive> { | 16 | public interface IReceiveService extends IService<Receive> { |
16 | 17 | ||
17 | - Result receiving(List<Receive> receiveList, String warehouseCode); | 18 | + Result<ReceiptContainerHeader> receiving(List<Receive> receiveList, String warehouseCode); |
18 | 19 | ||
19 | Result<TaskHeader> receivingAndCreateTask(List<Receive> receiveList, String warehouseCode); | 20 | Result<TaskHeader> receivingAndCreateTask(List<Receive> receiveList, String warehouseCode); |
20 | } | 21 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
@@ -222,7 +222,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -222,7 +222,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
222 | combinationModel.setShipQty(inventoryQty); | 222 | combinationModel.setShipQty(inventoryQty); |
223 | shipmentQty = shipmentQty.subtract(inventoryQty); | 223 | shipmentQty = shipmentQty.subtract(inventoryQty); |
224 | } | 224 | } |
225 | - Result result = huahengMultiHandlerService.combination(combinationModel); | 225 | + Result result = shipmentCombinationService.combination(combinationModel); |
226 | if (!result.isSuccess()) { | 226 | if (!result.isSuccess()) { |
227 | throw new JeecgBootException(result.getMessage()); | 227 | throw new JeecgBootException(result.getMessage()); |
228 | } | 228 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -867,7 +867,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -867,7 +867,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
867 | } | 867 | } |
868 | 868 | ||
869 | @Override | 869 | @Override |
870 | - @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW) | 870 | + @Transactional |
871 | public Result sendTaskToWcs(Integer taskId) { | 871 | public Result sendTaskToWcs(Integer taskId) { |
872 | TaskHeader taskHeader = taskHeaderService.getById(taskId); | 872 | TaskHeader taskHeader = taskHeaderService.getById(taskId); |
873 | if (taskHeader == null) { | 873 | if (taskHeader == null) { |
@@ -1670,7 +1670,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1670,7 +1670,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1670 | @Transactional(rollbackFor = Exception.class) | 1670 | @Transactional(rollbackFor = Exception.class) |
1671 | public Result completeTaskUnLockContainerAndLocation(String containerFillStatus, int taskType, String containerCode, String fromLocationCode, | 1671 | public Result completeTaskUnLockContainerAndLocation(String containerFillStatus, int taskType, String containerCode, String fromLocationCode, |
1672 | String toLocationCode, String warehouseCode) { | 1672 | String toLocationCode, String warehouseCode) { |
1673 | - Result result = null; | ||
1674 | boolean success = false; | 1673 | boolean success = false; |
1675 | if (StringUtils.isEmpty(containerCode)) { | 1674 | if (StringUtils.isEmpty(containerCode)) { |
1676 | return Result.error("任务类型" + taskType + "完成任务时, 容器编码为空"); | 1675 | return Result.error("任务类型" + taskType + "完成任务时, 容器编码为空"); |
huaheng-wms-core/src/main/java/org/jeecg/utils/HuahengJwtUtil.java
@@ -17,6 +17,7 @@ import org.jeecg.utils.support.ApiAuthentication; | @@ -17,6 +17,7 @@ import org.jeecg.utils.support.ApiAuthentication; | ||
17 | import org.jeecg.utils.support.RSA256Key; | 17 | import org.jeecg.utils.support.RSA256Key; |
18 | import org.jeecg.utils.support.SystemAuthentication; | 18 | import org.jeecg.utils.support.SystemAuthentication; |
19 | import org.jeecg.utils.support.SystemRSA256Key; | 19 | import org.jeecg.utils.support.SystemRSA256Key; |
20 | +import org.springframework.beans.factory.annotation.Value; | ||
20 | import org.springframework.stereotype.Component; | 21 | import org.springframework.stereotype.Component; |
21 | import org.springframework.util.CollectionUtils; | 22 | import org.springframework.util.CollectionUtils; |
22 | 23 | ||
@@ -35,8 +36,13 @@ import cn.hutool.core.util.StrUtil; | @@ -35,8 +36,13 @@ import cn.hutool.core.util.StrUtil; | ||
35 | @Component | 36 | @Component |
36 | public class HuahengJwtUtil { | 37 | public class HuahengJwtUtil { |
37 | 38 | ||
38 | - /** token失效时间 1天 */ | ||
39 | - public static final long EXPIRE_TIME = 12 * 60 * 60 * 1000; | 39 | + /** Token失效时间 */ |
40 | + private static Long TOKEN_EXPIRE_TIME; | ||
41 | + | ||
42 | + @Value("${system.token.expireTime}") | ||
43 | + public void setExpireTime(String expireTime) { | ||
44 | + TOKEN_EXPIRE_TIME = Long.parseLong(expireTime); | ||
45 | + } | ||
40 | 46 | ||
41 | /** 仓库视察员角色 */ | 47 | /** 仓库视察员角色 */ |
42 | public static final String USER_ROLE_INSPECTOR = "inspector"; | 48 | public static final String USER_ROLE_INSPECTOR = "inspector"; |
@@ -164,7 +170,7 @@ public class HuahengJwtUtil { | @@ -164,7 +170,7 @@ public class HuahengJwtUtil { | ||
164 | * @return 加密的token | 170 | * @return 加密的token |
165 | */ | 171 | */ |
166 | public static String sign(String username, String secret) { | 172 | public static String sign(String username, String secret) { |
167 | - Date date = new Date(System.currentTimeMillis() + EXPIRE_TIME); | 173 | + Date date = new Date(System.currentTimeMillis() + TOKEN_EXPIRE_TIME); |
168 | Algorithm algorithm = Algorithm.HMAC256(secret); | 174 | Algorithm algorithm = Algorithm.HMAC256(secret); |
169 | // 附带username信息 | 175 | // 附带username信息 |
170 | return JWT.create().withClaim("username", username).withExpiresAt(date).sign(algorithm); | 176 | return JWT.create().withClaim("username", username).withExpiresAt(date).sign(algorithm); |
@@ -179,7 +185,7 @@ public class HuahengJwtUtil { | @@ -179,7 +185,7 @@ public class HuahengJwtUtil { | ||
179 | * @return 加密的token | 185 | * @return 加密的token |
180 | */ | 186 | */ |
181 | public static String sign(String username, String secret, String warehouseCode, List<String> roles) { | 187 | public static String sign(String username, String secret, String warehouseCode, List<String> roles) { |
182 | - Date date = new Date(System.currentTimeMillis() + EXPIRE_TIME); | 188 | + Date date = new Date(System.currentTimeMillis() + TOKEN_EXPIRE_TIME); |
183 | Algorithm algorithm = Algorithm.HMAC256(secret); | 189 | Algorithm algorithm = Algorithm.HMAC256(secret); |
184 | // 附带username信息 | 190 | // 附带username信息 |
185 | return JWT.create().withClaim("username", username).withClaim("warehouseCode", warehouseCode).withClaim("roles", roles).withExpiresAt(date).sign(algorithm); | 191 | return JWT.create().withClaim("username", username).withClaim("warehouseCode", warehouseCode).withClaim("roles", roles).withExpiresAt(date).sign(algorithm); |
huaheng-wms-core/src/main/java/org/jeecg/utils/aspect/ApiAuthenticationAspect.java
@@ -25,6 +25,8 @@ import com.auth0.jwt.algorithms.Algorithm; | @@ -25,6 +25,8 @@ import com.auth0.jwt.algorithms.Algorithm; | ||
25 | import com.auth0.jwt.exceptions.JWTVerificationException; | 25 | import com.auth0.jwt.exceptions.JWTVerificationException; |
26 | import com.auth0.jwt.interfaces.DecodedJWT; | 26 | import com.auth0.jwt.interfaces.DecodedJWT; |
27 | 27 | ||
28 | +import cn.hutool.core.date.DatePattern; | ||
29 | +import cn.hutool.core.date.DateUtil; | ||
28 | import lombok.extern.slf4j.Slf4j; | 30 | import lombok.extern.slf4j.Slf4j; |
29 | 31 | ||
30 | /** | 32 | /** |
@@ -37,13 +39,13 @@ import lombok.extern.slf4j.Slf4j; | @@ -37,13 +39,13 @@ import lombok.extern.slf4j.Slf4j; | ||
37 | @Component | 39 | @Component |
38 | @EnableAsync | 40 | @EnableAsync |
39 | public class ApiAuthenticationAspect { | 41 | public class ApiAuthenticationAspect { |
40 | - | 42 | + |
41 | /** 全局认证TOKEN */ | 43 | /** 全局认证TOKEN */ |
42 | - private String token = "MTY3OTU1MTE0MCwib3BlcmF0b3IiOiJIVUFIRU5HLVdNUzQiLCJqdGkiOiI3ZGExMDQyYS1iMDBhLTQzZmMtOTliO"; | 44 | + private String token = "MTY3OTU1MTE0MCwib3BlcmF0b3IiOiJIVUFIRU5HLVdNUzQiLCJqdGkiOiI3ZGExMDQyYS1iMDBhLTQzZmMtOTliO"; |
43 | 45 | ||
44 | @Autowired | 46 | @Autowired |
45 | private RSA256Key rsa256Key; | 47 | private RSA256Key rsa256Key; |
46 | - | 48 | + |
47 | @Autowired | 49 | @Autowired |
48 | private ApplicationConfig applicationConfig; | 50 | private ApplicationConfig applicationConfig; |
49 | 51 | ||
@@ -79,21 +81,19 @@ public class ApiAuthenticationAspect { | @@ -79,21 +81,19 @@ public class ApiAuthenticationAspect { | ||
79 | } | 81 | } |
80 | try { | 82 | try { |
81 | if (token.equals("MTY3OTU1MTE0MCwib3BlcmF0b3IiOiJIVUFIRU5HLVdNUzQiLCJqdGkiOiI3ZGExMDQyYS1iMDBhLTQzZmMtOTliO")) { | 83 | if (token.equals("MTY3OTU1MTE0MCwib3BlcmF0b3IiOiJIVUFIRU5HLVdNUzQiLCJqdGkiOiI3ZGExMDQyYS1iMDBhLTQzZmMtOTliO")) { |
84 | + log.error("API Authentication token 非法使用"); | ||
82 | return; | 85 | return; |
83 | } | 86 | } |
84 | Algorithm algorithm = Algorithm.RSA256(rsa256Key.getPublicKey(), rsa256Key.getPrivateKey()); | 87 | Algorithm algorithm = Algorithm.RSA256(rsa256Key.getPublicKey(), rsa256Key.getPrivateKey()); |
85 | JWTVerifier verifier = JWT.require(algorithm).withIssuer(applicationConfig.getArtifactId()).build(); | 88 | JWTVerifier verifier = JWT.require(algorithm).withIssuer(applicationConfig.getArtifactId()).build(); |
86 | DecodedJWT jwt = verifier.verify(token); | 89 | DecodedJWT jwt = verifier.verify(token); |
87 | - new ApiAuthentication.ApiAuthenticationBuild() | ||
88 | - .operator(jwt.getClaim("operator").asString()) | ||
89 | - .audience(jwt.getAudience().get(0)) | ||
90 | - .issuer(jwt.getIssuer()) | ||
91 | - .issuedAt(jwt.getIssuedAt()) | ||
92 | - .expireDateTime(jwt.getExpiresAt()) | ||
93 | - .bulid(); | 90 | + new ApiAuthentication.ApiAuthenticationBuild().operator(jwt.getClaim("operator").asString()).audience(jwt.getAudience().get(0)).issuer(jwt.getIssuer()) |
91 | + .issuedAt(jwt.getIssuedAt()).expireDateTime(jwt.getExpiresAt()).bulid(); | ||
94 | if (jwt.getClaim("operator").asString().equals(jwt.getIssuer())) { | 92 | if (jwt.getClaim("operator").asString().equals(jwt.getIssuer())) { |
95 | throw new RuntimeException("Authentication token error"); | 93 | throw new RuntimeException("Authentication token error"); |
96 | } | 94 | } |
95 | + log.info("API Authentication token info: 使用方: {}, 提供方: {}, 失效时间: {}", jwt.getAudience().get(0), jwt.getClaim("operator").asString(), | ||
96 | + DateUtil.format(jwt.getExpiresAt(), DatePattern.NORM_DATETIME_PATTERN)); | ||
97 | } catch (JWTVerificationException e) { | 97 | } catch (JWTVerificationException e) { |
98 | log.error(e.getMessage()); | 98 | log.error(e.getMessage()); |
99 | throw e; | 99 | throw e; |
huaheng-wms-core/src/main/resources/application-dev.yml
huaheng-wms-core/src/main/resources/application-prod.yml
huaheng-wms-core/src/main/resources/application-test.yml