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 ++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 46 insertions(+), 2 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>

--
Gitblit v1.9.1