dataadmin-supplier.vue 2.93 KB
<template>
	<div class="container resource" style="min-height: 447px;">
      <div class="pop-banner clearfix"> 
        <div class="operate-btns"  >
          <a  class="fbtn fb-add" v-link="{ path: '/dataAdminSupplierDetail/true'}" >添加</a>
        }
        </div>
        <h3 class="current-module">供应商资料初始化</h3>
      </div>
      <!-- start-->
      <div class="pd-form fast-search-form">
        <div class="group-row">
          <div class="form-group">
            <label for="cn1" class="label">供应商</label>
            <div class="control">
              <input type="text" maxlength="20"  style="width:500px"  id="cn1" v-model="search.search_LIKE_chinesename"> </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" @click="getData(true)">查 询</button>
        </div>
      </div>
      <table class="itable itable-thead-13px itable-bordertop itable-td-long-text">
        <thead>
          <tr>
            <th class="w80">序号</th>
            <th class="w200">供应商</th>
            <th class="w140">状态</th>
            <th class="w140">联系人</th>
            <th class="w140">联系电话</th>
            <th class="w120">操作</th>
          </tr>
        </thead>
        <tbody>
          <tr v-for="mfsupplier in listMfsupplier">
            <td>{{$index + 1}}</td>
            <td>
              <div class="p-lr-10">{{mfsupplier.chinesename}}</div>
            </td> 
            <td>{{mfsupplier.bizstate=='Y'?"启用":mfsupplier.bizstate=='S'?"停用":mfsupplier.bizstate=='E'?"作废":""}}</td>
            <td>{{mfsupplier.contacts}}</td>
            <td>{{mfsupplier.contacttel}}</td>
            <td>
              <a class="btn-d btn-d-activate" v-link="{ path: '/dataAdminSupplierDetail/'+ mfsupplier.guid}" >明细</a>
            </td>
          </tr>
        </tbody>
      </table>
      <pagination 
   @page-change="getData" 
   :class="['m-20-0']"
   :page-no.sync="search.page" 
   :total-pages.sync="search.totalPages"></pagination>
      <!--end-->
    </div>
	
</template>
<script>
module.exports={
  data: function(){
    return {
      listMfsupplier: [],
      search: {
        search_LIKE_chinesename: '',
        pageSize: 10,
        page: 1,
        totalPages: 0
      
      },
      authoritySetting: {
          oneSearchFlag:false,
          oneAddFlag:false,
          twoDetailFlag:true,    
      },
    };
  },
    
  methods: {
    getData: function(isRefresh){
      var self = this;
      if(isRefresh) {
        this.search.page = 1;
      } 
      Ajax.get('/dataadmin/listMfsupplier', this.search)
        .then(function (response){
          var data = response.data.data;
          self.$set('listMfsupplier',data.list);
          self.search.totalPages = data.totalPages;
        })
    }
  },
  route:{
    activate : function(){
      this.getData();
    }
  }
};
</script>