From b7167b9db9209a30ee6e2fe4de85b4da703d100c Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期三, 23 四月 2025 11:09:54 +0800
Subject: [PATCH] Merge branch 'master' of http://101.42.27.146:5001/r/ltkj_peisweb

---
 src/views/hosp/order/index.vue |   67 +++++++++++++++++++++++++++++++--
 1 files changed, 63 insertions(+), 4 deletions(-)

diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue
index 43d26e4..acae123 100644
--- a/src/views/hosp/order/index.vue
+++ b/src/views/hosp/order/index.vue
@@ -161,13 +161,23 @@
     </div>
 
     <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
           type="primary"
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
            :disabled="singles"
+          v-hasPermi="['hosp:order:export']"
+          >瀵煎嚭</el-button
+        >
+      </el-col> -->
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-download"
+          size="mini"
+          @click="exportDialogVisible = true"
           v-hasPermi="['hosp:order:export']"
           >瀵煎嚭</el-button
         >
@@ -1537,6 +1547,21 @@
         <!-- <el-button @click="cancel">鍙� 娑�</el-button> -->
       </div>
     </el-dialog>
+
+    <el-dialog
+      title="璇烽�夋嫨瀵煎嚭鑼冨洿"
+      :visible.sync="exportDialogVisible"
+      width="30%"
+    >
+      <el-radio-group v-model="exportType">
+        <el-radio :label="'0'">褰撳墠椤垫暟鎹�</el-radio>
+        <el-radio :label="'1'">鍏ㄩ儴鏁版嵁</el-radio>
+      </el-radio-group>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="exportDialogVisible = false">鍙栨秷</el-button>
+        <el-button type="primary" @click="confirmExport">纭畾</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -1688,6 +1713,8 @@
       // 鏃ユ湡鑼冨洿
       datetimerange: [],
       marryalls: 0,
+      exportDialogVisible: false, // 鎺у埗寮规
+      exportType: "0", // dqyorqbsj 鐨勫�硷紝榛樿褰撳墠椤�
       // 鏌ヨ鍙傛暟
       queryParams: {
         pageNum: 1,
@@ -3117,10 +3144,27 @@
           this.Projectssopen = false;
         });
     },
-
-    /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
-      console.log(this.queryParams)
+      this.$confirm("璇烽�夋嫨瀵煎嚭鑼冨洿", "瀵煎嚭鏁版嵁", {
+        distinguishCancelAndClose: true,
+        confirmButtonText: "瀵煎嚭鍏ㄩ儴",
+        cancelButtonText: "浠呭鍑哄綋鍓嶉〉",
+        type: "warning",
+      })
+        .then(() => {
+          // 鐢ㄦ埛鐐瑰嚮浜嗏�滃鍑哄叏閮ㄢ��
+          this.exportData(true);
+        })
+        .catch((action) => {
+          if (action === "cancel") {
+            // 鐢ㄦ埛鐐瑰嚮浜嗏�滀粎瀵煎嚭褰撳墠椤碘��
+            this.exportData(false);
+          }
+        });
+    },
+    /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+    /*  handleExport() {
+      console.log(this.queryParams);
       this.download(
         "/hosp/order/exportOrderList",
         {
@@ -3128,6 +3172,21 @@
         },
         `order_${new Date().getTime()}.xlsx`
       );
+    }, */
+    confirmExport() {
+      this.exportDialogVisible = false;
+    
+
+      const exportParams = {
+        ...this.queryParams,
+        dqyorqbsj: this.exportType, // 娣诲姞杩欎釜瀛楁
+      };
+
+      this.download(
+        "/hosp/order/exportOrderList",
+        exportParams,
+        `order_${new Date().getTime()}.xlsx`
+      );
     },
   },
 };

--
Gitblit v1.8.0