<template>
  <div class="GzStore" v-if="detail">
    <van-field readonly v-model="detail.terminalCustomer" label="是否终端客户" />
    <van-field
      v-if="detail.terminalCustomer == '否'"
      readonly
      v-model="detail.doubleCustomer"
      label="是否双包客户" />
    <van-field
      v-if="detail.doubleCustomer == '是' && detail.terminalCustomer == '否'"
      readonly
      autosize
      type="textarea"
      v-model="detail.customerType"
      label="客户类型" />
    <van-field
      v-if="detail.terminalCustomer == '否'"
      readonly
      autosize
      type="textarea"
      v-model="detail.channelType"
      label="渠道类型" />
  </div>
</template>
<script>
import { getGzVisitLabel } from '@/api/storeManagement';
export default {
  props: {
    storeCode: {
      type: [String, Number],
    },
  },
  data() {
    return {
      detail: null,
    };
  },
  created() {
    this.detail = null;
    this.getDetaild();
  },
  activated() {
    this.detail = null;
    this.getDetaild();
  },
  methods: {
    getDetaild() {
      getGzVisitLabel({ storeCode: this.storeCode }).then((res) => {
        this.detail = res.data;
      });
    },
  },
};
</script>
<style scoped lang="scss">
.GzStore {
  // padding: 0 16px;
  background: #fff;
  .van-cell {
    // padding: 10px 0;
    // border-bottom: 1px solid #ccc;
  }
  .van-field__label {
    width: 9em;
  }
}
</style>
