<template>
  <div class="addTemplateManagement-container">
    <div class="block-content block-content-set">
      <div class="title">模版信息</div>
      <el-form
        ref="formSet"
        class="form-block"
        :model="form"
        label-width="160px"
      >
        <el-form-item label="模版类型" class="form-page-size-item">
          <el-radio-group v-model="form.resource">
            <el-radio class="el-item-radio" :label="1">商品订单</el-radio>
            <el-radio class="el-item-radio" :label="2">订单退款</el-radio>
            <el-radio class="el-item-radio" :label="3">核销凭证</el-radio>
            <el-radio class="el-item-radio" :label="4">会员充值</el-radio>
            <el-radio class="el-item-radio" :label="5">收银交班</el-radio>
          </el-radio-group>
          <div class="tips">
            商品订单模板不包含礼品卡、酒店、知识付费、会员卡等非商品类型的订单打印；
            <br />
            模板创建后，类型将不可更改。
          </div>
        </el-form-item>
        <el-form-item
          label="模版名称"
          prop="tepName"
          :rules="{
            required: true,
            message: '请输入模版名称',
            trigger: 'blur',
          }"
        >
          <el-input
            v-model="form.tepName"
            :maxlength="20"
            placeholder="请输入模版名称"
            size="medium"
            show-word-limit
          ></el-input>
        </el-form-item>
      </el-form>
    </div>
    <div class="content-container">
      <div class="block-left">
        <div class="title">模板编辑</div>
        <div class="block-box">
          <div class="block-item">
            <div class="box-title">票头</div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['header_info']['template_status']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                小票名称
              </el-checkbox>
              <el-input
                class="receipt-input"
                v-model="printData['header_info']['template_name']"
                :maxlength="20"
                placeholder="请输入小票名称"
                size="medium"
                show-word-limit
              ></el-input>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['template_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['template_bold']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['header_info']['shop_name']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                商城名称（门店）
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['shop_name_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['shop_name_bold']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="tips">多门店模式下，此处将显示下单门店的门店名称。</div>
            <div class="block-group" v-show="form.resource == 3">
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['header_info']['write_off_name']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                核销员名称
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['header_info']['write_off_time']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                核销时间
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['header_info']['order_no']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                订单编号
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['header_info']['write_off_type']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                核销类型
              </el-checkbox>
            </div>
            <div class="block-group" v-show="form.resource == 5">
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['header_info']['open_time']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                营业时间
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['header_info']['print_time']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                打印时间
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['header_info']['print_people']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                打印人
              </el-checkbox>
            </div>
            <div class="block-group" v-show="[1, 2].includes(form.resource)">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['header_info']['gen_num']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                取单号
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['gen_num_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['gen_num_bold']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="block-group" v-show="form.resource == 1">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['header_info']['order_sort']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                订单顺序号（日）
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">前缀</div>
                <el-input
                  class="receipt-input"
                  v-model="printData['header_info']['order_sort_prefix']"
                  :maxlength="4"
                  placeholder="请输入订单顺序号（日）"
                  size="medium"
                  show-word-limit
                ></el-input>
              </div>
              <div class="block-select">
                <div class="block-select-name" style="width: 100px">
                  排序订单
                </div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['order_sort_type']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sortOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="block-group" v-show="form.resource == 1">
              <div class="group-checkbox"></div>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['order_sort_font_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['order_sort_font_bold']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="tips" v-show="form.resource == 1">
              每个自然日根据订单的付款时间所记录的有序自增编号，从001开始记录，每天0点重置。
            </div>
            <div class="block-group" v-show="[1, 2].includes(form.resource)">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['header_info']['quick_buy']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                快速购买渠道
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['quick_buy_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['quick_buy_bold']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="tips" v-show="[1, 2].includes(form.resource)">
              仅通过扫描快速购买渠道二维码产生的订单才会显示。
            </div>
            <div class="block-group" v-show="form.resource == 1">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['header_info']['customer_mark']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                买家备注
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['customer_mark_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['customer_mark_bold']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="block-group" v-show="form.resource == 1">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['header_info']['selfsend_time']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                自提/配送时间
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['selfsend_time_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['header_info']['selfsend_time_bold']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="tips" v-show="form.resource == 1">
              仅同城、自提方式的实体订单会显示该时间信息。
            </div>
          </div>
        </div>
        <div class="block-box" v-show="form.resource == 4">
          <div class="block-item">
            <div class="box-title">充值信息</div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['recharge_info']['recharge_money']"
                :true-label="1"
                :false-label="0"
                size="medium"
                disabled
              >
                充值金额
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['recharge_info']['recharge_money_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['recharge_info']['recharge_money_blod']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['recharge_info']['send_money']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                赠送金额
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['recharge_info']['send_money_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['recharge_info']['send_money_blod']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['recharge_info']['customer_balance']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                账户余额
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['recharge_info']['customer_balance_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['recharge_info']['customer_balance_blod']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
          </div>
        </div>
        <div class="block-box" v-show="form.resource == 5">
          <div class="block-item">
            <div class="box-title">收银员信息</div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['stand_info']['name']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                员工名称
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['stand_info']['start_time']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                开始时间
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['stand_info']['end_time']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                结束时间
              </el-checkbox>
            </div>
          </div>
        </div>
        <div class="block-box" v-show="form.resource == 5">
          <div class="block-item">
            <div class="box-title">日结营业汇总</div>
            <div class="block-group">
              <div class="block-group" style="margin: 0; padding: 0">
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['finish_info']['all']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  总交易额
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['finish_info']['pay_order_count']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  支付订单数
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['finish_info']['sale_goods_count']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  出售商品件数
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['finish_info']['card_price']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  会员卡交易额
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['finish_info']['recharge_money_price']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  余额充值金额
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['finish_info']['refund_price']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  退款金额
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['finish_info']['refund_order_count']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  退款订单数
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['finish_info']['refund_goods_count']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  退款件数
                </el-checkbox>
              </div>
            </div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['finish_info']['real_money']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                实营收额
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['finish_info']['real_money_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['finish_info']['real_money_blod']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
          </div>
        </div>
        <div class="block-box" v-show="form.resource == 5">
          <div class="block-item">
            <div class="box-title">支付方式组成</div>
            <div class="block-group">
              <div class="block-group" style="margin: 0; padding: 0">
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['pay_type_info']['wechat']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  微信
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['pay_type_info']['ali']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  支付宝
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['pay_type_info']['cash']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  现金
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['pay_type_info']['balance']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  余额
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['pay_type_info']['other']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  其他线下方式
                </el-checkbox>
              </div>
            </div>
          </div>
        </div>
        <div class="block-box" v-show="form.resource == 5">
          <div class="block-item">
            <div class="box-title">核销记录</div>
            <div class="block-group">
              <div class="block-group" style="margin: 0; padding: 0">
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['checkstand_writeoff']['self']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  自提订单
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['checkstand_writeoff']['virtual']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  虚拟核销订单
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['checkstand_writeoff']['timegoods']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  计次时卡券
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['checkstand_writeoff']['booking']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  预约到店
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['checkstand_writeoff']['giftpackage']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  礼包商品
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['checkstand_writeoff']['coupon']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  优惠券
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['checkstand_writeoff']['hotel']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  酒店预订
                </el-checkbox>
              </div>
            </div>
          </div>
        </div>
        <div class="block-box" v-show="[1, 2].includes(form.resource)">
          <div class="block-item">
            <div class="box-title">订单基础信息</div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['order_info']['order_no']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                订单编号
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['order_info']['order_from']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                订单来源
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['order_info']['order_goods_type']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                商品类型
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['order_info']['order_pay_type']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                支付方式
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['order_info']['order_status']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                订单状态
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['order_info']['order_dispatch_name']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                配送方式
              </el-checkbox>
            </div>
            <div class="block-group" style="margin-top: 10px">
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['order_info']['order_create_time']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                下单时间
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['order_info']['order_pay_time']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                付款时间
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['order_info']['order_finish_time']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                完成时间
              </el-checkbox>
              <el-checkbox
                style="margin-right: 40px"
                class="group-checkbox-1"
                v-model="printData['order_info']['refund_create_time']"
                :true-label="1"
                :false-label="0"
                size="medium"
                v-show="form.resource == 2"
              >
                申请退款时间
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['order_info']['refund_finish_time']"
                :true-label="1"
                :false-label="0"
                size="medium"
                v-show="form.resource == 2"
              >
                退款完成时间
              </el-checkbox>
            </div>
          </div>
        </div>
        <div class="block-box" v-show="[1, 3].includes(form.resource)">
          <div class="block-item">
            <div class="box-title">商品信息</div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['make_info']['goods_name']"
                :true-label="1"
                :false-label="0"
                size="medium"
                disabled
              >
                商品名称
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['make_info']['goods_name_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['make_info']['goods_name_bold']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['make_info']['num']"
                :true-label="1"
                :false-label="0"
                size="medium"
                disabled
              >
                商品数量
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['make_info']['num_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['make_info']['num_bold']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="block-group" style="margin-top: 30px">
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['make_info']['goods_code']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                编码
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['make_info']['product_sn']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                条形码
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['make_info']['attach']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                附加规格
              </el-checkbox>
            </div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['make_info']['price']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                商品金额
              </el-checkbox>
              <div class="block-select">
                <div style="width: 100px" class="block-select-name">
                  金额方式
                </div>
                <el-select
                  class="select-box"
                  v-model="printData['make_info']['goods_price_type']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['make_info']['gift_info']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                赠品明细
              </el-checkbox>
            </div>
            <div class="tips">显示“满赠”“消费奖励”活动所产生的赠品明细。</div>
          </div>
        </div>
        <div class="block-box" v-show="form.resource == 2">
          <div class="block-item">
            <div class="box-title">退款商品信息</div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['make_info']['goods_name']"
                :true-label="1"
                :false-label="0"
                size="medium"
                disabled
              >
                商品名称
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-1"
                v-model="printData['make_info']['num']"
                :true-label="1"
                :false-label="0"
                size="medium"
                disabled
              >
                商品数量
              </el-checkbox>
              <el-checkbox
                style="margin-right: 40px"
                class="group-checkbox-1"
                v-model="printData['make_info']['real_price']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                商品实付款
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['make_info']['real_price_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['make_info']['real_price_bold']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
          </div>
        </div>
        <div class="block-box" v-show="form.resource == 2">
          <div class="block-item">
            <div class="box-title">退款原由/明细</div>
            <div class="block-group">
              <div class="block-group" style="margin: 0; padding: 0">
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['refund']['type']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  退款方式
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['refund']['apply_time']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  申请售后时间
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['refund']['apply_money']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  申请售后金额
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['refund']['apply_reason']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  申请原因
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['refund']['apply_detail']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  退款金额明细
                </el-checkbox>
              </div>
            </div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['refund']['apply_real']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                实退金额
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['refund']['apply_real_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['refund']['apply_real_bold']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="tips">
              退款方式包含后台关闭订单退款、逐一退款、售后（仅退款）、售后（退款退货）；
              <br />
              仅售后单才会显示“申请售后时间”“申请售后金额”“申请原因”
            </div>
          </div>
        </div>
        <div class="block-box" v-show="form.resource == 1">
          <div class="block-item">
            <div class="box-title">订单金额</div>
            <div class="block-group">
              <div class="block-group" style="margin: 0; padding: 0">
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['order_price']['goods_count']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  商品总件数
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['order_price']['price_detail']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  金额明细
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['order_price']['discount_detail']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  优惠明细
                </el-checkbox>
              </div>
            </div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['order_price']['pay_price']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                实付金额
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['make_info']['real_price_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['make_info']['real_price_bold']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
          </div>
        </div>
        <div class="block-box" v-show="form.resource == 1">
          <div class="block-item">
            <div class="box-title">其他订单信息</div>
            <div class="block-group">
              <div class="block-group" style="margin: 0; padding: 0">
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['mark_info']['form_data']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  订单表单
                </el-checkbox>
              </div>
            </div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['mark_info']['saler_mark']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                商家备注
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['mark_info']['saler_mark_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['mark_info']['saler_mark_bold']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
          </div>
        </div>
        <div class="block-box" v-show="form.resource == 3">
          <div class="block-item">
            <div class="box-title">核销信息</div>
            <div class="block-group" v-show="[1, 3].includes(form.resource)">
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['write_off_info']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                核销信息
              </el-checkbox>
            </div>
            <div class="tips">
              根据核销类型显示订单的核销自提点、门店、预约信息、酒店入住信息等。
            </div>
          </div>
        </div>
        <div class="block-box" v-show="form.resource != 5">
          <div class="block-item">
            <div class="box-title">
              {{ form.resource == 1 ? '买家/收货信息' : '会员信息' }}
            </div>
            <div class="block-group">
              <div class="block-group" style="margin: 0; padding: 0">
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['customer_info']['customer_name']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  买家昵称
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['customer_info']['customer_mobile']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                  v-show="[4].includes(form.resource)"
                >
                  {{ form.resource == 4 ? '会员手机号' : '买家手机号' }}
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['customer_info']['customer_realname']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  真实姓名
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['customer_info']['customer_balance']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                  v-show="[1, 2, 4].includes(form.resource)"
                >
                  余额
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['customer_info']['customer_credit']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                  v-show="[1, 2, 4].includes(form.resource)"
                >
                  积分
                </el-checkbox>
                <el-checkbox
                  class="group-checkbox-2"
                  v-model="printData['customer_info']['customer_remark']"
                  :true-label="1"
                  :false-label="0"
                  size="medium"
                >
                  会员备注
                </el-checkbox>
              </div>
            </div>
            <div class="block-group" v-show="[1, 2].includes(form.resource)">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['customer_info']['customer_mobile']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                买家手机号
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">脱敏</div>
                <el-select
                  class="select-box"
                  v-model="printData['customer_info']['customer_mobile_des']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in mobileOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="block-group" v-show="form.resource == 1">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['customer_info']['buyer_name']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                收货人姓名
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['customer_info']['buyer_name_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['customer_info']['buyer_name_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="block-group" v-show="form.resource == 1">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['customer_info']['buyer_mobile']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                收货人联系方式
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['customer_info']['buyer_mobile_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['customer_info']['buyer_mobile_blod']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">脱敏</div>
                <el-select
                  class="select-box"
                  v-model="printData['customer_info']['buyer_mobile_des']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in mobileOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="block-group" v-show="form.resource == 1">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['customer_info']['buyer_address']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                收货人地址
              </el-checkbox>
              <div class="block-select">
                <div class="block-select-name">字号</div>
                <el-select
                  class="select-box"
                  v-model="printData['customer_info']['buyer_address_size']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in sizeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
              <div class="block-select">
                <div class="block-select-name">粗体</div>
                <el-select
                  class="select-box"
                  v-model="printData['customer_info']['buyer_address_blod']"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in boldOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div class="block-group" v-show="form.resource == 1">
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['customer_info']['invoice']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                是否开具发票
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['customer_info']['invoice_info']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                发票信息
              </el-checkbox>
            </div>
          </div>
        </div>
        <div class="block-box" v-show="form.resource == 1">
          <div class="block-item">
            <div class="box-title">自提/预约门店</div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['pick_store']['store_name']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                门店名称
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['pick_store']['store_address']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                门店地址（预约地址）
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['pick_store']['store_contact']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                门店联系人
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['pick_store']['store_contact_name']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                门店联系方式
              </el-checkbox>
            </div>
            <div class="tips">
              仅自提、预约类型订单将显示此部分信息；
              <br />
              预约商品的地址若为自定义地址，则仅会显示“预约地址”字段，无门店名称、联系人及联系方式。
            </div>
          </div>
        </div>
        <div class="block-box" v-show="form.resource != 5">
          <div class="block-item">
            <div class="box-title">底部信息</div>
            <div class="block-group" v-show="[1, 3, 4].includes(form.resource)">
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['footer_info']['stand_name']"
                :true-label="1"
                :false-label="0"
                size="medium"
                v-show="[1].includes(form.resource)"
              >
                收银员名称
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['footer_info']['cashier_name']"
                :true-label="1"
                :false-label="0"
                size="medium"
                v-show="[1].includes(form.resource)"
              >
                导购员名称
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['footer_info']['shop_name']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                商城名称
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['footer_info']['shop_phone']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                商城联系方式
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['footer_info']['store_name']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                门店名称
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['footer_info']['store_phone']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                门店联系方式
              </el-checkbox>
            </div>
            <div class="block-group" v-show="[1, 3, 4].includes(form.resource)">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['footer_info']['shop_qrcode']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                二维码
              </el-checkbox>
              <el-select
                style="width: 160px"
                class="select-box"
                v-model="printData['footer_info']['shop_qrcode_type']"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in qrCodeOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
              <el-input
                style="width: 400px"
                class="receipt-input"
                v-model="printData['footer_info']['shop_qrcode_url']"
                placeholder="请输入链接地址"
                size="medium"
              ></el-input>
            </div>
            <div class="block-group">
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['footer_info']['manage']"
                :true-label="1"
                :false-label="0"
                size="medium"
                v-show="form.resource == 2"
              >
                操作人
              </el-checkbox>
              <el-checkbox
                class="group-checkbox-2"
                v-model="printData['footer_info']['print_time']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                小票打印时间
              </el-checkbox>
            </div>
            <div class="block-group" v-show="[1, 3, 4].includes(form.resource)">
              <el-checkbox
                class="group-checkbox"
                v-model="printData['footer_info']['print_footer']"
                :true-label="1"
                :false-label="0"
                size="medium"
              >
                自定义文本
              </el-checkbox>
              <el-input
                style="width: 560px"
                v-model="printData['footer_info']['print_footer_info']"
                :maxlength="20"
                placeholder="请输入模版名称"
                size="medium"
                show-word-limit
              ></el-input>
            </div>
          </div>
        </div>
      </div>
      <div class="block-right">
        <div class="title">预览图</div>
        <div class="block-container">
          <!-- <div v-for="(item,index) of receiptConfig" :key="index" :class="[item.class,test(item.classText)]" :style="item.style" v-show=" item.show.length > 0 ?  test2(item.show) : test3(item.handerChekcItems)">
                        {{ item.data != '' ? item.data  : item.dataKey.length > 0 ? printData[item.dataKey[0]][item.dataKey[1]] : '' }}
                        <div v-if="item.children.length > 0 ">
                            <div :style="group.style" :class="[group.class,test(group.classText)]" v-for="(group,index2) of item.children" :key="index2" v-show="(group.show)">
                                {{ handerText(group)  }}
                            </div>
                        </div>
                    </div> -->
          <div
            style="padding-bottom: 10px"
            :class="[
              'block-content',
              'item-block',
              classItem('header_info', 'template_size', 'template_bold'),
            ]"
            v-show="showItem('header_info', 'template_status')"
          >
            {{ printData.header_info.template_name || '小票名称' }}
          </div>
          <div
            style="padding-bottom: 10px"
            :class="[
              'block-content',
              'item-block',
              classItem('header_info', 'shop_name_size', 'shop_name_bold'),
            ]"
            v-show="showItem('header_info', 'shop_name')"
          >
            商城名称
          </div>
          <div
            class="block-content item-small-size"
            v-show="
              handerChekcItem('recharge_info', [
                'recharge_money',
                'send_money',
                'customer_balance',
              ]) && [3].includes(form.resource)
            "
          >
            <div
              class="item-block-left"
              v-show="showItem('header_info', 'write_off_name')"
            >
              核销员：张三
            </div>
            <div
              class="item-block-left"
              v-show="showItem('header_info', 'write_off_time')"
            >
              核销时间：2023-12-12 14:20:20
            </div>
            <div
              class="item-block-left"
              v-show="showItem('header_info', 'order_no')"
            >
              订单编号：ES20231026111444527685
            </div>
            <div
              class="item-block-left"
              v-show="showItem('header_info', 'write_off_type')"
            >
              核销类型：自提订单
            </div>
          </div>
          <div
            class="block-content item-small-size"
            v-show="
              handerChekcItem('header_info', [
                'open_time',
                'print_time',
                'print_people',
              ]) && form.resource == 5
            "
          >
            <div
              class="item-block-left"
              v-show="showItem('header_info', 'open_time')"
            >
              营业时间：2023-02-17
            </div>
            <div
              class="item-block-left"
              v-show="showItem('header_info', 'print_time')"
            >
              打印时间：2023-02-28 16:29:29
            </div>
            <div
              class="item-block-left"
              v-show="showItem('header_info', 'print_people')"
            >
              打印人：张三
            </div>
          </div>
          <div
            class="block-content item-small-size"
            v-show="
              handerChekcItem('stand_info', [
                'name',
                'start_time',
                'end_time',
              ]) && form.resource == 5
            "
          >
            <div
              class="item-block-left"
              v-show="showItem('stand_info', 'name')"
            >
              收银员：李四
            </div>
            <div
              class="item-block-left"
              v-show="showItem('stand_info', 'start_time')"
            >
              开始：2023-02-28 16:29:29
            </div>
            <div
              class="item-block-left"
              v-show="showItem('stand_info', 'end_time')"
            >
              结束：2023-02-28 16:29:29
            </div>
          </div>
          <div
            class="block-content item-small-size"
            v-show="
              handerChekcItem('finish_info', [
                'all',
                'pay_order_count',
                'sale_goods_count',
                'card_price',
                'recharge_money_price',
                'refund_price',
                'refund_order_count',
                'refund_goods_count',
                'real_money',
              ]) && form.resource == 5
            "
          >
            <div class="item-block gift-block">
              <div class="gift-boder"></div>
              <div class="gift-num item-small-size bold">营业汇总</div>
              <div class="gift-boder"></div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('finish_info', 'all')"
            >
              <div class="item-balance-info-name">总交易额</div>
              <div class="item-balance-info-num">31000</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('finish_info', 'pay_order_count')"
            >
              <div class="item-balance-info-name">支付订单数</div>
              <div class="item-balance-info-num">3600</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('finish_info', 'sale_goods_count')"
            >
              <div class="item-balance-info-name">出售商品件数</div>
              <div class="item-balance-info-num">5000</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('finish_info', 'card_price')"
            >
              <div class="item-balance-info-name">会员卡交易额</div>
              <div class="item-balance-info-num">3546</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('finish_info', 'recharge_money_price')"
            >
              <div class="item-balance-info-name">余额充值金额</div>
              <div class="item-balance-info-num">9555</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('finish_info', 'refund_price')"
            >
              <div class="item-balance-info-name">退款金额</div>
              <div class="item-balance-info-num">3000</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('finish_info', 'refund_order_count')"
            >
              <div class="item-balance-info-name">退款订单数</div>
              <div class="item-balance-info-num">30</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('finish_info', 'refund_goods_count')"
            >
              <div class="item-balance-info-name">退款件数</div>
              <div class="item-balance-info-num">20</div>
            </div>
            <div
              :class="[
                'item-block',
                'item-balance-info',
                classItem('finish_info', 'real_money_size', 'real_money_blod'),
              ]"
              v-show="showItem('finish_info', 'real_money')"
            >
              <div class="item-balance-info-name">实营收额</div>
              <div class="item-balance-info-num">250000</div>
            </div>
          </div>
          <div
            class="block-content item-small-size"
            v-show="
              handerChekcItem('pay_type_info', [
                'wechat',
                'ali',
                'cash',
                'balance',
                'other',
              ]) && form.resource == 5
            "
          >
            <div class="item-block gift-block">
              <div class="gift-boder"></div>
              <div class="gift-num item-small-size bold">支付方式组成</div>
              <div class="gift-boder"></div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('pay_type_info', 'wechat')"
            >
              <div class="item-balance-info-name">微信</div>
              <div class="item-balance-info-num">31000</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('pay_type_info', 'ali')"
            >
              <div class="item-balance-info-name">支付宝</div>
              <div class="item-balance-info-num">3600</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('pay_type_info', 'cash')"
            >
              <div class="item-balance-info-name">现金</div>
              <div class="item-balance-info-num">5000</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('pay_type_info', 'balance')"
            >
              <div class="item-balance-info-name">余额</div>
              <div class="item-balance-info-num">3546</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('pay_type_info', 'other')"
            >
              <div class="item-balance-info-name">其他线下方式</div>
              <div class="item-balance-info-num">9555</div>
            </div>
          </div>
          <div
            class="block-content item-small-size"
            v-show="
              handerChekcItem('checkstand_writeoff', [
                'self',
                'virtual',
                'timegoods',
                'booking',
                'giftpackage',
                'coupon',
                'hotel',
              ]) && form.resource == 5
            "
          >
            <div class="item-block gift-block">
              <div class="gift-boder"></div>
              <div class="gift-num item-small-size bold">核销记录</div>
              <div class="gift-boder"></div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('checkstand_writeoff', 'self')"
            >
              <div class="item-balance-info-name">自提订单</div>
              <div class="item-balance-info-num">100单</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('checkstand_writeoff', 'virtual')"
            >
              <div class="item-balance-info-name">虚拟核销订单</div>
              <div class="item-balance-info-num">200单</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('checkstand_writeoff', 'timegoods')"
            >
              <div class="item-balance-info-name">计次时卡券</div>
              <div class="item-balance-info-num">5000</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('checkstand_writeoff', 'booking')"
            >
              <div class="item-balance-info-name">余额</div>
              <div class="item-balance-info-num">35406</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('checkstand_writeoff', 'giftpackage')"
            >
              <div class="item-balance-info-name">预约到店</div>
              <div class="item-balance-info-num">500次</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('checkstand_writeoff', 'coupon')"
            >
              <div class="item-balance-info-name">优惠券</div>
              <div class="item-balance-info-num">30张</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('checkstand_writeoff', 'hotel')"
            >
              <div class="item-balance-info-name">酒店预订</div>
              <div class="item-balance-info-num">5单</div>
            </div>
          </div>
          <div
            class="block-content"
            v-show="
              handerChekcItem('header_info', [
                'gen_num',
                'order_sort',
                'quick_buy',
                'customer_mark',
                'selfsend_time',
              ]) && [1, 2].includes(form.resource)
            "
          >
            <div
              :class="[
                'item-block',
                classItem('header_info', 'gen_num_size', 'gen_num_bold'),
              ]"
              v-show="showItem('header_info', 'gen_num')"
            >
              #0001
            </div>
            <div
              :class="[
                'item-block',
                classItem(
                  'header_info',
                  'order_sort_font_size',
                  'order_sort_font_bold'
                ),
              ]"
              v-show="
                showItem('header_info', 'order_sort') && form.resource == 1
              "
            >
              {{ printData.header_info.order_sort_prefix || '序号' }}
            </div>
            <div
              :class="[
                'item-block',
                classItem('header_info', 'quick_buy_size', 'quick_buy_bold'),
              ]"
              v-show="showItem('header_info', 'quick_buy')"
            >
              快速购买渠道名称
            </div>
            <div
              :class="[
                'item-block-left',
                classItem(
                  'header_info',
                  'customer_mark_size',
                  'customer_mark_bold'
                ),
              ]"
              v-show="
                showItem('header_info', 'customer_mark') && form.resource == 1
              "
            >
              买家备注：多用一层包装袋，送到后请打电话，谢谢！！
            </div>
            <div
              :class="[
                'item-block-left',
                classItem(
                  'header_info',
                  'selfsend_time_size',
                  'selfsend_time_bold'
                ),
              ]"
              v-show="
                showItem('header_info', 'selfsend_time') && form.resource == 1
              "
            >
              配送时间：10-25 14:00-14:30
            </div>
          </div>
          <div
            class="block-content item-small-size"
            v-show="
              handerChekcItem('order_info', [
                'order_no',
                'order_from',
                'order_goods_type',
                'order_pay_type',
                'order_status',
                'order_dispatch_name',
                'order_create_time',
                'order_pay_time',
                'order_finish_time',
              ]) && [1, 2].includes(form.resource)
            "
          >
            <div
              class="item-block-left"
              v-show="showItem('order_info', 'order_no')"
            >
              订单编号：ES20231026111444527685
            </div>
            <div
              class="item-block-left"
              v-show="showItem('order_info', 'order_from')"
            >
              订单来源：微信小程序
            </div>
            <div
              class="item-block-left"
              v-show="showItem('order_info', 'order_goods_type')"
            >
              商品类型：实体商品
            </div>
            <div
              class="item-block-left"
              v-show="showItem('order_info', 'order_pay_type')"
            >
              支付方式：微信支付
            </div>
            <div
              class="item-block-left"
              v-show="showItem('order_info', 'order_status')"
            >
              订单状态：已完成
            </div>
            <div
              class="item-block-left"
              v-show="showItem('order_info', 'order_dispatch_name')"
            >
              配送方式：同城配送
            </div>
            <div
              class="item-block-left"
              v-show="showItem('order_info', 'order_create_time')"
            >
              下单时间：2023-12-12 14:20:20
            </div>
            <div
              class="item-block-left"
              v-show="showItem('order_info', 'order_pay_time')"
            >
              付款时间：2023-12-12 14:20:20
            </div>
            <div
              class="item-block-left"
              v-show="showItem('order_info', 'order_finish_time')"
            >
              完成时间：2023-12-12 14:20:20
            </div>
            <div
              class="item-block-left"
              v-show="
                showItem('order_info', 'refund_create_time') &&
                form.resource == 2
              "
            >
              申请退款时间：2023-12-12 14:20:20
            </div>
            <div
              class="item-block-left"
              v-show="
                showItem('order_info', 'refund_finish_time') &&
                form.resource == 2
              "
            >
              退款完成时间：2023-12-12 14:20:20
            </div>
          </div>
          <div
            style="padding-bottom: 10px"
            class="block-content"
            v-show="form.resource == 2"
          >
            <div
              class="item-block refund-block bold"
              v-show="showItem('make_info', 'gift_info')"
            >
              <div class="refund-xing">*********************</div>
              <div class="refund-num item-small-size">退款商品</div>
              <div class="refund-xing">*********************</div>
            </div>
            <div class="item-block item-flex bold">
              <div class="item-flex-1">商品名称</div>
              <div class="item-flex-2">退款数量</div>
              <div
                class="item-flex-2"
                v-show="showItem('make_info', 'real_price')"
              >
                实退款
              </div>
            </div>
            <div
              :class="[
                'item-block-left',
                classItem('make_info', 'real_price_size', 'real_price_bold'),
              ]"
              v-show="showItem('make_info', 'goods_name')"
              style="padding: 0"
            >
              (退)可口可乐mini罐 经典碳酸饮料【新包装；200ml*12罐】
            </div>
            <div class="item-flex">
              <div class="item-flex-1"></div>
              <div
                class="item-flex-2"
                :class="
                  classItem('make_info', 'real_price_size', 'real_price_bold')
                "
              >
                [
                <span style="padding: 0 5px">X 2</span>
                ]
              </div>
              <div
                class="item-flex-2"
                :class="
                  classItem('make_info', 'real_price_size', 'real_price_bold')
                "
                v-show="showItem('make_info', 'real_price')"
              >
                ¥54.5
              </div>
            </div>
            <div
              :class="[
                'item-block-left',
                classItem('make_info', 'real_price_size', 'real_price_bold'),
              ]"
              v-show="showItem('make_info', 'goods_name')"
            >
              (退)超薄液晶电视
            </div>
            <div class="item-flex">
              <div class="item-flex-1"></div>
              <div
                class="item-flex-2"
                :class="
                  classItem('make_info', 'real_price_size', 'real_price_bold')
                "
              >
                1
              </div>
              <div
                class="item-flex-2"
                :class="
                  classItem('make_info', 'real_price_size', 'real_price_bold')
                "
                v-show="showItem('make_info', 'real_price')"
              >
                ¥1999
              </div>
            </div>
          </div>
          <div
            class="block-content item-small-size"
            v-show="
              handerChekcItem('refund', [
                'type',
                'apply_time',
                'apply_money',
                'apply_reason',
                'apply_real',
                'apply_detail',
              ]) && form.resource == 2
            "
          >
            <div class="item-block-left" v-show="showItem('refund', 'type')">
              退款方式：售后（仅退款）
            </div>
            <div
              class="item-block-left"
              v-show="showItem('refund', 'apply_time')"
            >
              申请售后时间：2023-12-12 14:20:20
            </div>
            <div
              class="item-block item-flex"
              v-show="showItem('refund', 'apply_money')"
            >
              申请金额：64.5
            </div>
            <div
              class="item-block-left"
              v-show="showItem('refund', 'apply_reason')"
            >
              申请原因：拍多了。
            </div>
            <div
              :class="[
                'item-block item-flex',
                classItem('refund', 'apply_real_size', 'apply_real_bold'),
              ]"
              v-show="showItem('refund', 'apply_real')"
            >
              <div class="item-flex-1">实退金额</div>
              <div class="item-flex-2">64.5</div>
            </div>
            <div
              class="item-block-left"
              v-show="showItem('refund', 'apply_detail')"
            >
              微信退款金额：50（原路退还）
            </div>
            <div
              class="item-block-left"
              v-show="showItem('refund', 'apply_detail')"
            >
              余额退款金额：14.5
            </div>
          </div>
          <div
            style="padding-bottom: 10px"
            class="block-content"
            v-show="[1, 3].includes(form.resource)"
          >
            <div class="item-block item-flex">
              <div class="item-flex-1">商品名称</div>
              <div class="item-flex-2">数量</div>
              <div
                class="item-flex-2"
                v-show="showItem('order_price', 'pay_price')"
              >
                金额
              </div>
            </div>
            <div
              :class="[
                'item-block-left',
                classItem('make_info', 'goods_name_size', 'goods_name_bold'),
              ]"
              v-show="showItem('make_info', 'goods_name')"
              style="padding: 0"
            >
              可口可乐mini罐 经典碳酸饮料【新包装；200ml*12罐】
            </div>
            <div
              class="item-small-size"
              v-show="showItem('make_info', 'goods_code')"
            >
              123456789
            </div>
            <div
              style="margin: 0"
              class="item-block-left item-small-size"
              v-show="showItem('make_info', 'product_sn')"
            >
              6970448170051
            </div>
            <div class="item-flex">
              <div class="item-flex-1"></div>
              <div
                class="item-flex-2"
                :class="classItem('make_info', 'num_size', 'num_bold')"
              >
                [
                <span style="padding: 0 5px">X 2</span>
                ]
              </div>
              <div
                class="item-flex-2"
                :class="
                  classItem('order_price', 'pay_price_size', 'pay_price_bold')
                "
                v-show="showItem('order_price', 'pay_price')"
              >
                ¥54.5
              </div>
            </div>
            <div
              :class="[
                'item-block-left',
                classItem('make_info', 'goods_name_size', 'goods_name_bold'),
              ]"
              v-show="showItem('make_info', 'goods_name')"
            >
              超薄液晶电视
            </div>
            <div
              class="item-small-size"
              v-show="showItem('make_info', 'goods_code')"
            >
              123456789
            </div>
            <div
              style="margin: 0"
              class="item-block-left item-small-size"
              v-show="showItem('make_info', 'product_sn')"
            >
              6970448170051
            </div>
            <div class="item-flex">
              <div class="item-flex-1"></div>
              <div
                class="item-flex-2"
                :class="classItem('make_info', 'num_size', 'num_bold')"
              >
                1
              </div>
              <div
                class="item-flex-2"
                :class="
                  classItem('order_price', 'pay_price_size', 'pay_price_bold')
                "
                v-show="showItem('order_price', 'pay_price')"
              >
                ¥1999
              </div>
            </div>
            <div v-show="showItem('make_info', 'attach')">
              <div class="item-block-left item-small-size">
                （上门安装服务）
              </div>
              <div class="item-flex">
                <div class="item-flex-1"></div>
                <div class="item-flex-2">1</div>
                <div
                  class="item-flex-2"
                  v-show="showItem('make_info', 'price')"
                >
                  ¥0
                </div>
              </div>
              <div class="item-block-left item-small-size">（3年延保）</div>
              <div class="item-flex">
                <div class="item-flex-1"></div>
                <div class="item-flex-2">1</div>
                <div
                  class="item-flex-2"
                  v-show="showItem('make_info', 'price')"
                >
                  ¥199.99
                </div>
              </div>
            </div>
            <div
              class="item-block gift-block"
              v-show="showItem('make_info', 'gift_info')"
            >
              <div class="gift-boder"></div>
              <div class="gift-num item-small-size">赠品</div>
              <div class="gift-boder"></div>
            </div>
            <div v-show="showItem('make_info', 'gift_info')">
              <div
                class="item-block-left item-small-size"
                v-show="form.resource == 1"
              >
                余额：50
              </div>
              <div
                class="item-block-left item-small-size"
                v-show="form.resource == 1"
              >
                积分：50
              </div>
              <div class="item-block-left item-small-size">
                商品：冰红茶风味饮料x2；五香瓜子【150g；小包装】x1
              </div>
              <div
                class="item-block-left item-small-size"
                v-show="form.resource == 1"
              >
                优惠券：元旦大促7折券x1
              </div>
              <div
                class="item-block-left item-small-size"
                v-show="form.resource == 1"
              >
                会员卡：超级会员卡Plus【365天】
              </div>
              <div
                class="item-block-left item-small-size"
                v-show="form.resource == 1"
              >
                礼品卡：超值复购大礼包x1
              </div>
            </div>
          </div>
          <div
            class="block-content"
            v-show="form.resource == 3 && printData.write_off_info"
          >
            <div class="item-block item-size bold">#001</div>
            <div class="item-block-left item-small-size">
              核销自提点：自提点名称
            </div>
            <div class="item-block-left item-small-size">
              联系方式：123456789123
            </div>
            <div class="item-block-left item-small-size">
              地址：北京市朝阳区朝阳路1号
            </div>
            <div class="item-block-left item-small-size">
              营业时间：00:00~23:59
            </div>
            <div class="item-block-left item-small-size">
              自提时间：10-20 14:00~14:30
            </div>
          </div>
          <div
            class="block-content"
            v-show="
              handerChekcItem('order_price', [
                'goods_count',
                'price_detail',
                'price_detail',
                'price_detail',
                'discount_detail',
                'discount_detail',
              ]) && form.resource == 1
            "
          >
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('order_price', 'goods_count')"
            >
              <div class="item-balance-info-name">商品件数</div>
              <div class="item-balance-info-num">3</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('order_price', 'price_detail')"
            >
              <div class="item-balance-info-name">商品总额</div>
              <div class="item-balance-info-num">800</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('order_price', 'price_detail')"
            >
              <div class="item-balance-info-name">押金</div>
              <div class="item-balance-info-num">200</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('order_price', 'price_detail')"
            >
              <div class="item-balance-info-name">运费</div>
              <div class="item-balance-info-num">10</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('order_price', 'discount_detail')"
            >
              <div class="item-balance-info-name">会员权益</div>
              <div class="item-balance-info-num">3</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('order_price', 'discount_detail')"
            >
              <div class="item-balance-info-name">秒杀</div>
              <div class="item-balance-info-num">-100</div>
            </div>
            <div
              :class="[
                'item-block-left',
                classItem('order_price', 'pay_price_size', 'pay_price_bold'),
              ]"
              v-show="showItem('order_price', 'pay_price')"
            >
              实付金额
            </div>
            <div
              :class="[
                'item-block',
                classItem('make_info', 'real_price_size', 'real_price_bold'),
              ]"
              style="text-align: right"
              v-show="showItem('make_info', 'real_price')"
            >
              ¥860.00
            </div>
          </div>
          <div
            class="block-content"
            v-show="
              handerChekcItem('recharge_info', [
                'recharge_money',
                'send_money',
                'customer_balance',
              ]) && form.resource == 4
            "
          >
            <div
              :class="[
                'item-block',
                'item-balance-info',
                classItem(
                  'recharge_info',
                  'recharge_money_size',
                  'recharge_money_blod'
                ),
              ]"
              v-show="showItem('recharge_info', 'recharge_money')"
            >
              <div class="item-balance-info-name">充值金额</div>
              <div class="item-balance-info-num">¥100.00</div>
            </div>
            <div
              :class="[
                'item-block',
                'item-balance-info',
                classItem(
                  'recharge_info',
                  'send_money_size',
                  'send_money_blod'
                ),
              ]"
              v-show="showItem('recharge_info', 'send_money')"
            >
              <div class="item-balance-info-name">赠送金额</div>
              <div class="item-balance-info-num">¥50.00</div>
            </div>
            <div
              :class="[
                'item-block',
                'item-balance-info',
                classItem(
                  'recharge_info',
                  'customer_balance_size',
                  'customer_balance_blod'
                ),
              ]"
              v-show="showItem('recharge_info', 'customer_balance')"
            >
              <div class="item-balance-info-name">账户余额</div>
              <div class="item-balance-info-num">¥250.00</div>
            </div>
          </div>
          <div
            class="block-content"
            v-show="
              handerChekcItem('mark_info', ['form_data', 'saler_mark']) &&
              form.resource == 1
            "
          >
            <div
              class="item-small-size"
              v-show="showItem('mark_info', 'form_data')"
            >
              <div class="item-block-left">表单信息：信息内容</div>
              <div class="item-block-left">表单信息：信息内容</div>
              <div class="item-block-left">表单信息：信息内容</div>
            </div>
            <div
              :class="[
                'item-block-left',
                classItem('mark_info', 'saler_mark_size', 'saler_mark_bold'),
              ]"
              v-show="showItem('mark_info', 'saler_mark')"
            >
              商家备注：老客户再赠送一箱牛奶；玻璃瓶包装轻拿轻放
            </div>
          </div>
          <div
            class="block-content"
            v-show="
              handerChekcItem('customer_info', [
                'customer_name',
                'customer_mobile',
                'customer_realname',
                'customer_balance',
                'customer_credit',
                'customer_remark',
              ]) && [1, 2, 3, 4].includes(form.resource)
            "
          >
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('customer_info', 'customer_name')"
            >
              <div class="item-balance-info-name">会员名称</div>
              <div class="item-balance-info-num">AAAAAAA</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('customer_info', 'customer_mobile')"
            >
              <div class="item-balance-info-name">会员手机号</div>
              <div class="item-balance-info-num">
                133{{
                  printData.customer_info.customer_mobile_des == 1
                    ? '****'
                    : printData.customer_info.customer_mobile_des || '5555'
                }}3333
              </div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('customer_info', 'customer_realname')"
            >
              <div class="item-balance-info-name">姓名</div>
              <div class="item-balance-info-num">张三</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('customer_info', 'customer_balance')"
            >
              <div class="item-balance-info-name">余额</div>
              <div class="item-balance-info-num">1200.5</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('customer_info', 'customer_credit')"
            >
              <div class="item-balance-info-name">积分</div>
              <div class="item-balance-info-num">500</div>
            </div>
            <div
              class="item-block item-balance-info item-small-size"
              v-show="showItem('customer_info', 'customer_remark')"
            >
              <div class="item-balance-info-name">
                备注：本店前100注册优质客户
              </div>
            </div>
          </div>
          <div
            class="block-content"
            v-show="
              handerChekcItem('customer_info', [
                'buyer_name',
                'buyer_mobile',
                'buyer_address',
              ]) && form.resource == 1
            "
          >
            <div
              :class="[
                'item-block-left',
                classItem(
                  'customer_info',
                  'buyer_name_size',
                  'buyer_name_blod'
                ),
              ]"
              v-show="showItem('customer_info', 'buyer_name')"
            >
              收货人：张三
            </div>
            <div
              :class="[
                'item-block-left',
                classItem(
                  'customer_info',
                  'buyer_mobile_size',
                  'buyer_mobile_blod'
                ),
              ]"
              v-show="showItem('customer_info', 'buyer_mobile')"
            >
              联系方式：133{{
                printData.customer_info.buyer_mobile_des == 1
                  ? '****'
                  : printData.customer_info.buyer_mobile_des || '5555'
              }}3333
            </div>
            <div
              :class="[
                'item-block-left',
                classItem(
                  'customer_info',
                  'buyer_address_size',
                  'buyer_address_blod'
                ),
              ]"
              v-show="showItem('customer_info', 'buyer_address')"
            >
              收货地址：北京市朝阳区朝阳路朝阳人民小区1号楼1栋1101
            </div>
          </div>
          <div
            class="block-content"
            v-show="
              handerChekcItem('customer_info', ['invoice', 'invoice_info']) &&
              form.resource == 1
            "
          >
            <div
              class="item-block-left item-small-size"
              v-show="showItem('customer_info', 'invoice')"
            >
              发票：需要开具
            </div>
            <div v-show="showItem('customer_info', 'invoice_info')">
              <div class="item-block-left item-small-size">抬头类型：企业</div>
              <div class="item-block-left item-small-size">
                抬头信息：网络科技有限公司
              </div>
              <div class="item-block-left item-small-size">税号：123456789</div>
            </div>
          </div>
          <div
            class="block-content"
            v-show="
              handerChekcItem('pick_store', [
                'store_name',
                'store_address',
                'store_contact',
                'store_contact_name',
              ]) && form.resource == 1
            "
          >
            <div
              class="item-block-left item-small-size"
              v-show="showItem('pick_store', 'store_name')"
            >
              自提门店：门店名称
            </div>
            <div
              class="item-block-left item-small-size"
              v-show="showItem('pick_store', 'store_address')"
            >
              门店地址：北京市朝阳区朝阳路朝阳人民小区22号楼2栋2202
            </div>
            <div
              class="item-block-left item-small-size"
              v-show="showItem('pick_store', 'store_contact')"
            >
              联系人：李四
            </div>
            <div
              class="item-block-left item-small-size"
              v-show="showItem('pick_store', 'store_contact_name')"
            >
              联系方式：13111111111
            </div>
          </div>
          <div
            class="block-content"
            v-show="
              handerChekcItem('footer_info', [
                'stand_name',
                'cashier_name',
                'shop_name',
                'shop_phone',
                'store_name',
                'store_phone',
                'shop_qrcode',
                'print_time',
                'print_footer',
              ]) && [1, 3, 4].includes(form.resource)
            "
          >
            <div
              class="item-block-left item-small-size"
              v-show="
                showItem('footer_info', 'stand_name') &&
                [1].includes(form.resource)
              "
            >
              收银员：名称
            </div>
            <div
              class="item-block-left item-small-size"
              v-show="
                showItem('footer_info', 'cashier_name') &&
                [1].includes(form.resource)
              "
            >
              导购员：名称
            </div>
            <div
              class="item-block item-small-size"
              v-show="showItem('footer_info', 'shop_name')"
            >
              商城名称
            </div>
            <div
              class="item-block item-small-size"
              v-show="showItem('footer_info', 'shop_phone')"
            >
              010-12345678
            </div>
            <div
              class="item-block item-small-size"
              v-show="showItem('footer_info', 'store_name')"
            >
              门店名称
            </div>
            <div
              class="item-block item-small-size"
              v-show="showItem('footer_info', 'store_phone')"
            >
              010-12345678
            </div>
            <div
              class="item-block"
              v-show="showItem('footer_info', 'shop_qrcode')"
            >
              <img
                src="./../../../../assets/weChat.png"
                width="300"
                height="300"
              />
            </div>
            <div
              :class="[
                [1, 3, 4].includes(form.resource)
                  ? 'item-block'
                  : 'item-block-left',
                'item-small-size',
              ]"
              v-show="showItem('footer_info', 'print_time')"
            >
              打印时间：2023-12-12 12:12:20
            </div>
            <div
              class="item-block item-small-size"
              v-show="showItem('footer_info', 'print_footer')"
            >
              {{ printData.footer_info.print_footer_info }}
            </div>
          </div>
          <div
            class="block-content"
            v-show="
              handerChekcItem('footer_info', ['manage', 'print_time']) &&
              form.resource == 2
            "
          >
            <div
              class="item-block-left item-small-size"
              v-show="showItem('footer_info', 'manage') && form.resource == 2"
            >
              操作人：李四
            </div>
            <div
              :class="[
                form.resource == 1 ? 'item-block' : 'item-block-left',
                'item-small-size',
              ]"
              v-show="showItem('footer_info', 'print_time')"
            >
              打印时间：2023-12-12 12:12:20
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="footer">
      <el-button class="btn" size="medium" @click="handerGoTo">取消</el-button>
      <el-button class="btn" size="medium" type="primary" @click="onSubmit">
        保存
      </el-button>
    </div>
  </div>
</template>

<script>
import { config, printData } from './receiptConfig.js'
export default {
  name: 'addTemplateManagement',
  data() {
    return {
      form: {
        resource: 1,
        tepName: '',
      },
      amoutOptions: [
        {
          value: 1,
          label: '售价',
        },
        {
          value: 0,
          label: '实付款',
        },
      ],
      sizeOptions: [
        {
          value: 1,
          label: '大',
        },
        {
          value: 0,
          label: '小',
        },
      ],
      boldOptions: [
        {
          value: 1,
          label: '加粗',
        },
        {
          value: 0,
          label: '正常',
        },
      ],
      sortOptions: [
        {
          value: 0,
          label: '全部',
        },
        {
          value: 1,
          label: '仅网店订单',
        },
        {
          value: 2,
          label: '仅收银台订单',
        },
      ],
      mobileOptions: [
        {
          value: 1,
          label: '是',
        },
        {
          value: 0,
          label: '否',
        },
      ],
      qrCodeOptions: [
        {
          value: 0,
          label: '自定义链接(网址)',
        },
        {
          value: 1,
          label: '微信小程序',
        },
        {
          value: 2,
          label: 'H5',
        },
      ],
      printData: null,
      printData: printData,
    }
  },
  created() {
    //this.printData = JSON.parse(JSON.stringify(printData));
    //console.log(this.printData);
  },
  methods: {
    handerGoTo() {
      this.$router.push({
        path: '/templateManagement',
      })
    },
    showItem(blockName, itemName) {
      if (!this.printData == null) return
      return this.printData[blockName][itemName] != 0 ? true : false
    },
    classItem(blockName, itemSizeName, itemBoldName) {
      let arr = []

      if (this.printData[blockName][itemSizeName] == 1) {
        arr.push('item-size')
      } else {
        arr.push('item-small-size')
      }

      if (this.printData[blockName][itemBoldName] == 1) {
        arr.push('bold')
      }

      return arr
    },
    handerChekcItem(itemName, keyGroups) {
      for (var key of keyGroups) {
        if (this.printData[itemName][key] == 1) {
          return true
        }
      }
    },
    showItem(blockName, itemName) {
      if (!this.printData == null) return
      return this.printData[blockName][itemName] != 0 ? true : false
    },
  },
}
</script>

<style lang="scss">
.addTemplateManagement-container {
  padding: 0 !important;
  background: #f6f8f9 !important;
  padding-bottom: 40px !important;

  .title {
    padding: 20px;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid #f2f2f2;
    line-height: 1;
  }

  .block-content {
    margin-bottom: 20px;
    background: #fff;

    &-set {
      .el-input {
        width: 415px;
        height: 38px;
      }
    }
  }

  .form-block {
    padding: 20px;

    .el-form-item__label {
      margin-right: 20px;
    }

    .el-form-item__error {
      padding: 10px 20px;
      font-size: 14px;
    }

    .tips {
      padding: 10px 20px;
      line-height: 20px;
    }
  }

  .content-container {
    display: flex;

    .block-left {
      flex: 1;
      margin-right: 20px;
      background: #fff !important;
    }

    .block-right {
      width: 440px;
      background: #fff;

      .block-container {
        padding: 10px;
        margin: 20px 30px;
        border: 1px solid #ededed;
        border-radius: 10px;
        background: #f8f8f9;
      }

      .block-content {
        border-bottom: 1px dashed #ccc;
        color: #333333 !important;
        background: #f8f8f9;
      }

      .item-flex {
        display: flex;
        font-size: 16px;

        .item-flex-1 {
          flex: 2 1 0%;
          text-align: left;
        }

        .item-flex-2 {
          flex: 1;
          text-align: right;
        }
      }

      .item-balance-info {
        display: flex;
        justify-content: space-between;
      }

      .gift-block {
        display: flex;
        align-items: center;

        .gift-num {
          padding: 0 10px;
        }

        .gift-boder {
          flex: 1;
          border-bottom: 1px dashed #ccc;
        }
      }

      .refund-block {
        display: flex;
        align-items: center;
        justify-content: center;

        font-size: 16px;
        font-weight: bold;

        .refund-xing {
          margin-top: 7px;
          line-height: 1;
        }

        .refund-num {
          padding: 0 10px;
        }
      }

      .item-size {
        font-size: 20px;
      }

      .item-small-size {
        font-size: 16px;
      }

      .item-block {
        margin: 10px 0;
        text-align: center;
      }

      .item-block-left {
        margin: 10px 0;
        text-align: left;
      }

      .bold {
        font-weight: 700;
      }
    }

    .block-box {
      padding: 20px;

      .block-item {
        padding: 20px;
        background: #f8f8f9;
      }

      .box-title {
        position: relative;
        padding-left: 14px;
        font-weight: bold;

        &::before {
          position: absolute;
          left: 0;
          top: 2px;
          content: '';
          width: 4px;
          height: 16px;
          border-radius: 10px;
          background: var(--primary, #1890ff);
        }
      }

      .block-group {
        display: flex;
        margin-top: 30px;
        padding-left: 20px;
        align-items: center;
        font-size: 14px;

        .group-checkbox {
          width: 160px;

          &-1 {
            width: 86px;
            margin-right: 20px;

            .el-checkbox__label {
              color: #000;
            }
          }

          &-2 {
            .el-checkbox__label {
              color: #000;
            }
          }

          .el-checkbox__label {
            color: #000;
          }
        }

        .receipt-input {
          width: 315px;
          margin-right: 30px;

          &-1 {
            width: 119px;
          }
        }

        .block-select {
          display: flex;
          margin-right: 30px;
          height: 38px;
          line-height: 38px;
          font-size: 14px;

          &-name {
            line-height: 38px;
            width: 50px;
            text-align: center;
            border-radius: 4px 0 0 4px;
            color: #707070;
            background-color: #d7d7d7;
            border: 1px solid #ededed;
          }

          .select-box {
            width: 127px !important;
          }
        }
      }

      .tips {
        padding-left: 48px;
        line-height: 20px;
        margin-top: 10px;
        color: #999;
      }
    }
  }

  .el-item-radio {
    .el-radio__input {
      transform: scale(130%);
    }

    .el-radio__inner {
      background: #fff !important;
    }

    .el-radio__input.is-checked .el-radio__inner::after {
      transform: translate(-50%, -50%) scale(1.2) !important;
      background-color: #1890ff !important;
      width: 5px !important;
      height: 5px !important;
    }
  }

  .el-input__inner {
    height: 38px !important;
    line-height: 38px !important;
  }

  .el-input .el-input__count {
    font-size: 14px !important;
  }

  .el-checkbox__inner {
    height: 18px;
    width: 18px;

    &::after {
      box-sizing: content-box;
      content: '';
      border: 2px solid #fff;
      border-left: 0;
      border-top: 0;
      height: 8px;
      width: 4px;
      left: 5px;
      top: 1px;
      position: absolute;
      transform: rotate(45deg) scaleY(0);
      transition: transform 0.15s ease-in 0.05s;
      transform-origin: center;
    }
  }

  .footer {
    position: fixed; /* 使用fixed定位 */
    left: 0;
    bottom: 0;
    width: 100%;
    height: 58px;
    background: #fff;
    color: white;
    text-align: center;
    z-index: 1;

    display: flex;
    justify-content: center;
    padding: 10px 0;

    .btn {
      margin: 0 5px;
    }
  }
}
</style>