error-list.vue 5.33 KB
<template>
<div class="container resource close-left-menu" style="min-height: 490px;">

  <div class="pop-banner clearfix">
    <h3 class="current-module" v-if='search.createstate=="0"'>异常列表</h3>
    <h3 class="current-module" v-if='search.createstate=="1"'>预警中心</h3>
  </div>
  
 

  <!--purchase-plan start-->
  <div class="purchase-plan">

    <div class="pd-form fast-search-form">
      <div class="group-row">
        <div class="form-group">
          <label for="cn1" class="label label-6em">供应商</label>
          <div class="control w370">
            <input type="text" v-model="search.suppliername" id="cn1">
          </div>
        </div>
        <div class="form-group">
          <label for="cn11" class="label label-6em">医院</label>
          <div class="control">
            <input type="text" v-model="search.medname" id="cn11">
          </div>
        </div>
      </div>
      <div class="group-row">
        <div class="form-group data200">
          <label for="cn3" class="label">出库日期</label>
          <div class="control control-date">
            <div style="width:58%;float:left;">
              <datepicker :target.sync="search.startdate"></datepicker>
            </div>
            <span class="text-and t-center" style="width: 39px"></span>
            <div style="width:19%;float:left;">
              <datepicker :target.sync="search.enddate"></datepicker>
            </div>
          </div>
        </div>
        <div class="form-group">
          <label for="cn11" class="label label-6em">业务单号</label>
          <div class="control">
            <input type="text" v-model="search.billno" id="cn11">
          </div>
        </div>
      </div>
      <div class="group-row">
        <div class="form-group">
          <label for="cn8" class="label">异常状态</label>
          <div class="control">
            <div class="radio-control" style='width:330px;'>
              <input type="radio" id="radio04" name="radioio" v-model="search.dealstate" value="">
              <label class="radio" for="radio04">全部</label>
              <input type="radio" id="radio01" name="radioio" v-model="search.dealstate" value="0">
              <label class="radio" for="radio01">未处理</label>
              <input type="radio" name="radioio" id="radio03" v-model="search.dealstate" value="1">
              <label class="radio" for="radio03">已处理</label>
            </div>
          </div>
        </div>
      </div>
      <div class="group-row t-right">
        <button class="fast-search-form-btn btn-d btn-d-lg btn-d-activate btn-d-circle"
        v-on:click="getData('search')">查 询</button>
      </div>
    </div>
  
    <table class="itable itable-bordertop itable-thead-13px">
      <thead>
        <tr>
          <th class="w50">序号</th>
          <th class="w100">登记人</th>
          <th class="w100">登记日期</th>
          <th class="w100">供应商</th>
          <th class="w100">业务单号</th>
          <th class="w150">医疗机构</th>
          <th class="w150">异常商品</th>
          <th class="w80">处理人</th>
          <th class="w90">状态</th>
          <th class="w140">操作</th>
        </tr>
      </thead>
      <tbody>
        <tr v-if="list.length==null || list.length==0">
          <td  colspan="11">   暂无数据    </td>
        </tr>
        <tr v-for="item in list">
          <td>{{$index+1}}</td>
          <td>{{item.operatername}}</td>
          <td>{{item.update_time | getYMD}}</td>
          <td class="t-left pr10">{{item.suppliername}}</td>
          <td class="t-left pr10">{{item.billno}}</td>
          <td class="t-left pr10">{{item.medname}}</td>
          <td class="t-left pr10">{{item.goodsname}}</td>
          <td>{{item.handlingpersonname}}</td>
          <td :class='{"text-color-red":item.dealstate==0}'>{{item.dealstate | dealstate}}</td>
          <td>
            <a class="btn-d btn-d-activate" v-if='item.dealstate==0' v-link="{path:'/errorView/'+item.guid+'/true'}">处理</a>
            <a class="btn-d btn-d-activate" v-else v-link="{path:'/errorView/'+item.guid+'/false'}">详情</a>
          </td>
        </tr>
      </tbody>
    </table> 

    <pagination 
   @page-change="getData" 
   :class="['m-20-0']"
   :page-no.sync="search.page" 
   :total-pages.sync="search.totalPages"></pagination>
  </div>
  <!--purchase-plan end-->



</div>
</template>
<script>
module.exports={
  data:function(){
    return {
      list:[],
      search:{
          pageSize: 20,
          page: 1,
          totalPages: 0,
          medname:'',
          suppliername:'',
          startdate:'',
          enddate:'',
          dealstate:'',
          billno:'',
          createstate:''
      }
    }
  },methods:{
    getData:function(falg){//请求数据     
      
      if(falg=='search'){
        this.search.page=1;
      }
      
      Ajax.post('/api/getListTrGovInvAbnormal',this.search).then(function(res){
          var result=res.data;

          if(result.data){
              this.$set('list',result.data.list);
              this.search.totalPages=result.data.totalPages;
          }
      }.bind(this))
    }
  },route:{
    data:function(){
      this.list=[];
      this.search.createstate=this.$route.params.dealstate;
      this.getData('search');
    }
  },
  watch:{
    'search.dealstate':function(){
      this.getData('search');
    }
  }
}
</script>