<template>
  <div>
    <div class="sty">
      <el-page-header @back="goBack" content="详情页面"> </el-page-header>
    </div>
    <el-form :model="infoList" label-width="130px" size="small" label-position="right">
      <el-card class="">
        <div slot="header" class="clearfix">
          <strong>客户</strong>
        </div>
        <div>
          <!-- <el-form label-width="130px" size="small" label-position="right"> -->
          <el-row :gutter="20">
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="创建组织" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="客户编码" prop="">
                <el-input v-model="infoList.number"></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="使用组织" prop="">
                <el-input v-model="infoList.useOrgName"></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="简称" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <!-- </el-form> -->
        </div>
      </el-card>
      <br />
      <el-card class="">
        <div slot="header" class="clearfix">
          <strong>基本信息</strong>
        </div>
        <span>地址</span>
        <el-divider></el-divider>
        <div>
          <!-- <el-form label-width="130px" size="small" label-position="right"> -->
          <el-row :gutter="20">
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="国家" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="地区" prop="">
                <el-input v-model="infoList.region"></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="省份" prop="">
                <el-input v-model="infoList.province"></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="城市" prop="">
                <el-input v-model="infoList.city"></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="通信地址" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="邮政编码" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="公司网址" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="商城订单对应组织" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="联系邮箱" prop="">
                <el-input v-model="infoList.email"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <!-- </el-form> -->
        </div>
        <span>管理</span>
        <el-divider></el-divider>
        <div>
          <!-- <el-form label-width="130px" size="small" label-position="right"> -->
          <el-row :gutter="20">
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="联系电话" prop="">
                <el-input v-model="infoList.mobile"></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="传真" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="公司类别" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="公司性质" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="公司规模" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <!-- </el-form> -->
        </div>
        <span>相关</span>
        <el-divider></el-divider>
        <div>
          <!-- <el-form label-width="130px" size="small" label-position="right"> -->
          <el-row :gutter="20">
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="对应供应商" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="对应集团客户" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="客户类别" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="客户分组" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="集团客户" prop="">
                <el-checkbox></el-checkbox>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="默认付款方" prop="">
                <el-checkbox></el-checkbox>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="不校验可发量" prop="">
                <el-checkbox></el-checkbox>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="对应组织" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="备注" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <!-- </el-form> -->
        </div>
        <span>开票信息</span>
        <el-divider></el-divider>
        <div>
          <!-- <el-form label-width="130px" size="small" label-position="right"> -->
          <el-row :gutter="20">
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="发票抬头" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="纳税登记号" prop="">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="开户银行" prop="">
                <el-input v-model="infoList.bank"></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="银行账号" prop="">
                <el-input v-model="infoList.bankAccount"></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="开票联系电话" prop="">
                <el-input v-model="infoList.invoicePhone"></el-input>
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="开票通讯地址" prop="">
                <el-input v-model="infoList.invoiceAddress"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <!-- </el-form> -->
        </div>
        <span>智慧订货</span>
        <el-divider></el-divider>
        <div>
          <!-- <el-form label-width="130px" size="small" label-position="right"> -->
          <el-row :gutter="20">
            <el-col :xs="24" :sm="12" :lg="6">
              <el-form-item label="允许对接智慧订单" prop="">
                <el-checkbox></el-checkbox>
              </el-form-item>
            </el-col>
          </el-row>
          <!-- </el-form> -->
        </div>
      </el-card>
    </el-form>
    <br />
    <el-card>
      <div slot="header" class="clearfix">
        <strong>信用额度</strong>
      </div>
      <div class="diy-table-1">
        <el-row :gutter="0" class="xyed">
          <div v-for="(v, i) in infoList.customerWallets" :key="i" v-show="v.type == 'COMMONLY'">
            <el-col :span="12" class="item">
              <div class="label">信用额度</div>
              <div class="value">{{ v.freeCreditAmount }}</div>
            </el-col>
            <el-col :span="12" class="item">
              <div class="label">钱包类型</div>
              <div class="value">{{ v.customerWalletName }}-{{ v.type == 'COMMONLY' ? '普通钱包' : '返利钱包' }}</div>
            </el-col>
          </div>
        </el-row>
      </div>
    </el-card>
    <br />
    <el-card>
      <div slot="header" class="clearfix">
        <strong>标签信息</strong>
      </div>
      <div class="diy-table-1">
        <el-form label-width="120px" class="demo-ruleForm">
          <el-form-item label="集团客户" prop="">
            <el-radio v-model="infoList.isGroupCompany" :label="true">是</el-radio>
            <el-radio v-model="infoList.isGroupCompany" :label="false">否</el-radio>
          </el-form-item>
          <el-form-item label="分子公司" prop="">
            <el-tag class="tagStyle" v-for="v in infoList.kingDeeCustomers" :key="v.id">{{ v.name }}</el-tag>
          </el-form-item>
          <el-form-item label="是否可转折让" prop="">
            <el-radio v-model="infoList.isZr" :label="true">是</el-radio>
            <el-radio v-model="infoList.isZr" :label="false">否</el-radio>
          </el-form-item>
        </el-form>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  props: {
    infoList: {
      type: Object,
      required: true
    }
  },
  data() {
    return {}
  },
  created() {},
  methods: {
    goBack() {
      this.$parent.isShow = true
    }
  }
}
</script>

<style lang="scss" scoped>
.sty {
  margin-bottom: 20px;
}
::v-deep .diy-table-1 {
  width: 50%;
  .xyed {
    border-top: 1px solid #ebeef5;
    .item {
      margin-bottom: 18px;
    }
  }
}
.tagStyle {
  margin: 0 18px;
}
</style>
