<style>
  .bg {
    background-color: blue;
    height: 1px;
    border: 0;
  }
  .app-row {
    background-color: white;
    padding: 10px 10px 0 10px;
    border-bottom: 1px solid rgba(235, 235, 235, 0.5);
  }
  .search_input {
    border: 0;
    outline: none;
  }
  .font{
    font: 15px PingFang-SC-Medium;
    color: #666666;
  }
  .input-font{
    font: 15px PingFang-SC-Medium;
    color: #333333;
  }
  .btn-font{
    font:600 16px PingFang-SC-Bold;
    color: #499EDF;
  }
  .btn-color{
    background-color: #FFFFFF;
    border-radius: 10px ;
    border: 1px solid #499EDF;
  }
  .app-text {
    font-size: 12px;
  }
  .panel-self{
    border-radius: 10px;
    border:1px solid #499EDF;
    background-color: #F8F8F8;
  }
  .yybtn-color{
    background-color:#499edf;
    border-radius: 4px ;
    border: 1px solid #499EDF;
    color: #FFFFFF;
    font: 14px PingFang-SC-Bold;
  }
  .qxbtn-color{
    background-color: #FFFFFF;
    border-radius: 4px ;
    color: #499edf;
    font: 14px PingFang-SC-Bold;
    border: 1px solid #499EDF;
  }
</style>

<template>
  <div class="auto">
    <criteria-paged :model="model" v-ref:paged>
      <criteria partial='criteria' @condition-changed='search' v-ref:cri>
        <div partial>
          <form>
            <!--<div class="row app-row">-->
              <!--<div class="col-xs-4">-->
                <!--<img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">-->
                <!--<label for="f_keyword" class="font text-left">小区名称：</label>-->
              <!--</div>-->
              <!--<div class="col-xs-8" >-->
                <!--<input id="f_keyword" class="search_input input-font"-->
                       <!--v-model="model.f_residential_area" condition="f_residential_area like '%{}%'" />-->
              <!--</div>-->

            <!--</div>-->
            <div class="row app-row">
              <div class="col-xs-4">
                <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
                <label  class=" font text-left">安检员</label>
              </div>
              <div class="col-xs-8" >
                <input  class="search_input input-font"
                       v-model=model.f_checker_name condition="f_checker_name like '%{}%'" />
              </div>
            </div>
            <div class="row app-row">
              <div class="col-xs-4 col-sm-4 col-md-4" style="margin-top: 8px">
                <img src="../../assets/shijian.png" style="width: 20px;margin-bottom: 5px" alt="">
                <span class="text-left font">开始日期</span>
              </div>
              <div class="col-xs-8 col-sm-8 col-md-8">
                <datepicker
                  :value.sync="model.f_onsite_time"
                  :format="'yyyy-MM-dd 00:00:00'"
                  v-model="model.f_onsite_time"
                  condition="f_last_check_date > '{}'"
                  :show-reset-button="reset" placeholder="请输入安检起始日期" style="margin-bottom: 8px">
                </datepicker>
                <!-- <input type="text" class="search_input" v-model="model.startDate" placeholder="请输入起下发时间"/> -->
              </div>
            </div>
            <div class="row app-row">
              <div class="col-xs-4 col-sm-4 col-md-4" style="margin-top: 8px">
                <img src="../../assets/shijian.png" style="width: 20px;margin-bottom: 5px" alt="">
                <span class="text-left font">结束时间</span>
              </div>
              <div class="col-xs-8 col-sm-8 col-md-8">
                <datepicker
                  :value.sync="model.f_offsite_time"
                  :format="'yyyy-MM-dd 23:59:59'"
                  v-model="model.f_offsite_time"
                  condition="f_last_check_date < '{}'"
                  :show-reset-button="reset" placeholder="请输入安检结束日期" style="margin-bottom: 8px">
                </datepicker>
              </div>
            </div>
            <div class="row text-center" style="margin-top: 20px;">
              <button type="button" class="btn btn-lg btn-font btn-color" style="width: 45%;" @click="search(),$dispatch('search')">查询</button>
            </div>
            <div style="height:30px;"></div>
          </form>
        </div>
      </criteria>
      <list :model="model" partial='list'>
        <div partial>
          <div  class="auto app-text" style="margin-top: 5px;">
            <div class="panel" style="padding: 10px 10px 5px 10px;">
              <div class="panel-body panel-self">
                <div class="row">
                  <p class="panel-title col-xs-4 text-left font">安检员</p>
                  <p class="panel-title col-xs-8 text-left input-font">{{ row.f_checker_name }}</p>
                </div>
                <div class="row">
                  <p class="panel-title col-xs-4 text-left font">入户次数</p>
                  <p class="panel-title col-xs-8 text-left input-font">{{ row.f_ruhu }}</p>
                </div>
                <div class="row">
                  <p class="panel-title col-xs-4 text-left font">到访不遇次数</p>
                  <p class="panel-title col-xs-8 text-left input-font">{{ row.f_buyu }}
                  </p>
                </div>
                <div class="row">
                  <p class="panel-title col-xs-4 text-left font">拒检次数</p>
                  <p class="panel-title col-xs-8 text-left input-font">{{ row.f_jujian }}
                </div>
              </div>
            </div>
          </div>
        </div>
      </list>
    </criteria-paged>
  </div>
</template>

<script>
  import LocalPagedList from './LocalPagedList'
  import Vue from 'vue'
  import { PagedList } from 'vue-client'
  import * as Util from '../Util'

  export default {
    title: '移动端在线安检结果查询',
    data() {
      return {
        model: new PagedList( `${this.$androidUtil.getProxyUrl()}/rs/sql/AndroidCheckInfo`,5,{condition:'this.condition'}),
        showModal: false,
        param: null,
      }
    },
    ready(){
    },
    methods: {
      reload(){
        this.$refs.paged.loadPage(this.$refs.paged.model.pageIndex)
      },
      search(args) {
        this.model.rows = []
        args.condition += `and f_filialeid = '${Vue.user.f_orgid}'`
        this.model.search(args.condition, args.model)
      },
    }
  }
</script>
