boxpagebpd.vue 2.75 KB
<template>

<div class="row-launch  "  v-show="show">
       <h3>{{count}}</h3>
        <table class="itable">
          <thead>
            <tr>
              <th class="w60">序号</th>
              <th class="w120">供应商</th>
              <th class="w80">出库订单</th>
              <th class="w140">医疗机构</th>
              <th class="w120">配送商</th>
              <th class="w100">出库日期</th>
              <th class="w80">单据类型</th>
              <th class="w80">采购员</th>
              <th class="w80">总金额</th>
              <th class="">备注</th>
            </tr>
          </thead>
          <tbody>
            <tr v-for="item in list">
              <td>{{$index+1}}</td>
              <td>{{item.SupplierName}}</td>
              <td>{{item.BillNo}}</td>
              <td>{{item.Name}}</td>
              <td>{{item.DistrbName}}</td>
              <td>{{item.BillDate}}</td>
              <td>{{item.BillType | ftCase "01:器械;02:耗材;04:药品" }}</td>
              <td>{{item.BuyerName}}</td>
              <td>{{item.DetailSum}}</td>
              <td></td>
            </tr>
          </tbody>
        </table>

      <pagination 
            @page-change="getData"
            :page-no.sync="search.page"
            :total-pages.sync="search.totalPages">
      <!-- <em class="page">明细条目数【3】</em>   -->
    </pagination>

    <div class="zip" v-on:click="show=false"></div>
</div>	
</template>
<script>
module.exports={
	data:function(){
		return {
			list:[],
      search:{
          		size: 20, page: 1, totalPages: 0,
              billDate:'',billType:''
      }
		}
	},props:{
    id:{type:String,default:''},
    show:{type:Boolean,default:false},
    count:{type:String,default:''},
    type:{type:String,default:'01'},
    action:{type:String,default:'1'}
  },watch:{
    'show':function(show){


      if(show==true ){
          this.getData();
      }
    }
  },methods:{
    getData:function(casetxt){//请求数据   
      this.search.billDate=this.id;
      this.search.billType=this.type;  
      if(this.action==1){
          Ajax.get('/api/goverment_report_getDoBillList',
            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))
      }else{
        Ajax.get('/api/goverment_report_getDoBillList',
          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))
      }
      
    }
  }
}
</script>