From 20235a873f123a83f7763c0327e5845caa32c9b9 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期四, 03 四月 2025 16:15:19 +0800
Subject: [PATCH] 入出库订单打印,拣货单打印,搜索条件增加

---
 zy-asrs-admin/src/components/order/order/orderIn.vue |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/zy-asrs-admin/src/components/order/order/orderIn.vue b/zy-asrs-admin/src/components/order/order/orderIn.vue
index a314487..827d393 100644
--- a/zy-asrs-admin/src/components/order/order/orderIn.vue
+++ b/zy-asrs-admin/src/components/order/order/orderIn.vue
@@ -1,5 +1,5 @@
 <script setup>
-import { getCurrentInstance, ref, computed, reactive, defineProps } from 'vue';
+import {getCurrentInstance, ref, computed, reactive, defineProps, nextTick} from 'vue';
 import { useRouter } from "vue-router";
 import { get, post, postBlob, postForm } from '@/utils/request.js'
 import { message, Modal } from 'ant-design-vue';
@@ -8,6 +8,7 @@
 import { formatMessage } from '@/utils/localeUtils.js';
 import useTableSearch from '@/utils/tableUtils.jsx';
 import ShowOrderDetlComponent from '@/components/orderDetl/show.vue';
+import OrderPrint from '@/components/print/orderPrint/index.vue'
 import {
   DownOutlined,
   UploadOutlined,
@@ -216,6 +217,28 @@
   showOrderDetlChild.value.orderId = item.id;
 }
 
+const printChild = ref(null);
+// 鎵撳嵃璁㈠崟
+const handlePrint = async (record) => {
+  let printData = [];
+
+  const resp = await get("/api/orderDetl/orderId/" + record.__v_raw.id, {});
+  let result = resp.data;
+
+  result.data.forEach((item) => {
+    let newItem = {};
+    newItem.matnr = item.mat$.matnr
+    newItem.maktx = item.mat$.maktx
+    newItem.specs = item.mat$.specs
+    newItem.batch = item.batch
+    newItem.anfme = item.anfme
+    printData.push(newItem)
+  })
+  printChild.value.printData = printData;
+  printChild.value.orderNo = record.__v_raw.orderNo
+  printChild.value.open = true;
+}
+
 const handleExport = async (intl) => {
   postBlob('/api/order/export', {
     ioModel: props.ioModel,
@@ -367,6 +390,9 @@
           <div style="display: flex;justify-content: space-evenly;">
             <a-button type="link" primary @click="showDetl(record)">{{ formatMessage('page.order.orderDetl', '璁㈠崟鏄庣粏')
               }}</a-button>
+            <a-button type="link" primary @click="handlePrint(record)">{{ formatMessage('page.order.orderDetl',
+                '鎵撳嵃璁㈠崟')
+              }}</a-button>
             <a-button type="link" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '缂栬緫') }}</a-button>
             <a-button type="link" danger @click="handleDel([record])">{{ formatMessage('page.delete', '鍒犻櫎')
               }}</a-button>
@@ -378,6 +404,7 @@
     <ShowOrderDetlComponent ref="showOrderDetlChild" />
 
   </div>
+  <OrderPrint ref="printChild" />
 </template>
 
 <style></style>

--
Gitblit v1.9.1