Explorar o código

增加读卡弹窗

DESKTOP-B78GIPM\admin %!s(int64=2) %!d(string=hai) anos
pai
achega
ca8695b801
Modificáronse 2 ficheiros con 60 adicións e 19 borrados
  1. 29 1
      src/views/room/fangtailive.vue
  2. 31 18
      src/views/room/modules/checkIn/FeeForm.vue

+ 29 - 1
src/views/room/fangtailive.vue

@@ -653,7 +653,7 @@
             type="danger"
             @search="checkChange"
           />
-          <a-button @click="()=>{this.$message.error('接口程序未打开,请打开接口程序')}">读卡</a-button>
+          <a-button @click="readCard = true">读卡</a-button>
         </div>
         <p style="font-size: 16px; font-weight: 600; color: rgb(0, 186, 173);margin-top: 6px;">
           按楼层
@@ -812,6 +812,33 @@
       ref="exchangeHousesModalVue"
       @ok="modalLockRoomFormOk"
     />
+
+    <!-- 读卡弹窗 -->
+    <a-modal :visible="readCard" :title="'快速查询'" @cancel="readCard = false" @ok="readCard = false">
+      <a-row>
+        <a-col :span="6">
+          <a-button @click="()=>{ this.$message.error('接口程序未打开,请打开接口程序') }">
+            刷卡查询
+          </a-button>
+        </a-col>
+        <a-col :span="6">
+          <a-button disabled>注销房卡</a-button>
+        </a-col>
+      </a-row>
+      <a-row style="margin-top:20px;">
+        <a-col :span="6">
+          <a-input :placeholder="'房间号'"></a-input>
+        </a-col>
+      </a-row>
+      <a-row style="margin-top:20px;">
+        <a-col :span="8">
+          <a-input :placeholder="'入住日期'"></a-input>
+        </a-col>
+        <a-col :span="8" style="margin-left:10px;">
+          <a-input :placeholder="'预离日期'"></a-input>
+        </a-col>
+      </a-row>
+    </a-modal>
   </a-card>
 </template>
 
@@ -881,6 +908,7 @@ export default {
   },
   data() {
     return {
+      readCard:false,
       YDorder: null,
       currentDate: moment(new Date()).format("YYYY-MM-DD"),
       activeKey: "1",

+ 31 - 18
src/views/room/modules/checkIn/FeeForm.vue

@@ -2,10 +2,10 @@
 <a-spin :spinning="confirmLoading">
     <j-form-container :disabled="formDisabled">
         <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
-            <a-row>
-                <a-col :span="model.subjectType==6? 12: 24">
+            <a-row style="display:flex;justify-content:center;">
+                <a-col :span="12">
                     <a-form-model-item label="消费项目" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="subjectType">
-                        <a-select v-model="model.subjectType" style="width: 100%" placeholder="消费项目" :allowClear="true">
+                        <a-select v-model="model.subjectType" style="50%" placeholder="消费项目" :allowClear="true">
                             <a-select-option :value="1">押金</a-select-option>
                             <a-select-option :value="2">预收房费</a-select-option>
                             <a-select-option :value="3">每日房费</a-select-option>
@@ -16,7 +16,7 @@
                     <a-row>
                         <a-col :span="24">
                             <a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="money">
-                                <a-input-number v-model="model.money" placeholder="请输入金额" :min="0"></a-input-number>
+                                <a-input-number :disabled="model.subjectType==6" v-model="model.money" placeholder="请输入金额" :min="0"></a-input-number>
                             </a-form-model-item>
                         </a-col>
                     </a-row>
@@ -25,18 +25,18 @@
                     <a-row>
                         <a-col :span="24">
                             <a-space>
-                                <a-input v-model="queryParams.goodsName" placeholder="名称" />
-                                <a-button type="primary">搜索</a-button>
+                                <a-input v-model="queryParams.name" placeholder="名称" />
+                                <a-button @click="searchQuery" type="primary">搜索</a-button>
                             </a-space>
 
                         </a-col>
                     </a-row>
-                    <a-table :columns="columns" :dataSource="dataSource" style="margin-top:10px;">
-                      <template slot="price">
-                        <a-input-number :min="0"></a-input-number>
+                    <a-table :columns="columns" :loading="loading" :dataSource="dataSource" style="margin-top:10px;">
+                      <template slot="sellingPrice" slot-scope="text, record">
+                        <a-input-number v-model="record.sellingPrice" :min="0"></a-input-number>
                       </template>
-                      <template slot="num">
-                        <a-input-number :min="0"></a-input-number>
+                      <template slot="number" slot-scope="text, record">
+                        <a-input-number v-model="record.number" :min="0"></a-input-number>
                       </template>
                     </a-table>
                 </a-col>
@@ -62,9 +62,11 @@ import {
     validateDuplicateValue
 } from "@/utils/util";
 
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 export default {
     name: "BusMemberCardForm",
     components: {},
+    mixins:[JeecgListMixin],
     props: {
         //表单禁用
         disabled: {
@@ -82,24 +84,24 @@ export default {
             columns: [{
                     title: "名称",
                     align: "center",
-                    dataIndex: "waiter_name",
+                    dataIndex: "name",
                 },
                 {
                     title: "售价",
                     align: "center",
-                    dataIndex: "price",
-                    scopedSlots: { customRender: 'price' },
+                    dataIndex: "sellingPrice",
+                    scopedSlots: { customRender: 'sellingPrice' },
                 },
                 {
                     title: "数量",
                     align: "center",
-                    dataIndex: "num",
-                    scopedSlots: { customRender: 'num' },
+                    dataIndex: "number",
+                    scopedSlots: { customRender: 'number' },
                 },
                 {
                     title: "剩余库存",
                     align: "center",
-                    dataIndex: "stock",
+                    dataIndex: "inventory",
                 },
             ],
             model: {
@@ -137,7 +139,7 @@ export default {
                 }],
             },
             url: {
-                add: "/business/busRoomBookingOrders/booking-to-live",
+                list: "/rooms/cesGoods/queryList",
                 edit: "/business/busMemberCard/edit",
                 queryById: "/business/busMemberCard/queryById",
             },
@@ -161,6 +163,17 @@ export default {
         //备份model原始值
         this.modelDefault = JSON.parse(JSON.stringify(this.model));
         this.getbusCustomer();
+        // getAction('/kc/kcGoods/list').then(res=>{
+        //   if (res.success) {
+        //     this.dataSource = res.result.records;
+        //   }
+        // })
+        // getAction('/rooms/cesGoods/queryList').then(res=>{
+        //   if (res.success) {
+        //     this.dataSource = res.result.records;
+        //   }
+        // })
+        
     },
     methods: {
         handleSearch(value) {