Commit 972d4dadd9700b0b997b60fcbd09b9dfa8e29761
Merge remote-tracking branch 'origin/develop' into develop
Showing
19 changed files
with
585 additions
and
69 deletions
ant-design-vue-jeecg/src/api/api.js
@@ -244,6 +244,10 @@ export const quickReceipt = (params) => postAction("/task/taskHeader/quickReceip | @@ -244,6 +244,10 @@ export const quickReceipt = (params) => postAction("/task/taskHeader/quickReceip | ||
244 | export const shipmentInventoryHeader = (params) => postAction('/inventory/inventoryHeader/shipmentInventoryHeader', params); | 244 | export const shipmentInventoryHeader = (params) => postAction('/inventory/inventoryHeader/shipmentInventoryHeader', params); |
245 | //快速出库,批量快速出库存详情 | 245 | //快速出库,批量快速出库存详情 |
246 | export const shipmentInventoryDetail = (params) => postAction('/inventory/inventoryHeader/shipmentInventoryDetail', params); | 246 | export const shipmentInventoryDetail = (params) => postAction('/inventory/inventoryHeader/shipmentInventoryDetail', params); |
247 | +//呼叫入库托盘 | ||
248 | +export const callReceiptBox = (params) => postAction('/receipt/receiptHeader/callbox', params); | ||
249 | +//呼叫出库托盘 | ||
250 | +export const callShipmentBox = (params) => postAction('/shipment/shipmentHeader/callbox', params); | ||
247 | // 中转HTTP请求 | 251 | // 中转HTTP请求 |
248 | export const transitRESTful = { | 252 | export const transitRESTful = { |
249 | get: (url, parameter) => getAction(getTransitURL(url), parameter), | 253 | get: (url, parameter) => getAction(getTransitURL(url), parameter), |
ant-design-vue-jeecg/src/components/jeecgbiz/JSelectMultiSomeContainer.vue
ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
@@ -74,6 +74,7 @@ | @@ -74,6 +74,7 @@ | ||
74 | </a-upload> | 74 | </a-upload> |
75 | <a-button v-has="'receiptContainerHeader:createTask'" @click="createBatchTask" type="primary" >批量生成任务</a-button> | 75 | <a-button v-has="'receiptContainerHeader:createTask'" @click="createBatchTask" type="primary" >批量生成任务</a-button> |
76 | <a-button v-has="'receiptContainerHeader:delete'" @click="cancelBatchTask" type="primary" >批量取消组盘</a-button> | 76 | <a-button v-has="'receiptContainerHeader:delete'" @click="cancelBatchTask" type="primary" >批量取消组盘</a-button> |
77 | + <a-button v-has="'receiptContainerHeader:suppleReceipt'" @click="suppleReceipt" type="primary" >补充入库</a-button> | ||
77 | </div> | 78 | </div> |
78 | 79 | ||
79 | <!-- table区域-begin --> | 80 | <!-- table区域-begin --> |
@@ -148,6 +149,7 @@ | @@ -148,6 +149,7 @@ | ||
148 | <receiptContainerSelect-modal ref="modalForm2" @ok="modalFormOk"></receiptContainerSelect-modal> | 149 | <receiptContainerSelect-modal ref="modalForm2" @ok="modalFormOk"></receiptContainerSelect-modal> |
149 | <receiptContainerFillSelect-modal ref="modalForm3" @ok="modalFormOk"></receiptContainerFillSelect-modal> | 150 | <receiptContainerFillSelect-modal ref="modalForm3" @ok="modalFormOk"></receiptContainerFillSelect-modal> |
150 | <receiptContainerStatusSelect-modal ref="modalForm4" @ok="modalFormOk"></receiptContainerStatusSelect-modal> | 151 | <receiptContainerStatusSelect-modal ref="modalForm4" @ok="modalFormOk"></receiptContainerStatusSelect-modal> |
152 | + | ||
151 | </a-card> | 153 | </a-card> |
152 | </template> | 154 | </template> |
153 | 155 | ||
@@ -159,6 +161,7 @@ import {deleteAction, getAction} from '@/api/manage' | @@ -159,6 +161,7 @@ import {deleteAction, getAction} from '@/api/manage' | ||
159 | import ReceiptContainerDetailList from './ReceiptContainerDetailList' | 161 | import ReceiptContainerDetailList from './ReceiptContainerDetailList' |
160 | import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil' | 162 | import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
161 | import '@/assets/less/TableExpand.less' | 163 | import '@/assets/less/TableExpand.less' |
164 | +import '@/assets/less/TableExpand.less' | ||
162 | import {createReceiptTask, createReceiptBatchTask} from '@/api/api' | 165 | import {createReceiptTask, createReceiptBatchTask} from '@/api/api' |
163 | import ReceiptContainerSelectModal from "./modules/ReceiptContainerSelectModal"; | 166 | import ReceiptContainerSelectModal from "./modules/ReceiptContainerSelectModal"; |
164 | import ReceiptContainerFillSelectModal from "./modules/ReceiptContainerFillSelectModal"; | 167 | import ReceiptContainerFillSelectModal from "./modules/ReceiptContainerFillSelectModal"; |
@@ -429,6 +432,10 @@ export default { | @@ -429,6 +432,10 @@ export default { | ||
429 | } | 432 | } |
430 | }); | 433 | }); |
431 | }, | 434 | }, |
435 | + suppleReceipt() { | ||
436 | + this.$refs.modalForm5.edit(); | ||
437 | + this.$refs.modalForm5.title = "补充入库"; | ||
438 | + }, | ||
432 | loadData(arg) { | 439 | loadData(arg) { |
433 | if (!this.url.list) { | 440 | if (!this.url.list) { |
434 | this.$message.error("请设置url.list属性!") | 441 | this.$message.error("请设置url.list属性!") |
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
@@ -85,7 +85,9 @@ | @@ -85,7 +85,9 @@ | ||
85 | <div class="table-operator"> | 85 | <div class="table-operator"> |
86 | <a-button @click="createEmptyIn()" v-has="'taskHeader:emptyIn'" type="primary">空托入库</a-button> | 86 | <a-button @click="createEmptyIn()" v-has="'taskHeader:emptyIn'" type="primary">空托入库</a-button> |
87 | <a-button @click="createManyEmptyIn()" v-has="'taskHeader:manyEmptyIn'" type="primary">空托组入库</a-button> | 87 | <a-button @click="createManyEmptyIn()" v-has="'taskHeader:manyEmptyIn'" type="primary">空托组入库</a-button> |
88 | - <a-button @click="quickReceipt()" type="primary">快速入库</a-button> | 88 | + <a-button v-has="'taskHeader:quickReceipt'" @click="quickReceipt()" type="primary">快速入库</a-button> |
89 | + <a-button v-has="'taskHeader:callReceiptBox'" @click="callReceiptBox()" type="primary" >呼叫入库有货托盘</a-button> | ||
90 | + <a-button v-has="'taskHeader:callReceiptBox'" @click="callReceiptEmptyBox()" type="primary" >呼叫入库空托盘</a-button> | ||
89 | </div> | 91 | </div> |
90 | 92 | ||
91 | <!-- table区域-begin --> | 93 | <!-- table区域-begin --> |
@@ -178,6 +180,8 @@ | @@ -178,6 +180,8 @@ | ||
178 | <empty-in-task-modal ref="emptyInModal" @ok="modalFormOk"></empty-in-task-modal> | 180 | <empty-in-task-modal ref="emptyInModal" @ok="modalFormOk"></empty-in-task-modal> |
179 | <many-empty-in-task-modal ref="manyEmptyInModal" @ok="modalFormOk"></many-empty-in-task-modal> | 181 | <many-empty-in-task-modal ref="manyEmptyInModal" @ok="modalFormOk"></many-empty-in-task-modal> |
180 | <MaterialTaskModal ref="materialTaskModal" @ok="modalFormOk"></MaterialTaskModal> | 182 | <MaterialTaskModal ref="materialTaskModal" @ok="modalFormOk"></MaterialTaskModal> |
183 | + <call-receipt-box-modal ref="modalForm5" @ok="modalFormOk"></call-receipt-box-modal> | ||
184 | + <call-receipt-empty-box-modal ref="modalForm6" @ok="modalFormOk"></call-receipt-empty-box-modal> | ||
181 | </a-card> | 185 | </a-card> |
182 | </template> | 186 | </template> |
183 | 187 | ||
@@ -196,12 +200,16 @@ import EmptyInTaskModal from './modules/EmptyInTaskModal' | @@ -196,12 +200,16 @@ import EmptyInTaskModal from './modules/EmptyInTaskModal' | ||
196 | import ManyEmptyInTaskModal from "./modules/ManyEmptyInTaskModal"; | 200 | import ManyEmptyInTaskModal from "./modules/ManyEmptyInTaskModal"; |
197 | import {filterObj} from "@/utils/util"; | 201 | import {filterObj} from "@/utils/util"; |
198 | import MaterialTaskModal from "./modules/MaterialTaskModal"; | 202 | import MaterialTaskModal from "./modules/MaterialTaskModal"; |
203 | +import CallReceiptBoxModal from "@views/system/task/modules/CallReceiptBoxModal"; | ||
204 | +import CallReceiptEmptyBoxModal from "@views/system/task/modules/CallReceiptEmptyBoxModal"; | ||
199 | 205 | ||
200 | 206 | ||
201 | export default { | 207 | export default { |
202 | name: "TaskHeaderList", | 208 | name: "TaskHeaderList", |
203 | mixins: [JeecgListMixin], | 209 | mixins: [JeecgListMixin], |
204 | components: { | 210 | components: { |
211 | + CallReceiptEmptyBoxModal, | ||
212 | + CallReceiptBoxModal, | ||
205 | ManyEmptyInTaskModal, | 213 | ManyEmptyInTaskModal, |
206 | EmptyInTaskModal, | 214 | EmptyInTaskModal, |
207 | TaskDetailList, | 215 | TaskDetailList, |
@@ -398,6 +406,14 @@ export default { | @@ -398,6 +406,14 @@ export default { | ||
398 | this.selectedRowKeys = selectedRowKeys; | 406 | this.selectedRowKeys = selectedRowKeys; |
399 | this.selectionRows = selectionRows; | 407 | this.selectionRows = selectionRows; |
400 | }, | 408 | }, |
409 | + callReceiptBox() { | ||
410 | + this.$refs.modalForm5.edit(); | ||
411 | + this.$refs.modalForm5.title = "呼叫入库有货托盘"; | ||
412 | + }, | ||
413 | + callReceiptEmptyBox() { | ||
414 | + this.$refs.modalForm6.edit(); | ||
415 | + this.$refs.modalForm6.title = "呼叫入库空托盘"; | ||
416 | + }, | ||
401 | loadData(arg) { | 417 | loadData(arg) { |
402 | if (!this.url.list) { | 418 | if (!this.url.list) { |
403 | this.$message.error("请设置url.list属性!") | 419 | this.$message.error("请设置url.list属性!") |
ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
@@ -85,6 +85,7 @@ | @@ -85,6 +85,7 @@ | ||
85 | <div class="table-operator"> | 85 | <div class="table-operator"> |
86 | <a-button @click="createEmptyOut()" v-has="'taskHeader:emptyOut'" type="primary">空托出库</a-button> | 86 | <a-button @click="createEmptyOut()" v-has="'taskHeader:emptyOut'" type="primary">空托出库</a-button> |
87 | <a-button @click="createManyEmptyOut()" v-has="'taskHeader:manyEmptyOut'" type="primary">空托组出库</a-button> | 87 | <a-button @click="createManyEmptyOut()" v-has="'taskHeader:manyEmptyOut'" type="primary">空托组出库</a-button> |
88 | + <a-button v-has="'taskHeader:callShipmentBox'" @click="callShipmentBox()" type="primary" >呼叫出库托盘</a-button> | ||
88 | </div> | 89 | </div> |
89 | 90 | ||
90 | <!-- table区域-begin --> | 91 | <!-- table区域-begin --> |
@@ -176,6 +177,7 @@ | @@ -176,6 +177,7 @@ | ||
176 | <taskHeader-modal ref="modalForm" @ok="modalFormOk"></taskHeader-modal> | 177 | <taskHeader-modal ref="modalForm" @ok="modalFormOk"></taskHeader-modal> |
177 | <empty-out-task-modal ref="emptyOutModal" @ok="modalFormOk"></empty-out-task-modal> | 178 | <empty-out-task-modal ref="emptyOutModal" @ok="modalFormOk"></empty-out-task-modal> |
178 | <many-empty-out-task-modal ref="manyEmptyOutModal" @ok="modalFormOk"></many-empty-out-task-modal> | 179 | <many-empty-out-task-modal ref="manyEmptyOutModal" @ok="modalFormOk"></many-empty-out-task-modal> |
180 | + <call-shipment-box-modal ref="modalForm5" @ok="modalFormOk"></call-shipment-box-modal> | ||
179 | 181 | ||
180 | </a-card> | 182 | </a-card> |
181 | </template> | 183 | </template> |
@@ -193,11 +195,13 @@ import {execute} from '@/api/api' | @@ -193,11 +195,13 @@ import {execute} from '@/api/api' | ||
193 | import {getZoneList, handleEmptyOut, handlePickupError, handleDoubleIn} from '@/api/api' | 195 | import {getZoneList, handleEmptyOut, handlePickupError, handleDoubleIn} from '@/api/api' |
194 | import EmptyOutTaskModal from './modules/EmptyOutTaskModal' | 196 | import EmptyOutTaskModal from './modules/EmptyOutTaskModal' |
195 | import ManyEmptyOutTaskModal from "./modules/ManyEmptyOutTaskModal"; | 197 | import ManyEmptyOutTaskModal from "./modules/ManyEmptyOutTaskModal"; |
198 | +import CallShipmentBoxModal from "@views/system/task/modules/CallShipmentBoxModal"; | ||
196 | 199 | ||
197 | export default { | 200 | export default { |
198 | name: "TaskHeaderList", | 201 | name: "TaskHeaderList", |
199 | mixins: [JeecgListMixin], | 202 | mixins: [JeecgListMixin], |
200 | components: { | 203 | components: { |
204 | + CallShipmentBoxModal, | ||
201 | ManyEmptyOutTaskModal, | 205 | ManyEmptyOutTaskModal, |
202 | EmptyOutTaskModal, | 206 | EmptyOutTaskModal, |
203 | TaskDetailList, | 207 | TaskDetailList, |
@@ -392,6 +396,10 @@ export default { | @@ -392,6 +396,10 @@ export default { | ||
392 | this.selectedRowKeys = selectedRowKeys; | 396 | this.selectedRowKeys = selectedRowKeys; |
393 | this.selectionRows = selectionRows; | 397 | this.selectionRows = selectionRows; |
394 | }, | 398 | }, |
399 | + callShipmentBox() { | ||
400 | + this.$refs.modalForm5.edit(); | ||
401 | + this.$refs.modalForm5.title = "呼叫出库托盘"; | ||
402 | + }, | ||
395 | loadFrom() { | 403 | loadFrom() { |
396 | getZoneList().then((res) => { | 404 | getZoneList().then((res) => { |
397 | if (res.success) { | 405 | if (res.success) { |
ant-design-vue-jeecg/src/views/system/task/modules/CallReceiptBoxModal.vue
0 → 100644
1 | +<template> | ||
2 | + <j-modal | ||
3 | + :title="title" | ||
4 | + :width="width" | ||
5 | + :visible="visible" | ||
6 | + :confirmLoading="confirmLoading" | ||
7 | + switchFullscreen | ||
8 | + @ok="handleOk" | ||
9 | + @cancel="handleCancel" | ||
10 | + cancelText="关闭"> | ||
11 | + <a-spin :spinning="confirmLoading"> | ||
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | ||
13 | + <a-row> | ||
14 | + <a-col :span="24"> | ||
15 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | ||
16 | + <j-select-multi-some-container v-model="model.containerCode" @change="getPortList" /> | ||
17 | + </a-form-model-item> | ||
18 | + </a-col> | ||
19 | + <a-col :span="24"> | ||
20 | + <a-form-model-item label="入库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="port"> | ||
21 | + <a-select | ||
22 | + show-search | ||
23 | + placeholder="请选择入库口" | ||
24 | + option-filter-prop="children" | ||
25 | + v-model="model.port"> | ||
26 | + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ | ||
27 | + item.name | ||
28 | + }} | ||
29 | + </a-select-option> | ||
30 | + </a-select> | ||
31 | + </a-form-model-item> | ||
32 | + </a-col> | ||
33 | + </a-row> | ||
34 | + </a-form-model> | ||
35 | + </a-spin> | ||
36 | + </j-modal> | ||
37 | +</template> | ||
38 | + | ||
39 | +<script> | ||
40 | + | ||
41 | +import {httpAction} from '@/api/manage' | ||
42 | +import {validateDuplicateValue} from '@/utils/util' | ||
43 | +import {callReceiptBox, selectOutPort, selectPickPort} from '@/api/api' | ||
44 | +import JSelectMultiSomeContainer from "@comp/jeecgbiz/JSelectMultiSomeContainer"; | ||
45 | + | ||
46 | +export default { | ||
47 | + name: "CallReceiptBoxModal", | ||
48 | + components: {JSelectMultiSomeContainer}, | ||
49 | + data() { | ||
50 | + return { | ||
51 | + title: "操作", | ||
52 | + width: 500, | ||
53 | + portList: [], | ||
54 | + querySource: {}, | ||
55 | + visible: false, | ||
56 | + model: {}, | ||
57 | + labelCol: { | ||
58 | + xs: {span: 24}, | ||
59 | + sm: {span: 5}, | ||
60 | + }, | ||
61 | + wrapperCol: { | ||
62 | + xs: {span: 24}, | ||
63 | + sm: {span: 16}, | ||
64 | + }, | ||
65 | + | ||
66 | + confirmLoading: false, | ||
67 | + validatorRules: { | ||
68 | + containerCode: [ | ||
69 | + {required: true, message: '请输入容器编码!'}, | ||
70 | + ], | ||
71 | + toPortCode: [ | ||
72 | + {required: true, message: '请选择入库口!'}, | ||
73 | + ], | ||
74 | + }, | ||
75 | + url: { | ||
76 | + add: "/task/taskHeader/createEmptyOut", | ||
77 | + } | ||
78 | + | ||
79 | + } | ||
80 | + }, | ||
81 | + created() { | ||
82 | + //备份model原始值 | ||
83 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
84 | + }, | ||
85 | + methods: { | ||
86 | + add() { | ||
87 | + // $("select").change(function() { alert("选项已被改变"); console.log($('select').val());}); | ||
88 | + this.edit(this.modelDefault); | ||
89 | + }, | ||
90 | + edit() { | ||
91 | + // this.getPortList(); | ||
92 | + // this.model = Object.assign({}, record); | ||
93 | + this.visible = true; | ||
94 | + }, | ||
95 | + close() { | ||
96 | + this.$emit('close'); | ||
97 | + this.visible = false; | ||
98 | + this.$refs.form.clearValidate(); | ||
99 | + }, | ||
100 | + getPortList() { | ||
101 | + this.querySource.containerCode = this.model.containerCode; | ||
102 | + selectPickPort(this.querySource).then((res) => { | ||
103 | + if (res.success) { | ||
104 | + this.portList = res.result; | ||
105 | + this.visible = true; | ||
106 | + } | ||
107 | + }); | ||
108 | + }, | ||
109 | + handleOk() { | ||
110 | + const that = this; | ||
111 | + // 触发表单验证 | ||
112 | + this.$refs.form.validate(valid => { | ||
113 | + if (valid) { | ||
114 | + that.confirmLoading = true; | ||
115 | + callReceiptBox(this.model).then((res) => { | ||
116 | + if (res.success) { | ||
117 | + that.$message.success(res.message); | ||
118 | + that.$emit('ok'); | ||
119 | + that.model.containerCode = ''; | ||
120 | + that.model.port = ''; | ||
121 | + } else { | ||
122 | + that.$message.warning(res.message); | ||
123 | + } | ||
124 | + }).finally(() => { | ||
125 | + that.confirmLoading = false; | ||
126 | + that.close(); | ||
127 | + }) | ||
128 | + } else { | ||
129 | + return false | ||
130 | + } | ||
131 | + }) | ||
132 | + }, | ||
133 | + handleCancel() { | ||
134 | + this.close() | ||
135 | + }, | ||
136 | + | ||
137 | + | ||
138 | + } | ||
139 | +} | ||
140 | +</script> | ||
0 | \ No newline at end of file | 141 | \ No newline at end of file |
ant-design-vue-jeecg/src/views/system/task/modules/CallReceiptEmptyBoxModal.vue
0 → 100644
1 | +<template> | ||
2 | + <j-modal | ||
3 | + :title="title" | ||
4 | + :width="width" | ||
5 | + :visible="visible" | ||
6 | + :confirmLoading="confirmLoading" | ||
7 | + switchFullscreen | ||
8 | + @ok="handleOk" | ||
9 | + @cancel="handleCancel" | ||
10 | + cancelText="关闭"> | ||
11 | + <a-spin :spinning="confirmLoading"> | ||
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | ||
13 | + <a-row> | ||
14 | + <a-col :span="24"> | ||
15 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | ||
16 | + <j-select-multi-empty-container v-model="model.containerCode" @change="getPortList" /> | ||
17 | + </a-form-model-item> | ||
18 | + </a-col> | ||
19 | + <a-col :span="24"> | ||
20 | + <a-form-model-item label="入库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="port"> | ||
21 | + <a-select | ||
22 | + show-search | ||
23 | + placeholder="请选择入库口" | ||
24 | + option-filter-prop="children" | ||
25 | + v-model="model.port"> | ||
26 | + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ | ||
27 | + item.name | ||
28 | + }} | ||
29 | + </a-select-option> | ||
30 | + </a-select> | ||
31 | + </a-form-model-item> | ||
32 | + </a-col> | ||
33 | + </a-row> | ||
34 | + </a-form-model> | ||
35 | + </a-spin> | ||
36 | + </j-modal> | ||
37 | +</template> | ||
38 | + | ||
39 | +<script> | ||
40 | + | ||
41 | +import {httpAction} from '@/api/manage' | ||
42 | +import {validateDuplicateValue} from '@/utils/util' | ||
43 | +import {callReceiptBox, selectOutPort, selectPickPort} from '@/api/api' | ||
44 | +import JSelectMultiEmptyContainer from "@comp/jeecgbiz/JSelectMultiEmptyContainer"; | ||
45 | + | ||
46 | +export default { | ||
47 | + name: "CallReceiptEmptyBoxModal", | ||
48 | + components: {JSelectMultiEmptyContainer}, | ||
49 | + data() { | ||
50 | + return { | ||
51 | + title: "操作", | ||
52 | + width: 500, | ||
53 | + portList: [], | ||
54 | + querySource: {}, | ||
55 | + visible: false, | ||
56 | + model: {}, | ||
57 | + labelCol: { | ||
58 | + xs: {span: 24}, | ||
59 | + sm: {span: 5}, | ||
60 | + }, | ||
61 | + wrapperCol: { | ||
62 | + xs: {span: 24}, | ||
63 | + sm: {span: 16}, | ||
64 | + }, | ||
65 | + | ||
66 | + confirmLoading: false, | ||
67 | + validatorRules: { | ||
68 | + containerCode: [ | ||
69 | + {required: true, message: '请输入容器编码!'}, | ||
70 | + ], | ||
71 | + toPortCode: [ | ||
72 | + {required: true, message: '请选择入库口!'}, | ||
73 | + ], | ||
74 | + }, | ||
75 | + url: { | ||
76 | + add: "/task/taskHeader/createEmptyOut", | ||
77 | + } | ||
78 | + | ||
79 | + } | ||
80 | + }, | ||
81 | + created() { | ||
82 | + //备份model原始值 | ||
83 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
84 | + }, | ||
85 | + methods: { | ||
86 | + add() { | ||
87 | + // $("select").change(function() { alert("选项已被改变"); console.log($('select').val());}); | ||
88 | + this.edit(this.modelDefault); | ||
89 | + }, | ||
90 | + edit() { | ||
91 | + // this.getPortList(); | ||
92 | + // this.model = Object.assign({}, record); | ||
93 | + this.visible = true; | ||
94 | + }, | ||
95 | + close() { | ||
96 | + this.$emit('close'); | ||
97 | + this.visible = false; | ||
98 | + this.$refs.form.clearValidate(); | ||
99 | + }, | ||
100 | + getPortList() { | ||
101 | + this.querySource.containerCode = this.model.containerCode; | ||
102 | + selectPickPort(this.querySource).then((res) => { | ||
103 | + if (res.success) { | ||
104 | + this.portList = res.result; | ||
105 | + this.visible = true; | ||
106 | + } | ||
107 | + }); | ||
108 | + }, | ||
109 | + handleOk() { | ||
110 | + const that = this; | ||
111 | + // 触发表单验证 | ||
112 | + this.$refs.form.validate(valid => { | ||
113 | + if (valid) { | ||
114 | + that.confirmLoading = true; | ||
115 | + callReceiptBox(this.model).then((res) => { | ||
116 | + if (res.success) { | ||
117 | + that.$message.success(res.message); | ||
118 | + that.$emit('ok'); | ||
119 | + that.model.containerCode = ''; | ||
120 | + that.model.port = ''; | ||
121 | + } else { | ||
122 | + that.$message.warning(res.message); | ||
123 | + } | ||
124 | + }).finally(() => { | ||
125 | + that.confirmLoading = false; | ||
126 | + that.close(); | ||
127 | + }) | ||
128 | + } else { | ||
129 | + return false | ||
130 | + } | ||
131 | + }) | ||
132 | + }, | ||
133 | + handleCancel() { | ||
134 | + this.close() | ||
135 | + }, | ||
136 | + | ||
137 | + | ||
138 | + } | ||
139 | +} | ||
140 | +</script> | ||
0 | \ No newline at end of file | 141 | \ No newline at end of file |
ant-design-vue-jeecg/src/views/system/task/modules/CallShipmentBoxModal.vue
0 → 100644
1 | +<template> | ||
2 | + <j-modal | ||
3 | + :title="title" | ||
4 | + :width="width" | ||
5 | + :visible="visible" | ||
6 | + :confirmLoading="confirmLoading" | ||
7 | + switchFullscreen | ||
8 | + @ok="handleOk" | ||
9 | + @cancel="handleCancel" | ||
10 | + cancelText="关闭"> | ||
11 | + <a-spin :spinning="confirmLoading"> | ||
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | ||
13 | + <a-row> | ||
14 | + <a-col :span="24"> | ||
15 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | ||
16 | + <j-select-multi-some-container v-model="model.containerCode" @change="getPortList" /> | ||
17 | + </a-form-model-item> | ||
18 | + </a-col> | ||
19 | + <a-col :span="24"> | ||
20 | + <a-form-model-item label="出库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="port"> | ||
21 | + <a-select | ||
22 | + show-search | ||
23 | + placeholder="请选择出库口" | ||
24 | + option-filter-prop="children" | ||
25 | + v-model="model.port"> | ||
26 | + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ | ||
27 | + item.name | ||
28 | + }} | ||
29 | + </a-select-option> | ||
30 | + </a-select> | ||
31 | + </a-form-model-item> | ||
32 | + </a-col> | ||
33 | + </a-row> | ||
34 | + </a-form-model> | ||
35 | + </a-spin> | ||
36 | + </j-modal> | ||
37 | +</template> | ||
38 | + | ||
39 | +<script> | ||
40 | + | ||
41 | +import {httpAction} from '@/api/manage' | ||
42 | +import {validateDuplicateValue} from '@/utils/util' | ||
43 | +import {callShipmentBox, selectOutPort, selectPickPort} from '@/api/api' | ||
44 | +import JSelectMultiSomeContainer from "@comp/jeecgbiz/JSelectMultiSomeContainer"; | ||
45 | + | ||
46 | +export default { | ||
47 | + name: "CallShipmentBoxModal", | ||
48 | + components: {JSelectMultiSomeContainer}, | ||
49 | + data() { | ||
50 | + return { | ||
51 | + title: "操作", | ||
52 | + width: 500, | ||
53 | + portList: [], | ||
54 | + querySource: {}, | ||
55 | + visible: false, | ||
56 | + model: {}, | ||
57 | + labelCol: { | ||
58 | + xs: {span: 24}, | ||
59 | + sm: {span: 5}, | ||
60 | + }, | ||
61 | + wrapperCol: { | ||
62 | + xs: {span: 24}, | ||
63 | + sm: {span: 16}, | ||
64 | + }, | ||
65 | + | ||
66 | + confirmLoading: false, | ||
67 | + validatorRules: { | ||
68 | + containerCode: [ | ||
69 | + {required: true, message: '请输入容器编码!'}, | ||
70 | + ], | ||
71 | + toPortCode: [ | ||
72 | + {required: true, message: '请选择入库口!'}, | ||
73 | + ], | ||
74 | + }, | ||
75 | + url: { | ||
76 | + add: "/task/taskHeader/createEmptyOut", | ||
77 | + } | ||
78 | + | ||
79 | + } | ||
80 | + }, | ||
81 | + created() { | ||
82 | + //备份model原始值 | ||
83 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
84 | + }, | ||
85 | + methods: { | ||
86 | + add() { | ||
87 | + // $("select").change(function() { alert("选项已被改变"); console.log($('select').val());}); | ||
88 | + this.edit(this.modelDefault); | ||
89 | + }, | ||
90 | + edit() { | ||
91 | + // this.getPortList(); | ||
92 | + // this.model = Object.assign({}, record); | ||
93 | + this.visible = true; | ||
94 | + }, | ||
95 | + close() { | ||
96 | + this.$emit('close'); | ||
97 | + this.visible = false; | ||
98 | + this.$refs.form.clearValidate(); | ||
99 | + }, | ||
100 | + getPortList() { | ||
101 | + this.querySource.containerCode = this.model.containerCode; | ||
102 | + selectPickPort(this.querySource).then((res) => { | ||
103 | + if (res.success) { | ||
104 | + this.portList = res.result; | ||
105 | + this.visible = true; | ||
106 | + } | ||
107 | + }); | ||
108 | + }, | ||
109 | + handleOk() { | ||
110 | + const that = this; | ||
111 | + // 触发表单验证 | ||
112 | + this.$refs.form.validate(valid => { | ||
113 | + if (valid) { | ||
114 | + that.confirmLoading = true; | ||
115 | + callShipmentBox(this.model).then((res) => { | ||
116 | + if (res.success) { | ||
117 | + that.$message.success(res.message); | ||
118 | + that.$emit('ok'); | ||
119 | + that.model.containerCode = ''; | ||
120 | + that.model.port = ''; | ||
121 | + } else { | ||
122 | + that.$message.warning(res.message); | ||
123 | + } | ||
124 | + }).finally(() => { | ||
125 | + that.confirmLoading = false; | ||
126 | + that.close(); | ||
127 | + }) | ||
128 | + } else { | ||
129 | + return false | ||
130 | + } | ||
131 | + }) | ||
132 | + }, | ||
133 | + handleCancel() { | ||
134 | + this.close() | ||
135 | + }, | ||
136 | + | ||
137 | + | ||
138 | + } | ||
139 | +} | ||
140 | +</script> | ||
0 | \ No newline at end of file | 141 | \ No newline at end of file |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/entity/CallBoxBean.java
@@ -10,7 +10,7 @@ import lombok.Data; | @@ -10,7 +10,7 @@ import lombok.Data; | ||
10 | public class CallBoxBean { | 10 | public class CallBoxBean { |
11 | @ApiModelProperty(value = "托盘号", required = true) | 11 | @ApiModelProperty(value = "托盘号", required = true) |
12 | private String containerCode; | 12 | private String containerCode; |
13 | - @ApiModelProperty(value = "库位编码", required = true) | 13 | + @ApiModelProperty(value = "库位编码") |
14 | private String locationCode; | 14 | private String locationCode; |
15 | @ApiModelProperty(value = "任务类型,200补充入, 400分拣出") | 15 | @ApiModelProperty(value = "任务类型,200补充入, 400分拣出") |
16 | private int type; | 16 | private int type; |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/service/impl/MobileService.java
@@ -57,18 +57,13 @@ public class MobileService implements IMobileService { | @@ -57,18 +57,13 @@ public class MobileService implements IMobileService { | ||
57 | @Transactional(rollbackFor = Exception.class) | 57 | @Transactional(rollbackFor = Exception.class) |
58 | public Result<TaskHeader> callBox(CallBoxBean bean, String warehouseCode) { | 58 | public Result<TaskHeader> callBox(CallBoxBean bean, String warehouseCode) { |
59 | String containerCode = bean.getContainerCode(); | 59 | String containerCode = bean.getContainerCode(); |
60 | + | ||
60 | if (StringUtils.isEmpty(bean.getContainerCode())) { | 61 | if (StringUtils.isEmpty(bean.getContainerCode())) { |
61 | return Result.error("呼叫料盒,托盘号containerCode不能为空"); | 62 | return Result.error("呼叫料盒,托盘号containerCode不能为空"); |
62 | } | 63 | } |
63 | - | ||
64 | - if (StringUtils.isEmpty(bean.getLocationCode())) { | ||
65 | - return Result.error("呼叫料盒, 库位locationCode不能为空"); | ||
66 | - } | ||
67 | - | ||
68 | if (StringUtils.isEmpty(bean.getCompanyCode())) { | 64 | if (StringUtils.isEmpty(bean.getCompanyCode())) { |
69 | - return Result.error("呼叫料盒, 货主companyCode不能为空"); | 65 | + bean.setCompanyCode(QuantityConstant.DEFAULT_COMPANY); |
70 | } | 66 | } |
71 | - | ||
72 | if (StringUtils.isEmpty(bean.getPort())) { | 67 | if (StringUtils.isEmpty(bean.getPort())) { |
73 | return Result.error("呼叫料盒, 出库口不能为空"); | 68 | return Result.error("呼叫料盒, 出库口不能为空"); |
74 | } | 69 | } |
@@ -76,6 +71,7 @@ public class MobileService implements IMobileService { | @@ -76,6 +71,7 @@ public class MobileService implements IMobileService { | ||
76 | if (container == null) { | 71 | if (container == null) { |
77 | return Result.error("呼叫料盒,容器为空"); | 72 | return Result.error("呼叫料盒,容器为空"); |
78 | } | 73 | } |
74 | + | ||
79 | String fromLocationCode = container.getLocationCode(); | 75 | String fromLocationCode = container.getLocationCode(); |
80 | String toLocationCode = QuantityConstant.EMPTY_STRING; | 76 | String toLocationCode = QuantityConstant.EMPTY_STRING; |
81 | String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION); | 77 | String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION); |
@@ -102,6 +98,7 @@ public class MobileService implements IMobileService { | @@ -102,6 +98,7 @@ public class MobileService implements IMobileService { | ||
102 | taskHeader.setInnernalTaskType(QuantityConstant.TASK_INTENERTYPE_SHIPMENT); | 98 | taskHeader.setInnernalTaskType(QuantityConstant.TASK_INTENERTYPE_SHIPMENT); |
103 | taskHeader.setTaskType(QuantityConstant.TASK_TYPE_SORTINGSHIPMENT); | 99 | taskHeader.setTaskType(QuantityConstant.TASK_TYPE_SORTINGSHIPMENT); |
104 | } | 100 | } |
101 | + taskHeader.setCallBox(QuantityConstant.CALL_BOX); | ||
105 | taskHeader.setContainerCode(containerCode); | 102 | taskHeader.setContainerCode(containerCode); |
106 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); | 103 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); |
107 | taskHeader.setFromLocationCode(fromLocationCode); | 104 | taskHeader.setFromLocationCode(fromLocationCode); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/IInventoryHeaderService.java
@@ -43,4 +43,6 @@ public interface IInventoryHeaderService extends IService<InventoryHeader> { | @@ -43,4 +43,6 @@ public interface IInventoryHeaderService extends IService<InventoryHeader> { | ||
43 | Result shipmentInventoryHeader(List<InventoryHeader> inventoryHeaderList, String warehouseCode); | 43 | Result shipmentInventoryHeader(List<InventoryHeader> inventoryHeaderList, String warehouseCode); |
44 | 44 | ||
45 | Result shipmentInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode); | 45 | Result shipmentInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode); |
46 | + | ||
47 | + boolean updateInventory(Integer inventoryHeaderId, List<InventoryDetail> inventoryDetailList, String containerStatus, String zoneCode, String locationCode); | ||
46 | } | 48 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryHeaderServiceImpl.java
@@ -335,4 +335,32 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | @@ -335,4 +335,32 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | ||
335 | return Result.OK("批量快速出库成功"); | 335 | return Result.OK("批量快速出库成功"); |
336 | } | 336 | } |
337 | 337 | ||
338 | + @Override | ||
339 | + public boolean updateInventory(Integer inventoryHeaderId, List<InventoryDetail> inventoryDetailList, String containerStatus, String zoneCode, | ||
340 | + String locationCode) { | ||
341 | + InventoryHeader inventoryHeader = inventoryHeaderService.getById(inventoryHeaderId); | ||
342 | + if (inventoryHeader == null) { | ||
343 | + return true; | ||
344 | + } | ||
345 | + boolean success = inventoryHeaderService.updateInventoryLocationAndZoneById(locationCode, zoneCode, inventoryHeaderId); | ||
346 | + if (!success) { | ||
347 | + return success; | ||
348 | + } | ||
349 | + success = inventoryHeaderService.updateContainerStatusById(containerStatus, inventoryHeaderId); | ||
350 | + if (!success) { | ||
351 | + return success; | ||
352 | + } | ||
353 | + List<InventoryDetail> updateInventoryDetailList = new ArrayList<>(); | ||
354 | + for (InventoryDetail inventoryDetail : inventoryDetailList) { | ||
355 | + InventoryDetail inventoryDetail1 = new InventoryDetail(); | ||
356 | + inventoryDetail1.setId(inventoryDetail.getId()); | ||
357 | + inventoryDetail1.setContainerStatus(containerStatus); | ||
358 | + inventoryDetail1.setLocationCode(locationCode); | ||
359 | + inventoryDetail1.setZoneCode(zoneCode); | ||
360 | + updateInventoryDetailList.add(inventoryDetail1); | ||
361 | + } | ||
362 | + success = inventoryDetailService.updateBatchById(updateInventoryDetailList); | ||
363 | + return success; | ||
364 | + } | ||
365 | + | ||
338 | } | 366 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
@@ -33,7 +33,6 @@ import org.jeecg.utils.StringUtils; | @@ -33,7 +33,6 @@ import org.jeecg.utils.StringUtils; | ||
33 | import org.jeecg.utils.constant.QuantityConstant; | 33 | import org.jeecg.utils.constant.QuantityConstant; |
34 | import org.springframework.beans.factory.annotation.Autowired; | 34 | import org.springframework.beans.factory.annotation.Autowired; |
35 | import org.springframework.stereotype.Service; | 35 | import org.springframework.stereotype.Service; |
36 | -import org.springframework.transaction.annotation.Propagation; | ||
37 | import org.springframework.transaction.annotation.Transactional; | 36 | import org.springframework.transaction.annotation.Transactional; |
38 | 37 | ||
39 | import com.alibaba.fastjson.JSON; | 38 | import com.alibaba.fastjson.JSON; |
@@ -146,37 +145,54 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | @@ -146,37 +145,54 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | ||
146 | if (!StringUtils.isEmpty(receiptContainerHeader.getContainerFillStatus())) { | 145 | if (!StringUtils.isEmpty(receiptContainerHeader.getContainerFillStatus())) { |
147 | containerFillStatus = receiptContainerHeader.getContainerFillStatus(); | 146 | containerFillStatus = receiptContainerHeader.getContainerFillStatus(); |
148 | } | 147 | } |
149 | - // 锁定容器和库位 | ||
150 | - Result result = taskHeaderService.createTaskLockContainerAndLocation(taskType, containerCode, fromLocationCode, toLocationCode, warehouseCode); | ||
151 | - if (!result.isSuccess()) { | ||
152 | - throw new JeecgBootException(result.getMessage()); | ||
153 | - } | ||
154 | - TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); | ||
155 | - String zoneCode = taskLockEntity.getZoneCode(); | ||
156 | - TaskHeader taskHeader = new TaskHeader(); | ||
157 | - taskHeader.setContainerCode(containerCode); | ||
158 | - taskHeader.setContainerFillStatus(containerFillStatus); | ||
159 | - taskHeader.setTaskType(receiptContainerHeader.getTaskType()); | ||
160 | - taskHeader.setInnernalTaskType(QuantityConstant.TASK_INTENERTYPE_RECEIPT); | ||
161 | - taskHeader.setFromLocationCode(fromLocationCode); | ||
162 | - taskHeader.setToLocationCode(toLocationCode); | ||
163 | - taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); | ||
164 | - taskHeader.setCompanyCode(receiptContainerHeader.getCompanyCode()); | ||
165 | - taskHeader.setReceiptContainerHeaderId(receiptContainerHeader.getId()); | ||
166 | - taskHeader.setWarehouseCode(warehouseCode); | ||
167 | - taskHeader.setZoneCode(zoneCode); | ||
168 | - taskHeader.setToPortCode(receiptContainerHeader.getToPort()); | ||
169 | - success = taskHeaderService.save(taskHeader); | ||
170 | - if (!success) { | ||
171 | - throw new JeecgBootException("创建入库任务, 任务生成失败"); | 148 | + int taskHeaderId = 0; |
149 | + TaskHeader taskHeader = taskHeaderService.getUnCompleteTaskByContainerCode(containerCode, warehouseCode); | ||
150 | + if (taskHeader == null) { | ||
151 | + // 锁定容器和库位 | ||
152 | + Result result = taskHeaderService.createTaskLockContainerAndLocation(taskType, containerCode, fromLocationCode, toLocationCode, warehouseCode); | ||
153 | + if (!result.isSuccess()) { | ||
154 | + throw new JeecgBootException(result.getMessage()); | ||
155 | + } | ||
156 | + TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); | ||
157 | + String zoneCode = taskLockEntity.getZoneCode(); | ||
158 | + taskHeader = new TaskHeader(); | ||
159 | + taskHeader.setContainerCode(containerCode); | ||
160 | + taskHeader.setContainerFillStatus(containerFillStatus); | ||
161 | + taskHeader.setTaskType(receiptContainerHeader.getTaskType()); | ||
162 | + taskHeader.setInnernalTaskType(QuantityConstant.TASK_INTENERTYPE_RECEIPT); | ||
163 | + taskHeader.setFromLocationCode(fromLocationCode); | ||
164 | + taskHeader.setToLocationCode(toLocationCode); | ||
165 | + taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); | ||
166 | + taskHeader.setCompanyCode(receiptContainerHeader.getCompanyCode()); | ||
167 | + taskHeader.setReceiptContainerHeaderId(receiptContainerHeader.getId()); | ||
168 | + taskHeader.setWarehouseCode(warehouseCode); | ||
169 | + taskHeader.setZoneCode(zoneCode); | ||
170 | + taskHeader.setToPortCode(receiptContainerHeader.getToPort()); | ||
171 | + success = taskHeaderService.save(taskHeader); | ||
172 | + if (!success) { | ||
173 | + throw new JeecgBootException("创建入库任务, 任务生成失败"); | ||
174 | + } | ||
175 | + taskHeaderId = taskHeader.getId(); | ||
176 | + } else { | ||
177 | + taskHeaderId = taskHeader.getId(); | ||
178 | + if (taskHeader.getCallBox() == QuantityConstant.NOT_CALL_BOX) { | ||
179 | + throw new JeecgBootException("创建入库任务, 没有呼叫料盒标记"); | ||
180 | + } | ||
181 | + TaskHeader taskHeader1 = new TaskHeader(); | ||
182 | + taskHeader1.setId(taskHeaderId); | ||
183 | + taskHeader1.setReceiptContainerHeaderId(receiptContainerHeader.getId()); | ||
184 | + taskHeader1.setContainerFillStatus(containerFillStatus); | ||
185 | + success = taskHeaderService.updateById(taskHeader1); | ||
186 | + if (!success) { | ||
187 | + throw new JeecgBootException("创建入库任务, 任务更新失败"); | ||
188 | + } | ||
172 | } | 189 | } |
173 | - int taskHeaderId = taskHeader.getId(); | ||
174 | List<TaskDetail> taskDetailList = new ArrayList<>(); | 190 | List<TaskDetail> taskDetailList = new ArrayList<>(); |
175 | List<ReceiptDetail> receiptDetailList = new ArrayList<>(); | 191 | List<ReceiptDetail> receiptDetailList = new ArrayList<>(); |
176 | for (ReceiptContainerDetail receiptContainerDetail : receiptContainerDetailList) { | 192 | for (ReceiptContainerDetail receiptContainerDetail : receiptContainerDetailList) { |
177 | TaskDetail taskDetail = new TaskDetail(); | 193 | TaskDetail taskDetail = new TaskDetail(); |
178 | taskDetail.setTaskHeaderId(taskHeaderId); | 194 | taskDetail.setTaskHeaderId(taskHeaderId); |
179 | - taskDetail.setTaskType(taskHeader.getTaskType()); | 195 | + taskDetail.setTaskType(receiptContainerHeader.getTaskType()); |
180 | taskDetail.setWarehouseCode(receiptContainerDetail.getWarehouseCode()); | 196 | taskDetail.setWarehouseCode(receiptContainerDetail.getWarehouseCode()); |
181 | taskDetail.setReceiptId(receiptContainerDetail.getReceiptId()); | 197 | taskDetail.setReceiptId(receiptContainerDetail.getReceiptId()); |
182 | taskDetail.setReceiptDetailId(receiptContainerDetail.getReceiptDetailId()); | 198 | taskDetail.setReceiptDetailId(receiptContainerDetail.getReceiptDetailId()); |
@@ -211,15 +227,6 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | @@ -211,15 +227,6 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | ||
211 | if (!success) { | 227 | if (!success) { |
212 | throw new JeecgBootException("创建入库任务, 任务详情生成失败"); | 228 | throw new JeecgBootException("创建入库任务, 任务详情生成失败"); |
213 | } | 229 | } |
214 | -// if (receiptContainerHeader.getTaskType() == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) { | ||
215 | -// // 如果是空托盘,那么不需要更新库存 | ||
216 | -// if (!containerFillStatus.equals(QuantityConstant.STATUS_CONTAINER_FILL_EMPTY)) { | ||
217 | -// success = inventoryHeaderService.updateInventoryContainerStatusByContainerCode(containerCode, warehouseCode); | ||
218 | -// if (!success) { | ||
219 | -// throw new JeecgBootException("创建入库任务, 更新库存头失败"); | ||
220 | -// } | ||
221 | -// } | ||
222 | -// } | ||
223 | success = receiptContainerHeaderService.updateToPortAndStatus(receiptContainerHeader.getToPort(), QuantityConstant.RECEIPT_CONTAINER_TASK, | 230 | success = receiptContainerHeaderService.updateToPortAndStatus(receiptContainerHeader.getToPort(), QuantityConstant.RECEIPT_CONTAINER_TASK, |
224 | receiptContainerHeader.getId()); | 231 | receiptContainerHeader.getId()); |
225 | if (!success) { | 232 | if (!success) { |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
@@ -30,6 +30,7 @@ import org.jeecg.modules.wms.receipt.receiving.service.IReceiveService; | @@ -30,6 +30,7 @@ import org.jeecg.modules.wms.receipt.receiving.service.IReceiveService; | ||
30 | import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader; | 30 | import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader; |
31 | import org.jeecg.modules.wms.shipment.shipmentContainerHeader.service.IShipmentContainerHeaderService; | 31 | import org.jeecg.modules.wms.shipment.shipmentContainerHeader.service.IShipmentContainerHeaderService; |
32 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; | 32 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
33 | +import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; | ||
33 | import org.jeecg.utils.StringUtils; | 34 | import org.jeecg.utils.StringUtils; |
34 | import org.jeecg.utils.constant.QuantityConstant; | 35 | import org.jeecg.utils.constant.QuantityConstant; |
35 | import org.springframework.stereotype.Service; | 36 | import org.springframework.stereotype.Service; |
@@ -79,6 +80,8 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -79,6 +80,8 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
79 | private IReceiveService receiveService; | 80 | private IReceiveService receiveService; |
80 | @Resource | 81 | @Resource |
81 | private IShipmentContainerHeaderService shipmentContainerHeaderService; | 82 | private IShipmentContainerHeaderService shipmentContainerHeaderService; |
83 | + @Resource | ||
84 | + private ITaskHeaderService taskHeaderService; | ||
82 | 85 | ||
83 | /** | 86 | /** |
84 | * 组盘后自动生成任务,返回任务实体 | 87 | * 组盘后自动生成任务,返回任务实体 |
@@ -124,13 +127,21 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -124,13 +127,21 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
124 | if (container == null) { | 127 | if (container == null) { |
125 | return Result.error("入库组盘,根据容器编码 " + containerCode + ", 没有找到容器"); | 128 | return Result.error("入库组盘,根据容器编码 " + containerCode + ", 没有找到容器"); |
126 | } | 129 | } |
127 | - String containerStatus = container.getStatus(); | ||
128 | - if (containerStatus.equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { | ||
129 | - return Result.error("入库组盘,容器被锁定不能用于收货" + containerCode); | 130 | + int callBox = QuantityConstant.NOT_CALL_BOX; |
131 | + TaskHeader callBoxTask = taskHeaderService.getUnCompleteTaskByContainerCode(containerCode, warehouseCode); | ||
132 | + if (callBoxTask != null) { | ||
133 | + callBox = callBoxTask.getCallBox(); | ||
130 | } | 134 | } |
131 | - String containerFillStatus = container.getFillStatus(); | ||
132 | - if (!StringUtils.isEmpty(containerFillStatus) && containerFillStatus.equals(QuantityConstant.STATUS_CONTAINER_FILL_FULL)) { | ||
133 | - return Result.error("入库组盘,容器已经是满盘不能用于收货" + containerCode); | 135 | + // 如果不是呼叫料盒,那么要判断容器状态 |
136 | + if (callBox == QuantityConstant.NOT_CALL_BOX) { | ||
137 | + String containerStatus = container.getStatus(); | ||
138 | + if (containerStatus.equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { | ||
139 | + return Result.error("入库组盘,容器被锁定不能用于收货" + containerCode); | ||
140 | + } | ||
141 | + String containerFillStatus = container.getFillStatus(); | ||
142 | + if (!StringUtils.isEmpty(containerFillStatus) && containerFillStatus.equals(QuantityConstant.STATUS_CONTAINER_FILL_FULL)) { | ||
143 | + return Result.error("入库组盘,容器已经是满盘不能用于收货" + containerCode); | ||
144 | + } | ||
134 | } | 145 | } |
135 | String containerTypeCode = container.getContainerTypeCode(); | 146 | String containerTypeCode = container.getContainerTypeCode(); |
136 | if (StringUtils.isEmpty(containerTypeCode)) { | 147 | if (StringUtils.isEmpty(containerTypeCode)) { |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/controller/ShipmentHeaderController.java
@@ -393,7 +393,7 @@ public class ShipmentHeaderController extends JeecgController<ShipmentHeader, IS | @@ -393,7 +393,7 @@ public class ShipmentHeaderController extends JeecgController<ShipmentHeader, IS | ||
393 | @ApiLogger(apiName = "PDA出库-呼叫料盒", from = "PDA") | 393 | @ApiLogger(apiName = "PDA出库-呼叫料盒", from = "PDA") |
394 | public Result<TaskHeader> callBox(@RequestBody CallBoxBean bean, HttpServletRequest req) { | 394 | public Result<TaskHeader> callBox(@RequestBody CallBoxBean bean, HttpServletRequest req) { |
395 | String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); | 395 | String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); |
396 | - // 补充入库类型 | 396 | + // 分拣出库类型 |
397 | bean.setType(QuantityConstant.TASK_TYPE_SORTINGSHIPMENT); | 397 | bean.setType(QuantityConstant.TASK_TYPE_SORTINGSHIPMENT); |
398 | Result result = huahengMultiHandlerService.callBox(bean, warehouseCode); | 398 | Result result = huahengMultiHandlerService.callBox(bean, warehouseCode); |
399 | return result; | 399 | return result; |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentHeaderServiceImpl.java
@@ -360,7 +360,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | @@ -360,7 +360,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | ||
360 | } | 360 | } |
361 | Port port = portService.getPortByCode(toPort, warehouseCode); | 361 | Port port = portService.getPortByCode(toPort, warehouseCode); |
362 | if (port == null) { | 362 | if (port == null) { |
363 | - return Result.error("自动出库, 出库口为空"); | 363 | + return Result.error("自动出库, 没有找到出库口"); |
364 | } | 364 | } |
365 | int type = Integer.parseInt(port.getType()); | 365 | int type = Integer.parseInt(port.getType()); |
366 | if (type == QuantityConstant.PORT_TYPE_IN) { | 366 | if (type == QuantityConstant.PORT_TYPE_IN) { |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskHeader.java
@@ -144,6 +144,8 @@ public class TaskHeader implements Serializable { | @@ -144,6 +144,8 @@ public class TaskHeader implements Serializable { | ||
144 | private Integer exceptionState; | 144 | private Integer exceptionState; |
145 | @ApiModelProperty(value = "巷道") | 145 | @ApiModelProperty(value = "巷道") |
146 | private Integer roadWay; | 146 | private Integer roadWay; |
147 | + @ApiModelProperty(value = "呼叫料盒") | ||
148 | + private Integer callBox; | ||
147 | /** 备用字段1 */ | 149 | /** 备用字段1 */ |
148 | @Excel(name = "备用字段1", width = 15) | 150 | @Excel(name = "备用字段1", width = 15) |
149 | @ApiModelProperty(value = "备用字段1") | 151 | @ApiModelProperty(value = "备用字段1") |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -1077,7 +1077,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1077,7 +1077,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1077 | inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); | 1077 | inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); |
1078 | inventoryHeader.setEnable(QuantityConstant.STATUS_ENABLE); | 1078 | inventoryHeader.setEnable(QuantityConstant.STATUS_ENABLE); |
1079 | if (!inventoryHeaderService.save(inventoryHeader)) { | 1079 | if (!inventoryHeaderService.save(inventoryHeader)) { |
1080 | - throw new JeecgBootException("添加库存头失败"); | 1080 | + throw new JeecgBootException("完成入库任务时, 添加库存头失败"); |
1081 | } | 1081 | } |
1082 | } | 1082 | } |
1083 | 1083 | ||
@@ -1410,6 +1410,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1410,6 +1410,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1410 | if (!result.isSuccess()) { | 1410 | if (!result.isSuccess()) { |
1411 | throw new JeecgBootException(result.getMessage()); | 1411 | throw new JeecgBootException(result.getMessage()); |
1412 | } | 1412 | } |
1413 | + success = | ||
1414 | + inventoryHeaderService.updateInventory(inventoryHeader.getId(), inventoryDetailList, QuantityConstant.STATUS_CONTAINER_EMPTY, zoneCode, toLocationCode); | ||
1415 | + if (!success) { | ||
1416 | + throw new JeecgBootException("完成出库任务,更新库存状态失败"); | ||
1417 | + } | ||
1413 | success = taskHeaderService.updateStatusById(QuantityConstant.TASK_STATUS_COMPLETED, taskHeader.getId()); | 1418 | success = taskHeaderService.updateStatusById(QuantityConstant.TASK_STATUS_COMPLETED, taskHeader.getId()); |
1414 | if (!success) { | 1419 | if (!success) { |
1415 | throw new JeecgBootException("完成出库任务,保存任务头失败"); | 1420 | throw new JeecgBootException("完成出库任务,保存任务头失败"); |
@@ -2603,9 +2608,12 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -2603,9 +2608,12 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
2603 | @Transactional(rollbackFor = Exception.class) | 2608 | @Transactional(rollbackFor = Exception.class) |
2604 | public Result cancelReceiptTask(TaskHeader taskHeader) { | 2609 | public Result cancelReceiptTask(TaskHeader taskHeader) { |
2605 | log.info("开始取消入库任务"); | 2610 | log.info("开始取消入库任务"); |
2606 | - boolean success = receiptContainerHeaderService.cancelReceiptTask(taskHeader); | ||
2607 | - if (!success) { | ||
2608 | - throw new JeecgBootException("取消入库任务时, 更新组盘头状态失败"); | 2611 | + int callBox = taskHeader.getCallBox(); |
2612 | + if (callBox == QuantityConstant.NOT_CALL_BOX) { | ||
2613 | + boolean success = receiptContainerHeaderService.cancelReceiptTask(taskHeader); | ||
2614 | + if (!success) { | ||
2615 | + throw new JeecgBootException("取消入库任务时, 更新组盘头状态失败"); | ||
2616 | + } | ||
2609 | } | 2617 | } |
2610 | log.info("完成取消入库任务"); | 2618 | log.info("完成取消入库任务"); |
2611 | return Result.ok("取消入库任务成功"); | 2619 | return Result.ok("取消入库任务成功"); |
@@ -2619,10 +2627,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -2619,10 +2627,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
2619 | @Override | 2627 | @Override |
2620 | @Transactional(rollbackFor = Exception.class) | 2628 | @Transactional(rollbackFor = Exception.class) |
2621 | public Result cancelShipmentTask(TaskHeader taskHeader) { | 2629 | public Result cancelShipmentTask(TaskHeader taskHeader) { |
2622 | - boolean success = shipmentContainerHeaderService.cancelShipmentTask(taskHeader); | ||
2623 | - if (!success) { | ||
2624 | - throw new JeecgBootException("取消出库任务时, 更新组盘头状态失败"); | 2630 | + log.info("开始取消出库任务"); |
2631 | + int callBox = taskHeader.getCallBox(); | ||
2632 | + if (callBox == QuantityConstant.NOT_CALL_BOX) { | ||
2633 | + boolean success = shipmentContainerHeaderService.cancelShipmentTask(taskHeader); | ||
2634 | + if (!success) { | ||
2635 | + throw new JeecgBootException("取消出库任务时, 更新组盘头状态失败"); | ||
2636 | + } | ||
2625 | } | 2637 | } |
2638 | + log.info("完成取消出库任务"); | ||
2626 | return Result.ok("取消出库任务成功"); | 2639 | return Result.ok("取消出库任务成功"); |
2627 | } | 2640 | } |
2628 | 2641 |
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
@@ -29,7 +29,7 @@ public class QuantityConstant { | @@ -29,7 +29,7 @@ public class QuantityConstant { | ||
29 | // 等待审核 | 29 | // 等待审核 |
30 | public static final Integer RECEIPT_HEADER_VERIFYING = 10; | 30 | public static final Integer RECEIPT_HEADER_VERIFYING = 10; |
31 | 31 | ||
32 | - //审核完成 | 32 | + // 审核完成 |
33 | public static final Integer RECEIPT_HEADER_FINSH = 15; | 33 | public static final Integer RECEIPT_HEADER_FINSH = 15; |
34 | 34 | ||
35 | // 驳回 | 35 | // 驳回 |
@@ -79,7 +79,7 @@ public class QuantityConstant { | @@ -79,7 +79,7 @@ public class QuantityConstant { | ||
79 | // 等待审核 | 79 | // 等待审核 |
80 | public static final Integer SHIPMENT_HEADER_VERIFYING = 10; | 80 | public static final Integer SHIPMENT_HEADER_VERIFYING = 10; |
81 | 81 | ||
82 | - //审核完成 | 82 | + // 审核完成 |
83 | public static final Integer SHIPMENT_HEADER_FINSH = 15; | 83 | public static final Integer SHIPMENT_HEADER_FINSH = 15; |
84 | 84 | ||
85 | // 驳回 | 85 | // 驳回 |
@@ -108,7 +108,7 @@ public class QuantityConstant { | @@ -108,7 +108,7 @@ public class QuantityConstant { | ||
108 | 108 | ||
109 | // 过账 | 109 | // 过账 |
110 | public static final Integer SHIPMENT_HEADER_COMPLETED = 800; | 110 | public static final Integer SHIPMENT_HEADER_COMPLETED = 800; |
111 | - | 111 | + |
112 | // 已合并 | 112 | // 已合并 |
113 | public static final Integer SHIPMENT_HEADER_MERGED = 810; | 113 | public static final Integer SHIPMENT_HEADER_MERGED = 810; |
114 | 114 | ||
@@ -391,13 +391,11 @@ public class QuantityConstant { | @@ -391,13 +391,11 @@ public class QuantityConstant { | ||
391 | // 出库单审核流程 | 391 | // 出库单审核流程 |
392 | public static final Integer SHIPMENT_AUDIT = 2; | 392 | public static final Integer SHIPMENT_AUDIT = 2; |
393 | 393 | ||
394 | - //审核通过 | 394 | + // 审核通过 |
395 | public static final Integer AUDIT_YES_STATUS = 1; | 395 | public static final Integer AUDIT_YES_STATUS = 1; |
396 | - //审核驳回 | 396 | + // 审核驳回 |
397 | public static final Integer AUDIT_NO_STATUS = 2; | 397 | public static final Integer AUDIT_NO_STATUS = 2; |
398 | 398 | ||
399 | - | ||
400 | - | ||
401 | // WCS库位信息查询 | 399 | // WCS库位信息查询 |
402 | public static final String ADDRESS_WCS_LOCATION_INFO = "WCS_LOCATION_INFO"; | 400 | public static final String ADDRESS_WCS_LOCATION_INFO = "WCS_LOCATION_INFO"; |
403 | 401 | ||
@@ -619,7 +617,10 @@ public class QuantityConstant { | @@ -619,7 +617,10 @@ public class QuantityConstant { | ||
619 | * 受控,受控的库存详情不能出库 | 617 | * 受控,受控的库存详情不能出库 |
620 | */ | 618 | */ |
621 | public static final int CONTROLLER_ENABLE = 1; | 619 | public static final int CONTROLLER_ENABLE = 1; |
622 | - | 620 | + |
621 | + public static final int NOT_CALL_BOX = 0; | ||
622 | + public static final int CALL_BOX = 1; | ||
623 | + | ||
623 | /** 默认库区编码 */ | 624 | /** 默认库区编码 */ |
624 | public static final String DEFAULT_ZONE_CODE = "Default"; | 625 | public static final String DEFAULT_ZONE_CODE = "Default"; |
625 | } | 626 | } |