<template>
  <div class="app-container">
    <el-form label-width="80px" :model="requestBody">
      <el-form-item label="销方名称">
        <el-input style="width:80%" v-model="requestBody.sellerName"></el-input>
      </el-form-item>
      <el-form-item label="销方税号">
        <el-input v-model="requestBody.sellerTaxno"></el-input>
      </el-form-item>
      <el-form-item label="结束日期">
        <el-date-picker
          v-model="requestBody.endDate"
          type="date"
          format="yyyy-MM-dd"
          placeholder="选择日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="开票机号">
        <el-input v-model="requestBody.machineNo"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">加密</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import {jianShuiLicense} from "@/api/breaker/request"

export default {
  data() {
    return {
      requestBody: {
        sellerName: "",
        sellerTaxno: "",
        machineNo: "",
        endDate: ""
      }
    }
  },
  methods: {
    onSubmit() {
      jianShuiLicense(this.requestBody).then(resp => {
        if (resp.code == 200) {
          window.open(resp.data)
        }
      })
    }
  }
}
</script>
