瀏覽代碼

处理文档中的问题

许智捷 2 年之前
父節點
當前提交
29a5d1ee33

+ 6 - 2
src/views/room/guestorders.vue

@@ -307,6 +307,7 @@ export default {
       });
       });
     },
     },
     handleInfo(record) {
     handleInfo(record) {
+      // 预约单
       if (this.queryParam.type == 2) {
       if (this.queryParam.type == 2) {
         this.$router.push({
         this.$router.push({
           name: "room-scheduledetail",
           name: "room-scheduledetail",
@@ -315,7 +316,10 @@ export default {
           },
           },
         });
         });
       } else {
       } else {
-        this.$refs.ModalBillRoomInfo.add(record.id, 1);
+        // 入住单
+        debugger
+        console.log(record)
+        this.$refs.ModalBillRoomInfo.add(record.bookingOrderId, 1, null, record.id);
         this.$refs.ModalBillRoomInfo.title = "账单";
         this.$refs.ModalBillRoomInfo.title = "账单";
         this.$refs.ModalBillRoomInfo.disableSubmit = true;
         this.$refs.ModalBillRoomInfo.disableSubmit = true;
       }
       }
@@ -325,4 +329,4 @@ export default {
 </script>
 </script>
 <style scoped>
 <style scoped>
 @import "~@assets/less/common.less";
 @import "~@assets/less/common.less";
-</style>
+</style>

+ 78 - 115
src/views/room/modules/checkIn/BillRoomInfo.vue

@@ -368,30 +368,28 @@
           </h4>
           </h4>
           <div style="display: flex">
           <div style="display: flex">
             <div
             <div
-              @click="addProjectFee"
-              style="display: flex; flex-direction: column"
-              :class="`${selectRoomId == '1' || chooseLivingRoom.livingOrder && chooseLivingRoom.livingOrder.settleType !== -1 ? 'disabled' : ''}`">
+                @click="strikeBalance"
+                style="display: flex; flex-direction: column">
               <a-icon
               <a-icon
-                type="tool"
-                style="color: rgba(255, 141, 26, 1); font-size: 18px"
+                  type="pound"
+                  style="color: rgba(255, 141, 26, 1); font-size: 18px"
               /><a-button
               /><a-button
                 type="link"
                 type="link"
-              >
-                增加消费
-              </a-button>
+            >
+              冲账
+            </a-button>
             </div>
             </div>
             <div
             <div
-              :class="`${consumSelectedRowKeys.length == 0 || selectRoomId == '1' || chooseLivingRoom.livingOrder && chooseLivingRoom.livingOrder.settleType !== -1 ? 'disabled' : ''}`"
-              @click="tuidan"
-              style="display: flex; flex-direction: column">
+              @click="addProjectFee"
+              style="display: flex; flex-direction: column"
+              :class="`${selectRoomId == '1' || chooseLivingRoom.livingOrder && chooseLivingRoom.livingOrder.settleType !== -1 ? 'disabled' : ''}`">
               <a-icon
               <a-icon
-                type="import"
+                type="tool"
                 style="color: rgba(255, 141, 26, 1); font-size: 18px"
                 style="color: rgba(255, 141, 26, 1); font-size: 18px"
               /><a-button
               /><a-button
                 type="link"
                 type="link"
-                :disabled="consumSelectedRowKeys.length == 0 || selectRoomId == '1'"
               >
               >
-                退单
+                增加消费
               </a-button>
               </a-button>
             </div>
             </div>
             <div style="display: flex; flex-direction: column">
             <div style="display: flex; flex-direction: column">
@@ -415,24 +413,13 @@
           :pagination="false"
           :pagination="false"
           :scroll="{ y: 160 }"
           :scroll="{ y: 160 }"
           rowKey="id"
           rowKey="id"
-          :row-selection="rowSelection"
         >
         >
           <template slot="subjectType" slot-scope="text, record, index">
           <template slot="subjectType" slot-scope="text, record, index">
-            {{ getSubjectTypeText(text) }}
+            {{ getSubjectTypeText(text,record) }}
           </template>
           </template>
           <template slot="roomId" slot-scope="text, record, index">
           <template slot="roomId" slot-scope="text, record, index">
             {{ getRoomName(text) }}
             {{ getRoomName(text) }}
           </template>
           </template>
-          <a-table
-            rowKey="id"
-            :columns="innerColumns"
-            :pagination="false"
-            slot="expandedRowRender"
-            slot-scope="record"
-            :data-source="record.feeGoodVos"
-            v-if="record.subjectType === 6"
-          >
-          </a-table>
         </a-table>
         </a-table>
         <div
         <div
           style="
           style="
@@ -461,8 +448,7 @@
           </h4>
           </h4>
           <div style="display: flex" >
           <div style="display: flex" >
             <div
             <div
-              @click="refund(1)"
-              :class="`${chooseLivingRoom.livingOrder && chooseLivingRoom.livingOrder.settleType !== -1 ? 'disabled' : ''}`"
+              @click="enterAccount"
               style="display: flex; flex-direction: column">
               style="display: flex; flex-direction: column">
               <a-icon
               <a-icon
                 type="transaction"
                 type="transaction"
@@ -478,12 +464,6 @@
                 style="color: rgba(255, 141, 26, 1); font-size: 18px"
                 style="color: rgba(255, 141, 26, 1); font-size: 18px"
               /><a-button type="link"> 退款 </a-button>
               /><a-button type="link"> 退款 </a-button>
             </div>
             </div>
-            <div style="display: flex; flex-direction: column" @click="strikeBalance">
-              <a-icon
-                type="pound"
-                style="color: rgba(255, 141, 26, 1); font-size: 18px"
-              /><a-button type="link"> 冲账 </a-button>
-            </div>
           </div>
           </div>
         </div>
         </div>
         <a-divider />
         <a-divider />
@@ -563,6 +543,7 @@
         >
         >
       </div>
       </div>
     </div>
     </div>
+    <enter-account-model ref="enterAccountModel" @ok="modalFormOk"></enter-account-model>
     <adjust-price-form ref="adjustPriceForm" @ok="modalFormOk"></adjust-price-form>
     <adjust-price-form ref="adjustPriceForm" @ok="modalFormOk"></adjust-price-form>
     <customer-modal ref="modalCustomerForm" @ok="modalFormOk"></customer-modal>
     <customer-modal ref="modalCustomerForm" @ok="modalFormOk"></customer-modal>
     <refund-modal ref="modalRefundForm" @ok="modalFormOk"></refund-modal>
     <refund-modal ref="modalRefundForm" @ok="modalFormOk"></refund-modal>
@@ -667,6 +648,7 @@ import { match } from 'assert'
 import AdjustPriceForm from '@views/room/modules/checkIn/AdjustPriceForm'
 import AdjustPriceForm from '@views/room/modules/checkIn/AdjustPriceForm'
 import StrikeBalance from '@views/room/modules/checkIn/StrikeBalanceModel'
 import StrikeBalance from '@views/room/modules/checkIn/StrikeBalanceModel'
 import StrikeBalanceModel from '@views/room/modules/checkIn/StrikeBalanceModel'
 import StrikeBalanceModel from '@views/room/modules/checkIn/StrikeBalanceModel'
+import EnterAccountModel from '@views/room/modules/checkIn/EnterAccountModel'
 const columns = [
 const columns = [
   // {
   // {
   //     title: "",
   //     title: "",
@@ -676,19 +658,22 @@ const columns = [
   {
   {
     title: '房间号',
     title: '房间号',
     dataIndex: 'roomId',
     dataIndex: 'roomId',
-    width: 70,
+    width: 80,
     scopedSlots: { customRender: 'roomId' }
     scopedSlots: { customRender: 'roomId' }
   },
   },
   {
   {
     title: '费项',
     title: '费项',
     dataIndex: 'subjectType',
     dataIndex: 'subjectType',
-    width: 60,
+    width: 160,
     scopedSlots: { customRender: 'subjectType' }
     scopedSlots: { customRender: 'subjectType' }
   },
   },
   {
   {
     title: '入账日期',
     title: '入账日期',
     dataIndex: 'dayTime',
     dataIndex: 'dayTime',
-    width: 110
+    width: 110,
+    customRender: function (text, record) {
+      return record.dayTime.substring(0, 10)
+    }
   },
   },
   {
   {
     title: '单价',
     title: '单价',
@@ -700,13 +685,13 @@ const columns = [
   },
   },
   {
   {
     title: '优惠价',
     title: '优惠价',
-    dataIndex: 'money'
-    // width: 80,
+    dataIndex: 'money',
+    // width: 60,
   },
   },
   {
   {
     title: '数量',
     title: '数量',
     dataIndex: 'feeType',
     dataIndex: 'feeType',
-    // width: 60,
+    width: 60,
     customRender: function (text) {
     customRender: function (text) {
       return 1
       return 1
     }
     }
@@ -720,41 +705,6 @@ const columns = [
     }
     }
   }
   }
 ]
 ]
-const innerColumns = [
-  {
-    title: '名称',
-    dataIndex: 'name'
-    // width: 110,
-  },
-  {
-    title: '单价',
-    dataIndex: 'originalPrice'
-    // width: 110,
-  },
-  {
-    title: '优惠价格',
-    dataIndex: 'price'
-    // width: 110,
-  },
-  {
-    title: '商品数量',
-    dataIndex: 'num'
-    // width: 110,
-  },
-  {
-    title: '小计',
-    dataIndex: 'num*price',
-    customRender: function (text, record) {
-      return record.price * record.num
-    }
-    // width: 110,
-  }
-  // {
-  //   title: '入账时间',
-  //   dataIndex: 'createTime'
-  //   // width: 110,
-  // },
-]
 
 
 const columns2 = [
 const columns2 = [
   {
   {
@@ -804,6 +754,7 @@ const endDate = new Date(date.setDate(date.getDate() + 1))
 export default {
 export default {
   name: 'BusMeetingRoomForm',
   name: 'BusMeetingRoomForm',
   components: {
   components: {
+    EnterAccountModel,
     StrikeBalanceModel,
     StrikeBalanceModel,
     StrikeBalance,
     StrikeBalance,
     AdjustPriceForm,
     AdjustPriceForm,
@@ -844,7 +795,6 @@ export default {
       consumSelectedRows: [],
       consumSelectedRows: [],
       data,
       data,
       columns,
       columns,
-      innerColumns,
       data2,
       data2,
       columns2,
       columns2,
       wakeList: [{}],
       wakeList: [{}],
@@ -984,6 +934,7 @@ export default {
     this.getbusCustomer()
     this.getbusCustomer()
   },
   },
   methods: {
   methods: {
+    // table的expandIcon属性,修改默认展开关闭按钮 子表无数据时不显示展开图标
     /**
     /**
      * 添加同住人姓名
      * 添加同住人姓名
      */
      */
@@ -1329,19 +1280,19 @@ export default {
       this.$refs.modalFeeForm.title = '增加消费项目'
       this.$refs.modalFeeForm.title = '增加消费项目'
       this.$refs.modalFeeForm.disableSubmit = false
       this.$refs.modalFeeForm.disableSubmit = false
     },
     },
-    tuidan() {
-      postAction(
-        '/business/busRoomBookingOrders/退你麻痹单狗东西',
-        this.consumSelectedRowKeys
-      ).then((res) => {
-        if (res.success) {
-          this.$message.success('退单成功')
-          this.getBookingOrderInfo()
-        } else {
-          this.$message.warning(res.message)
-        }
-      })
-    },
+    // tuidan() {
+    //   postAction(
+    //     '/business/busRoomBookingOrders/退你麻痹单狗东西',
+    //     this.consumSelectedRowKeys
+    //   ).then((res) => {
+    //     if (res.success) {
+    //       this.$message.success('退单成功')
+    //       this.getBookingOrderInfo()
+    //     } else {
+    //       this.$message.warning(res.message)
+    //     }
+    //   })
+    // },
     partialSettle() {
     partialSettle() {
       var list2 = this.feesList.filter((t) =>
       var list2 = this.feesList.filter((t) =>
         this.consumSelectedRowKeys.includes(t.id)
         this.consumSelectedRowKeys.includes(t.id)
@@ -1398,7 +1349,7 @@ export default {
       var find = this.model.livingRoomIds[index]
       var find = this.model.livingRoomIds[index]
       return find ? find.roomName : ''
       return find ? find.roomName : ''
     },
     },
-    getSubjectTypeText(text) {
+    getSubjectTypeText(text,record) {
       var msg = ''
       var msg = ''
       if (text == 1) {
       if (text == 1) {
         msg = '押金'
         msg = '押金'
@@ -1411,7 +1362,7 @@ export default {
       } else if (text == 5) {
       } else if (text == 5) {
         msg = '结账收款'
         msg = '结账收款'
       } else if (text == 6) {
       } else if (text == 6) {
-        msg = '商品'
+        msg = '商品-' + record.feeGoodVo.name
       } else if (text == 7) {
       } else if (text == 7) {
         msg = '点餐'
         msg = '点餐'
       } else if (text == 8) {
       } else if (text == 8) {
@@ -1561,30 +1512,30 @@ export default {
       this.selectedRowKeys = selectedRowKeys
       this.selectedRowKeys = selectedRowKeys
       this.selectionRows = selectionRows
       this.selectionRows = selectionRows
     },
     },
-    refund(value) {
-      let ids = []
-      let mess = ''
-      if (value === 1) {
-        ids = this.consumSelectedRowKeys
-        mess = '消费详情中要收款'
-      } else {
-        ids = this.selectedRowKeys
-        mess = '收款详情中要退款'
-      }
-      if (!ids || ids.length === 0) {
-        this.$message.warning('请先勾选' + mess + '的账单')
-        return
-      }
-      postAction('/business/busRoomBookingOrders/payPortionFee', ids
-      ).then(resp => {
-        if (resp.result === true) {
-          this.$message.success('操作成功')
-          this.getBookingOrderInfo()
-        } else {
-          this.$message.success('操作失败')
-        }
-      })
-    },
+    // refund(value) {
+    //   let ids = []
+    //   let mess = ''
+    //   if (value === 1) {
+    //     ids = this.consumSelectedRowKeys
+    //     mess = '消费详情中要收款'
+    //   } else {
+    //     ids = this.selectedRowKeys
+    //     mess = '收款详情中要退款'
+    //   }
+    //   if (!ids || ids.length === 0) {
+    //     this.$message.warning('请先勾选' + mess + '的账单')
+    //     return
+    //   }
+    //   postAction('/business/busRoomBookingOrders/payPortionFee', ids
+    //   ).then(resp => {
+    //     if (resp.result === true) {
+    //       this.$message.success('操作成功')
+    //       this.getBookingOrderInfo()
+    //     } else {
+    //       this.$message.success('操作失败')
+    //     }
+    //   })
+    // },
     strikeBalance() {
     strikeBalance() {
       debugger
       debugger
       console.log(this.consumSelectedRows)
       console.log(this.consumSelectedRows)
@@ -1595,6 +1546,14 @@ export default {
       this.$refs.modalStrikeBalanceForm.title = '冲账单'
       this.$refs.modalStrikeBalanceForm.title = '冲账单'
       this.$refs.modalStrikeBalanceForm.edit(this.consumSelectedRows)
       this.$refs.modalStrikeBalanceForm.edit(this.consumSelectedRows)
     },
     },
+    enterAccount() {
+      let chooseRooms = [this.chooseLivingRoom]
+      if (this.selectRoomId === '1') {
+        chooseRooms = this.model.livingRoomIds.filter(e => e.roomId !== '1')
+      }
+      this.$refs.enterAccountModel.title = '收款'
+      this.$refs.enterAccountModel.add(chooseRooms)
+    },
     async handleAdd() {
     async handleAdd() {
       var that = this
       var that = this
       var index = this.model.livingRoomIds.findLastIndex(
       var index = this.model.livingRoomIds.findLastIndex(
@@ -1851,6 +1810,10 @@ export default {
   cursor: not-allowed;
   cursor: not-allowed;
   opacity: 0.5;
   opacity: 0.5;
 }
 }
+/deep/ .noExpand .ant-table-row-expand-icon {
+  display: none;
+
+}
 /deep/.ant-table-thead > tr > th {
 /deep/.ant-table-thead > tr > th {
   background: rgba(42, 130, 228, 1);
   background: rgba(42, 130, 228, 1);
   color: #ffffff;
   color: #ffffff;

+ 232 - 0
src/views/room/modules/checkIn/EnterAccountModel.vue

@@ -0,0 +1,232 @@
+<template>
+  <j-modal
+      style="padding-bottom: 0px"
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <a-form-model>
+      <a-row>
+        <a-col :span="24" style="display: flex" >
+          <a-form-model-item
+            label="收款账号"
+            style="width:100%; flex: 1"
+            :labelCol="{
+              xs: { span: 24 },
+              sm: { span: 13 },
+            }"
+            :wrapperCol="{
+              xs: { span: 24 },
+              sm: { span: 10 },
+            }">
+            <a-select v-model="roomId" @change="changeSelect">
+              <a-select-option v-for="item in roomInfos" :value="item.roomId" >{{ item.roomName }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+          <a-form-model-item style="width:100%; flex: 2" >
+            <a-button @click="addEnterAccount">添加收款</a-button>
+          </a-form-model-item>
+
+        </a-col>
+      </a-row>
+      <a-row v-for="(item, index) in roomInfos[errIndex].addAccountList" :key="index" style="margin-bottom:10px;">
+        <a-col :span="24" style="display: flex">
+          <a-form-model-item
+              style="width: 100%; flex: 1; margin-bottom: 20px"
+              label="收款方式"
+              :labelCol="{
+              xs: { span: 24 },
+              sm: { span: 13 },
+            }"
+              :wrapperCol="{
+              xs: { span: 24 },
+              sm: { span: 10 },
+            }">
+            <a-select v-model="item.payType">
+              <a-select-option v-for="type in payTypeList" :value="type.id">{{ type.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+          <a-form-model-item
+              style="width: 100%; flex: 2; margin-bottom: 20px"
+              label="金额"
+              :labelCol="{
+              xs: { span: 24 },
+              sm: { span: 3 },
+            }"
+              :wrapperCol="{
+              xs: { span: 24 },
+              sm: { span: 14 },
+            }">
+            <div style="display: flex; margin-top: 4px">
+              <a-input-number v-model="item.money"></a-input-number>
+              <div  style="width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; margin-left: 20px">
+                <span v-if="item.subjectType === 1" class="centered-span" style="">押</span>
+              </div>
+              <a-button @click="isDeposit(index)" style="margin-left: 20px">标记押金</a-button>
+            </div>
+          </a-form-model-item>
+        </a-col>
+      </a-row>
+      <a-row>
+        <a-col :span="24" style="display: flex">
+          <a-form-model-item
+              style="width: 100%"
+              label="备注"
+              :labelCol="{
+              xs: { span: 24 },
+              sm: { span: 4 },
+            }"
+              :wrapperCol="{
+              xs: { span: 24 },
+              sm: { span: 18 },
+            }">
+            <a-textarea v-model="roomInfos[errIndex].remark"></a-textarea>
+          </a-form-model-item>
+        </a-col>
+      </a-row>
+
+    </a-form-model>
+
+  </j-modal>
+</template>
+
+<script>
+
+import { getAction, postAction } from '@api/manage'
+
+export default {
+
+  data () {
+    return {
+      title: '',
+      width: 800,
+      visible: false,
+      disableSubmit: false,
+      roomId: 0,
+      roomInfos: [{}],
+      payTypeList: [],
+      errIndex: 0, //上一条数据
+    }
+  },
+  created() {
+  },
+  methods: {
+    add (record) {
+      let modelList = []
+      record.forEach(e => {
+        let model = {
+          roomId: e.roomId,
+          roomName: e.roomName,
+          remark: '',
+          livingOrderId: e.livingOrder.id,
+          feeType: 2,
+          addAccountList: [{
+            payType: '',
+            money: '',
+            subjectType: 2
+          }]
+        }
+        modelList.push(model)
+      })
+      this.visible = true
+      this.roomInfos = modelList
+      this.roomId = this.roomInfos[0].roomId
+      console.log(this.errIndex)
+
+      this.getPayTypeList()
+    },
+    close () {
+      this.$emit('close')
+      this.visible = false
+    },
+    handleOk () {
+      let feeInfoList = []
+      this.roomInfos.forEach(e => {
+        e.addAccountList.forEach(ele => {
+          let feeInfo = Object.assign(ele, e)
+          delete feeInfo.addAccountList
+          feeInfoList.push(feeInfo)
+        })
+      })
+      postAction('/business/busOrderFee/saveBatch', feeInfoList)
+          .then(resp => {
+            if (resp.result) {
+              this.$message.success('添加成功')
+            } else {
+              this.$message.warning('添加失败')
+            }
+          })
+      this.$emit('ok')
+      this.visible = false
+    },
+    submitCallback() {
+
+    },
+    handleCancel () {
+      this.close()
+    },
+    addEnterAccount() {
+      this.roomInfos[this.errIndex].addAccountList.push({
+        payType: '',
+        money: '',
+        subjectType: 2
+      })
+    },
+    getPayTypeList() {
+      getAction('/business/busRoomPayType/list', {
+        pageSize: 99999,
+        pageNo: 1
+      }).then((res) => {
+        if (res.success) {
+          this.payTypeList = res.result.records
+        }
+      })
+    },
+    changeSelect(value) {
+      // debugger
+      console.log(value + 'value')
+      // this.roomInfos.forEach(e => {
+      //   if (value === e.roomId) {
+      //     let list = e.addAccountList // 每条下的二级
+      //     e.addAccountList = this.addAccountList;
+      //     this.addAccountList = list;
+      //     console.log("addAccountList", e.addAccountList)
+      //     console.log("this.addAccountList", this.addAccountList)
+      //   }
+      // })
+
+      // let index = this.roomInfos.findIndex(item => item.roomId == value)
+      // if (this.errIndex !== '') {
+      //   this.roomInfos[this.errIndex].addAccountList = this.addAccountList
+      // }
+      // this.addAccountList = this.roomInfos[index].addAccountList
+      // this.errIndex = index
+      this.errIndex = this.roomInfos.findIndex(item => item.roomId == value)
+
+      this.$forceUpdate();
+    },
+
+    isDeposit(index) {
+      let type = this.roomInfos[this.errIndex].addAccountList[index].subjectType
+      this.roomInfos[this.errIndex].addAccountList[index].subjectType = type === 2 ? 1 : 2
+    }
+  }
+}
+</script>
+<style>
+.centered-span {
+  display: flex;
+  justify-content: center;
+  text-align:center;
+  align-items: center;
+  background-color: pink;
+  width: 30px;
+  height: 30px;
+  border: solid 1px pink;
+  border-radius: 80%;
+}
+</style>

+ 72 - 2
src/views/room/modules/checkIn/RefundModal.vue

@@ -8,11 +8,81 @@
     :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     @cancel="handleCancel"
     @cancel="handleCancel"
     cancelText="关闭">
     cancelText="关闭">
-    <refund ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></refund>
+<!--    <refund ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></refund>-->
+    <a-table
+        :columns="columns"
+        :data-source="feesList"
+        :pagination="false"
+        :scroll="{ y: 160 }"
+        rowKey="id"
+    >
+      <template slot="subjectType" slot-scope="text, record, index">
+        {{ getSubjectTypeText(text,record) }}
+      </template>
+      <template slot="roomId" slot-scope="text, record, index">
+        {{ getRoomName(text) }}
+      </template>
+    </a-table>
   </j-modal>
   </j-modal>
 </template>
 </template>
 
 
 <script>
 <script>
+const columns = [
+  // {
+  //     title: "",
+  //     dataIndex: "key",
+  //     width: 20,
+  //   },
+  {
+    title: '房间号',
+    dataIndex: 'roomId',
+    width: 80,
+    scopedSlots: { customRender: 'roomId' }
+  },
+  {
+    title: '费项',
+    dataIndex: 'subjectType',
+    width: 160,
+    scopedSlots: { customRender: 'subjectType' }
+  },
+  {
+    title: '入账日期',
+    dataIndex: 'dayTime',
+    width: 110,
+    customRender: function (text, record) {
+      return record.dayTime.substring(0, 10)
+    }
+  },
+  {
+    title: '单价',
+    dataIndex: 'id',
+    // width: 60,
+    customRender: function (text, record) {
+      return record.money
+    }
+  },
+  {
+    title: '优惠价',
+    dataIndex: 'money',
+    // width: 60,
+  },
+  {
+    title: '数量',
+    dataIndex: 'feeType',
+    width: 60,
+    customRender: function (text) {
+      return 1
+    }
+  },
+  {
+    title: '小计',
+    dataIndex: 'livingOrderId',
+    // width: 60,
+    customRender: function (text, record) {
+      return record.money
+    }
+  }
+]
 
 
   import Refund from './Refund'
   import Refund from './Refund'
   export default {
   export default {
@@ -57,4 +127,4 @@
       }
       }
     }
     }
   }
   }
-</script>
+</script>

+ 38 - 15
src/views/settings/components/roomModules/roomNumSettings/roomNumTable.vue

@@ -127,23 +127,29 @@
       @ok="editPassword"
       @ok="editPassword"
     >
     >
       <a-radio-group
       <a-radio-group
-        :value="passwordTemplate">
+          v-model="passwordTemplate"
+        >
         <a-row>
         <a-row>
-          <a-radio style="margin: 10px" :value="0">
+          <a-radio style="margin: 10px" value="0">
             关联号与房间号相同
             关联号与房间号相同
           </a-radio><br/>
           </a-radio><br/>
-          <a-radio style="margin: 10px" :value="1">
+          <a-radio style="margin: 10px" value="1">
             关联号=
             关联号=
-            <a-input style="width: 60px"></a-input>
+            <a-input v-model="firstValue1" style="width: 60px"></a-input>
             +房间号+
             +房间号+
-            <a-input style="width: 60px"></a-input>
+            <a-input v-model="endValue1" style="width: 60px"></a-input>
           </a-radio><br/>
           </a-radio><br/>
-          <a-radio style="margin: 10px" :value="2">
+          <a-radio v-model="firstValue2" style="margin: 10px" value="2">
             关联号=
             关联号=
-            <a-input style="width: 60px"></a-input>
+            <a-input v-model="endValue1" style="width: 60px"></a-input>
             +缺首位的房间号+
             +缺首位的房间号+
             <a-input style="width: 60px"></a-input>
             <a-input style="width: 60px"></a-input>
           </a-radio>
           </a-radio>
+          <a-radio v-model="firstValue2" style="margin: 10px" value="2">
+            关联号=由
+            <a-input v-model="firstValue3" style="width: 60px"></a-input>
+            开始随房间号递增一位
+          </a-radio>
         </a-row>
         </a-row>
       </a-radio-group>
       </a-radio-group>
     </a-modal>
     </a-modal>
@@ -166,8 +172,11 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
-      firstValue: '',
-      endValue: '',
+      firstValue1: '',
+      endValue1: '',
+      firstValue2: '',
+      endValue2: '',
+      firstValue3: '',
       passwordTemplate: '',
       passwordTemplate: '',
       editPasswordVisible: false,
       editPasswordVisible: false,
       delLoading: false,
       delLoading: false,
@@ -356,14 +365,28 @@ export default {
       this.loadData()
       this.loadData()
     },
     },
     editPassword() {
     editPassword() {
-      console.log(this.getQueryParams())
-      console.log(this.passwordTemplate)
-      this.firstValue = '11'
-      this.endValue = '22'
+      let firstValue = ''
+      let endValue = ''
+      if (this.passwordTemplate === '1') {
+        firstValue = this.firstValue1
+        endValue = this.endValue1
+      } else if (this.passwordTemplate === '2') {
+        firstValue = this.firstValue1
+        endValue = this.endValue1
+      } else if (this.passwordTemplate === '3') {
+        console.log(parseInt(this.firstValue3))
+        console.log(isNaN(parseInt(this.firstValue3)))
+        if (isNaN(parseInt(this.firstValue3))) {
+          this.$message.success('请输入正确的格式')
+          return
+        } else {
+          firstValue = this.firstValue3
+        }
+      }
       const param = {
       const param = {
         type: this.passwordTemplate,
         type: this.passwordTemplate,
-        firstValue: this.firstValue,
-        endValue: this.endValue
+        firstValue,
+        endValue
       }
       }
       var assign = Object.assign(param, this.getQueryParams())
       var assign = Object.assign(param, this.getQueryParams())
       getAction('/rooms/cesRooms/batchEditPassword', assign)
       getAction('/rooms/cesRooms/batchEditPassword', assign)

+ 69 - 70
src/views/settings/roomSettings.vue

@@ -1,110 +1,109 @@
 <template>
 <template>
-    <a-card style="width: 100%; height:100%;">
-        <a-tabs default-active-key="1">
-            <a-tab-pane key="1">
+  <a-card style="width: 100%; height:100%;">
+    <a-tabs default-active-key="1">
+      <a-tab-pane key="1">
                 <span slot="tab">
                 <span slot="tab">
-                    <a-icon type="picture" />
+                    <a-icon type="picture"/>
                     房型列表
                     房型列表
                 </span>
                 </span>
-                <room-layout-list></room-layout-list>
-            </a-tab-pane>
-            <a-tab-pane key="2">
+        <room-layout-list></room-layout-list>
+      </a-tab-pane>
+      <a-tab-pane key="2">
                 <span slot="tab">
                 <span slot="tab">
-                    <a-icon type="audit" />
+                    <a-icon type="audit"/>
                     房号设置
                     房号设置
                 </span>
                 </span>
-                <!-- <room-gen></room-gen> -->
-                <room-num-list></room-num-list>
-            </a-tab-pane>
-            <!-- <a-tab-pane key="3">
+        <!-- <room-gen></room-gen> -->
+        <room-num-list></room-num-list>
+      </a-tab-pane>
+      <a-tab-pane key="3">
                 <span slot="tab">
                 <span slot="tab">
-                    <a-icon type="shop" />
+                    <a-icon type="shop"/>
                     商品库存
                     商品库存
                 </span>
                 </span>
-               <goodList></goodList>
-            </a-tab-pane> -->
-            <a-tab-pane key="4">
+        <goodList></goodList>
+      </a-tab-pane>
+      <a-tab-pane key="4">
                 <span slot="tab">
                 <span slot="tab">
-                    <a-icon type="clock-circle" />
+                    <a-icon type="clock-circle"/>
                     全天房计费
                     全天房计费
                 </span>
                 </span>
-                <all-days-rule></all-days-rule>
-            </a-tab-pane>
-            <a-tab-pane key="5">
+        <all-days-rule></all-days-rule>
+      </a-tab-pane>
+      <a-tab-pane key="5">
                 <span slot="tab">
                 <span slot="tab">
-                    <a-icon type="history" />
+                    <a-icon type="history"/>
                     钟点房计费
                     钟点房计费
                 </span>
                 </span>
-                <hour-room-rule-list></hour-room-rule-list>
-            </a-tab-pane>
-            <a-tab-pane key="6">
+        <hour-room-rule-list></hour-room-rule-list>
+      </a-tab-pane>
+      <a-tab-pane key="6">
                 <span slot="tab">
                 <span slot="tab">
-                    <a-icon type="file" />
+                    <a-icon type="file"/>
                     房价方案
                     房价方案
                 </span>
                 </span>
-                <house-price-scheme-list></house-price-scheme-list>
-            </a-tab-pane>
-            <a-tab-pane key="7">
+        <house-price-scheme-list></house-price-scheme-list>
+      </a-tab-pane>
+      <a-tab-pane key="7">
                 <span slot="tab">
                 <span slot="tab">
-                    <a-icon type="thunderbolt" />
+                    <a-icon type="thunderbolt"/>
                     水电煤设置
                     水电煤设置
                 </span>
                 </span>
-                <room-utility-setting-list></room-utility-setting-list>
-            </a-tab-pane>
-            <a-tab-pane key="8">
+        <room-utility-setting-list></room-utility-setting-list>
+      </a-tab-pane>
+      <a-tab-pane key="8">
                 <span slot="tab">
                 <span slot="tab">
-                    <a-icon type="tool" />
+                    <a-icon type="tool"/>
                     服务维修设置
                     服务维修设置
                 </span>
                 </span>
-                <service-repair-list></service-repair-list>
-            </a-tab-pane>
-            <a-tab-pane key="9">
+        <service-repair-list></service-repair-list>
+      </a-tab-pane>
+      <a-tab-pane key="9">
                 <span slot="tab">
                 <span slot="tab">
-                    <a-icon type="flag" />
+                    <a-icon type="flag"/>
                     销售目标设置
                     销售目标设置
                 </span>
                 </span>
-                <market-objective-list></market-objective-list>
-            </a-tab-pane>
-            <a-tab-pane key="10">
+        <market-objective-list></market-objective-list>
+      </a-tab-pane>
+      <a-tab-pane key="10">
                 <span slot="tab">
                 <span slot="tab">
-                    <a-icon type="pound" />
+                    <a-icon type="pound"/>
                     餐券设置
                     餐券设置
                 </span>
                 </span>
-                <meal-coupon-list></meal-coupon-list>
-            </a-tab-pane>
-        </a-tabs>
-    </a-card>
+        <meal-coupon-list></meal-coupon-list>
+      </a-tab-pane>
+    </a-tabs>
+  </a-card>
 </template>
 </template>
 
 
 <script>
 <script>
-import roomLayoutList from "./components/roomModules/roomLayoutList.vue"
-import goodList from "./components/roomModules/goodList.vue";
-import roomNumList from "./components/roomModules/roomNumSettings/roomNumList.vue";
+import roomLayoutList from './components/roomModules/roomLayoutList.vue'
+import goodList from './components/roomModules/goodList.vue'
+import roomNumList from './components/roomModules/roomNumSettings/roomNumList.vue'
 import allDaysRule from './components/roomModules/allDaysRoomFeeRule.vue'
 import allDaysRule from './components/roomModules/allDaysRoomFeeRule.vue'
-import MealCouponList from "./components/roomModules/mealCouponList";
-import ServiceRepairList from "./components/roomModules/serviceRepairList";
+import MealCouponList from './components/roomModules/mealCouponList'
+import ServiceRepairList from './components/roomModules/serviceRepairList'
 import hourRoomRuleList from './components/roomModules/hourRoomRule/table.vue'
 import hourRoomRuleList from './components/roomModules/hourRoomRule/table.vue'
-import MarketObjectiveList from "./components/roomModules/marketObjectiveList";
-import RoomUtilitySettingList from "./components/roomModules/roomUtilitySettingList";
-import HousePriceSchemeList from "./components/roomModules/housePriceSchemeList";
-export default {
-    components: {
-        HousePriceSchemeList,
-        RoomUtilitySettingList,
-        MarketObjectiveList,
-        ServiceRepairList,
-        MealCouponList,
-        roomLayoutList,
-        goodList,
-        roomNumList,
-        allDaysRule, // 全天房计费规则tabContent
-        hourRoomRuleList
-    },
-    data() {
-        return {
+import MarketObjectiveList from './components/roomModules/marketObjectiveList'
+import RoomUtilitySettingList from './components/roomModules/roomUtilitySettingList'
+import HousePriceSchemeList from './components/roomModules/housePriceSchemeList'
 
 
-        }
-    }
+export default {
+  components: {
+    HousePriceSchemeList,
+    RoomUtilitySettingList,
+    MarketObjectiveList,
+    ServiceRepairList,
+    MealCouponList,
+    roomLayoutList,
+    goodList,
+    roomNumList,
+    allDaysRule, // 全天房计费规则tabContent
+    hourRoomRuleList
+  },
+  data() {
+    return {}
+  }
 }
 }
 </script>
 </script>