From bd01373e31834fced6fb0484129d842217cb6667 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 06 Jan 2021 19:57:35 +0800
Subject: [PATCH] modify

---
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html |   40 ++++++++++++++++++++++++++++++++--------
 1 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
index 32fa43e..fedb760 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
@@ -461,7 +461,24 @@
             <el-col class="paymethod" :span="15">
                 <el-row>
                     <ul>
-                        <li v-for="(item, index) in payMethods" :class="{active : item.isActive}">{{item.value}}</li>
+                        <span v-for="(item, index) in payMethods">
+                            <el-popover
+                                    :disabled="item.type != 1"
+                                    placement="bottom"
+                                    trigger="click">
+                                <el-row><span>选择</span></el-row>
+                                <el-tree :data="moneyCards"
+                                        show-checkbox
+                                        default-expand-all
+                                        node-key="id"
+                                        ref="tree"
+                                         check-strictly
+                                         highlight-current
+                                         :props="defaultProps">
+                                </el-tree>
+                                <li :class="{active : item.isActive}" slot="reference" @click="payMethodSelect(item, index)">{{item.value}}</li>
+                            </el-popover>
+                        </span>
                     </ul>
                 </el-row>
             </el-col>
@@ -582,6 +599,10 @@
             /******搜索表格数据END********/
 
             dialogSettleVisible : true,
+            defaultProps: {
+                children: 'children',
+                label: 'showLable'
+            }
 
         },
 
@@ -659,7 +680,6 @@
                 }
             });
 
-
         },
 
         methods: {
@@ -691,11 +711,6 @@
                                     item.showLable = item.cardName + "-余额:" + (item.realMoney + item.giftMoney)
                                 });
                                 _this.moneyCards = data.rows;
-                                //启用会员卡支付方式
-                                _this.payMethods[5].disabled = false;
-                            } else {
-                                //禁用会员卡支付方式
-                                _this.payMethods[5].disabled = true;
                             }
 
                         }
@@ -1071,7 +1086,7 @@
                     callback: function (data) {
                         _this.currentVipInfo = data.rows[0];
                         _this.order.vipId = _this.currentVipInfo.id;
-                        // _this.getVipMoneyCards();
+                        _this.getVipMoneyCards();
 
                     }
                 });
@@ -1109,6 +1124,15 @@
 
 
             },
+            payMethodSelect(item, index) {
+                this.$nextTick(function () {
+                    if (item.isActive) {
+                        Vue.set(item,'isActive',false);
+                    } else {
+                        Vue.set(item,'isActive',true);
+                    }
+                });
+            }
         }
 
     })

--
Gitblit v1.9.1