Commit f6f3c5c487ed5f48b3f59e46ca2473ba632a0e24
1 parent
2b384db9
去掉完成按钮,后续完成任务 走接口
Showing
8 changed files
with
91 additions
and
83 deletions
ant-design-vue-jeecg/src/views/system/task/AgvTaskList.vue
... | ... | @@ -105,7 +105,6 @@ |
105 | 105 | <a-popconfirm v-if="record.status < 100" title="确定删除吗?" v-has="'agvTask:delete'" @confirm="() => handleDelete(record.id)"> |
106 | 106 | <a>删除 <a-divider type="vertical"/></a> |
107 | 107 | </a-popconfirm> |
108 | - <a v-if="record.status < 100" v-has="'agvTask:completeTask'" @click="completeAgvTask(record)">完成<a-divider type="vertical"/></a> | |
109 | 108 | <a-dropdown> |
110 | 109 | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
111 | 110 | <a-menu slot="overlay"> |
... | ... |
ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue
... | ... | @@ -164,7 +164,6 @@ |
164 | 164 | <a v-if="record.isDoubleIn == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleDoubleInTask(record)">修复重入数据 |
165 | 165 | <a-divider type="vertical"/></a> |
166 | 166 | <a v-if="record.status < 100" v-has="'taskHeader:cancelTask'" @click="cancelTask(record)">取消<a-divider type="vertical"/></a> |
167 | - <a v-if="record.status < 100" v-has="'taskHeader:completeTask'" @click="completeTask(record)">完成<a-divider type="vertical"/></a> | |
168 | 167 | <a-dropdown> |
169 | 168 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
170 | 169 | <a-menu slot="overlay"> |
... | ... | @@ -406,19 +405,6 @@ export default { |
406 | 405 | }) |
407 | 406 | return actions.join('') |
408 | 407 | }, |
409 | - completeTask(record) { | |
410 | - this.loading = true; | |
411 | - this.model = Object.assign({}, record); | |
412 | - completeTaskByWMS(this.model).then((res) => { | |
413 | - this.loading = false; | |
414 | - if (res.success) { | |
415 | - this.$message.success(res.message); | |
416 | - } else { | |
417 | - this.$message.error(res.message); | |
418 | - } | |
419 | - this.searchQuery(); | |
420 | - }); | |
421 | - }, | |
422 | 408 | cancelTask(record) { |
423 | 409 | this.loading = true; |
424 | 410 | this.model = Object.assign({}, record); |
... | ... |
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
... | ... | @@ -158,7 +158,6 @@ |
158 | 158 | <a v-if="record.isDoubleIn == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleDoubleInTask(record)">修复重入数据 |
159 | 159 | <a-divider type="vertical"/></a> |
160 | 160 | <a v-if="record.status < 100" v-has="'taskHeader:cancelTask'" @click="cancelTask(record)">取消<a-divider type="vertical"/></a> |
161 | - <a v-if="record.status < 100" v-has="'taskHeader:completeTask'" @click="completeTask(record)">完成<a-divider type="vertical"/></a> | |
162 | 161 | <a-dropdown> |
163 | 162 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
164 | 163 | <a-menu slot="overlay"> |
... | ... | @@ -407,7 +406,6 @@ export default { |
407 | 406 | cancelTask(record) { |
408 | 407 | this.loading = true; |
409 | 408 | this.model = Object.assign({}, record); |
410 | - console.log() | |
411 | 409 | cancelTask(this.model.id).then((res) => { |
412 | 410 | this.loading = false; |
413 | 411 | if (res.success) { |
... | ... | @@ -418,19 +416,6 @@ export default { |
418 | 416 | this.searchQuery(); |
419 | 417 | }); |
420 | 418 | }, |
421 | - completeTask(record) { | |
422 | - this.loading = true; | |
423 | - this.model = Object.assign({}, record); | |
424 | - completeTaskByWMS(this.model).then((res) => { | |
425 | - this.loading = false; | |
426 | - if (res.success) { | |
427 | - this.$message.success(res.message); | |
428 | - } else { | |
429 | - this.$message.error(res.message); | |
430 | - } | |
431 | - this.searchQuery(); | |
432 | - }); | |
433 | - }, | |
434 | 419 | executeTask(record) { |
435 | 420 | this.loading = true; |
436 | 421 | this.model = Object.assign({}, record); |
... | ... |
ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
... | ... | @@ -161,8 +161,6 @@ |
161 | 161 | <a-divider type="vertical"/></a> |
162 | 162 | <a v-if="record.status < 100" v-has="'taskHeader:cancelTask'" @click="cancelTask(record)">取消 |
163 | 163 | <a-divider type="vertical"/></a> |
164 | - <a v-if="record.status < 100" v-has="'taskHeader:completeTask'" @click="completeTask(record)">完成 | |
165 | - <a-divider type="vertical"/></a> | |
166 | 164 | <a-dropdown> |
167 | 165 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
168 | 166 | <a-menu slot="overlay"> |
... | ... | @@ -421,19 +419,6 @@ export default { |
421 | 419 | this.searchQuery(); |
422 | 420 | }); |
423 | 421 | }, |
424 | - completeTask(record) { | |
425 | - this.loading = true; | |
426 | - this.model = Object.assign({}, record); | |
427 | - completeTaskByWMS(this.model).then((res) => { | |
428 | - this.loading = false; | |
429 | - if (res.success) { | |
430 | - this.$message.success(res.message); | |
431 | - } else { | |
432 | - this.$message.error(res.message); | |
433 | - } | |
434 | - this.searchQuery(); | |
435 | - }); | |
436 | - }, | |
437 | 422 | executeTask(record) { |
438 | 423 | this.loading = true; |
439 | 424 | this.model = Object.assign({}, record); |
... | ... |
ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue
... | ... | @@ -157,7 +157,13 @@ |
157 | 157 | |
158 | 158 | <span slot="action" slot-scope="text, record"> |
159 | 159 | <a v-if="record.status == 1" v-has="'taskHeader:executeTask'" @click="executeTask(record)">执行<a-divider type="vertical"/></a> |
160 | - <a v-if="record.status < 100" v-has="'taskHeader:completeTask'" @click="completeTask(record)">完成<a-divider type="vertical"/></a> | |
160 | + <a v-if="record.isEmptyOut == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleEmptyOutTask(record)">修复空出数据 | |
161 | + <a-divider type="vertical"/></a> | |
162 | + <a v-if="record.isPickupError == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handlePickupErrorTask(record)">修复取货错数据 | |
163 | + <a-divider type="vertical"/></a> | |
164 | + <a v-if="record.isDoubleIn == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleDoubleInTask(record)">修复重入数据 | |
165 | + <a-divider type="vertical"/></a> | |
166 | + <a v-if="record.status < 100" v-has="'taskHeader:cancelTask'" @click="cancelTask(record)">取消<a-divider type="vertical"/></a> | |
161 | 167 | <a-dropdown> |
162 | 168 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
163 | 169 | <a-menu slot="overlay"> |
... | ... | @@ -196,7 +202,7 @@ import {getAction} from '@/api/manage' |
196 | 202 | import TaskDetailList from './TaskDetailList' |
197 | 203 | import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
198 | 204 | import '@/assets/less/TableExpand.less' |
199 | -import {completeTaskByWMS} from '@/api/api' | |
205 | +import {cancelTask, completeTaskByWMS, handleDoubleIn, handleEmptyOut, handlePickupError} from '@/api/api' | |
200 | 206 | import {execute} from '@/api/api' |
201 | 207 | import {getZoneList} from '@/api/api' |
202 | 208 | import EmptyInTaskModal from './modules/EmptyInTaskModal' |
... | ... | @@ -410,10 +416,10 @@ export default { |
410 | 416 | }) |
411 | 417 | return actions.join('') |
412 | 418 | }, |
413 | - completeTask(record) { | |
419 | + cancelTask(record) { | |
414 | 420 | this.loading = true; |
415 | 421 | this.model = Object.assign({}, record); |
416 | - completeTaskByWMS(this.model).then((res) => { | |
422 | + cancelTask(this.model.id).then((res) => { | |
417 | 423 | this.loading = false; |
418 | 424 | if (res.success) { |
419 | 425 | this.$message.success(res.message); |
... | ... | @@ -436,6 +442,45 @@ export default { |
436 | 442 | this.searchQuery(); |
437 | 443 | }); |
438 | 444 | }, |
445 | + handleEmptyOutTask(record) { | |
446 | + this.loading = true; | |
447 | + this.model = Object.assign({}, record); | |
448 | + handleEmptyOut(this.model.id).then((res) => { | |
449 | + this.loading = false; | |
450 | + if (res.success) { | |
451 | + this.$message.success(res.message); | |
452 | + } else { | |
453 | + this.$message.error(res.message); | |
454 | + } | |
455 | + this.searchQuery(); | |
456 | + }); | |
457 | + }, | |
458 | + handlePickupErrorTask(record) { | |
459 | + this.loading = true; | |
460 | + this.model = Object.assign({}, record); | |
461 | + handlePickupError(this.model.id).then((res) => { | |
462 | + this.loading = false; | |
463 | + if (res.success) { | |
464 | + this.$message.success(res.message); | |
465 | + } else { | |
466 | + this.$message.error(res.message); | |
467 | + } | |
468 | + this.searchQuery(); | |
469 | + }); | |
470 | + }, | |
471 | + handleDoubleInTask(record) { | |
472 | + this.loading = true; | |
473 | + this.model = Object.assign({}, record); | |
474 | + handleDoubleIn(this.model.id).then((res) => { | |
475 | + this.loading = false; | |
476 | + if (res.success) { | |
477 | + this.$message.success(res.message); | |
478 | + } else { | |
479 | + this.$message.error(res.message); | |
480 | + } | |
481 | + this.searchQuery(); | |
482 | + }); | |
483 | + }, | |
439 | 484 | getSuperFieldList() { |
440 | 485 | let fieldList = []; |
441 | 486 | fieldList.push({type: 'int', value: 'taskType', text: '任务类型', dictCode: 'task_type'}) |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java
... | ... | @@ -10,6 +10,7 @@ import java.util.List; |
10 | 10 | import javax.annotation.Resource; |
11 | 11 | |
12 | 12 | import org.jeecg.common.api.vo.Result; |
13 | +import org.jeecg.common.exception.JeecgBootException; | |
13 | 14 | import org.jeecg.modules.wms.config.receiptType.entity.ReceiptType; |
14 | 15 | import org.jeecg.modules.wms.config.receiptType.service.IReceiptTypeService; |
15 | 16 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail; |
... | ... | @@ -25,7 +26,6 @@ import org.springframework.beans.factory.annotation.Autowired; |
25 | 26 | import org.springframework.stereotype.Service; |
26 | 27 | import org.springframework.transaction.annotation.Transactional; |
27 | 28 | |
28 | -import org.jeecg.common.exception.JeecgBootException; | |
29 | 29 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
30 | 30 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
31 | 31 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
... | ... | @@ -56,8 +56,8 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R |
56 | 56 | private IReceiptHeaderHistoryService receiptHeaderHistoryService; |
57 | 57 | |
58 | 58 | /** |
59 | - * @param id 入库单主表id | |
60 | - * @param reason 进入历史单据的原因 | |
59 | + * @param id 入库单主表id | |
60 | + * @param reason 进入历史单据的原因 | |
61 | 61 | * @return |
62 | 62 | */ |
63 | 63 | @Override |
... | ... | @@ -86,15 +86,23 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R |
86 | 86 | |
87 | 87 | @Override |
88 | 88 | @Transactional |
89 | - @OperationLog(bizId = "#receiptHeader.getCode()", bizType = "'入库单追踪'", tag = "'入库单新增'", | |
90 | - msg = "'上游单号:'+ #receiptHeader.getReferCode() + ',仓库编码:' + #receiptHeader.getWarehouseCode()", recordReturnValue = true) | |
89 | + @OperationLog(bizId = "#receiptHeader.getCode()", bizType = "'入库单追踪'", tag = "'入库单新增'", | |
90 | + msg = "'上游单号:'+ #receiptHeader.getReferCode() + ',仓库编码:' + #receiptHeader.getWarehouseCode()", recordReturnValue = true) | |
91 | 91 | public Result<ReceiptHeader> saveReceiptHeader(ReceiptHeader receiptHeader) { |
92 | + String warehouseCode = receiptHeader.getWarehouseCode(); | |
92 | 93 | LambdaQueryWrapper<ReceiptType> lambdaQueryWrapper = Wrappers.lambdaQuery(); |
93 | - lambdaQueryWrapper.eq(ReceiptType::getCode, receiptHeader.getType()).eq(ReceiptType::getWarehouseCode, receiptHeader.getWarehouseCode()); | |
94 | + lambdaQueryWrapper.eq(ReceiptType::getCode, receiptHeader.getType()).eq(ReceiptType::getWarehouseCode, warehouseCode); | |
94 | 95 | ReceiptType receiptType = receiptTypeService.getOne(lambdaQueryWrapper); |
95 | 96 | if (receiptType == null) { |
96 | 97 | return Result.error("没有找到对应入库单类型"); |
97 | 98 | } |
99 | + String referCode = receiptHeader.getReferCode(); | |
100 | + if (StringUtils.isNotEmpty(referCode)) { | |
101 | + ReceiptHeader referReceiptHeader = getReceiptHeaderByReferCode(referCode, warehouseCode); | |
102 | + if (referReceiptHeader != null) { | |
103 | + return Result.error("上游单号" + referCode + ",已经存在"); | |
104 | + } | |
105 | + } | |
98 | 106 | String code = createCode(receiptHeader.getType()); |
99 | 107 | if (StringUtils.isEmpty(code)) { |
100 | 108 | throw new JeecgBootException("根据入库单据类型" + receiptHeader.getType() + "生成单号失败"); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentHeaderServiceImpl.java
1 | 1 | package org.jeecg.modules.wms.shipment.shipmentHeader.service.impl; |
2 | 2 | |
3 | -import org.jeecg.common.exception.JeecgBootException; | |
4 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
5 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
3 | +import java.io.Serializable; | |
4 | +import java.math.BigDecimal; | |
5 | +import java.text.SimpleDateFormat; | |
6 | +import java.util.Collection; | |
7 | +import java.util.Date; | |
8 | +import java.util.List; | |
9 | + | |
10 | +import javax.annotation.Resource; | |
11 | + | |
6 | 12 | import org.jeecg.common.api.vo.Result; |
7 | -import org.jeecg.modules.wms.config.container.entity.Container; | |
13 | +import org.jeecg.common.exception.JeecgBootException; | |
8 | 14 | import org.jeecg.modules.wms.config.container.service.IContainerService; |
9 | -import org.jeecg.modules.wms.config.location.entity.Location; | |
10 | 15 | import org.jeecg.modules.wms.config.location.service.ILocationService; |
11 | 16 | import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService; |
12 | -import org.jeecg.modules.wms.config.receiptType.entity.ReceiptType; | |
13 | 17 | import org.jeecg.modules.wms.config.shipmentType.entity.ShipmentType; |
14 | 18 | import org.jeecg.modules.wms.config.shipmentType.service.IShipmentTypeService; |
15 | -import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; | |
16 | 19 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; |
17 | -import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryHeaderService; | |
18 | -import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | |
19 | -import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerDetail; | |
20 | -import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader; | |
21 | 20 | import org.jeecg.modules.wms.shipment.shipmentContainerHeader.service.IShipmentContainerDetailService; |
22 | -import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; | |
23 | 21 | import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail; |
22 | +import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; | |
24 | 23 | import org.jeecg.modules.wms.shipment.shipmentHeader.mapper.ShipmentDetailMapper; |
25 | 24 | import org.jeecg.modules.wms.shipment.shipmentHeader.mapper.ShipmentHeaderMapper; |
26 | 25 | import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService; |
27 | 26 | import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService; |
28 | 27 | import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.service.IShipmentHeaderHistoryService; |
29 | -import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; | |
30 | 28 | import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; |
31 | 29 | import org.jeecg.utils.StringUtils; |
32 | 30 | import org.jeecg.utils.constant.QuantityConstant; |
31 | +import org.springframework.beans.factory.annotation.Autowired; | |
33 | 32 | import org.springframework.stereotype.Service; |
33 | +import org.springframework.transaction.annotation.Transactional; | |
34 | + | |
35 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
36 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
34 | 37 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
35 | 38 | |
36 | 39 | import cn.monitor4all.logRecord.annotation.OperationLog; |
37 | 40 | import cn.monitor4all.logRecord.context.LogRecordContext; |
38 | 41 | |
39 | -import org.springframework.beans.factory.annotation.Autowired; | |
40 | -import org.springframework.transaction.annotation.Transactional; | |
41 | - | |
42 | -import javax.annotation.Resource; | |
43 | -import java.io.Serializable; | |
44 | -import java.math.BigDecimal; | |
45 | -import java.text.SimpleDateFormat; | |
46 | -import java.util.Date; | |
47 | -import java.util.List; | |
48 | -import java.util.Collection; | |
49 | - | |
50 | 42 | /** |
51 | 43 | * @Description: 出库单 |
52 | 44 | * @Author: jeecg-boot |
... | ... | @@ -111,15 +103,23 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, |
111 | 103 | |
112 | 104 | @Override |
113 | 105 | @Transactional |
114 | - @OperationLog(bizId = "#shipmentHeader.getCode()", bizType = "'出库单追踪'", tag = "'出库单新增'", | |
115 | - msg = "'上游单号:'+ #shipmentHeader.getReferCode() + ',仓库编码:' + #shipmentHeader.getWarehouseCode()", recordReturnValue = true) | |
106 | + @OperationLog(bizId = "#shipmentHeader.getCode()", bizType = "'出库单追踪'", tag = "'出库单新增'", | |
107 | + msg = "'上游单号:'+ #shipmentHeader.getReferCode() + ',仓库编码:' + #shipmentHeader.getWarehouseCode()", recordReturnValue = true) | |
116 | 108 | public Result saveShipmentHeader(ShipmentHeader shipmentHeader) { |
109 | + String warehouseCode = shipmentHeader.getWarehouseCode(); | |
117 | 110 | LambdaQueryWrapper<ShipmentType> lambdaQueryWrapper = Wrappers.lambdaQuery(); |
118 | - lambdaQueryWrapper.eq(ShipmentType::getCode, shipmentHeader.getType()).eq(ShipmentType::getWarehouseCode, shipmentHeader.getWarehouseCode()); | |
111 | + lambdaQueryWrapper.eq(ShipmentType::getCode, shipmentHeader.getType()).eq(ShipmentType::getWarehouseCode, warehouseCode); | |
119 | 112 | ShipmentType shipmentType = shipmentTypeService.getOne(lambdaQueryWrapper); |
120 | 113 | if (shipmentType == null) { |
121 | 114 | return Result.error("没有找到对应出库单类型"); |
122 | 115 | } |
116 | + String referCode = shipmentHeader.getReferCode(); | |
117 | + if (StringUtils.isNotEmpty(referCode)) { | |
118 | + ShipmentHeader referShipmentHeader = getShipmentHeaderByReferCode(referCode, warehouseCode); | |
119 | + if (referShipmentHeader != null) { | |
120 | + return Result.error("上游单号" + referCode + ",已经存在"); | |
121 | + } | |
122 | + } | |
123 | 123 | String code = createCode(shipmentHeader.getType()); |
124 | 124 | if (StringUtils.isEmpty(code)) { |
125 | 125 | throw new JeecgBootException("根据出库单类型" + shipmentHeader.getType() + "生成单号失败"); |
... | ... |