Bläddra i källkod

添加预约可修改每日价格功能。修改会员界面,修改客单,修改添加pos预约

许智捷 1 år sedan
förälder
incheckning
462cebbe83
38 ändrade filer med 1198 tillägg och 377 borttagningar
  1. 1 1
      src/mixins/JeecgListMixin.js
  2. 34 13
      src/views/fangwu/index.vue
  3. 14 13
      src/views/markets/member.vue
  4. 1 1
      src/views/markets/modules/memberBalance/BusMemberBalanceLogModal.vue
  5. 4 4
      src/views/markets/modules/memberCard/BusMemberCardModal.vue
  6. 268 0
      src/views/markets/modules/memberCard/BusMemberTopUp.vue
  7. 36 20
      src/views/markets/modules/memberPoint/BusMemberPointLogForm.vue
  8. 2 2
      src/views/orders/roompriceinfo.vue
  9. 12 4
      src/views/pos/diandan.vue
  10. 9 14
      src/views/pos/reserve.vue
  11. 36 17
      src/views/room/advanceOrder.vue
  12. 14 4
      src/views/room/fangtailive.vue
  13. 1 1
      src/views/room/forwardfangtai.vue
  14. 196 54
      src/views/room/guestorders.vue
  15. 188 81
      src/views/room/modules/checkIn/BillRoomForm.vue
  16. 1 0
      src/views/room/modules/checkIn/BillRoomFormModal.vue
  17. 50 2
      src/views/room/modules/checkIn/BillRoomInfo.vue
  18. 27 2
      src/views/room/modules/checkIn/BillRoomInfoModal.vue
  19. 1 1
      src/views/room/modules/checkIn/FeeForm.vue
  20. 9 8
      src/views/room/modules/checkIn/HistoryModal.vue
  21. 22 13
      src/views/room/modules/checkIn/HistoryModalTable.vue
  22. 8 5
      src/views/room/modules/checkIn/StrikeBalanceModel.vue
  23. 32 20
      src/views/room/modules/checkIn/batchCardDetailCopy.vue
  24. 4 4
      src/views/room/modules/checkIn/batchCardModalCopy.vue
  25. 5 3
      src/views/room/modules/checkIn/liveBatchCardForm.vue
  26. 2 2
      src/views/room/modules/checkIn/liveBatchCardModal.vue
  27. 12 6
      src/views/room/modules/fangtaiModal/continuedModal/continuedForm.vue
  28. 13 7
      src/views/room/modules/fangtaiModal/continuedModal/continuedModal.vue
  29. 3 1
      src/views/room/modules/fangtaiModal/exchangeHouses/exchangeHousesForm.vue
  30. 9 17
      src/views/room/modules/schedule/EditScheduleRoomForm.vue
  31. 83 14
      src/views/room/modules/schedule/ScheduleRoomForm.vue
  32. 0 1
      src/views/room/scheduledetail.vue
  33. 1 1
      src/views/settings/components/modules/printComponents/checkInPrint.vue
  34. 2 1
      src/views/settings/components/modules/printTemplateForm.vue
  35. 4 6
      src/views/settings/components/roomModules/housingPriceSetting.vue
  36. 4 0
      src/views/settings/components/roomModules/longRentSchemeModel.vue
  37. 83 27
      src/views/settings/marketMemberList.vue
  38. 7 7
      src/views/settings/roomSettings.vue

+ 1 - 1
src/mixins/JeecgListMixin.js

@@ -15,7 +15,7 @@ export const JeecgListMixin = {
       /* 查询条件-请不要在queryParam中声明非字符串值的属性 */
       queryParam: {},
       /* 数据源 */
-      dataSource:[],
+      dataSource:[{}],
       /* 分页参数 */
       ipagination:{
         current: 1,

+ 34 - 13
src/views/fangwu/index.vue

@@ -27,12 +27,12 @@
           <div class="grid-assign">
             <a-card class="card">
               <div class="assign-flex">
-                <div>今日待派房间<span>0</span>间,已经分配了<span>0</span>间,剩余<span>0</span>间</div>
+                <div>今日待派房间<span>{{ allotedSize + allCleanRoom.length }}</span>间,已经分配了<span> {{ allotedSize }}</span>间,剩余<span>{{ allCleanRoom.length }}</span>间</div>
                 <div style="color:#1890FF" @click="showAssignModal">点击分配</div>
               </div>
               <div style="text-indent: 2em;" class="assign-content">
-                <div v-for="(item, index) in 15" :key="index">
-                  <span style="color:#1890FF">{{ '小明' }}</span>:{{ '0间' }}
+                <div v-for="(item, index) in waiterList" :key="index">
+                  <span style="color:#1890FF">{{ (item.prefix || "") + item.name }}:</span>{{ item.roomCleanList.length }}间
                 </div>
               </div>
             </a-card>
@@ -112,10 +112,10 @@
       </a-tab-pane>
     </a-tabs>
     <!-- 分派房务弹窗 -->
-    <a-modal v-model="assignVisible" title="分派房务" @ok="handleAssignOk" width="70%">
+    <a-modal v-model="assignVisible" v-if="assignVisible" title="分派房务" @ok="handleAssignOk" width="70%">
       <div style="background-color: #ecf8ff; display: flex; justify-content: center; align-items: center;height:40px;border-radius:5px;overflow: hidden;">
         <div style="width: 10px; height: 100%; background-color: #1890FF;"> </div>
-        <div style="text-align: center;flex:1;">剩余脏房 {{ 0 }} 间 续(脏)房 {{ 5 }} 间 退(脏)房 {{ 1 }} 间</div>
+        <div style="text-align: center;flex:1;">剩余脏房 {{ allCleanRoom ? allCleanRoom.length : 0 }} 间 续(脏)房 {{ livingRoom ? livingRoom.length : 0 }} 间 退(脏)房 {{ vacantRoom ? vacantRoom.length : 0 }} 间</div>
       </div>
       <a-table
         ref="table"
@@ -137,10 +137,16 @@
           <div>
             退(脏)房:
 <!--            <span class="check-out" v-for="(item, index) in record.vacantRoom" :key="index">{{ item.roomNo }}</span>-->
-            <a-tag class="check-out" v-for="(item, index) in record.vacantRoom" :key="index" closable @close="removeRoom(item)">{{ item.roomNo }}</a-tag>
+            <a-tag class="check-out" v-for="(item, index) in record.vacantRoom" :key="index" :closable="false">
+              {{ item.roomNo }}
+              <a-icon type="close" @click="removeRoom(item)"/>
+            </a-tag>
           </div>
           <div style="margin-top:10px;">
-            续(脏)房: <a-tag class="continue" v-for="(item, index) in record.livingRoom" :key="index" closable @close="removeRoom(item)">{{ item.roomNo }}</a-tag>
+            续(脏)房: <a-tag class="continue" v-for="(item, index) in record.livingRoom" :key="index" :closable="false">
+            {{ item.roomNo }}
+            <a-icon type="close" @click="removeRoom(item)"/>
+          </a-tag>
           </div>
         </template>
         <template slot="prefix_name" slot-scope="text, record">
@@ -155,7 +161,7 @@
       </a-table>
     </a-modal>
     <!-- 手动分房弹窗 -->
-    <a-modal v-model="handVisible" title="房间列表" @ok="allotRoom" width="50%">
+    <a-modal v-model="handVisible" v-if="handVisible" title="房间列表" @ok="allotRoom" width="50%">
       <a-card title="退(脏)房">
         <div style="display:flex; margin-right:6px;flex-wrap:wrap;">
           <div @click="item.isSelect = !item.isSelect" class="check-out" v-for="item in vacantRoom" :key="item.id">
@@ -243,6 +249,9 @@ export default {
              */
             chooseWaiterId: '',
             verifyCount: 0,
+            // 已经分配的数量
+            allotedSize: 0,
+            allCleanRoom: [],
             vacantRoom: [],
             livingRoom: [],
             selectVacantRoom: [],
@@ -326,12 +335,15 @@ export default {
         getWaiter() {
           getAction('/business/busWaiter/getRoomClean', { hotelId: hotelInfo.id }).then(resp => {
             if (resp.success) {
+              let allotedSize = 0
               resp.result.forEach(waiter => {
                 let livingRoom = waiter.roomCleanList.filter(e => e.roomState === 2)
                 let vacantRoom = waiter.roomCleanList.filter(e => e.roomState === 1)
                 this.$set(waiter, 'livingRoom', livingRoom)
                 this.$set(waiter, 'vacantRoom', vacantRoom)
+                allotedSize = waiter.roomCleanList.length
               })
+              this.allotedSize = allotedSize
               this.waiterList = resp.result
             }
           })
@@ -343,6 +355,7 @@ export default {
               this.allCleanRoom.forEach(e => this.$set(e, 'isSelect', false))
               this.vacantRoom = this.allCleanRoom.filter(e => e.roomStatus === 2)
               this.livingRoom = this.allCleanRoom.filter(e => e.roomStatus === 4)
+              console.log(111111)
             }
           })
         },
@@ -372,6 +385,7 @@ export default {
               postAction('/fw/fwRoomClean/allotRoomClean', params).then(resp => {
                 if (resp.success){
                   this.getWaiter()
+                  this.loadFwRoomClean()
                 }
               })
             }
@@ -379,14 +393,19 @@ export default {
 
         },
         removeRoom(room){
-          console.log(room)
-            deleteAction('/fw/fwRoomClean/delete', { id: room.id }).then(resp => {
+          console.log(room,'room')
+          this.loading = true
+            deleteAction('/fw/fwRoomClean/delete', { id: room.id }).then(async resp => {
               if (resp.success) {
                 this.$message.success('删除成功')
+                this.loadFwRoomClean()
+                this.getWaiter()
+                this.$forceUpdate()
               } else {
                 this.$message.warning('删除失败')
-                this.getWaiter()
               }
+            }).finally(() => {
+              this.loading = false
             })
         },
         getTime(type) {
@@ -453,8 +472,9 @@ export default {
         },
         // 点击弹出框
         showAssignModal() {
-            this.getWaiter()
-            this.assignVisible = true
+          this.loadFwRoomClean()
+          this.getWaiter()
+          this.assignVisible = true
         },
         handleAssignOk() {
             this.assignVisible = false
@@ -515,6 +535,7 @@ export default {
         this.getRoomUseConsumableSummary(this.startTime, this.endTime, 1)
         this.getRoomUseConsumableSummary(this.startTime, this.endTime, 2)
         this.loadFwRoomClean()
+        this.getWaiter()
     }
 }
 </script>

+ 14 - 13
src/views/markets/member.vue

@@ -136,7 +136,7 @@
       style="display: flex; justify-content: space-between"
     >
       <div>
-        <a-button @click="handleAdd" type="primary" icon="plus">办卡</a-button>
+        <a-button @click="handleAdd" type="primary" icon="plus">新增会员</a-button>
         <a-button @click="batchDel" type="danger" icon="minus"
           >批量删除</a-button
         >
@@ -157,7 +157,7 @@
           <a-button type="primary" icon="import">导入</a-button>
         </a-upload> -->
         <a-button type="primary" icon="import" @click="importExcelModal">导入</a-button>
-        
+
       </div>
       <div>
         <a-switch @change="onSwitchChange" />
@@ -330,6 +330,8 @@
           <a @click="handlePointEdit(record)">积分调整</a>
           <a-divider type="vertical" />
           <a @click="handleEdit(record)">编辑</a>
+          <a-divider type="vertical" />
+          <a @click="handleTopUp(record)">充值</a>
 
           <a-divider type="vertical" />
           <a-dropdown>
@@ -383,6 +385,7 @@
       ref="modalForm"
       @ok="modalFormOk"
     ></bus-member-card-modal>
+    <bus-member-top-up-modal ref="modalMemberTopUp" @ok="modalFormOk"> </bus-member-top-up-modal>
     <bus-member-point-log-modal
       ref="modalMemberPointLogForm"
       @ok="modalFormOk"
@@ -402,11 +405,13 @@ import { httpAction } from "@/api/manage";
 import BusMemberCardModal from "./modules/memberCard/BusMemberCardModal";
 import BusMemberPointLogModal from "./modules/memberPoint/BusMemberPointLogModal";
 import BusMemberCardImportExcelModal from "./modules/memberCard/BusMemberCardImportExcelModal";
+import BusMemberTopUpModal from '@views/markets/modules/memberCard/BusMemberTopUp'
 const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
 export default {
-  name: "BusMemberCardList",
+  name: "BusMemberList",
   mixins: [JeecgListMixin, mixinDevice],
   components: {
+    BusMemberTopUpModal,
     BusMemberCardModal,
     BusMemberPointLogModal,
     BusMemberCardImportExcelModal,
@@ -505,7 +510,7 @@ export default {
           align: "center",
           dataIndex: "labelName",
         },
-        
+
         {
           title: "操作",
           dataIndex: "action",
@@ -600,18 +605,14 @@ export default {
       this.selectedRowKeys = [];
       this.selectionRows = [];
     },
-    handlePointEdit(item) {
-      this.$refs.modalMemberPointLogForm.add({
-        memberId: item.id,
-        hotelId: item.hotelId,
-        tenantId: item.tenantId,
-        integral: item.integral,
-        cardNo: item.cardNo,
-        name: item.name,
-      });
+    handlePointEdit(record) {
+      this.$refs.modalMemberPointLogForm.add(record);
       this.$refs.modalMemberPointLogForm.title = "积分调整";
       this.$refs.modalMemberPointLogForm.disableSubmit = false;
     },
+    handleTopUp(record) {
+      this.$refs.modalMemberTopUp.add(record)
+    },
     groupChange(e) {
       if (this.selectedRowKeys.length <= 0) {
         this.$message.warning("请选择一条记录!");

+ 1 - 1
src/views/markets/modules/memberBalance/BusMemberBalanceLogModal.vue

@@ -57,4 +57,4 @@
       }
     }
   }
-</script>
+</script>

+ 4 - 4
src/views/markets/modules/memberCard/BusMemberCardModal.vue

@@ -48,13 +48,13 @@
       handleOk () {
         this.$refs.realForm.submitForm();
       },
-      submitCallback(){
-        this.$emit('ok');
-        this.visible = false;
+      submitCallback() {
+        this.$emit('ok')
+        this.visible = false
       },
       handleCancel () {
         this.close()
       }
     }
   }
-</script>
+</script>

+ 268 - 0
src/views/markets/modules/memberCard/BusMemberTopUp.vue

@@ -0,0 +1,268 @@
+<template>
+  <a-modal
+    title="充值"
+    :width="width"
+    :visible="visible"
+    :confirm-loading="confirmLoading"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+
+    <a-row>
+      <a-form-model
+          ref="form"
+          :model="model"
+          :rules="validatorRules">
+        <a-col :span="24" style="color: #fa8c16;">
+          <span>会员姓名:{{ memberInfo.name + '/' + memberInfo.sex + '/' + memberInfo.mobile + '/' + memberInfo.certificateNo }}</span>
+          <span style="float:right">{{ memberInfo.gradeName }}</span>
+          <hr style="margin-bottom: 20px; background-color: #dcdfe6; height: 2px; border: none"/>
+        </a-col>
+        <a-col :span="24" style="color: #fa8c16;">
+          |充值
+          <hr style="background-color: #ebeff5; height: 2px; border: none"/>
+        </a-col>
+        <a-col :span="12">
+          <a-form-model-item
+              label="会员卡号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="type">
+            {{ memberInfo.cardNo }}
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-model-item
+              label="充值活动"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+          >
+            <a-select
+                v-model="model.marketRechargeId"
+                style="width: 100%"
+                placeholder="充值配置"
+                @change="marketRechargeChage"
+            >
+              <a-select-option
+                  v-for="(item, index) in marketRechargeList"
+                  :key="index"
+                  :value="item.id">
+                {{ item.name }}
+              </a-select-option>
+              <a-select-option :value="-1">
+                无
+              </a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-model-item
+              label="充值金额"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="money"
+          >
+            <a-input-number
+                v-model="model.money"
+                placeholder="请输入充值金额"
+                :min="1"
+                style="width: 100%"
+            />
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-model-item
+              label="赠送金额"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              :min="0"
+              prop="giveMoney"
+          >
+            <a-input-number
+                v-model="model.giveMoney"
+                placeholder="请输入赠送金额"
+                style="width: 100%"
+            />
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="24" style="color: #fa8c16;">
+          |付款
+          <hr style="margin-bottom: 20px; background-color: #ebeff5; height: 2px; border: none"/>
+        </a-col>
+        <a-col :span="12">
+          <a-form-model-item
+              label="支付金额"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="payMoney"
+          >
+            <a-input-number
+                v-model="model.payMoney"
+                placeholder="请输入支付金额"
+                style="width: 100%"
+                :min="0"
+            />
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-model-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="paymentMethod">
+            <a-select
+                v-model="model.paymentMethod"
+                style="width: 50%">
+              <a-select-option
+                  v-for="(item, index) in paymentMethodList"
+                  :key="index"
+                  :value="item.id"
+              >{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-model-item
+              label="推荐员工"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="staffId"
+          >
+            <a-select
+                v-model="model.staffId"
+                style="width: 100%"
+                placeholder="推荐员工"
+            >
+              <a-select-option
+                  v-for="(item, index) in staffList"
+                  :key="index"
+                  :value="item.id"
+              >{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="24" style="text-align: end">
+          <a-checkbox default-checked>开具发票</a-checkbox>
+          <a-checkbox default-checked>打印收款单</a-checkbox>
+        </a-col>
+      </a-form-model>
+    </a-row>
+
+  </a-modal>
+</template>
+
+<script>
+
+import { httpAction } from '@api/manage'
+
+export default {
+  name: 'BusMemberTopUpModal',
+  components: {
+
+  },
+  data () {
+    return {
+      title: '',
+      width: 800,
+      visible: false,
+      disableSubmit: false,
+      confirmLoading: false,
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 8 }
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 13 }
+      },
+      validatorRules: {
+        money: [{ required: true, message: '请输入充值金额!' }],
+        giveMoney: [{ required: true, message: '请输入赠送金额!' }],
+        paymentMethod: [{ required: true, message: '请输入支付方式!' }],
+        payMoney: [{ required: true, message: '请输入支付金额!' }]
+      },
+      staffList: [],
+      memberInfo: {},
+      model: {},
+      marketRechargeList: [],
+      paymentMethodList: []
+    }
+  },
+  created() {
+    httpAction('/business/busMarketRecharge/list', { pageNo: 1, pageSize: 1000 }, 'get').then((res) => {
+      if (res.success) {
+        this.marketRechargeList = res.result.records
+      }
+    })
+    httpAction('/business/busRoomPayType/queryList', { pageNo: 1, pageSize: 100 }, 'get').then((res) => {
+      if (res.success) {
+        this.paymentMethodList = res.result.filter(e => e.name !== '会员卡' && e.name !== '单位挂账')
+        if (this.paymentMethodList.length > 0) {
+          this.model.paymentMethod = this.paymentMethodList[0].id
+        }
+      }
+    })
+    var _info = JSON.parse(localStorage.getItem('storeInfo'))
+    if (_info) {
+      this.model.hotelId = _info.id
+    }
+    // 备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model))
+  },
+  methods: {
+    add (record) {
+      this.visible = true
+      this.$nextTick(() => {
+        this.model.type = 1
+        this.model.memberId = record.id
+        this.model.hotelId = record.hotelId
+        this.memberInfo = JSON.parse(JSON.stringify(record))
+      })
+    },
+    close () {
+      this.$emit('close')
+      this.visible = false
+    },
+    handleOk () {
+      let that = this
+      if (this.model.payMoney !== this.model.money) {
+        this.$message.warning('支付金额与充值金额应相等')
+        return
+      }
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true
+          httpAction('/business/busMemberBalanceLog/add', this.model, 'post')
+              .then((res) => {
+                if (res.success) {
+                  that.$message.success(res.message)
+                  that.$emit('ok')
+                  this.visible = false
+                } else {
+                  that.$message.warning(res.message)
+                }
+              })
+              .finally(() => {
+                that.confirmLoading = false
+              })
+        }
+      })
+    },
+    handleCancel () {
+      this.close()
+    },
+    marketRechargeChage(e) {
+      console.log(e)
+      let find = this.marketRechargeList.find((t) => t.id === e)
+      if (find) {
+        this.model.money = find.money
+        this.model.giveMoney = find.returnRoney
+      } else {
+        this.model.money = null
+        this.model.giveMoney = null
+      }
+    }
+  }
+}
+</script>

+ 36 - 20
src/views/markets/modules/memberPoint/BusMemberPointLogForm.vue

@@ -8,16 +8,16 @@
         slot="detail"
       >
         <a-row>
-          <a-col :span="24">
-            <a-form-model-item
-              label="姓名"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-            >
-              <span>{{ model.name }}</span>
-            </a-form-model-item>
+          <a-col :span="24" style="color: #fa8c16;">
+            <span>会员姓名:{{ memberInfo.name + '/' + memberInfo.sex + '/' + memberInfo.mobile + '/' + memberInfo.certificateNo }}</span>
+            <span style="float:right">{{ memberInfo.gradeName }}</span>
+            <hr style="margin-bottom: 20px; background-color: #dcdfe6; height: 2px; border: none"/>
           </a-col>
-          <a-col :span="24">
+          <a-col :span="24" style="color: #fa8c16;">
+            |调整积分
+            <hr style="background-color: #ebeff5; height: 2px; border: none"/>
+          </a-col>
+          <a-col :span="12">
             <a-form-model-item
               label="卡号"
               :labelCol="labelCol"
@@ -26,16 +26,16 @@
               <span>{{ model.cardNo }}</span>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <a-col :span="12">
             <a-form-model-item
-              label="积分"
+              label="可用积分"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
             >
               <span>{{ model.integral || 0 }}</span>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <a-col :span="12">
             <a-form-model-item
               label="类型"
               :labelCol="labelCol"
@@ -49,21 +49,27 @@
             </a-form-model-item>
           </a-col>
 
-          <a-col :span="24" v-if="model.type != 3">
+          <a-col :span="12">
             <a-form-model-item
-              label="充值积分"
+              :label="model.type === 1 ? '充值积分' : (model.type === 2 ? '扣除积分' : '调整积分')"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
               prop="num"
             >
-              <a-input-number v-model="model.num" style="width: 100%" :min="1" />
+              <a-input-number v-model="model.num" style="width: 50%" :min="1" />
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
             <a-form-model-item
               label="备注"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
+              :labelCol="{
+                  xs: { span: 12 },
+                  sm: { span: 4 },
+                }"
+              :wrapperCol="{
+                  xs: { span: 24 },
+                  sm: { span: 16 },
+                }"
               prop="remarks"
             >
               <a-textarea
@@ -96,10 +102,11 @@ export default {
   },
   data() {
     return {
+      memberInfo: {},
       model: { type: 1, num: 1 },
       labelCol: {
         xs: { span: 24 },
-        sm: { span: 5 },
+        sm: { span: 8 },
       },
       wrapperCol: {
         xs: { span: 24 },
@@ -128,7 +135,16 @@ export default {
   },
   methods: {
     add(record) {
-      this.modelDefault = Object.assign({}, record,this.modelDefault);
+      let obj = {
+        memberId: record.id,
+        hotelId: record.hotelId,
+        tenantId: record.tenantId,
+        integral: record.integral,
+        cardNo: record.cardNo,
+        name: record.name,
+      }
+      this.modelDefault = Object.assign({}, obj, this.modelDefault);
+      this.memberInfo = JSON.parse(JSON.stringify(record))
       this.edit(this.modelDefault);
     },
     edit(record) {
@@ -167,4 +183,4 @@ export default {
     },
   },
 };
-</script>
+</script>

+ 2 - 2
src/views/orders/roompriceinfo.vue

@@ -170,7 +170,7 @@ import moment from "moment";
 const date = new Date();
 const endDate = new Date(date.setDate(date.getDate() + 7));
 export default {
-  name: "BusMemberBalanceLogList",
+  name: "RoomPriceInfo",
   mixins: [JeecgListMixin, mixinDevice],
   components: {
     EditableCell,
@@ -308,4 +308,4 @@ export default {
 </script>
 <style scoped>
 @import "~@assets/less/common.less";
-</style>
+</style>

+ 12 - 4
src/views/pos/diandan.vue

@@ -152,11 +152,12 @@
         <a-row style="margin-top: 30px">
           <a-space>
             <a-input
+                v-model="searchParam.keyw"
               v-if="!isSaoma"
               placeholder="输入名称、简拼、条码"
             ></a-input>
             <a-input v-else placeholder="请扫描条码"></a-input>
-            <a-button v-if="!isSaoma">查询</a-button>
+            <a-button v-if="!isSaoma" @click="loadGoods">查询</a-button>
             <a-button
               @click="isSaoma = !isSaoma"
             >切换为{{ isSaoma ? "查询" : "扫码" }}模式</a-button
@@ -364,6 +365,9 @@ export default {
       selectGoods: {},
       posTypeList: [],
       tabPosTypeId: '',
+      searchParam: {
+        keyw: null
+      },
       selectGoodsList: [],
       goodsTypeList: [],
       tabgoodsTypeId: '1',
@@ -374,6 +378,7 @@ export default {
       selectRoomOrder: {},
       // 联台显示隐藏
       unionOpen: false,
+      state: 0,
       // 联台id
       tabPosRegionId: '1',
       // 联台房间tab
@@ -639,7 +644,8 @@ export default {
       getAction('/pos/posSellClearGoods/list', {
         pageNo: 1,
         pageSize: 99999,
-        goodTypes: ids
+        goodTypes: ids,
+        keyw: this.searchParam.keyw
       }).then((res) => {
         if (res.success) {
           this.dataSource = [...this.dataSource, ...res.result.records]
@@ -648,7 +654,8 @@ export default {
       getAction('/pos/posSellClearGoods/thali-list', {
         pageNo: 1,
         pageSize: 99999,
-        goodTypes: ids
+        goodTypes: ids,
+        name: this.searchParam.keyw
       }).then((res) => {
         if (res.success) {
           this.dataSource2 = res.result.records
@@ -874,6 +881,7 @@ export default {
       }
       this.unionTitle = val
       this.unionOpen = true
+      this.state = index
       this.uniteDataSource = []
       this.loadRegion(index)
     },
@@ -942,7 +950,7 @@ export default {
         pageNo: 1,
         pageSize: 99999,
         posTypeId: this.tabPosTypeId,
-        state: index,
+        state: this.state,
         id: this.tableId
       };
       if (this.tabPosRegionId != "1") {

+ 9 - 14
src/views/pos/reserve.vue

@@ -5,14 +5,14 @@
       <div class="table-page-search-wrapper">
         <a-form layout="inline">
           <a-row :gutter="24">
-            <a-col :span="3">
-            <a-radio-group v-model="presetTimeTab" style="margin-bottom: 16px">
-              <a-radio-button value="small">预定就餐时间</a-radio-button>
-              <a-radio-button value="default">预定创建时间</a-radio-button>
-            </a-radio-group>
-          </a-col>
-          <a-col :span="4">
-            <a-form-item label="">
+<!--            <a-col :span="3">-->
+<!--            <a-radio-group v-model="presetTimeTab" style="margin-bottom: 16px">-->
+<!--              <a-radio-button value="small">预定就餐时间</a-radio-button>-->
+<!--              <a-radio-button value="default">预定创建时间</a-radio-button>-->
+<!--            </a-radio-group>-->
+<!--          </a-col>-->
+          <a-col :span="7">
+            <a-form-item label="预定就餐时间">
               <a-range-picker
                   format="YYYY-MM-DD"
                   :placeholder="['开始日期', '结束日期']"
@@ -52,14 +52,9 @@
             <a-form-item label="餐段">
               <a-select
                 ref="select"
-                v-model="orderStatus"
                 style="width: 150px"
                 @change="handleChange"
               >
-                <a-select-option value="jack">Jack</a-select-option>
-                <a-select-option value="lucy">Lucy</a-select-option>
-                <a-select-option value="disabled" disabled>Disabled</a-select-option>
-                <a-select-option value="Yiminghe">yiminghe</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
@@ -67,7 +62,7 @@
               <a-form-item label="预定单号">
                 <a-input
                     placeholder="请输入预定单号"
-                    v-model="queryParam.bookingCode"
+                    v-model="queryParam.code"
                 ></a-input>
               </a-form-item>
             </a-col>

+ 36 - 17
src/views/room/advanceOrder.vue

@@ -65,9 +65,22 @@
                 @click="handleExportXls('预约单')"
                 icon="download"
                 style="margin-left: 8px"
-                >导出</a-button
-              >
+                >导出</a-button>
+                <a-button
+                    type="primary"
+                    icon="printer"
+                    style="margin-left: 8px"
+                    v-print="'#table'"
+                >打印</a-button>
             </span>
+            <a-popover trigger="click" style="float: right;">
+              <template slot="content">
+                <a-col v-for="column in columns">
+                  <a-checkbox v-model="column.show">{{ column.title }}</a-checkbox>
+                </a-col>
+              </template>
+              <a-button >选择列</a-button>
+            </a-popover>
           </a-col>
         </a-row>
       </a-form>
@@ -77,18 +90,15 @@
     <div>
       <a-table
         ref="table"
+        id="table"
         size="middle"
         :scroll="{ x: true }"
         bordered
         rowKey="id"
-        :columns="columns"
+        :columns="columns.filter(item => item.show)"
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        :rowSelection="{
-          selectedRowKeys: selectedRowKeys,
-          onChange: onSelectChange,
-        }"
         class="j-table-force-nowrap"
         @change="handleTableChange"
       >
@@ -172,12 +182,14 @@ export default {
         {
           title: '单号',
           align: 'center',
-          dataIndex: 'orderNo'
+          dataIndex: 'orderNo',
+          show: true
         },
         {
           title: '状态',
           align: 'center',
           dataIndex: 'status',
+          show: true,
           customRender: function (text, record) {
             if (record.bookingStatus === 1) {
               if (record.livingId != null && record.livingId != ''){
@@ -196,6 +208,7 @@ export default {
           title: '客人/电话',
           align: 'center',
           dataIndex: 'customerName',
+          show: true,
           customRender: function (text, record) {
             return record.customerName + '/' + record.customerPhone
           }
@@ -204,6 +217,7 @@ export default {
           title: '客人类型',
           align: 'center',
           dataIndex: 'customerType',
+          show: true,
           customRender: function (text) {
             if (text === 1) {
               return '散客'
@@ -220,6 +234,7 @@ export default {
           title: '入住类型',
           align: 'center',
           dataIndex: 'isLiving',
+          show: true,
           customRender: function (text, record) {
             if (record.livingDayPrices && record.livingDayPrices.length > 0) {
               return record.livingDayPrices[0].livingType === 1
@@ -237,12 +252,14 @@ export default {
         {
           title: '房型',
           align: 'center',
-          dataIndex: 'layoutName'
+          dataIndex: 'layoutName',
+          show: true
         },
         {
           title: '房号',
           align: 'center',
           dataIndex: 'roomName',
+          show: true,
           customRender: function (text, record) {
             return !text ? '排房' : text
           }
@@ -251,6 +268,7 @@ export default {
           title: '房价',
           align: 'center',
           dataIndex: 'createDate',
+          show: true,
           customRender: function (text, record) {
             if (record.livingDayPrices && record.livingDayPrices.length > 0) {
               return record.livingDayPrices[0].price
@@ -269,17 +287,20 @@ export default {
         {
           title: '预抵时间',
           align: 'center',
-          dataIndex: 'arrivalTime'
+          dataIndex: 'arrivalTime',
+          show: true
         },
         {
           title: '预离时间',
           align: 'center',
-          dataIndex: 'dueOutTime'
+          dataIndex: 'dueOutTime',
+          show: true
         },
         {
           title: '金额',
           align: 'center',
           dataIndex: 'yuE',
+          show: true,
           customRender: function (text, record) {
             return record.yuE + '(余)/' + record.yushou + '(预)'
           }
@@ -290,6 +311,7 @@ export default {
           align: 'center',
           fixed: 'right',
           width: 165,
+          show: true,
           scopedSlots: { customRender: 'action' }
         }
       ],
@@ -308,14 +330,11 @@ export default {
       queryParam: {
         type: 2,
         bookingStatus: '0',
-        startTime: moment(new Date()).format('YYYY-MM-DD'),
-        endTime: moment(endDate).format('YYYY-MM-DD'),
+        startTime: null,
+        endTime: null,
         layoutId: undefined
       },
-      datetime: [
-        moment(new Date(), 'YYYY-MM-DD'),
-        moment(endDate, 'YYYY-MM-DD')
-      ]
+      datetime: []
     }
   },
   created() {

+ 14 - 4
src/views/room/fangtailive.vue

@@ -2385,6 +2385,7 @@ export default {
       } else if (e.key == 9) {
         this.handleBillInfo(row)
       } else if (e.key == 10) {
+        console.log(row, 'row')
         let obj = {
             ...row.roomInfo,
             layoutName: row.layout.name,
@@ -2393,8 +2394,12 @@ export default {
               key5: row.livingData.livingCustomers.phone
             }
         }
-        this.$refs.continuedModalVue.makeCardInfo = obj,
-        this.$refs.continuedModalVue.edit(row),
+        let record = {
+          livingOrderId: row.livingData.livingOrder.id,
+          bookingOrderId: row.livingData.livingOrder.bookingOrderId,
+        }
+        this.$refs.continuedModalVue.makeCardInfo = obj
+        this.$refs.continuedModalVue.edit(record)
         this.$refs.continuedModalVue.title = '续住'
         this.$refs.continuedModalVue.disableSubmit = false
       } else if (e.key == 14) {
@@ -2487,7 +2492,9 @@ export default {
           ...row.roomInfo,
           layoutName: row.layout.name,
           customerName: row.livingData.livingCustomers.customerName,
-          phone: row.livingData.livingCustomers.phone
+          phone: row.livingData.livingCustomers.phone,
+          arriveTime: row.livingData.livingOrder.arrivalTime,
+          dueOutTime: row.livingData.livingOrder.dueOutTime
         }
         console.log(obj)
         this.$refs.batchCardModalCopy.edit([obj])
@@ -2617,13 +2624,16 @@ export default {
       this.YDorder = e.order
       if (this.roomCard) {
         let params = []
+        console.log(e.model.roomIds, 'e.model.roomIds')
         e.model.roomIds.forEach(ele => {
           let param = {
             id: ele.roomId,
             name: ele.name,
             layoutName: e.model.roomPrices.find(r => r.roomId === ele.roomId).layoutName,
             customerName: ele.key1,
-            phone: ele.key5
+            phone: ele.key5,
+            arriveTime: e.model.orderInfo.arriveTime,
+            dueOutTime: e.model.orderInfo.dueOutTime
           }
           params.push(param)
         })

+ 1 - 1
src/views/room/forwardfangtai.vue

@@ -174,7 +174,7 @@ import moment from "moment";
 const date = new Date();
 const endDate = new Date(date.setDate(date.getDate() + 7));
 export default {
-  name: "BusMemberBalanceLogList",
+  name: "ForwardFangtai",
   mixins: [JeecgListMixin, mixinDevice],
   components: {
     EditableCell,

+ 196 - 54
src/views/room/guestorders.vue

@@ -19,9 +19,9 @@
                 v-model="queryParam.layoutId"
                 :allowClear="true">
                 <a-select-option
-                    :value="item.id"
-                    v-for="item in roomLayoutList"
-                    :key="item.id">
+                  :value="item.id"
+                  v-for="item in roomLayoutList"
+                  :key="item.id">
                   {{ item.name }}
                 </a-select-option>
               </a-select>
@@ -30,24 +30,53 @@
           <a-col :span="2">
             <a-form-item>
               <a-select
+                placeholder="入住类型"
+                v-model="queryParam.livingType"
+                :allowClear="true">
+                <a-select-option :value="1"> 全天 </a-select-option>
+                <a-select-option :value="2"> 小时 </a-select-option>
+                <a-select-option :value="3"> 自用 </a-select-option>
+                <a-select-option :value="4"> 免费 </a-select-option>
+                <a-select-option :value="5"> 长租 </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="2">
+            <a-form-item>
+              <a-select
                 placeholder="客人类型"
                 v-model="queryParam.customerType"
                 :allowClear="true">
-                  <a-select-option :value="1"> 散客 </a-select-option>
-                  <a-select-option :value="2"> 会员 </a-select-option>
-                  <a-select-option :value="3"> 协议单位 </a-select-option>
-                  <a-select-option :value="4"> 中介 </a-select-option>
+                <a-select-option :value="1"> 散客 </a-select-option>
+                <a-select-option :value="2"> 会员 </a-select-option>
+                <a-select-option :value="3"> 协议单位 </a-select-option>
+                <a-select-option :value="4"> 中介 </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item>
+              <a-select
+                  placeholder="客户来源"
+                  v-model="queryParam.customerSource"
+                  :allowClear="true">
+                <a-select-option
+                    :value="item.id"
+                    v-for="item in customerSourceList"
+                    :key="item.id">
+                  {{ item.itemText }}
+                </a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
           <a-col :span="4">
             <a-form-item label="">
               <a-range-picker
-                  format="YYYY-MM-DD"
-                  :placeholder="['开始日期', '结束日期']"
-                  @change="onChange"
-                  v-model="datetime"
-                  :allowClear="false"
+                format="YYYY-MM-DD"
+                :placeholder="['开始日期', '结束日期']"
+                @change="onChange"
+                v-model="datetime"
+                :allowClear="true"
               />
             </a-form-item>
           </a-col>
@@ -56,10 +85,10 @@
             <a-form-item label="">
               <a-radio-group v-model="queryParam.livingStatus" button-style="solid">
                 <a-radio-button value="0">全部</a-radio-button>
-                <a-radio-button value="-1">正常入住</a-radio-button>
+                <a-radio-button value="-1">住</a-radio-button>
                 <a-radio-button value="1">已结</a-radio-button>
                 <a-radio-button value="2">先走未结</a-radio-button>
-<!--                <a-radio-button value="3">联房退房</a-radio-button>-->
+                <!--                <a-radio-button value="3">联房退房</a-radio-button>-->
               </a-radio-group>
             </a-form-item>
           </a-col>
@@ -80,12 +109,33 @@
                 style="margin-right: 10px"
               >查询</a-button>
               <a-button
-                  type="primary"
-                  icon="download"
-                  @click="handleExportXls('入住单')"
+                type="primary"
+                icon="download"
+                style="margin-right: 10px"
+                @click="handleExportXls('入住单')"
               >导出</a-button>
+              <a-button
+                  type="primary"
+                  icon="printer"
+                  v-print="'#table'"
+              >打印</a-button>
             </span>
           </a-col>
+          <a-col :span="20">
+            <span
+                style="float: right; overflow: hidden"
+                class="table-page-search-submitButtons">
+              <a-popover trigger="click">
+                <template slot="content">
+                  <a-col v-for="column in columns">
+                    <a-checkbox v-model="column.show">{{ column.title }}</a-checkbox>
+                  </a-col>
+                </template>
+                <a-button >选择列</a-button>
+              </a-popover>
+            </span>
+          </a-col>
+
         </a-row>
       </a-form>
     </div>
@@ -93,22 +143,33 @@
     <!-- table区域-begin -->
     <div>
       <a-table
+        id="table"
         ref="table"
         size="middle"
         :scroll="{ x: true }"
         bordered
         rowKey="id"
-        :columns="columns"
+        :columns="columns.filter(item => item.show)"
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        :rowSelection="{
-          selectedRowKeys: selectedRowKeys,
-          onChange: onSelectChange,
-        }"
-        class="j-table-force-nowrap"
+        class="guestorders"
         @change="handleTableChange"
       >
+        <template #footer >
+          <a-table
+              ref="table"
+              size="middle"
+              :pagination="false"
+              :columns="columns.filter(item => item.show)"
+              :dataSource="totalData"
+              :showHeader="false"
+              class="nei_tabel_bottom"
+              style="padding: 0px; height: 50px"
+          ></a-table>
+
+        </template>
+
         <template slot="roomName" slot-scope="text, record">
           <span :class="record.yuE < 0 ? 'textColor' : ''">
             {{ text ? text : '排房' }}
@@ -134,6 +195,11 @@
             {{ getCustomerTypeText(record) }}
           </span>
         </template>
+        <template slot="customerSource" slot-scope="text, record">
+          <span :class="record.yuE < 0 ? 'textColor' : ''">
+            {{ getCustomerSourceText(record) }}
+          </span>
+        </template>
         <template slot="otype" slot-scope="text, record">
           <span :class="record.yuE < 0 ? 'textColor' : ''">
             {{ getOtypeText(record) }}
@@ -216,6 +282,7 @@
       ref="ModalBillRoomInfo"
       @ok="modalLockRoomFormOk"
     ></bill-room-info-modal>
+
   </a-card>
 </template>
 
@@ -225,98 +292,120 @@ import { mixinDevice } from '@/utils/mixin'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import BillRoomInfoModal from './modules/checkIn/BillRoomInfoModal.vue'
 import { postAction, getAction } from '@/api/manage'
-import moment from 'moment/moment'
+
 const date = new Date()
-const endDate = new Date(date.setDate(date.getDate() + 1))
 export default {
   name: 'CesOrderMessageList',
   mixins: [JeecgListMixin, mixinDevice],
   components: {
-    BillRoomInfoModal
+    BillRoomInfoModal,
   },
   data() {
     return {
       description: '客单',
       // 表头
+      columnFilter: false,
       columns: [
         {
           title: '单号',
           align: 'center',
-          dataIndex: 'orderNo'
+          dataIndex: 'orderNo',
+          width: 173,
+          show: true,
         },
         {
           title: '房号',
           align: 'center',
           dataIndex: 'roomName',
-          scopedSlots: { customRender: 'roomName' }
-
+          scopedSlots: { customRender: 'roomName' },
+          show: true
         },
         {
           title: '房型',
           align: 'center',
           dataIndex: 'layoutName',
-          scopedSlots: { customRender: 'layoutName' }
+          scopedSlots: { customRender: 'layoutName' },
+          show: true
         },
         {
           title: '客人/电话',
           align: 'center',
           dataIndex: 'customerName',
-          scopedSlots: { customRender: 'customerName' }
+          scopedSlots: { customRender: 'customerName' },
+          show: true
         },
         {
           title: '状态',
           align: 'center',
           dataIndex: 'settleType',
-          scopedSlots: { customRender: 'settleType' }
+          scopedSlots: { customRender: 'settleType' },
+          show: true
+        },
+        {
+          title: '入住类型',
+          align: 'center',
+          dataIndex: 'otype',
+          scopedSlots: { customRender: 'otype' },
+          show: true
         },
         {
           title: '客人类型',
           align: 'center',
           dataIndex: 'customerType',
-          scopedSlots: { customRender: 'customerType' }
+          scopedSlots: { customRender: 'customerType' },
+          show: true
         },
         {
-          title: '入住类型',
+          title: '客户来源',
           align: 'center',
-          dataIndex: 'otype',
-          scopedSlots: { customRender: 'otype' }
+          dataIndex: 'customerSource',
+          scopedSlots: { customRender: 'customerSource' },
+          show: true
         },
         {
           title: '预抵时间',
           align: 'center',
           dataIndex: 'arrivalTime',
-          scopedSlots: { customRender: 'arrivalTime' }
+          scopedSlots: { customRender: 'arrivalTime' },
+          show: true
         },
         {
           title: '预离时间',
           align: 'center',
           dataIndex: 'dueOutTime',
-          scopedSlots: { customRender: 'dueOutTime' }
-
+          scopedSlots: { customRender: 'dueOutTime' },
+          show: true
         },
         {
           title: '房价',
           align: 'center',
-          scopedSlots: { customRender: 'price' }
+          dataIndex: 'price',
+          scopedSlots: { customRender: 'price' },
+          show: true
         },
         {
           title: '消费合计',
           align: 'center',
-          // dataIndex: 'yuE',
-          scopedSlots: { customRender: 'consumption' }
+          dataIndex: 'consumption',
+          width: 83,
+          scopedSlots: { customRender: 'consumption' },
+          show: true
         },
         {
           title: '收款合计',
           align: 'center',
           dataIndex: 'yushou',
-          scopedSlots: { customRender: 'yushou' }
+          width: 83,
+          scopedSlots: { customRender: 'yushou' },
+          show: true
         },
         {
           title: '余额',
           align: 'center',
           dataIndex: 'yuE',
-          scopedSlots: { customRender: 'yuE' }
-
+          width: 83,
+          scopedSlots: { customRender: 'yuE' },
+          show: true
         },
         {
           title: '操作',
@@ -324,7 +413,14 @@ export default {
           align: 'center',
           fixed: 'right',
           width: 147,
-          scopedSlots: { customRender: 'action' }
+          scopedSlots: { customRender: 'action' },
+          show: true
+        }
+      ],
+      totalData: [
+        {
+          orderNo: '合计',
+          consumption: 0
         }
       ],
       url: {
@@ -339,19 +435,17 @@ export default {
       superFieldList: [],
       hotelList: [],
       roomLayoutList: [],
+      customerSourceList: [],
       queryParam: {
         type: 1,
-        startTime: moment(new Date()).format('YYYY-MM-DD'),
-        endTime: moment(endDate).format('YYYY-MM-DD'),
+        startTime: null,
+        endTime: null,
         livingStatus: '0',
         layoutId: undefined,
         customerType: undefined,
         onlyDebt: false
       },
-      datetime: [
-        moment(new Date(), 'YYYY-MM-DD'),
-        moment(endDate, 'YYYY-MM-DD')
-      ]
+      datetime: []
     }
   },
   created() {
@@ -370,6 +464,39 @@ export default {
           }
         }
     )
+    /* 客户来源 */
+    getAction('/business/busDictItem/queryList', { dictName: '客人来源设置' }).then((res) => {
+      console.log(res)
+      if (res.success) {
+        if (res.code === 200 && res.result) {
+          this.customerSourceList = res.result
+        }
+      }
+    })
+  },
+  watch: {
+    dataSource(val, old) {
+      let allSum = 0
+      val.forEach(e => {
+        allSum += e.yushou - e.yuE
+      })
+      this.totalData[0].consumption = allSum;
+      // handler(newValue, oldValue) {
+      //   newValue.forEach((e, index) => {
+      //     this.$watch(
+      //         () => e.money,
+      //         (newName, oldName) => {
+      //           let num = e.num == null ? 1 : e.num
+      //           let payable = e.money * num * this.model.roomIds.length
+      //           e.payable = payable
+      //           // this.$set(e,'relMoney', payable)
+      //           e.relMoney = payable
+      //         }
+      //     )
+      //   })
+      // },
+      // deep: true // 监听数组的变化需要设置 deep 为 true
+    }
   },
   computed: {
     importExcelUrl: function () {
@@ -379,7 +506,7 @@ export default {
   methods: {
     getSettleTypeText(record) {
       if (record.settleType === -1) {
-        return '正常入住'
+        return '住'
       } else if (record.settleType === 1) {
         return '结账退房'
       } else if (record.settleType === 2) {
@@ -398,6 +525,12 @@ export default {
         return '中介'
       }
     },
+    getCustomerSourceText(record) {
+      let find = this.customerSourceList.find(e => e.id === record.customerSource)
+      if (find) {
+        return find.itemText
+      }
+    },
     getOtypeText(record) {
       if (record.otype === 1) {
         return '全天'
@@ -441,7 +574,7 @@ export default {
     onChange(e, dateString) {
       this.queryParam.startTime = dateString[0]
       this.queryParam.endTime = dateString[1]
-    }
+    },
   }
 }
 </script>
@@ -452,3 +585,12 @@ export default {
   color: red;
 }
 </style>
+<style>
+.guestorders .ant-table-footer {
+  padding: 0px 0px !important;
+}
+
+.nei_tabel_bottom .ant-table-tbody > tr > td{
+  border: none !important;
+}
+</style>

+ 188 - 81
src/views/room/modules/checkIn/BillRoomForm.vue

@@ -576,10 +576,10 @@
                         <a-input-number v-model="rentCharges.money" :min="0" placeholder="输入金额" style="width: 100%"></a-input-number>
                       </a-col>
                       <a-col :span="3">元/月</a-col>
-<!--                      <a-col :span="7">-->
-<!--                        <a-input-number v-model="rentCharges.cycleNum" :min="0" placeholder="输入周期" style="width: 80%"></a-input-number>-->
-<!--                      </a-col>-->
-<!--                      <a-col :span="2"><span>月</span></a-col>-->
+                      <!--                      <a-col :span="7">-->
+                      <!--                        <a-input-number v-model="rentCharges.cycleNum" :min="0" placeholder="输入周期" style="width: 80%"></a-input-number>-->
+                      <!--                      </a-col>-->
+                      <!--                      <a-col :span="2"><span>月</span></a-col>-->
 
                       <!--                      <a-col :span="6">-->
                       <!--                        <a-select v-model="rentCharges.cycleUnit">-->
@@ -614,11 +614,11 @@
                       </a-col>
                       <a-col :span="2"><span>付</span></a-col>
                       <a-col :span="7">
-<!--                        <a-select v-model="rentCharges.num" @change="rentNumChange">-->
-<!--                          <a-select-option :value="1"> 付1 </a-select-option>-->
-<!--                          <a-select-option :value="2"> 付2 </a-select-option>-->
-<!--                          <a-select-option :value="3"> 付3 </a-select-option>-->
-<!--                        </a-select>-->
+                        <!--                        <a-select v-model="rentCharges.num" @change="rentNumChange">-->
+                        <!--                          <a-select-option :value="1"> 付1 </a-select-option>-->
+                        <!--                          <a-select-option :value="2"> 付2 </a-select-option>-->
+                        <!--                          <a-select-option :value="3"> 付3 </a-select-option>-->
+                        <!--                        </a-select>-->
                         <a-input-number v-model="rentCharges.num" :min="1" @change="rentNumChange"></a-input-number>
                       </a-col>
                     </a-form-model-item>
@@ -674,13 +674,13 @@
                           <a-col :span="5" v-else-if="item.chargeType == 5">
                             <a-input-number v-model="model.roomIds[roomIdsIndex].gasMeter" :min="0" placeholder="读数" style="width: 100%"></a-input-number>
                           </a-col>
-<!--                          <a-col :span="5" v-else-if="item.chargeType == 2">-->
-<!--                            /月-->
-<!--                          </a-col>-->
+                          <!--                          <a-col :span="5" v-else-if="item.chargeType == 2">-->
+                          <!--                            /月-->
+                          <!--                          </a-col>-->
 
                           <!--                          <a-col :span="5" v-else-if="item.chargeType == 2">-->
-<!--                            <a-input-number v-model="item.cycleNum" :min="0" placeholder="周期" style="width: 100%"></a-input-number>-->
-<!--                          </a-col>-->
+                          <!--                            <a-input-number v-model="item.cycleNum" :min="0" placeholder="周期" style="width: 100%"></a-input-number>-->
+                          <!--                          </a-col>-->
                           <!--                          <a-col :span="5" v-if="item.chargeType == 2">-->
                           <!--                            <a-select v-model="item.cycleUnit">-->
                           <!--                              <a-select-option :value="1"> 月 </a-select-option>-->
@@ -727,22 +727,22 @@
                     </a-select>
                   </a-form-model-item>
                 </a-col>
-                <a-col :span="24" v-if="model.orderInfo.customerType === 2">
-                  <a-card :bordered="true" style="width: 100%;padding: 0 !important;">
+                <a-col :span="12" v-if="model.orderInfo.customerType === 2" style="display: flex; justify-content: flex-end;">
+                  <a-card :bordered="true" style="width: 90%;padding: 0 !important; ">
                     <p>
                       <a-form-model-item
                         label="会员"
                         :labelCol="{
                           xs: { span: 24 },
-                          sm: { span: 2 },
+                          sm: { span: 4 },
                         }"
                         :wrapperCol="{
                           xs: { span: 24 },
-                          sm: { span: 22 },
+                          sm: { span: 20 },
                         }"
                         prop="orderInfo.vipCustomerId"
                       >
-                        <a-auto-complete v-model="vipCustomerData.name" @select="(e)=>handleSelectVip(e)" @search="handleSearchVip">
+                        <a-auto-complete v-model="vipCustomerData.name" @select="(e)=>handleSelectVip(e)" @search="handleSearchVip" style="width: 60%;">
                           <template slot="dataSource">
                             <a-select-option
                               :key="item.id"
@@ -754,18 +754,21 @@
                             </a-select-option>
                           </template>
                         </a-auto-complete>
+                        <a-button @click="addMember">增加</a-button>
                       </a-form-model-item>
                     </p>
                     <p>
                       <a-row>
-                        <a-col :span="8">名称:{{ vipCustomerData.name }}</a-col>
-                        <a-col :span="8">电话:{{ vipCustomerData.mobile }}</a-col>
-                        <a-col :span="8">级别:{{ vipCustomerData.gradeName }}</a-col>
+                        <a-col :span="12">名称:{{ vipCustomerData.name }}</a-col>
+                        <a-col :span="12">电话:{{ vipCustomerData.mobile }}</a-col>
+                      </a-row>
+                      <a-row>
+                        <a-col :span="12">级别:{{ vipCustomerData.gradeName }}</a-col>
+                        <a-col :span="12">余额:{{ vipCustomerData.balance }}</a-col>
                       </a-row>
                       <a-row>
-                        <a-col :span="8">余额:{{ vipCustomerData.balance }}</a-col>
-                        <a-col :span="8">积分:{{ vipCustomerData.integral }}</a-col>
-                        <a-col :span="8">卡号:{{ vipCustomerData.cardNo }}</a-col>
+                        <a-col :span="12">积分:{{ vipCustomerData.integral }}</a-col>
+                        <a-col :span="12">卡号:{{ vipCustomerData.cardNo }}</a-col>
                       </a-row>
                     </p>
                   </a-card>
@@ -883,7 +886,7 @@
                     财务信息
                   </h4>
                   <div v-if="model.orderInfo.bookingType !== 5">
-                    <a-switch v-model="depositSplit"/> 押金、房费分别记账到每个房间
+                    <a-switch v-model="depositSplit"/> 押金分别记账到每个房间
                   </div>
                 </div>
                 <a-divider />
@@ -898,22 +901,18 @@
                   style=" height: auto"
                 >
                   <template slot="prefPrice" slot-scope="text, record, index">
-                    <div>
+                    <div v-if="editPriceData[index].edit.length === 1">
+                      <a-input-number v-model="editPriceData[index].edit[0].price" @blur="editPriceOk"></a-input-number>
+                    </div>
+                    <div v-else>
                       {{ text }}<a-icon @click="onCellExpand(index)" style="margin-left:10px;" type="edit" />
-                    <!-- <editable-cell
-                      :text="text"
-
-                      @change.stop="onCellChange('prefPrice', index, $event)"
-                    /> -->
                     </div>
+<!--                    {{ text }}<a-icon @click="onCellExpand(index)" style="margin-left:10px;" type="edit" />-->
+
                   </template>
-                  <template slot="deposit" slot-scope="text, record, index">
-                    <!-- <editable-cell
-                      :text="text"
-                      @change="onCellChangeCopy('deposit', index, $event)"
-                    /> -->
-                    <a-input-number v-model="record.deposit" @change="onCellChangeCopy('deposit', index, $event)" :min="bookingPaidMoney == null ? 0 : bookingPaidMoney"></a-input-number>
-                  </template>
+                  <!--                  <template slot="deposit" slot-scope="text, record, index">-->
+                  <!--                    <a-input-number v-model="record.deposit" @change="onCellChangeCopy('deposit', index, $event)" :min="bookingPaidMoney == null ? 0 : bookingPaidMoney"></a-input-number>-->
+                  <!--                  </template>-->
                 </a-table>
                 <!-- 长租房账单-->
                 <a-table
@@ -928,30 +927,30 @@
                   class="zhandan_class "
                 >
                   <template slot="fangName" slot-scope="text, record, index" >
-<!--                    <div style="margin: 0px -16px;">-->
-<!--                      <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs"  class="table_list_item">-->
-<!--                        {{ record.name }}-->
-<!--                      </div>-->
-<!--                    </div>-->
+                    <!--                    <div style="margin: 0px -16px;">-->
+                    <!--                      <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs"  class="table_list_item">-->
+                    <!--                        {{ record.name }}-->
+                    <!--                      </div>-->
+                    <!--                    </div>-->
                     {{ record.name }}
                   </template>
                   <template slot="name" slot-scope="text, record, index" >
                     <div style="margin: 0 -16px;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">
-                      <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" :title="item.name"  class="table_list_item">
+                      <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" :title="item.name" class="table_list_item">
                         {{ item.name }}
                       </div>
                     </div>
                   </template>
                   <template slot="chargeType" slot-scope="text, record, index" >
                     <div style="margin: 0 -16px;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">
-                      <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs"  class="table_list_item">
+                      <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" class="table_list_item">
                         {{ getChargeTypeText(item.chargeType) }}
                       </div>
                     </div>
                   </template>
                   <template slot="marketPrice" slot-scope="text, record, index" >
                     <div style="margin: 0 -16px;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">
-                      <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs"  class="table_list_item">
+                      <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" class="table_list_item">
                         {{ getMarketPriceText(item) }}
                       </div>
                     </div>
@@ -1178,7 +1177,9 @@
                 </div>
                 <div style="display:flex;justify-content: end; margin-top:20px;">
 
-                  <a-checkbox defaultChecked>打印入住登记单</a-checkbox></div>
+                  <a-checkbox defaultChecked v-model="isPrintTemplate">打印入住登记单</a-checkbox>
+                  <a-checkbox defaultChecked>预览入住登记单</a-checkbox>
+                </div>
               </div>
             </div>
           </div>
@@ -1242,7 +1243,10 @@
     <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>
+    <history-modal ref="modalHistoryInfo" @ok="modalHistoryOk"></history-modal>
+    <bus-member-top-up-modal ref="modalMemberTopUp"></bus-member-top-up-modal>
+    <bus-member-card-modal ref="modalMemberCard" @ok="addMemberOk"></bus-member-card-modal>
+    <print-template-modal ref="modalPrintTemplate"></print-template-modal>
   </a-spin>
 </template>
 
@@ -1255,6 +1259,11 @@ import MemberCardModal from './MemberCardModal'
 import AgreementUnitModal from './AgreementUnitModal'
 import AgreementUnitModalTable from './AgreementUnitModalTable'
 import HistoryModal from './HistoryModal'
+import BusMemberTopUpModal from '@views/markets/modules/memberCard/BusMemberTopUp'
+import BusMemberCardModal from '@views/markets/modules/memberCard/BusMemberCardModal'
+import { goodBatchDel } from '@api/good'
+import PrintTemplate from '@views/settings/components/printTemplate'
+import PrintTemplateModal from '@views/settings/components/modules/printTemplateModal'
 const columns = [
   // {
   //     title: "",
@@ -1293,9 +1302,8 @@ const columns = [
     width: 60
   },
   {
-    title: '押金',
+    title: '应缴押金',
     dataIndex: 'deposit',
-    scopedSlots: { customRender: 'deposit' },
     width: 100
   }
 ]
@@ -1404,6 +1412,10 @@ const endDate = new Date(date.setDate(date.getDate() + 1))
 export default {
   name: 'BillRoomForm',
   components: {
+    PrintTemplateModal,
+    PrintTemplate,
+    BusMemberCardModal,
+    BusMemberTopUpModal,
     EditableCell,
     SelectRoomFormModal,
     MemberCardModal,
@@ -1421,6 +1433,7 @@ export default {
   },
   data() {
     return {
+      isPrintTemplate: true,
       i: 1,
       allChargeList: [],
       utcTxt: null,
@@ -1583,9 +1596,9 @@ export default {
   },
   computed: {
     editPriceData() {
-      // console.log()
       let copy = JSON.parse(JSON.stringify(this.model.roomPrices))
       if (this.model.orderInfo.bookingType === 1) {
+        copy.length > 0 ? console.log("计算属性进来了") : ''
         copy.forEach((item, index) => {
           let brr = []
           for (let j = 0; j < item.day; j++) {
@@ -1704,7 +1717,7 @@ export default {
         })
         this.editPriceOk()
       }
-      if (val == 1 ) {
+      if (val == 1) {
         debugger
         this.editPriceData.forEach(item => {
           let arr = {}
@@ -1971,7 +1984,6 @@ export default {
       if (res.success && res.result.records.length > 0) {
         console.log(res.result.records)
         res.result.records.forEach(e => {
-          console.log(e)
           if (e.layoutIds == null) {
             e.layoutIdArr = []
             return
@@ -2043,6 +2055,20 @@ export default {
     //  this.getcesRoomLayout();
   },
   methods: {
+    addMember() {
+      this.$refs.modalMemberCard.add()
+    },
+    addMemberOk() {
+      getAction('/business/busMemberCard/list', {
+        pageSize: 99999,
+        pageNo: 1
+      }).then((res) => {
+        if (res.success) {
+          this.busMemberCardList = res.result.records
+          this.oldBusMemberCardList = JSON.parse(JSON.stringify(this.busMemberCardList))
+        }
+      })
+    },
     getUserPayType(item) {
       // if (this.model.orderInfo.customerType === 2 && item.name === '单位挂账' ||
       // this.model.orderInfo.customerType === 3 && item.name === '会员卡' ||
@@ -2058,7 +2084,6 @@ export default {
       // }
       // return true
 
-
       if (item.name === '会员卡') {
         return this.model.orderInfo.customerType !== 2
       } else if (item.name === '单位挂账') {
@@ -2077,10 +2102,8 @@ export default {
         this.discount = 100
       }
       item.roomPrices.forEach(e => {
-        e.edit.forEach(ele => {
-          ele.price = this.getDayPrice(ele.day, e.layoutId)
-        })
-        e.prefPrice = e.edit[0].price
+        e.editPriceTime = []
+        // 会自动触发计算属性editPriceData,改变每日房价
       })
       this.editPriceOk()
     },
@@ -2107,7 +2130,6 @@ export default {
       this.monthCountChange(this.rentCharges.num)
 
       this.rentNumChange()
-
     },
     // 押数量改变
     depositNumChange(value) {
@@ -2143,10 +2165,10 @@ export default {
         return '抄表类燃气费'
       }
     },
-    getMarketPriceText(record){
+    getMarketPriceText(record) {
       let standard = ''
       standard = record.money + '元'
-      if (record.chargeType === 2){
+      if (record.chargeType === 2) {
         standard += '/月'
       }
       // if (record.cycleUnit === 1) {
@@ -2158,11 +2180,11 @@ export default {
       // }
       return standard
     },
-    getMeterText(charge, room){
-      if (charge.chargeType === 1 && charge.isMust){
+    getMeterText(charge, room) {
+      if (charge.chargeType === 1 && charge.isMust) {
         return '押' + charge.num
       }
-      if (charge.chargeType === 2 && charge.isMust){
+      if (charge.chargeType === 2 && charge.isMust) {
         return '付' + charge.num
       }
       if (charge.chargeType === 3) {
@@ -2174,7 +2196,6 @@ export default {
       if (charge.chargeType === 5) {
         return '起始读数: ' + room.gasMeter
       }
-
     },
     addCharges() {
       if (this.chargeType == null) {
@@ -2240,6 +2261,7 @@ export default {
       this.vipCustomerData = {}
       this.agreementUnitData = { customerName: '' }
       this.busMarketAgreementCustomer = {}
+      this.model.roomPrices.forEach(e => e.editPriceTime = [])
       this.discount = 100
       console.log(value)
       this.housePriceSchemeList = this.specialSchemeList.filter(e => e.guestType == null || e.guestType === value)
@@ -2341,7 +2363,9 @@ export default {
           var info = res.result
           if (info) {
             if (info.type === 0 && info.discount > 0 && this.model.orderInfo.roomPriceSlnId == null) {
+              this.model.roomPrices.forEach(e => e.editPriceTime = [])
               this.discount = info.discount
+              console.log(this.discount, 'this.discount')
               this.editPriceOk()
             }
             if (info.leaveTime != null && info.leaveTime !== '') {
@@ -2360,6 +2384,10 @@ export default {
         this.discount = info.discount
       }
     },
+    modalHistoryOk(record) {
+      let find = this.customerList.find(e => e.id === record.id)
+      find.blackStatus = record.blackStatus
+    },
     loadOrderFees() {
       getAction('/business/busOrderFee/getBookingDeposit', { bookingOrderId: this.model.orderInfo.id }).then(resp => {
         if (resp.success && resp.result.length > 0) {
@@ -2507,9 +2535,6 @@ export default {
           }
           roomIndex++
         })
-
-        console.log(orderFees, 'order')
-        debugger
         this.model.orderFees = orderFees
         this.model.orderFees = this.model.orderFees.concat(this.bookingPaidFee)
         setTimeout(() => {
@@ -2587,6 +2612,7 @@ export default {
      */
     editPriceOk() {
       this.model.roomPrices = JSON.parse(JSON.stringify(this.editPriceData))
+      console.log(this.model.roomPrices, 'this.model.roomPrices测试')
       this.model.roomPrices.forEach((ele, index) => {
         ele.editPriceTime = []
         ele.editPrice = []
@@ -2927,16 +2953,40 @@ export default {
     handleSelectMember(room, e) {
       console.log('room', room)
       let find = this.customerList.find((t) => t.id === e)
-      this.$set(room, 'key1', find.name)
-      this.$set(room, 'key2', find.gender)
-      this.$set(room, 'key3', '汉')
-      this.$set(room, 'key4', find.certNo)
-      this.$set(room, 'key5', find.phone)
-      this.$set(room, 'key6', find.address)
-      this.$set(room, 'customerId', find.id)
-      if (find.relationVipId !== null) {
-        this.handleSelectVip(find.relationVipId)
+      console.log(find, 'find---------------')
+      if (!find.blackStatus) {
+        this.$set(room, 'key1', find.name)
+        this.$set(room, 'key2', find.gender)
+        this.$set(room, 'key3', '汉')
+        this.$set(room, 'key4', find.certNo)
+        this.$set(room, 'key5', find.phone)
+        this.$set(room, 'key6', find.address)
+        this.$set(room, 'customerId', find.id)
+        if (find.relationVipId !== null) {
+          this.handleSelectVip(find.relationVipId)
+        }
+        return
       }
+      let that = this
+      this.$confirm({
+        title: '提示',
+        content: '该客人已在黑名单,是否确认入住',
+        okText: '确认',
+        cancelText: '取消',
+        closeOnClickModal: false,
+        onOk: () => {
+          that.$set(room, 'key1', find.name)
+          that.$set(room, 'key2', find.gender)
+          that.$set(room, 'key3', '汉')
+          that.$set(room, 'key4', find.certNo)
+          that.$set(room, 'key5', find.phone)
+          that.$set(room, 'key6', find.address)
+          that.$set(room, 'customerId', find.id)
+          if (find.relationVipId !== null) {
+            that.handleSelectVip(find.relationVipId)
+          }
+        }
+      })
     },
     pulsRoom() {
       var that = this
@@ -3345,7 +3395,18 @@ export default {
           console.log(this.model.roomPrices, 'this.model.roomPrices')
           console.log(this.editPriceIndex, 'this.editPriceIndex')
           var find = this.model.roomPrices[this.editPriceIndex]
+          console.log(find, 'find')
           if (!find) {
+            console.log(this.model.roomIds.layoutDayPrices,'this.model --------------')
+            let editPrice = []
+            let editPriceTime = []
+            console.log(this.model.roomIds.layoutDayPrices)
+            if (item.layoutDayPrices && item.layoutDayPrices.length > 0) {
+              item.layoutDayPrices.forEach(layoutDayPrice => {
+                editPriceTime.push(layoutDayPrice.dayTime)
+                editPrice.push(layoutDayPrice.price)
+              })
+            }
             var obj = {
               roomNo: item.name,
               roomId: item.id,
@@ -3355,7 +3416,9 @@ export default {
               roomFee: 0,
               deposit: this.compuleDeposit(item.marketPrice),
               layoutName: roomLayout ? roomLayout.name : '',
-              layoutId: item.layoutId
+              layoutId: item.layoutId,
+              editPrice: editPrice,
+              editPriceTime: editPriceTime
             }
             roomPrices.push(obj)
           } else {
@@ -3364,6 +3427,8 @@ export default {
           }
         })
         this.model.roomPrices = [...this.model.roomPrices, ...roomPrices]
+        console.log(roomPrices, 'this.model.roomPrices')
+        console.log(this.model.roomPrices, 'this.model.roomPrices')
         if (this.roomListCopy.length == 0) {
           this.roomListCopy = JSON.parse(JSON.stringify(this.model.roomPrices))
         } else {
@@ -3548,6 +3613,48 @@ export default {
         }
       })
     },
+    printTemplate(record) {
+      if (!this.isPrintTemplate) {
+        return
+      }
+      getAction('business/busPrintTemplate/list', { type: 8 }).then(resp => {
+        if (resp.success && resp.result.records.length > 0) {
+          resp.result.records[0].feeInfo = this.getPrintModal(record)
+          this.$refs.modalPrintTemplate.edit(resp.result.records[0])
+        }
+      })
+    },
+    getPrintModal(record) {
+      console.log(record, 'record============')
+      let obj = {
+        orderNo: 'NO202305172255',
+        customerName: record.roomIds[0].key1,
+        customerSex: record.roomIds[0].key2 === 1 ? '男' : '女',
+        customerPhone: record.roomIds[0].key5,
+        customerCard: record.roomIds[0].key4,
+        customerAddress: record.roomIds[0].key6,
+        arrivalTime: record.orderInfo.arrivalTime,
+        checkInTime: '2023-05-15 16:30',
+        dueOutTime: record.orderInfo.dueOutTime,
+        stayDuration: record.orderInfo.dayCount,
+        checkInType: record.orderInfo.bookingType,
+        customerType: record.orderInfo.customerType,
+        customerIsVip: 0, // 0-不是;1-是vip
+        memberCardNo: 'VIP001',
+        memberLevel: '5',
+        memberCardBalance: '280元',
+        memberCardIntegral: '1400积分',
+        layoutName: '单人间',
+        source: '美团',
+        deposit: '现金支付:100.00元',
+        roomPrice: '微信支付:100.00元',
+        totalPaid: '200',
+        marketName: '张三',
+        breakfastNum: 8,
+        roomNo: '8212'
+      }
+      return obj
+    },
     submitForm() {
       const that = this
       let record = JSON.parse(JSON.stringify(this.model))
@@ -3596,7 +3703,6 @@ export default {
         let chargeList = []
         if (this.chooseLongRentScheme == null || this.chooseLongRentScheme.id == null) {
           this.$message.warning('请选择长租房房价方案')
-          return
         }
         record.orderInfo.longSchemeId = this.chooseLongRentScheme.id
         this.collectionChargeList.forEach(e => {
@@ -3651,7 +3757,6 @@ export default {
       console.log('record', record)
       if (record.roomIds.length <= 0) {
         that.$message.warning('请先添加房间')
-        return
       }
       record.orderFees = record.orderFees.filter(t => !t.bookingYj)
       // return
@@ -3695,6 +3800,7 @@ export default {
               if (res.success) {
                 that.$message.success(res.message)
                 that.$emit('ok', { order: res.result, model: record })
+                that.printTemplate(record)
                 var arr = [
                   that.paymentSplit ? 1 : 2,
                   record.orderFees[0].subjectType == 1 ? 2 : 1,
@@ -3719,6 +3825,7 @@ export default {
                               order: res.result,
                               model: record
                             })
+                            that.printTemplate(record)
                           } else {
                             if (res.message.indexOf('与预约时间有冲突') >= 0) {
                             } else {

+ 1 - 0
src/views/room/modules/checkIn/BillRoomFormModal.vue

@@ -37,6 +37,7 @@ export default {
       });
     },
     addList(record,key,orderInfo) {
+      console.log(record,key,orderInfo, '-----------------------')
       this.visible = true;
       this.$nextTick(() => {
         this.$refs.realForm.addList(record,key,orderInfo);

+ 50 - 2
src/views/room/modules/checkIn/BillRoomInfo.vue

@@ -734,7 +734,8 @@
       ref="modalEditBookingTypeModal"
       @ok="modalFormOk"
     ></edit-booking-type-modal>
-
+    <continued-model ref="continuedModalVue" @ok="modalFormOk" ></continued-model>
+    <batch-card-modal-copy ref="batchCardModalCopy"></batch-card-modal-copy>
     <!-- 叫醒服务弹窗 -->
     <j-modal
       :title="'叫醒服务'"
@@ -801,6 +802,9 @@ import StrikeBalance from '@views/room/modules/checkIn/StrikeBalanceModel'
 import StrikeBalanceModel from '@views/room/modules/checkIn/StrikeBalanceModel'
 import EnterAccountModel from '@views/room/modules/checkIn/EnterAccountModel'
 import MeterReadingModal from '@views/room/modules/checkIn/MeterReadingModel'
+import ContinuedModel from '@views/room/modules/fangtaiModal/continuedModal/continuedModal'
+import BatchCardModalCopy from '@views/room/modules/checkIn/batchCardModalCopy'
+
 const columns0 = [
   {
     title: '房间号',
@@ -1048,6 +1052,7 @@ const endDate = new Date(date.setDate(date.getDate() + 1))
 export default {
   name: 'BusMeetingRoomForm',
   components: {
+    BatchCardModalCopy,
     MeterReadingModal,
     EnterAccountModel,
     StrikeBalanceModel,
@@ -1067,7 +1072,8 @@ export default {
     EditWarranterModal,
     EditRemarkModal,
     EditBreakfastNumModal,
-    EditBookingTypeModal
+    EditBookingTypeModal,
+    ContinuedModel
   },
   props: {
     // 表单禁用
@@ -2195,6 +2201,48 @@ export default {
         this.$emit('changeLoading', false)
       })
     },
+    stayOver() {
+      var index = this.model.livingRoomIds.findLastIndex(
+          (t) => t.roomId === this.selectRoomId
+      )
+      var find = this.model.livingRoomIds[index]
+      let obj = {
+        name: find.roomName,
+        id: find.roomId,
+        layoutId: find.roomLayoutId,
+        layoutName: find.layoutName,
+        customerName: find.livingCustomers[0].customerName,
+        phone: find.livingCustomers[0].phone,
+        arriveTime: find.livingOrder.arrivalTime,
+        dueOutTime: find.livingOrder.dueOutTime
+      }
+      this.$refs.continuedModalVue.makeCardInfo = obj
+      let record = {
+        livingOrderId: find.livingOrder.id,
+        bookingOrderId: find.livingOrder.bookingOrderId
+      }
+      this.$refs.continuedModalVue.edit(record)
+      this.$refs.continuedModalVue.title = '续住'
+      this.$refs.continuedModalVue.disableSubmit = false
+    },
+    makeCard() {
+      let index = this.model.livingRoomIds.findLastIndex(
+          (t) => t.roomId === this.selectRoomId
+      )
+      let find = this.model.livingRoomIds[index]
+      console.log(find, 'find')
+      let obj = {
+        name: find.roomName,
+        id: find.roomId,
+        layoutId: find.roomLayoutId,
+        layoutName: find.layoutName,
+        customerName: find.livingCustomers[0].customerName,
+        phone: find.livingCustomers[0].phone,
+        arriveTime: find.livingOrder.arrivalTime,
+        dueOutTime: find.livingOrder.dueOutTime
+      }
+      this.$refs.batchCardModalCopy.edit([obj])
+    },
     adjustPrice() {
       console.log(this.model.livingRoomIds, 'this.model.livingRoomIds')
       console.log(this.chooseLivingRoom)

+ 27 - 2
src/views/room/modules/checkIn/BillRoomInfoModal.vue

@@ -51,6 +51,24 @@
             撤销先走不结
           </a-button>
         </div>
+        <div class="menu" v-if="livingStatu === -1">
+          <a-icon @click="stayOver" type="calendar" style="color: #fff; font-size: 30px; width:120px; align-self: center;" />
+          <a-button @click="stayOver" type="link" style="width: 120px; text-align: center; align-self: center">
+            续住
+          </a-button>
+        </div>
+        <div class="menu" v-if="livingStatu === -1">
+          <a-icon @click="makeCard" type="credit-card" style="color: #fff; font-size: 30px; width:120px; align-self: center;" />
+          <a-button @click="makeCard" type="link" style="width: 120px; text-align: center; align-self: center">
+            制卡
+          </a-button>
+        </div>
+        <div class="menu" v-if="livingStatu === -1">
+          <a-icon  type="book" style="color: #fff; font-size: 30px; width:120px; align-self: center;" />
+          <a-button  type="link" style="width: 120px; text-align: center; align-self: center">
+            发票
+          </a-button>
+        </div>
         <div class="menu">
           <a-icon
             type="printer"
@@ -70,12 +88,13 @@
 
 <script>
 import BillRoomInfo from './BillRoomInfo'
-import { getAction, httpAction } from '@api/manage'
+import ContinuedModel from '@views/room/modules/fangtaiModal/continuedModal/continuedModal'
 
 export default {
   name: 'BillRoomInfoModal',
   components: {
-    BillRoomInfo
+    ContinuedModel,
+    BillRoomInfo,
   },
   data() {
     return {
@@ -165,6 +184,12 @@ export default {
     cancelHandleLeaveNotSettle() {
       this.$refs.realForm.handleLeaveNotSettle(false)
     },
+    stayOver() {
+      this.$refs.realForm.stayOver()
+    },
+    makeCard() {
+      this.$refs.realForm.makeCard()
+    },
     submitCallback() {
       this.$emit('ok')
       // this.visible = false;

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

@@ -11,7 +11,7 @@
                 <a-form-model ref="form" :model="model" :rules="validatorRules">
                   <a-col :span="9">
                     <a-form-model-item>
-                      <a-input v-model="queryParams.name" style="width: 80%" @pressEnter="loadData" placeholder="名称" />
+                      <a-input v-model="queryParams.name" style="width: 80%" @pressEnter="loadData" placeholder="名称/条码/简拼" />
                     </a-form-model-item>
                   </a-col>
                   <a-col :span="3">

+ 9 - 8
src/views/room/modules/checkIn/HistoryModal.vue

@@ -9,30 +9,31 @@
     @cancel="handleCancel"
     cancelText="关闭"
   >
-    <refund
+    <history-model-table
       :phone="phone"
       ref="realForm"
       @ok="submitCallback"
       :disabled="disableSubmit"
-    ></refund>
+    ></history-model-table>
   </j-modal>
 </template>
 
 <script>
-import Refund from "./HistoryModalTable.vue";
 
+import HistoryModelTable from '@views/room/modules/checkIn/HistoryModalTable'
 export default {
-  name: "RefundModal",
+  name: 'HistoryModel',
   components: {
-    Refund,
+    HistoryModelTable
+  ,
   },
   data() {
     return {
-      title: "历史入住信息",
+      title: '历史入住信息',
       width: 800,
       visible: false,
       disableSubmit: false,
-      phone: "",
+      phone: '',
     };
   },
   methods: {
@@ -66,4 +67,4 @@ export default {
     },
   },
 };
-</script>
+</script>

+ 22 - 13
src/views/room/modules/checkIn/HistoryModalTable.vue

@@ -18,7 +18,7 @@
                                 </a-form-item> -->
                                 手机号码:{{phone || ''}}
                             </a-col>
-                            
+
                         </a-row>
                         <a-row :gutter="24">
                             <a-col :span="12">
@@ -33,23 +33,27 @@
                                 </a-form-item> -->
                                 民族:{{(dataSource[0] || {}).nation || ''}}
                             </a-col>
-                            
                         </a-row>
                         <a-row :gutter="24">
                             <a-col :span="12">
                                 <!-- <a-form-item label="">
                                     <j-input placeholder="证件号码" v-model="queryParam.name" style="width: 200px"></j-input>
                                 </a-form-item> -->
-                                证件号码:{{(dataSource[0] || {}).cert_no || ''}}
+                                证件号码{{(dataSource[0] || {}).cert_no || ''}}
                             </a-col>
 
                             <a-col :span="12">
                                 <!-- <a-form-item label="">
                                     <j-input placeholder="会员" v-model="queryParam.name" style="width: 200px"></j-input>
                                 </a-form-item> -->
-                                会员:{{(dataSource[0] || {}).huiyuan || ''}}
+                                会员{{(dataSource[0] || {}).huiyuan || ''}}
                             </a-col>
                         </a-row>
+                        <a-row>
+                          <a-col :span="12">
+                            黑名单:<a-switch v-if="dataSource[0] != undefined" v-model="dataSource[0].black_status" @change="changeBlackStatus"></a-switch>
+                          </a-col>
+                        </a-row>
                     </a-form>
                 </div>
                 <!-- 查询区域-END -->
@@ -84,14 +88,8 @@
 <script>
 import { tree, delTree, goodBatchDel, goodSet } from '@/api/good'
 import { JeecgListMixin } from "@/mixins/JeecgListMixin";
-// import roomLayoutForm from './goodStock/goods'
-// import index from '/src/index.vue'
-// import stockTypeModel from './stockTypeModel.vue'
-// import Commodity from './moreSet/commodity.vue'
-// import GoodImg from './moreSet/goodImg.vue';
-// import moreSet from './moreSet/moreModal.vue'
 import { computed } from 'vue';
-// import SetUnit from './setUnit/index.vue'
+import { getAction } from '@api/manage'
 
 
 const tabListNoTitle=[
@@ -113,7 +111,7 @@ const tabListNoTitle=[
         },
       ]
 export default {
-    name: "goodList",
+    name: "HistoryModelTable",
     mixins: [JeecgListMixin],
     components: {
         // stockTypeModel,
@@ -270,6 +268,17 @@ export default {
         }
     },
     methods: {
+        changeBlackStatus(blackStatus) {
+          let obj = { id: this.dataSource[0].customer_id, blackStatus: blackStatus }
+          console.log(blackStatus, '--------------')
+          getAction('/bus/busCustomer/addBlackStatus', obj)
+              .then(resp => {
+                if (resp.success && resp.result) {
+                  this.$message.success(resp.message)
+                  this.$emit('ok', obj)
+                }
+              })
+        },
         // handleStockTypeModelManager(item,type) {
         //     this.$refs.indexTable.visible = true
         //     return
@@ -440,4 +449,4 @@ export default {
 
 .ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected {
     background-color: #bae7ff33;
-}</style>
+}</style>

+ 8 - 5
src/views/room/modules/checkIn/StrikeBalanceModel.vue

@@ -1,5 +1,5 @@
 <template>
-  <j-modal
+  <a-modal
     :title="title"
     :width="width"
     :visible="visible"
@@ -8,8 +8,7 @@
     :confirm-loading="confirmLoading"
     :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
     @cancel="handleCancel"
-    cancelText="关闭"
-  >
+    cancelText="关闭">
     <a-radio-group v-model="tebdata" style="margin-bottom: 16px">
       <a-radio-button value="small">金额冲账</a-radio-button>
       <a-radio-button value="default">商品冲账</a-radio-button>
@@ -57,7 +56,7 @@
         <a-textarea v-model=record.custorerOrderRemark></a-textarea>
       </template>
     </a-table>
-  </j-modal>
+  </a-modal>
 </template>
 
 <script>
@@ -104,7 +103,7 @@ const columns = [
     scopedSlots: { customRender: 'custorerOrderRemark'}
   },
   ]
-  const columnstwo = [
+const columnstwo = [
   {
     title: '房间',
     dataIndex: 'roomName',
@@ -174,6 +173,7 @@ export default {
       title: '',
       width: 1000,
       visible: false,
+      confirmLoading: false,
       disableSubmit: false,
       showYinshou: true,
       columns: columns,
@@ -259,6 +259,7 @@ export default {
         this.$message.warning('请填写需要冲账的金额或数量')
         return
       }
+      this.confirmLoading = true
       postAction('/business/busOrderFee/strike-balance', fees).then(resp => {
         if (resp.result) {
           this.$message.success('冲账成功')
@@ -267,6 +268,8 @@ export default {
         } else {
           this.$message.warning('冲账失败')
         }
+      }).finally(() => {
+        this.confirmLoading = false
       });
     },
     handleCancel() {

+ 32 - 20
src/views/room/modules/checkIn/batchCardDetailCopy.vue

@@ -20,7 +20,7 @@
                     <div style="display:flex;flex-direction:column;justify-content:center;height:100%;">
                         <div style="display:flex;align-items:center;justify-content:space-between">
                             <div>
-                                入住时长:{{'--'}}天
+                                入住时长:{{ roomList[roomIndex] && roomList[roomIndex].dayCount }}天
                             </div>
                             <div>
                                 已制卡:{{'--'}}张
@@ -28,11 +28,11 @@
                         </div>
                         <div>
                             <!-- 入住时间:{{roomList[roomIndex] && roomList[roomIndex].Info.arrivalTime2}} -->
-                            入住时间:{{'--'}}
+                            入住时间:{{ roomList[roomIndex] && roomList[roomIndex].arriveTime }}
                         </div>
                         <div>
                             <!-- 预离时间:{{roomList[roomIndex] && roomList[roomIndex].Info.dueOutTime2}} -->
-                            预离时间:{{'--'}}
+                            预离时间:{{ roomList[roomIndex] && roomList[roomIndex].dueOutTime }}
                         </div>
                     </div>
                 </a-col>
@@ -159,7 +159,7 @@ export default {
             console.log(index)
             if (index !== -1) {
               this.roomList[index].iscard = true
-              // 
+              //
               if (this.isChecked) {
                 if (index < this.roomList.length - 1) {
                   this.selectedRowKeys = [this.roomList[index + 1].id]
@@ -167,7 +167,6 @@ export default {
                   this.selectedRowKeys = [this.roomList[0].id]
                 }
               }
-
               this.$forceUpdate()
 
             }
@@ -185,26 +184,39 @@ export default {
             this.selectedRowKeys = [this.roomList[this.roomIndex].id]
 
         },
-        edit(record){
-            console.log(record);
-            // let arr = []
-            // arr = record.roomPrices
-            // console.log(arr);
-            // arr.forEach(ele=>{
-            //     ele.roomInfo = record.roomIds.filter(item=> item.roomId==ele.roomId)[0]
-            //     ele.Info = record.orderInfo
-            // })
-            // console.log(arr);
-
-
+        edit(record) {
+            console.log(record, 'record')
           if (record.length > 0) {
               this.selectedRowKeys = [record[0].id]
             }
-            this.roomList = record;
+          this.roomList = record;
+          this.roomList.forEach(e => {
+            if (!e.arriveTime || !e.dueOutTime) {
+              return
+            }
+            let dayCount = this.daysBetween(e.arriveTime, e.dueOutTime)
+            e.dayCount = dayCount
+          })
         },
-        submitForm(){
+        submitForm() {
             this.$emit('ok')
-        }
+        },
+        daysBetween(date1, date2) {
+          console.log(date1)
+          console.log(date2)
+          const oneDay = 24 * 60 * 60 * 1000 // hours*minutes*seconds*milliseconds
+          const firstDate = new Date(date1)
+          const secondDate = new Date(date2)
+          if (secondDate < firstDate) {
+            this.$message.warning('离开时间不能小于预离时间')
+            return
+          }
+          const diffDays = Math.round(Math.abs((firstDate - secondDate) / oneDay))
+          if (diffDays == 0) {
+            return 1
+          }
+          return diffDays
+      },
     }
 }
 </script>

+ 4 - 4
src/views/room/modules/checkIn/batchCardModalCopy.vue

@@ -7,17 +7,17 @@
     :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     @cancel="handleOk"
     cancelText="关闭">
-    <pos-type-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pos-type-form>
+    <batch-card-detail-copy ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></batch-card-detail-copy>
   </j-modal>
 </template>
 
 <script>
 
-  import PosTypeForm from './batchCardDetailCopy.vue'
+  import batchCardDetailCopy from './batchCardDetailCopy.vue'
   export default {
-    name: 'PosTypeModal',
+    name: 'BatchCardModalCopy',
     components: {
-      PosTypeForm
+      batchCardDetailCopy
     },
     data () {
       return {

+ 5 - 3
src/views/room/modules/checkIn/liveBatchCardForm.vue

@@ -427,10 +427,12 @@ export default {
     },
     edit(record) {
       this.model = Object.assign({}, record);
+      console.log(this.model)
+      console.log(this.roomList, 'roomList')
       this.roomList.forEach((t) => {
         t.floorRooms.forEach((f) => {
-          if (f.check && f.check == 1) {
-            this.model.rooms.push(f);
+          if (f.check && f.check === 1) {
+            this.model.rooms.push(f)
           }
         });
       });
@@ -474,7 +476,7 @@ export default {
         })
       })
       console.log(findRoom)
-      
+
       if (findRoom.length === 0) {
         this.$message.warning('未找到房间:' + this.roomNum)
       } else {

+ 2 - 2
src/views/room/modules/checkIn/liveBatchCardModal.vue

@@ -55,8 +55,8 @@ export default {
       this.$refs.realForm.submitForm();
     },
     submitCallback(e) {
-      console.log("e", e);
-      
+      console.log("eeeeeeeeeeeeeee", e);
+
       this.$emit("ok", e);
       this.visible = false;
     },

+ 12 - 6
src/views/room/modules/fangtaiModal/continuedModal/continuedForm.vue

@@ -422,10 +422,8 @@ export default {
       this.edit(this.modelDefault);
     },
     edit(record) {
-      this.model = Object.assign(this.model, {
-        livingOrderId: record.livingData.livingOrder.id,
-        bookingOrderId: record.livingData.livingOrder.bookingOrderId,
-      })
+      console.log(record, 'record=============')
+      this.model = Object.assign(this.model, record)
       // this.model.startValue = record.livingData.livingOrder.dueOutTime
       this.visible = true
       this.loadDate()
@@ -436,6 +434,7 @@ export default {
     submitForm() {
       const that = this
       let params = []
+      let cardInfoList = []
       if (this.selectionRows.length === 0) {
         that.$emit("ok");
         return
@@ -459,6 +458,13 @@ export default {
           dueOutTime: moment(e.newDueOutTime).format('yyyy-MM-DD HH:mm')
         }
         params.push(obj)
+        let cardInfo = {
+          customerName: e.customerName,
+          phone: e.phone,
+          arriveTime: moment(e.arrivalTime).format('yyyy-MM-DD HH:mm'),
+          dueOutTime: moment(e.newDueOutTime).format('yyyy-MM-DD HH:mm')
+        }
+        cardInfoList.push(cardInfo)
       })
       httpAction(`/business/busRoomBookingOrders/isBooked`, params, 'post')
           .then(res => {
@@ -480,7 +486,7 @@ export default {
                       .then((res) => {
                         if (res.success) {
                           that.$message.success(res.message)
-                          that.$emit('ok')
+                          that.$emit('ok', cardInfoList)
                         } else {
                           that.$message.warning(res.message);
                         }
@@ -496,7 +502,7 @@ export default {
                   .then((res) => {
                     if (res.success) {
                       that.$message.success(res.message);
-                      that.$emit("ok");
+                      that.$emit("ok", cardInfoList);
                     } else {
                       that.$message.warning(res.message);
                     }

+ 13 - 7
src/views/room/modules/fangtaiModal/continuedModal/continuedModal.vue

@@ -20,7 +20,7 @@
   import batchCardModalCopy from './../../../modules/checkIn/batchCardModalCopy'
   import ContinuedForm from '@views/room/modules/fangtaiModal/continuedModal/continuedForm'
   export default {
-    name: 'PosTableModal',
+    name: 'ContinuedModel',
     components: {
       ContinuedForm,
       batchCardModalCopy
@@ -42,9 +42,9 @@
         })
       },
       edit (record) {
-        this.visible=true,
-        this.$nextTick(()=>{
-          this.$refs.realForm.edit(record);
+        this.visible = true
+        this.$nextTick(() => {
+          this.$refs.realForm.edit(record)
         })
       },
       close () {
@@ -54,9 +54,15 @@
       handleOk () {
         this.$refs.realForm.submitForm();
       },
-      submitCallback(e) {
-        this.$emit('ok', e);
-        this.$refs.batchCardModalCopy.edit([this.makeCardInfo])
+      submitCallback(record) {
+        console.log(record, '===================')
+        console.log(this.makeCardInfo, '===================')
+        this.$emit('ok', record);
+        record.forEach(e => {
+          Object.assign(e, this.makeCardInfo)
+        })
+        console.log(record, '===================')
+        this.$refs.batchCardModalCopy.edit(record)
         this.visible = false;
 
       },

+ 3 - 1
src/views/room/modules/fangtaiModal/exchangeHouses/exchangeHousesForm.vue

@@ -745,7 +745,9 @@ export default {
                                   ...this.newRoom,
                                   layoutName: this.model.layout.name,
                                   customerName: this.model.livingData.livingCustomers.customerName,
-                                  phone: this.model.livingData.livingCustomers.phone
+                                  phone: this.model.livingData.livingCustomers.phone,
+                                  arriveTime: this.model.livingData.livingOrder.arrivalTime,
+                                  dueOutTime: this.model.livingData.livingOrder.dueOutTime
                                 }
                                 that.$emit('ok', [obj])
                             } else {

+ 9 - 17
src/views/room/modules/schedule/EditScheduleRoomForm.vue

@@ -843,7 +843,9 @@ export default {
           layoutId: e.roomLayoutId,
           layoutName: e.layoutName,
           customerName: this.model.contactName,
-          phone: this.model.phone
+          phone: this.model.phone,
+          arriveTime: this.model.orderInfo.arrivalTime,
+          dueOutTime: this.model.orderInfo.dueOutTime
         }
         recrod.push(param)
       })
@@ -1146,22 +1148,11 @@ export default {
       });
     },
     addCustomer() {
+      console.log(this.model, '-------------')
       if (this.model.roomIds.some(e => e.roomId == null || e.roomId === '')) {
         this.$message.warning('请先排房')
         return;
       }
-      //  this.$refs.modalCustomerForm.edit({
-      //   customerName: this.model.contactName,
-      //   phone: this.model.phone,
-      //   roomId: record.roomId,
-      //   gender: 1,
-      //   certType: 1,
-      //   bookingRoomId: record.id,
-      //   customerId: this.model.orderInfo.contactId,
-      // });
-      // this.$refs.modalCustomerForm.title = "添加同住";
-      // this.$refs.modalCustomerForm.disableSubmit = false;
-      // console.log(this.model)
       let roomInfo = []
       this.model.roomIds.forEach(e => {
         let param = {
@@ -1170,10 +1161,11 @@ export default {
           bookingOrderId: e.bookingOrdersId,
           layoutId: e.roomLayoutId,
           name: e.roomName,
-          marketPrice: e.layoutDayPrices[0].price,
+          marketPrice: e.marketPrice,
           key1: this.model.contactName,
           key5: this.model.phone,
-          customerId: this.model.contactId
+          customerId: this.model.contactId,
+          layoutDayPrices: e.layoutDayPrices
         }
         roomInfo.push(param)
       })
@@ -1183,8 +1175,8 @@ export default {
       delete orderInfo.arrivalTime
       console.log(orderInfo)
       this.$refs.ModalBillRoomForm.addList(roomInfo, '1', orderInfo)
-      this.$refs.ModalBillRoomForm.title =
-          e.key == '1' ? '散客入住登记' : '团队入住登记'
+      this.$refs.ModalBillRoomForm.title = '散客入住登记'
+          // e.key == '1' ? '散客入住登记' : '团队入住登记'
       this.$refs.ModalBillRoomForm.disableSubmit = false
     },
     modalBillRoomFormOk() {

+ 83 - 14
src/views/room/modules/schedule/ScheduleRoomForm.vue

@@ -339,6 +339,21 @@
                   <span v-else style="color:red;font-size: .8em;">
                     不支持此时长
                   </span>
+                  <a-popover placement="right" >
+                    <template slot="content">
+                      <div style="max-height:400px;overflow:auto;width:100%;">
+                        <div v-for="(dayPrice, index) in record.layoutDayPrices" :key="index">
+                          {{ dayPrice.dayTime }}
+                          <a-input-number :min="0" v-model="record.layoutDayPrices[index].price" @change="ssssss(record, record.layoutDayPrices[index])"></a-input-number>
+                        </div>
+                      </div>
+                    </template>
+<!--                    <template slot="title">-->
+<!--                      <a-input-number :min="0" @change="batchPrice($event,record)" placeholder="批量改价"></a-input-number>-->
+<!--                    </template>-->
+                    <a-icon type="edit" @click="ssssss(record.layoutDayPrices)"/>
+                  </a-popover>
+
                 </template>
                 <template slot="presetNum" slot-scope="text, record, index">
                   <div>
@@ -648,6 +663,10 @@ export default {
     })
   },
   methods: {
+    ssssss(e, data){
+      this.$set()
+      this.$forceUpdate()
+    },
     handleSelectAgreementUnit(value) {
       let result = this.busMarketAgreementUnitList.find((t) => t.id == value)
       this.model.orderInfo.contractTeamId = value
@@ -752,9 +771,36 @@ export default {
               })
             })
           })
-          console.log(this.canUserRooms)
-          console.log(res.result, 'res.result')
+          let canUserRoomsCopy = JSON.parse(JSON.stringify(this.canUserRooms))
           this.canUserRooms = res.result
+          this.canUserRooms.forEach(e => {
+            var find = canUserRoomsCopy.find(copy => copy.layout.id === e.layout.id)
+            let layoutDayPrices = []
+            // 循环预约天数,设置每日价格
+            for (let i = 0; i < this.model.orderInfo.dayCount; i++) {
+              if (this.model.arrivalTime2 == null) {
+                this.model.arrivalTime2 = moment(new Date()).format('YYYY-MM-DD')
+              }
+              // 递增日期
+              let day = this.addDate(this.model.arrivalTime2, i)
+              let price = e.layout.favPrice
+              if (find) {
+                // 已有的每日房价不改变
+                let dayPriceFind = find.layoutDayPrices.find(dayPrices => dayPrices.dayTime === day)
+                if (dayPriceFind) {
+                  price = dayPriceFind.price
+                }
+              }
+              let editPrice = {
+                dayTime: day,
+                price: price,
+                bookingType: 1,
+                roomLayoutId: e.layout.id
+              }
+              layoutDayPrices.push(editPrice)
+            }
+            this.$set(e, 'layoutDayPrices', layoutDayPrices)
+          })
         }
       })
     },
@@ -950,6 +996,21 @@ export default {
       this.model.orderInfo.vipCustomerId = find.id
       this.vipInfo = find
     },
+    // 根据传入的数字将日期加上对应的天数
+    addDate(date, days) {
+      let time = new Date(date)
+      time.setDate(time.getDate() + days)
+
+      let m = time.getMonth() + 1
+      let d = time.getDate()
+      if (m < 10) {
+        m = '0' + m
+      }
+      if (d < 10) {
+        d = '0' + d
+      }
+      return time.getFullYear() + '-' + m + '-' + d
+    },
     moment,
     onChange(date, dateString) {
       console.log(date, dateString)
@@ -1007,6 +1068,7 @@ export default {
     submitForm() {
       const that = this
       that.model.roomIds = []
+      let layoutDayPriceArr = []
       that.canUserRooms.forEach((t) => {
         var lastlayoutId = t.layout.id
         t.buildingRooms.forEach((b) => {
@@ -1023,20 +1085,27 @@ export default {
         for (var i = len; i < t.layout.presetNum; i++) {
           that.model.roomIds.push({ layoutId: t.layout.id, roomId: null })
         }
-        for (var b = 0; b < that.model.orderInfo.dayCount; b++) {
-          if (t.layout.presetNum > 0) {
-            var dayTime = moment(this.model.orderInfo.arrivalTime2)
-              .add(b, 'days')
-              .format('YYYY-MM-DD')
-            that.model.layoutDayPrices.push({
-              bookingType: 1,
-              dayTime: dayTime,
-              price: t.layout.favPrice,
-              roomLayoutId: t.layout.id
-            })
-          }
+        console.log(t.layoutDayPrices,'t.layoutDayPrices')
+        that.model.layoutDayPrices = t.layoutDayPrices
+        if (t.rooms && t.rooms.length > 0) {
+          // layoutDayPriceArr = [..layoutDayPriceArr, ..t.layoutDayPrices ]
+          layoutDayPriceArr.push(...t.layoutDayPrices)
         }
+        // for (var b = 0; b < that.model.orderInfo.dayCount; b++) {
+        //   if (t.layout.presetNum > 0) {
+        //     var dayTime = moment(this.model.orderInfo.arrivalTime2)
+        //       .add(b, 'days')
+        //       .format('YYYY-MM-DD')
+        //     that.model.layoutDayPrices.push({
+        //       bookingType: 1,
+        //       dayTime: dayTime,
+        //       price: t.layout.favPrice,
+        //       roomLayoutId: t.layout.id
+        //     })
+        //   }
+        // }
       })
+      that.model.layoutDayPrices = layoutDayPriceArr
       that.model.orderInfo.bookingOrdersId = this.bookingOrdersId
       if (that.model.roomIds.length <= 0) {
         that.$message.warning('请先添加房间')

+ 0 - 1
src/views/room/scheduledetail.vue

@@ -152,7 +152,6 @@ export default {
   },
   methods: {
     getCallback(e) {
-      console.log("getCallback", e);
       this.busRoomBookingOrders = e;
       this.roomCount = e.roomIds.length;
       this.scheduleRoomList = e.roomIds.filter(

+ 1 - 1
src/views/settings/components/modules/printComponents/checkInPrint.vue

@@ -318,7 +318,7 @@
                 default() {
                     return {
                         orderNo: "NO202305172255",
-                        customerName:"彭张",
+                        customerName:"彭张",
                         customerSex:"男",
                         customerPhone:"17485748574",
                         customerCard:"431222198902125566",

+ 2 - 1
src/views/settings/components/modules/printTemplateForm.vue

@@ -120,7 +120,7 @@
         </div>
         <div v-else-if="model.type == 8">
 <!--          <djd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks" :defModel="model"></djd>-->
-            <rzdjd ref="printContent" :sizeTypeClass="sizeTypeClass" :defContent="model.remarks" :defModel="model"></rzdjd>
+            <rzdjd ref="printContent" :sizeTypeClass="sizeTypeClass" :defContent="model.remarks" :defModel="model" :feeInfo="model.feeInfo"></rzdjd>
         </div>
         <div v-else-if="model.type == 9">
           <posjzd ref="printContent" :defModel="model" :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></posjzd>
@@ -296,6 +296,7 @@
             } else {
                 this.sizeTypeClass = "mm80"
             }
+          console.log('模板测试===============')
             this.visible = true;
         },
         submitForm() {

+ 4 - 6
src/views/settings/components/roomModules/housingPriceSetting.vue

@@ -46,17 +46,15 @@
             </a-radio-group>
           </a-col>
           <a-col :span="24">
-              <house-price-scheme-list v-if="priceScheme == '1'"></house-price-scheme-list>
-              <long-rent-scheme v-if="priceScheme == '2'"></long-rent-scheme>
-            </a-col>
+            <house-price-scheme-list v-if="priceScheme == '1'"></house-price-scheme-list>
+            <long-rent-scheme v-if="priceScheme == '2'"></long-rent-scheme>
+          </a-col>
         </a-form-model-item>
       </a-row>
     </a-form-model>
     <house-price-scheme-setting-model ref="housePriceSchemeSetting"></house-price-scheme-setting-model>
   </div>
 </template>
-
-
 <script>
 import housePriceSchemeDetailList from '@views/settings/components/roomModules/modules/housePriceSchemeDetailList'
 import allDaysRoomFeeRule from '@views/settings/components/roomModules/allDaysRoomFeeRule'
@@ -66,7 +64,7 @@ import longRentScheme from '@views/settings/components/roomModules/longRentSchem
 import HousePriceSchemeSettingModel from '@views/settings/components/roomModules/housePriceSchemeSettingModel'
 
 export default {
-  name: 'housingPriceSetting',
+  name: 'HousingPriceSetting',
   components: {
     HousePriceSchemeSettingModel,
     housePriceSchemeDetailList,

+ 4 - 0
src/views/settings/components/roomModules/longRentSchemeModel.vue

@@ -104,6 +104,9 @@
 
 let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
 import { httpAction, getAction, postAction } from '@/api/manage'
+
+const _info = JSON.parse(localStorage.getItem("storeInfo"));
+
 export default {
   name: 'longRentSchemeModel',
 
@@ -216,6 +219,7 @@ export default {
             return
           }
           that.newScheme.houseLongRentChargeList = chargeList
+          that.newScheme.hotelId = _info.id
           postAction(that.url, that.newScheme
           ).then((res) => {
             if (res.success) {

+ 83 - 27
src/views/settings/marketMemberList.vue

@@ -1,31 +1,80 @@
 <template>
   <a-card style="width: 100%; height:100%;">
-      <a-tabs default-active-key="1">
-          <a-tab-pane key="1">
-              <span slot="tab">
-                  会员等级
-              </span>
-              <member-list></member-list>
-          </a-tab-pane>
-          <a-tab-pane key="2">
-              <span slot="tab">
-                  充值配置
-              </span>
-              <market-recharge-list></market-recharge-list>
-          </a-tab-pane>
-          <a-tab-pane key="3">
-              <span slot="tab">
-                  会员配置
-              </span>
-              <bus-market-member-lable-list></bus-market-member-lable-list>
-          </a-tab-pane>
-          <a-tab-pane key="4">
-              <span slot="tab">
-                  自动赠券
-              </span>
-              <bus-market-coupons-event-list></bus-market-coupons-event-list>
-          </a-tab-pane>
-      </a-tabs>
+
+
+    <a-form-model>
+      <a-row>
+        <a-form-model-item style="margin-bottom: 0px">
+          <a-radio-group v-model="setType" style="margin-bottom: 16px" button-style="solid">
+            <a-radio-button value="1">会员列表</a-radio-button>
+            <a-radio-button value="2">会员充值</a-radio-button>
+            <a-radio-button value="3">会员等级</a-radio-button>
+            <a-radio-button value="4">会员分组</a-radio-button>
+            <a-radio-button value="5">自动赠券</a-radio-button>
+          </a-radio-group>
+        </a-form-model-item>
+        <a-col :span="24">
+          <bus-member-list v-if="setType === '1'"></bus-member-list>
+        </a-col>
+        <a-form-model-item v-if="setType === '2'">
+          <a-col :span="24">
+            <a-radio-group v-model="topUp" style="margin-bottom: 16px" button-style="solid">
+              <a-radio-button value="1">活动设置</a-radio-button>
+              <a-radio-button value="2">会员充值</a-radio-button>
+            </a-radio-group>
+          </a-col>
+          <a-col :span="24">
+            <market-recharge-list v-if="topUp === '1'"></market-recharge-list>
+            <bus-member-balance-log-list v-if="topUp === '2'"></bus-member-balance-log-list>
+          </a-col>
+        </a-form-model-item>
+        <a-form-model-item v-if="setType === '3'">
+          <a-col :span="24">
+            <member-list></member-list>
+          </a-col>
+        </a-form-model-item>
+        <a-form-model-item v-if="setType === '4'">
+          <a-col :span="24">
+            <bus-market-member-lable-list></bus-market-member-lable-list>
+          </a-col>
+        </a-form-model-item>
+        <a-form-model-item v-if="setType === '5'">
+          <a-col :span="24">
+            <bus-market-coupons-event-list></bus-market-coupons-event-list>
+          </a-col>
+        </a-form-model-item>
+      </a-row>
+    </a-form-model>
+
+
+
+
+    <!--      <a-tabs default-active-key="1">-->
+<!--          <a-tab-pane key="1">-->
+<!--              <span slot="tab">-->
+<!--                  会员等级-->
+<!--              </span>-->
+<!--              <member-list></member-list>-->
+<!--          </a-tab-pane>-->
+<!--          <a-tab-pane key="2">-->
+<!--              <span slot="tab">-->
+<!--                  充值配置-->
+<!--              </span>-->
+<!--              <market-recharge-list></market-recharge-list>-->
+<!--          </a-tab-pane>-->
+<!--          <a-tab-pane key="3">-->
+<!--              <span slot="tab">-->
+<!--                  会员配置-->
+<!--              </span>-->
+<!--              <bus-market-member-lable-list></bus-market-member-lable-list>-->
+<!--          </a-tab-pane>-->
+<!--          <a-tab-pane key="4">-->
+<!--              <span slot="tab">-->
+<!--                  自动赠券-->
+<!--              </span>-->
+<!--              <bus-market-coupons-event-list></bus-market-coupons-event-list>-->
+<!--          </a-tab-pane>-->
+<!--      </a-tabs>-->
   </a-card>
 </template>
 
@@ -34,9 +83,13 @@ import memberList from './components/memberList.vue';
 import marketRechargeList from './components/marketRechargeList.vue';
 import BusMarketMemberLableList from './components/BusMarketMemberLableList.vue';
 import BusMarketCouponsEventList from './components/BusMarketCouponsEventList.vue';
+import BusMemberList from '@views/markets/member'
+import BusMemberBalanceLogList from '@views/markets/memberrecharge'
 
 export default {
   components:{
+    BusMemberBalanceLogList,
+    BusMemberList,
     memberList,
     marketRechargeList,
     BusMarketMemberLableList,
@@ -44,7 +97,10 @@ export default {
   },
   data() {
       return {
-
+        setType: '1',
+        priceSetting: '0',
+        topUp: '1',
+        priceScheme: '1'
       }
   }
 }

+ 7 - 7
src/views/settings/roomSettings.vue

@@ -30,13 +30,13 @@
                 </span>
         <housing-price-setting></housing-price-setting>
       </a-tab-pane>
-<!--      <a-tab-pane key="5">-->
-<!--                <span slot="tab">-->
-<!--                    <a-icon type="history"/>-->
-<!--                    钟点房计费-->
-<!--                </span>-->
-<!--        <hour-room-rule-list></hour-room-rule-list>-->
-<!--      </a-tab-pane>-->
+      <a-tab-pane key="5">
+                <span slot="tab">
+                    <a-icon type="history"/>
+                    会员设置
+                </span>
+        <hour-room-rule-list></hour-room-rule-list>
+      </a-tab-pane>
 <!--      <a-tab-pane key="6">-->
 <!--                <span slot="tab">-->
 <!--                    <a-icon type="file"/>-->