覃浩 2 years ago
parent
commit
09ed3622a7

+ 3 - 3
src/views/markets/member.vue

@@ -350,7 +350,7 @@
           </a-dropdown>
         </span>
       </a-table>
-      <a-select
+      <!-- <a-select
         style="width: 200px"
         placeholder="请选择会员分组"
         :disabled="selectedRowKeys.length <= 0"
@@ -377,7 +377,7 @@
           :value="item.id"
           >{{ item.name }}</a-select-option
         >
-      </a-select>
+      </a-select> -->
     </div>
     <bus-member-card-modal
       ref="modalForm"
@@ -498,7 +498,7 @@ export default {
         {
           title: "状态",
           align: "center",
-          dataIndex: "labelName",
+          // dataIndex: "labelName",
         },
         {
           title: "标签?",

+ 82 - 53
src/views/markets/modules/memberCard/BusMemberCardForm.vue

@@ -3,22 +3,62 @@
     <j-form-container :disabled="formDisabled">
       <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
         <a-row>
-          <a-col :span="24">
+          <div class="title_style">基本信息</div>
+          <a-col :span="24" class="string_style">
+            <a-form-model-item label="会员姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
+              <a-input style="width: 180px;" v-model="model.name" placeholder="请输入会员姓名"  ></a-input>
+              <a-button @click="readCardNo" style="margin-left: 10px;">读取身份证</a-button>
+              <a-radio-group v-model="model.sex">
+                <a-radio :value="1">男</a-radio>
+                <a-radio :value="2">女</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+            
+          </a-col>
+          <!-- <a-col :span="24">
+            <a-form-model-item label="头像" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="avatar">
+              <a-input v-model="model.avatar" placeholder="请输入头像"  ></a-input>
+            </a-form-model-item>
+          </a-col> -->
+          <a-col :span="24" class="string_style">
             <a-form-model-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mobile">
               <a-input v-model="model.mobile" placeholder="请输入手机号"  ></a-input>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <a-col :span="12">
+            <a-form-model-item label="证件类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="certificateType">
+              <a-select
+                v-model="model.certificateType"
+                style="width: 100%"
+                placeholder="证件类型"
+                :allowClear="true"
+              >
+                <a-select-option :value="1" >身份证</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="证件号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="certificateNo">
+              <a-input v-model="model.certificateNo" placeholder="请输入证件号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24" class="string_style">
+            <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>
+          <div class="title_style">会员详情</div>
+          <a-col :span="12">
             <a-form-model-item label="会员卡号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cardNo">
               <a-input v-model="model.cardNo" placeholder="请输入会员卡号"  ></a-input>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <a-col :span="12">
             <a-form-model-item label="卡内码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cardInnerNo">
               <a-input v-model="model.cardInnerNo" placeholder="请输入卡内码"  ></a-input>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <a-col :span="12">
             <a-form-model-item label="等级类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="gradeId">
               <a-select
                 v-model:value="model.gradeId"
@@ -35,12 +75,12 @@
               </a-select>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <a-col :span="12">
             <a-form-model-item label="会员费" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="memberFee">
               <a-input-number v-model="model.memberFee" placeholder="请输入会员费" style="width: 100%" />
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <a-col :span="12">
             <a-form-model-item label="付款类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="payType">
               <a-radio-group v-model="model.payType">
                 <a-radio :value="1">现付</a-radio>
@@ -48,7 +88,7 @@
               </a-radio-group>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24" v-if="model.payType==1">
+          <a-col :span="12" v-if="model.payType==1">
             <a-form-model-item label="付款方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paymentMethod">
               <a-select
                 v-model="model.paymentMethod"
@@ -65,54 +105,21 @@
               </a-select>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="会员姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
-              <a-input style="width: 180px;" v-model="model.name" placeholder="请输入会员姓名"  ></a-input>
-              <a-button @click="readCardNo" style="margin-left: 10px;">读取身份证</a-button>
-            </a-form-model-item>
-          </a-col>
-          <!-- <a-col :span="24">
-            <a-form-model-item label="头像" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="avatar">
-              <a-input v-model="model.avatar" placeholder="请输入头像"  ></a-input>
-            </a-form-model-item>
-          </a-col> -->
-          <a-col :span="24">
+          
+          
+          <!-- <a-col :span="12">
             <a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sex">
-              <a-radio-group v-model="model.sex">
-                <a-radio :value="1">男</a-radio>
-                <a-radio :value="2">女</a-radio>
-              </a-radio-group>
+              
             </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="证件类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="certificateType">
-              <a-select
-                v-model="model.certificateType"
-                style="width: 100%"
-                placeholder="证件类型"
-                :allowClear="true"
-              >
-                <a-select-option :value="1" >身份证</a-select-option>
-              </a-select>
-            </a-form-model-item>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="证件号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="certificateNo">
-              <a-input v-model="model.certificateNo" placeholder="请输入证件号"  ></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-col :span="24">
+          </a-col> -->
+          
+          
+          <a-col :span="12">
             <a-form-model-item label="消费密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="consumePassword">
               <a-input-password  v-model="model.consumePassword" placeholder="请输入消费密码"></a-input-password>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <a-col :span="12">
             <a-form-model-item label="有效期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="validity">
               <a-radio-group v-model="model.validity">
                 <a-radio :value="1">无限制</a-radio>
@@ -120,7 +127,7 @@
               </a-radio-group>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24" v-if="model.validity==2">
+          <a-col :span="12" v-if="model.validity==2">
             <a-form-model-item label="有效期截止日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="validityEndTime" :rules="[
                                         {
                                             required: true,
@@ -131,12 +138,12 @@
               <j-date placeholder="请选择有效期截止日期" v-model="model.validityEndTime"  style="width: 100%" />
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <a-col :span="12">
             <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
               <a-textarea v-model="model.remark" rows="4" placeholder="请输入备注" />
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <a-col :span="12">
             <a-form-model-item label="推荐员工" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="staffId">
               <a-select
                 v-model="model.staffId"
@@ -285,4 +292,26 @@ export default {
     },
   },
 };
-</script>
+</script>
+<style scoped lang="less">
+@media (min-width: 576px){
+  ::v-deep .string_style {
+    .ant-col-sm-5 {
+      width: 10.5% !important;
+    }
+    .ant-col-sm-16 {
+      width: 83.2%;
+    }
+  }
+}
+.title_style {
+  color: #ff8d1a;
+  border-left: 2px solid #ff8d1a;
+  display: flex;
+  padding-left: 8px;
+  margin-bottom: 12px;
+}
+.ant-radio-group {
+  margin-left: 10px;
+}
+</style>

+ 172 - 2
src/views/pos/diandan.vue

@@ -49,6 +49,7 @@
         <p>数量:{{ sum }}</p>
         <div v-if="this.posTableState === 1">
           <a-button @click="placeOrder" :disabled="btnDisabled">下单</a-button>
+          <a-button @click="unionStation" style="margin-left: 10px;">联台</a-button>
           <!--          <a-button @click="addClear" :disabled="btnDisabled">清空新加</a-button>-->
         </div>
         <div v-else style="display: flex; gap: 5px; flex-flow: wrap">
@@ -152,6 +153,48 @@
           </a-space>
         </a-row>
       </a-card>
+      <a-modal v-model="unionOpen" width="1200px" title="联台" @ok="handleOk">
+          <a-tabs v-model="tabPosRegionId" @change="tabRegionChange">
+            <a-tab-pane key="1" tab="全部"></a-tab-pane>
+            <a-tab-pane
+              :key="item.id"
+              :tab="item.name"
+              v-for="item in regionList"
+            ></a-tab-pane>
+        </a-tabs>
+        <a-row :gutter="[5, 5]">
+              <a-col
+                v-for="item in uniteDataSource"
+                :key="item.id"
+                :span="2"
+                @click="orderMeal(item)"
+              >
+              <template>
+                <div :style="item.state == '1' ? 'backgroundColor: #00a0e9;border: 2px solid #000;color: #fff;' : 'backgroundColor: #0a7a72;border: 2px solid #000;color: #fff;'" :class="{'active': model.reserveTableList.some(t => t.id == item.id) }">
+                <div>{{ item.name }}</div>
+                <div style="margin-top: 10px">
+                  <div v-if="item.state == '2'">¥{{ item.posOrderGoods ? item.posOrderGoods.money : 0 }}</div> 
+                  <div v-else>待下单</div>
+                </div>
+                <div
+                  style="
+                    margin-top: 10px;
+                    display: flex;
+                    justify-content: space-between;
+                  "
+                >
+                  <div>
+                    <a-icon type="user" />{{ item.userNum }}/{{ item.num }}人
+                  </div>
+                  <div>
+                    <a-icon type="clock-circle" />{{ hours(item.orderTime) }}
+                  </div>
+                </div>
+                </div></template
+              >
+              </a-col>
+            </a-row>
+      </a-modal>
     </div>
     <payment-modal ref="modalPaymentForm" @ok="modalFormOk" @close="modalFormClose"></payment-modal>
     <goods-modal ref="modalGoodsForm" @ok="modalFormOk2"></goods-modal>
@@ -309,7 +352,19 @@ export default {
       dataSource2: [],
       oldSelectGoodsList: [],
       selectOrderInfo: {},
-      selectRoomOrder: {}
+      selectRoomOrder: {},
+      // 联台显示隐藏
+      unionOpen: false,
+      // 联台id
+      tabPosRegionId: '1',
+      // 联台房间tab
+      regionList: [],
+      // 列表数据
+      uniteDataSource: [],
+      model: {
+        reserveTableList: []
+      }
+      
     }
   },
   provide() {
@@ -374,6 +429,30 @@ export default {
     this.loadTree()
   },
   methods: {
+    // 处理小时
+    hours(start) {
+      var beginDate = new Date(start);
+      var endDate = new Date();
+      let hours = parseInt((endDate - beginDate) / (1000 * 60 * 60));
+      let leave1 =
+        (endDate.getTime() - beginDate.getTime()) % (24 * 3600 * 1000);
+      let leave2 = leave1 % (3600 * 1000);
+      let minutes = Math.floor(leave2 / (60 * 1000));
+      // return minutes == 0 ? hours : hours + 1;
+      return hours.toString().padStart(2, "0") + ":" + minutes.toString().padStart(2, "0");
+    },
+    getStatusColor(status) {
+      var find = this.statusColorList.find((t) => t.status == status);
+      return find ? find.color : "#fff";
+    },
+    loadTree() {
+      var that = this;
+      tree().then((res) => {
+        if (res.success) {
+          this.treeData = res.result;
+        }
+      });
+    },
     /** 通过桌号查询订单 */
     getOrderByTableId(tableId) {
       getAction('/pos/posOrderGoods/getOrderByTableId', { tableId }).then(resp => {
@@ -734,7 +813,81 @@ export default {
       } else {
         this.selectGoodsList.push(good)
       }
-    }
+    },
+    // 联台按钮
+    unionStation() {
+      this.unionOpen = true
+      this.loadRegion()
+    },
+    // 联台确认
+    handleOk() {
+      let tempdata = []
+      this.model.reserveTableList.forEach(index => {
+        tempdata.push(index.posOrderGoods.id)
+      })
+      console.log(tempdata);
+      postAction(`/pos/posOrderGoods/merge-order + ${this.posTableId}`,tempdata).then(res => {
+        console.log(res);
+        if (res.success) {
+          this.$message.success('联台成功')
+        }
+      })
+      console.log(this.posTableId);
+    },
+    // 联台大厅tab切换
+    tabRegionChange() {
+      this.loadTables();
+    },
+    // 联台大厅tab获取
+    loadRegion() {
+      getAction("/pos/posRegion/list", {
+        posTypeId: this.tabPosTypeId,
+      }).then((res) => {
+        console.log(res);
+        if (res.success) {
+          this.regionList = res.result.records;
+        }
+      });
+      this.loadTables();
+    },
+    // 联台大厅数据获取
+    loadTables() {
+      var obj = {
+        pageNo: 1,
+        pageSize: 99999,
+        posTypeId: this.tabPosTypeId,
+        // state: this.state,
+      };
+      if (this.tabPosRegionId != "1") {
+        obj.posRegionId = this.tabPosRegionId;
+      }
+      // getAction("/pos/posTable/tableList", obj).then((res) => {
+      //   console.log(res);
+      //   if (res.success) {
+      //     this.uniteDataSource = res.result.records;
+      //     console.log(this.uniteDataSource);
+      //   }
+      // });
+      getAction("/pos/posTable/getCanMerge", obj).then((res) => {
+        console.log(res);
+        if (res.success) {
+          this.uniteDataSource = res.result.records;
+          console.log(this.uniteDataSource);
+        }
+      });
+    },
+    // 联台点击
+    orderMeal(item) {
+      console.log(item);
+      if (this.model.reserveTableList.some((t) => t.id == item.id)) {
+          this.model.reserveTableList = this.model.reserveTableList.filter(
+              (t) => t.id != item.id
+          );
+      } else {
+          this.model.reserveTableList.push(item);
+      }
+      console.log(this.model.reserveTableList);
+    },
   }
 }
 </script>
@@ -779,4 +932,21 @@ export default {
   -ms-user-select: none;
   user-select: none;
 }
+.to_be_ordered_style {
+  border: 2px solid #000;
+  color: #fff;
+}
+/* .to_be_ordered_style {
+  background-color: #00a0e9;
+  border: 2px solid #000;
+  color: #fff;
+}
+.wait_for_account_style{
+  border: 2px solid #000;
+  background-color: #0a7a72;
+  color: #fff;
+} */
+.active {
+    border: #ff5500 2px solid !important;
+}
 </style>

+ 344 - 0
src/views/pos/modules/OrderFood.vue

@@ -0,0 +1,344 @@
+<template>
+        <a-drawer width="100%" title="预定菜品" placement="right" :visible="foodOpen" @close="onClose">
+            <a-tabs v-model="tabPosTypeId">
+                <a-tab-pane
+                    :key="item.id"
+                    :tab="item.name"
+                    v-for="item in posTypeList"
+                ></a-tab-pane>
+            </a-tabs>
+            <a-row :gutter="24">
+            <a-col :span="8">
+                <!-- <a-table :columns="columns" :data-source="merchandiseData" >
+                </a-table> -->
+                <a-table
+                    ref="table"
+                    size="middle"
+                    :scroll="{ x: true }"
+                    bordered
+                    rowKey="id"
+                    :columns="columns"
+                    :dataSource="merchandiseData"
+                    :row-selection="rowSelection"
+                    class="j-table-force-nowrap"
+                >
+                <template slot="num" slot-scope="text, record, index">
+                    <a-input-number
+                        v-if="record.id == null"
+                        v-model="record.num"
+                        style="width: auto; "
+                        :max="record.inventory"
+                        @change="(event) => numChange(event, index)"/>
+                    <span v-else>{{ record.num }}</span>
+                </template>
+                <template slot="sellingprice" slot-scope="text, record, index">
+                    ¥{{ (record.num * record.sellingprice).toFixed(2) }}
+                </template>
+                </a-table>
+            </a-col>
+            <a-col :span="16">
+                <a-tabs v-model="tabgoodsTypeId">
+                    <a-tab-pane key="1" tab="全部"></a-tab-pane>
+                    <a-tab-pane
+                        :key="item.id"
+                        :tab="item.name"
+                        v-for="item in goodsTypeList"
+                    ></a-tab-pane>
+                    <!-- <a-tab-pane key="1" tab="4"> -->
+                        
+                    <!-- </a-tab-pane> -->
+                </a-tabs>
+                <a-row :gutter="[5, 5]">
+                    <a-col :span="3"
+                    v-for="cust in dataSource"
+                    :key="cust.id"
+                    @click="addMerchandise(cust)">
+                        <div class="dish_style" v-if="cust.id != '0'">
+                            <div class="price_name_style">{{ cust.name }}</div>
+                            <div class="price_style">¥{{ cust.sellingPrice.toFixed(2) }}</div>
+                            <div class="stock_style">库存{{ cust.inventory }}</div>
+                            <div
+                                v-if="cust.inventory <= 0"
+                                style="display: flex; justify-content: right">
+                            <a-tag color="#f50"> 沽清 </a-tag>
+                            </div>
+                        </div>
+                    </a-col>
+                </a-row>
+            </a-col>
+          </a-row>
+        </a-drawer>
+        <!-- <a-modal
+            v-model:open="foodOpen"
+            title="Basic Modal"
+            width="100%"
+            wrap-class-name="full-modal"
+            @ok="handleOk"
+            >
+            <p>Some contents...</p>
+            <p>Some contents...</p>
+            <p>Some contents...</p>
+        </a-modal> -->
+</template>
+  
+<script>
+  import { httpAction, getAction, postAction } from '@/api/manage'
+  
+  export default {
+    name: 'OrderFood',
+    components: {},
+    props: {
+    },
+    data() {
+      return {
+        // 商品列表
+        merchandiseData: [],
+        // 控制预定点餐弹框
+        foodOpen: false,
+        tabPosTypeId: '',
+        tabgoodsTypeId: '1',
+        columns: [
+            {
+                title: '商品名称',
+                dataIndex: 'name',
+            },
+            {
+                title: '数量',
+                dataIndex: 'num',
+                scopedSlots: { customRender: 'num'}
+            },
+            {
+                title: '售价',
+                dataIndex: 'sellingprice',
+                scopedSlots: { customRender: 'sellingprice'}
+            },
+        ],
+        dataSource: [],
+        // 大tab栏切换数据
+        posTypeList: [],
+        // 中tab栏切换数据
+        goodsTypeList: [],
+        dataSource2: [],
+      }
+    },
+    computed: {
+        // 计算每一样商品的金额
+        amount() {
+            return this.merchandiseData.reduce(function (total, item) {
+                return total + item.sellingPrice * item.num
+            }, 0)
+        },
+        sum() {
+            return this.merchandiseData.reduce(function (total, item) {
+                return total + item.num
+            }, 0)
+        },
+        rowSelection() {
+            return {
+                onChange: (selectedRowKeys, selectedRows) => {
+                console.log(
+                    `selectedRowKeys: ${selectedRowKeys}`,
+                    'selectedRows: ',
+                    selectedRows
+                )
+                this.selectedRowKeys = selectedRowKeys
+                this.selectedRows = selectedRows
+                },
+                getCheckboxProps: (record) => ({
+                props: {
+                    disabled: record.name === 'Disabled User', // Column configuration not to be checked
+                    name: record.name
+                }
+                })
+            }
+        },
+    },
+    created() {
+        this.dataSource = [
+            {
+                id: '0'
+            }
+        ]
+        getAction('/pos/posType/list', {
+            pageNo: 1,
+            pageSize: 99
+            }).then((res) => {
+                console.log(res);
+            if (res.success) {
+                // console.log();
+                this.posTypeList = res.result.records
+                if (this.posTypeList && this.posTypeList.length > 0) {
+                this.tabPosTypeId = this.posTypeList[0].id
+                this.loadGoodsType()
+                }
+            }
+        })
+    },
+    methods: {
+      // 商品数量变化
+      numChange(val, index) {
+        if (val <= 0) {
+            this.merchandiseData.splice(index, 1)
+        }
+      },    
+      rowSelection() {
+
+      },
+      // 点击添加商品
+      addMerchandise(val) {
+        if (val.inventory <= 0) {
+            this.$message.warning('此商品库存不足')
+            return
+        }
+        for (let item = 0; item < this.merchandiseData.length; item++) {
+            let tempcycle = false
+            if (this.merchandiseData[item].name == val.name && this.merchandiseData[item].num >= 1) {
+                let tempdata = {
+                    name: val.name,
+                    // sellingprice: (val.sellingPrice * (this.merchandiseData[item].num + 1)).toFixed(2),
+                    sellingprice: val.sellingPrice,
+                    num: this.merchandiseData[item].num + 1
+                }
+                let tempindex = this.merchandiseData.findIndex(index => index == this.merchandiseData[item])
+                this.merchandiseData.splice(tempindex,1,tempdata)
+                return tempcycle = true
+                // return
+            } 
+            if (tempcycle) {
+                return
+            }
+            // return
+            // else {
+            //     console.log(222);
+            //     let tempdata = {
+            //         name: val.name,
+            //         sellingprice: val.sellingPrice.toFixed(2),
+            //         age: 1
+            //     }
+            //     this.merchandiseData.push(tempdata)
+            //     return
+            // }
+        }
+        // let temppic = this.merchandiseData.find(index => index.name == val.name)
+        // console.log(temppic);
+        // return
+        // this.merchandiseData.find(item => {
+            
+        // })
+        // if (this.merchandiseData.length !== 0) {
+        //     return
+        // }
+        // console.log(111);
+        let tempdata = {
+            name: val.name,
+            sellingprice: val.sellingPrice,
+            num: 1
+        }
+        this.merchandiseData.push(tempdata)
+        
+      },
+      // 请求商品列表数据
+      loadGoods() {
+        var ids = []
+        if (this.tabgoodsTypeId === '1') {
+            this.goodsTypeList.forEach((t) => {
+            ids.push(t.id)
+            })
+        } else {
+            ids.push(this.tabgoodsTypeId)
+        }
+        this.dataSource = [
+            
+        ]
+        getAction('/pos/posSellClearGoods/list', {
+            pageNo: 1,
+            pageSize: 99999,
+            goodTypes: ids
+        }).then((res) => {
+            console.log(res);
+            if (res.success) {
+            this.dataSource = [...this.dataSource, ...res.result.records]
+            }
+        })
+        getAction('/pos/posSellClearGoods/thali-list', {
+            pageNo: 1,
+            pageSize: 99999,
+            goodTypes: ids
+        }).then((res) => {
+            console.log(res);
+            if (res.success) {
+            this.dataSource2 = res.result.records
+            }
+        })
+      },
+      loadGoodsType() {
+        getAction('/rooms/cesStockType/getTopTypesByPosType', {
+            posType: this.tabPosTypeId
+        }).then((res2) => {
+            console.log(res2);
+            if (res2.success) {
+            this.goodsTypeList = res2.result
+            console.log(this.goodsTypeList);
+            if (this.goodsTypeList && this.goodsTypeList.length > 0) {
+                this.loadGoods()
+            }
+            }
+        })
+        },
+      handleOk() {
+
+      },
+      // 关闭预定点餐
+      onClose() {
+        this.foodOpen = false
+      },
+    // 预定点餐
+      edit() {
+        this.foodOpen = true
+      },
+    }
+  }
+</script>
+<style scoped lang="less">
+.full-modal {
+  .ant-modal {
+    max-width: 100%;
+    top: 0;
+    padding-bottom: 0;
+    margin: 0;
+  }
+  .ant-modal-content {
+    display: flex;
+    flex-direction: column;
+    height: calc(100vh) !important;
+  }
+  .ant-modal-body {
+    flex: 1;
+  }
+}
+.dish_style {
+    border: 3px solid #000;
+    border-radius: 5%;
+    height: 131px;
+}
+.price_style {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    color: red;
+    margin-left: 5px;
+}
+.stock_style {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    color: #2c2f3b;
+    margin-left: 5px;
+}
+.price_name_style {
+    margin-top: 10px;
+    margin-left: 5px;
+}
+::v-deep .ant-table-bordered.ant-table-empty .ant-table-placeholder {
+    height: 65vh !important;
+}
+</style>
+  

+ 15 - 3
src/views/pos/modules/ReserveModal.vue

@@ -1,5 +1,6 @@
 <
 <template>
+    <div>
     <j-modal
         :title="title"
         :width="width"
@@ -113,7 +114,7 @@
                         <a-form-model-item label="预定桌数" :labelCol="labelCol" :wrapperCol="wrapperCol">
                             <div class="cell-gap">
                                 <a-input-number disabled :value="model.reserveTableList.length"/>
-                                <a-button>预定点餐</a-button>
+                                <a-button @click="orderFood">预定点餐</a-button>
                             </div>
                         </a-form-model-item>
                         <a-form-model-item label="每桌人数" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -222,7 +223,8 @@
             </a-row>
         </a-card>
     </j-modal>
-
+    <!-- <order-food ref="orderFood"></order-food> -->
+</div>
 </template>
 
 <script>
@@ -230,11 +232,13 @@
 import PosTypeForm from './PosTypeForm'
 import {getAction} from '@api/manage'
 import moment from "moment";
+// import OrderFood from './OrderFood.vue'
 
 export default {
     name: 'ReserveModal',
     components: {
-        PosTypeForm
+        PosTypeForm,
+        // OrderFood
     },
     data() {
         return {
@@ -331,9 +335,17 @@ export default {
             agreementUnitData: { customerName: "" },
             busMarketAgreementUnitList: [],
             busMarketAgreementCustomer: {},
+            // 控制预定点餐弹框
+            // foodOpen: true,
+            // 控制预定点餐弹框弹出方向
+            // placement: 'right'
         }
     },
     methods: {
+        orderFood() {
+            // this.$refs.orderFood.edit()
+            this.$parent.handleOrderFood()
+        },
         moment,
         /**
          * 切换tab

+ 80 - 68
src/views/pos/reserve.vue

@@ -7,8 +7,8 @@
           <a-row :gutter="24">
             <a-col :span="3">
             <a-radio-group v-model="presetTimeTab" style="margin-bottom: 16px">
-              <a-radio-button value="small">金额冲账</a-radio-button>
-              <a-radio-button value="default">商品冲账</a-radio-button>
+              <a-radio-button value="small">预定就餐时间</a-radio-button>
+              <a-radio-button value="default">预定创建时间</a-radio-button>
             </a-radio-group>
           </a-col>
           <a-col :span="4">
@@ -109,15 +109,6 @@
               ></j-input>
             </a-form-item>
           </a-col>
-            <!-- <a-col :span="3">
-              <a-form-item label="">
-                <j-input
-                    placeholder="取餐号"
-                    v-model="queryParam.tableNo"
-                ></j-input>
-              </a-form-item>
-            </a-col> -->
-            
             <a-col :span="2">
             <span>
               <a-button
@@ -162,7 +153,14 @@
         </a-table>
       </div>
     </a-card>
+    
     <reserve-modal ref="reserveModal"></reserve-modal>
+    <order-food ref="orderFoodModel"></order-food>
+    <!-- <a-drawer :width="500" title="Basic Drawer" placement="right" :visible="foodOpen"  @close="onClose">
+        <p>Some contents...</p>
+        <p>Some contents...</p>
+        <p>Some contents...</p>
+    </a-drawer> -->
   </div>
 </template>
 
@@ -170,6 +168,7 @@
 import { JeecgListMixin } from "@/mixins/JeecgListMixin";
 import { mixinDevice } from '@/utils/mixin'
 import ReserveModal from '@views/pos/modules/ReserveModal'
+import OrderFood from './modules/OrderFood.vue'
 
 const columns = [
   // {
@@ -207,75 +206,82 @@ const columns = [
   //   align: 'center',
   //   dataIndex: 'code'
   // },
+
+
+
   {
     title: '预定单号',
     align: 'center',
     dataIndex: 'code'
   },
-  {
-    title: '预订单状态',
-    align: 'center',
-    dataIndex: 'code'
-  },
-  {
-    title: 'pos类型',
-    align: 'center',
-    dataIndex: 'code'
-  },
-  {
-    title: '来源',
-    align: 'center',
-    dataIndex: 'code'
-  },
-  {
-    title: '预定就餐时间',
-    align: 'center',
-    dataIndex: 'code'
-  },
-  {
-    title: '餐段',
-    align: 'center',
-    dataIndex: 'code'
-  },
-  {
-    title: '预定桌数',
-    align: 'center',
-    dataIndex: 'code'
-  },
-  {
-    title: '预定菜品合计价格(元)',
-    align: 'center',
-    dataIndex: 'code'
-  },
-  {
-    title: '订金金额(元)',
-    align: 'center',
-    dataIndex: 'code'
-  },
-  {
-    title: '顾客名字',
-    align: 'center',
-    dataIndex: 'code'
-  },
-  {
-    title: '性别',
-    align: 'center',
-    dataIndex: 'code'
-  },
-  {
-    title: '电话',
-    align: 'center',
-    dataIndex: 'code'
-  }
+  // {
+  //   title: '预订单状态',
+  //   align: 'center',
+  //   dataIndex: 'code'
+  // },
+  // {
+  //   title: 'pos类型',
+  //   align: 'center',
+  //   dataIndex: 'code'
+  // },
+  // {
+  //   title: '来源',
+  //   align: 'center',
+  //   dataIndex: 'code'
+  // },
+  // {
+  //   title: '预定就餐时间',
+  //   align: 'center',
+  //   dataIndex: 'code'
+  // },
+  // {
+  //   title: '餐段',
+  //   align: 'center',
+  //   dataIndex: 'code'
+  // },
+  // {
+  //   title: '预定桌数',
+  //   align: 'center',
+  //   dataIndex: 'code'
+  // },
+  // {
+  //   title: '预定菜品合计价格(元)',
+  //   align: 'center',
+  //   dataIndex: 'code'
+  // },
+  // {
+  //   title: '订金金额(元)',
+  //   align: 'center',
+  //   dataIndex: 'code'
+  // },
+  // {
+  //   title: '顾客名字',
+  //   align: 'center',
+  //   dataIndex: 'code'
+  // },
+  // {
+  //   title: '性别',
+  //   align: 'center',
+  //   dataIndex: 'code'
+  // },
+  // {
+  //   title: '电话',
+  //   align: 'center',
+  //   dataIndex: 'code'
+  // }
 ]
 
 export default {
-  components: { ReserveModal },
+  components: { 
+    ReserveModal,
+    OrderFood
+  },
   mixins: [JeecgListMixin],
   name: 'reserve',
   data() {
 
     return {
+      // foodOpen: true,
       queryParam: {},
       datetime: [],
       columns: columns,
@@ -287,6 +293,9 @@ export default {
     }
   },
   methods: {
+    onClose() {
+
+    },
     onChange(e, dateString) {
       this.queryParam.startTime = dateString[0]
       this.queryParam.endTime = dateString[1]
@@ -296,7 +305,10 @@ export default {
     },
     addReserve() {
       this.$refs.reserveModal.edit()
-    }
+    },
+    handleOrderFood() {
+        this.$refs.orderFoodModel.edit()
+    },
   }
 }
 

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

@@ -1,9 +1,9 @@
 <template>
     <a-card :bordered="false" :schemeId="schemeId">
-        <a-radio-group v-model="tablemode" :style="{ marginBottom: '8px' }">
+        <!-- <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>
+        </a-radio-group> -->
         <div>
             <a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns"
                      :dataSource="handlelistData" :pagination="ipagination" :loading="loading" :rowSelection="{