<template>
  <div class="auto" style="overflow-y: scroll">
      <form class="form-horizontal">
        <div class="row">
          <div class="col-sm-6">
            <label class="font_normal_body">&emsp;客户编号</label>
            <input type="text" v-model="model.f_userinfo_code" disabled=disabled style="width: 60%" class="input_search">
          </div>
          <div class="col-sm-6">
            <label class="font_normal_body">&emsp;客户姓名</label>
            <input type="text" v-model="model.f_user_name" disabled=disabled style="width: 60%" class="input_search">
          </div>
          <div class="col-sm-12">
            <label class="font_normal_body">&emsp;客户地址</label>
            <input type="text" v-model="model.f_user_address" disabled=disabled style="width: 80%" class="input_search">
          </div>
          <div class="col-sm-6">
            <label class="font_normal_body">期初滞纳金</label>
            <input type="text" v-model="model.f_last_balance" disabled=disabled style="width: 60%" class="input_search">
          </div>
          <div class="col-sm-6">
            <label class="font_normal_body">期末滞纳金</label>
            <input type="text" v-model="model.f_balance" disabled=disabled style="width: 60%" class="input_search">
          </div>
          <div class="col-sm-6">
            <label class="font_normal_body">&emsp;减免金额</label>
            <input type="text" v-model="model.f_latefee_audit" disabled=disabled style="width: 60%" class="input_search">
          </div>
          <div class="col-sm-6">
            <label class="font_normal_body">&emsp;&emsp;提交人</label>
            <input type="text" v-model="model.f_operator" disabled=disabled style="width: 60%" class="input_search">
          </div>
          <div class="col-sm-6">
            <label class="font_normal_body">提交人公司</label>
            <input type="text" v-model="model.f_orgname" disabled=disabled style="width: 60%" class="input_search">
          </div>
          <div class="col-sm-6">
            <label class="font_normal_body">提交人部门</label>
            <input type="text" v-model="model.f_depname" disabled=disabled style="width: 60%" class="input_search">
          </div>

          <div class="col-sm-12">
              <label for="f_user_type" class="font_normal_body">&emsp;备&emsp;注&emsp;</label>
            <div class="col-sm-10" id="f_comments" style="width: 80%;">
              <textarea class="col-sm-3 form-control" type="text" v-model="model.audit_comments"></textarea>
            </div>
          </div>
        </div>
      </form>
      <div style="float: right">
        <button class="button_search" v-if="model.audit_state='待审核'" @click="audit('通过')">通过</button>
        <button class="button_search" v-if="model.audit_state='待审核'" @click="audit('不通过')">不通过</button>
        <button class="button_clear" @click="cancel">取消</button>
      </div>

    <modal :show.sync="showfiles" width="80%" style="width:auto;"  v-ref:modal middle backdrop="false">
      <article slot="modal-body">
        <upload :blodid="model.f_userinfo_id"  :businessid="model.id" v-ref:upload  fusetype="滞纳金减免审核" isremark="true" style="width:auto" ></upload>
      </article>
      <footer slot="modal-footer" class="modal-footer">
      </footer>
    </modal>
    <!--文件上传按钮-->
    <button class="button_search" style="width: max-content" @click="uploadFiles()">上传附件</button>
  </div>
</template>
<script>
  import Vue from 'vue'
  import {HttpResetClass} from 'vue-client'

  export default {
    title: '基本信息',

    data () {
      return {
        showfiles: false
      }
    },
    props: {
      model: Object
    },

    ready () {
    },
    created () {
    },
    methods: {
      uploadFiles () {
        this.showfiles = !this.showfiles
      },
      cancel (){
        this.$dispatch('close')
      },

      async audit (state) {
        this.model.f_comments = this.model.audit_comments
        this.model.f_audit_state = state
        this.model.f_audit_date = this.$login.toStandardTimeString()
        this.model.f_type = '滞纳金减免'
        this.model.f_operator = Vue.$login.f.name
        this.model.f_operatorid = Vue.$login.f.id
        this.model.f_orgid = Vue.$login.f.orgid
        this.model.f_orgname = Vue.$login.f.orgs
        this.model.f_depid = Vue.$login.f.depids
        this.model.f_depname = Vue.$login.f.deps
        await this.$resetpost('rs/logic/auditOverdue', this.model)
        this.$dispatch('close')
      }
    },
    computed: {
    },
    watch: {

    },
    events: {
    },
  }
</script>
