supplier-order-inquiry-list.vue 4.73 KB
<template>
	<div class="container resource close-left-menu pd0 contaNEW" style="min-height: 804px;">

  <div class="pop-banner clearfix">
    <div class="operate-btns">
        <a v-on:click="exportTrmedplan()"  class="fbtn fb-Print2 ml-10 mr-10">导出</a> 
      </div>
      <div class="operate-btns">
        <a v-on:click="printTrmedplan()"  class="fbtn fb-setting ml-10">打印</a> 
      </div>
    <h3 class="current-module">供应商订单明细</h3>
  </div>
   
  
  <!--purchase-month-plan start-->
  <div class="purchase-month-plan"> 
    <table class="itable itable-thead-13px itable-td-long-text">
      <thead>
        <tr>
          <th class="w50">序号</th>
          <th class="w150 t-left"><div class="p-lr-10">商品</div></th>
            <th class="w50 t-left">单位</th>

            <th class="w70 t-left"><div class="p-lr-10">采购数量</div></th>
          <th class="w70">入库数量</th>
          <th class="w70">包装单位</th>
          <th class="w70">包装含量</th> 
          <th class="w70">ERP编码</th> 
          <th class="w70">商品省采<br>编码</th> 
          <th class="w50">价格(元)</th>
          <!--<th class="w50">计量单位</th> -->
            <!--<th class="w50">转换比</th>-->

        </tr>
      </thead>
      <tbody>
        <tr v-for='item in trmedplandetailList'>
          <td>{{$index+1 | getIndex}}</td>
          <td class="t-left">
            <div class="p-lr-10">
              {{item.goodsCode}}<br>
              <span class="p-tit-green">{{item.goodsName}}</span><br>
              {{item.goodsSpec}}<br>
              {{item.manufacturer}} 
            </div>
          </td>
            <td class="t-left">
                <span class="table-detail-icon t-center mt-10" style="display: inline-block"></span>&nbsp;{{item.conRatioPurchaseUnit}} {{item.hosUnit}}<br>
                <span class="table-detail-icon t-center mt-20" style="display: inline-block"></span>&nbsp;{{item.conRatioupplyUnit}} {{item.supUnit}}
            </td>
          <td>{{item.poQty}}</td>
          <td>{{item.doQty}}</td>
          <td>
            最大:{{item.bigUnitStyle}}<br>最小:{{item.minUnitStyle}}
          </td>
          <td>
            {{item.bigUnitQty}}<br>{{item.minUnitQty}}
          </td>
          <td class="t-left pr10">{{item.erpCode}}</td>
          <td class="t-left pr10">{{item.zbptCode}}</td>
          <td>{{item.price|numDigit 2}}</td>
          <!--<td>{{item.unit}}</td>-->

          <!--<td>{{item.conRatio}}</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-month-plan end-->

</div>
</template>
<script>
module.exports={
  data: function(){
    return {      
      list:{},
      trmedplandetailList:{},
      guid:'',
      billno:'',
      search:{
          billno:'',
          page: 1,
          totalPages: 1,
          pageSize:50,
          search_LIKE_billno:'',
          search_LIKE_guid:'',
      },
    };
  },
  methods: {
    // 显示供应商明细 
    getData: function() {
      var self = this;
    self.$set('search.search_LIKE_billno',self.billno);
//      self.$set('search.search_LIKE_guid',self.guid);
      Ajax.get('/hospitalTrmedplan/findByPageByPoDetail',self.search)
          .then(function(response){   
            var data=response.data.data; 
            if (response.data.errorCode == 0) {
              self.$set('trmedplandetailList', data.list);
              self.search.totalPages=data.totalPages;
              self.search.pageNo=data.pageNo;
            } else {
              layer.msg(response.data.message);
            }
          }); 
      },
      //导出
      exportTrmedplan:function(){
              var self = this;      
              self.search.billno = self.billno;
               Ajax.get('/hospitalTrmedplan/exportTrPo',self.search)
                .then(function(response){    
                  var data=response.data;   
                  window.open(data);
                })
            },  
            //打印
          printTrmedplan:function(){
            var self = this;     
            self.search.billno = self.billno;
             Ajax.get('/hospitalTrmedplan/printSupplierpo',self.search)
              .then(function(response){    
                var data=response.data.data;     
                window.open(data);
              })
          },  
   },
  route:{
     data: function (transition) {
          var self=this;
          var guid = transition.to.params.guid;
          var billno = transition.to.params.billno; 
          self.guid=guid;
          self.billno=billno;
          self.getData();
          },
      }
}
</script>