<template >
  <div id="stand-work-list" class="flex bg-white p-10">
    <div class="height:auto">
      <criteria-paged :model="model" v-ref:paged  >
        <data-grid :model="model" partial='list' v-ref:grid>
          <template partial='head'>
            <tr>
              <th>序号</th>
              <th><nobr>原用户姓名</nobr></th>
              <th><nobr>新用户电话</nobr></th>
              <th><nobr>原用户电话</nobr></th>
              <th><nobr>过户费</nobr></th>
              <th><nobr>过户日期</nobr></th>
            </tr>
          </template>
          <template partial='body' partial='list' v-ref:grid>
            <tr >
              <td style="text-align: center;">{{$index+1}}</td>
              <td style="text-align: center;"><nobr>{{row.f_user_name}}</nobr></td>
              <td style="text-align: center;"><nobr>{{row.f_newuser_phone}}</nobr></td>
              <td style="text-align: center;"><nobr>{{row.f_user_phone}}</nobr></td>
              <td style="text-align: center;"><nobr>{{row.f_transfer_fees}}</nobr></td>
              <td style="text-align: center;"><nobr>{{row.f_operate_date}}</nobr></td>
            </tr>
          </template>
          <template partial='foot'></template>
        </data-grid>
      </criteria-paged>
    </div>
  </div>
</template>

<script>
  import {PagedList} from 'vue-client'

  export default {
    title: '过户',
    data () {
      return {
        condition: '1=1',
        model: new PagedList('rs/sql/transferQuery', 20),
        row: null,
        isdeal: true,
        show: false
      }
    },
    props:
      {
        f_userinfo_id: '',
        isdeal: {},
        args:{}
      },
    ready () {
      console.log('----------------------[')
      this.search()
    },
    methods: {
      search(){
        this.condition = `f_userinfo_id = ${this.f_userinfo_id} `
        if(this.args.model.f_start_date) this.condition += `and f_operate_date >= '${this.args.model.f_start_date}' `
        if(this.args.model.f_end_date) this.condition += `and f_operate_date <= '${this.args.model.f_end_date}' `
        this.model.search(this.condition, this.args.model)
      }
    },
    watch: {
      args(val){
        this.search()
      }
    }
  }
</script>

