<!-- eslint-disable no-empty -->
<template>
  <div class="">
    <el-dialog
      :title="title"
      fullscreen
      :visible.sync="informationdialogshow"
      @close="onclose"
    >
      <div slot="title" class="flex row-between flex-y-center">
        <div class="flex" style="width: 500px">
          <div class="el-dialog__title" style="margin-right: 10px">
            {{ title }}
          </div>
          <el-dropdown @command="changePostPay">
            <el-button plain type="success" size="mini">
              {{ postPay ? "后付费" : "先付费" }}
              <i class="el-icon-caret-bottom"></i>
            </el-button>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item :command="false">先付费</el-dropdown-item>
              <el-dropdown-item :command="true">后付费</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
          <span
            @click="toggleFullScreen"
            class="flex flex-xy-center cur-pointer full-screen"
          >
            <svg
              v-if="!isFullScreen"
              t="1724396447139"
              class="icon"
              viewBox="0 0 1024 1024"
              version="1.1"
              xmlns="http://www.w3.org/2000/svg"
              p-id="8943"
              width="128"
              height="128"
            >
              <path
                d="M358.4 768H426.666667v85.333333H213.333333v-213.333333h85.333334v68.266667l128-128 59.733333 59.733333-128 128z m345.6 0l-128-128 59.733333-59.733333 132.266667 132.266666V640h85.333333v213.333333h-213.333333v-85.333333h64zM358.4 298.666667l128 128-59.733333 59.733333-128-128V426.666667H213.333333V213.333333h213.333334v85.333334H358.4z m345.6 0H640V213.333333h213.333333v213.333334h-85.333333V354.133333l-132.266667 132.266667-59.733333-59.733333 128-128z"
                fill="#666666"
                p-id="8944"
              ></path>
            </svg>
            <svg
              v-else
              t="1724396479520"
              class="icon"
              viewBox="0 0 1024 1024"
              version="1.1"
              xmlns="http://www.w3.org/2000/svg"
              p-id="9141"
              width="128"
              height="128"
            >
              <path
                d="M298.666667 631.466667H226.133333v-81.066667h217.6v204.8h-85.333333v-68.266667l-128 128L170.666667 759.466667l128-128z m422.4 0l128 128-59.733334 59.733333-128-128v68.266667h-85.333333V554.666667h217.6v81.066666h-72.533333zM298.666667 341.333333L187.733333 230.4 243.2 170.666667l115.2 115.2V217.6h85.333333v204.8H226.133333V341.333333H298.666667z m430.933333 0h64v81.066667h-217.6V217.6h85.333333v72.533333L780.8 170.666667l59.733333 59.733333L729.6 341.333333z"
                fill="#666666"
                p-id="9142"
              ></path>
            </svg>
          </span>
        </div>

        <div class="flex flex-1" style="padding-right: 50px">
          <div class="flex-1">
            <el-input
              v-model="goods.query.productId"
              size="small"
              clearable
              placeholder="请输入商品名称"
              style="width: 100%"
              class="filter-item"
              suffix-icon="el-icon-search"
            />
          </div>
          <div
            style="display: flex; justify-content: flex-end; margin-left: 10px"
          >
            <div style="width: 100px; margin-left: 20px">
              <el-select v-model="layout.sel" placeholder="请选择">
                <el-option
                  v-for="item in layout.list"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                  :disabled="item.disabled"
                >
                </el-option>
              </el-select>
            </div>
          </div>
        </div>
      </div>
      <div class="head-container search-box flex row-between" v-if="false">
        <div>
          <el-dropdown @command="changePostPay">
            <el-button plain type="success" size="mini">
              {{ postPay ? "后付费" : "先付费" }}
              <i class="el-icon-caret-bottom"></i>
            </el-button>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item :command="false">先付费</el-dropdown-item>
              <el-dropdown-item :command="true">后付费</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </div>

        <div class="flex">
          <div style="width: 300px">
            <el-input
              v-model="goods.query.productId"
              size="small"
              clearable
              placeholder="请输入商品名称"
              style="width: 100%"
              class="filter-item"
              suffix-icon="el-icon-search"
            />
            <!-- @keyup.enter.native="getGoods" -->
          </div>
          <div
            style="display: flex; justify-content: flex-end; margin-left: 10px"
          >
            <!-- <el-button style="margin-right: 10px" type="primary" @click="getGoods"
            >查询</el-button
          >
          <el-button @click="reset">重置</el-button> -->
            <div style="width: 100px; margin-left: 20px">
              <el-select v-model="layout.sel" placeholder="请选择">
                <el-option
                  v-for="item in layout.list"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                  :disabled="item.disabled"
                >
                </el-option>
              </el-select>
            </div>
          </div>
        </div>
      </div>
      <div class="diancan">
        <div class="order">
          <div class="relative">
            <div style="padding-right: 14px">
              <div class="choose-user flex">
                <el-button
                  type="success"
                  v-if="vipUser.id === ''"
                  @click="refChooseUserOpen"
                  >选择用户</el-button
                >
                <template v-else>
                  <div class="flex cur-pointer" @click="refChooseUserOpen">
                    <img
                      v-if="vipUser.headImg"
                      class="headimg"
                      :src="vipUser.headImg"
                      alt=""
                    />
                    <div v-else class="headimg flex flex-x-y-center">
                      <i class="el-icon-user"></i>
                    </div>
                    <div>
                      <div class="ft-13 color-000">{{ vipUser.nickName }}</div>
                      <div style="margin-top: 2px" class="color-666 ft-12">
                        余额：{{ vipUser.amount }}
                      </div>
                    </div>
                  </div>
                </template>
              </div>
              <div class="flex row-between">
                <!-- <div class="tableId" @click="chooseTableOpen"> -->
                <div class="tableId">
                  {{ table ? "桌台号：" + table.name : "桌台号/取餐号" }}
                </div>

                <el-button
                  @click="clearCart"
                  type="text"
                  size="mini"
                  :disabled="order.list.length <= 0"
                  >清空</el-button
                >
                <!-- <div
                  class="clear cur-pointer color-000 flex"
                  @click="clearCart"
                >
                  清空
                </div> -->
              </div>
            </div>
            <div class="absolute bottom">
              <div class="flex row-right youhui" v-if="giftLen">
                <span> 已优惠￥{{ allGiftMoney | to2 }} </span>
                <i class="el-icon-arrow-right"></i>
              </div>

              <div class="flex row-between">
                <el-checkbox
                  v-model="order.allPack"
                  :disabled="!this.order.list.length"
                  >打包</el-checkbox
                >
                <div class="flex">
                  <span class="color-666" style="margin-right: 5px"
                    >共{{ allNumber }}件</span
                  >
                  <span class="color-000 ft-18">￥{{ allPrice }} </span>
                </div>
              </div>

              <div class="flex mt-14">
                <template v-if="isCreateOrder">
                  <button
                    class="my-btn flex-1 default"
                    @click="createOrderClose"
                  >
                    <span>加菜/返回</span>
                  </button>
                  <div style="width: 15px"></div>
                  <button class="my-btn flex-1 success" @click="payOrder">
                    <span>立即支付</span>
                  </button>
                </template>
                <template v-else>
                  <!-- <el-dropdown
                    split-button
                    size="medium"
                    type="success"
                    @command="changeIsPrint"
                  >
                    {{ isPrint ? "下单并打印制作单" : "仅下单(不打印)" }}
                    <el-dropdown-menu slot="dropdown">
                      <el-dropdown-item :command="false"
                        >仅下单(不打印)</el-dropdown-item
                      >
                      <el-dropdown-item :command="true"
                        >下单并打印制作单</el-dropdown-item
                      >
                    </el-dropdown-menu>
                  </el-dropdown> -->
                  <template v-if="postPay">
                    <div class="flex-1">
                      <el-button
                        type="success"
                        size="medium"
                        :disabled="!order.list.length"
                        @click="toCreateOrder(false)"
                      >
                        仅下单
                      </el-button>
                    </div>
                    <div style="width: 15px"></div>
                  </template>
                  <div class="flex-1">
                    <el-button
                      size="medium"
                      :disabled="!order.list.length && !order.old.list.length"
                      @click="toCreateOrder(true)"
                    >
                      去结账
                    </el-button>
                  </div>
                </template>
              </div>
            </div>
            <div class="list">
              <!-- 当前购物车列表 -->
              <template v-if="order.list.length">
                <cart-item
                  @itemClick="changeOrderSel"
                  @changeOrderNumber="changeOrderNumber"
                  @cartGoodsNumberInput="cartGoodsNumberInput"
                  @cartGoodsNumberChange="cartGoodsNumberChange"
                  v-for="(item, index) in order.list"
                  :key="index"
                  :index="index"
                  :item="item"
                  :selIndex="order.selIndex"
                ></cart-item>
              </template>
              <div v-if="order.gift.list.length">
                <div class="carts_list_title">以下是优惠菜品</div>
              </div>

              <div v-if="!order.list.length">
                <el-empty
                  :image-size="50"
                  description="点餐列表为空"
                ></el-empty>
              </div>
            </div>
            <!-- 已下单菜品列表 -->
            <template v-if="order.old.list.length">
              <div class="carts_list_title">已下单菜品</div>
              <div class="list">
                <cart-item
                  @itemClick="changeOrderOldSel"
                  :canChangeNumber="false"
                  v-for="(item, index) in order.old.list"
                  :key="index"
                  :index="index"
                  :item="item"
                  :selIndex="order.old.selIndex"
                ></cart-item>
              </div>
            </template>

            <div class="order_remark" v-if="note.content">
              订单备注： {{ note.content }}
            </div>
          </div>

          <div class="controls">
            <div
              class="numberbox"
              :class="{ 'cur-pointer': order.old.selIndex < 0 }"
            >
              <div class="reduce" @click="changeOrderGoodsNumber('-')">-</div>
              <div class="input relative">
                <div
                  class="disabled-box"
                  v-if="order.selIndex >= 0"
                  @click="changeKeyboradShow(true)"
                ></div>
                <!-- <input type="number" :disabled="order.selIndex<0" v-model="order.number" /> -->
                <input
                  type="number"
                  disabled
                  v-model="order.number"
                  style="display: none"
                />
                <input type="number" disabled v-model="order.cacheNumber" />
              </div>
              <div class="add" @click="changeOrderGoodsNumber()">+</div>
            </div>
            <!-- <div class="btn" v-for="(item, index) in order.btns" :key="index" :class="{ disabled: item.disabled }" @click="orderBtnsClick(index,item)">
              {{ item.text }}
            </div> -->
            <div
              class="btn"
              :class="{ disabled: !isSku }"
              @click="orderBtnsClick('sku')"
            >
              规格
            </div>
            <div
              class="btn"
              :class="{ disabled: order.selIndex < 0 }"
              @click="orderBtnsClick('gift')"
            >
              {{ returnGiftText }}
            </div>
            <div
              class="btn"
              :class="{ disabled: order.selIndex < 0 }"
              @click="orderBtnsClick('pack')"
            >
              {{ returnPackText }}
            </div>
            <div
              class="btn"
              :class="{ disabled: order.selIndex < 0 }"
              @click="orderBtnsClick('del')"
            >
              删除
            </div>

            <div
              class="btn"
              :class="{ disabled: !order.list.length }"
              @click="saveOrder"
            >
              存单
            </div>
            <div
              class="btn relative"
              :class="{ disabled: !prveOrder.list.length }"
              @click="cacheOrderShow"
            >
              取单
              <span class="prve-car-len" v-if="prveOrder.list.length">{{
                prveOrder.list.length
              }}</span>
            </div>

            <!-- <div
              class="btn"
              :class="{ disabled: !order.list.length }"
              @click="orderBtnsClick('save')"
            >
              存单
            </div>

            <div
              class="btn relative"
              :class="{ disabled: !prveOrder.list.length }"
              @click="orderBtnsClick('getOrder')"
            >
              取单
              <span class="prve-car-len" v-if="prveOrder.list.length">{{
                prveOrder.list.length
              }}</span>
            </div> -->

            <div class="btn" @click="refNoteShow">整单备注</div>
          </div>
        </div>
        <div class="goods">
          <template v-if="!isCreateOrder">
            <div class="flex categoty">
              <div
                class="show_more_btn"
                :class="{ showAll: category.showAll }"
                @click="toggleShowAll"
              >
                <div class="flex">
                  <div class="flex">
                    <i class="el-icon-arrow-down"></i>
                  </div>
                  <span>展开</span>
                </div>
              </div>
              <div
                class="flex categorys"
                :class="{ 'flex-wrap': category.showAll }"
              >
                <div
                  v-for="(item, index) in category.list"
                  :key="index"
                  @click="changeCategoryId(item)"
                >
                  <el-tag
                    size="medium"
                    type="success"
                    effect="dark"
                    v-if="goods.query.categoryId === item.id"
                    >{{ item.name }}</el-tag
                  >
                  <el-tag size="medium" type="success" v-else effect="plain">{{
                    item.name
                  }}</el-tag>
                </div>
              </div>
            </div>
            <div
              class="no-search-result"
              v-if="search.list.length <= 0 && goods.query.productId !== ''"
            >
              未找到相关商品
            </div>
            <div class="goods-list" v-if="goods.list.length">
              <div
                class="goods-item"
                :class="{
                  'sell-out':
                    item.isPauseSale ||
                    (item.typeEnum !== 'sku' && item.stockNumber <= 0),
                  'layout-img-and-text': layout.sel === 'img-and-text',
                  'layout-text': layout.sel === 'text',
                  none:
                    (goods.query.categoryId !== '') &
                    (goods.query.categoryId != item.categoryId),
                }"
                @click="goodsClick(item)"
                v-for="(item, index) in goods.list"
                :key="index"
              >
                <!-- <div class="sell-out flex flex-xy-cnter">
                  <svg t="1724210152457" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6417" width="64" height="64"><path d="M498.61856 0h25.483584c136.270651 3.58203 270.187397 63.197242 362.296737 163.954625 84.894108 90.267153 133.046824 212.209685 137.038229 335.687372v22.873819c-3.684374 123.83589-51.785918 246.341312-136.884714 336.915497-91.955824 100.450352-225.258508 159.96322-361.119784 164.005797h-25.739443c-140.722603-3.684374-278.681925-67.342162-371.047124-173.72845C46.87342 758.366898 2.76328 636.936085 0 514.942382v-10.74609C3.837889 381.435011 49.534356 259.697167 132.944481 168.867123 225.05382 65.499975 360.556894 4.042577 498.61856 0M435.574834 52.195293c-183.860477 28.042177-340.702214 177.463995-378.160012 359.584628-31.828894 141.49018 7.317575 296.643246 103.264804 405.536955a465.152166 465.152166 0 0 0 689.489581 14.328119c89.857778-93.951527 136.52651-226.896007 125.678077-356.463145-9.415621-133.149168-80.339813-259.953026-188.056569-338.757683-99.580431-74.19919-229.761631-105.004647-352.215881-84.280046z" fill="#ffffff" p-id="6418"></path><path d="M423.088901 64.732397c118.974564-23.794913 247.006546 1.995702 346.535805 71.43591 104.390585 71.231223 176.798761 187.647194 193.224927 313.069412a455.941232 455.941232 0 0 1-79.623407 326.169407c-71.384738 101.422618-185.958523 171.52806-309.078008 187.596022a454.661936 454.661936 0 0 1-325.964719-79.98161c-101.115586-71.43591-170.913997-185.805007-187.033132-308.61746a455.787717 455.787717 0 0 1 361.938534-509.671681m20.67343 12.12773c-162.112438 23.590225-304.063165 146.402679-351.448304 303.142072-41.449203 130.1812-17.705462 279.142472 63.197242 389.41782 75.376143 105.516366 199.365549 174.496027 329.035031 181.4554 126.394483 8.801559 255.194043-41.091 342.902603-132.535106a439.719754 439.719754 0 0 0 123.733547-324.736595c-4.247264-130.744091-71.384738-257.240917-176.440558-334.766279-93.337464-70.514817-215.535855-100.39918-330.979561-81.977312z" fill="#ffffff" p-id="6419"></path><path d="M630.488431 283.594423c31.214832-15.351557 62.583179-30.498426 93.183949-47.078107 9.876168 14.788666 18.575384 37.048423 39.504673 21.850382l9.978511 19.649993c-17.961321 7.16406-35.462096 21.287492-55.777322 18.166009a306.110039 306.110039 0 0 1-18.933587-20.008196l-20.212882 10.49023c7.266403 28.809755-15.70976 47.845685-37.867174 60.587477a33.875768 33.875768 0 0 1 1.535156-34.541002c-3.889061-9.722653-7.675778-19.445305-11.411324-29.116786z m-66.421068 37.611314l56.442557-27.888661 10.439058 20.98046c-20.980461 11.155464-46.05467 18.063665-60.382789 38.430064 20.67343 1.023437 38.174204-10.592574 56.084353-19.189446l11.667183 18.575384c-44.519514 21.338664-87.657388 45.747639-133.149168 64.732397l-10.132027-18.268353c14.07226-12.792964 55.777322-12.639448 45.338264-39.095297-20.980461 10.234371-42.012093 20.622258-63.14607 30.754285l-9.722652-20.980461c19.957024-9.876168 39.914047-19.85468 59.922242-29.679676a969.757833 969.757833 0 0 0-5.935935-14.32812c11.667183-5.628904 23.283194-11.411324 34.950377-17.040227l7.624607 12.997651z m85.252311 30.191395c42.216781-20.826945 84.12653-42.012093 126.496827-62.58318 12.844136 25.688271 2.967968 53.474589-7.16406 78.088252 19.138274-1.791015 45.23592-19.85468 55.41912 5.628904-23.9996 9.978512-49.483184 14.942182-74.250363 22.413273-21.492179 15.249213-40.937484 33.261706-63.862475 46.668732-16.221478-23.897257 16.426166-33.875768 29.52616-48.050373-15.812103-5.577732-31.573035-11.30898-47.282794-17.244915 12.946479-6.549998 25.841787-13.099995 38.89061-19.547649 10.592574 3.121483 21.185148 6.294138 31.828894 9.159763 2.712108-12.792964 5.475389-25.483584 8.392184-38.225377-29.577332 14.225776-58.898806 29.065614-88.373794 43.444906-2.405077-4.96367-7.16406-14.839838-9.620309-19.752336z m-139.033931 76.757783c44.007796-22.003898 88.169107-43.751936 132.228074-65.755834 7.675778 22.669132 35.820299 49.841387 17.500775 72.664034-27.376943 18.217181-58.540603 29.679676-87.248014 45.594124a123.631203 123.631203 0 0 1-27.376942 50.557793 249.360452 249.360452 0 0 0-35.103893-103.060117m92.211683-20.315227c4.093748 9.057418 8.238669 18.063665 12.281246 27.121084l20.724601-12.12773-9.876168-24.869522-23.129679 9.876168m-51.837089 26.404678l10.746089 24.408975 24.460147-8.443356c-4.503123-8.852731-8.903903-17.858978-13.304682-26.814053l-21.901554 10.848434z" fill="#ffffff" p-id="6420"></path><path d="M638.010694 474.107241c53.883964-26.76288 107.767928-53.525761 161.703063-80.186298l11.56484 23.43671c-30.856629 15.351557-61.662086 30.703113-92.518715 45.901155l9.057418 18.677727c40.476938-19.957024 80.80036-40.323422 121.379642-60.075758 2.76328 5.833592 8.494528 17.603118 11.411323 23.436709-40.221078 20.008195-80.442157 40.016391-120.765578 59.871071l10.336714 24.511319c18.319524-11.30898 57.824197-14.174604 49.6367-43.29139 13.407026-6.805857 26.916396-13.458198 40.476938-20.008195 5.577732 15.249213 16.784369 36.997252-2.149218 48.050372-69.082005 39.402329-142.411274 71.333567-213.130778 107.870271l-19.547649-39.402328c12.895308-6.652341 25.841787-13.202339 38.737095-19.803508 2.916796 3.633202 8.648044 11.001949 11.411323 14.686322 17.0914-8.443356 34.131628-16.886712 51.2742-25.227725l-10.694918-24.408975c-41.551547 18.063665-81.414422 39.760532-122.300735 59.410525a2827.0915 2827.0915 0 0 1-11.616011-23.334366c40.27225-20.366398 81.056219-39.862875 121.174954-60.689821l-9.313278-17.910149c-40.52811 14.839838-72.305832 43.700765-106.028084 69.286692-1.791015-4.503123-5.475389-13.458198-7.266404-18.063665 13.969917-15.146869 27.376943-31.16366 30.191395-52.502324 10.74609-5.935935 21.594523-11.769527 32.442956-17.705462l14.532807 7.471091z m-311.124881-22.720304l87.452701-43.496077 12.895307 25.995303c-29.372645 14.635151-58.796462 29.065614-88.169107 43.905452l9.722653 16.784368a12302.737494 12302.737494 0 0 1 77.115986-38.430063l12.997651 25.841787c-26.302334 12.946479-52.604667 25.944131-78.446454 39.760531 2.405077 4.093748 7.266403 12.12773 9.722653 16.119135 25.6371-12.946479 51.478887-25.688271 77.269501-38.430064 4.196092 8.699215 8.443356 17.398431 12.741792 25.995303a20601.789016 20601.789016 0 0 0-77.78122 38.634751l8.852731 17.296087c30.34491-15.351557 60.740992-30.34491 91.188246-45.389436l13.458198 27.172256c-83.103093 41.398031-166.30853 82.386687-249.360451 123.887062-15.198041-29.884364-29.986707-59.973415-44.826546-90.113638l-25.125381 24.25546-12.792964-26.507021c18.370696-29.423817 24.255459-64.169507 19.803508-98.403479 14.532807-7.266403 29.167958-14.430463 43.803109-21.696866l4.503123 23.948428 46.412873-23.027335-8.903903-18.728899c15.965619-7.982809 31.931238-15.863275 47.948029-23.794913 2.302733 4.605467 7.061716 13.765229 9.517965 18.421868m-99.478087 84.228874l8.801559 14.839838c21.696867-11.001949 43.496077-21.696867 65.141772-32.749987l-8.852731-12.281245c-23.794913 1.023437-44.365999 19.138274-65.0906 30.191394m19.189446 42.370297l13.407026 13.355854c21.338664-8.085153 41.295687-19.547649 61.662086-29.884364-2.353905-4.093748-6.9082-12.485933-9.210934-16.682025-22.003898 10.950777-44.110139 21.79921-65.858178 33.210535m23.334366 41.909749l8.648043 17.142572c21.185148-10.49023 42.370296-20.929289 63.657788-31.317176l-7.675778-17.910149c-21.492179 10.643746-43.137874 21.338664-64.630053 32.084753z m-16.221479 82.079656c78.548798-39.248813 157.302284-78.03708 235.902254-117.285892 11.87187 29.014442 48.306232 70.924192 13.765229 97.226525-67.035131 38.788266-138.624556 69.696067-207.501874 105.311679l-42.165609-85.252312m59.973415 3.479687c4.912498 11.564839 10.132027 23.027335 15.351557 34.48983 47.078107-25.074209 97.482385-44.212483 141.950727-73.994503-5.117186-10.183199-9.92734-20.468742-14.583979-30.805457-47.640997 23.43671-94.770276 47.692169-142.769477 70.31013z" fill="#ffffff" p-id="6421"></path></svg>
                </div> -->

                <div class="flex img-box" v-if="layout.sel !== 'text'">
                  <img class="goods-img" :src="item.coverImg" alt="" />
                  <template v-if="layout.sel === 'img-and-text'">
                    <div class="sell-out-svg" v-if="isSellOut(item)">
                      <svg
                        t="1724234807994"
                        class="icon"
                        viewBox="0 0 1024 1024"
                        version="1.1"
                        xmlns="http://www.w3.org/2000/svg"
                        p-id="4356"
                        width="64"
                        height="64"
                      >
                        <path
                          d="M498.61856 0h25.483584c136.270651 3.58203 270.187397 63.197242 362.296737 163.954625 84.894108 90.267153 133.046824 212.209685 137.038229 335.687372v22.873819c-3.684374 123.83589-51.785918 246.341312-136.884714 336.915497-91.955824 100.450352-225.258508 159.96322-361.119784 164.005797h-25.739443c-140.722603-3.684374-278.681925-67.342162-371.047124-173.72845C46.87342 758.366898 2.76328 636.936085 0 514.942382v-10.74609C3.837889 381.435011 49.534356 259.697167 132.944481 168.867123 225.05382 65.499975 360.556894 4.042577 498.61856 0M435.574834 52.195293c-183.860477 28.042177-340.702214 177.463995-378.160012 359.584628-31.828894 141.49018 7.317575 296.643246 103.264804 405.536955a465.152166 465.152166 0 0 0 689.489581 14.328119c89.857778-93.951527 136.52651-226.896007 125.678077-356.463145-9.415621-133.149168-80.339813-259.953026-188.056569-338.757683-99.580431-74.19919-229.761631-105.004647-352.215881-84.280046z"
                          fill="#ffffff"
                          p-id="4357"
                        ></path>
                        <path
                          d="M423.088901 64.732397c118.974564-23.794913 247.006546 1.995702 346.535805 71.43591 104.390585 71.231223 176.798761 187.647194 193.224927 313.069412a455.941232 455.941232 0 0 1-79.623407 326.169407c-71.384738 101.422618-185.958523 171.52806-309.078008 187.596022a454.661936 454.661936 0 0 1-325.964719-79.98161c-101.115586-71.43591-170.913997-185.805007-187.033132-308.61746a455.787717 455.787717 0 0 1 361.938534-509.671681m20.67343 12.12773c-162.112438 23.590225-304.063165 146.402679-351.448304 303.142072-41.449203 130.1812-17.705462 279.142472 63.197242 389.41782 75.376143 105.516366 199.365549 174.496027 329.035031 181.4554 126.394483 8.801559 255.194043-41.091 342.902603-132.535106a439.719754 439.719754 0 0 0 123.733547-324.736595c-4.247264-130.744091-71.384738-257.240917-176.440558-334.766279-93.337464-70.514817-215.535855-100.39918-330.979561-81.977312z"
                          fill="#ffffff"
                          p-id="4358"
                        ></path>
                        <path
                          d="M630.488431 283.594423c31.214832-15.351557 62.583179-30.498426 93.183949-47.078107 9.876168 14.788666 18.575384 37.048423 39.504673 21.850382l9.978511 19.649993c-17.961321 7.16406-35.462096 21.287492-55.777322 18.166009a306.110039 306.110039 0 0 1-18.933587-20.008196l-20.212882 10.49023c7.266403 28.809755-15.70976 47.845685-37.867174 60.587477a33.875768 33.875768 0 0 1 1.535156-34.541002c-3.889061-9.722653-7.675778-19.445305-11.411324-29.116786z m-66.421068 37.611314l56.442557-27.888661 10.439058 20.98046c-20.980461 11.155464-46.05467 18.063665-60.382789 38.430064 20.67343 1.023437 38.174204-10.592574 56.084353-19.189446l11.667183 18.575384c-44.519514 21.338664-87.657388 45.747639-133.149168 64.732397l-10.132027-18.268353c14.07226-12.792964 55.777322-12.639448 45.338264-39.095297-20.980461 10.234371-42.012093 20.622258-63.14607 30.754285l-9.722652-20.980461c19.957024-9.876168 39.914047-19.85468 59.922242-29.679676a969.757833 969.757833 0 0 0-5.935935-14.32812c11.667183-5.628904 23.283194-11.411324 34.950377-17.040227l7.624607 12.997651z m85.252311 30.191395c42.216781-20.826945 84.12653-42.012093 126.496827-62.58318 12.844136 25.688271 2.967968 53.474589-7.16406 78.088252 19.138274-1.791015 45.23592-19.85468 55.41912 5.628904-23.9996 9.978512-49.483184 14.942182-74.250363 22.413273-21.492179 15.249213-40.937484 33.261706-63.862475 46.668732-16.221478-23.897257 16.426166-33.875768 29.52616-48.050373-15.812103-5.577732-31.573035-11.30898-47.282794-17.244915 12.946479-6.549998 25.841787-13.099995 38.89061-19.547649 10.592574 3.121483 21.185148 6.294138 31.828894 9.159763 2.712108-12.792964 5.475389-25.483584 8.392184-38.225377-29.577332 14.225776-58.898806 29.065614-88.373794 43.444906-2.405077-4.96367-7.16406-14.839838-9.620309-19.752336z m-139.033931 76.757783c44.007796-22.003898 88.169107-43.751936 132.228074-65.755834 7.675778 22.669132 35.820299 49.841387 17.500775 72.664034-27.376943 18.217181-58.540603 29.679676-87.248014 45.594124a123.631203 123.631203 0 0 1-27.376942 50.557793 249.360452 249.360452 0 0 0-35.103893-103.060117m92.211683-20.315227c4.093748 9.057418 8.238669 18.063665 12.281246 27.121084l20.724601-12.12773-9.876168-24.869522-23.129679 9.876168m-51.837089 26.404678l10.746089 24.408975 24.460147-8.443356c-4.503123-8.852731-8.903903-17.858978-13.304682-26.814053l-21.901554 10.848434z"
                          fill="#ffffff"
                          p-id="4359"
                        ></path>
                        <path
                          d="M638.010694 474.107241c53.883964-26.76288 107.767928-53.525761 161.703063-80.186298l11.56484 23.43671c-30.856629 15.351557-61.662086 30.703113-92.518715 45.901155l9.057418 18.677727c40.476938-19.957024 80.80036-40.323422 121.379642-60.075758 2.76328 5.833592 8.494528 17.603118 11.411323 23.436709-40.221078 20.008195-80.442157 40.016391-120.765578 59.871071l10.336714 24.511319c18.319524-11.30898 57.824197-14.174604 49.6367-43.29139 13.407026-6.805857 26.916396-13.458198 40.476938-20.008195 5.577732 15.249213 16.784369 36.997252-2.149218 48.050372-69.082005 39.402329-142.411274 71.333567-213.130778 107.870271l-19.547649-39.402328c12.895308-6.652341 25.841787-13.202339 38.737095-19.803508 2.916796 3.633202 8.648044 11.001949 11.411323 14.686322 17.0914-8.443356 34.131628-16.886712 51.2742-25.227725l-10.694918-24.408975c-41.551547 18.063665-81.414422 39.760532-122.300735 59.410525a2827.0915 2827.0915 0 0 1-11.616011-23.334366c40.27225-20.366398 81.056219-39.862875 121.174954-60.689821l-9.313278-17.910149c-40.52811 14.839838-72.305832 43.700765-106.028084 69.286692-1.791015-4.503123-5.475389-13.458198-7.266404-18.063665 13.969917-15.146869 27.376943-31.16366 30.191395-52.502324 10.74609-5.935935 21.594523-11.769527 32.442956-17.705462l14.532807 7.471091z m-311.124881-22.720304l87.452701-43.496077 12.895307 25.995303c-29.372645 14.635151-58.796462 29.065614-88.169107 43.905452l9.722653 16.784368a12302.737494 12302.737494 0 0 1 77.115986-38.430063l12.997651 25.841787c-26.302334 12.946479-52.604667 25.944131-78.446454 39.760531 2.405077 4.093748 7.266403 12.12773 9.722653 16.119135 25.6371-12.946479 51.478887-25.688271 77.269501-38.430064 4.196092 8.699215 8.443356 17.398431 12.741792 25.995303a20601.789016 20601.789016 0 0 0-77.78122 38.634751l8.852731 17.296087c30.34491-15.351557 60.740992-30.34491 91.188246-45.389436l13.458198 27.172256c-83.103093 41.398031-166.30853 82.386687-249.360451 123.887062-15.198041-29.884364-29.986707-59.973415-44.826546-90.113638l-25.125381 24.25546-12.792964-26.507021c18.370696-29.423817 24.255459-64.169507 19.803508-98.403479 14.532807-7.266403 29.167958-14.430463 43.803109-21.696866l4.503123 23.948428 46.412873-23.027335-8.903903-18.728899c15.965619-7.982809 31.931238-15.863275 47.948029-23.794913 2.302733 4.605467 7.061716 13.765229 9.517965 18.421868m-99.478087 84.228874l8.801559 14.839838c21.696867-11.001949 43.496077-21.696867 65.141772-32.749987l-8.852731-12.281245c-23.794913 1.023437-44.365999 19.138274-65.0906 30.191394m19.189446 42.370297l13.407026 13.355854c21.338664-8.085153 41.295687-19.547649 61.662086-29.884364-2.353905-4.093748-6.9082-12.485933-9.210934-16.682025-22.003898 10.950777-44.110139 21.79921-65.858178 33.210535m23.334366 41.909749l8.648043 17.142572c21.185148-10.49023 42.370296-20.929289 63.657788-31.317176l-7.675778-17.910149c-21.492179 10.643746-43.137874 21.338664-64.630053 32.084753z m-16.221479 82.079656c78.548798-39.248813 157.302284-78.03708 235.902254-117.285892 11.87187 29.014442 48.306232 70.924192 13.765229 97.226525-67.035131 38.788266-138.624556 69.696067-207.501874 105.311679l-42.165609-85.252312m59.973415 3.479687c4.912498 11.564839 10.132027 23.027335 15.351557 34.48983 47.078107-25.074209 97.482385-44.212483 141.950727-73.994503-5.117186-10.183199-9.92734-20.468742-14.583979-30.805457-47.640997 23.43671-94.770276 47.692169-142.769477 70.31013z"
                          fill="#ffffff"
                          p-id="4360"
                        ></path>
                      </svg>
                    </div>
                  </template>
                </div>
                <div class="typeEnum">
                  <span>{{ item | returntypeName }}</span>
                </div>
                <div class="info">
                  <div class="name">{{ item.name }}</div>
                  <div>
                    <template v-if="layout.sel === 'text'">
                      <div class="text-sell-out flex">
                        <svg
                          v-if="isSellOut(item)"
                          t="1724236049267"
                          class="icon"
                          viewBox="0 0 1024 1024"
                          version="1.1"
                          xmlns="http://www.w3.org/2000/svg"
                          p-id="4911"
                          width="64"
                          height="64"
                        >
                          <path
                            d="M498.61856 0h25.483584c136.270651 3.58203 270.187397 63.197242 362.296737 163.954625 84.894108 90.267153 133.046824 212.209685 137.038229 335.687372v22.873819c-3.684374 123.83589-51.785918 246.341312-136.884714 336.915497-91.955824 100.450352-225.258508 159.96322-361.119784 164.005797h-25.739443c-140.722603-3.684374-278.681925-67.342162-371.047124-173.72845C46.87342 758.366898 2.76328 636.936085 0 514.942382v-10.74609C3.837889 381.435011 49.534356 259.697167 132.944481 168.867123 225.05382 65.499975 360.556894 4.042577 498.61856 0M435.574834 52.195293c-183.860477 28.042177-340.702214 177.463995-378.160012 359.584628-31.828894 141.49018 7.317575 296.643246 103.264804 405.536955a465.152166 465.152166 0 0 0 689.489581 14.328119c89.857778-93.951527 136.52651-226.896007 125.678077-356.463145-9.415621-133.149168-80.339813-259.953026-188.056569-338.757683-99.580431-74.19919-229.761631-105.004647-352.215881-84.280046z"
                            fill="#c8c8c8"
                            p-id="4912"
                          ></path>
                          <path
                            d="M423.088901 64.732397c118.974564-23.794913 247.006546 1.995702 346.535805 71.43591 104.390585 71.231223 176.798761 187.647194 193.224927 313.069412a455.941232 455.941232 0 0 1-79.623407 326.169407c-71.384738 101.422618-185.958523 171.52806-309.078008 187.596022a454.661936 454.661936 0 0 1-325.964719-79.98161c-101.115586-71.43591-170.913997-185.805007-187.033132-308.61746a455.787717 455.787717 0 0 1 361.938534-509.671681m20.67343 12.12773c-162.112438 23.590225-304.063165 146.402679-351.448304 303.142072-41.449203 130.1812-17.705462 279.142472 63.197242 389.41782 75.376143 105.516366 199.365549 174.496027 329.035031 181.4554 126.394483 8.801559 255.194043-41.091 342.902603-132.535106a439.719754 439.719754 0 0 0 123.733547-324.736595c-4.247264-130.744091-71.384738-257.240917-176.440558-334.766279-93.337464-70.514817-215.535855-100.39918-330.979561-81.977312z"
                            fill="#c8c8c8"
                            p-id="4913"
                          ></path>
                          <path
                            d="M630.488431 283.594423c31.214832-15.351557 62.583179-30.498426 93.183949-47.078107 9.876168 14.788666 18.575384 37.048423 39.504673 21.850382l9.978511 19.649993c-17.961321 7.16406-35.462096 21.287492-55.777322 18.166009a306.110039 306.110039 0 0 1-18.933587-20.008196l-20.212882 10.49023c7.266403 28.809755-15.70976 47.845685-37.867174 60.587477a33.875768 33.875768 0 0 1 1.535156-34.541002c-3.889061-9.722653-7.675778-19.445305-11.411324-29.116786z m-66.421068 37.611314l56.442557-27.888661 10.439058 20.98046c-20.980461 11.155464-46.05467 18.063665-60.382789 38.430064 20.67343 1.023437 38.174204-10.592574 56.084353-19.189446l11.667183 18.575384c-44.519514 21.338664-87.657388 45.747639-133.149168 64.732397l-10.132027-18.268353c14.07226-12.792964 55.777322-12.639448 45.338264-39.095297-20.980461 10.234371-42.012093 20.622258-63.14607 30.754285l-9.722652-20.980461c19.957024-9.876168 39.914047-19.85468 59.922242-29.679676a969.757833 969.757833 0 0 0-5.935935-14.32812c11.667183-5.628904 23.283194-11.411324 34.950377-17.040227l7.624607 12.997651z m85.252311 30.191395c42.216781-20.826945 84.12653-42.012093 126.496827-62.58318 12.844136 25.688271 2.967968 53.474589-7.16406 78.088252 19.138274-1.791015 45.23592-19.85468 55.41912 5.628904-23.9996 9.978512-49.483184 14.942182-74.250363 22.413273-21.492179 15.249213-40.937484 33.261706-63.862475 46.668732-16.221478-23.897257 16.426166-33.875768 29.52616-48.050373-15.812103-5.577732-31.573035-11.30898-47.282794-17.244915 12.946479-6.549998 25.841787-13.099995 38.89061-19.547649 10.592574 3.121483 21.185148 6.294138 31.828894 9.159763 2.712108-12.792964 5.475389-25.483584 8.392184-38.225377-29.577332 14.225776-58.898806 29.065614-88.373794 43.444906-2.405077-4.96367-7.16406-14.839838-9.620309-19.752336z m-139.033931 76.757783c44.007796-22.003898 88.169107-43.751936 132.228074-65.755834 7.675778 22.669132 35.820299 49.841387 17.500775 72.664034-27.376943 18.217181-58.540603 29.679676-87.248014 45.594124a123.631203 123.631203 0 0 1-27.376942 50.557793 249.360452 249.360452 0 0 0-35.103893-103.060117m92.211683-20.315227c4.093748 9.057418 8.238669 18.063665 12.281246 27.121084l20.724601-12.12773-9.876168-24.869522-23.129679 9.876168m-51.837089 26.404678l10.746089 24.408975 24.460147-8.443356c-4.503123-8.852731-8.903903-17.858978-13.304682-26.814053l-21.901554 10.848434z"
                            fill="#c8c8c8"
                            p-id="4914"
                          ></path>
                          <path
                            d="M638.010694 474.107241c53.883964-26.76288 107.767928-53.525761 161.703063-80.186298l11.56484 23.43671c-30.856629 15.351557-61.662086 30.703113-92.518715 45.901155l9.057418 18.677727c40.476938-19.957024 80.80036-40.323422 121.379642-60.075758 2.76328 5.833592 8.494528 17.603118 11.411323 23.436709-40.221078 20.008195-80.442157 40.016391-120.765578 59.871071l10.336714 24.511319c18.319524-11.30898 57.824197-14.174604 49.6367-43.29139 13.407026-6.805857 26.916396-13.458198 40.476938-20.008195 5.577732 15.249213 16.784369 36.997252-2.149218 48.050372-69.082005 39.402329-142.411274 71.333567-213.130778 107.870271l-19.547649-39.402328c12.895308-6.652341 25.841787-13.202339 38.737095-19.803508 2.916796 3.633202 8.648044 11.001949 11.411323 14.686322 17.0914-8.443356 34.131628-16.886712 51.2742-25.227725l-10.694918-24.408975c-41.551547 18.063665-81.414422 39.760532-122.300735 59.410525a2827.0915 2827.0915 0 0 1-11.616011-23.334366c40.27225-20.366398 81.056219-39.862875 121.174954-60.689821l-9.313278-17.910149c-40.52811 14.839838-72.305832 43.700765-106.028084 69.286692-1.791015-4.503123-5.475389-13.458198-7.266404-18.063665 13.969917-15.146869 27.376943-31.16366 30.191395-52.502324 10.74609-5.935935 21.594523-11.769527 32.442956-17.705462l14.532807 7.471091z m-311.124881-22.720304l87.452701-43.496077 12.895307 25.995303c-29.372645 14.635151-58.796462 29.065614-88.169107 43.905452l9.722653 16.784368a12302.737494 12302.737494 0 0 1 77.115986-38.430063l12.997651 25.841787c-26.302334 12.946479-52.604667 25.944131-78.446454 39.760531 2.405077 4.093748 7.266403 12.12773 9.722653 16.119135 25.6371-12.946479 51.478887-25.688271 77.269501-38.430064 4.196092 8.699215 8.443356 17.398431 12.741792 25.995303a20601.789016 20601.789016 0 0 0-77.78122 38.634751l8.852731 17.296087c30.34491-15.351557 60.740992-30.34491 91.188246-45.389436l13.458198 27.172256c-83.103093 41.398031-166.30853 82.386687-249.360451 123.887062-15.198041-29.884364-29.986707-59.973415-44.826546-90.113638l-25.125381 24.25546-12.792964-26.507021c18.370696-29.423817 24.255459-64.169507 19.803508-98.403479 14.532807-7.266403 29.167958-14.430463 43.803109-21.696866l4.503123 23.948428 46.412873-23.027335-8.903903-18.728899c15.965619-7.982809 31.931238-15.863275 47.948029-23.794913 2.302733 4.605467 7.061716 13.765229 9.517965 18.421868m-99.478087 84.228874l8.801559 14.839838c21.696867-11.001949 43.496077-21.696867 65.141772-32.749987l-8.852731-12.281245c-23.794913 1.023437-44.365999 19.138274-65.0906 30.191394m19.189446 42.370297l13.407026 13.355854c21.338664-8.085153 41.295687-19.547649 61.662086-29.884364-2.353905-4.093748-6.9082-12.485933-9.210934-16.682025-22.003898 10.950777-44.110139 21.79921-65.858178 33.210535m23.334366 41.909749l8.648043 17.142572c21.185148-10.49023 42.370296-20.929289 63.657788-31.317176l-7.675778-17.910149c-21.492179 10.643746-43.137874 21.338664-64.630053 32.084753z m-16.221479 82.079656c78.548798-39.248813 157.302284-78.03708 235.902254-117.285892 11.87187 29.014442 48.306232 70.924192 13.765229 97.226525-67.035131 38.788266-138.624556 69.696067-207.501874 105.311679l-42.165609-85.252312m59.973415 3.479687c4.912498 11.564839 10.132027 23.027335 15.351557 34.48983 47.078107-25.074209 97.482385-44.212483 141.950727-73.994503-5.117186-10.183199-9.92734-20.468742-14.583979-30.805457-47.640997 23.43671-94.770276 47.692169-142.769477 70.31013z"
                            fill="#c8c8c8"
                            p-id="4915"
                          ></path>
                        </svg>
                      </div>
                    </template>
                    <div class="stockNumber"></div>
                    <div class="">￥{{ item.lowPrice }}</div>
                    <template v-if="layout.sel === 'default'">
                      <div class="flex" v-if="isSellOut(item)">
                        <div class="timeSale">售罄</div>
                      </div>
                    </template>
                  </div>
                </div>
              </div>
            </div>
          </template>

          <template v-else>
            <div class="cashier_box goods_classify_list">
              <div class="cashier_left">
                <!-- <div class="title">选择优惠</div> -->
                <div class="detail_box">
                  <div class="usercard">
                    <span
                      class="el-avatar el-avatar--square"
                      style="height: 50px; width: 50px; line-height: 50px"
                      ><img v-if="vipUser.id" :src="vipUser.headImg"
                    /></span>
                    <div class="info">
                      <div class="nickname">
                        <span class="txt">{{
                          vipUser.id ? vipUser.nickName : "服务员下单"
                        }}</span>
                      </div>
                      <div class="other_info">
                        <div class="item">余额：{{ vipUser.amount | to2 }}</div>
                        <div class="item">积分：{{ vipUser.totalScore }}</div>
                      </div>
                    </div>
                  </div>

                  <!-- <div class="forms">
                    <el-form
                      ref="form"
                      :model="createOrder.form"
                      label-width="60px"
                    >
                      <el-form-item label="优惠券">
                        <el-select
                          style="margin-right: 10px"
                          v-model="createOrder.quan.sel"
                          placeholder="选择优惠券"
                        >
                        </el-select>
                        <el-button size="medium " type="text">
                          查看不可用券
                        </el-button>
                      </el-form-item>
                    </el-form>
                  </div> -->
                </div>
                <div class="btn_group">
                  <el-button size="medium" @click="disCountShow">
                    整单打折/减免
                  </el-button>
                  <!-- <el-button size="medium "> 免单 </el-button> -->
                </div>

                <pay-type ref="refPayType" v-model="order.payType"> </pay-type>
                <div style="margin-top: 20px">
                  <el-button type="success" size="medium" @click="payOrder">
                    <span>立即支付</span>
                  </el-button>
                </div>
                <!-- <div class="flex row-right">
                  <el-button size="medium" type="success" @click="payOrder"
                    >确认支付</el-button
                  >
                </div> -->
                <!-- <div class="title">选择支付方式</div>
                <div class="btn_group">
                  <div class="price_select">
                    <div class="pay_btns">
                      <el-button size="medium" type="success">
                        微信支付/支付宝
                      </el-button>
                      <el-button size="medium"> 余额支付 </el-button>
                      <el-button size="medium"> 现金支付 </el-button>
                      <el-button size="medium"> 挂账 </el-button>
                    </div>
                  </div>
                </div> -->
              </div>
              <div class="cashier_left cashier_right">
                <div class="title">账单明细</div>
                <div class="detail_form">
                  <!---->
                  <div class="detail_form_item">
                    <div class="left">会员优惠</div>
                    <div class="right">-￥0.00</div>
                  </div>
                  <div class="detail_form_item">
                    <div class="left">门店优惠</div>
                    <div class="right">-￥0.00</div>
                  </div>
                  <div class="detail_form_item">
                    <div class="left">满减优惠</div>
                    <div class="right">-￥0.00</div>
                  </div>
                  <div class="detail_form_item">
                    <div class="left">优惠券</div>
                    <div class="right">-￥0.00</div>
                  </div>
                  <div class="detail_form_item">
                    <div class="left">整单改价</div>
                    <div class="right">
                      -￥{{
                        ((1 - createOrder.discount) * createOrder.data.amount)
                          | to2
                      }}
                    </div>
                  </div>
                  <div class="detail_form_item" v-if="createOrder.data.packFee">
                    <div class="left">打包费</div>
                    <div class="right">
                      ￥{{ createOrder.data.packFee || "0.00" }}
                    </div>
                  </div>
                  <div class="detail_form_item">
                    <div class="left">桌位费/附加费</div>
                    <div class="right">￥0.00</div>
                  </div>
                  <div class="detail_form_item">
                    <div class="left">总价</div>
                    <div class="right">
                      ￥{{ createOrder.data.amount | to2 }}
                    </div>
                  </div>
                  <div class="detail_form_item">
                    <div class="left">抹零</div>
                    <div class="right">-￥0.00</div>
                  </div>
                  <div class="detail_form_item">
                    <div class="left">应付金额</div>
                    <div class="right redfont">
                      ￥{{
                        (createOrder.data.amount * createOrder.discount) | to2
                      }}
                    </div>
                  </div>
                  <div class="line"></div>
                </div>
              </div>
            </div>
          </template>
        </div>
      </div>

      <!-- <slot name="footer">
        <div style="display: flex; justify-content: flex-end">
          <el-button style="margin-right: 20px" @click="haocaiCancel">取消</el-button>
          <el-button type="primary" @click="haocaiConfirm">确定</el-button>
        </div>
      </slot> -->
    </el-dialog>

    <!-- 选择规格 -->
    <el-dialog
      width="410px"
      :title="selGoods.title"
      :visible.sync="selGoods.show"
      @close="onSelGoodsSkuClose"
    >
      <div class="tag-group">
        <div
          class="tag-item"
          v-for="(item, index) in selGoods.skuList"
          :key="index"
        >
          <div class="tag-name">
            {{ item.name }}
            <span v-if="item.values.length >= 2"
              >({{ item.values.length }}选1)</span
            >
          </div>
          <div>
            <span
              style="margin: 0 10px 10px 0"
              v-for="(val, valIndex) in item.values"
              :key="valIndex"
            >
              <el-button
                plain
                :disabled="val.disabled"
                @click="changeTagSel(index, val)"
                :type="val.name === item.sel ? 'success' : ''"
              >
                {{ val.name }}
              </el-button>
            </span>
          </div>
        </div>
      </div>

      <div slot="footer">
        <div class="flex row-between">
          <div>
            <div class="price">￥{{ skuGoods.data.salePrice | to2 }}</div>
            <div class="sku-group-text">
              <span> {{ skuText }}</span>
              <span>库存：{{ skuGoods.data.stockNumber || "" }}</span>
            </div>
          </div>
          <div class="flex">
            <i class="icon-remove" @click="skuNumberReduce"></i>
            <div style="width: 40px" class="number-box">
              <el-input
                :min="skuGoods.data.suit"
                type="number"
                v-model="skuGoods.number"
                placeholder="0"
              ></el-input>
            </div>
            <!-- <i class="el-icon-remove"></i> -->
            <i class="el-icon-circle-plus icon-add" @click="skuNumberAdd"></i>
          </div>
        </div>
        <div class="flex" style="margin-top: 14px">
          <button
            class="my-btn disabled flex-1"
            v-if="!skuGoods.data.isGrounding"
            disabled
          >
            已下架
          </button>
          <button
            class="my-btn success flex-1"
            v-else
            :disabled="CanConfirm"
            @click="chooseSkuConfirm"
          >
            确定
          </button>
        </div>
      </div>
    </el-dialog>

    <!-- 数字键盘 -->
    <el-dialog width="410px" title="数量" :visible.sync="keyborad.show">
      <div class="simple-Keyboard-number">
        <div class="carts">
          <div class="title font-bold">
            <span class="color-000">数量</span>
            <i class="el-icon-close" @click="changeKeyboradShow(false)"></i>
          </div>
          <div class="box_status">{{ keyborad.number }}</div>
          <div class="number_list_box">
            <div class="yd-keyboard">
              <div class="mini-number-box1">
                <div class="mini-number">
                  <div class="key-line">
                    <div class="key" @click="keyboradAdd('1')">1</div>
                    <div class="key" @click="keyboradAdd('2')">2</div>
                    <div class="key" @click="keyboradAdd('3')">3</div>
                  </div>
                  <div class="key-line">
                    <div class="key" @click="keyboradAdd('4')">4</div>
                    <div class="key" @click="keyboradAdd('5')">5</div>
                    <div class="key" @click="keyboradAdd('6')">6</div>
                  </div>
                  <div class="key-line">
                    <div class="key" @click="keyboradAdd('7')">7</div>
                    <div class="key" @click="keyboradAdd('8')">8</div>
                    <div class="key" @click="keyboradAdd('9')">9</div>
                  </div>
                  <div class="key-line">
                    <div class="key"></div>
                    <div class="key" @click="keyboradAdd('0')">0</div>
                    <div
                      class="key"
                      style="font-size: 31px"
                      @click="keyboradReduce"
                    >
                      <svg
                        t="1723453480343"
                        class="icon"
                        viewBox="0 0 1664 1024"
                        version="1.1"
                        xmlns="http://www.w3.org/2000/svg"
                        p-id="1467"
                        width="32"
                        height="32"
                      >
                        <path
                          d="M1526.08 1.6H459.84L41.28 416c-53.76 53.248-53.76 139.52 0 192.64l418.624 414.592v-0.064h1066.176a136.96 136.96 0 0 0 137.6-136.256V137.792a136.96 136.96 0 0 0-137.6-136.192z m-331.392 631.168c26.816 26.624 26.816 69.76 0 96.384-26.88 26.56-70.4 26.56-97.28 0l-121.28-120.128-123.328 122.112a69.76 69.76 0 0 1-97.92 0 68.096 68.096 0 0 1 0-96.96L878.208 512l-121.28-120.064a67.648 67.648 0 0 1 0-96.32c26.88-26.624 70.4-26.624 97.28 0l121.216 120.064 122.24-120.96a69.696 69.696 0 0 1 97.92 0 68.032 68.032 0 0 1 0 96.96l-122.24 120.96 121.344 120.064z"
                          fill="#333333"
                          p-id="1468"
                        ></path>
                      </svg>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div>
            <div class="submit" @click="keyboradConfirm">确认</div>
          </div>
        </div>
      </div>
    </el-dialog>

    <!-- 取单 -->
    <el-dialog width="550px" title="取单" :visible.sync="prveOrder.show">
      <div class="take_order_list">
        <div class="tol_left_list">
          <div
            class="tolll_item"
            :class="{ active: prveOrder.sel === index }"
            @click="changePrveOrder(index)"
            v-for="(item, index) in prveOrder.list"
            :key="index"
          >
            <div class="tollli_index">{{ index + 1 }}</div>
            <div class="tollli_price">￥{{ item.totalAmount }}</div>
            <div class="tollli_time_and_num">
              <div class="tollli_time">{{ item.created_at || "" }}</div>
              <div class="tollli_num">({{ item.totalNumber }}件)</div>
            </div>
          </div>
        </div>
        <div
          class="tol_right_list"
          v-if="prveOrder.list.length && prveOrder.sel >= 0"
        >
          <div
            class="tolrl_item"
            v-for="(item, index) in prveOrder.selCart"
            :key="index"
          >
            <div class="tolrli_img">
              <img :src="item.coverImg" alt="" />
            </div>
            <div class="tolrli_right">
              <div class="tr_top">
                <div class="trt_name">{{ item.name }}</div>
                <div class="trt_num">x{{ item.number }}</div>
                <div class="trt_price">￥{{ item.totalAmount || 0 }}</div>
              </div>
              <div class="tr_bottom">
                <span class="trb_item">
                  {{ item.specSnap | formatSpecSnap }}
                </span>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div slot="footer" class="flex row-center">
        <div style="margin-right: 20px">
          <el-button
            size="medium"
            type="success"
            @click="confirmChoosePrveOrder"
            >确认此单</el-button
          >
        </div>
        <el-button size="medium" @click="delPrveOrder">删除此单</el-button>
      </div>
    </el-dialog>

    <choose-user
      ref="refChooseUser"
      @chooseUser="chooseUserConfirm"
    ></choose-user>
    <choose-table
      ref="refChooseTable"
      @confirm="chooseTableConfirm"
    ></choose-table>
    <order-note ref="refOrderNote" @confirm="refOrderNoteConfirm"></order-note>

    <!-- 支付时的键盘弹窗 -->
    <money-keyboard ref="refMoneyKeyboard" :title="moneyKeyboard.title">
    </money-keyboard>

    <!-- 扫码支付 -->
    <scan-pay ref="refScanCode"></scan-pay>
    <!-- 打折 -->
    <money-discount ref="refDiscount" @confirm="ChangeDiscount">
    </money-discount>
  </div>
</template>

<script>
import chooseUser from "./choose-user.vue";
import payType from "./pay-type.vue";
import chooseTable from "./table-diancan-components/choose-table-master.vue";
import cartItem from "./table-diancan-components/cart-item.vue";
import scanPay from "./table-diancan-components/scan-pay.vue";
import moneyDiscount from "./table-diancan-components/discount.vue";
import orderNote from "./table-diancan-components/note.vue";
import moneyKeyboard from "./money-keyboard.vue";
import dayjs from "dayjs";
import {
  getGoodsLists,
  addCart,
  getCart,
  $clearCart,
  $removeCart,
  $updateCart,
  $allPack,
  $createOrder,
  $getMasterId,
  $cacheOrder,
  $getCacheOrder,
  $delOrder,
  $setUser,
  $payOrder,
} from "@/api/table";
import { tbShopCategoryGet } from "@/api/shop";
import {
  isCanBuy,
  arrayContainsAll,
  generateCombinations,
  returnReverseVal,
} from "./util.js";

export default {
  components: {
    chooseUser,
    chooseTable,
    payType,
    orderNote,
    moneyKeyboard,
    scanPay,
    moneyDiscount,
    cartItem,
  },
  data() {
    return {
      //台桌点餐页面打开时带来的参数 isAddGoods 加菜    isPayOrder结账
      key: "",
      //是否是从挂单里取出来的订单
      isPrverOrder: false,
      //是否全屏
      isFullScreen: false,
      moneyKeyboard: {
        show: true,
        title: "支付",
      },
      //true后付款false先付款
      postPay: true,
      //是否打印
      isPrint: false,
      // 备注
      note: {
        content: "",
        isShow: false,
      },
      isCreateOrder: false,
      $goodsData: "",
      search: {
        list: [],
      },
      skuGoods: {
        number: 1,
        data: {
          stockNumber: 0,
          salePrice: 0,
        },
      },
      selGoods: {
        isEdit: false,
        data: {},
        skuList: [],
        skuMap: [],
        title: "",
        show: false,
      },
      dayjs,
      dialogshow: false, //弹框显示
      dialogtitle: "", //文字显示
      informationdialogshow: false,
      informationdialogshowedit: false,
      goods: {
        list: [],
        query: {
          productId: "",
          categoryId: "",
          page: 1,
          size: 300,
        },
        loading: false,
        total: 0,
      },
      order: {
        payType: "",
        masterId: "",
        allPack: false,
        btns: [
          {
            text: "规格",
            disabled: false,
          },
          {
            text: "赠送",
            disabled: false,
          },
          {
            text: "打包",
            disabled: false,
          },
          {
            text: "删除",
            disabled: false,
          },
        ],
        list: [],
        gift: {
          list: [],
          selIndex: -1,
        },
        //已下单菜品
        old: {
          list: [],
          selIndex: -1,
        },
        query: {
          page: 1,
          size: 20,
        },
        number: 1,
        cacheNumber: 1,
        selIndex: -1,
        total: 0,
      },
      table: "",
      category: {
        list: [],
        showAll: false,
      },
      keyborad: {
        show: false,
        number: "0",
      },
      prveOrder: {
        list: [],
        show: false,
        sel: 0,
        selCart: [],
      },
      layout: {
        list: [
          { label: "经典布局", value: "default" },
          { label: "图文显示", value: "img-and-text" },
          { label: "文字显示", value: "text" },
        ],
        sel: "img-and-text",
      },
      // 选择用户
      vipUser: {
        id: "",
      },
      //餐桌号
      masterId: "",
      canUpdate: true,
      //下单
      createOrder: {
        discount: 1,
        form: {},
        data: {},
        quan: {
          list: [],
          sel: "",
        },
      },
      timer: null,
    };
  },
  computed: {
    title() {
      return this.table ? "代客下单" + `(${this.table.name})` : "代客下单";
    },
    allGiftMoney() {
      const price = this.order.list
        .filter((v) => v.isGift === "true")
        .reduce((a, b) => {
          return a + b.number * b.salePrice;
        }, 0);
      return price;
    },
    giftLen() {
      return this.order.list.filter((v) => v.isGift === "true").length;
    },
    isSku() {
      if (this.order.selIndex < 0 || this.order.list.length <= 0) {
        return false;
      }
      return this.order.list[this.order.selIndex].specSnap;
    },
    returnGiftText() {
      if (this.order.selIndex < 0) {
        return "赠送";
      }
      return this.order.list[this.order.selIndex].isGift === "true"
        ? "取消赠送"
        : "赠送";
    },
    returnPackText() {
      if (this.order.selIndex < 0) {
        return "打包";
      }
      return this.order.list[this.order.selIndex].isPack === "true"
        ? "取消打包"
        : "打包";
    },
    skuText() {
      const result = this.selGoods.skuList.reduce((a, b) => {
        return a + (b.sel ? b.sel + "+" : "");
      }, "");
      return result.substring(0, result.length - 1);
    },
    allPrice() {
      const oldPrice = this.order.old.list
        .filter((v) => v.isGift !== "true")
        .reduce((a, b) => {
          return a + b.number * b.salePrice;
        }, 0);
      const price = this.order.list
        .filter((v) => v.isGift !== "true")
        .reduce((a, b) => {
          return a + b.number * b.salePrice;
        }, 0);
      return (oldPrice + price).toFixed(2);
    },
    allNumber() {
      const oldNumber = this.order.old.list.reduce((a, b) => {
        return a + b.number * 1;
      }, 0);
      const cartNumber = this.order.list.reduce((a, b) => {
        return a + b.number * 1;
      }, 0);
      return oldNumber + cartNumber;
    },
    selGoodsHide() {
      this.selGoods.show = false;
    },
    CanConfirm() {
      if (!this.selGoods.skuList.length) {
        return true;
      }
      return (
        this.selGoods.skuList.filter((v) => v.sel !== "").length !==
        this.selGoods.skuList.length
      );
    },
  },
  filters: {
    formatSpecSnap(str) {
      if (str === "" || str === null || str === undefined) {
        return "";
      }
      return str.replaceAll(",", " / ");
    },
    to2(n) {
      if (n === undefined) {
        return "";
      }
      return Number(n).toFixed(2);
    },
    returntypeName(item) {
      return item.typeEnum === "sku" ? "多规格" : "单规格";
    },
  },
  watch: {
    masterId: function (val) {
      console.log(val);
    },
    isCreateOrder: function (val) {
      if (!val) {
        this.createOrder.discount = 1;
      }
    },
    "vipUser.id": async function (val) {
      let masterId = this.order.masterId;
      if (!masterId) {
        const res = await this.getMasterId();
        masterId = res.masterId;
      }
      this.masterId = masterId;
      $setUser({
        tableId: this.table.tableId,
        masterId: this.masterId,
        vipUserId: val,
        type: val === "" ? 1 : 0,
      });
    },
    "prveOrder.list.length": function (val) {
      if (val !== 0) {
        this.prveOrder.selCart =
          this.prveOrder.list[this.prveOrder.sel].carList;
      } else {
        this.prveOrder.selCart = [];
      }
      console.log(this.prveOrder.selCart);
    },
    "prveOrder.sel": function (val) {
      this.prveOrder.selCart =
        this.prveOrder.list.length !== 0
          ? this.prveOrder.list[val].carList
          : [];
      console.log(this.prveOrder.selCart);
      if (val < 0) {
        this.prveOrde.show = false;
      }
    },
    // 本地缓存版本
    // "prveOrder.list.length": function (val) {
    //   console.log(val);
    //   if (val !== 0) {
    //     this.prveOrder.selCart = this.prveOrder.list[this.prveOrder.sel].cart;
    //     localStorage.setItem(
    //       "orderList",
    //       JSON.stringify(
    //         this.prveOrder.list.map((v) => {
    //           return { ...v, cart: JSON.stringify(v.cart) };
    //         })
    //       )
    //     );
    //   } else {
    //     this.prveOrder.selCart = [];
    //     localStorage.removeItem("orderList");
    //   }
    //   console.log(this.prveOrder.selCart);
    // },
    // "prveOrder.sel": function (val) {
    //   this.prveOrder.selCart =
    //     this.prveOrder.list.length !== 0 ? this.prveOrder.list[val].cart : [];
    //   console.log(this.prveOrder.selCart);
    // },
    "order.allPack": function (val) {
      console.log(val);
      if (this.order.list.length <= 0) {
        return;
      }
      $allPack({
        masterId: this.masterId,
        tableId: this.table.tableId,
        state: val ? 1 : 0,
      }).then((res) => {
        this.order.list.map((v) => {
          v.isPack = `${val}`;
        });
      });
    },
    "order.selIndex": function (val, oldval) {
      console.log(val);
      if (val === -1) {
        // return (this.order.number = 1);
        this.order.cacheNumber = 1;
      } else {
        this.order.cacheNumber = this.order.list[val].number;
        // this.order.number = this.order.list[val].number;
      }
    },
    "order.list.length": function (val) {
      if (val <= 0) {
        this.order.selIndex = -1;
      }
      if (this.order.selIndex >= 0) {
        this.order.cacheNumber = this.order.list[this.order.selIndex].number;
        // this.order.number = this.order.list[this.order.selIndex].number;
      }
    },
    "order.number": function (newval) {
      if (this.order.list.length <= 0 || this.order.selIndex < 0) {
        return;
      }
      this.createOrderClose();

      let item = this.order.list[this.order.selIndex];
      console.log(item.specSnap);
      const { productId, skuId, isPack, isGift, number } = item;
      const oldGoods=this.order.old.list.find(v=>{
        return v.productId===productId && v.skuId===skuId 
      })
      $updateCart({
        cartId: item.id,
        productId,
        skuId,
        tableId: this.table.tableId,
        num: this.order.number+(oldGoods?oldGoods.number:0), // 0会删除此商品
      }).then((res) => {
        this.$set(this.order.list, this.order.selIndex, {
          ...res,
          specSnap: item.specSnap,
          number: this.order.number
        });
      });
      return;
      this.updateOrder({
        num: newval, // 0会删除此商品
      });
    },
    "goods.query.productId": function (newval) {
      if (!this.$goodsData) {
        return;
      }
      if (newval == "") {
        this.goods.list = this.$goodsData || [];
      } else {
        const newarr = this.$goodsData.filter((v) =>
          v.name.includes(newval.trim())
        );
        this.search.list = newarr;
        this.goods.list = newarr.length ? newarr : this.$goodsData;
      }
    },
  },
  mounted() {
    // this.getGoods();
    // this.getCategory();
    // this.refToggle('refScanCode',true)
    // this.refToggle("refDiscount", true);
  },
  methods: {
    ChangeDiscount(discount) {
      this.createOrder.discount = discount;
    },
    disCountShow() {
      const { amount } = this.createOrder.data;
      this.refToggle("refDiscount", true, {
        amount,
        discount: this.createOrder.discount * 100,
      });
    },
    refToggle(key, isShow, data) {
      if (!this.$refs[key]) {
        return;
      }
      isShow ? this.$refs[key].open(data) : this.$refs[key].close(data);
    },
    //购物车商品输入框数量输入
    cartGoodsNumberInput(newval, index) {
      const item = this.order.list[index];
      console.log(item);
      this.order.cacheNumber = newval;
      item.number = newval;
    },
    //购物车商品输入框数量改变
    cartGoodsNumberChange(newval, index) {
      const item = this.order.list[index];
      newval = `${newval}`.split(".")[0] * 1;
      console.log(newval);
      this.order.cacheNumber = newval;
      this.order.number = newval;
    },
    //判读单规格商品是否售尽
    isSellOut(item) {
      return (
        item.isPauseSale ||
        (item.typeEnum !== "sku" && item.specList[0].stockNumber <= 0)
      );
    },
    toggleFullScreen() {
      if (!document.fullscreenElement) {
        this.enterFullScreen();
      } else {
        this.exitFullScreen();
      }
    },
    enterFullScreen() {
      let element = document.documentElement;
      if (element.requestFullscreen) {
        element.requestFullscreen();
      } else if (element.mozRequestFullScreen) {
        /* Firefox */
        element.mozRequestFullScreen();
      } else if (element.webkitRequestFullscreen) {
        /* Chrome, Safari & Opera */
        element.webkitRequestFullscreen();
      } else if (element.msRequestFullscreen) {
        /* IE/Edge */
        element.msRequestFullscreen();
      }
      this.isFullScreen = true;
    },
    exitFullScreen() {
      if (document.exitFullscreen) {
        document.exitFullscreen();
      } else if (document.mozCancelFullScreen) {
        /* Firefox */
        document.mozCancelFullScreen();
      } else if (document.webkitExitFullscreen) {
        /* Chrome, Safari and Opera */
        document.webkitExitFullscreen();
      } else if (document.msExitFullscreen) {
        /* IE/Edge */
        document.msExitFullscreen();
      }
      this.isFullScreen = false;
    },
    //打开输入钱的键盘
    openMoneyKeyboard() {
      this.$refs.refMoneyKeyboard.open();
    },
    changePostPay(val) {
      this.postPay = val;
    },
    //改变是否打印
    changeIsPrint(e) {
      console.log(e);
      this.isPrint = e;
    },
    refOrderNoteConfirm(note) {
      this.note.content = note;
    },
    refNoteShow() {
      this.$refs.refOrderNote.open(this.note.content);
    },
    // 支付订单
    async payOrder() {
      console.log({
        orderId: this.createOrder.data.id,
        payType: this.order.payType,
      });
      const res = await $payOrder({
        tableId: this.table.tableId,
        masterId: this.masterId,
        orderId: this.createOrder.data.id,
        payType: this.order.payType,
        vipUserId: this.vipUser.id,
        discount: this.createOrder.discount,
      });
      this.payOrderSuccess();
    },
    payOrderSuccess() {
      this.$notify({
        title: "支付成功",
        type: "success",
      });
      this.reset();
      this.close();
    },
    chooseTableConfirm(item) {
      console.log(item);
      this.table = item;
    },
    chooseTableOpen() {
      this.$refs.refChooseTable.open();
    },
    chooseUserConfirm(user) {
      console.log(user);
      if (user) {
        this.vipUser = user;
      } else {
        this.vipUser = { id: "" };
      }
    },
    refChooseUserOpen() {
      this.$refs.refChooseUser.open();
    },
    createOrderClose() {
      this.isCreateOrder = false;
    },
    //生成订单
    async toCreateOrder(isNowPay = false) {
      const res = await $createOrder({
        masterId: this.order.masterId || this.masterId,
        vipUserId: this.vipUser.id,
        tableId: this.table.tableId,
        note: this.note.content,
        postPay: this.postPay,
      });
      //后付款
      console.log(this.postPay);
      console.log(isNowPay);
      console.log(this.postPay && isNowPay);
      if (this.postPay && !isNowPay) {
        this.$notify({
          title: "下单成功",
          type: "success",
        });
        return this.close();
      }
      this.createOrder.data = res;
      if (!this.isPrverOrder) {
        const { masterId } = await this.getMasterId();
        this.masterId = masterId;
      }

      this.isCreateOrder = true;
    },

    // 获取取餐号
    getMasterId() {
      return $getMasterId({
        tableId: this.table.tableId,
        vipUserId: this.vipUser.id,
      });
    },
    onSelGoodsSkuClose() {
      this.selGoods.isEdit = false;
    },
    changePrveOrder(index) {
      this.prveOrder.sel = index;
    },
    //更新购物车商品数据
    updateOrder(par = {}) {
      let item = this.order.list[this.order.selIndex];
      console.log(item.specSnap);
      const { productId, skuId, isPack, isGift, number } = item;
      addCart({
        masterId: this.masterId,
        vipUserId: this.vipUser.id,
        productId,
        skuId,
        tableId: this.table.tableId,
        num: number,
        isPack: isPack === "true" ? true : false,
        isGift: isGift === "true" ? true : false,
        ...par,
      }).then((res) => {
        this.$set(this.order.list, this.order.selIndex, {
          ...res,
          specSnap: item.specSnap,
        });
      });
    },
    keyboradAdd(n) {
      if (Number(this.keyborad.number) === 0) {
        return (this.keyborad.number = n);
      }
      this.keyborad.number += n;
    },
    keyboradReduce() {
      if (this.keyborad.number.length <= 1) {
        return (this.keyborad.number = "0");
      }
      this.keyborad.number = this.keyborad.number.substring(
        0,
        this.keyborad.number.length - 1
      );
    },
    keyboradConfirm() {
      const orderGoods = this.order.list[this.order.selIndex];
      // 如果设置为0,商品数量减1
      if (this.keyborad.number == 0) {
        this.changeOrderNumber(this.order.selIndex, true);
      } else {
        orderGoods.number = Number(this.keyborad.number);
      }
      this.order.cacheNumber = orderGoods.number;
      this.order.number = orderGoods.number;
      this.changeKeyboradShow(false);
    },
    changeKeyboradShow(show) {
      if (show) {
        this.keyborad.number = `${this.order.list[this.order.selIndex].number}`;
      }
      this.keyborad.show = show;
    },
    // 获取本地缓存挂单
    // getPrveCart() {
    //   const arr = localStorage.getItem("orderList")
    //     ? JSON.parse(localStorage.getItem("orderList"))
    //     : [];
    //   this.prveOrder.list = arr.map((v) => {
    //     return { ...v, cart: JSON.parse(v.cart) };
    //   });
    // },

    //右侧控制按钮点击事件
    orderBtnsClick(key) {
      const orderGoods = this.order.list[this.order.selIndex];
      this.createOrderClose();
      if (key === "sku") {
        this.selGoods.title = orderGoods.name;
        this.selGoods.isEdit = true;
        const item = this.goods.list.find((v) => v.id == orderGoods.productId);
        console.log(item);
        return this.showSelGoods({ ...item, ...orderGoods });
      }
      if (key === "gift") {
        const isGift = orderGoods.isGift === "true" ? "flase" : "true";
        this.updateOrder({ isGift: isGift === "true" ? true : false });
        return;
      }
      if (key === "pack") {
        const isPack = orderGoods.isPack === "true" ? "flase" : "true";
        this.updateOrder({ isPack: isPack === "true" ? true : false });
        return;
      }
      if (key === "del") {
        return this.removeCart();
      }
      if (key === "save") {
        this.prveOrder.list.push({
          cart: this.order.list,
          id: Date.now(),
          created_at: `${new Date().getHours()}:${new Date().getMinutes()}`,
          goods_num: this.allNumber,
          order_total: this.allPrice,
        });
        localStorage.setItem(
          "orderList",
          JSON.stringify(
            this.prveOrder.list.map((v) => {
              return { ...v, cart: JSON.stringify(v.cart) };
            })
          )
        );
        this.order.list = [];
        this.order.selIndex = -1;
        return;
      }
      if (key === "getOrder") {
        this.prveOrder.show = true;
        this.getPrveCart();
        return;
      }
    },
    //选择挂单确认
    async confirmChoosePrveOrder() {
      if (this.prveOrder.list.length <= 0) {
        return;
      }
      // const { sel } = this.prveOrder;
      // const order=this.prveOrder.list[sel];
      // const res=await $cacheOrder({
      //   orderId:order.orderId,
      //   isPending:false,
      //   tableId:this.table.tableId,
      //   masterId:order.carList[0].masterId
      // })

      const { masterId, tableId, userId, remark } = await $cacheOrder({
        orderId: this.prveOrder.list[this.prveOrder.sel].orderId,
        isPending: false,
      });
      this.masterId = masterId;
      this.isPrverOrder = true;
      console.log(masterId);
      const { records } = await getCart({
        masterId,
        tableId,
        vipUserId: userId != "null" ? userId : "",
      });
      console.log(records);
      this.order.list = [];
      this.order.masterId = masterId;
      this.order.list = records;
      this.prveOrder.show = false;
      this.note.content = remark || "";
      // this.delPrveOrder(false);
    },
    //删除挂单
    async delPrveOrder(isRequest = true) {
      const { sel } = this.prveOrder;
      const order = this.prveOrder.list[sel];
      const orderMasterId = order.carList[0].masterId;
      //当前订单是否是当前挂单
      const nowOrderIsPrverOrder =
        this.isPrverOrder && orderMasterId === this.masterId;
      if (nowOrderIsPrverOrder) {
        const res = await this.$confirm(
          "您正在删除当前购物车订单,是否删除?",
          "提示",
          {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          }
        ).catch((err) => {
          console.log(err);
        });
        if (!res) {
          return;
        }
      }
      if (isRequest) {
        const res = await $delOrder({
          orderId: order.orderId,
        });
        if (nowOrderIsPrverOrder) {
          this.note.content = "";
          this.order.list = [];
        }
        this.$notify({
          message: "删除成功",
          type: "success",
        });
      }
      this.prveOrder.list.splice(sel, 1);
      this.prveOrder.sel = sel - 1 <= 0 ? 0 : sel - 1;
    },
    //打开挂起订单
    async cacheOrderShow() {
      this.prveOrder.show = true;
      const res = await this.getCacheOrder(true);
      this.prveOrder.list = res;
      if (this.prveOrder.list.length && this.prveOrder.sel !== -1) {
        const item = this.prveOrder.list[this.prveOrder.sel];
        console.log(item);
        if (item) {
          this.prveOrder.selCart = item.carList;
        }
      }
    },
    //获取挂起订单
    async getCacheOrder(isReturn = false) {
      this.createOrderClose();
      if (isReturn) {
        return $getCacheOrder({ tableId: this.table.tableId });
      }
      const res = await $getCacheOrder({ tableId: this.table.tableId });
      this.prveOrder.list = res;
    },
    //存单
    async saveOrder() {
      this.createOrderClose();
      const res = await $cacheOrder({
        masterId: this.masterId,
        tableId: this.table.tableId,
        vipUserId: this.vipUser.id,
        isPending: true,
        note: this.note.content,
      });
      this.isPrverOrder = false;
      this.order.masterId = "";
      this.order.list = [];
      this.order.selIndex = -1;
      this.note.content = "";
      this.$nextTick(() => {
        this.getCacheOrder();
      });
      const masterIdRes = await this.getMasterId();
      this.masterId = masterIdRes.masterId;
    },
    // 删除购物车商品
    removeCart() {
      const orderGoods = this.order.list[this.order.selIndex];
      $removeCart({
        cartId: orderGoods.id,
        tableId: this.table.tableId,
      });
      this.order.list.splice(this.order.selIndex, 1);
      const newval = this.order.selIndex - 1;
      this.order.selIndex = newval <= 0 ? 0 : newval;

      //  this.$message({
      //         type: "success",
      //         message: "清除成功!",
      //       });
    },
    // 点击订单里的加减改变购物车商品数量
    async changeOrderNumber(index, isReduce) {
      if (index < 0) {
        return;
      }
      this.order.selIndex = index;
      console.log(index);
      console.log(isReduce);
      const item = this.order.list[index];
      const mumber = item.number * 1;
      const newval = mumber + (isReduce ? -1 : 1);
      if (newval <= 0) {
        return this.removeCart();
      }
      if (newval >= 100000) {
        return;
      }
      // const res= await addCart({
      //    productId: item.productId,
      //     skuId: item.skuId,
      //     tableId: this.table.tableId,
      //     num: newval, // 0会删除此商品
      //     isPack: false, // 是否打包
      // })
      this.order.list[index].number = newval;
      this.order.number = newval;
      this.order.cacheNumber = newval;
    },
    // 点击右侧控制列表上的加减改变购物车商品数量
    changeOrderGoodsNumber(isReduce) {
      if (this.order.selIndex < 0) {
        return;
      }
      const item = this.order.list[this.order.selIndex];
      console.log(item);
      const mumber = item.number * 1;
      const newval = mumber + (isReduce ? -1 : 1);
      if (newval <= 0) {
        return;
      }
      if (newval >= 100000) {
        return;
      }
      console.log(newval);

      // this.order.list[this.order.selIndex].number = newval;
      this.order.number = newval;
      this.order.cacheNumber = newval;
    },
    //清空购物车
    clearCart() {
      if (this.order.list.length <= 0) {
        return;
      }
      this.$confirm("确定要清空点餐列表吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          $clearCart({
            masterId: this.masterId,
            tableId: this.table.tableId,
          }).then((res) => {
            this.order.list = [];
            this.order.selIndex = -1;
            this.$message({
              type: "success",
              message: "清除成功!",
            });
          });
        })
        .catch(() => {});
    },
    skuNumberAdd() {
      const number = Number(this.skuGoods.number);
      if (number > 10000) {
        return;
      }
      this.skuGoods.number = number + 1;
    },
    skuNumberReduce() {
      if (this.skuGoods.number - 1 <= 0) {
        return;
      }
      this.skuGoods.number -= 1;
    },
    toggleShowAll() {
      this.category.showAll = !this.category.showAll;
    },
    changeCategoryId(item) {
      this.goods.query.categoryId = item.id;
    },
    async getCategory() {
      const { content } = await tbShopCategoryGet({
        page: 0,
        size: 100,
        sort: "id",
        shopId: localStorage.getItem("shopId"),
      });
      this.category.list = content.reduce((prve, cur) => {
        prve.push(cur);
        return [...prve, ...cur.childrenList];
      }, []);
      this.category.list.unshift({
        id: "",
        name: "全部",
      });
    },
    //改变购物车菜品选中
    changeOrderSel(index) {
      this.order.selIndex = index;
      this.order.old.selIndex = -1;
    },
    //改变已下单菜品选中
    changeOrderOldSel(index) {
      this.order.old.selIndex = index;
      this.order.cacheNumber = this.order.old.list[index].number;
    },
    chooseSkuConfirm() {
      if (this.timer) {
        return;
      }
      this.skuGoodsAdd();
      this.timer = setTimeout(() => {
        clearTimeout(this.timer);
        this.timer = null;
      }, 500);
      console.log(this.timer);
    },
    async skuGoodsAdd() {
      let name = this.selGoods.skuList.reduce((prve, cur) => {
        return prve + cur.sel + ",";
      }, "");
      name = name.substring(0, name.length - 1);
      // const item = this.selGoods.data.specList.find((v) => v.specSnap === name);
      const item = this.selGoods.skuMap[name];
      if (!item.isGrounding) {
        //该商品已经下架
        return this.$notify({
          title: "该商品规格已经下架",
          type: "error",
        });
      }
      let res = "";

      console.log(orderGoods);
      //更改购物车订单商品规格数量
      if (this.selGoods.isEdit) {
        res = await $updateCart({
          cartId: this.order.list[this.order.selIndex].id,
          productId: this.selGoods.data.productId,
          skuId: item.id,
          tableId: this.table.tableId,
          num: this.skuGoods.number, // 0会删除此商品
        });
        this.$set(this.order.list, this.order.selIndex, {
          ...res,
          specSnap: name,
        });
        this.$notify({
          title: "更新成功",
          type: "success",
        });
        this.selGoods.show = false;
        this.order.cacheNumber = this.skuGoods.number;
        return;
      }

      const orderGoodsIndex = this.order.list.findIndex((V) => {
        return V.skuId == item.id && V.productId == this.selGoods.data.id;
      });
      const orderGoods =
        orderGoodsIndex != -1 ? this.order.list[orderGoodsIndex] : undefined;
      const oldOrderGoods = this.order.old.list.find((V) => {
        return V.skuId == item.id && V.productId == this.selGoods.data.id;
      });
      if (orderGoods || oldOrderGoods) {
        //更新
        const newNum=(oldOrderGoods?oldOrderGoods.number:0)+(orderGoods?orderGoods.number * 1:0)  + this.skuGoods.number
        res = await $updateCart({
          cartId: orderGoods?orderGoods.id:oldOrderGoods.id,
          productId: this.selGoods.data.id,
          skuId: item.id,
          tableId: this.table.tableId,
          num:newNum, // 0会删除此商品
          isPack: false, // 是否打包
        });
        if (this.key && orderGoodsIndex == -1) {
          this.orderListPush({
            ...res,
            specSnap: name,
            number: this.skuGoods.number,
          });
        } else {
          orderGoods.number += this.skuGoods.number;
          this.order.selIndex = orderGoodsIndex;
          this.order.cacheNumber = orderGoods.number;
        }
      } else {
        //添加
        res = await addCart({
          masterId: this.masterId,
          vipUserId: this.vipUser.id,
          productId: this.selGoods.data.id,
          skuId: item.id,
          tableId: this.table.tableId,
          num: this.skuGoods.number, // 0会删除此商品
          isPack: false, // 是否打包
        });
        this.orderListPush({ ...res, specSnap: name });
        // this.orderListPush({
        //   skuId: item.id,
        //   number: this.skuGoods.number,
        //   specSnap: name,
        // });
      }

      this.$notify({
        title: orderGoods ? "更新成功" : "添加成功",
        type: "success",
      });
      this.selGoods.show = false;
    },
    orderListPush(item) {
      const { isPack, isGift } = item;
      // const isPack=item.isPack==='false'?false:true
      // const isGift=item.isGift==='false'?false:true
      this.order.list.push({ ...item, isPack, isGift });
      this.order.selIndex = this.order.list.length - 1;
    },
    //设置规格按钮的禁止状态
    setTagDisabled() {
      const selArr = this.selGoods.skuList.reduce((prve, cur) => {
        if (cur.sel) {
          prve.push(cur.sel);
        } else {
        }
        return prve;
      }, []);
      console.log(selArr);
      let selArrAllGroup = generateCombinations(selArr, selArr.length - 1);
      console.log(selArrAllGroup);
      const matchArr = [];
      for (let key in this.selGoods.skuMap) {
        const goods = this.selGoods.skuMap[key];
        const keyArr = key.split(",");
        for (let spe of selArrAllGroup) {
          if (arrayContainsAll(keyArr, spe)) {
            matchArr.push(goods);
            break;
          }
        }
      }
      console.log(matchArr);
      const skuList = this.selGoods.skuList;
      console.log(skuList);
      //全部规格都已下架
      if (!matchArr.length) {
        for (let k in skuList) {
          for (let i in skuList[k].values) {
            this.$set(skuList[k].values[i], "disabled", true);
          }
        }
        return;
      }
      const includeSkuMap = matchArr.reduce((prve, cur) => {
        const speArr = cur.specSnap.split(",");
        for (let i of speArr) {
          if (!prve.hasOwnProperty("i")) {
            prve[i] = matchArr
              .filter((v) => v.specSnap.match(i))
              .every((v) => {
                return (
                  !v.isGrounding || v.isPauseSale == 1 || v.stockNumber <= 0
                );
              });
          }
        }
        return prve;
      }, {});
      for (let i in includeSkuMap) {
        for (let k in skuList) {
          const index = skuList[k].valueArr.findIndex((val) => val === i);
          if (index !== -1) {
            this.$set(skuList[k].values[index], "disabled", includeSkuMap[i]);
          }
        }
      }
    },
    changeTagSel(index, val) {
      this.$set(this.selGoods.skuList[index], "sel", val.name);
      let specSnap = this.selGoods.skuList.reduce((a, b) => {
        return a + b.sel + ",";
      }, "");
      specSnap = specSnap.substring(0, specSnap.length - 1);
      for (let sku of this.selGoods.skuList) {
        console.log(sku);
      }
      this.setTagDisabled();
      const canChooseGoods = this.selGoods.skuList.every((v) => v.sel);
      if (canChooseGoods) {
        const skuGoods = this.selGoods.skuMap[specSnap];
        this.skuGoods.data = skuGoods;
        this.skuGoods.number = skuGoods.suit || 1;
      }
    },
    onclose() {
      this.$emit("close");
      this.reset();
    },
    reset() {
      // this.goods.list = [];
      this.order.masterId = "";
      this.order.list = [];
      this.order.query.page = 1;
      this.goods.total = 0;
      this.order.list = [];
      this.order.selIndex = -1;
      this.order.old.list = [];
      this.order.old.selIndex = -1;
      this.isCreateOrder = false;
      this.note.content = "";
      this.vipUser = { id: "" };
      this.allPack = false;
      this.note.content = "";
      this.isPrverOrder = false;
      this.createOrder.discount = 1;
      this.key = "";
    },
    //获取购物车数据
    async getCart() {
      const res = await getCart({
        ...this.order.query,
        masterId: this.masterId,
        tableId: this.table.tableId,
      });
      if (this.key) {
        this.order.old.list = res.records;
      } else {
        this.order.list = res.records;
      }
      this.order.total = res.total;
    },
    showSelGoods(item) {
      console.log(item);
      this.selGoods.data = item;
      this.selGoods.skuMap = {};
      const specList = item.specList;
      this.setSelGoodsSkuMap(specList);
      this.setSelGoodsSkuList(
        JSON.parse(item.skuResult.tagSnap),
        item.specSnap
      );
      this.setTagDisabled();
      const skuGoods = this.selGoods.skuMap[item.specSnap];
      this.skuGoods.data = skuGoods;
      this.skuGoods.number = item.number ? item.number : skuGoods.suit || 1;
      this.selGoods.title = item.name;
      this.selGoods.show = true;
    },
    // 备份版本，会过滤下架和售尽以为库存小于等于0的商品
    async goodsClickback(item) {
      if (item.typeEnum === "sku") {
        this.selGoods.data = item;
        this.selGoods.skuMap = {};
        const specList = item.specList;
        for (let i in specList) {
          this.selGoods.skuMap[specList[i].specSnap] = specList[i];
        }
        console.log(this.selGoods.skuMap);

        let specSnap = "";
        let tagSnap = JSON.parse(item.skuResult.tagSnap).map((v) => {
          return { ...v, newval: {} };
        });
        const canUseSpecSnap = {};
        const canBudyGoods = specList.filter(
          (v) => v.isGrounding && v.isPauseSale != 1 && v.stockNumber > 0
        );
        canBudyGoods.map((v) => {
          v.specSnap.split(",").map((spe) => {
            canUseSpecSnap[spe] = spe;
          });
        });
        console.log(canUseSpecSnap);
        for (let i in canUseSpecSnap) {
          const item = tagSnap.find((v) => v.value.match(i));
          item.newval[i] = i;
        }
        tagSnap = tagSnap.map((v) => {
          const newvals = Object.keys(v.newval);
          specSnap += newvals[0] + ",";
          return {
            ...v,
            values: newvals,
            sel: newvals[0],
          };
        });
        console.log(tagSnap);
        console.log(canUseSpecSnap);
        console.log(canBudyGoods);
        this.selGoods.skuList = tagSnap;
        // this.selGoods.skuList = tagSnap.map((v) => {
        //   const values = v.value.split(",");
        //   specSnap += values[0] + ",";
        //   return {
        //     ...v,
        //     values: newval,
        //     sel: values[0],
        //   };
        // });
        specSnap = specSnap.substring(0, specSnap.length - 1);
        const skuGoods = this.selGoods.skuMap[specSnap];
        this.skuGoods.data = skuGoods;
        console.log(skuGoods);
        this.skuGoods.number = skuGoods.suit || 1;
        console.log(this.skuGoods.data);
        this.selGoods.title = item.name;
        this.selGoods.show = true;
        return;
      }
      //单规格
      const orderGoodsIndex = this.order.list.findIndex((V) => {
        return V.skuId == item.specList[0].id && V.productId == item.id;
      });
      const orderGoods =
        orderGoodsIndex != -1 ? this.order.list[orderGoodsIndex] : undefined;
      // const orderGoods =  this.order.list.find((V) => {
      //   return V.skuId == item.specList[0].id && V.productId == item.id;
      // });
      let res = "";
      if (orderGoods) {
        //更新
        // res = await $updateCart({
        //   cartId: orderGoods.id,
        //   productId: item.id,
        //   skuId: item.specList[0].id,
        //   tableId: this.table.tableId,
        //   num: orderGoods.number * 1 + item.specList[0].suit, // 0会删除此商品
        // });
        orderGoods.number += item.specList[0].suit;
        this.order.number = orderGoods.number;
        this.order.selIndex = orderGoodsIndex;
      } else {
        //增加
        console.log(item);
        res = await addCart({
          masterId: this.masterId,
          vipUserId: this.vipUser.id,
          productId: item.id,
          skuId: item.specList[0].id,
          tableId: this.table.tableId,
          num: item.specList[0].suit, // 0会删除此商品
          isPack: false, // 是否打包
        });
        this.orderListPush(res);
      }
    },
    //多规格商品弹窗时，找到默认可以下单的规格商品
    findGoods(skuList = [], goodsListMap = {}) {
      const skuMapNumber = skuList.reduce((prve, cur) => {
        for (let i in cur.valueArr) {
          prve[cur.valueArr[i]] = i;
        }
        return prve;
      }, {});
      const canBudyGoods = this.selGoods.data.specList
        .filter((v) => isCanBuy(v))
        .sort((a, b) => {
          const aNumber = a.specSnap.split(",").reduce((prve, cur) => {
            return prve + skuMapNumber[cur];
          }, 0);
          const bNumber = b.specSnap.split(",").reduce((prve, cur) => {
            return prve + skuMapNumber[cur];
          }, 0);
          return aNumber - bNumber;
        });
      return canBudyGoods[0];
    },
    //设置商品默认选中,规格禁止以及选中
    setSkugoodsDefaultInit() {
      const skuList = this.selGoods.skuList;
      const goodsListMap = this.selGoods.skuMap;
      const skuGoods = this.findGoods(skuList, goodsListMap);
      console.log(skuGoods);
      if (skuGoods) {
        this.skuGoods.data = skuGoods;
        this.skuGoods.number = skuGoods.suit || 1;
        skuGoods.specSnap.split(",").map((v, index) => {
          skuList[index].sel = v;
        });
      }
      this.setTagDisabled();
    },
    // 设置当前选中商品skuList
    setSelGoodsSkuList(skuList, specSnap) {
      const specSnapArr = specSnap ? specSnap.split(",") : [];
      this.selGoods.skuList = skuList.map((v, index) => {
        const values = v.value.split(",");
        return {
          ...v,
          valueArr: values,
          sel: specSnap ? specSnapArr[index] : "",
          values: values.map((name) => {
            return { name, disabled: false };
          }),
        };
      });
    },
    setSelGoodsSkuMap(specList) {
      for (let i in specList) {
        this.selGoods.skuMap[specList[i].specSnap] = specList[i];
      }
    },
    //根据右侧商品单规格多规格做不同处理
    async goodsClick(item) {
      if (item.typeEnum === "sku") {
        this.selGoods.data = item;
        this.selGoods.skuMap = {};
        const specList = item.specList;
        this.setSelGoodsSkuMap(specList);
        console.log(this.selGoods.skuMap);
        this.setSelGoodsSkuList(JSON.parse(item.skuResult.tagSnap));
        this.setSkugoodsDefaultInit();
        this.selGoods.title = item.name;
        this.selGoods.show = true;
        return;
      }
      //单规格
      const orderGoodsIndex = this.order.list.findIndex((V) => {
        return V.skuId == item.specList[0].id && V.productId == item.id;
      });
      const orderGoods =
        orderGoodsIndex != -1 ? this.order.list[orderGoodsIndex] : undefined;
      // const orderGoods =  this.order.list.find((V) => {
      //   return V.skuId == item.specList[0].id && V.productId == item.id;
      // });
      let res = "";
      if (orderGoods) {
        //更新
        // res = await $updateCart({
        //   cartId: orderGoods.id,
        //   productId: item.id,
        //   skuId: item.specList[0].id,
        //   tableId: this.table.tableId,
        //   num: orderGoods.number * 1 + item.specList[0].suit, // 0会删除此商品
        // });
        orderGoods.number += item.specList[0].suit;
        this.order.number = orderGoods.number;
        this.order.selIndex = orderGoodsIndex;
      } else {
        //增加
        console.log(item);
        res = await addCart({
          masterId: this.masterId,
          vipUserId: this.vipUser.id,
          productId: item.id,
          skuId: item.specList[0].id,
          tableId: this.table.tableId,
          num: item.specList[0].suit, // 0会删除此商品
          isPack: false, // 是否打包
        });
        this.orderListPush(res);
      }
    },
    async getGoods() {
      const res = await getGoodsLists(this.goods.query);
      const goods = res.records.filter((v) => {
        if (!v) {
          return false;
        }
        let isShow = true;
        if (v.typeEnum !== "sku") {
          isShow = v.specList.length >= 1;
        }
        return isShow;
      });
      this.goods.list = goods;
      this.goods.total = res.total;
      this.$goodsData = goods;
    },
    async open(item, key) {
      this.table = item;
      this.key = key;
      if (this.key == "isPayOrder") {
        this.isCreateOrder = true;
      }
      this.informationdialogshow;
      this.informationdialogshow = true;
      const res = await this.getMasterId();
      this.masterId = res.masterId;
      if (this.key == "isPayOrder") {
        this.toCreateOrder(true);
      }
      this.getCart();
      this.getGoods();
      this.getCategory();
      // this.getPrveCart();
      this.getCacheOrder();
    },
    close() {
      this.informationdialogshow = false;
      this.$emit("close");
    },
    resetCommodityArr() {
      this.commodityArr = [];
      this.$refs.addSelect.resetFields();
    },
    haocaiCancel() {
      this.informationdialogshow = false;
    },
    haocaiConfirm() {
      console.log(haocaiSelectedMap);

      this.$emit("confirm", haocaiSelectedMap);
      this.informationdialogshow = false;
      return;
    },
    // 分页回调
    paginationChange(e) {
      this.tableData.page = e - 1;
      this.getTableData();
    },
    paginationChangeinformation(e) {
      this.goods.query.page = e;
      this.getGoods();
    },
  },
};
</script>

<style scoped lang="scss">
/* 针对所有input type="number" */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.full-screen {
  margin-left: 10px;
  svg {
    width: 24px;
    height: 24px;
  }
  &:hover {
    path {
      fill: #1890ff;
    }
  }
}

.icon-add {
  color: rgb(34, 191, 100);
  font-size: 22px;
  cursor: pointer;
}
.prve-car-len {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 2px;
  right: 2px;
  height: 16px;
  width: 16px;
  font-size: 12px;
  color: rgb(255, 255, 255);
  border-radius: 50%;
  background-color: rgb(250, 85, 85);
}
::v-deep .number-box .el-input__inner {
  border: none;
}
::v-deep .el-button--text {
  color: #000;
}
::v-deep .number-box .el-input__inner {
  border: none;
  padding: 0 4px;
  text-align: center;
}
::v-deep .el-empty {
  padding: 0;
}
::v-deep .el-button--success:not(.is-disabled) {
  background: #22bf64;
  color: #fff;
}
::v-deep .el-tag--dark .el-tag--success {
  background: #22bf64;
  color: #fff;
}
::v-deep .flex-1 .el-button {
  width: 100%;
}
::v-deep .el-button--success.is-plain {
  background: rgba(34, 191, 100, 0.1);
  color: #22bf64;
  border: 1px solid #22bf64;
}
::v-deep .el-button--medium {
  padding-top: 12px;
  padding-bottom: 12px;
}
// ::v-deep .el-button.is-plain:hover, .el-button.is-plain:focus{
//   background: rgba(34, 191, 100, .1);
//     color: #22bf64;
//     border: 1px solid #22bf64;
// }

::v-deep .number-box .el-input__inner::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
::v-deep .number-box .el-input__inner::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.carts_list_title {
  padding: 16px 0 12px 0;
  display: flex;
  align-items: center;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.4);
  &::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #ebebeb;
    margin-left: 10px;
  }
}

.lh-16 {
  line-height: 16px;
}
.good_info_discount {
  height: 16px;
  padding: 0 3px;
  color: #ff3f3f;
  background-color: rgba(255, 63, 63, 0.1);
  border-radius: 2px;
  margin-left: 6px;
  font-size: 12px;
  white-space: nowrap;
}
.icon-remove {
  border: 1px solid #d8d8d8;
  width: 22px;
  height: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  box-sizing: border-box;
  cursor: pointer;

  &::after {
    content: "";
    display: block;
    width: 10px;
    height: 1px;
    background: #999;
  }
}
.row-center {
  justify-content: center;
}
.sku-group-text {
  text-align: left;
  color: #666;
  font-size: 11px;
  margin-top: 2px;
}

.price {
  font-size: 18px;
  text-align: left;
  color: rgb(255, 81, 82);
  font-weight: 600;
}
.youhui {
  color: #c12a2a;
  font-size: 13px;
  line-height: 16px;
}

::v-deep .el-dialog__footer {
  border-top: 1px solid #efefef;
}

.sku-bottom {
  padding: 14px 12px 5px;
}

.relative {
  position: relative;
}
.col-baseline {
  align-items: baseline;
}
.flex-x-y-center {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #efefef;
}
::v-deep .el-dialog__body {
  padding: 0 20px;
}
.absolute {
  position: absolute;
}

.order-number-box {
  position: relative;

  .absolute {
    width: 60px;
    height: 40px;
    right: -30px;
    top: -12px;
    position: absolute;

    .order-input-number {
      position: absolute;
      right: -6px;
      top: 0;
      justify-content: center;
      align-items: center;
      display: none;
      background-color: #fff;
      border: 1px solid #e4e7ed;
      border-radius: 4px;
      box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
      padding: 9px 6px;
      background-color: #fff;
      height: 40px;
    }

    &:hover .order-input-number {
      display: flex;
    }
  }
}

.ft-12 {
  font-size: 12px;
}

.ft-18 {
  font-size: 18px;
}

.transition {
  transition: all 0.2s ease-in-out;
}

::v-deep .el-dialog__header {
  border-bottom: 1px solid #efefef;
}

.tableId {
  padding: 9px 15px;
  border: 1px solid #dcdfe6;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;

  &:hover {
    border-color: #409eff;
    color: #409eff;
    background-color: rgba(24, 144, 255, 0.1);
  }
}

.cur-pointer {
  cursor: pointer;
}

.flex-1 {
  flex: 1;
}

.flex-wrap {
  flex-wrap: wrap;
}

.mt-14 {
  margin-top: 14px;
}

.my-btn {
  outline: none;
  height: 40px;
  font-size: 14px;
  line-height: 40px;
  color: #000;
  justify-content: center;
  align-items: center;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  padding: 0 5px;
  background-color: #fff;
  position: relative;

  &.disabled {
    color: #c0c4cc;
    cursor: not-allowed;
    background-color: #fff;
    border-color: #ebeef5;
  }
}
.flex-xy-cnter {
  justify-content: center;
  align-items: center;
}
.flex-wrap {
  flex: 1;
}
.headimg {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 2px;
  margin-right: 6px;
}
.take_order_list {
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  .tol_left_list {
    height: 360px;
    margin-right: 24px;
    overflow-y: scroll;
    &::-webkit-scrollbar {
      width: 0;
    }
    .tolll_item {
      border: 1px solid rgb(247, 247, 250);
      height: 86px;
      width: 130px;
      padding: 10px 14px;
      margin-bottom: 12px;
      border-radius: 4px;
      color: #303133;

      background-color: #f7f7fa;
      &.active {
        border: 1px solid rgb(0, 194, 95);
        background-color: rgba(0, 194, 95, 0.1);
        color: rgb(0, 194, 95) !important;
        .tollli_time,
        .tollli_num {
          color: rgb(0, 194, 95) !important;
        }
      }
      cursor: pointer;
      .tollli_index {
        font-weight: 600;
        font-size: 18px;
      }
      .tollli_price {
        margin-top: 8px;
        font-size: 14px;
      }
      .tollli_time_and_num {
        margin-top: 6px;
        display: flex;
        justify-content: space-between;
        .tollli_time,
        .tollli_num {
          font-size: 12px;
          color: #909399;
        }
      }
    }
  }
  .tol_right_list {
    flex: 1;
    height: 360px;
    overflow-y: scroll;
    &::-webkit-scrollbar {
      width: 0;
    }
    .tolrl_item {
      display: flex;
      padding: 2px 2px 13px 2px;
      margin-bottom: 12px;
      border-bottom: 1px solid #ebebeb;
      .tolrli_img {
        img {
          width: 40px;
          height: 40px;
          border-radius: 4px;
        }
      }
      .tolrli_right {
        display: flex;
        justify-content: space-between;
        flex: 1;
        flex-direction: column;
        padding: 1px 0 1px 8px;
        .tr_top {
          display: flex;
          justify-content: space-between;
          .trt_name {
            width: 150px;
            font-size: 14px;
            color: #212121;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }
          .trt_num {
            font-size: 14px;
            color: #212121;
          }
          .trt_price {
            width: 100px;
            text-align: right;
            font-size: 14px;
            color: #212121;
          }
        }
        .tr_bottom {
          font-size: 12px;
          color: #999;
        }
      }
    }
  }
}

.success {
  color: #fff;
  border-color: #22bf64;
  background-color: rgb(34, 191, 100);
}

.categoty {
  position: sticky;
  top: 0;
  background-color: #f7f7fa;
  z-index: 1;
  padding-top: 14px;
  margin-left: 7px;

  .show_more_btn {
    padding: 0 10px;
    color: #1890ff;
    font-size: 16px;
    display: flex;
    align-items: center;
    user-select: none;
    min-width: 80px;
    background: #f7f7fa;
    position: absolute;
    right: -20px;
    top: 14px;
    height: 38px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;

    .el-icon-arrow-down {
      transition: all 0.2s;
    }

    &.showAll .el-icon-arrow-down {
      transform: rotate(180deg);
    }
  }
}

.search-box {
  display: flex;
  justify-content: flex-end;
  margin-left: 12px;
  border-bottom: 1px solid #ebebeb;
}
::v-deep .el-dialog__title {
  font-size: 20px;
  font-weight: 600;
}

::v-deep .categorys .el-tag--plain.el-tag--success {
  border: 1px solid #dcdfe6;
  color: #000;
  font-weight: 600;
}

::v-deep .el-dialog {
  user-select: none;
}

::v-deep .categorys .el-tag {
  min-width: 80px;
  height: 38px;
  line-height: 38px;
  text-align: center;
  box-sizing: border-box;
  text-align: center;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 2px;
  user-select: none;
  margin: 0 10px 10px 0;
  cursor: pointer;
}

::v-deep .tag-group .el-tag {
  min-width: 80px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  box-sizing: border-box;
  text-align: center;
  padding: 0 15px;
  font-size: 14px;
  border-radius: 2px;
  user-select: none;
  margin: 0 10px 10px 0;
  cursor: pointer;
  border-radius: 4px;
}

::v-deep .tag-group .el-tag--light {
  color: #000;
  background-color: #fff;
  border: 1px solid #dcdfe6;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  background-color: #22bf64;
  border-color: #22bf64;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: #22bf64;
}

::v-deep .tag-group .el-tag--dark {
  background: rgba(34, 191, 100, 0.1);
  color: #22bf64;
  border-color: #22bf64;
}
.no-search-result {
  color: #888;
  margin: 0 0 10px 7px;
}

.numberbox {
  border: 1px solid #dcdfe6;
  background-color: #fff;
  color: #000;
  min-height: 38px;
  line-height: 38px;
  text-align: center;
  border-radius: 4px;
  position: relative;
  margin: 0 0 10px;

  .reduce,
  .add {
    font-size: 28px;
    color: #999;
    height: 38px;
    line-height: 38px;
    text-align: center;
  }

  .input {
    font-size: 30px;
    display: flex;
    overflow: hidden;
    padding: 0 10px;
    height: 50px;
    border-top: 1px solid #dcdfe6;
    border-bottom: 1px solid #dcdfe6;

    input {
      height: 100%;
      width: 100%;
      box-sizing: border-box;
      outline: none;
      justify-content: center;
      border: none;
      text-align: center;
    }
  }
}

.tag-group {
  margin-top: 10px;

  .tag-item {
    margin-bottom: 20px;

    .tag-name {
      margin-bottom: 10px;
      font-size: 12px;
      color: #999;
    }
  }
}

.flex {
  display: flex;
  align-items: center;
}

.row-between {
  justify-content: space-between;
}

.row-right {
  justify-content: flex-end;
}

.none {
  display: none !important;
}

.handle {
  font-size: 18px;
  color: #999;

  &:hover {
    cursor: grab;
  }
}

.shop_info {
  display: flex;

  .info {
    flex: 1;
    padding-left: 8px;
    display: flex;
    flex-direction: column;

    .tag_wrap {
      display: flex;
    }
  }
}

.font-bold {
  font-weight: bold;
}

.head-container .filter-item {
  margin: 0 5px 0 0;
}

.diancan {
  display: flex;
  height: calc(100vh - 75px);
  .choose-user {
    padding: 10px 0;
    border-bottom: 1px solid #ebebeb;
    margin-bottom: 10px;
  }
  .order {
    border-radius: 6px;
    display: flex;
    padding-left: 12px;
    .bottom {
      left: 0;
      right: 0;
      box-sizing: border-box;
      padding: 14px;
      bottom: 0;
      background-color: #fff;
      z-index: 10;
      border-top: 1px solid #ebebeb;
    }

    .list {
      width: 352px;
      padding: 12px 12px 0 0;
    }

    .controls {
      min-width: 106px;
      width: 106px;
      border-radius: 4px;
      background-color: #f7f7fa;
      padding: 14px 10px;
      position: relative;
      overflow-y: auto;

      .btn {
        border: 1px solid #dcdfe6;
        background-color: #fff;
        color: #000;
        min-height: 38px;
        line-height: 38px;
        text-align: center;
        border-radius: 4px;
        position: relative;
        cursor: pointer;
        margin: 0 0 10px;

        &.disabled {
          color: #999;
          pointer-events: none;
          cursor: no-drop;
          background-color: rgb(250, 250, 252);
        }
      }
    }

    .order-item {
      padding: 4px;
      border-radius: 2px;
      display: flex;
      cursor: pointer;
      align-items: center;
      justify-content: space-between;
      background-color: rgba(0, 0, 0, 0);
      transition: all 0.3s;
      .pack {
        right: 100%;
        width: 18px;
        height: 18px;
        background: #35ac6a;
        border-radius: 4px 0 4px 0;
        font-size: 12px;
        color: #fff;
        text-align: center;
        line-height: 17px;
      }
      &.active {
        background-color: rgba(0, 0, 0, 0.04);
      }

      .total-price {
        width: 94px;
        text-align: right;
      }

      .good-info {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 70px;

        .specSnap {
          color: #999;
          font-size: 12px;
          margin-top: 3px;
        }
      }

      .name {
        font-size: 13px;
        text-align: left;
        color: #212121;
        overflow: hidden;
      }

      .img {
        width: 40px;
        height: 40px;
        position: relative;
        margin-right: 10px;

        img {
          width: 40px;
          height: 40px;
        }
      }
    }
  }

  .goods {
    box-sizing: border-box;
    flex: 1;
    background-color: #f7f7fa;
    margin-left: 20px;
    padding: 0 15px 14px 15px;
    overflow-x: hidden;
    overflow-y: scroll;
    .goods-list {
      display: flex;
      flex-wrap: wrap;

      .goods-item {
        position: relative;
        cursor: pointer;
        min-width: 98px;
        max-width: 100px;
        height: 100px;
        // flex: 1;
        margin: 0 7px 14px;
        border-radius: 4px;
        .timeSale {
          text-align: center;
          border-radius: 10px;
          background-color: hsla(0, 0%, 99.2%, 0.5);
          color: #fff;
          font-size: 10px;
          line-height: 16px;
          padding: 2px 10px;
          margin-top: 2px;
        }
        .sell-out {
          width: 100%;
          height: 100%;
          padding: 10px;
          background: rgba(0, 0, 0, 0.4);
          z-index: 2;
          position: absolute;
          top: 0;
          font-size: 14px;
          font-weight: 400;
          text-align: left;
          color: #fff;
        }
        overflow: hidden;
        position: relative;

        .typeEnum {
          position: absolute;
          right: 0;
          top: 0;
          border-radius: 0 0 0 10px;
          background-color: #46a6ff;
          color: #fff;
          padding: 2px 10px;
          display: none;
        }

        .info {
          font-size: 14px;
          position: absolute;
          inset: 0;
          background: rgba(0, 0, 0, 0.4);
          color: #fff;
          box-sizing: border-box;
          padding: 10px;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
        }
        .img-box {
          width: 100%;
          height: 100%;
          position: relative;
        }
        .text-sell-out {
          width: 100%;
          justify-content: center;
          height: 60px;
          svg {
            width: 60px;
            height: 60px;
          }
          // z-index: 1;
          // position: absolute;
          // right: 0;
          // top: 0;
        }
        .sell-out-svg {
          position: absolute;
          left: 0;
          right: 0;
          top: 0;
          bottom: 0;
          background: rgba(0, 0, 0, 0.5);
          display: flex;
          justify-content: center;
          align-items: center;
        }
        img {
          width: 100%;
          height: 100%;
        }
        &.layout-img-and-text {
          min-width: 116px !important;
          max-width: 136px !important;
          height: 175px;
          background-color: #fff;
          display: flex;
          flex-direction: column;
          box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.07);
          .img-box {
            width: 136px;
          }
          img {
            width: 136px;
            height: 125px;
          }
          .info {
            position: inherit;
            background-color: #fff;
            padding: 4px 4px 8px;
            color: #000;
            .name {
              font-size: 15px;
              font-weight: 600;
              height: 20px;
              line-height: 20px;
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
              margin-bottom: 2px;
            }
            .price {
              font-size: 13px;
            }
          }
        }
        &.layout-text {
          margin: 0 5px 10px;
          box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.08);
          min-width: 128px !important;
          max-width: 148px !important;
          background-color: #fff;
          height: auto;
          .info {
            background-color: #fff;

            position: inherit;
            color: #000;
            .name {
              font-weight: 600;
              font-size: 15px;
              color: #000;
              line-height: 22px;
              overflow: hidden;
              text-overflow: ellipsis;

              height: 44px;
            }

            .price {
              font-weight: 600;
              font-size: 16px;
              margin: 6px 0 0;
            }
          }
          img {
            display: none;
          }
        }
        &.layout-text.sell-out {
          .info {
            color: #c8c8c8;

            .name {
              color: #c8c8c8;
            }
          }
        }
      }
    }
  }
}

.carts {
  flex-direction: column;
  background: #fff;
  height: 100%;
  position: relative;
  z-index: 10;
}

.carts .title,
.carts {
  display: flex;

  align-items: center;
  width: 100%;
}

.carts .title {
  justify-content: space-between;
  height: 64px;
  border-bottom: 1px solid #ebebeb;
  padding: 20px;
  padding-top: 30px;
}

.carts .title .left {
  font-family: PingFangSC-Medium;
  font-weight: 500;
  font-size: 18px;
  color: #000;
}

.carts .title .right {
  font-size: 14.4px;
  cursor: pointer;
}

.carts .box_status {
  width: 370px;
  height: 58px;
  background: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 4px;

  display: flex;

  justify-content: center;

  align-items: center;
  margin-top: 20px;
  font-family: MicrosoftYaHei;
  font-size: 20px;
  color: rgba(0, 0, 0, 0.8);
  letter-spacing: 1.25px;
  text-align: center;
}

.carts .box_status span {
  padding: 0 5px;
}

.number_list_box {
  width: 370px;
  background: #fff;
  border-radius: 3px;
  margin: 20px 0;
}

.submit {
  width: 366px;
  height: 44px;
  background: #22bf64;
  border-radius: 2px;

  display: flex;

  justify-content: center;

  align-items: center;
  font-size: 14px;
  color: #fff;
  font-family: PingFangSC-Regular;
  font-weight: 400;
  margin-bottom: 40px;
  cursor: pointer;
}

.yd-keyboard {
  justify-content: center;
  margin-top: -8px;
  margin-left: -8px;
}

.mini-number-box1 .mini-number,
.yd-keyboard {
  display: flex;

  flex-direction: column;
}

.mini-number-box1 .mini-number {
  margin-left: 8px;
  border: 1px solid #dcdfe6;
}

.mini-number-box1 .mini-number .key-line {
  margin-top: 0;
}

.mini-number-box1 .mini-number .key {
  width: 122px;
  height: 60px;
  -webkit-box-shadow: none;
  box-shadow: none;
  border-radius: 0;
  margin-left: 0;
}

.mini-number-box1 .mini-number .key:not(:last-child) {
  border-right: 1px solid #dcdfe6;
}

.mini-number-box1 .mini-number .key-line:not(:last-child) {
  border-bottom: 1px solid #dcdfe6;
}

.mini-number-box2 {
  display: flex;

  justify-content: center;
}

.mini-number-box2 .key {
  width: 80px;
  height: 70px;
}

.mini-number-box2 .function-button {
  display: flex;

  flex-direction: column;
}

.mini-number-box2 .function-button .key {
  margin-top: 8px;
}

.key-line {
  margin-top: 8px;
}

.key,
.key-line {
  display: flex;

  justify-content: center;
}

.key {
  width: 64px;
  height: 64px;
  background: #fff;
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.10196078431372549);
  border-radius: 4px;

  align-items: center;
  margin-left: 8px;
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 20px;
  color: rgba(0, 0, 0, 0.8);
  text-align: center;
  line-height: 34px;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.10196078431372549);
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.simple-Keyboard-number,
.simple-Keyboard-weight {
  min-width: 410px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 999;
  background: #fff;
  -webkit-box-shadow: 12px 18px 20px 0 rgba(0, 0, 0, 0.23921568627450981);
  box-shadow: 12px 18px 20px 0 rgba(0, 0, 0, 0.23921568627450981);
  border-radius: 4px;
  overflow: hidden;
}
.submit {
  width: 366px;
  height: 44px;
  background: #22bf64;
  border-radius: 2px;

  display: flex;

  justify-content: center;

  align-items: center;
  font-size: 14px;
  color: #fff;
  font-family: PingFangSC-Regular;
  font-weight: 400;
  margin-bottom: 40px;
  cursor: pointer;
}
.disabled-box {
  position: absolute;
  inset: 0;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

.cashier_box {
  display: flex;
  width: 100%;
  padding-top: 14px;
  flex: 1;
  background: #f7f7fa;
  position: relative;
  margin: 0 24px 0 0;
  border-radius: 4px;
  overflow-y: auto;
}

.cashier_left .el-form-item {
  margin-bottom: 0;
}

.cashier_left {
  padding: 0 20px 0;

  flex: 1;
  min-width: 310px;
}

.cashier_left .title {
  font-size: 18px;
  color: #000;
  font-weight: 600;
  padding: 20px 0;
}

.cashier_left .detail_box {
  background: #fff;
  border-radius: 4px;
  padding: 0 14px;
  margin-bottom: 20px;
}

.cashier_left .detail_box .forms {
  padding: 10px 0;
  border-top: 1px solid #ebebeb;
}

.cashier_left .detail_box .usercard {
  display: flex;

  align-items: center;
  width: 100%;
  height: 80px;
  cursor: pointer;
}

.cashier_left .detail_box .usercard .info {
  margin-left: 10px;

  display: flex;

  flex-direction: column;

  justify-content: space-around;
}

.cashier_left .detail_box .usercard .info .nickname {
  display: flex;
  align-items: center;
  font-size: 16px;
}

.cashier_left .detail_box .usercard .info .nickname .txt {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  height: 25px;
  line-height: 25px;
}
::v-deep .cashier_left .el-form-item__label {
  text-align: left;
}
.cashier_left .detail_box .usercard .info .nickname .vip_level {
  font-size: 12px;
  padding: 0 5px;
  background: #f7793d;
  height: 20px;
  line-height: 20px;
  color: #fff;
  border-radius: 4px;
}

.cashier_left .detail_box .usercard .info .other_info {
  display: flex;
  font-size: 14px;
  color: #666;
}

.cashier_left .detail_box .usercard .info .other_info .item {
  margin-right: 10px;
}

.cashier_right {
  min-width: 250px;
  border-left: 1px solid #ebebeb;

  display: flex;

  flex-direction: column;
  padding-bottom: 20px;
}

.cashier_right .detail_form {
  flex: 1;
  overflow-y: auto;
}

.cashier_right .detail_form .detail_form_item {
  display: flex;

  justify-content: space-between;
  position: relative;
  margin-bottom: 16px;

  align-items: center;
}

.cashier_right .detail_form .detail_form_item .left {
  font-size: 14px;
  color: #000;
  letter-spacing: 1px;
}

.cashier_right .detail_form .detail_form_item .right {
  font-size: 14px;
  color: #000;

  display: flex;
  margin-right: 40px;
}

.cashier_right .detail_form .detail_form_item .right .btn {
  font-size: 14px;
  color: #1890ff;
  margin-left: 10px;
  cursor: pointer;
  position: absolute;
  right: 0;
}

.cashier_right .detail_form .detail_form_item .right .dfi_button {
  display: flex;

  justify-content: center;

  align-items: center;
  margin-left: 10px;
  width: 98px;
  height: 36px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.8);
  background-color: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  cursor: pointer;
}

.cashier_right .detail_form .detail_form_item .redfont {
  color: #fa5555;
  font-size: 20px;
}

.cashier_right .detail_form .line {
  width: 100%;
  height: 1px;
  background: #ebebeb;
  margin-top: 4px;
  margin-bottom: 20px;
}

.cashier_right .pay_btn {
  width: 100%;
  line-height: 44px;
  height: 44px;
  background: #22bf64;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  color: #fff;
  letter-spacing: 1px;
  cursor: pointer;
}

.cashier_right .pay_btn:hover {
  opacity: 0.9;
}

.btn1 {
  background: #22bf64;
  color: #fff;
  border: none;
}
.pay_btns .el-button + .el-button {
  margin-left: 0;
}

.pay_btns .el-button {
  margin-right: 10px;
  margin-bottom: 10px;
}

.pay_btns .el-button:disabled {
  border: 1px solid #dcdfe6;
}
</style>
