<!--
 * @Descripttion:
 * @version:
 * @Author: kBank
 * @Date: 2023-04-06 10:25:19
-->
<template>
  <div class="page">
    <div class="topbox">
      <div class="levelList_i"
           :class="tabActive == item.id ? 'act' : ''"
           v-for="(item, index) in topList"
           :key="index"
           @click.prevent="handleLink(item.id)">
        {{ item.name }}
      </div>
    </div>
    <div class="main">
      <div class="contain">
        <div class="tit">{{'支付配置'}}</div>
        <div class="xian"></div>
        <div class="pod">

<!--          <el-checkbox v-model="formData.pay4"-->
<!--                       border>京东银行卡</el-checkbox>-->
          <el-checkbox v-model="formData.pay5"
                       border>京东收银台（H5）</el-checkbox>
          <el-checkbox v-model="formData.pay6"
                       border>京东收银台（PC）</el-checkbox>
<!--          <el-checkbox v-model="formData.pay11"-->
<!--                       border>宝付微信</el-checkbox>-->
<!--          <el-checkbox v-model="formData.pay12"-->
<!--                       border>宝付微信扫码</el-checkbox>-->
<!--          <el-checkbox v-model="formData.pay13"-->
<!--                       border>汇付微信</el-checkbox>-->
<!--          <el-checkbox v-model="formData.pay15"-->
<!--                       border>汇付银行卡</el-checkbox>-->
<!--          <el-checkbox v-model="formData.pay20"-->
<!--                       border>微信APP</el-checkbox>-->
          <el-checkbox v-model="formData.pay32"
                       border>通联微信</el-checkbox>
          <el-checkbox v-model="formData.pay33"
                       border>通联银行卡</el-checkbox>
<!--          <el-checkbox v-model="formData.pay71"-->
<!--                       border>快钱APP微信</el-checkbox>-->
<!--          <el-checkbox v-model="formData.pay72"-->
<!--                       border>快钱APP支付宝</el-checkbox>-->
<!--          <el-checkbox v-model="formData.pay73"-->
<!--                       border>快钱微信扫码</el-checkbox>-->
<!--          <el-checkbox v-model="formData.pay74"-->
<!--                       border>快钱支付宝扫码</el-checkbox>-->
          <el-checkbox v-model="formData.pay81"
                       border>新汇付PC微信扫码</el-checkbox>
          <el-checkbox v-model="formData.pay82"
                       border>新汇付PC支付宝扫码</el-checkbox>

        </div>
      </div>
      <div class="footer">
        <el-button size="small"
                   class="thebtn2"> {{ '取消' }}</el-button>
        <el-button size="small"
                   @click="submit()"
                   class="thebtn1" style="background-color: #c8161d"> {{ '确认' }}</el-button>
      </div>
    </div>
  </div>
</template>
<script>
import * as api from '@/api/financialCase.js'

export default {
  name: 'jcsz',
  data() {
    return {
      tabActive: 0,
      formData: {
        // pay4: false,
        pay5: false,
        pay6: false,
        // pay11: false,
        // pay12: false,
        // pay13: false,
        // pay15: false,
        pay20: false,
        pay32: false,
        pay33: false,
        // pay71: false,
        // pay72: false,
        // pay73: false,
        // pay74: false,
        pay81: false,
        pay82: false
      },
      topList: [
        {
          name: '支付配置',
          id: 0,
        },
      ],
      checkboxGroup: [],
    }
  },
  mounted() {
    this.getConfig()
  },
  methods: {
    getConfig() {
      this.checkboxGroup = []
      api.onlineConfig().then((res) => {
        this.formData = {
          // pay4: res.data.pay4,
          pay5: res.data.pay5,
          pay6: res.data.pay6,
          // pay11: res.data.pay11,
          // pay12: res.data.pay12,
          // pay13: res.data.pay13,
          // pay15: res.data.pay15,
          pay20: res.data.pay20,
          pay32: res.data.pay32,
          pay33: res.data.pay33,
          // pay71: res.data.pay71,
          // pay72: res.data.pay72,
          // pay73: res.data.pay73,
          // pay74: res.data.pay74,
          pay81: res.data.pay81,
          pay82: res.data.pay82
        }
      })
    },

    // 切换tab
    handleLink(id) {
      this.tabActive = id
    },
    submit() {
      api.onlineSaveConfig(this.formData).then((res) => {
        if (res.code == 200) {
          this.$message({
            message: res.msg,
            type: 'success',
          })
        }
      })
    },
  },
}
</script>
<style scoped lang="scss">
::v-deep .el-select {
  width: 100%;
}
.uploadIcon ::v-deep .el-upload--picture-card {
  display: none !important; /* 上传按钮隐藏 */
}
.el-col-20 {
  width: 20%;
}
.el-col-60 {
  width: 60%;
}
.el-col-40 {
  width: 40%;
}
.page {
  padding-top: 20px;
  background: #f8f8f8;
}
.topbox {
  align-items: center;
  padding: 0px 0 15px 0;
  display: flex;
  //   background: skyblue;
  .levelList_i {
    margin-left: 20px;
    position: relative;
    cursor: pointer;
    padding: 0 5px;
    width: 88px;
    height: 34px;
    border-radius: 17px;
    border: 1px solid #cccccc;
    font-size: 14px;
    font-family: MicrosoftYaHei;
    text-align: center;
    line-height: 34px;
  }
  .act {
    color: #ffffff;
    background: #c8161d;
  }
  .act1 {
    border-bottom: 3px solid #1890ff !important;
  }
  .cha {
    font-size: 16px;
    color: #606266;
    position: absolute;
    top: 10px;
  }
  .li {
    width: 40px;
    margin: 0 auto;
    border-bottom: 3px solid transparent;
  }
}
.main {
  display: flex;
  flex-direction: column;
}
.contain {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
  margin: 10px 20px 0 20px;
  flex: 1;
  padding-top: 15px;
}
.tit {
  font-size: 14px;
  font-family: PingFang SC-Semibold, PingFang SC;
  font-weight: 600;
  color: #333333;
  border-left: 5px solid #c8161d;
  padding-left: 20px;
}
.xian {
  margin-top: 10px;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}
.pod {
  padding: 20px;
}
.footer {
  height: 68px;
  background: #ffffff;
  box-shadow: 0px -3px 20px 0px rgba(204, 204, 204, 0.5);
  margin: 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.thebtn1 {
  background: #3181e5;
  color: #ffffff;
  padding: 9px 45px;
  margin-left: 20px;
  border-radius: 5px;
  height: 38px;
}
.thebtn2 {
  height: 38px;
  background: #cccccc;
  color: #ffffff;
  padding: 9px 45px;
  border-radius: 5px;
}
.neibu {
  margin-right: 10px;
  color: #666666;
  font-style: normal;
}
.elTag {
  margin-right: 10px;
}
.check {
  display: flex;
  flex-wrap: wrap;
  text-align: center;
  // justify-content: center;
  .check_i {
    width: 50%;
    text-align: left;
    margin-right: 0 !important;
  }
}
.jy {
  font-size: 10px;
  font-family: PingFang SC-Regular, PingFang SC;
  font-weight: 400;
  color: #999999;
}
</style>
