<template>
  <div>
    <title-bar title="新增营销" @clickLeft="onClick">
      <van-icon slot="left" name="cross" size="24" />
    </title-bar>
    <div class="addMarketing">
      <van-form>
        <div class="upload">
          <van-uploader v-model="business_license" :max-count="1" multiple />
        </div>

        <mobile-input v-model="certype" name="证件类型" label="证件类型" placeholder="营业执照" readonly />
        <mobile-input v-model="IDnumber" name="证件号码" label="证件号码" />
        <mobile-input v-model="username" name="客户名称" label="客户名称" />
        <mobile-input v-model="Contact_person" name="联系人" label="联系人" />
        <mobile-input v-model="tel" type="tel" label="联系电话" />
        <mobile-input v-model="sms" center clearable label="短信验证码">
          <template #button>
            <van-button size="small" type="primary">发送验证码</van-button>
          </template>
        </mobile-input>
        <div class="button">
          <van-button round block type="info" native-type="submit">提交</van-button>
        </div>
      </van-form>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import TitleBar from "@/components/general/TitleBar.vue";
import { Uploader } from "vant";
Vue.use(Uploader);
/**
 * @Description 新增营销
 * @Author JiangTao
 * @Date 2021-11-10 下午 03:28
 */
@Component({
  name: "AddMarketing",
  components: { TitleBar },
})
export default class AddMarketing extends Vue {
  data() {
    return {
      business_license: [],
    };
  }
  pageTitle = ""; // 页面标题

  onClick() {
    console.log(111111);
  }
  mounted() {
    this.pageTitle = this.$route.meta?.name;
  }

  certype: string | undefined = "";
  IDnumber: string | undefined = "";
  username: string | undefined = "";
  Contact_person: string | undefined = "";
  tel: string | undefined = "";
  sms: string | undefined = "";
}
</script>

<style scoped>
.addMarketing {
  width: 40%;
  height: 50%;
  margin: 5% auto 0 auto;
}
.upload {
  width: 20%;
  margin: 0 auto;
  text-align: center;
}
.button {
  margin: 2%;
}
.button button {
  background-color: #fd5065;
  border: 1px solid #fd5065;
}
::v-deep .button button div span {
  font-size: 20px;
}
</style>
