gqx преди 2 години
родител
ревизия
9989e064c8
променени са 2 файла, в които са добавени 39 реда и са изтрити 7 реда
  1. 38 6
      src/views/room/modules/checkIn/BillRoomForm.vue
  2. 1 1
      src/views/room/modules/checkIn/HistoryModalTable.vue

+ 38 - 6
src/views/room/modules/checkIn/BillRoomForm.vue

@@ -82,7 +82,7 @@
                           },
                         ]"
                       >
-                        <a-auto-complete style="width: 80%;"
+                        <a-auto-complete style="width: 60%;"
                           v-model="room.key1"
                           placeholder="请输入姓名"
                           @search="handleSearch"
@@ -97,7 +97,9 @@
                           </template>
                         </a-auto-complete>
                         <span style="cursor: pointer;" v-if="room.busMemberCard&&room.busMemberCard.id" @click="showMemberCard(room.busMemberCard)">会员</span>
-                        <span style="cursor: pointer;" v-if="room.busMarketAgreementUnit&&room.busMarketAgreementUnit.id" @click="showAgreementUnit(room.busMarketAgreementUnit)">协议</span>
+                        <span style="cursor: pointer;" v-if="room.busMarketAgreementUnit&&room.busMarketAgreementUnit.id" @click="showAgreementUnit(room.busMarketAgreementUnit)"> 协议</span>
+                        <span style="cursor: pointer;" v-if="room.ruZhuHistory&&room.ruZhuHistory.phone" @click="showRuZhuHistory(room.ruZhuHistory.phone)"> 客史</span>
+                        
                       </a-form-model-item>
                     </a-col>
                     <a-col :span="8">
@@ -494,13 +496,12 @@
                     label="会员"
                     :labelCol="labelCol"
                     :wrapperCol="wrapperCol"
-                    prop="orderInfo.roomPriceSlnId"
+                    prop="orderInfo.vipCustomerId"
                   >
                     <a-select
                       placeholder="会员"
                       option-label-prop="label"
-                      v-model="model.orderInfo.roomPriceSlnId"
-                      @change="roomPriceSlnIdChange"
+                      v-model="model.orderInfo.vipCustomerId"
                     >
                       <a-select-option
                         :key="item.id"
@@ -889,6 +890,7 @@
 <member-card-modal ref="modalMemberCardInfo"></member-card-modal>
 <agreement-unit-modal ref="modalAgreementUnitInfo"></agreement-unit-modal>
 <agreement-unit-modal-table ref="modalAgreementUnitTable" @ok="modalAgreementUnitTableOk"></agreement-unit-modal-table>
+<history-modal ref="modalHistoryInfo"></history-modal>
   </a-spin>
 </template>
 
@@ -901,6 +903,7 @@ import SelectRoomFormModal from "./SelectRoomFormModal.vue";
 import MemberCardModal from "./MemberCardModal";
 import AgreementUnitModal from "./AgreementUnitModal";
 import AgreementUnitModalTable from "./AgreementUnitModalTable";
+import HistoryModal from "./HistoryModal";
 const columns = [
   // {
   //     title: "",
@@ -980,6 +983,7 @@ export default {
     MemberCardModal,
     AgreementUnitModal,
     AgreementUnitModalTable,
+    HistoryModal,
   },
   props: {
     //表单禁用
@@ -1087,6 +1091,7 @@ export default {
       payTypeList: [],
       busMemberCard: {},
       busMarketAgreementUnitList: [],
+      ruZhuHistoryList: [],
     };
   },
   computed: {
@@ -1242,6 +1247,11 @@ export default {
           } else {
             this.model.orderInfo.customerType = 1;
           }
+          if (this.ruZhuHistoryList && this.ruZhuHistoryList.length > 0) {
+            find.ruZhuHistory = this.ruZhuHistoryList.find(
+              (t) => t.phone == val[index]
+            );
+          }
         }
       },
       deep: true,
@@ -1340,6 +1350,16 @@ export default {
         this.loadRooms();
       }
     );
+
+    getAction("/business/busRoomBookingOrders/ruzhu-history-list", {
+      phone: "",
+      pageSize: 99999,
+      pageNo: 1,
+    }).then((res) => {
+      if (res.success) {
+        this.ruZhuHistoryList = res.result.records;
+      }
+    });
     //  this.getcesRoomLayout();
   },
   methods: {
@@ -1360,6 +1380,11 @@ export default {
         }
       });
     },
+    showRuZhuHistory(phone) {
+      this.$refs.modalHistoryInfo.add(phone);
+      this.$refs.modalHistoryInfo.title = "历史入住信息";
+      this.$refs.modalHistoryInfo.disableSubmit = true;
+    },
     showMemberCard(busMemberCard) {
       console.log("busMemberCard", busMemberCard);
       this.$refs.modalMemberCardInfo.edit(busMemberCard);
@@ -1819,11 +1844,18 @@ export default {
       this.model.orderFees = this.model.orderFees.filter((t) =>
         e.some((r) => r.id == t.roomId)
       );
+      var roomIds = this.model.roomIds.filter((t) =>
+        e.some((r) => r.id == t.id)
+      );
+      var newRoomIds = e.filter(
+        (t) => !this.model.roomIds.some((r) => r.id == t.id)
+      );
       this.modelDefault = Object.assign({}, this.modelDefault, {
-        roomIds: e,
+        roomIds: [...roomIds, ...newRoomIds],
         roomPrices: this.model.roomPrices,
         orderFees: this.model.orderFees,
       });
+      console.log(" this.modelDefault.roomIds", this.modelDefault.roomIds);
       this.edit(this.modelDefault);
     },
     compuleDeposit(prefPrice) {

+ 1 - 1
src/views/room/modules/checkIn/HistoryModalTable.vue

@@ -244,7 +244,7 @@ export default {
 
     },
     created() {
-        this.loadTree();
+        // this.loadTree();
     },
     provide(){
         return {