licence-match.vue 1.74 KB
<template>
  <tr class="activate">
    <td>
      <div class="checkbox-control checkbox-alone">
        <input type="checkbox" id="cc31">
        <label for="cc31" class="checkbox"></label>
      </div>
    </td>
    <td></td>
    <td class="td-code"><input type="text" id="cn1" v-model="licence.code"></td>
    <td class="td-name"><input type="text" id="cn1" v-model="licence.name"></td>
    <td class="td-type select-style">
      <select-ui :list="['组织机构代码证', '营业执照', '经营许可证', '三证合一', '其他证照']"
                 :selected.sync="licence.type" empty-text="请选择区域"></select-ui>
    </td>
    <td class="td-day"><input type="text" id="cn1" v-model="licence.remindDays"></td>
    <td class="td-yesorno select-style">
      <radio :checked.sync="licence.isMust"></radio>
    </td>
    <td class="td-yesorno select-style">
      <radio :checked.sync="licence.isAudit"></radio>
    </td>
  </tr>
</template>
<script>
  module.exports = {
    data: function () {
      return {
        licence: {}
      };
    },
    methods: {
      getLicence: function () {
        var self = this;
        if (this.$route.params.id != '0') {
          Ajax.get('/licence/' + this.$route.params.id)
              .then(function (response) {
                self.$set('licence', response.data.data);
              })
        } else {
          this.licence = {};
        }

      },
      saveGood: function () {
        var self = this;
        Ajax.post('/licence/save', this.good)
            .then(function (response) {
              // alert('保存成功');
              self.$route.router.go('/licence');
            });
      }
    },
    route: {
      activate: function () {
        this.getLicence();
      }
    }
  };
</script>