From f516f492d09c029e750466ff0f11b8e61e0113e1 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期四, 18 九月 2025 14:40:08 +0800
Subject: [PATCH] 礼品卡包支持二维码

---
 manager/src/views/order/cardPack/cardPack.vue |   71 +++++++++++++++++++++++++++++++++++
 1 files changed, 71 insertions(+), 0 deletions(-)

diff --git a/manager/src/views/order/cardPack/cardPack.vue b/manager/src/views/order/cardPack/cardPack.vue
index ce09c31..8f1a3c8 100644
--- a/manager/src/views/order/cardPack/cardPack.vue
+++ b/manager/src/views/order/cardPack/cardPack.vue
@@ -133,6 +133,25 @@
           ></Page>
         </Row>
       </Modal>
+      <Modal
+        v-model="showGeneralQrCode"
+        title="浜岀淮鐮�"
+        width="800"
+        :mask-closable="false"
+        :loading="codeLoading"
+      >
+        <vue-qr
+          :text="QRCodeUrl"
+          :margin="0"
+          colorDark="#000"
+          colorLight="#fff"
+          :size="150"
+        ></vue-qr>
+        <div slot="footer">
+          <Button type="text" @click="closeGeneralQrCode">鍏抽棴</Button>
+          <!--          <Button type="primary" @click="generalQrCode">纭</Button>-->
+        </div>
+      </Modal>
     </Card>
   </div>
 </template>
@@ -140,8 +159,12 @@
 <script>
 import { getCardPackData } from '@/api/cardPack'
 import { getOrderList }  from '@/api/order'
+import vueQr from "vue-qr";
 export default {
   name: "CarPack",
+  components: {
+    "vue-qr": vueQr,
+  },
   data() {
     return {
       modelShow:false,
@@ -411,15 +434,63 @@
               style: { color }
             }, text);
           }
+        }, {
+          title: "鎿嶄綔",
+          key: "action",
+          align: "center",
+          width: 150,
+          fixed: "right",
+          render: (h, params) => {
+            const buttons = [];
+            // // 鏍规嵁璁㈠崟鐘舵�佷负'PAID'鏃舵樉绀洪澶栨搷浣滄寜閽�
+            console.log('--------------------->',params.row.claimStatus )
+            if (params.row.claimStatus === 'NOT_CLAIM') {
+              buttons.push(
+                h(
+                  "Button",
+                  {
+                    props: {type: "primary", size: "small"},
+                    style: {marginRight: "5px"},
+                    on: {
+                      click: () => {
+                        this.handlerEditorQrcode(params.row);
+                      },
+                    },
+                  },
+                  "鐢熸垚鍗″寘浜岀淮鐮�"
+                )
+              );
+            }
+            return h('div', buttons);
+          }
         }
+
       ],
+      QRCodeUrl:'',
+      showGeneralQrCode:false,
+      codeLoading:false,
     }
+
   },
   mounted(){
     //鍒濆鍖�
     this.getData();
   },
   methods: {
+    closeGeneralQrCode(){
+      this.showGeneralQrCode = false;
+    },
+    handlerEditorQrcode(row){
+      this.QRCodeUrl = '';
+      this.showGeneralQrCode = true
+      this.codeLoading = true;
+
+      //鑾峰緱鍟嗗搧瀵瑰簲鐨勭涓�涓猻kuid
+      this.codeLoading = false;
+      this.QRCodeUrl = this.QRcodeBaseUrl+ '/scanpage/claimCoupon'+'?id='+row.id
+      console.log(this.QRCodeUrl);
+
+    },
     // 鎼滅储
     handleSearch() {
       this.searchForm.pageNumber = 1;

--
Gitblit v1.8.0