Browse Source

入住详情展示会员信息

gqx 2 years ago
parent
commit
eb7a0c9ea4
1 changed files with 51 additions and 13 deletions
  1. 51 13
      src/views/room/modules/checkIn/BillRoomInfo.vue

+ 51 - 13
src/views/room/modules/checkIn/BillRoomInfo.vue

@@ -187,7 +187,8 @@
             </div>
           </a-tab-pane>
         </a-tabs>
-        <!-- <h4
+        <h4
+          v-if="vipCustomer && vipCustomer.id"
           style="
             color: rgba(255, 141, 26, 1);
             font-weight: 600;
@@ -198,16 +199,16 @@
         </h4>
         <a-divider />
         <a-descriptions :column="2">
-          <a-descriptions-item label="姓名"> 张三 </a-descriptions-item>
+          <a-descriptions-item label="姓名"> {{ vipCustomer.name }} </a-descriptions-item>
           <a-descriptions-item label="证件号"
-            >888888888888
+            >{{ vipCustomer.certificateNo }}
           </a-descriptions-item>
-          <a-descriptions-item label="卡号"> 1588888888 </a-descriptions-item>
-          <a-descriptions-item label="手机号"> 1588888888 </a-descriptions-item>
-          <a-descriptions-item label="会员级别"> 金卡 </a-descriptions-item>
-          <a-descriptions-item label="余额"> 3000.00元 </a-descriptions-item>
-          <a-descriptions-item label="积分"> 888888分 </a-descriptions-item>
-        </a-descriptions> -->
+          <a-descriptions-item label="卡号">  {{ vipCustomer.cardNo }} </a-descriptions-item>
+          <a-descriptions-item label="手机号"> {{ vipCustomer.mobile }}  </a-descriptions-item>
+          <a-descriptions-item label="会员级别"> {{ vipCustomer.gradeName }}  </a-descriptions-item>
+          <a-descriptions-item label="余额">{{ vipCustomer.balance.toFixed(2) }} 元 </a-descriptions-item>
+          <a-descriptions-item label="积分"> {{ vipCustomer.integral }} 分 </a-descriptions-item>
+        </a-descriptions>
       </div>
       <div style="width: 40%">
         <div style="display: flex; justify-content: space-between">
@@ -311,7 +312,7 @@
           :columns="columns2"
           :data-source="paymentList"
           :pagination="false"
-          :scroll="{ y: 160}"
+          :scroll="{ y: 160 }"
           rowKey="id"
           :rowSelection="{
             selectedRowKeys: selectedRowKeys,
@@ -350,12 +351,14 @@
           </a-descriptions-item>
         </a-descriptions>
 
-        <a-button @click="handleAdd" type="danger" style="margin-left: 100px" disabled
+        <a-button @click="handleAdd" type="danger" style="margin-left: 100px"
           >结账退款</a-button
         >
       </div>
     </div>
     <customer-modal ref="modalCustomerForm" @ok="modalFormOk"></customer-modal>
+    <refund-modal ref="modalRefundForm" @ok="modalFormOk"></refund-modal>
+    <payment-modal ref="modalPaymentForm" @ok="modalFormOk"></payment-modal>
   </div>
 </template>
 
@@ -364,6 +367,8 @@ import { httpAction, getAction, deleteAction } from "@/api/manage";
 import { validateDuplicateValue } from "@/utils/util";
 import moment from "moment";
 import CustomerModal from "./CustomerModal.vue";
+import RefundModal from "./RefundModal.vue";
+import paymentModal from "./paymentModal.vue";
 const columns = [
   // {
   //     title: "",
@@ -464,7 +469,7 @@ const date = new Date();
 const endDate = new Date(date.setDate(date.getDate() + 1));
 export default {
   name: "BusMeetingRoomForm",
-  components: { CustomerModal },
+  components: { CustomerModal, RefundModal, paymentModal },
   props: {
     //表单禁用
     disabled: {
@@ -515,6 +520,7 @@ export default {
       feesList: [],
       paymentList: [],
       payTypeList: [],
+      vipCustomer: {},
     };
   },
   computed: {
@@ -620,6 +626,17 @@ export default {
       var find = this.customerSourceList.find((t) => t.id == customerSource);
       return find ? find.itemText : "--";
     },
+    getMemberCard() {
+      getAction("/business/busMemberCard/list", {
+        id: this.model.orderInfo.vipCustomerId,
+      }).then((res) => {
+        if (res.success) {
+          if (res.result.records && res.result.records.length > 0) {
+            this.vipCustomer = res.result.records[0];
+          }
+        }
+      });
+    },
     async getBookingOrderInfo() {
       if (this.payTypeList == 0) {
         await this.getbusRoomPayType();
@@ -656,6 +673,9 @@ export default {
               }
             }
           });
+          if (this.model.orderInfo.vipCustomerId) {
+            this.getMemberCard();
+          }
         }
       });
     },
@@ -663,7 +683,25 @@ export default {
       this.selectedRowKeys = selectedRowKeys;
       this.selectionRows = selectionRows;
     },
-    handleAdd() {},
+    handleAdd() {
+      // this.$refs.modalRefundForm.edit({
+      //   billRefund: 100,
+      //   deposit: 50,
+      //   roomFee: 80,
+      //   refund: 130,
+      // });
+      // this.$refs.modalRefundForm.title = "结账退款";
+      // this.$refs.modalRefundForm.disableSubmit = false;
+
+      this.$refs.modalPaymentForm.edit({
+        billRefund: 100,
+        deposit: 50,
+        roomFee: 80,
+        refund: 130,
+      });
+      this.$refs.modalPaymentForm.title = "结账收款";
+      this.$refs.modalPaymentForm.disableSubmit = false;
+    },
     puls() {
       this.wakeList.push({});
     },