From 33b5b3d2fb2b41cdce6e4cb783f27ee70ad3afb8 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 07 八月 2025 18:10:16 +0800
Subject: [PATCH] 生成出库单功能优化
---
zy-asrs-admin/src/components/orderOut/orderOutWavePreview/index.vue | 91 ++++++++++++++++++++++++++++++++-------------
1 files changed, 64 insertions(+), 27 deletions(-)
diff --git a/zy-asrs-admin/src/components/orderOut/orderOutWavePreview/index.vue b/zy-asrs-admin/src/components/orderOut/orderOutWavePreview/index.vue
index 6cc1d8a..e5b98f8 100644
--- a/zy-asrs-admin/src/components/orderOut/orderOutWavePreview/index.vue
+++ b/zy-asrs-admin/src/components/orderOut/orderOutWavePreview/index.vue
@@ -61,6 +61,16 @@
return customColSpanProps(index)
},
},
+ {
+ title: '搴撲綅绫诲瀷',
+ dataIndex: 'type',
+ width: 110,
+ ellipsis: true,
+ ...getColumnSearchProps('type'),
+ customCell: (_, index) => {
+ return customColSpanProps(index)
+ },
+ }
];
const state = reactive({
@@ -102,11 +112,10 @@
tmp.push({
title: formatMessage('db.man_order_detl.anfme', '鏁伴噺'),
dataIndex: 'anfme',
- width: 140,
+ width: 60,
ellipsis: true,
fixed: 'right',
})
-
tmp.push({
title: formatMessage('db.man_order_detl.locNo', '鍑哄簱搴撲綅'),
dataIndex: 'locNo',
@@ -165,17 +174,37 @@
list: tableData.value
};
- post('/api/out/orderOut/merge/wave', requestParam).then((resp) => {
- let result = resp.data;
- if (result.code == 200) {
- message.success(formatMessage('page.add.success', '鍑哄簱鎴愬姛'));
- open.value = false;
- emit('closeParent', true)
- emit('reload', true)
- } else {
- message.error(result.msg);
- }
- })
+ let locs = tableData.value.filter(item => item.locId == null && item.locs.length < 1);
+ if (locs != null && locs.length > 0) {
+ message.error("鐗╂枡搴撳瓨涓嶈冻锛屾棤娉曠敓鎴愬嚭搴撲换鍔� 锛侊紒");
+ return
+ }
+
+ Modal.confirm({
+ title: formatMessage('page.cancel', '鍙栨秷'),
+ content: formatMessage('page.cancel.confirm', '纭畾鐢熸垚鍑哄簱浠诲姟鍚楋紵'),
+ maskClosable: true,
+ onOk: async () => {
+ const hide = message.loading(formatMessage('common.loading', '璇锋眰涓�'));
+ try {
+ post('/api/out/orderOut/merge/wave', requestParam).then((resp) => {
+ let result = resp.data;
+ if (result.code == 200) {
+ message.success(formatMessage('page.add.success', '鍑哄簱鎴愬姛'));
+ open.value = false;
+ emit('closeParent', true)
+ emit('reload', true)
+ } else {
+ message.error(result.msg);
+ }
+ })
+ } catch (error) {
+ message.error(formatMessage('common.fail', '璇锋眰澶辫触'));
+ }
+ },
+ });
+
+
}
const handleOrderMergePreview = async () => {
@@ -212,6 +241,8 @@
dataTmp.locNo = null;
dataTmp.locDetlId = null;
dataTmp.anfme = item.anfme;
+ dataTmp.typeId = item.typeId;
+ dataTmp.workQty = item.workQty;
dataTmp.key = idx;
dataTmp.operationPort = defaultOperationPort;
@@ -232,6 +263,8 @@
dataTmp.locId = val.locId;
dataTmp.locNo = val.locNo;
dataTmp.locDetlId = val.locDetlId;
+ dataTmp.typeId = val.typeId;
+ dataTmp.workQty = val.workQty;
dataTmp.anfme = anfme;
dataTmp.key = idx;
dataTmp.operationPort = defaultOperationPort;
@@ -239,18 +272,20 @@
tableDataTmp.push(dataTmp);
}
- if (isused > 0) {
- let dataTmp = JSON.parse(JSON.stringify(item));
- dataTmp.locId = null;
- dataTmp.locNo = null;
- dataTmp.locDetlId = null;
- dataTmp.anfme = isused;
- dataTmp.key = idx;
- dataTmp.operationPort = defaultOperationPort;
+ // if (isused > 0) {
+ // let dataTmp = JSON.parse(JSON.stringify(item));
+ // dataTmp.locId = null;
+ // dataTmp.locNo = null;
+ // dataTmp.locDetlId = null;
+ // dataTmp.typeId = item.typeId;
+ // dataTmp.workQty = item.workQty;
+ // dataTmp.anfme = isused;
+ // dataTmp.key = idx;
+ // dataTmp.operationPort = defaultOperationPort;
- tableDataTmp.push(dataTmp);
- count++;
- }
+ // tableDataTmp.push(dataTmp);
+ // count++;
+ // }
}
colSpan[idx] = count;
@@ -338,10 +373,12 @@
<template #bodyCell="{ column, text, record, index }">
<template v-if="column.dataIndex === 'locNo'">
<div v-if="record.locId != null && record.anfme > 0">
- <!-- <a-tag color="green">{{ record.locNo }}</a-tag> -->
- <a-select v-model:value="record.locId" :options="record.otherLocs"
+ <!-- <a-tag color="green">{{ record.locNo }}</a-tag>-->
+ <a-select v-model:value="record.locNo" :options="record.otherLocs"
:fieldNames="{ label: 'locNo', value: 'locId' }"
- @change="handleOtherLocChange(index, record)"></a-select>
+ @change="handleOtherLocChange(index, record)">
+
+ </a-select>
</div>
<div v-else>
<a-tag color="red">搴撳瓨涓嶈冻</a-tag>
--
Gitblit v1.9.1