Преглед на файлове

处理文档中的问题

许智捷 преди 2 години
родител
ревизия
3303a8caeb

+ 1 - 0
src/mixins/JeecgListMixin.js

@@ -128,6 +128,7 @@ export const JeecgListMixin = {
       console.log(this.queryParam, this.queryParam.keyw)
       var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters);
       param.field = this.getQueryField();
+      param.pageNo = this.ipagination.current;
       param.current = this.ipagination.current;
       param.pageSize = this.ipagination.pageSize;
       return filterObj(param);

+ 5 - 5
src/views/fangwu/index.vue

@@ -302,11 +302,11 @@ export default {
 
             let startTime;
             let endTime;
-            let now = new Date(); //当前日期 
-            let nowDayOfWeek = now.getDay(); //今天本周的第几天 
-            let nowDay = now.getDate(); //当前日 
-            let nowMonth = now.getMonth(); //当前月 
-            let nowYear = now.getFullYear(); //当前年 
+            let now = new Date(); //当前日期
+            let nowDayOfWeek = now.getDay(); //今天本周的第几天
+            let nowDay = now.getDate(); //当前日
+            let nowMonth = now.getMonth(); //当前月
+            let nowYear = now.getFullYear(); //当前年
             let jd=Math.ceil((nowMonth + 1) / 3)
             if (type == 0) {
                 startTime = new Date().toLocaleString().substring(0, 10)

+ 7 - 4
src/views/room/modules/checkIn/BillRoomForm.vue

@@ -1769,6 +1769,7 @@ export default {
       this.busMemberCardList = JSON.parse(JSON.stringify(result))
     },
     handleSelectVip(value) {
+      debugger
       let that = this;
       console.log(value)
       debugger
@@ -2426,15 +2427,17 @@ export default {
     },
     handleSelectMember(room, e) {
       console.log('room', room)
-      var find = this.customerList.find((t) => t.id === e)
+      let find = this.customerList.find((t) => t.id === e)
       this.$set(room, 'key1', find.name)
       this.$set(room, 'key2', 1)
       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)
-      debugger
-      console.log(find)
-      console.log(this.busMemberCardList)
+      if (find.relationVipId !== null) {
+        this.handleSelectVip(find.relationVipId);
+      }
     },
     pulsRoom() {
       var that = this

+ 67 - 16
src/views/room/modules/checkIn/BillRoomInfo.vue

@@ -13,6 +13,15 @@
             入住信息
           </h4>
           <div style="display: flex">
+            <div
+              style="display: flex; flex-direction: column"
+              v-if="chooseLivingRoom.livingOrder && chooseLivingRoom.livingOrder.settleType == -1 && !chooseLivingRoom.isMain"
+              @click="changeMainRoom">
+              <a-icon
+                type="clock-circle"
+                style="color: rgba(255, 141, 26, 1); font-size: 18px"/>
+              <a-button type="link"> 改为主房 </a-button>
+            </div>
             <div style="display: flex; flex-direction: column">
               <a-icon
                 type="clock-circle"
@@ -55,6 +64,7 @@
               >
                 <span style="font-size: 12px">未结退房</span>
               </a-badge>
+              <span v-if="item.isMain && item.roomId !=='1' ">(主房间)</span>
             </span>
             <a-descriptions :column="2">
               <a-descriptions-item label="主客姓名">
@@ -274,6 +284,9 @@
                 <a-icon @click="savePeople(fItem)" style="color:bule;" class="dynamic-delete-button" type="check-circle" />
                 <a-icon @click="cancelPeople(index)" style="color: #f56c6c" class="dynamic-delete-button" type="close-circle" />
               </a-col>
+              <a-col :span="21">
+                <a-input v-model="fItem.address" placeholder="请输入地址"></a-input>
+              </a-col>
             </a-row>
             <div id="livingCustomers-grid">
               <a-row
@@ -354,26 +367,29 @@
             消费详情
           </h4>
           <div style="display: flex">
-            <div style="display: flex; flex-direction: column">
+            <div
+              @click="addProjectFee"
+              style="display: flex; flex-direction: column"
+              :class="`${selectRoomId == '1' || chooseLivingRoom.livingOrder && chooseLivingRoom.livingOrder.settleType !== -1 ? 'disabled' : ''}`">
               <a-icon
                 type="tool"
                 style="color: rgba(255, 141, 26, 1); font-size: 18px"
               /><a-button
                 type="link"
-                :disabled="selectRoomId == '1' || chooseLivingRoomIds.livingOrder && chooseLivingRoomIds.livingOrder.settleType === 2"
-                @click="addProjectFee"
               >
                 增加消费
               </a-button>
             </div>
-            <div style="display: flex; flex-direction: column">
+            <div
+                :class="`${selectedRowKeys1.length == 0 || selectRoomId == '1' || chooseLivingRoom.livingOrder && chooseLivingRoom.livingOrder.settleType !== -1 ? 'disabled' : ''}`"
+                @click="tuidan"
+                style="display: flex; flex-direction: column">
               <a-icon
                 type="import"
                 style="color: rgba(255, 141, 26, 1); font-size: 18px"
               /><a-button
                 type="link"
                 :disabled="selectedRowKeys1.length == 0 || selectRoomId == '1'"
-                @click="tuidan"
               >
                 退单
               </a-button>
@@ -443,14 +459,20 @@
           >
             收款详情
           </h4>
-          <div style="display: flex">
-            <div @click="refund(1)"  style="display: flex; flex-direction: column">
+          <div style="display: flex" >
+            <div
+              @click="refund(1)"
+              :class="`${chooseLivingRoom.livingOrder && chooseLivingRoom.livingOrder.settleType !== -1 ? 'disabled' : ''}`"
+              style="display: flex; flex-direction: column">
               <a-icon
                 type="transaction"
-                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>
             </div>
-            <div  @click="refund(2)" style="display: flex; flex-direction: column">
+            <div
+              @click="refund(2)"
+              :class="`${chooseLivingRoom.livingOrder && chooseLivingRoom.livingOrder.settleType !== -1 ? 'disabled' : ''}`"
+              style="display: flex; flex-direction: column">
               <a-icon
                 type="trademark"
                 style="color: rgba(255, 141, 26, 1); font-size: 18px"
@@ -864,7 +886,7 @@ export default {
       /**
        * 选中房间信息
        */
-      chooseLivingRoomIds: {},
+      chooseLivingRoom: {},
       /**
        * 同住人
        */
@@ -1081,6 +1103,23 @@ export default {
         }
       })
     },
+    changeMainRoom() {
+      console.log(this.chooseLivingRoom)
+      const bookingRoom = {
+        'id': this.chooseLivingRoom.id,
+        'isMain': this.chooseLivingRoom.isMain,
+        'bookingOrdersId': this.chooseLivingRoom.bookingOrderId
+      }
+      postAction('/business/busBookingRooms/set-main?livingOrderId=' + this.chooseLivingRoom.livingOrder.id, bookingRoom)
+          .then(resp => {
+            if (resp.success) {
+              this.$message.success('更换主房成功')
+              this.getBookingOrderInfo()
+            } else {
+              this.$message.success('更换主房失败')
+            }
+          })
+    },
     onChangeWakeService(e, e1) {
       console.log(e, e1)
       this.wakeTime.date = e1
@@ -1173,8 +1212,14 @@ export default {
         cusName: customer.customerName,
         cusPhone: customer.phone,
         cusId: customer.id,
-        gender: customer.gender
+        certType: customer.certType,
+        certNo: customer.certNo,
+        address: customer.address,
+        gender: customer.gender,
+        nation: customer.nation
       }
+      console.log(obj)
+      debugger
       this.$refs.modalEditCustomer.edit(obj)
       this.$refs.modalEditCustomer.title = '修改'
       this.$refs.modalEditCustomer.disableSubmit = false
@@ -1336,7 +1381,7 @@ export default {
         this.feesList = this.oldfeesList.filter((t) => t.roomId === e)
         this.paymentList = this.oldpaymentList.filter((t) => t.roomId === e)
         let find = this.model.livingRoomIds.find((t) => t.roomId === this.selectRoomId)
-        this.chooseLivingRoomIds = find;
+        this.chooseLivingRoom = find
         console.log(this.model)
         console.log(find)
         this.$emit('changeLivingStatu', find.livingOrder.settleType !== 2)
@@ -1588,7 +1633,7 @@ export default {
         var sum2 = list3.reduce(function (total, item) {
           return total + item.money
         }, 0)
-        if(this.paymentAmount +this.withholdAmout - this.feesAmount > 0) {
+        if (this.paymentAmount + this.withholdAmout - this.feesAmount > 0) {
           debugger
           this.$refs.modalRefundForm.edit({
             billRefund: this.paymentAmount + this.withholdAmout - this.feesAmount,
@@ -1610,7 +1655,7 @@ export default {
         } else {
 
         }
-        if (this.paymentAmount +this.withholdAmout - this.feesAmount > 0) {
+        if (this.paymentAmount + this.withholdAmout - this.feesAmount > 0) {
           debugger
           this.$refs.modalRefundForm.edit({
             billRefund: this.paymentAmount + this.withholdAmout - this.feesAmount,
@@ -1633,11 +1678,11 @@ export default {
           debugger
           this.$refs.modalPaymentForm.edit({
             billAmount: parseFloat(
-              Math.abs(this.paymentAmount +this.withholdAmout - this.feesAmount).toFixed(2)
+              Math.abs(this.paymentAmount + this.withholdAmout - this.feesAmount).toFixed(2)
             ),
             deposit: deposit - (sum - sum2),
             roomFee: parseFloat(
-              Math.abs(this.paymentAmount +this.withholdAmout - this.feesAmount).toFixed(2)
+              Math.abs(this.paymentAmount + this.withholdAmout - this.feesAmount).toFixed(2)
             ),
             preferentialMoney: this.preferentialMoney,
             subjectType: 5,
@@ -1765,6 +1810,12 @@ export default {
   flex: 1;
   color: rgba(255, 141, 26, 1) !important;
 }
+
+.disabled {
+  pointer-events: none;
+  opacity: 0.6;
+  /* 可以根据需要添加其他样式 */
+}
 .menu {
   display: flex;
   flex-direction: column;

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

@@ -86,7 +86,7 @@ export default {
   data() {
     return {
       title: "",
-      width: 1400,
+      width: 1500,
       visible: false,
       disableSubmit: false,
       livingStatu: true

+ 165 - 122
src/views/room/modules/checkIn/EditCustomerForm.vue

@@ -19,66 +19,81 @@
                 v-model="model.cusName"
                 placeholder="联系人"
                 @search="handleSearch"
-                @select="(e) => handleSelectMember(e)" style="width: 70%;"
+                @select="(e) => handleSelectMember(e)"
+                style="width: 70%;"
               >
                 <template slot="dataSource">
-                  <a-select-option v-for="item in customerList" :key="item.id"
-                    >{{ item.name }}-{{ item.phone }}</a-select-option
+                  <a-select-option
+                    v-for="item in customerList"
+                    :key="item.id"
+                  >{{ item.name }}-{{ item.phone }}</a-select-option
                   >
                 </template>
               </a-auto-complete>
-              <a-button @click="readCardNo" style="margin-left: 10px"
-                >读取身份证</a-button
+              <a-button
+                @click="readCardNo"
+                style="margin-left: 10px"
+              >读取身份证</a-button
               >
             </a-form-model-item>
           </a-col>
-          <a-col :span="8">
+          <a-col :span="18" style="display: flex">
             <a-form-model-item
-                label="性别"
+              label="性别"
               :labelCol="{
-                              xs: { span: 24 },
-                              sm: { span: 4 },
-                            }"
+                xs: { span: 24 },
+                sm: { span: 13 },
+              }"
               :wrapperCol="{
-                              xs: { span: 24 },
-                              sm: { span: 16 },
-                            }"
+                xs: { span: 24 },
+                sm: { span: 11 },
+              }"
               prop="gender"
+              style="flex: 1"
             >
               <a-radio-group v-model="model.gender">
                 <a-radio :value="1">男</a-radio>
                 <a-radio :value="2">女</a-radio>
               </a-radio-group>
             </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item
-                label="年龄"
-                :labelCol="{
-                              xs: { span: 24 },
-                              sm: { span: 6 },
-                            }"
-                :wrapperCol="{
-                              xs: { span: 24 },
-                              sm: { span: 10 },
-                            }">
-                <a-input></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
+
             <a-form-model-item
-                label="名族:"
-                :labelCol="{
-                              xs: { span: 24 },
-                              sm: { span: 6 },
-                            }"
-                               :wrapperCol="{
-                              xs: { span: 24 },
-                              sm: { span: 10 },
-                            }">
-              <a-input></a-input>
+              label="民族"
+              :labelCol="{
+                xs: { span: 24 },
+                sm: { span: 3 },
+              }"
+              :wrapperCol="{
+                xs: { span: 24 },
+                sm: { span: 10 },
+              }"
+              prop="nation"
+              style="flex: 1"
+            >
+              <a-select
+                v-model="model.nation"
+
+                :filterOption="filterOption">
+                <a-select-option v-for="item in nationArr" :value="item">{{ item }}</a-select-option>
+              </a-select>
             </a-form-model-item>
           </a-col>
+          <!--          <a-col :span="8">-->
+          <!--            <a-form-model-item-->
+          <!--                label="年龄"-->
+          <!--                :labelCol="labelCol"-->
+          <!--                :wrapperCol="wrapperCol">-->
+          <!--                <a-input></a-input>-->
+          <!--            </a-form-model-item>-->
+          <!--          </a-col>-->
+          <!--          <a-col :span="8">-->
+          <!--            <a-form-model-item-->
+          <!--                label="名族:"-->
+          <!--                :labelCol="labelCol"-->
+          <!--                :wrapperCol="wrapperCol">-->
+          <!--              <a-input></a-input>-->
+          <!--            </a-form-model-item>-->
+          <!--          </a-col>-->
           <a-col :span="24">
             <a-form-model-item
               label="手机号"
@@ -92,37 +107,37 @@
               ></a-input>
             </a-form-model-item>
           </a-col>
-          <a-col :span="12">
+          <a-col :span="24" style="display: flex">
             <a-form-model-item
-                label="证件类型:"
-                :labelCol="{
-                              xs: { span: 24 },
-                              sm: { span: 4 },
-                            }"
-                :wrapperCol="{
-                              xs: { span: 24 },
-                              sm: { span: 10 },
-                            }"
-                prop="certType"
-                style="margin: 0px"
+              label="证件类型:"
+              :labelCol="{
+                xs: { span: 24 },
+                sm: { span: 15 },
+              }"
+              :wrapperCol="{
+                xs: { span: 24 },
+                sm: { span: 9 },
+              }"
+              prop="certType"
+              style="margin: 0px; flex:1"
             >
-              <a-select>
-                <a-select-option value="0">身份证</a-select-option>
+              <a-select v-model="model.certType">
+                <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="{
-                              xs: { span: 24 },
-                              sm: { span: 4 },
-                            }"
+                xs: { span: 24 },
+                sm: { span: 5 },
+              }"
               :wrapperCol="{
-                              xs: { span: 24 },
-                              sm: { span: 10 },
-                            }"
+                xs: { span: 24 },
+                sm: { span: 14 },
+              }"
               prop="certNo"
+              style="flex: 2"
             >
               <a-input
                 v-model="model.certNo"
@@ -130,6 +145,18 @@
               ></a-input>
             </a-form-model-item>
           </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="地址"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="address">
+              <a-input
+                v-model="model.address"
+                placeholder="地址">
+              </a-input>
+            </a-form-model-item>
+          </a-col>
         </a-row>
       </a-form-model>
     </j-form-container>
@@ -137,30 +164,38 @@
 </template>
 
 <script>
-import { httpAction, getAction } from "@/api/manage";
-import { validateDuplicateValue } from "@/utils/util";
+import { httpAction, getAction } from '@/api/manage'
 
 export default {
-  name: "BusMemberCardForm",
+  name: 'BusMemberCardForm',
   components: {},
   props: {
-    //表单禁用
+    // 表单禁用
     disabled: {
       type: Boolean,
       default: false,
-      required: false,
-    },
+      required: false
+    }
   },
   data() {
     return {
-      model: { payType: 1, livingOrderId: "", certType: 1, gender: 1 },
+      model: {
+        orderId: '',
+        cusName: '',
+        cusPhone: '',
+        certType: 1,
+        certNo: '',
+        address: '',
+        cusId: 0,
+        gender: 1,
+        nation: '' },
       labelCol: {
         xs: { span: 24 },
-        sm: { span: 2 },
+        sm: { span: 5 }
       },
       wrapperCol: {
         xs: { span: 24 },
-        sm: { span: 16 },
+        sm: { span: 16 }
       },
       confirmLoading: false,
       validatorRules: {
@@ -168,86 +203,94 @@ export default {
           {
             required: true,
             pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
-            message: "请输入手机号!",
-          },
+            message: '请输入手机号!'
+          }
         ],
-        cardNo: [{ required: true, message: "请输入会员卡号!" }],
-        gradeId: [{ required: true, message: "请输入等级类型!" }],
-        payType: [{ required: true, message: "请输入付款类型!" }],
-        paymentMethod: [{ required: true, message: "请输入付款方式!" }],
-        cusName: [{ required: true, message: "请输入会员姓名!" }],
-        sex: [{ required: true, message: "请输入性别!" }],
-        certificateType: [{ required: true, message: "请输入证件类型!" }],
-        validity: [{ required: true, message: "请输入有效期!" }],
+        cardNo: [{ required: true, message: '请输入会员卡号!' }],
+        gradeId: [{ required: true, message: '请输入等级类型!' }],
+        payType: [{ required: true, message: '请输入付款类型!' }],
+        paymentMethod: [{ required: true, message: '请输入付款方式!' }],
+        cusName: [{ required: true, message: '请输入会员姓名!' }],
+        sex: [{ required: true, message: '请输入性别!' }],
+        certificateType: [{ required: true, message: '请输入证件类型!' }],
+        validity: [{ required: true, message: '请输入有效期!' }]
       },
       url: {
-        add: "/business/busRoomBookingOrders/booking-to-live",
-        edit: "/business/busMemberCard/edit",
-        queryById: "/business/busMemberCard/queryById",
+        add: '/business/busRoomBookingOrders/booking-to-live',
+        edit: '/business/busMemberCard/edit',
+        queryById: '/business/busMemberCard/queryById'
       },
       gradeList: [],
       paymentMethodList: [],
       staffList: [],
       customerList: [],
       oldcustomerList: [],
-    };
+      nationArr: ['汉族', '壮族', '满族', '回族', '苗族', '维吾尔族', '土家族', '彝族', '蒙古族', '藏族', '布依族', '侗族', '瑶族',
+        '朝鲜族', '白族', '哈尼族', '哈萨克族', '黎族', '傣族', '畲族', '傈僳族', '仡佬族', '东乡族', '高山族', '拉祜族', '水族',
+        '佤族', '纳西族', '羌族', '土族', '仫佬族', '锡伯族', '柯尔克孜族', '达斡尔族', '景颇族', '毛南族', '撒拉族',
+        '布朗族', '塔吉克族', '阿昌族', '普米族', '鄂温克族', '怒族', '京族', '基诺族', '德昂族', '保安族', '俄罗斯族',
+        '裕固族', '乌孜别克族', '门巴族', '鄂伦春族', '独龙族', '塔塔尔族', '赫哲族', '珞巴族']
+    }
   },
   computed: {
     formDisabled() {
-      return this.disabled;
-    },
+      return this.disabled
+    }
   },
   created() {
-    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    var _info = JSON.parse(localStorage.getItem('storeInfo'))
     if (_info) {
-      this.model.hotelId = _info.id;
+      this.model.hotelId = _info.id
     }
-    //备份model原始值
-    this.modelDefault = JSON.parse(JSON.stringify(this.model));
-    this.getbusCustomer();
+    // 备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model))
+    this.getbusCustomer()
   },
   methods: {
     readCardNo() {
-      this.$message.error("接口程序未打开,请打开接口程序");
+      this.$message.error('接口程序未打开,请打开接口程序')
     },
     handleSearch(value) {
-      let result;
+      let result
       if (!value) {
-        result = this.oldcustomerList;
+        result = this.oldcustomerList
       } else {
-        result = this.oldcustomerList.filter((t) => t.name.includes(value));
+        result = this.oldcustomerList.filter((t) => t.name.includes(value))
       }
-      this.customerList = result;
+      this.customerList = result
     },
     handleSelectMember(e) {
-      var find = this.customerList.find((t) => t.id === e);
-      this.model.cusPhone = find.phone;
-      this.model.cusName = find.name;
-      this.model.cusId = find.id;
+      var find = this.customerList.find((t) => t.id === e)
+      this.model.cusPhone = find.phone
+      this.model.cusName = find.name
+      this.model.cusId = find.id
     },
     getbusCustomer() {
-      getAction("/bus/busCustomer/list", {}).then((res) => {
+      getAction('/bus/busCustomer/list', {}).then((res) => {
         if (res.success) {
-          this.customerList = res.result.records;
-          this.oldcustomerList = JSON.parse(JSON.stringify(this.customerList));
+          this.customerList = res.result.records
+          this.oldcustomerList = JSON.parse(JSON.stringify(this.customerList))
         }
-      });
+      })
+    },
+    filterOption(input, nationArr) {
+      return nationArr.toLowerCase().indexOf(input.toLowerCase()) >= 0
     },
     add(livingOrderId, roomId) {
-      this.modelDefault.livingOrderId = livingOrderId;
-      this.modelDefault.roomId = roomId;
-      this.edit(this.modelDefault);
+      this.modelDefault.livingOrderId = livingOrderId
+      this.modelDefault.roomId = roomId
+      this.edit(this.modelDefault)
     },
     edit(record) {
-      this.model = Object.assign({}, record);
-      this.visible = true;
+      this.model = Object.assign({}, record)
+      this.visible = true
     },
     submitForm() {
-      const that = this;
+      const that = this
       // 触发表单验证
       this.$refs.form.validate((valid) => {
         if (valid) {
-          that.confirmLoading = true;
+          that.confirmLoading = true
           // var customers = [];
           // customers.push({
           //   certNo: this.model.certNo,
@@ -259,24 +302,24 @@ export default {
           //   roomId: this.model.roomId,
           // });
           httpAction(
-            "/business/busRoomBookingOrders/update-orders?type=2",
+            '/business/busRoomBookingOrders/update-orders?type=2',
             this.model,
-            "post"
+            'post'
           )
             .then((res) => {
               if (res.success) {
-                that.$message.success("修改成功");
-                that.$emit("ok");
+                that.$message.success('修改成功')
+                that.$emit('ok')
               } else {
-                that.$message.warning(res.message);
+                that.$message.warning(res.message)
               }
             })
             .finally(() => {
-              that.confirmLoading = false;
-            });
+              that.confirmLoading = false
+            })
         }
-      });
-    },
-  },
-};
+      })
+    }
+  }
+}
 </script>

+ 2 - 1
src/views/room/modules/membergoodsmanage/BusMemberGoodsManageForm.vue

@@ -221,6 +221,7 @@ export default {
     }
     //备份model原始值
     this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    debugger
     getAction("/rooms/cesRooms/list", {
       pageNo: 1,
       pageSize: 100,
@@ -274,4 +275,4 @@ export default {
     },
   },
 };
-</script>
+</script>