From 0ea1110b84334f1ecbd94fef6f4bf60e8d820b9a Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期六, 07 九月 2024 15:59:17 +0800
Subject: [PATCH] #
---
zy-asrs-admin/src/components/orderOut/orderOutBatchPreview/index.vue | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java | 9 ++++++++-
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/dto/OrderOutBatchPreviewDto.java | 2 ++
3 files changed, 56 insertions(+), 3 deletions(-)
diff --git a/zy-asrs-admin/src/components/orderOut/orderOutBatchPreview/index.vue b/zy-asrs-admin/src/components/orderOut/orderOutBatchPreview/index.vue
index 301cca5..1ac9257 100644
--- a/zy-asrs-admin/src/components/orderOut/orderOutBatchPreview/index.vue
+++ b/zy-asrs-admin/src/components/orderOut/orderOutBatchPreview/index.vue
@@ -20,6 +20,7 @@
let currentOrder = ref(null);
let searchInput = ref(null);
let tableData = ref([]);
+const operationPortList = ref([])
const open = ref(false);
const showWidth = ref("60%")
const records = ref([])
@@ -105,6 +106,14 @@
})
tmp.push({
+ title: formatMessage('db.man_order_detl.operationPort', '浣滀笟鍙�'),
+ dataIndex: 'operationPort',
+ width: 140,
+ ellipsis: true,
+ fixed: 'right',
+ })
+
+ tmp.push({
title: '',
dataIndex: 'handleStatus',
width: 100,
@@ -140,16 +149,47 @@
})
}
-const handleOrderOutPreview = () => {
+async function getOperationPort() {
+ let resp = await post('/api/operationPort/list', {})
+ let result = resp.data;
+ if (result.code == 200) {
+ let data = result.data;
+ let tmp = []
+ data.forEach((item) => {
+ tmp.push({
+ label: item.flag,
+ value: item.id
+ })
+ })
+ operationPortList.value = tmp;
+ } else if (result.code === 401) {
+ message.error(result.msg);
+ logout()
+ } else {
+ message.error(result.msg);
+ }
+}
+
+const handleOrderOutPreview = async () => {
+ await getOperationPort();
loading.value = true;
tableData.value = []
+
+ let defaultOperationPort = "";
+ if (operationPortList.value.length > 0) {
+ defaultOperationPort = operationPortList.value[0].value;
+ }
post('/api/out/orderOut/batch/preview', {
orderDetlIds: records.value,
}).then((resp) => {
let result = resp.data;
if (result.code == 200) {
- tableData.value = result.data;
+ let tmp = result.data;
+ tmp.forEach((item) => {
+ item.operationPort = defaultOperationPort;
+ })
+ tableData.value = tmp;
loading.value = false;
}
})
@@ -228,6 +268,10 @@
</div>
</div>
</template>
+
+ <template v-if="column.dataIndex === 'operationPort'">
+ <a-select v-model:value="record.operationPort" :options="operationPortList"></a-select>
+ </template>
</template>
</a-table>
</a-modal>
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/dto/OrderOutBatchPreviewDto.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/dto/OrderOutBatchPreviewDto.java
index e4f3316..b0b5e32 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/dto/OrderOutBatchPreviewDto.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/dto/OrderOutBatchPreviewDto.java
@@ -28,6 +28,8 @@
private Long orderDetlId;
+ private Long operationPort;
+
private List<BatchPreviewOtherLocDto> otherLoc;
public LocDetl getLocDetl$() {
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java
index faa4b8d..f0a908f 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java
@@ -330,6 +330,8 @@
Long locId = entry.getKey();
List<OrderOutBatchPreviewDto> previewDtos = entry.getValue();
Boolean all = outUtils.isAllForPreview(locId, previewDtos);
+ OrderOutBatchPreviewDto previewDto = previewDtos.get(0);
+ Long operationPortId = previewDto.getOperationPort();
Loc loc = locService.getById(locId);
if (loc == null) {
@@ -338,6 +340,11 @@
if (!loc.getLocStsId().equals(LocStsType.F.val())) {
continue;
+ }
+
+ OperationPort operationPort = operationPortService.getById(operationPortId);
+ if (operationPort == null) {
+ throw new CoolException("浣滀笟鍙d笉瀛樺湪");
}
@@ -349,7 +356,7 @@
task.setTaskType(taskType);
task.setIoPri(workService.generateIoPri(taskType));
task.setOriginLoc(loc.getLocNo());
- task.setTargetSite("A");
+ task.setTargetSite(operationPort.getFlag());
task.setBarcode(loc.getBarcode());
boolean res = taskService.save(task);
if (!res) {
--
Gitblit v1.9.1