<template>
  <basic-container>
    <div class="btn-wrap">
      <el-button type="primary" icon="el-icon-edit">保存</el-button>
    </div>
    <div class="doc-page">
      <h3 class="page-title" style="margin: 24px 0 16px">火炬发展年报</h3>
      <div>
        <year-month-select v-model="yearAndMonth" :showMonth="false"></year-month-select>
      </div>

      <div style="border: 1px solid #000; padding: 5px;">
        <div>《中华人民共和国统计法》第八条规定:国家机关、企业事业单位和其他组织以及个体工商户和个人等统计调查对象，必须依照本法和国家有关规定，真实、准确、完整、及时地提供统计调查所需的资料，不得提供不真实或者不完整的统计资料，不得迟报、拒报统计资料。</div>
        <div>《中华人民共和国统计法》第十一条规定:统计机构和统计人员对在统计工作中知悉的国家秘密、工作秘密、商业秘密、个人隐私和个人信息，应当予以保密，不得泄露或者向他人非法提供。</div>
        <div>《中华人民共和国统计法》第二十八条规定:统计调查中获得的能够识别或者推断单个统计调查对象身份的资料，任何单位和个人不得对外提供、泄露，不得用于统计以外的目的。</div>
      </div>

      <div style="display: flex; align-items: center; margin-top: 20px; justify-content: space-between;">
        <div style="display: flex; align-items: center; border: 1px solid #000;">
          <div style="padding-right: 100px;">是否填写国家统计局一套表(qa18)</div>
          <div style="border-left: 1px solid #000; padding: 6px;">
            <select style="width: 90px;">
              <option value="1">1.是</option>
              <option value="0">2.否</option>
            </select>
          </div>
        </div>
        <div style="border: 1px solid #000; padding: 5px;">
          <div>制定机关：工业和信息化部</div>
          <div>批准机关：国家统计局</div>
          <div>{{ `批准文号：国统制[${ getLastYear }]187号` }}</div>
          <div>{{ `有效期至：${ getDeadline }` }}</div>
        </div>
      </div>

      <div style="display: flex; align-items: center; margin-top: 20px; justify-content: space-between;">
        <div>
          第2步 (一)企业概况
        </div>
        <div style="border: 1px solid #000; padding: 5px;">
          <div>表 号：GQ-002表</div>
          <div>制定机关：工业和信息化部</div>
          <div>批准机关：国家统计局</div>
          <div>{{ `批准文号：国统制[${ getLastYear }]187号` }}</div>
          <div>{{ `有效期至：${ getDeadline }` }}</div>
        </div>
      </div>

      <table class="edit-table" style="margin-top: 15px;">
        <thead>
          <th align="left" width="55%;">指标名称</th>
          <th align="center">代码</th>
          <th align="left">内容</th>
        </thead>
        <tbody>
          <tr>
            <td>企业隶属关系</td>
            <td align="center">qb101</td>
            <td>
              <input placeholder="请输入" v-model="formData.qb101" @blur="handleInputBlur($event, 'qb101')" />
            </td>
          </tr>
          <tr>
            <td>主要业务活动或主要产品</td>
            <td align="center"></td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>主要业务活动或主要产品1</td>
            <td align="center">qb03_01</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>主要业务活动或主要产品2</td>
            <td align="center">qb03_02</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>主要业务活动或主要产品3</td>
            <td align="center">qb03_03</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>行业代码2017</td>
            <td align="center">qb03_1</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>执行会计标准类别</td>
            <td align="center">qb20_1</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>执行企业会计准则情况</td>
            <td align="center">qb20</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>企业注册时间</td>
            <td align="center">qb04</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>注册资金</td>
            <td align="center">qb04_0</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>注册资金单位</td>
            <td align="center">qb04a</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>登记注册类型</td>
            <td align="center">qb06</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>主要外资来源国别或地区代码</td>
            <td align="center">qb06_1</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>主要外资出资比例</td>
            <td align="center">qb06_2</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>企业控股情况</td>
            <td align="center">qb18</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>港澳台商投资情况（可多选）</td>
            <td align="center">qb39</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>用地面积</td>
            <td align="center">qb30</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>建筑面积</td>
            <td align="center">qb30_1</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>用于生产的建筑面积</td>
            <td align="center">qb30_2</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>用于研发的建筑面积</td>
            <td align="center">qb30_3</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>用于研发的建筑面积</td>
            <td align="center">qb30_3</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>企业集团情况</td>
            <td align="center">qb9</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>QB09如为2，请填直接上级法人单位组织机构代码或上级法人统一社会信用代码</td>
            <td align="center">qb10</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>企业是否为经过认定的高新技术企业</td>
            <td align="center">qb11</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>高新技术企业认定证书编号</td>
            <td align="center">qb13</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>企业被认定为高新技术企业的时间</td>
            <td align="center">qb12</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>与科技企业孵化器关系</td>
            <td align="center">qb14</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>入孵时间</td>
            <td align="center">qb14_1</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>毕业时间</td>
            <td align="center">qb14_2</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>境外上市情况</td>
            <td align="center">qb15</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>证券代码</td>
            <td align="center">qb15_1</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>上市时间</td>
            <td align="center">qb15_2</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>年末市值</td>
            <td align="center">qb15_5</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>企业所属技术领域</td>
            <td align="center">qb16</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>企业核心技术所属国家重点支持的高新技术领域</td>
            <td align="center">qb16_1</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>企业所属战略性新兴产业领域</td>
            <td align="center">qb16_2</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>业务系统是否向云端迁移</td>
            <td align="center">qb32</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>是否拥有实体经济和数字经济融合相关试点、典型案例</td>
            <td align="center">qb38</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>企业是否进行数字化转型 qb34 1.是</td>
            <td align="center">qb34</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>本年用于数字化转型的经费投入</td>
            <td align="center">qb34_1</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>企业拥有工业机器人数量</td>
            <td align="center">qb35</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>企业是否建立企业研发准备金</td>
            <td align="center">qb36</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>企业是否通过质量管理体系认证</td>
            <td align="center">qb37</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>适用标准</td>
            <td align="center">qb37_1</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>若适用标准（qb37_1）选“3.其他”，请填写</td>
            <td align="center">qb37_3</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
          <tr>
            <td>证书编号</td>
            <td align="center">qb37_2</td>
            <td>
              <input placeholder="请输入" />
            </td>
          </tr>
        </tbody>
      </table>
      
    </div>
  </basic-container>
</template>

<script>
import moment from "moment";
import yearMonthSelect from "@/components/year-month-select";

export default {
  components: {
    yearMonthSelect,
  },
  data() {
    return {
      yearAndMonth: moment(new Date()).format('YYYY'),

      formData: {}
    };
  },
  computed: {
    getLastYear() {
      return this.yearAndMonth - 1;
    },
    getDeadline() {
      return `${Number(this.yearAndMonth) + 2}年12月`
    }
  },
  watch: {
    "yearAndMonth"(newVal) {
      console.log(newVal)
    },
  },
  mounted() {
  },
  methods: {
    handleInputBlur(e, code) {
      console.log(e.target.value, code)
    }
  },
};
</script>

<style lang="scss" scoped>
.btn-wrap {
  position: fixed;
  right: 90px;
  bottom: 60px;
  ::v-deep .el-button {
    width: 86px;
    height: 86px;
    text-align: left;
    border-radius: 100%;
    font-weight: 600;
    box-shadow: 0 0 12px #888;
    box-sizing: border-box;
  }
}

.page-title {
  text-align: center;
  font-size: 24px;
}

.doc-page {
  width: 900px;
  margin: 30px auto;
  font-size: 14px;
}
table {
  width: 100%;
  border: 1px solid #333;
}
table thead {
  height: 35px;
  th {
    border-right: 1px solid #000;
  }
}
.doc-label {
  text-align: center;
  padding: 6px;
  color: #777;
  font-size: 14px;
  width: 15%;
}
.doc-input {
  text-align: center;
  color: #333;
  width: 35%;
}

.el-input__inner {
  border: none;
}
tr td {
  border: 1px solid #333;
  padding: 6px 3px;
  font-size: 14px;
  color: #666;
}

.edit-table {
  tr td input {
    border: none;
    width: 100%;
    box-sizing: border-box;
  }
}
</style>
