Browse Source

修改退款和付款弹框

覃浩 2 years ago
parent
commit
11ad923cfe

+ 30 - 30
src/views/room/fangtailive.vue

@@ -1154,7 +1154,7 @@ export default {
   },
   watch: {
     activeKey(key) {
-      console.log('activeKey', key)
+      // console.log('activeKey', key)
     },
     '$route'(to, from) {
       this.loadData()
@@ -1242,7 +1242,7 @@ export default {
       hotelId: _info.id,
       dictId: '1639538915239743490'
     }).then((res) => {
-      console.log(res);
+      // console.log(res);
       if (res.success) {
         var list = []
         res.result.records.forEach((item) => {
@@ -1282,8 +1282,8 @@ export default {
     })
     this.loadData()
     
-    console.log(this.roomCard);
-    console.log(this.roomList);
+    // console.log(this.roomCard);
+    // console.log(this.roomList);
   },
   mounted() {
     // this.handleBillInfo();
@@ -1453,7 +1453,7 @@ export default {
     },
 
     liveBatchCardOk(e) {
-      console.log(e)
+      // console.log(e)
       this.$refs.batchCardModalCopy.edit(e)
     },
 
@@ -1485,7 +1485,7 @@ export default {
         this.$refs.modalSelectCheckInRoomOrder.hotelId =
             this.roomList[0].hotelId
       } else {
-        console.log(selectRoom)
+        // console.log(selectRoom)
         this.$confirm({
           title: '提示',
           content: '确定关联房间?',
@@ -1593,7 +1593,7 @@ export default {
       this.$refs.ModalScheduleRoom.disableSubmit = false
     },
     handleMenuClick(e) {
-      console.log('click', e)
+      // console.log('click', e)
       var selectRoom = []
       try {
         this.roomList.forEach((t) => {
@@ -1692,7 +1692,7 @@ export default {
       }, 200)
     },
     handleBillInfo(roomLive) {
-      console.log('handleBillInfo', roomLive)
+      // console.log('handleBillInfo', roomLive)
       if (this.timeId) {
         clearTimeout(this.timeId)
       }
@@ -1706,7 +1706,7 @@ export default {
           })
         }
       } else {
-        console.log(roomLive)
+        // console.log(roomLive)
         this.$refs.ModalBillRoomInfo.add(
           roomLive.livingData.livingOrder.bookingOrderId,
           1,
@@ -1748,18 +1748,18 @@ export default {
     },
     onChange() {},
     onCheck(value, label, extra) {
-      console.log('onCheck', value)
-      console.log(
-        'checkedroomBuildingFloorList',
-        this.checkedroomBuildingFloorList
-      )
+      // console.log('onCheck', value)
+      // console.log(
+      //   'checkedroomBuildingFloorList',
+      //   this.checkedroomBuildingFloorList
+      // )
     },
     checkChange(e) {
-      console.log('e', e)
-      console.log(
-        'checkedroomBuildingFloorList',
-        this.checkedroomBuildingFloorList
-      )
+      // console.log('e', e)
+      // console.log(
+      //   'checkedroomBuildingFloorList',
+      //   this.checkedroomBuildingFloorList
+      // )
       var list = this.oldRoomList
       // 筛选房型
       if (this.checkedCesRoomLayoutList.length > 0) {
@@ -1803,7 +1803,7 @@ export default {
       }
       // 筛选房间信息
       if (this.checkedCestList.length > 0) {
-        console.log(this.checkedCestList);
+        // console.log(this.checkedCestList);
         // 过滤掉没有客人的房间
         list = list.reduce((acc, curr) => {
           const rooms = curr.rooms.filter(room => {
@@ -1813,10 +1813,10 @@ export default {
           return acc
         }, [])
         // 筛选出对应服务的房间信息
-        console.log(list);
+        // console.log(list);
         this.checkedCestList.forEach(item => {
-          console.log(item);
-          console.log(list);
+          // console.log(item);
+          // console.log(list);
             list = list.reduce((acc, curr) => {
               // if(item == '3') {
                 const rooms = curr.rooms.filter(room => {
@@ -1841,7 +1841,7 @@ export default {
             }, [])
         })
       }
-      console.log(list);
+      // console.log(list);
       // 筛选对客服务
       if (this.checkedStateList.length > 0) {
         // 过滤掉没有客人的房间
@@ -1904,11 +1904,11 @@ export default {
           return acc
         }, [])
       }
-      console.log('list2', list)
+      // console.log('list2', list)
       this.roomList = list
     },
     roomStatusChange(e) {
-      console.log("e", e);
+      // console.log("e", e);
       var list = this.oldRoomList;
       if (this.checkedRoomStatusList.length > 0) {
         list = this.oldRoomList.reduce((acc, curr) => {
@@ -1919,7 +1919,7 @@ export default {
           return acc;
         }, []);
       }
-      console.log("list2", list);
+      // console.log("list2", list);
       this.roomList = list;
     },
     collapseClick(row, value) {
@@ -1946,7 +1946,7 @@ export default {
         this.$message.warning('请先选择房间')
         return
       }
-      console.log('selectRoom', selectRoom)
+      // console.log('selectRoom', selectRoom)
       this.$refs.modalForm.add({ roomRepairList: selectRoom })
       this.$refs.modalForm.title = '维修'
       this.$refs.modalForm.disableSubmit = false
@@ -1964,7 +1964,7 @@ export default {
         this.$message.warning('请先选择房间')
         return
       }
-      console.log('selectRoom', selectRoom)
+      // console.log('selectRoom', selectRoom)
       this.$refs.ModalLockRoom.add({ roomLockList: selectRoom })
       this.$refs.ModalLockRoom.title = '锁房'
       this.$refs.ModalLockRoom.disableSubmit = false
@@ -2003,7 +2003,7 @@ export default {
         this.$message.warning('请先选择房间')
         return
       }
-      console.log('selectRoom', selectRoom)
+      // console.log('selectRoom', selectRoom)
       if (this.roomClear) {
         this.$refs.ModalCleanRoom.add({ roomCleanList: selectRoom })
         this.$refs.ModalCleanRoom.title = '清理房间'

+ 45 - 18
src/views/room/modules/checkIn/BillRoomInfo.vue

@@ -1535,7 +1535,7 @@ export default {
       return find ? find.name : ''
     },
     getRoomName(id) {
-      console.log(this.model.livingRoomIds)
+      // console.log(this.model.livingRoomIds)
       var index = this.model.livingRoomIds.findLastIndex((t) => t.roomId == id)
       var find = this.model.livingRoomIds[index]
       return find ? find.roomName : ''
@@ -1862,27 +1862,54 @@ export default {
       })
       if (count == 0) {
         let differMoney = this.feesAmount - this.paymentAmount
-        this.$refs.modalPayOrRefundForm.edit({
-          money: differMoney,
-          collection: this.paymentAmount,
-          consumption: this.feesAmount,
-          subjectType: 5,
-          feeType: 2,
-          bookingOrderId: this.model.orderInfo.id,
-          livingOrderId:
-              livingRoom.roomId != '1' ? livingRoom.livingOrder.id : '',
-          vipCustomerId: livingRoom.livingOrder.vipCustomerId,
-          contractTeamId: livingRoom.livingOrder.contractTeamId,
-          contractTeamProtocolId: livingRoom.livingOrder.contractTeamProtocolId,
-          preferentialType: 1,
-          couponFirstAmount: 0,
-          discount: 9,
-          isRefund: differMoney > 0
-        })
+        // console.log(livingRoom);
+        console.log(this.model.livingRoomIds);
+        if (this.model.livingRoomIds.length >= 2) {
+          var templistid = []
+          for (let index = 1; index < this.model.livingRoomIds.length; index++) {
+            // const element = array[index];
+            templistid.push(this.model.livingRoomIds[index].livingOrder.id)
+          }
+          // console.log(templistid);
+        }
+        
         if (differMoney > 0) {
+          this.$refs.modalPayOrRefundForm.edit({
+            money: differMoney,
+            collection: this.paymentAmount,
+            consumption: this.feesAmount,
+            subjectType: 5,
+            feeType: 2,
+            bookingOrderId: this.model.orderInfo.id,
+            livingOrderId:
+                livingRoom.roomId != '1' ? livingRoom.livingOrder.id : '',
+            vipCustomerId: livingRoom.livingOrder.vipCustomerId,
+            contractTeamId: livingRoom.livingOrder.contractTeamId,
+            contractTeamProtocolId: livingRoom.livingOrder.contractTeamProtocolId,
+            preferentialType: 1,
+            couponFirstAmount: 0,
+            discount: 9,
+            isRefund: differMoney > 0
+          })
           this.$refs.modalPayOrRefundForm.title = '结账收款'
           // this.$refs.modalPayOrRefundForm.isRefund = false
         } else {
+          this.$refs.modalPayOrRefundForm.edit({
+            money: differMoney,
+            collection: this.paymentAmount,
+            consumption: this.feesAmount,
+            subjectType: 5,
+            feeType: 2,
+            bookingOrderId: this.model.orderInfo.id,
+            livingOrderId: templistid,
+            vipCustomerId: livingRoom.livingOrder.vipCustomerId,
+            contractTeamId: livingRoom.livingOrder.contractTeamId,
+            contractTeamProtocolId: livingRoom.livingOrder.contractTeamProtocolId,
+            preferentialType: 1,
+            couponFirstAmount: 0,
+            discount: 9,
+            isRefund: differMoney > 0
+          })
           this.$refs.modalPayOrRefundForm.title = '结账退款'
           // this.$refs.modalPayOrRefundForm.isRefund = true
         }

+ 390 - 99
src/views/room/modules/checkIn/PayOrRefund.vue

@@ -8,122 +8,154 @@
         slot="detail"
       >
         <a-row>
-          <a-col :span="24">
-            <a-form-model-item
-              label="收款金额"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-            >
-              {{ model.collection.toFixed(2) }}元
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item
-              label="消费金额"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-            >
-              {{ model.consumption.toFixed(2) }}元
-              <a-switch v-model="model.coupon" />优惠
-            </a-form-model-item>
-          </a-col>
+          <!-- <a-col :span="12">
 
-          <template v-if="model.coupon">
-            <a-col :span="24">
-              <a-form-model-item
-                label="优惠方式"
+          </a-col> -->
+          <div class="crad_style">
+            <a-col :span="8" class="refund_style" v-show="showYinshou">
+              <!-- <a-form-model-item
+                :label="&quot;结账应&quot; + (model.money < 0 ? &quot;退&quot; : &quot;收&quot;)"
                 :labelCol="labelCol"
                 :wrapperCol="wrapperCol"
-                prop="refund"
-              >
-                <a-radio-group v-model="model.preferentialType">
-                  <a-radio :value="1"> 抹零 </a-radio>
-                  <a-radio :value="2"> 减现 </a-radio>
-                  <a-radio :value="3"> 打折 </a-radio>
-                </a-radio-group>
-                <template
-                  v-if="model.preferentialType === 3"
-                >打<a-input-number
-                  style="width: 50px"
-                  v-model="model.discount"
-                  :min="1"
-                  :max="9"
-                ></a-input-number
-                >折
-                </template>
-              </a-form-model-item>
+                prop="money"
+              > -->
+              <span>{{ &quot;应&quot; + (model.money < 0 ? &quot;退&quot; : &quot;收&quot;) }}: {{ Math.abs(model.money.toFixed(2)) }}元</span>
+              <!-- </a-form-model-item> -->
             </a-col>
-            <a-col :span="24" v-if="model.preferentialType == 2">
+            <a-col :span="16">
               <a-form-model-item
-                label="优惠金额"
+                label="收款金额"
                 :labelCol="labelCol"
                 :wrapperCol="wrapperCol"
-                prop="couponFirstAmount"
               >
-                <a-input-number
-                  style="width: 100px"
-                  :min="0"
-                  v-model="model.couponFirstAmount"
-                  placeholder="请输入优惠金额"
-                ></a-input-number
-                >元
+              
+                {{ model.collection.toFixed(2) }}元
               </a-form-model-item>
-            </a-col>
-            <a-col :span="24">
               <a-form-model-item
-                label="惠后金额"
+                label="消费金额"
                 :labelCol="labelCol"
                 :wrapperCol="wrapperCol"
               >
-                {{ couponAmount.toFixed(2) }}元
+                {{ model.consumption.toFixed(2) }}元
+                <a-switch v-model="model.coupon" />优惠
+                <a-radio-group v-if='model.coupon' v-model="model.preferentialType">
+                  <a-radio :value="1"> 抹零 </a-radio>
+                  <a-radio :value="2"> 减现 </a-radio>
+                  <a-radio :value="3"> 打折 </a-radio>
+                </a-radio-group>
+                <template
+                    v-if="model.preferentialType === 3"
+                  >打<a-input-number
+                    style="width: 50px"
+                    v-model="model.discount"
+                    :min="1"
+                    :max="9"
+                  ></a-input-number
+                  >折
+                  </template>
               </a-form-model-item>
-            </a-col>
-            <a-col :span="24">
+              <!-- <a-col :span="24" v-if="model.preferentialType == 2"> -->
+                <div v-if="model.preferentialType == 2">
+                <a-form-model-item
+                  label="优惠金额"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="couponFirstAmount"
+                >
+                  <a-input-number
+                    style="width: 100px"
+                    :min="0"
+                    v-model="model.couponFirstAmount"
+                    placeholder="请输入优惠金额"
+                  ></a-input-number
+                  >元
+                </a-form-model-item>
+              </div>
               <a-form-model-item
-                label="优惠券"
+                  label="优惠券"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="refund"
+                >
+                  <a-select
+                    v-if="model.couponCard"
+                    v-model="model.couponId"
+                    style="width: 200px"
+                    placeholder="优惠券"
+                    :allowClear="true"
+                  >
+                    <a-select-option
+                      :value="couponItem.id"
+                      v-for="couponItem in memeberCouponList"
+                      :key="couponItem.id"
+                    >{{ couponItem.couponsName }}</a-select-option
+                    >
+                  </a-select>
+                  <a-switch v-model="model.couponCard" />使用优惠券
+                </a-form-model-item>
+                <a-form-model-item
+                  label="惠后金额"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                >
+                  {{ couponAmount.toFixed(2) }}元
+                </a-form-model-item>
+              <!-- </a-col> -->
+              
+              <template v-if="model.coupon">
+              <!-- <a-col :span="24">
+                <a-form-model-item
+                  label="优惠方式"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="refund"
+                >
+                  <a-radio-group v-model="model.preferentialType">
+                    <a-radio :value="1"> 抹零 </a-radio>
+                    <a-radio :value="2"> 减现 </a-radio>
+                    <a-radio :value="3"> 打折 </a-radio>
+                  </a-radio-group>
+                  <template
+                    v-if="model.preferentialType === 3"
+                  >打<a-input-number
+                    style="width: 50px"
+                    v-model="model.discount"
+                    :min="1"
+                    :max="9"
+                  ></a-input-number
+                  >折
+                  </template>
+                </a-form-model-item>
+              </a-col> -->
+              
+              <!-- <a-col :span="24">
+                
+                <a-col :span="24">
+                
+              </a-col>
+              </a-col> -->
+            </template>
+            <!-- <a-form-model-item
+                :label="&quot;实&quot; + (this.isRefund ? &quot;退&quot; : &quot;收&quot;) + &quot;金额&quot;"
                 :labelCol="labelCol"
                 :wrapperCol="wrapperCol"
-                prop="refund"
               >
-                <a-select
-                  v-if="model.couponCard"
-                  v-model="model.couponId"
-                  style="width: 200px"
-                  placeholder="优惠券"
-                  :allowClear="true"
-                >
-                  <a-select-option
-                    :value="couponItem.id"
-                    v-for="couponItem in memeberCouponList"
-                    :key="couponItem.id"
-                  >{{ couponItem.couponsName }}</a-select-option
-                  >
-                </a-select>
-                <a-switch v-model="model.couponCard" />使用优惠券
+                {{ realityAmount.toFixed(2) }}元
               </a-form-model-item>
             </a-col>
-          </template>
+            <a-col :span="24">
+              
+            </a-col> -->
 
-          <a-col :span="24" v-show="showYinshou">
-            <a-form-model-item
-              :label="&quot;结账应&quot; + (model.money < 0 ? &quot;退&quot; : &quot;收&quot;)"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="money"
-            >
-              {{ Math.abs(model.money.toFixed(2)) }}元
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item
-              :label="&quot;实&quot; + (this.isRefund ? &quot;退&quot; : &quot;收&quot;) + &quot;金额&quot;"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-            >
-              {{ realityAmount.toFixed(2) }}元
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
+            
+
+            
+            <!-- <a-col :span="24">-->
+              
+            </a-col> 
+          </div>
+         <div class="presentation_style" v-if="model.money > 0">应收金额=消费合计/惠后金额-已收合计</div> 
+          <a-col :span="14" class="receipt_style" v-if="model.money > 0">
             <a-form-model-item
               :label="(this.isRefund ? &quot;退&quot; : &quot;收&quot;) + &quot;款金额&quot;"
               :labelCol="labelCol"
@@ -196,7 +228,7 @@
               </div>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <a-col :span="14" class="settle_style" v-if="model.money > 0">
             <a-form-model-item
               :label="&quot;实&quot; + (this.isRefund ? &quot;退&quot; : &quot;收&quot;) + &quot;合计&quot;"
               :labelCol="labelCol"
@@ -205,6 +237,28 @@
               {{ Math.abs(sumAmount.toFixed(2)) }}元
             </a-form-model-item>
           </a-col>
+          <div class="presentation_style_two" v-if="model.money < 0">退款:</div> 
+          <a-col :span="24">
+            <a-table :columns="columns" :data-source="feeList" bordered>
+              <template slot="payType" slot-scope="text, record, index">
+                {{ getPayTypeText(text) }}
+              </template>
+              <template slot="subjectType" slot-scope="text, record, index">
+                {{ getSubjectTypeText(text,record) }}
+              </template>
+              <template slot="roomId" slot-scope="text, record, index">
+                {{ getRoomName(text) }}
+              </template>
+              <template slot="refundType" slot-scope="text, record, index">
+                <a-select style="width: 100px" v-model="record.refundType">
+                  <a-select-option v-for="(item, key) in payTypeList" :key="key" :value="item.id" :disabled="item.disable">{{ item.name }}</a-select-option>
+                </a-select>
+              </template>
+              <template slot="prerefund" slot-scope="text, record, index">
+                <a-input-number :max="record.money - record.returnMoney" v-model="record.prerefund"></a-input-number>
+              </template>
+            </a-table>
+          </a-col>
           <a-col :span="24" style="text-align: end">
             <a-checkbox default-checked>打印结账单</a-checkbox>
             <a-checkbox default-checked>打印发票二维码</a-checkbox>
@@ -216,7 +270,7 @@
 </template>
 
 <script>
-import { httpAction, getAction } from '@/api/manage'
+import { httpAction, getAction,postAction } from '@/api/manage'
 import { validateDuplicateValue } from '@/utils/util'
 import moment from 'moment/moment'
 
@@ -238,6 +292,7 @@ export default {
   },
   data() {
     return {
+      feeList: [],
       isRefund: false,
       model: {
         coupon: false,
@@ -293,6 +348,97 @@ export default {
       memeberCouponList: [],
       agreementUnitData: {},
       copyRealityAmount: '', // 原本值
+      allFeeMoney: 0,
+      allReturnFee: 0,
+      columns: [
+        {
+          title: '收款时间',
+          dataIndex: 'createTime',
+          width: '25%',
+        },
+        {
+          title: '收款金额(元)',
+          dataIndex: 'id',
+          width: '15%',
+          customRender: function (text, record) {
+            return record.money
+          }
+        },
+        {
+          title: '退款方式',
+          dataIndex: 'payType',
+          width: '40%',
+          scopedSlots: { customRender: 'refundType' }
+        },
+        {
+          title: '退款金额(元)',
+          dataIndex: 'prerefund',
+          scopedSlots: { customRender: 'prerefund' }
+        },
+        {
+          title: '已退金额(元)',
+          dataIndex: 'returnMoney',
+        },
+      ],
+//       [
+//   {
+//     title: '房间号',
+//     dataIndex: 'roomName',
+//     width: 80,
+//     align: 'center',
+//     // scopedSlots: { customRender: 'roomId' }
+//   },
+//   {
+//     title: '支付类型',
+//     dataIndex: 'payType',
+//     align: 'center',
+//     width: 80,
+//     scopedSlots: { customRender: 'payType' }
+//   },
+//   {
+//     title: '费项',
+//     dataIndex: 'subjectType',
+//     align: 'center',
+//     width: 100,
+//     scopedSlots: { customRender: 'subjectType' }
+//   },
+//   {
+//     title: '入账日期',
+//     dataIndex: 'dayTime',
+//     align: 'center',
+//     width: 110,
+//     customRender: function (text, record) {
+//       return record.createTime.substring(0, 10)
+//     }
+//   },
+//   {
+//     title: '支付金额',
+//     dataIndex: 'id',
+//     align: 'center',
+//     width: 90,
+//     customRender: function (text, record) {
+//       return record.money
+//     }
+//   },
+//   {
+//     title: '退款方式',
+//     // dataIndex: 'id',
+//     align: 'center',
+//     width: 130,
+//     scopedSlots: { customRender: 'refundType' }
+//   },
+//   {
+//   title: '本次退款',
+//   dataIndex: 'prerefund',
+//     align: 'center',
+//     scopedSlots: { customRender: 'prerefund' }
+//   },
+//   {
+//     title: '已退款',
+//     align: 'center',
+//     dataIndex: 'returnMoney',
+//   }
+// ]
     }
   },
   computed: {
@@ -319,7 +465,6 @@ export default {
         }
       } else {
         sum = this.model.consumption
-        debugger
       }
       return sum
     },
@@ -353,6 +498,7 @@ export default {
     }
     // 备份model原始值
     this.modelDefault = JSON.parse(JSON.stringify(this.model))
+    // this.refundRequest()
     // getAction("/business/busRoomPayType/list", {
     //   pageSize: 99999,
     //   pageNo: 1,
@@ -467,7 +613,9 @@ export default {
       this.edit(this.modelDefault)
     },
     edit(record) {
+      // console.log(record);
       this.model = Object.assign({}, record)
+      // console.log(this.model);
       this.isRefund = this.model.isRefund
       // if (record.preferentialMoney !== 0 && record.preferentialMoney !== null) {
       //   console.log(record.preferentialMoney)
@@ -477,6 +625,7 @@ export default {
       //   this.model.couponFirstAmount = record.preferentialMoney
       // }
       this.getbusRoomPayType()
+      this.refundRequest()
       if (this.model.vipCustomerId) {
         this.getMemeberCouponList()
       }
@@ -614,7 +763,106 @@ export default {
               })
         }
       })
-    }
+    },
+    // 退款列表请求数据
+    refundRequest() {
+      let returnFeeList = []
+      // let feeList = []
+      console.log(this.model);
+      let livingOrderIds = this.model.livingOrderId
+      console.log(livingOrderIds);
+      if (this.model.money < 0) {
+        postAction('/business/busOrderFee/refundList', livingOrderIds
+        // pageNo: 1,
+        // pageSize: 99,
+        // conditions: 900,
+        // mobile: this.model.vipCustomerId
+      ).then((res) => {
+        if (res.success) {
+          this.feeList = res.result
+        }
+        
+        let templist = this.feeList
+        templist.forEach(e => {
+          if (e.returnItem == true) {
+            e.money = -e.money;
+            returnFeeList.push(e)
+          }
+        })
+        console.log(templist);
+        console.log(returnFeeList);
+        
+        templist.forEach(e => {
+          let returnMoney = returnFeeList.filter(ele => e.id === ele.returnFeeId).reduce((accumulator, ele) => accumulator + ele.money, 0)
+          e.returnMoney = returnMoney;
+        })
+        templist.forEach(cust => [
+          // let tempfeelist = returnFeeList.filter(curr => {curr.returnFeeId == cust.id})
+          // let tempfeelist = returnFeeList.filter(function(item, index, array) {
+          //   return curr.returnFeeId == cust.id
+          // })
+          // console.log(tempfeelist);
+          returnFeeList.forEach(curr => {
+            if (cust.returnFeeId == curr.returnFeeId) {
+              let tempindex = templist.findIndex(temp => temp == cust)
+              templist.splice(tempindex,1)
+            }
+          })
+        ])
+        
+        console.log(returnFeeList);
+        // templist.forEach(e => {
+        //   if (e.returnItem == true) {
+        //     e.money = -e.money;
+        //     returnFeeList.push(e)
+        //   } else {
+        //     // 如果是收款
+        //     // e.returnMoney = 0
+        //     // e.prerefund = 0
+        //     // var room = this.model.filter(room => room.roomId === e.roomId)
+        //     // e.roomName = room[0].roomName
+        //     // this.$set(e, 'refundType', e.payType)
+        //     // let payTypeList = JSON.parse(JSON.stringify(this.payTypeList));
+        //     // console.log(room[0].livingOrder.vipCustomerId)
+        //     // console.log(room[0].livingOrder.contractTeamId)
+        //     // console.log(vipIndex)
+        //     // console.log(danweiIndex)
+        //     // this.$set(payTypeList[vipIndex], 'disable', room[0].livingOrder.vipCustomerId == null || room[0].livingOrder.vipCustomerId === '')
+        //     // this.$set(payTypeList[danweiIndex], 'disable', room[0].livingOrder.contractTeamId == null)
+        //     // this.$set(e, 'payTypeList', payTypeList)
+        //     // feeList.push(e)
+        //   }
+        // })
+        // this.feeList = feeList
+        // this.allFeeMoney = 0
+        // this.allReturnFee = 0
+        // this.feeList.forEach(e => {
+        //   // 当前收款对象下所有的退款记录
+        //   let returnMoney = returnFeeList.filter(ele => e.id === ele.returnFeeId).reduce((accumulator, ele) => accumulator + ele.money, 0)
+        //   e.returnMoney = returnMoney;
+        //   this.allFeeMoney += e.money;
+        //   this.allReturnFee += returnMoney;
+        //   // console.log(returnMoney);
+        // })
+        // console.log(this.feeList);
+        // console.log(this.templist);
+        // this.feeList.forEach(index => {
+        //   templist.forEach(item => {
+        //     if (index.id == item.returnFeeId) {
+        //       let tempindex = this.feeList.findIndex(item)
+        //       this.feeList.slice(tempindex,1)
+        //     }
+        //   })
+        // })
+        
+        // this.feeList.forEach(item => {
+          
+        // })
+      })
+      }
+      
+    },
+
   }
 }
 </script>
@@ -635,4 +883,47 @@ export default {
   cursor: not-allowed;
   opacity: 0.5;
 }
+.refund_style {
+  font-size: 32px;
+  color: red;
+  text-align: center;
+  padding-top: 7%;
+  /* margin: 0 auto; */
+  /* display: inline-block; */
+  /* margin-top: 60px; */
+  
+}
+.crad_style {
+  display: flex;
+  background-color: #fcfcfc;
+  width: 100%;
+  border-radius: 5%;
+}
+.ant-col-16 {
+  border-left: 2px solid #fc9424;
+}
+.ant-form-item {
+  margin-bottom: 16px;
+}
+.presentation_style {
+  /* font-size: ; */
+  color: #fc9424;
+  padding-left: 25px;
+  padding-bottom: 5px;
+  border-bottom: 1px solid #fc9424;
+  padding-top: 10px;
+}
+.presentation_style_two {
+  /* padding-left: 25px; */
+  /* padding-bottom: 5px; */
+  border-top: 1px solid #fc9424;
+  margin-top: 10px;
+  padding: 20px 0px 5px 25px;
+}
+.receipt_style {
+  margin-top: 30px;
+}
+.settle_style {
+  color: red !important;
+}
 </style>

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

@@ -28,7 +28,7 @@ export default {
   data() {
     return {
       title: "",
-      width: 800,
+      width: 1200,
       visible: false,
       disableSubmit: false,
       showYinshou: true,

+ 3 - 0
src/views/room/modules/checkIn/RefundModal.vue

@@ -258,6 +258,7 @@ export default {
             // 如果是收款
             e.returnMoney = 0
             e.prerefund = 0
+            console.log(this.model);
             var room = this.model.filter(room => room.roomId === e.roomId)
             e.roomName = room[0].roomName
             this.$set(e, 'refundType', e.payType)
@@ -274,6 +275,7 @@ export default {
         })
         this.feeList = feeList
         console.log(this.feeList)
+        console.log(feeList)
         if (returnFeeList.length === 0) {
           return
         }
@@ -286,6 +288,7 @@ export default {
           this.allFeeMoney += e.money;
           this.allReturnFee += returnMoney;
         })
+        console.log(this.feeList);
       })
     }
   }

+ 7 - 0
src/views/settings/components/roomModules/housePriceSchemeList.vue

@@ -30,6 +30,13 @@
                 <a-button @click="batchDel" type="danger" icon="delete">批量删除</a-button>
             </a-dropdown>
         </div>
+        <!-- <div class="table-operator">
+            <a-tabs v-model:activeKey="activeKey">
+                <a-tab-pane key="1" tab="Tab 1">Content of Tab Pane 1</a-tab-pane>
+                <a-tab-pane key="2" tab="Tab 2" force-render>Content of Tab Pane 2</a-tab-pane>
+                <a-tab-pane key="3" tab="Tab 3">Content of Tab Pane 3</a-tab-pane>
+            </a-tabs>
+        </div> -->
 
         <!-- table区域-begin -->
         <div>

+ 58 - 16
src/views/settings/components/roomModules/modules/housePriceSchemeDetailList.vue

@@ -1,11 +1,16 @@
 <template>
     <a-card :bordered="false" :schemeId="schemeId">
+        <a-radio-group v-model="tablemode" :style="{ marginBottom: '8px' }">
+            <a-radio-button value="ordinaryDays">平日房价</a-radio-button>
+            <a-radio-button value="weekend">周末房价</a-radio-button>
+        </a-radio-group>
         <div>
             <a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns"
                      :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{
                     selectedRowKeys: selectedRowKeys,
                     onChange: onSelectChange,
-                }" class="j-table-force-nowrap" @change="handleTableChange">
+                }" class="j-table-force-nowrap" @change="handleTableChange"
+                :rowKey="(record, index) => index + 1">
                 <template slot="openSlot" slot-scope="text, record, index">
                     <a-switch checked-children="开" un-checked-children="关" default-checked :checked="record.open == 1"
                               @change="e=>changeOpenState(e,record)" />
@@ -43,7 +48,8 @@
                 </template>
 
                 <span slot="action" slot-scope="text, record">
-                    <a @click="handleMoney(record)">查看房价</a>
+                    <a @click="handleReset(record)">重置</a>
+                    <a @click="handleMoney(record)">房价日历</a>
                 </span>
             </a-table>
         </div>
@@ -79,36 +85,66 @@
                 // 表头
                 columns: [
                     {
-                        title:'房间类型',
+                        title: "序号",
+                        align: 'center',
+                        customRender: (text, record, index) => index + 1,
+                    },
+                    {
+                        title:'房型',
+                        align:"center",
+                        dataIndex: 'layoutName'
+                    },
+                    {
+                        title:'间数(间)1',
                         align:"center",
                         dataIndex: 'layoutName'
                     },
+                    // {
+                    //     title:'门市价',
+                    //     align:"center",
+                    //     dataIndex: 'layoutPrice'
+                    // },
                     {
-                        title:'门市价',
+                        title:'挂牌价(元)1',
                         align:"center",
                         dataIndex: 'layoutPrice'
                     },
                     {
-                        title:'执行房价',
+                        title:'前台价(散客)1',
                         align:"center",
-                        dataIndex: 'money',
-                        scopedSlots: {customRender: "moneySlot"},
+                        dataIndex: 'layoutPrice'
                     },
                     {
-                        title:'早餐数量',
+                        title:'微信小程序(散客)1',
                         align:"center",
-                        dataIndex: 'breakfastNumber',
-                        scopedSlots: {customRender: "breakfastNumberSlot"},
+                        dataIndex: 'layoutPrice'
                     },
                     {
-                        title:'默认离店时间',
+                        title:'钟点房间(元/小时)1',
                         align:"center",
-                        dataIndex: 'departureTime',
-                        // customRender:function (text) {
-                        //     return !text?"":(text.length>10?text.substr(0,10):text)
-                        // },
-                        scopedSlots: {customRender: "departureTimeSlot"},
+                        dataIndex: 'layoutPrice'
                     },
+                    // {
+                    //     title:'执行房价',
+                    //     align:"center",
+                    //     dataIndex: 'money',
+                    //     scopedSlots: {customRender: "moneySlot"},
+                    // },
+                    // {
+                    //     title:'早餐数量',
+                    //     align:"center",
+                    //     dataIndex: 'breakfastNumber',
+                    //     scopedSlots: {customRender: "breakfastNumberSlot"},
+                    // },
+                    // {
+                    //     title:'默认离店时间',
+                    //     align:"center",
+                    //     dataIndex: 'departureTime',
+                    //     // customRender:function (text) {
+                    //     //     return !text?"":(text.length>10?text.substr(0,10):text)
+                    //     // },
+                    //     scopedSlots: {customRender: "departureTimeSlot"},
+                    // },
                     {
                         title: '查看每日房价',
                         dataIndex: 'action',
@@ -133,6 +169,7 @@
                 queryParam: {
                   schemeId: this.schemeId
                 },
+                tablemode: 'ordinaryDays'
             }
         },
         created() {
@@ -225,7 +262,12 @@
                 this.$refs.modalForm.title="每日房价"
                 this.$refs.modalForm.visible = true
                 this.$refs.modalForm.edit(record);
+            },
+            // 重置按钮
+            handleReset() {
+                
             }
+
         }
     }
 </script>

+ 1 - 1
src/views/settings/components/roomModules/modules/housePriceSchemeDetailModal.vue

@@ -24,7 +24,7 @@
         data () {
             return {
                 title:'',
-                width:950,
+                width:1350,
                 visible: false,
                 disableSubmit: false,
                 schemeId:null,