cert-agent-list.vue 6.01 KB
<!--证照列表:一级代理商-->
<script>
  import model_tab from './cert-tab-include.vue';
  import model_rate from './cert-rate-include.vue';
  module.exports = {
    data: function () {
        return {
          requestS:false,
          tab_index:3,// 标签页  
          licsType:'07',// 证照类型 
          title:'一级代理商',  

          //一级代理商
          dataList:[],
          // 查询条件
          search:{
            pageSize: 50,
            pageNo: 1,
            totalPages: 0,
            total:0,
            // 查询条件
            param:{
              corptype:1,// 一级代理商
              keyvalue:'',
            }
          },
        }
    },
    methods:{
      // 获得初始数据
      getData:function(){
          var self = this;
          self.requestS = true;
          Ajax.post('/supplierProductLic/Agent',self.search)
            .then(function (response) {
              var data = response.data;
              self.requestS = false;
              if(data.errorCode==0){
                self.$set('dataList', data.data.list);

                self.search.pageNo = data.data.pageNo;
                self.search.totalPages = data.data.totalPages;
                self.search.total = data.data.total;
              }else{
                  layer.msg('数据获取异常!');

              }
          });
      },
      // 查询之后的数据:需要初始化页码
      getSearchData:function(){
        var self = this;
        self.search.pageNo = 1;
        self.getData();
      },
      slideup:function(index,guid){
        $(".row-launch:eq("+index+")").slideUp(400,function(){
            $(".ct-row:eq("+index+")").removeClass('active');
            $(".ct-col:eq("+index+")").removeClass('activate');
        });
      },
      slidedown:function(index,guid){
        this.listGoodsByProduct(guid);
        $(".ct-row:eq("+index+")").addClass("active");
        $(".focus:eq("+index+")").addClass('activate');
        $(".row-launch:eq("+index+")").slideDown(400,function(){
        
        });
      }
    },
    route: {
      activate: function () {
        /*var self = this;
        if(self.$store.state.user.userName==""){
          self.MessageBox({
            title:'提示',
            message:'用户已过期',
            type:'alert'
          },function(action){
            // window.location.href="/logout";      
            return ;
          }); 
        }*/
        this.getData();
      }
    },
    components: {
        model_tab,model_rate
    },
  };
</script>
<template>
  <div>
    <div class="container resource close-left-menu contaNEW">
      <!--完整率-->
      <model_rate :licstype="licsType" :title="title" v-on:click="getData"></model_rate>

      <!--不同证照的标签页切换-->
      <model_tab :tab_index="tab_index" :licsnum="search.total"></model_tab>


      <!-- <div class="clearfix pt20">
        <form action="###" class="filter-form fl ">
          <input type="text" placeholder="请输入搜索条件" v-model="search.param.keyvalue">
          <input type="button" @click="getSearchData" value="搜索"></form>
      </div> -->

      <div class="clearfix pt20">
       
        <form class="search-bar" active="###" >
      
          <input type="text" placeholder="输入关键词" class="ipt"  v-model="search.param.keyvalue">
          <div class="search-btn">
            <input type="button"  @click="getSearchData" value="搜索">
          </div>
        </form>
      </div>

      <div class="tab-section">
        <table class="itable itable-thead-13px itable-td-long-text">
          <thead id='t_header'>
            <tr>
              <th class="w50">序号</th>
              <th class="w170">一级代理商</th>
              <th class="w80">供应种类</th>
              <th class="w110">三证一照</th>                    
              <th class="w70">营业执照</th>
              <th class="w70">经营许可证</th>
              <th class="w70">税务登记证</th>
              <th class="w70">组织机构代码证</th>
              <th class="w70">操作</th>                        
            </tr>
          </thead>
          <tbody>
            <tr v-for="agent in dataList">
              <td>{{$index+1}}</td>
              <td class="t-left pr10">
                {{agent.name}}
              </td>
              <td>{{agent.businessclass  | supplierType}}</td>
              <td>
                {{agent.islicthreetoone=='Y'?"是":agent.islicthreetoone=='N'?"否":""}}
              </td>
              <td :class="agent.picCount1>
                0?'':'text-color-red'">
                      {{agent.picCount1>0?"有":"缺"}}
              </td>
              <td :class="agent.picCount5>
                0?'':'text-color-red'">
                      {{agent.picCount5>0?"有":"缺"}}
              </td>
              <td :class="agent.picCount2>
                0?'':'text-color-red'">
                      {{agent.picCount2>0?"有":"缺"}}
              </td>
              <td :class="agent.picCount3>
                0?'':'text-color-red'">
                      {{agent.picCount3>0?"有":"缺"}}
              </td>
              <td>
                <a class="btn button-green" href="javascript:void(0);" v-link="{path:'/certAgent/'+agent.guid}">明细</a>
              </td>
            </tr>
            <tr v-if="dataList.length==0">
              <td colspan="99">未查询到数据!</td>
            </tr>
          </tbody>
        </table>
        <div class="pagination m-20-0" v-if="dataList.length!=0">
          <pagination 
               @page-change="getData" 
               :page-no.sync="search.pageNo" 
               :total-pages.sync="search.totalPages"></pagination>
        </div>
      </div>
    </div>
      <div class="roll-bg" v-if='requestS'>
          <div class="w60" style="margin:0 auto;">
              <img src="/images/roll.gif">
          </div>
          <div class="container resource t-center text-color-red">
              正在处理中,请勿关闭!
          </div>
      </div>
  </div>
</template>