<style scoped>
.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;
}
.button_shrink_top {width: 35px; height: 35px; background-size:100%;background-image: url("../../../static/newStyle/stretch_top.png")}
.button_shrink_bottom {width: 35px; height: 35px;  background-size:100%;background-image: url("../../../static/newStyle/stretch_bottom.png")}
.button_shrink_left {width: 35px; height: 35px;  background-size:100%;background-image: url("../../../static/newStyle/stretch_left.png")}
.button_shrink_right {width: 35px; height: 35px; background-size:100%;background-image: url("../../../static/newStyle/stretch_right.png")}

</style>
<template>
  <div class="auto">
    <criteria-paged :model="model" v-ref:paged>
      <criteria partial='criteria' v-show="$parent.criteriaShow" @condition-changed='$parent.search' v-ref:cri>
        <div partial>
          <div partial>
            <form>
              <div class="row app-row">
                <div class="col-xs-4">
                  <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
                  <label for="f_userinfo_code" class="font text-left">用户编号：</label>
                </div>
                <div class="col-xs-8" >
                  <input id="f_userinfo_code" class="search_input input-font"
                         v-model="model.f_userinfo_code" condition="f_userinfo_code like '%{}%'" />
                </div>
              </div>

              <div class="row app-row">
                <div class="col-xs-4">
                  <img src="../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
                  <label for="f_user_name" class="font text-left">用户姓名：</label>
                </div>
                <div class="col-xs-8" >
                  <input id="f_user_name" class="search_input input-font"
                         v-model="model.f_user_name" condition="f_user_name like '%{}%'" />
                </div>
              </div>
<!--              <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/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
                  <label for="f_address" class="font text-left">地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址：</label>
                </div>
                <div class="col-xs-8" >
                  <input id="f_address" class="search_input input-font"
                         v-model="model.f_address"  condition="f_address like '%{}%'" />
                </div>
              </div>
              <div class="row app-row" >
                <div class="col-xs-4" >
                  <img src="../../assets/shijian.png" style="width: 20px;margin-bottom: 5px" alt="">
                  <label for="f_check_start" class="font text-left">最初时间:</label>
                </div>
                 <div class="col-xs-5" >
                  <datepicker id="f_check_start"
                    :value.sync="model.f_check_start"
                    placeholder='日期开始'
                    style="width: 80%"
                    :disabled-days-of-week="[]"
                    :format="'yyyy-MM-dd'"
                    :show-rest-button="reset"
                    v-model = "model.f_check_start"
                    condition="f_offsite_time >=  '{} 23:59:59'">
                  </datepicker>
                </div>
              </div>
              <div class="row app-row" >
                <div class="col-xs-4" >
                  <img src="../../assets/shijian.png" style="width: 20px;margin-bottom: 5px" alt="">
                  <label for="f_check_end" class="font text-left">最后时间:</label>
                </div>
                <div class="col-xs-5">
                  <datepicker id="f_check_end"
                    :value.sync="model.f_check_end"
                    placeholder='日期结束'
                    style="width: 80%"
                    :disabled-days-of-week="[]"
                    :format="'yyyy-MM-dd'"
                    :show-rest-button="reset"
                    v-model = "model.f_check_end"
                    condition="f_offsite_time <=  '{} 23:59:59'">
                  </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()">查询</button>
              </div>
              <div style="height:30px;"></div>
            </form>
          </div>
        </div>
      </criteria>
      <list :model ="model" partial='list' >
        <div partial>
            <div class="panel" style="padding: 10px 10px 5px 10px;">
              <div class="panel-body panel-self">
                <div class="col-xs-12">
                  <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户编号:</b></p>
                  <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_userinfo_code }}</p>
                </div>
                <div class="col-xs-12">
                  <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户名称:</b></p>
                  <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_user_name }}</p>
                </div>
                <div class="col-xs-12">
                  <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户电话:</b></p>
                  <p class="panel-title col-xs-7  input-font" style="width: 79%">{{ row.f_user_phone}}</p>
                </div>
                <div class="col-xs-12">
                  <p class="panel-title text-left font" style="width: 21%;float: left"><b>用户地址:</b></p>
                  <p class="panel-title text-left input-font">{{ row.f_address }}</p>
                </div>
                <div class="col-xs-12">
                  <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>安检时间:</b></p>
                  <p class="panel-title col-xs-7 text-left input-font"style="width: 79%">{{ row.f_offsite_time}}</p>
                </div>
                <div class="col-xs-12">
                  <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>安检状态:</b></p>
                  <p class="panel-title col-xs-7 text-left input-font">{{ row.f_complete }}</p>
                </div>
                <div class="col-xs-12">
                  <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>有无计划:</b></p>
                  <p class="panel-title col-xs-7 text-left input-font">{{ row.f_no_checkplan }}</p>
                </div>
            </div>
          </div>
        </div>
      </list>
    </criteria-paged>
  </div>
</template>

<script>

import {HttpResetClass, PagedList} from 'vue-client'


export default {
  title: '查询安检项',
  data() {
    return {
      model:new PagedList( 'api/af-safecheck/sql/safe_singleTable_OrderBy',5,{
        condition:`"f_checker_id = '11670'" && this.condition`,//${this.$login.f.id}
        items: '"*"',
        tablename: '"t_check_paper"',
        orderitem: '"f_userinfo_code desc"'
      }),
      criteriaShow: true

    }
  },

  methods: {
    // inspect(row) {
    //     var _this=this
    //     this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/safe_singleTable_OrderBy`, {data: {
    //         items: '*',
    //         tablename: 't_check_paper',
    //         orderitem: 'f_userinfo_code desc',
    //         condition:`f_checker_id = '${_this.$login.f.id}'`},
    //
    //     }).then((row) => {
    //       this.model.rows = row.data
    //     })
    // },


    search(data){
      var condition1 = data.condition + " and f_checker_id = '11670'"
      this.model.search(condition1,data.model)
    }

  }
}
</script>
<style scoped>
.newcolor{
  color: #ff0000;
}
.table th{
  background-color: #f2f6fa;
  color: black;
}
</style>
