<template>
  <div class="hid">
    <!--   就这点破工资还想看注释？-->
    <div class="navBarTOP">
      <van-nav-bar class="navBar" left-arrow title="门店拜访" @click-left="onClickLeft" />
      <van-tabs class="myTab" type="card" v-model="tabVal" color="#0057ba">
        <van-tab title="A类指标" name="0"></van-tab>
        <van-tab title="B类指标" name="1"></van-tab>
      </van-tabs>
    </div>
    <!--        你不配-->
    <div class="lineGrey"></div>
    <div class="lineGrey"></div>
    <div class="lineGrey"></div>
    <div class="lineGrey"></div>
    <div class="lineGrey"></div>
    <div class="lineGrey"></div>
    <div class="lineGrey"></div>
    <div class="lineGrey"></div>
    <div style="height: 4px"></div>
    <div v-if="tabVal == 0 && type != 4" class="container linep">
      <van-collapse v-model="activeNames">
        <van-collapse-item v-if="type != 3 && type != 4" name="1" :title="saptitle">
          <van-row>
            <!--            <van-col span="24" v-if="GZdata"><p style="margin: 0;margin-bottom: 10px">昨日新增:<span class="colorbalck">{{ Micrometer(reportTargetAll.sapNewYesterday) }}</span></p></van-col>-->
            <van-col span="12"
              ><span v-if="!JZQuota" class="leftTitle">本月业绩</span
              ><span v-if="JZQuota" class="leftTitle">本月实际</span></van-col
            >
            <van-col span="12"
              ><span v-if="!JZQuota" class="rightTitle">本季业绩</span
              ><span v-if="JZQuota" class="rightTitle">本季实际</span></van-col
            >
            <van-col span="12">
              <p v-if="!JZQuota">
                本月实际:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.sapMonthAct)
                }}</span>
              </p>
              <p v-if="JZQuota">
                本月累计:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.sapMonthAct)
                }}</span>
              </p>
            </van-col>
            <van-col span="12">
              <p v-if="!JZQuota">
                本季实际:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.sapQuarterAct)
                }}</span>
              </p>
              <p v-if="JZQuota">
                本季累计:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.sapQuarterAct)
                }}</span>
              </p>
            </van-col>
            <van-col span="12"
              ><p>
                本月达成率:<span class="colorbalck"
                  >{{ reportTargetAll.sapMonthSuccessRate }}%</span
                >
              </p></van-col
            >
            <van-col span="12"
              ><p>
                本季达成率:<span class="colorbalck"
                  >{{ reportTargetAll.sapQuarterSuccessRate }}%</span
                >
              </p></van-col
            >
            <van-col span="12"
              ><p>
                本月成长率:<span class="colorbalck">{{ reportTargetAll.sapMonthGrowRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                本季成长率:<span class="colorbalck">{{ reportTargetAll.sapQuarterGrowRate }}%</span>
              </p></van-col
            >
            <van-col span="24" v-if="JZQuota"><span class="leftTitle">年度累计</span></van-col>
            <van-col span="24" v-if="JZQuota"
              ><p>
                年度累计:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.sapYearAct)
                }}</span>
              </p></van-col
            >
            <van-col span="24" v-if="JZQuota"
              ><p>
                年度达成率:<span class="colorbalck">{{ reportTargetAll.sapYearSuccessRate }}%</span>
              </p></van-col
            >
            <van-col span="24" v-if="JZQuota"
              ><p>
                年度成长率:<span class="colorbalck">{{ reportTargetAll.sapYearGrowRate }}%</span>
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
        <van-collapse-item v-if="GZdata" name="43" title="纯态之家SAP(千元)">
          <van-row style="margin-top: -10px">
            <van-col span="12"><span class="leftTitle">本月</span></van-col
            ><van-col span="12"><span class="rightTitle">本季</span></van-col>
            <van-col span="12"
              ><p>
                业绩实际:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.gzCtzjMonthAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                业绩实际:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.gzCtzjQuarterAct)
                }}</span>
              </p></van-col
            >
            <!--            <van-col span="12" ><p>业绩达成率:<span class="colorbalck">{{ Micrometer(reportTargetAll.gzCtzjMonthSuccessRate) }}%</span></p></van-col>-->
            <!--            <van-col span="12" ><p>业绩达成率:<span class="colorbalck">{{ Micrometer(reportTargetAll.gzCtzjQuarterSuccessRate) }}%</span></p></van-col>-->
            <van-col span="12"
              ><p>
                业绩成长率:<span class="colorbalck"
                  >{{ reportTargetAll.gzCtzjMonthGrowRate }}%</span
                >
              </p></van-col
            >
            <van-col span="12"
              ><p>
                业绩成长率:<span class="colorbalck"
                  >{{ reportTargetAll.gzCtzjQuarterGrowRate }}%</span
                >
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
        <van-collapse-item v-if="GZdata" name="42" title="商机关联的质感外墙业绩SAP(千元)">
          <van-row style="margin-top: -10px">
            <van-col span="12"><span class="leftTitle">本月</span></van-col
            ><van-col span="12"><span class="rightTitle">本季</span></van-col>
            <van-col span="12"
              ><p>
                业绩实际:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.gzZgwqMonthAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                业绩实际:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.gzZgwqQuarterAct)
                }}</span>
              </p></van-col
            >
            <!--            <van-col span="12" ><p>业绩达成率:<span class="colorbalck">{{ Micrometer(reportTargetAll.gzZgwqMonthSuccessRate) }}%</span></p></van-col>-->
            <!--            <van-col span="12" ><p>业绩达成率:<span class="colorbalck">{{ Micrometer(reportTargetAll.gzZgwqQuarterSuccessRate) }}%</span></p></van-col>-->
            <van-col span="12"
              ><p>
                业绩成长率:<span class="colorbalck"
                  >{{ reportTargetAll.gzZgwqMonthGrowRate }}%</span
                >
              </p></van-col
            >
            <van-col span="12"
              ><p>
                业绩成长率:<span class="colorbalck"
                  >{{ reportTargetAll.gzZgwqQuarterGrowRate }}%</span
                >
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
        <van-collapse-item v-if="GZdata" name="41" title="公装客户开发">
          <van-row>
            <!--            <van-col span="12"><span class="leftTitle">全年开户</span></van-col><van-col span="12"><span class="rightTitle">本月报备</span></van-col>-->
            <van-col span="12"
              ><p>
                全年实际:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.gzKhljYearAct)
                }}</span>
              </p></van-col
            >
            <!--            <van-col span="12" ><p>报备成功数:<span class="colorbalck">{{ Micrometer(reportTargetAll.gzBbMonthSuccessNum) }}</span></p></van-col>-->
            <!--            <van-col span="12"><p>&nbsp;</p></van-col>-->
            <van-col span="12"
              ><p>
                全年目标:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.gzKhljYearTarget)
                }}</span>
              </p></van-col
            >
            <van-col span="12"><p>&nbsp;</p></van-col>
            <van-col span="12"
              ><p>
                目标达成率:<span class="colorbalck"
                  >{{ Micrometer(reportTargetAll.gzKhljSuccessRate) }}%</span
                >
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
        <van-collapse-item v-if="GZdata" name="40" title="今日拜访">
          <van-row style="margin-top: -10px">
            <van-col span="12"
              ><p>
                公装客户数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.gzVisitCustomerNum)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                工地数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.gzVisitGdNum)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                潜在客户数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.gzVisitQzCustomerNum)
                }}</span>
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
        <van-collapse-item v-if="JZQuota" name="23" title="展厅上样">
          <van-row>
            <van-col span="24"
              ><p>
                当月新增店数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.exhibitionHallMonthAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                全年目标(达成率):<span class="colorbalck"
                  >{{ Micrometer(reportTargetAll.exhibitionHallYearAct) }}%</span
                >
              </p></van-col
            >
            <van-col span="12"
              ><p>
                全年达成进度率:<span class="colorbalck"
                  >{{ reportTargetAll.exhibitionHallYearRate }}%</span
                >
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
        <van-collapse-item
          v-if="powerGrade != 1 && !JZQuota && !GZdata"
          name="27"
          title="乳胶漆中高端(千元)">
          <van-row>
            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
            <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
            <van-col span="12"
              ><p>
                实际:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.rjqSapMonthAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                实际:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.rjqSapQuarterAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                达成率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthSuccessRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                达成率:<span class="colorbalck"
                  >{{ reportTargetAll.rjqSapQuarterSuccessRate }}%</span
                >
              </p></van-col
            >
            <van-col span="12"
              ><p>
                成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthGrowRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapQuarterGrowRate }}%</span>
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
        <van-collapse-item v-if="!JZQuota && !GZdata" name="11" title="专业时时丽SAP(千元)">
          <van-row>
            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
            <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
            <van-col span="12"
              ><p>
                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.czjMonthAct) }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.czjQuarterAct) }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                达成率:<span class="colorbalck">{{ reportTargetAll.czjMonthSuccessRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                达成率:<span class="colorbalck">{{ reportTargetAll.czjQuarterSuccessRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                成长率:<span class="colorbalck">{{ reportTargetAll.czjMonthGrowRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                成长率:<span class="colorbalck">{{ reportTargetAll.czjQuarterGrowRate }}%</span>
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
        <van-collapse-item
          v-if="powerGrade != 1 && !JZQuota && !GZdata"
          name="3"
          title="魔术漆SAP(千元)">
          <van-row>
            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
            <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
            <van-col span="12"
              ><p>
                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqMonthAct) }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqQuarterAct) }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                达成率:<span class="colorbalck">{{ reportTargetAll.ysqMonthSuccessRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                达成率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterSuccessRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                成长率:<span class="colorbalck">{{ reportTargetAll.ysqMonthGrowRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                成长率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterGrowRate }}%</span>
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
        <van-collapse-item
          v-if="powerGrade != 1 && !JZQuota && !GZdata"
          name="4"
          title="质感外墙SAP(千元)">
          <van-row>
            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
            <van-col span="12"
              ><p>
                实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.zgwqMonthAct) }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                实际:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.zgwqQuarterAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                达成率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthSuccessRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                达成率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterSuccessRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                成长率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthGrowRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                成长率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterGrowRate }}%</span>
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
        <van-collapse-item
          v-if="powerGrade != 1 && !JZQuota && !GZdata"
          name="28"
          title="防水+背胶SAP(千元)">
          <van-row>
            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
            <van-col span="12"
              ><p>
                实际:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.fsbjSapMonthAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                实际:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.fsbjSapQuarterAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                达成率:<span class="colorbalck"
                  >{{ reportTargetAll.fsbjSapMonthSuccessRate }}%</span
                >
              </p></van-col
            >
            <van-col span="12"
              ><p>
                达成率:<span class="colorbalck"
                  >{{ reportTargetAll.fsbjSapQuarterSuccessRate }}%</span
                >
              </p></van-col
            >
            <van-col span="12"
              ><p>
                成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapMonthGrowRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapQuarterGrowRate }}%</span>
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
        <van-collapse-item v-if="!JZQuota && !GZdata" name="29" title="瓷砖胶SAP(千元)">
          <van-row>
            <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
            ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
            <van-col span="12"
              ><p>
                实际:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.czjSapMonthAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                实际:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.czjSapQuarterAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                达成率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthSuccessRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                达成率:<span class="colorbalck"
                  >{{ reportTargetAll.czjSapQuarterSuccessRate }}%</span
                >
              </p></van-col
            >
            <van-col span="12"
              ><p>
                成长率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthGrowRate }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                成长率:<span class="colorbalck">{{ reportTargetAll.czjSapQuarterGrowRate }}%</span>
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
        <van-collapse-item v-if="JZQuota" name="22" title="基材粉料过账(千元)">
          <van-row>
            <van-col span="12"><span class="leftTitle">本月实际</span></van-col
            ><van-col span="12"><span class="rightTitle">本季实际</span></van-col>
            <van-col span="12"
              ><p>
                客户数:<span class="colorbalck">{{ reportTargetAll.jcPostCustomerMonth }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                客户数:<span class="colorbalck">{{ reportTargetAll.jcPostCustomerQuarter }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单数(包):<span class="colorbalck">{{ reportTargetAll.jcPostOrderNumMonth }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单数(包):<span class="colorbalck">{{
                  reportTargetAll.jcPostOrderNumQuarter
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单销售额:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.jcPostOrderPriceMonth)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单销售额:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.jcPostOrderPriceQuarter)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单率:<span class="colorbalck">{{ reportTargetAll.jcPostOrderRateMonth }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单率:<span class="colorbalck">{{ reportTargetAll.jcPostOrderRateQuarter }}%</span>
              </p></van-col
            >
            <van-col span="24"><span class="leftTitle">年度累计实际</span></van-col>
            <van-col span="24"
              ><p>
                客户数:<span class="colorbalck">{{ reportTargetAll.jcPostCustomerYear }}</span>
              </p></van-col
            >
            <van-col span="24"
              ><p>
                下单数(包):<span class="colorbalck">{{ reportTargetAll.jcPostOrderNumYear }}</span>
              </p></van-col
            >
            <van-col span="24"
              ><p>
                下单销售额:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.jcPostOrderPriceYear)
                }}</span>
              </p></van-col
            >
            <van-col span="24"
              ><p>
                下单率:<span class="colorbalck">{{ reportTargetAll.jcPostOrderRateYear }}%</span>
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
        <van-collapse-item v-if="JZQuota" name="21" title="魔术漆过账(千元)">
          <van-row>
            <van-col span="12"><span class="leftTitle">本月实际</span></van-col
            ><van-col span="12"><span class="rightTitle">本季实际</span></van-col>
            <van-col span="12"
              ><p>
                客户数:<span class="colorbalck">{{ reportTargetAll.msqPostCustomerMonth }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                客户数:<span class="colorbalck">{{ reportTargetAll.msqPostCustomerQuarter }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单销售额:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.msqPostOrderPriceMonth)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单销售额:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.msqPostOrderPriceQuarter)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单率:<span class="colorbalck">{{ reportTargetAll.msqPostOrderRateMonth }}%</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单率:<span class="colorbalck"
                  >{{ reportTargetAll.msqPostOrderRateQuarter }}%</span
                >
              </p></van-col
            >
            <van-col span="24"><span class="leftTitle">年度累计实际</span></van-col>
            <van-col span="24"
              ><p>
                客户数:<span class="colorbalck">{{ reportTargetAll.msqPostCustomerYear }}</span>
              </p></van-col
            >
            <van-col span="24"
              ><p>
                下单销售额:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.msqPostOrderPriceYear)
                }}</span>
              </p></van-col
            >
            <van-col span="24"
              ><p>
                下单率:<span class="colorbalck">{{ reportTargetAll.msqPostOrderRateYear }}%</span>
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
      </van-collapse>
    </div>
    <div v-if="tabVal == 1 && type != 4" class="container linep">
      <van-collapse v-model="activeNames">
        <van-collapse-item name="2" v-if="!JZQuota && !GZdata" title="建店布机">
          <van-row>
            <!--            <van-col v-if="powerGrade==1" span="24"><span class="leftTitle">昨日新增</span></van-col>-->
            <!--            <van-col v-if="powerGrade==1" span="24">-->
            <!--              <p>金牌店点数:<span class="colorbalck">{{ Micrometer(reportTargetAll.goldShopYesterdayAct) }}</span></p>-->
            <!--            </van-col>-->
            <!--            <van-col v-if="powerGrade==1" span="24">-->
            <!--              <p>金牌店布机:<span class="colorbalck">{{ Micrometer(reportTargetAll.goldShopBjYesterdayAct) }}</span></p>-->
            <!--            </van-col>-->
            <!--            <van-col v-if="powerGrade==1" span="24">-->
            <!--              <p>分销店点数:<span class="colorbalck">{{ Micrometer(reportTargetAll.allShopYesterdayAct) }}</span></p>-->
            <!--            </van-col>-->
            <van-col span="12"
              ><p><span class="leftTitle">今年实际</span></p></van-col
            >
            <van-col span="12"
              ><p><span class="rightTitle">今年目标(达成率)</span></p></van-col
            >
            <van-col span="12"
              ><p>
                金牌店点数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.goldShopYearAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12">
              <p>
                金牌店点数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.goldShopYearTarget)
                }}</span
                ><span class="colorbalck">({{ reportTargetAll.goldShopYearRate }}%)</span>
              </p>
            </van-col>
            <van-col span="12"
              ><p>
                金牌店布机:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.goldShopBjYearAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12">
              <p>
                金牌店布机:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.goldShopBjYearTarget)
                }}</span
                ><span class="colorbalck">({{ reportTargetAll.goldShopBjYearRate }}%)</span>
              </p>
            </van-col>
            <van-col span="12"
              ><p>
                分销店点数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.allShopYearAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12">
              <p>
                分销店点数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.allShopYearTarget)
                }}</span
                ><span class="colorbalck">({{ reportTargetAll.allShopYearRate }}%)</span>
              </p>
            </van-col>
            <van-col span="12"
              ><p>调色机上传数:{{ Micrometer(reportTargetAll.tsjUploadYearAct) }}</p></van-col
            >
            <van-col span="12">
              <p>
                调色机上传数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.tsjUploadYearTarget)
                }}</span
                ><span class="colorbalck">({{ reportTargetAll.tsjUploadYearRate }}%)</span>
              </p>
            </van-col>
            <van-col span="24" v-if="powerGrade == 1"
              ><p>涂料店点数:{{ Micrometer(reportTargetAll.tlShopYearAct) }}</p></van-col
            >
            <van-col span="12" v-if="powerGrade != 1"
              ><p>涂料店点数:{{ Micrometer(reportTargetAll.tlShopYearAct) }}</p></van-col
            >
            <van-col span="12" v-if="powerGrade != 1">
              <p>
                涂料店点数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.tlShopYearTarget)
                }}</span
                ><span class="colorbalck">({{ reportTargetAll.tlShopYearRate }}%)</span>
              </p>
            </van-col>
            <van-col span="24" v-if="powerGrade == 1">
              <p>厨卫店点数:{{ Micrometer(reportTargetAll.cwShopYearAct) }}</p></van-col
            >
            <van-col span="12" v-if="powerGrade != 1">
              <p>厨卫店点数:{{ Micrometer(reportTargetAll.cwShopYearAct) }}</p></van-col
            >
            <van-col span="12" v-if="powerGrade != 1">
              <p>
                厨卫店点数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.cwShopYearTarget)
                }}</span
                ><span class="colorbalck">({{ reportTargetAll.cwShopYearRate }}%)</span>
              </p>
            </van-col>
          </van-row>
        </van-collapse-item>
        <van-collapse-item name="16" v-if="!JZQuota && !GZdata" title="专业时时丽分销店下单">
          <van-row>
            <van-col span="12"><span class="leftTitle">昨日新增</span></van-col
            ><van-col span="12"><span class="rightTitle">本月实际</span></van-col>
            <van-col span="12"
              ><p>
                下单点数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.professionalSslYes)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单点数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.professionalSslMonth)
                }}</span>
              </p></van-col
            >
            <van-col span="12"><p></p></van-col>
            <van-col span="12"
              ><p>
                下单率 :<span class="colorbalck"
                  >{{ reportTargetAll.professionalSslOrderRateMonth }}%</span
                >
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单数量(桶):<span class="colorbalck">{{
                  Micrometer(reportTargetAll.professionalSslOrderNumYes)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单数量(桶):<span class="colorbalck">{{
                  Micrometer(reportTargetAll.professionalSslOrderNumMonth)
                }}</span>
              </p></van-col
            >
            <!--            <van-col span="24"><span class="leftTitle" style="margin-top: 10px">今年目标达成</span></van-col>-->
            <!--            <van-col span="24" ><p>目标点数:<span class="colorbalck">{{ Micrometer(reportTargetAll.professionalSslTargetYear) }}</span></p></van-col>-->
            <!--            <van-col span="24" ><p>达成率:<span class="colorbalck">{{ reportTargetAll.professionalSslSuccessRateYear }}%</span></p></van-col>-->
          </van-row>
        </van-collapse-item>
        <van-collapse-item name="17" v-if="!JZQuota && !GZdata" title="超好贴分销店下单">
          <van-row>
            <van-col span="12"><span class="leftTitle">昨日新增</span></van-col
            ><van-col span="12"><span class="rightTitle">本月实际</span></van-col>
            <van-col span="12"
              ><p>
                下单点数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.excellentPostYes)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单点数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.excellentPostMonth)
                }}</span>
              </p></van-col
            >
            <van-col span="12"><p></p></van-col>
            <van-col span="12"
              ><p>
                下单率 :<span class="colorbalck"
                  >{{ reportTargetAll.excellentPostOrderRateMonth }}%</span
                >
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单数量(包):<span class="colorbalck">{{
                  Micrometer(reportTargetAll.excellentPostOrderNumYes)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单数量(包):<span class="colorbalck">{{
                  Micrometer(reportTargetAll.excellentPostOrderNumMonth)
                }}</span>
              </p></van-col
            >
            <!--            <van-col span="24" v-if="powerGrade==1"><span class="leftTitle" style="margin-top: 10px">近三月实际</span></van-col>-->
            <!--            <van-col span="12" v-if="powerGrade!=1"><span class="leftTitle" style="margin-top: 10px">近三月实际</span></van-col>-->
            <!--            v-if="powerGrade!=1"-->
            <!--            <van-col span="24" ><span class="leftTitle" style="margin-top: 10px">今年目标达成</span></van-col>-->
            <!--            <van-col span="12"><p>下单点数:<span class="colorbalck">{{ reportTargetAll.excellentPostSeason }}</span></p></van-col>-->
            <!--            <van-col span="12" v-if="powerGrade==1"><p style="height:22px"></p></van-col> v-if="powerGrade!=1"-->
            <!--            <van-col span="24"><p>目标点数:<span class="colorbalck">{{ Micrometer(reportTargetAll.excellentPostTargetYear) }}</span></p></van-col>-->
            <!--            <van-col span="12"><p>下单率:<span class="colorbalck">{{ reportTargetAll.excellentPostOrderRateSeason }}%</span></p></van-col>-->
            <!--            <van-col span="12" v-if="powerGrade==1"><p style="height:22px"></p></van-col>v-if="powerGrade!=1"-->
            <!--            <van-col span="24" ><p>达成率:<span class="colorbalck">{{ reportTargetAll.excellentPostSuccessRateYear }}%</span></p></van-col>-->
            <!--            <van-col span="12"><p>下单数量(包):<span class="colorbalck">{{ reportTargetAll.excellentPostOrderNumSeason }}</span></p></van-col>-->
            <!--            <van-col span="12"><p style="height:22px"></p></van-col>-->
          </van-row>
        </van-collapse-item>
        <van-collapse-item v-if="powerGrade != 1 && !JZQuota && !GZdata" name="32" title="客户开拓">
          <van-row>
            <!--            <van-col span="12" v-if="powerGrade>=3"><span class="leftTitle">非片区经销商</span></van-col>-->
            <!--            v-if="powerGrade==2"-->
            <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
            <!--            <van-col span="12" v-if="powerGrade>=3"><span class="rightTitle" >TOP70直营家装</span></van-col>-->
            <van-col span="24"
              ><p>
                全年开发数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.customerAct)
                }}</span>
              </p></van-col
            >
            <!--            <van-col span="12" v-if="powerGrade>=3"><p>全年目标:<span class="colorbalck">{{reportTargetAll.directCustomerYearTarget}}</span></p></van-col>-->
            <!--            <van-col span="24"><p>实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.customerAct) }}</span></p></van-col>-->
            <!--            <van-col span="12" v-if="powerGrade>=3"><p>实际:<span class="colorbalck">{{reportTargetAll.directCustomerAct}}</span></p></van-col>-->
            <van-col span="24"
              ><p>
                全年进度率:<span class="colorbalck">{{ reportTargetAll.customerYearRate }}%</span>
              </p></van-col
            >
            <!--            <van-col span="12" v-if="powerGrade>=3"><p>全年进度率:<span class="colorbalck">{{reportTargetAll.directCustomerYearRate}}%</span></p></van-col>-->
          </van-row>
        </van-collapse-item>
        <van-collapse-item
          v-if="powerGrade == 1 && !JZQuota && !GZdata"
          name="33"
          title="分销店下单点数">
          <van-row>
            <van-col span="24"><span class="leftTitle">本月进度</span></van-col>
            <!--            <van-col span="12"><p>实际点数:<span class="colorbalck">{{ Micrometer(reportTargetAll.fxShopMonthAct) }}</span></p></van-col>-->
            <!--            <van-col span="12"><p>目标(达成率):<span class="colorbalck">{{ reportTargetAll.fxShopMonthTarget }}</span>(<span class="colorbalck">{{ reportTargetAll.fxShopMonthRate }}%</span>)</p></van-col>-->
            <van-col span="12"
              ><p>
                分销店下单点数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.fxOrderShopMonthAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                分销店下单率:<span class="colorbalck"
                  >{{ reportTargetAll.fxShopMonthOrderRate }}%</span
                >
              </p></van-col
            >
            <van-col span="12"
              ><p>
                金牌店下单点数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.jpOrderShopMonthAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                金牌店下单率 :<span class="colorbalck"
                  >{{ reportTargetAll.jpShopMonthOrderRate }}%</span
                >
              </p></van-col
            >
            <van-col span="12"
              ><p>
                厨卫店下单点数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.cwOrderShopMonthAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                厨卫店下单率:<span class="colorbalck"
                  >{{ reportTargetAll.cwShopMonthOrderRate }}%</span
                >
              </p></van-col
            >
            <van-col span="12"
              ><p>
                涂料店下单点数:<span class="colorbalck">{{
                  Micrometer(reportTargetAll.tlOrderShopMonthAct)
                }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                涂料店下单率:<span class="colorbalck"
                  >{{ reportTargetAll.tlShopMonthOrderRate }}%</span
                >
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
        <van-collapse-item v-if="(powerGrade == 1 || JZQuota) && !GZdata" name="7">
          <template #title>
            <!--            <div v-if="powerGrade==2&&!JZQuota&&!GZdata">当日门店拜访情况(实时)</div>-->
            <div v-if="powerGrade == 1 || JZQuota || GZdata">拜访数据(实时)</div>
          </template>
          <van-row>
            <van-col v-if="powerGrade == 1 || JZQuota || GZdata" span="12"
              ><span class="leftTitle">今日拜访</span></van-col
            >
            <van-col v-if="powerGrade == 1 || JZQuota || GZdata" span="12"
              ><span class="rightTitle">本月拜访</span></van-col
            >
            <van-col v-if="powerGrade == 1 || JZQuota || GZdata" span="12"
              ><p>
                线内拜访点数:<span class="colorbalck">{{ reportTargetAll.inVisitAct }}</span>
              </p></van-col
            >
            <van-col v-if="powerGrade == 1 || JZQuota || GZdata" span="12"
              ><p>
                线内拜访点数:<span class="colorbalck">{{ reportTargetAll.inVisitActMonth }}</span>
              </p></van-col
            >
            <van-col v-if="powerGrade == 1 || JZQuota || GZdata" span="12"
              ><p>
                计划拜访点数:<span class="colorbalck">{{ reportTargetAll.visitTarget }}</span>
              </p></van-col
            >
            <van-col v-if="powerGrade == 1 || JZQuota || GZdata" span="12"
              ><p>
                计划拜访点数:<span class="colorbalck">{{ reportTargetAll.coverStoreNum }}</span>
              </p></van-col
            >
            <van-col v-if="powerGrade == 1 || JZQuota || GZdata" span="12"
              ><p>
                线内拜访率:<span class="colorbalck">{{ reportTargetAll.inVisitRate }}%</span>
              </p></van-col
            >
            <van-col v-if="powerGrade == 1 || JZQuota || GZdata" span="12"
              ><p>
                线内拜访率:<span class="colorbalck">{{ reportTargetAll.inVisitMonthRate }}%</span>
              </p></van-col
            >
            <van-col v-if="powerGrade == 1 || JZQuota || GZdata" span="12"
              ><p>
                整体拜访数:<span class="colorbalck">{{ reportTargetAll.allVisitNum }}</span>
              </p></van-col
            >
            <van-col v-if="powerGrade == 1 || JZQuota || GZdata" span="12"
              ><p>
                整体拜访率:<span class="colorbalck">{{ reportTargetAll.allVisitMonthRate }}%</span>
              </p></van-col
            >
            <!--            <van-col v-if="powerGrade==2&&!JZQuota&&!GZdata" span="24"><p>未分配点数:<span-->
            <!--                class="colorbalck">{{ reportTargetAll.undistrNum }}</span></p></van-col>-->
            <!--            <van-col v-if="powerGrade==2&&!JZQuota&&!GZdata" span="24"><p>已覆盖未排线点数:<span-->
            <!--                class="colorbalck">{{ reportTargetAll.coverNotPlan }}</span></p></van-col>-->
            <!--            <van-col span="24" v-if="powerGrade==2"><p>未挂接销售门店数:<span class="colorbalck">{{reportTargetAll.customerYearTarget}}%</span></p></van-col>-->
            <!--            <van-col span="24" v-if="powerGrade==2"><p>已挂接销售,但不在拜访计划中的门店数量:<span class="colorbalck">{{reportTargetAll.customerYearTarget}}%</span></p></van-col>-->
          </van-row>
        </van-collapse-item>
        <van-collapse-item v-if="powerGrade == 2" name="8" title="当日门店拜访情况(实时)">
          <div v-if="reportTargetAll.realTimeVisits == null" style="margin-top: -10px">
            <p style="text-align: center; color: #666">暂无数据</p>
          </div>
          <div v-if="reportTargetAll.realTimeVisits != null" style="margin-top: -10px">
            <div class="container" style="width: 100%; margin: 0 auto; padding: 10px 0">
              <el-table
                :data="reportTargetAll.realTimeVisits"
                border
                class="table-headermd table-headermdhome"
                style="width: 100%"
                :span-method="objectSpanMethod">
                <el-table-column label="业务员" prop="userName">
                  <template slot-scope="scope">
                    <span class="tipTitle">{{ scope.row.userName }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="拜访次数" prop="visitAct" />
                <el-table-column :label="'金牌店\n拜访率'" prop="jpVisitRate">
                  <template slot-scope="scope">
                    <span class="tipTitle">{{ scope.row.jpVisitRate }}%</span>
                  </template>
                </el-table-column>
                <el-table-column :label="'同城店\n拜访率'" prop="tcVisitRate">
                  <template slot-scope="scope">
                    <span class="tipTitle">{{ scope.row.tcVisitRate }}%</span>
                  </template>
                </el-table-column>
              </el-table>
            </div>
            <!--            <div v-for="item in reportTargetAll.realTimeVisits" class="progressContentlist">-->
            <!--&lt;!&ndash;              <van-row class="f-color">&ndash;&gt;-->
            <!--&lt;!&ndash;                <van-col span="24">&ndash;&gt;-->
            <!--&lt;!&ndash;                  <p class="colorbalck" style="margin: 10px 0;color: #333;">{{ item.userName }}</p></van-col>&ndash;&gt;-->
            <!--&lt;!&ndash;                <van-col span="12" style="text-align: center">&ndash;&gt;-->
            <!--&lt;!&ndash;                  线内拜访率:{{ item.inVisitRate }}%&ndash;&gt;-->
            <!--&lt;!&ndash;                </van-col>&ndash;&gt;-->
            <!--&lt;!&ndash;                <van-col span="12" style="text-align: center">实际拜访数:{{ item.visitAct }}</van-col>&ndash;&gt;-->
            <!--&lt;!&ndash;              </van-row>&ndash;&gt;-->
            <!--            </div>-->
          </div>
        </van-collapse-item>
        <div v-if="todayGoal.monthNoVisit" style="margin: 0 10px">
          <van-collapse-item
            v-if="monthNoVisit.monthTotalNum > 0 && !JZQuota && !GZdata"
            class="storeTypeHome"
            name="20"
            title="本月未拜访提醒">
            <van-collapse v-model="activeNameType" class="storeTypeHomeList">
              <div v-for="(itemtype, index) in monthNoVisit">
                <van-collapse-item
                  v-if="itemtype.storeType"
                  :key="index"
                  :name="index + 40"
                  :title="itemtype.storeType.dictLabel"
                  :value="itemtype.storeList.length + '家'">
                  <div
                    v-for="(item, index) in itemtype.storeList"
                    :key="index"
                    class="monthNoVisit leftContent">
                    <p style="margin: 0; margin-bottom: 10px; color: #222">{{ item.storeName }}</p>
                    <p style="margin: 0"><van-icon name="location-o" />{{ item.addressLine }}</p>
                    <span
                      style="
                        position: absolute;
                        right: 0;
                        bottom: 14px;
                        width: 82px;
                        font-size: 12px;
                        color: #0057ba;
                        padding: 0 4px;
                        line-height: 14px;
                      "
                      @click="storeJoinVisit(item)"
                      >加入计划内<van-icon name="arrow"
                    /></span>
                    <div
                      v-if="item.visitId == null"
                      class="monthNoVisitStatstext"
                      style="background-color: #ed5c68">
                      未拜访
                    </div>
                    <div
                      v-if="item.visitId != null"
                      class="monthNoVisitStatstext"
                      style="background-color: #ebf4ff">
                      <van-icon :name="timeimg" color="#ee0a24" size="14" style="top: 2px" />
                    </div>
                  </div>
                </van-collapse-item>
              </div>
            </van-collapse>
          </van-collapse-item>
        </div>
      </van-collapse>
    </div>
    <!-- 经销商负责人 查看下属 -->
    <div v-if="tabVal == 1 && type == 4" class="container linep">
      <van-collapse v-model="activeNames" v-if="reportInfoData.customerUserTargets">
        <van-collapse-item
          :name="index + ''"
          :title="item.nickName"
          v-for="(item, index) in reportInfoData.customerUserTargets"
          :key="index">
          <van-row>
            <van-col span="24"
              ><p class="indexTile" style="margin-top: -2px">
                <van-icon :name="bfindex" class="indexicon"></van-icon>拜访
              </p></van-col
            >
            <van-col span="12"
              ><p><span class="leftTitle">本日实际</span></p></van-col
            >
            <van-col span="12"
              ><p><span class="rightTitle">本月实际</span></p></van-col
            >
            <van-col span="12"
              ><p>
                拜访点数:<span class="colorbalck">{{ Micrometer(item.dayVisitCount) }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                拜访点数:<span class="colorbalck">{{ Micrometer(item.monthVisitCount) }}</span>
              </p></van-col
            >
            <van-col span="24"
              ><p class="indexTile">
                <van-icon :name="storeindex" class="indexicon"></van-icon>建店
              </p></van-col
            >
            <van-col span="12"
              ><p><span class="leftTitle">本日新增</span></p></van-col
            >
            <van-col span="12"
              ><p><span class="rightTitle">本月实际</span></p></van-col
            >
            <van-col span="12"
              ><p>
                分销店点数:<span class="colorbalck">{{ Micrometer(item.dayFxdAct) }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                分销店点数:<span class="colorbalck">{{ Micrometer(item.monthFxdAct) }}</span>
              </p></van-col
            >
            <van-col span="24"
              ><p class="indexTile">
                <van-icon :name="oderindex" class="indexicon"></van-icon>下单
              </p></van-col
            >
            <van-col span="12"
              ><p><span class="leftTitle">昨日新增</span></p></van-col
            >
            <van-col span="12"
              ><p><span class="rightTitle">本月实际</span></p></van-col
            >
            <van-col span="12"
              ><p>
                下单点数:<span class="colorbalck">{{ Micrometer(item.yesOrderAct) }}</span>
              </p></van-col
            >
            <van-col span="12"
              ><p>
                下单点数:<span class="colorbalck">{{ Micrometer(item.monthOrderAct) }}</span>
              </p></van-col
            >
          </van-row>
        </van-collapse-item>
      </van-collapse>
    </div>
    <div style="color: #999; font-size: 12px; margin: 0 10px">
      <!--      昨日新增的数据统一在上午9点更新.-->
      <span v-if="reportInfoData.newUser"
        ><van-icon name="info-o" />&nbsp;新人入职后5个工作日不用提交日报.</span
      >
    </div>
    <div class="lineGrey"></div>
    <div v-if="approvalButton && !GZdata" class="contentborder">
      <van-cell class="homeTitle" title="汇报审批" to="/dailyApprovalList">
        <template #title>
          <span class="custom-title">汇报审批&nbsp;&nbsp;</span>
          <van-tag v-if="approvalPendingNum > 0" type="danger">{{ approvalPendingNum }}</van-tag>
        </template>
        <template #right-icon>
          <van-icon class="homeCellIcon" name="arrow" size="16" />
        </template>
      </van-cell>
      <div class="lineGrey"></div>
    </div>
    <!-- <div  class="contentborder"  v-if="todayGoal.storeAddressCheckNum>0">
      <van-cell class="homeTitle" title="待规范门店地址" to="/storeAddress">
        <template #title><span class="custom-title">待规范门店地址</span>&nbsp<van-tag type="danger">{{ todayGoal.storeAddressCheckNum }}</van-tag></template>
        <template #right-icon><van-icon class="homeCellIcon" name="arrow" size="16"/></template>
      </van-cell>
      <div class="lineGrey"></div>
    </div> -->
    <div class="contentborder">
      <van-cell class="homeTitle" title="流程审批" to="/signApprovalList">
        <template #title
          ><span class="custom-title">流程审批</span>&nbsp<van-tag
            v-if="proccessPendingNum > 0"
            type="danger"
            >{{ proccessPendingNum }}</van-tag
          ></template
        >
        <template #right-icon><van-icon class="homeCellIcon" name="arrow" size="16" /></template>
      </van-cell>
      <div class="lineGrey"></div>
    </div>
    <div class="contentborder">
      <van-button
        v-if="powerGrade == 3 && showButton"
        class="Btn1"
        plain
        size="small"
        type="info"
        @click="doubleWeeklyLink"
        >填写半月报</van-button
      >
      <van-button
        v-if="powerGrade == 2 && showButton"
        class="Btn1"
        plain
        size="small"
        type="info"
        @click="weeklyLink"
        >填写周报</van-button
      >
      <van-button
        v-if="powerGrade == 1 && showButton"
        class="Btn1"
        plain
        size="small"
        type="info"
        @click="dailyLink"
        >填写日报</van-button
      >
      <van-button
        v-if="powerGrade < 4 && isCommit"
        class="Btn1"
        plain
        size="small"
        type="info"
        @click="dailyLinks"
        >查看我的历史汇报</van-button
      >
    </div>
    <p class="updataTime" v-if="type != 4">更新时间:{{ updataTime }}</p>
    <a
      class="feedback"
      href="https://qiweitest.nipponpaint.com.cn/weixin/ecoRules/redirect/1064/0"
      target="_blank"
      ><img src="./../../assets/feedback.png"
    /></a>
    <br /><br /><br /><br />
    <van-dialog v-model="shows" @confirm="titleconfirm">
      <div class="tipTitleBox" style="padding: 10px">
        <p class="p">系统提示</p>
        <p>各位好，因五一假期，汇报提交时间有调整。</p>
        <div style="font-size: 14px">
          <p style="margin-bottom: 6px; line-height: 20px">1、5月1-3日，销售员无需提交日报。</p>
          <p style="margin-bottom: 6px; line-height: 20px">
            2、销售部主管周报提交时间改为4月27日-30日。
          </p>
          <p>3、大区主管半月报提交时间改为5月4日-7日。</p>
        </div>
        <br />
        <p style="text-align: right">祝大家假期愉快！</p>
      </div>
    </van-dialog>
    <br />
    <br />
    <br />
    <br />
    <tab-bar></tab-bar>
  </div>
</template>

<script>
import history from '@/assets/Icon/history.png';
import tabBar from '@/components/tabBar';
import times from '@/assets/Icon/times.png';
import {
  userTodayPlanNum,
  loginLog,
  homeImge,
  getReportInfo,
  checkVisit,
  addVisitsPosition,
  mobileReposition,
  applyNumber,
  joinInPlan,
} from '@/api/index';
import axios from 'axios';
export default {
  name: 'home',
  components: { tabBar },
  data() {
    return {
      shows: true,
      show: true,
      num: 0,
      timeimg: times,
      todayGoal: {},
      progressWidth: 0,
      updataTime: '',
      customerClueButton: false,
      saptitle: '业绩目标SAP(千元)',
      history: history,
      activeNames: [
        '1',
        '2',
        '3',
        '4',
        '5',
        '6',
        '7',
        '8',
        '10',
        '11',
        '12',
        '16',
        '17',
        '20',
        '21',
        '22',
        '23',
        '24',
        '25',
        '26',
        '27',
        '28',
        '29',
        '30',
        '31',
        '32',
        '33',
        '34',
        '35',
        '36',
        '37',
        '38',
        '39',
        '40',
        '41',
        '42',
        '43',
      ],
      activeNameType: [],
      powerGradeShow: false,
      showButton: false,
      isCommit: null,
      powerGrade: '2',
      deptLevel: '',
      // positionId：等级（1-销售员 2-销售部主管 3-大区主管 4-区域公司总经理 5-DIY公司）
      reportTargetAll: {},
      approvalPendingNum: 0,
      isDiy: false,
      approvalButton: false,
      times: 5,
      timer: null,
      type: '-1',
      monthNoVisit: {},
      flag: true,
      reportInfoData: {},
      applyNumber: '',
      proccessPendingNum: 0,
      JZQuota: false,
      GZdata: false,
      tabVal: 0,
    };
  },
  created() {
    this.num = 0;
    this.loginLogFn();
    this.getReportInfo();
    this.timeFn();
    this.userTodayPlanNum();
    if (
      localStorage.getItem('shows') == 'false' ||
      new Date('2023/05/04 23:59:59').getTime() < new Date().getTime()
    ) {
      this.shows = false;
    } else {
      this.shows = true;
    }
  },
  watch: {
    $route(to, from) {
      if (to.path == '/home') {
        this.num = 0;
        this.userTodayPlanNum();
        this.loginLogFn();
        this.getReportInfo();
      }
    },
  },
  methods: {
    storeJoinVisit(val) {
      joinInPlan({ storeId: val.storeId }).then((res) => {
        if (res.code == 200) {
          this.$toast.success('加入成功');
        } else {
          this.$toast(res.msg);
        }
      });
    },
    applyNumberFn() {
      applyNumber().then((res) => {
        this.applyNumber = res.data;
      });
    },
    titleconfirm() {
      this.shows = false;
      localStorage.setItem('shows', false);
    },
    timeFn() {
      var t = 5;
      var that = this;
      that.timer = setInterval(function () {
        that.times = t;
        t--;
        if (t < 0) {
          clearInterval(that.timer);
          that.show = false;
        }
      }, 1000);
    },
    dailyLinks() {
      this.$router.push('/myHistoricalDaily');
    },
    getReportInfo() {
      let loading1 = this.$toast.loading({
        duration: 0,
        message: '加载中...',
        forbidClick: true,
      });
      getReportInfo({ isContent: false }).then((res) => {
        if (res.code == 200) {
          if (res.data.postType == 'GZ') {
            this.GZdata = true;
            this.saptitle = '公裝业绩SAP(千元)';
          } else {
            this.saptitle = '业绩目标SAP(千元)';
            this.GZdata = false;
          }
          loading1.clear();
          localStorage.setItem('powerGrade', res.data.positionId);
          localStorage.setItem('isDiy', res.data.diy);
          localStorage.setItem('uType', res.data.userType);
          localStorage.setItem('jzType', res.data.jzType);
          localStorage.setItem('customerVisits', res.data.customerManagerVisits);
          this.isDiy = res.data.diy;
          this.proccessPendingNum = res.data.proccessPendingNum;
          this.reportInfoData = res.data;
          this.approvalButton = res.data.approvalButton;
          this.powerGrade = res.data.positionId;
          this.showButton = res.data.showButton;
          this.deptLevel = res.data.deptLevel;
          if (res.data.postType == 'JZ') {
            this.JZQuota = true;
          } else {
            this.JZQuota = false;
          }
          localStorage.setItem('postType', res.data.postType);
          if (res.data.reportTargetAll != null) {
            this.reportTargetAll = res.data.reportTargetAll;
            this.updataTime = res.data.reportTargetAll.updateTime;
          }
          this.approvalPendingNum = res.data.approvalPendingNum;
          this.type = res.data.userType;
          if (res.data.userType == 4) {
            this.tabVal = '1';
          }
        } else {
          this.$toast(res.msg);
        }
      });
    },
    dailyLink() {
      this.$router.push('/daily');
    },
    weeklyLink() {
      this.$router.push('/weekly');
    },
    doubleWeeklyLink() {
      this.$router.push('/doubleWeekly');
    },
    login() {
      if (this.num > 4) {
        this.$router.push('/login');
      } else {
        this.num = this.num + 1;
      }
    },
    userTodayPlanNum() {
      localStorage.setItem('outvstoreName', '');
      localStorage.setItem('outvchainName', '');
      localStorage.removeItem('outvstoreLabelTypes');
      localStorage.removeItem('outvstoreCategoryList');
      localStorage.setItem('outvchainCode', '');
      localStorage.setItem('outvstoreName', '');
      localStorage.setItem('deviveStoreName', '');
      localStorage.setItem('outvsortType', '');
      localStorage.setItem('outsortParam', '');
      localStorage.setItem('lat', '');
      localStorage.setItem('lon', '');
      userTodayPlanNum().then((res) => {
        if (res.code == 200) {
          this.todayGoal = res.data;
          this.progressWidth = (this.todayGoal.finishNum / this.todayGoal.planNum) * 100 + '%';
          localStorage.setItem('nickName', res.data.user.nickName);
          localStorage.setItem('postName', res.data.user.postName);
          localStorage.setItem('zipPhoto', res.data.zipPhoto);
          localStorage.setItem('storeType', res.data.user.type);
          localStorage.setItem('deptLevel', res.data.user.depts[0].deptLevel);
          localStorage.setItem('userId', res.data.user.userId);
          this.monthNoVisit = res.data.monthNoVisit;
        } else {
          this.$toast(res.msg);
        }
      });
    },
    loginLogFn() {
      var appVersion = navigator.appVersion;
      var Logapp = appVersion.split('(')[1].split(';');
      var arrLog = '';
      if (Logapp[0] == 'Linux') {
        arrLog = {
          browser: navigator.appCodeName,
          os: Logapp[1],
          phoneBrand: Logapp[2].split('/')[1],
          phoneModel: Logapp[2].split('/')[0],
        };
      } else {
        arrLog = {
          browser: navigator.appCodeName,
          os: Logapp[0],
          phoneBrand: '',
          phoneModel: '',
        };
      }
      loginLog(arrLog);
    },
    onClickLeft() {
      this.$router.go(-1);
      // window.location.href = process.env.VUE_APP_SSB_LINK + "/homeIndex"
    },
  },
};
</script>
<style scoped>
.homeTitle {
  padding: 6px 16px;
}

.homeTitle .van-icon__image {
  width: 1.4em;
  height: auto;
}

.container {
  margin: 10px;
}

.container .van-collapse-item {
  margin-bottom: 10px;
  border-radius: 6px;
  overflow: hidden;
}

.progressContentlist {
  font-size: 14px;
  border-bottom: 1px dashed #f1f1f1;
  padding: 10px 0;
}

.linep p {
  margin: 10px 0 0 0;
  font-size: 14px;
  color: #666;
}

.leftTitle {
  background-color: #74a4d9;
  color: #fff;
  display: inline-block;
  padding: 0 4px;
  border-radius: 2px;
}

.rightTitle {
  background-color: #e7b4bb;
  color: #fff;
  display: inline-block;
  padding: 0 4px;
  border-radius: 2px;
}
</style>
<style>
.myTab .van-tabs__nav--card {
  margin: 0 !important;
  border-left: 0;
  border-right: 0;
}
.myTab .van-tabs__wrap,
.van-tabs__nav--card {
  height: 39px;
}
.myTab .van-tab {
  line-height: 40px;
}
.linep .van-collapse-item__content {
  color: #666;
}
.linep .van-collapse-item__content {
  color: #666;
}

.linep .van-cell__title {
  color: #1e5398;
  font-weight: 500;
  font-size: 16px;
}

.homeCellIcon {
  line-height: 34px;
}

.homeTitle .van-cell__title {
  color: #444;
  font-size: 16px;
  font-weight: bold;
  padding-left: 4px;
  line-height: 36px;
  height: 36px;
}

.updataTime {
  color: #999;
  font-size: 12px;
  text-align: center;
}

.homeTitle .van-tag--danger {
  border-radius: 20px;
}

.van-dialog__confirm,
.van-dialog__confirm:active {
  color: #0057ba;
}

.tipTitleBox p {
  margin: 0;
  line-height: 28px;
  color: #555;
}

.tipTitleBox .p {
  color: #555;
  font-size: 16px;
  border-bottom: 1px solid #f5f5f5;
  margin: 0;
  margin-bottom: 10px;
  text-align: center;
  padding: 14px 0px;
}

.storeTypeHome .van-collapse-item__content {
  padding: 0;
}

.storeTypeHome .storeTypeHomeList .van-cell__title {
  color: #4a4a4a;
  font-size: 14px;
}

.storeTypeHome .monthNoVisit {
  padding: 10px;
  margin: 10px;
  border-radius: 5px;
  background-color: #ebf4ff;
}

.storeTypeHome .leftContent {
  padding-right: 68px;
  position: relative;
}

.storeTypeHome .monthNoVisitStatstext {
  font-size: 12px;
  background-color: #0057ba;
  position: absolute;
  right: 0;
  top: 6px;
  padding: 2px 6px 2px 12px;
  border-bottom-left-radius: 60px;
  border-top-left-radius: 60px;
  color: #fff;
}
.feedback {
  position: fixed;
  bottom: 90px;
  right: 5px;
  width: 60px;
}
.feedback img {
  width: 100%;
}
.table-headermd {
  font-size: 12px;
  text-align: center;
  position: initial;
  width: 98% !important;
  margin: 0 auto;
  border-right: 0;
}
.table-headermdhome {
  font-size: 14px;
}
.table-headermdhome th.el-table__cell > .cell {
  white-space: pre;
}
.table-headermd .el-table__header,
.table-headermd .el-table__body {
  width: 100% !important;
}
.table-headermdhome.van-cell {
  padding: 0 6px;
  height: 100%;
}

.table-headermd th.el-table__cell > .cell {
  padding: 0 4px;
  text-align: center;
}

.table-headermdhometh.el-table__cell:first-child > .cell {
  text-align: left;
}

.table-headermd th.el-table__cell {
  background-color: #1989fa;
  color: #fff;
}
.table-headermdhome th.el-table__cell {
  background-color: #fff;
  color: #444;
}
.table-headermd .el-table__cell {
  padding: 4px 0;
}

.table-headermdhome.el-table .cell {
  padding: 0 4px;
  text-align: center;
}

.table-headermdhome .tipTitle {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-align: center;
}

.table-headermd::before {
  height: 0;
}

.table-headermd .cell,
.el-table--border .el-table__cell:first-child .cell {
  padding: 0 4px;
}
</style>
