 <!--
   @Author: husanfeng
   @qq:1136014061
   @Date: 2018-09-21
   @Last Modified by: husanfeng
   @Last Modified time: 2018-09-21
 -->
<template>
  <div>
    <Form :model="modelForm" ref="BUMappingForm" :rules="rules" class="ivu-form-no-margin-bottom" :label-width="120">
      <Row :gutter="15" class="code-row-bg">
        <Col span="10" style="border:none;">
        <Form-item prop="companyName" label="归属公司">
          <Input type="text" v-model="searchParams.companyName " size="small" clearable></Input>
        </Form-item>
        </Col>
        <Col span="10" style="border:none;">
        <Form-item prop="invoiceClaimNo" label="付款申请单号">
          <Input type="text" v-model="searchParams.invoiceClaimNo " size="small" clearable></Input>
        </Form-item>
        </Col>
      </Row>
      <Row :gutter="15" class="code-row-bg">
        <Col span="10" style="border:none;">
        <Form-item prop="invoiceNo" label="发票编号">
          <Input type="text" v-model="searchParams.invoiceNo " size="small" clearable></Input>
        </Form-item>
        </Col>
        <Col span="10" style="border:none;">
        <Form-item prop="businessLineCode" label="付款名称">
          <Input type="text" v-model="searchParams.invoiceClaimNo " size="small" clearable></Input>
        </Form-item>
        </Col>
      </Row>
      <Row :gutter="15" class="code-row-bg">
        <Col span="10" style="border:none;">
        <Form-item prop="accountItemCode" label="付款账号">
          <Input type="text" v-model="searchParams.invoiceClaimNo " size="small" clearable></Input>
        </Form-item>
        </Col>
        <Col span="10" style="border:none;">
        <Form-item prop="businessLineCode" label="付款金额">
          <Input type="text" v-model="searchParams.invoiceClaimNo " size="small" clearable></Input>
        </Form-item>
        </Col>
      </Row>
      <Row :gutter="15" class="code-row-bg">
        <Col span="10" style="border:none;">
        <Form-item prop="accountItemCode" label="付款方式">
          <Input type="text" v-model="searchParams.invoiceClaimNo " size="small" clearable></Input>
        </Form-item>
        </Col>
        <Col span="10" style="border:none;">
        <Form-item prop="businessLineCode" label="支付日期">
          <Input type="text" v-model="searchParams.invoiceClaimNo " size="small" clearable></Input>
        </Form-item>
        </Col>
      </Row>
    </Form>

  </div>
</template>
<script>
import Server from "ems-receivable@/views/ems/receivableComponent/server.js";
const server = new Server();
export default {
  components: {},
  props: {
    data: {
      type: Object,
      default() {
        return null;
      }
    }
  },
  data() {
    return {
      categoryList: [],
      server: server,
      searchParams: {
        companyName: "",
        invoiceClaimNo: "",
        invoiceNo: ""
      }
    };
  },
  computed: {},
  created: function() { 
    this.$emit("SetTitle", "退款退款信息");
    if (this.data) {
      // this.searchParams = {
      //   claimedAmount: this.data.claimedAmount,
      //   categoryName: this.data.categoryName,
      //   date:
      //     this.data.receivablesStartDate + "-" + this.data.receivablesEndDate,
      //   updatedByName: this.data.updatedByName,
      //   receivablesStatus: this.data.receivablesStatus
      // };
    }
    this.$emit("SetPageSize", 850);
  },
  beforeMount: function() {},
  mounted: function() {},
  beforeDestroy: function() {},
  destroyed: function() {},
  methods: {
    getCategoryList() {
      this.server.queryCategoryList().then(response => {
        if (response.statusCode === "-1") {
          this.$Message.error(response.msg);
          return;
        }
        this.categoryList = [];
        for (let item of response.data.list || []) {
          this.categoryList.push({
            label: item.categoryName,
            value: item.categoryCode
          });
        }
      });
    },

    save() {
      this.$emit("SetActionsState", { btn: "EditEmail", state: true });
      console.log(
        JSON.stringify(this.data) + "----" + this.searchParams.categoryCode
      );
      this.$emit("Close");
      // this.server.SaveBusinessBigClassDatas(businessBigClassDatas).then(res => {
      //   if (res.statusCode === "-1") {
      //     this.$Message.error(res.msg);
      //     this.$emit("SetActionsState", { btn: "EditEmail", state: false });
      //   } else {
      //     this.$Message.success("保存成功");
      //     this.$emit("SetActionsState", { btn: "EditEmail", state: false });
      //     this.$emit("Close");
      //   }
      // });
    }
  },
  watch: {},
  directives: {}
};
</script>
