<!DOCTYPE html>
<html>
<head>
    <title>配件搜索_汇配</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <!--这个地方是共用的样式部分start-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="https://static.huiparts.com/new/images/favicon.ico"/>
<link rel="stylesheet" type="text/css" href="https://static.huiparts.com/new/css/common/common.css?v=v1.20260512"/>
<link rel="stylesheet" type="text/css" href="https://static.huiparts.com/new/plugins/jquery-easyui-1.4.4/themes/default/easyui.css?v=v1.20260512"/>
<script type="text/javascript" src="https://static.huiparts.com/new/plugins/jquery/jquery-2.2.1.min.js"></script>
<script type="text/javascript" src="https://static.huiparts.com/new/plugins/jquery/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="https://static.huiparts.com/new/plugins/jquery-easyui-1.4.4/jquery.easyui.min.js?v=v1.20260512"></script>
<script src="https://static.huiparts.com/new/plugins/cookie.min.js"></script>
<script type="text/javascript" src="https://static.huiparts.com/new/js/common/common.js"></script>
<script type="text/javascript" src="https://static.huiparts.com/new/plugins/layer/layer.js"></script>
<script src="https://static.huiparts.com/common/plugins/layui/say-no.js" type="text/javascript"></script>
<script type="text/javascript">
    function openChat(uid = '', msg = '', staffId = 0) {
        let url = '/home/chat';
        if (uid) {
            url += '?uid=' + uid;
            if (staffId > 0) url += '&staffId=' + staffId
            if (msg) msg = '&msg=' + msg, url += msg;
        }
        return window.open(url, 'windowOpenCompanyMessage');
    }
</script>    <link rel="stylesheet" type="text/css" href="https://static.huiparts.com/new/css/common/nav.css?v=v1.20260512"/>
    <link rel="stylesheet" type="text/css" href="https://static.huiparts.com/new/css/common/header.css?v=v1.20260512"/>
    <link rel="stylesheet" type="text/css" href="https://static.huiparts.com/new/css/common/footer.css?v=v1.20260512"/>
    <script type="text/javascript" src="https://static.huiparts.com/new/js/common/bdtj.js?v=v1.20260512"></script>
    <script type="text/javascript">
        var _site_domain = 'huiparts.com',
            _site_cookie = 'bttvU_',
            site_web = 'https://www.huiparts.com',
            site_mem = 'https://i.huiparts.com',
            site_pass = 'https://member.huiparts.com',
            _site_url_www = 'https://www.huiparts.com';
        var jsTmpVal = {is_auth: '', status: '', supMemberId: '', staticUrl: 'https://static.huiparts.com/new',isZhushou:'0',time:'',erpUrl:'',return_work:'',type:'',xing:''};
        var seOption ={
            staffId: '',
            isZhushou: '0',
            is_auth: '',
            url_i: 'https://i.huiparts.com',
            url_s: 'https://static.huiparts.com/new',
            url_w: 'https://www.huiparts.com',
            url_e: 'https://expo.huiparts.com',
            time:'' ,
            erpUrl:'',
            login_url: '/user/login',
            register_url: '/user/register',
            page:'search',
            voice_open: 1,
        }
        // time:Math.random() ,
   </script>
    <!--这个地方是t共用的样式部分-->
</head>
<body>
<div id="wrapper">
    <header>
                <div class="nav" id="nav_new">
    <div class="content">
        <span class="nav_desc">卖不掉的库存，汇配助你消化；买不到的配件，汇配帮你搞定！</span>
                <a href="/user/login/init" title="登录">您好，请<span class="red_text">登录</span></a>
        <a href="/user/register/init" title="注册" class="red_text">免费注册</a>
                <div class="kf_btn">客服电话
            <div class="phone_number">
                <p class="p_bold">客服电话：</p>
                <p>021-60693599</p>
                <p>021-60693555</p>
                <p class="p_bold">客服QQ(远程协助)：</p>
                <p>2885636572</p>
                <p>2885638526(已满)</p>
            </div>
        </div>
        <a href="/home/about">了解汇配</a>
        <a href="/home/help/index">帮助中心</a>
        <a href="https://www.huipartsglobal.com/" target="_blank">English</a>
        <div style="display: none;">
            <div id="message_voice_div_enquiry"></div>
            <div id="message_voice_div_order"></div>
        </div>
    </div>
</div>
<script type="text/javascript" src="https://static.huiparts.com/new/js/common/nav.js?v=v1.20260512"></script>

        <!-- 头部搜索框、广告start -->
<link rel="stylesheet" href="https://static.huiparts.com/new/plugins/ySelect/ySelect.css">
<script type="text/javascript" src="https://static.huiparts.com/new/plugins/ySelect/ySelect.js"></script>
<script type="text/javascript" src="https://static.huiparts.com/new/js/common/header.js?v=v1.20260512"></script>
<script type="text/javascript" src="https://static.huiparts.com/new/js/home/epc.js?v=v1.20260512"></script>
<!-- 头部搜索框、广告end-->
<div class="header">
                        <div id="top_container">
        <!-- 搜索框及logo -->
                <div class="search_container">
            <a href="https://www.huiparts.com" title="汇配首页">
                <img src="https://static.huiparts.com/new/images/Logo_hp.png" alt="汇配" class="Logo">
            </a>
            <!-- 搜索框及发货城市 -->
            <div class="searchContent">
                <!-- 发货城市 -->
                <div class="city_content">
                    <input type="hidden" name="area_id" id="area_id" value="">
                    <input type="text" id="cityname" name="city" value="" placeholder="发货城市">
                    <div id="city_img">
                        <span></span>
                    </div>
                    <div class="plCity" id="plCity"></div>
                </div>
                <textarea name="keywords" type="text" id="commonKey" placeholder="请输入OE码、名称等关键词" class="text_box" autocomplete="off" onfocus="header_op._historyKey();"></textarea>
                <a class="search_btn" href="javascript:;" search_btn='1' onClick="header_op._indexSearch()">
                    <img src="https://static.huiparts.com/new/images/search_new_two.png" alt="搜索">
                    <span>查询</span>
                </a>
                <ul class="historyKey"></ul>
                <a class="sClose">x</a>
                            </div>
                                    <div class="wantBox">
                <span class="noSearch_txt">没找到想要的配件？ 试试发布到求购专区</span>
                <span class="issue_btn" onclick="header_op._addIssue('','')">发布求购</span>
                <a class="wantList" data-url="/#/ware/needBuy/init?page_title=我的求购记录" onclick="header_op._toUrl(this)">求购记录</a>
            </div>
                    </div>
                <div class="top_nav_box">
            <!-- 导航右侧 -->
            <div class="right_icon">
                <a href="/" class="">首页</a>
                <a data-href="/home/hot" data-type="hotWareClick" onclick="header_op._menuUrl(this)" class=" hot_top" title="爆款特价"><img src="https://static.huiparts.com/new/images/hot_top.png" alt="">爆款特价</a>
                <a href="/home/search/chai" title="拆车件" class="">拆车件</a>
                <a href="/home/purchase" class="" title="共享库存查询">求购专区</a>
                <a data-href="/home/auction" title="库存竞拍" data-type="packageClick" onclick="header_op._menuUrl(this)" class="">库存竞拍</a>
                <a href="/home/factory" class="" title="线上展">工厂大全</a>
                <a data-href="/home/search/energy" title="新能源" data-type="energyClick" onclick="header_op._menuUrl(this)" class="">新能源</a>
                <a data-href="/home/soft/init" title="软件市场" data-type="softClick" onclick="header_op._menuUrl(this)" class="">软件市场</a>
                <a href="javascript:epcShow()" style="color: #01317D;font-weight: bold">EPC</a>
                <a href="https://www.huipartsglobal.com/factory" target="_blank" style="color:orangered">Chinese Auto Parts Factories</a>
            </div>

            <span style="float: right">
            <a href="javascript:void(0);"><img src="https://static.huiparts.com/new/images/app.png" style="width: 30px; margin-right: 5px;" onmouseover="header_op._showAppQrCode();" onmouseout="header_op._hideAppQrCode();"/>
                <div class="app_qr_code">
                    <img src="https://static.huiparts.com/new/images/app_qr_code.png" style="width: 160px;"/>
                    <img src="https://static.huiparts.com/new/images/xiao.jpg" style="width: 160px;margin:10px 0;border-left:1px solid #efefef;padding:0 15px"/>
                </div>
            </a>
                        <a class="down_box" href="/home/index/down" target="_blank">
                <img src="https://static.huiparts.com/new/images/huiparts_icon1025.png" alt="汇配助手">
                下载汇配助手
            </a>
            </span>
            <div class="clear"></div>
        </div>
        <!-- EPC查询弹窗start -->
        <div id="epc_container">
            <div class="epc_box">
                <p class="epc_title">
                    EPC查询<span></span>
                    <img src="https://static.huiparts.com/new/images/btn-close.png" alt="" onclick="epcClose();">
                </p>
                <div class="search_info_box">
                    <span>车架号：</span>
                    <input type="text" name="" placeholder="请输入17位车架号，如:LBEXDAEB1BX116172" value="" id="vinBox" autocomplete="off">
                    <ul id="historySearch" class="hidden">
                    </ul>
                </div>
                <p class="info_desc">以下为选填内容</p>
                <div class="search_info_box">
                    <span>关键字：</span>
                    <input type="text" name="" placeholder="OE码、配件名称等关键字" value="" id="keywordsBox" autocomplete="off">
                <ul id="historyKeywords" class="hidden"></ul>
                </div>
                <p class="epBtn_box">
                    <span onclick="epcClose();">取消</span>
                    <span class="epc_search_btn" onclick="epcSearch();">查询</span>
                </p>
            </div>
        </div>
        <!-- EPC查询弹窗end -->
                <!-- 发布求购start -->
        <div id="issueBuyBox">
            <div class="content_box">
                <p class="issue_title">
                    <span>发布求购</span>
                    <img src="https://static.huiparts.com/new/images/close5.png" onclick="header_op._closeIssue()">
                </p>
                <p class="wantbuy_info">
                    <span class="txt_3"><span style="color: #FF0000;">*</span>求购配件：</span>
                    <input id="header_keyword" type="text" name="">
                </p>
                <div class="multiple_select">
                    <span class="txt_3" style="float: left;margin-left: 45px;margin-top: 5px;">品质要求：</span>
                    <select name="" id="header_checked" multiple>
                        <option value="原厂件">原厂件</option>
                        <option value="纯三产">纯三产</option>
                        <option value="组装三产">组装三产</option>
                        <option value="配套品牌件">配套品牌件</option>
                        <option value="品牌件">品牌件</option>
                        <option value="FC">FC</option>
                        <option value="新车拆车件">新车拆车件</option>
                        <option value="拆车件">拆车件</option>
                        <option value="翻新件">翻新件</option>
                    </select>
                </div>
                <p class="wantbuy_info">
                    <span class="txt_3">备注：</span>
                    <input id="header_remark" type="text" name="" placeholder="如：车架号/VIN等">
                </p>
                <p class="issue_bottomBtn">
                    <span onclick="header_op._closeIssue()">取消</span>
                    <span class="right_btn" onclick="header_op._issueSave()">发布</span>
                </p>
            </div>
        </div>
        <!-- 发布求购 end-->
            </div>
</div>            </header>
    <div class="main">
        
<link rel="stylesheet" type="text/css" href="https://static.huiparts.com/new/css/search/pay_result.css?v=v1.20260512"/>
<div id="payResult">
    <div id="payResult_box">
        <p class="payResult_title">交易流程及规则<img src="https://static.huiparts.com/b2b/newcheyipei/images/pay_r_close.png" alt="" onclick="closePayResult();"></p>
        <p style="text-align: center;"><img src="https://static.huiparts.com/b2b/newcheyipei/images/top_tree.png" alt=""></p>
        <p class="payResult_fs16" style="margin-top: 0;">买家</p>
        <p class="payResult_fs14">购买配件：</p>
        <p class="payResult_fs12">1. 从平台采购配件，标有价格的配件可以直接下单。没有价格的配件可以进行询价，如果对方报出的价格合适可以直接下单。</p>
        <p class="payResult_fs14">支付方式：</p>
        <p class="payResult_fs12">1. 您可以选择<b>支付宝</b>或者<b>微信</b>对采购订单进行支付。</p>
        <p class="payResult_fs12">2. 支付后，货款会冻结在卖家的账户中，当采购订单中的采购发货单完成“确认收货”操作后该发货单的货款将自动解冻。解冻后卖家方可进行提现。</p>
        <p class="payResult_fs14">确认收货：</p>
        <p class="payResult_fs12">1.买家收到配件后并确认配件没有问题，在采购订单中点击去收货按钮，前去采购发货单进行收货操作。（一个订单中有多张发货单的情况下，可单独对每张发货单进行确认收货操作）操作完成后该发货单资金将自动解冻，卖家可以对该订单资金进行提现操作。</p>
        <p class="payResult_fs12">2.卖家完成发货后，如买家未及时对该发货单进行处理，则该发货单将在9天后自动完成收货。</p>
        <p class="payResult_fs12">3.当该发货单发货时间超过6天未满9天，买家仍未收到货物时候，可对该发货单进行延长收货操作，操作后收货时间自动延长6天。（每张发货单只能进行一次延长收货操作）</p>
        <p class="payResult_fs16">卖家</p>
        <p class="payResult_fs14">报价：</p>
        <p class="payResult_fs12">1. 收到询价单后直接在询价单上填写配件价格，便于客户下单，积累卖家信用，记录报价历史。</p>
        <p class="payResult_fs14">确认订单与发货：</p>
        <p class="payResult_fs12">1. 当收到已付款的订单，可以直接从消息界面进入，点击确认订单并完成发货。</p>
        <p class="payResult_fs12">2. 可根据库存情况分批发货。</p>
        <p class="payResult_fs12">3. 当配件发出后如果买家没有及时进行确认收货操作，该发货单将在9天后自动完成收货。完成后该发货单的金额自动解冻，卖家方可进行提现。</p>
        <p class="payResult_fs12">4. 如果发货时间超过6天，买家仍未收到货物，买家可以进行延长收货操作。收货时间自动增加6天。（每张发货单最多可进行一次延长收货操作）</p>
        <p class="payResult_fs14">提现：</p>
        <p class="payResult_fs12">1. 进入更多管理后台，点击余额下方的去提现按钮进入提现页面。输入提现金额，选择提现方式，点击确认提现即可。</p>
        <p class="payResult_fs12">2. 提现到账时间为：T+1天。</p>
        <p class="payResult_fs16">维权流程</p>
        <p style="text-align: center;"><img src="https://static.huiparts.com/b2b/newcheyipei/images/bottom-tree.png" alt=""></p>
    </div>
</div>
<script>
$("#payResult_box").draggable()
function closePayResult() {
    $("#payResult").hide()
}
function showPayResult() {
    $("#payResult").show()
}

$("#payResult").click(function(e) {
    if (!$(e.target).closest("#payResult_box").length) {
        $("#payResult").hide();
    }
})
</script>
<!--搜索结果-->
<!--搜索结果引入start-->
<link rel="stylesheet" type="text/css" href="https://static.huiparts.com/new/css/home/search.css?v=260525"/>
<link rel="stylesheet" type="text/css"
      href="https://static.huiparts.com/common/jquery-easyui-1.4.4/themes/default/easyui.css?v=v1.20260512"/>
<link rel="stylesheet" type="text/css" href="https://static.huiparts.com/common/css/layout.css?v=v1.20260512"/>
<link rel="stylesheet" type="text/css" href="https://static.huiparts.com/new/plugins/laypage/laypage.css"/>
<link rel="stylesheet" type="text/css" href="https://static.huiparts.com/new/css/home/adshow.css?v=v1.20260512"/>
<script type="text/javascript" src="https://static.huiparts.com/new/plugins/vue/vue.js"></script>
<script type="text/javascript" src="https://static.huiparts.com/new/plugins/vue/vue-resource.min.js"></script>
<script type="text/javascript" src="https://static.huiparts.com/new/plugins/jquery-easyui-1.4.4/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="https://static.huiparts.com/new/plugins/laypage/laypage.js"></script>

<!--搜索结果引入end1-->
<script>
    var reg_txt = /^[A-Za-z0-9]+$/;
    var keywords = GetQueryString("keywords");
</script>
<div id='top_div'></div>
<div id="search" class="search">
    <template>
        <div v-if="keywordsImg.length > 0" id="ad_box" v-cloak style="height:120px;">
            <dl id="slider_one">
                <dd v-for="item in keywordsImg">
                    <a href="javascript:void(0);" :data-id="item.ad_id" :data-url="item.url" data-type="顶部"
                       onclick="adClick(this);" tab="0" :target_type="item.open_type==2?'_blank':''">
                        <img :src="item.photo" alt="">
                    </a>
                </dd>
            </dl>
        </div>
        <div class="factoryContainer" style="float:right;width:240px;">
            <ul class="factoryContent">
                                <li class="rightKeywords-item" v-for="item in rightKeywordsImg">
                    <a href="javascript:void(0);" :data-id="item.ad_id" :data-url="item.url" onclick="adClick(this);" tab="0" :target_type="item.open_type==2?'_blank':''">
                        <img :src="item.photo" alt="" width="100%">
                    </a>
                </li>
                <li class="flagship-item" v-for="item in flagshipList">
                    <a :href="item.url" target="_blank" :title="item.company_name">
                        <p style="height: 48px;"><img :src="item.logo+'?x-oss-process=image/quality,q_70'" alt="" class="shop-logo"></p>
                        <p class="company-info">
                            <span class="company-name" :title="item.company_name">{{item.company_name}}</span>
                            <span class="address-box"><img src="https://static.huiparts.com/new/images/position.png" alt="">{{item.area_name}}</span>
                        </p>
                        <p class="main-car">主营：{{item.main_car}}</p>
                    </a>
                </li>
            </ul>
        </div>
        <div id="storeStat" v-if="(statData && statData.price.length>0)">
            <span @click="remindStat();">共查到 “{{statData.code}}”平台总库存数：{{statData.hasPay>0?statData.stNum:'**'}}，
            有库存商家数：{{statData.hasPay>0?statData.stCom:'**'}}，
            {{statData.fPrice>0 ? ('4S店参考价：'+(statData.hasPay>0?statData.fPrice:'**')+',') :''}}
                市场价格范围：{{statData.hasPay>0?statData.price:'**～**'}}。</span>
            <a href="javascript:;" @click="remindStat();">点击查看具体价格</a>
            <a href="javascript:;" @click="remindStat(1);">汇配AI大模型定价</a>
        </div>
        <div class="search_list" v-if="bigBusinessList.length > 0" style="margin-bottom: 20px;">
            <p class="infoTxt" v-cloak>
                <span class="infoTxt_box">保障交易专区（在线直接下单，平台提供保障）</span>
                <span onclick="showPayResult();">在线下单，担保支付；保障货款安全。<span>交易流程及规则>></span></span>
            </p>
                        <div style="width: 935px;float:left;">
    <table style="width: 935px;">
        <tr class="list_header">
            <th width="215">配件名称/OE号</th>
            <th width="180">品牌 | 品质 | 产地/车型</th>
            <th width="275">供应商</th>
            <th width="70">价格/单位</th>
            <th width="35">库存</th>
            <th width="110">操作</th>
        </tr>
        <tr class="searchInfo" v-for="(item,index) in bigBusinessList">
            <td>
    <div style="width: 215px; overflow: hidden" :title="item.install">
    <img v-if="item.is_special == 1" src="https://static.huiparts.com/new/images/tejia.png" alt="" class="tejia_pic">
    <span :class="'ware_name'+ item.is_special?'te_ware_name':item.is_hot?'hot_ware_name':''">
        <span v-if="item.is_top == 1" class="icon_bk" title="置顶">置顶</span>
        <a class="ware_img_btn" v-if="item.ware_img.length>30" @click="viewImg(item)">图片</a>
        {{item.ware_name}}
    </span>
    <span v-if="item.is_hot == 1" style="color: #999;">
        <img src="https://static.huiparts.com/new/images/hot_icon_bg.png" alt="">
        <span v-if='item.min_num > 0'>起订量：{{item.min_num}}</span>
    </span>
    <p class="ware_name" :title="item.ware_code">{{item.ware_code}}</p>
</div></td>
<td>
    <div style="width: 180px; overflow: hidden">
	<p v-if="item.supBrand && item.supBrand.id>0" style="line-height: 40px;" onclick="openBrand(this)" :vid="item.supBrand.id">
		<img :src="item.supBrand.logo" height="40" :title="'超级品牌-'+item.supBrand.name"> <em>{{item.supBrand.name}}</em>
	</p>
    <span v-if="item.brand == '' && item.quality == '' && item.origin == ''"></span>
    <span v-else class="ware_info top_info" :title="item.brand + '  ' + item.quality + '  ' + item.origin">
         {{item.brand}}<span v-if="item.brand != '' && item.quality != ''">|</span>{{item.quality}}
        <span v-if="(item.brand != '' || item.quality != '') && item.origin != ''">|</span>{{item.origin}}
    </span>
    <p style="display: flex; justify-content: space-between;">
    	<span :title="item.car_desc">{{item.car_desc}}</span>
    	<span v-if="item.car_desc != ''" style="padding-right: 24px;">
	    			    <a href="https://www.huiparts.com/user/login/init" title="" class="view_btn">登录后查看车型</a>
		    		</span>
    </p>
</div></td>
<td>
    <div style="width: 275px;" class="pClick rComp" :uid="item.uid" :cid="item.member_id" :msg="item.ware_code+' '+item.ware_name+' '+item.brand+' '+item.quality">
        <a class="txt_3 company_name_box wid_hid" href="https://www.huiparts.com/user/login/init" style="margin: 0;">
        {{item.company_name}}</a>
        <img v-if="item.is_online == 1" src="https://static.huiparts.com/new/images/is_online.png" title="在线"
         style="margin-top: 4px;margin-left: 2px;">
    <img v-else-if="item.is_online == 0 && item.mobile_online == 0"
         src="https://static.huiparts.com/new/images/no_online.png" title="离线"
         style="margin-top: 4px;margin-left: 2px;">
    <img v-else-if="item.is_online == 0 && item.mobile_online == 1"
         src="https://static.huiparts.com/new/images/mobile_online1.png" title="手机在线" style="margin-left: 2px;">
    <br>
    <a v-if="item.sign_icon == 1" class="icon_bk" title="VIP"
       href="https://i.huiparts.com/#/supplier/service/index?from=2&page_title=服务开通"
       target="_blank">VIP</a>
    <a v-if="item.sign_icon == 3" class="icon_bk" title="同城VIP"
       href="https://i.huiparts.com/#/supplier/service/index?from=4&page_title=服务开通"
       target="_blank">同城VIP</a>
    <a v-if="item.sign_icon == 4" class="icon_bk_blue" title="会员"
       href="https://i.huiparts.com/#/supplier/service/index?from=9&page_title=服务开通"
       target="_blank">会员</a>
    <a href="https://i.huiparts.com/#/supplier/service/index?from=1&page_title=服务开通"
       target="_blank"
       v-if="item.company_type == 1 || item.company_type == 2">
        <img v-if="item.company_type == 1" src="https://static.huiparts.com/new/images/gongchang.png" title="工厂店铺">
        <img v-if="item.company_type == 2" src="https://static.huiparts.com/new/images/pifashang.png" title="批发商">
    </a>
    <a :href="item.shop_url"
       v-if="item.shop_url && (item.company_type == 1 || item.company_type == 2)"
       class="icon_bk" target="_blank">进入店铺</a>
    <img v-if="item.stock_update == 1" src="https://static.huiparts.com/new/images/2.png" title="库存同步" width="30">
    <span v-if="item.tagList"><span v-for="tg in item.tagList" :style="'color:'+tg.color">{{tg.name}} </span></span>
    <span style="color:#ccc;" v-if="item.return_work != 1">休息中</span>
    <div style="color:#ccc;" v-if="item.sign_guarantee == 2 && item.stock_update == 2">库存更新不及时，仅供参考</div>
</div>

</td>
<td class="red_price">
    <div style="width: 70px;">
        <a href="https://www.huiparts.com/user/login/init" title="" class="view_btn">登录后查看</a>
    </div></td>
<td>
    <div style="width: 35px;">
    <span class="txt_9" v-if="item.virtual_stock > 10">10+</span>
    <span class="txt_9" v-else>{{item.virtual_stock}}</span>
</div></td>
<td class="variable_item">
    <div style="width: 110px;" class="pClick" :uid="item.uid" :sid="item.supplier_id" :cid="item.member_id">
    <span v-if="item.shelf==1&&item.off_buy!=1&&item.share_price>0">
        <input type="number" :min="item.min_num>0?item.min_num:1" :value="item.min_num>0?item.min_num:1" name="" :class="'num_box num_box'+key+'_'+index" @input="changeNum">
        <img src="https://static.huiparts.com/new/images/shopping_car111.png" @click="addCart(key+'_'+index,item.quote_id,item.member_id)"
             class="add_shop_btn" alt="" title="加入购物车">
        <a @click="buyBtn(key+'_'+index,item.quote_id,item.member_id)" class="buy_btn">购买</a>
    </span>
    <!-- 询价 -->
    <span v-else>
        <span :class="'buy_btn stock_show stock_show'+key+'_'+index"
              @click="askPrice($event,key+'_'+index)">询价</span>
        <a :class="'buy_btn stock_hide stock_hide'+key+'_'+index" onclick="clickCompany(this,0)">沟通</a>
    </span>
</div></td>
        </tr>
    </table>
</div>                    </div>
        <div class="search_list" v-if="bigTuanList.length > 0" style="margin-bottom: 20px;">
            <p class="infoTxt" v-cloak>
                <span class="infoTxt_box">热销团购（在线直接下单，平台提供保障）</span>
                <span onclick="showPayResult();">在线下单，担保支付；保障货款安全。<span>交易流程及规则>></span></span>
            </p>
            <div style="width: 935px;float:left;">
    <table style="width: 935px;">
        <tr class="list_header">
            <th width="215">团购名称/OE号</th>
            <th width="180">品牌 | 品质 | 产地/车型</th>
            <th width="275">供应商</th>
            <th width="70">价格/单位</th>
            <th width="35">库存</th>
            <th width="110">操作</th>
        </tr>
        <tr class="searchInfo rowTr" v-for="(item,index) in bigTuanList">
            <td>
                <div style="width: 215px; overflow: hidden">
    <span class="ware_name te_ware_name">
    	<a class="ware_img_btn" v-if="item.ware_img.length>30" @click="viewImg(item)">图片</a>
        <a :href="item.tuanUrl" style="color:#FF481A">{{item.ware_name}}</a>
    </span>
    <p :title="item.ware_code">{{item.ware_code}}
        <span style="color: #999;padding-left:10px" v-if='item.min_num > 0'>
        起订量：{{item.min_num}}
    </span></p>
</div>            </td>
            <td>
                <div style="width: 180px; overflow: hidden">
	<p v-if="item.supBrand && item.supBrand.id>0" style="line-height: 40px;" onclick="openBrand(this)" :vid="item.supBrand.id">
		<img :src="item.supBrand.logo" height="40" :title="'超级品牌-'+item.supBrand.name"> <em>{{item.supBrand.name}}</em>
	</p>
    <span v-if="item.brand == '' && item.quality == '' && item.origin == ''"></span>
    <span v-else class="ware_info top_info" :title="item.brand + '  ' + item.quality + '  ' + item.origin">
         {{item.brand}}<span v-if="item.brand != '' && item.quality != ''">|</span>{{item.quality}}
        <span v-if="(item.brand != '' || item.quality != '') && item.origin != ''">|</span>{{item.origin}}
    </span>
    <p style="display: flex; justify-content: space-between;">
    	<span :title="item.car_desc">{{item.car_desc}}</span>
    	<span v-if="item.car_desc != ''" style="padding-right: 24px;">
	    			    <a href="https://www.huiparts.com/user/login/init" title="" class="view_btn">登录后查看车型</a>
		    		</span>
    </p>
</div>            </td>
            <td>
                <div style="width: 275px;" class="pClick rComp" :uid="item.uid" :cid="item.member_id" :msg="item.ware_code+' '+item.ware_name+' '+item.brand+' '+item.quality">
        <a class="txt_3 company_name_box wid_hid" href="https://www.huiparts.com/user/login/init" style="margin: 0;">
        {{item.company_name}}</a>
        <img v-if="item.is_online == 1" src="https://static.huiparts.com/new/images/is_online.png" title="在线"
         style="margin-top: 4px;margin-left: 2px;">
    <img v-else-if="item.is_online == 0 && item.mobile_online == 0"
         src="https://static.huiparts.com/new/images/no_online.png" title="离线"
         style="margin-top: 4px;margin-left: 2px;">
    <img v-else-if="item.is_online == 0 && item.mobile_online == 1"
         src="https://static.huiparts.com/new/images/mobile_online1.png" title="手机在线" style="margin-left: 2px;">
    <br>
    <a v-if="item.sign_icon == 1" class="icon_bk" title="VIP"
       href="https://i.huiparts.com/#/supplier/service/index?from=2&page_title=服务开通"
       target="_blank">VIP</a>
    <a v-if="item.sign_icon == 3" class="icon_bk" title="同城VIP"
       href="https://i.huiparts.com/#/supplier/service/index?from=4&page_title=服务开通"
       target="_blank">同城VIP</a>
    <a v-if="item.sign_icon == 4" class="icon_bk_blue" title="会员"
       href="https://i.huiparts.com/#/supplier/service/index?from=9&page_title=服务开通"
       target="_blank">会员</a>
    <a href="https://i.huiparts.com/#/supplier/service/index?from=1&page_title=服务开通"
       target="_blank"
       v-if="item.company_type == 1 || item.company_type == 2">
        <img v-if="item.company_type == 1" src="https://static.huiparts.com/new/images/gongchang.png" title="工厂店铺">
        <img v-if="item.company_type == 2" src="https://static.huiparts.com/new/images/pifashang.png" title="批发商">
    </a>
    <a :href="item.shop_url"
       v-if="item.shop_url && (item.company_type == 1 || item.company_type == 2)"
       class="icon_bk" target="_blank">进入店铺</a>
    <img v-if="item.stock_update == 1" src="https://static.huiparts.com/new/images/2.png" title="库存同步" width="30">
    <span v-if="item.tagList"><span v-for="tg in item.tagList" :style="'color:'+tg.color">{{tg.name}} </span></span>
    <span style="color:#ccc;" v-if="item.return_work != 1">休息中</span>
    <div style="color:#ccc;" v-if="item.sign_guarantee == 2 && item.stock_update == 2">库存更新不及时，仅供参考</div>
</div>

            </td>
            <td class="red_price">
                <div style="width: 70px;">
        <a href="https://www.huiparts.com/user/login/init" title="" class="view_btn">登录后查看</a>
    </div>            </td>
            <td>
                <div style="width: 35px;">
    <span class="txt_9" v-if="item.virtual_stock > 10">10+</span>
    <span class="txt_9" v-else>{{item.virtual_stock}}</span>
</div>            </td>
            <td class="variable_item">
                <div style="width: 110px;">
    <span>
        <input type="number" :min="item.min_num>0?item.min_num:1" :value="item.min_num>0?item.min_num:1" name="" :class="'num_box num_box'+key+'_'+index" @input="changeNum">
        <img src="https://static.huiparts.com/new/images/shopping_car111.png" @click="addCart(key+'_'+index,0,item.member_id,0,item.tuanId)"
             class="add_shop_btn" alt="" title="加入购物车">
        <a @click="buyBtn(key+'_'+index,0,item.member_id,item.tuanId)" class="buy_btn">购买</a>
    </span>
</div>            </td>
        </tr>
    </table>
</div>        </div>
        <div class="search_list">
            <div class="infoTxt" v-cloak style="display: inline-table;">
                <span class="infoTxt_box">查询结果</span>
                <span class="checkBox" style="width: 800px;margin-left: 10px;">
                                                    <div id="filterQua">
                        <div id="myQuaOption"><a href="javascript:;">全部品质</a>
                        <img src="https://static.huiparts.com/new/images/qua_down.png" style="width: 20px;margin-top: 5px;margin-left: -5px;" />
                        </div>
                        <ul class="quaUl">
                            <li vid="0" vTitle="全部品质">全部</li>
                            <li vid="1" vTitle="原厂/配套">原厂/配套</li>
                            <li vid="4" vTitle="品牌/副厂">品牌/副厂</li>
                            <li vid="5" vTitle="拆车/再制造">拆车/再制造</li>
                            <li vid="6" vTitle="其他品质">其他</li>
                        </ul>
                    </div>
                                </span>
                <img src="https://static.huiparts.com/new/images/1111.png" style="float:right; margin: 8px 8px 0;cursor: pointer" onclick="openSet()">
            </div>
                        <div v-show="condSearchNoMsg" style="text-align: center;background: #fff;line-height: 24px;color: #ff0000;font-size: 16px;margin-top: 20px;margin-bottom: 20px;">
    <span>{{condSearchNoMsg}}</span>
</div>
<div v-show="isShowNo && notUpdate" style="text-align: center;background: #fff;line-height: 24px;color: #ff0000;font-size: 16px">
    在实时更新的库存中没有找到与 '{{searchData.keywords}}' 相符合的配件信息。
    <span>{{notUpdateAutoShowTxt}}</span>
    <span @click="askFoldReason();" style="cursor: pointer;">{{foldReason}}</span>
</div>
<div style="width: 935px;float:left;" v-show="searchTable" id="tableDiv">
        <table style="width: 935px;">
        <tr class="list_header">
            <th width="215">配件名称/OE号</th>
            <th width="180">品牌 | 品质 | 产地/车型</th>
            <th width="275">供应商</th>
            <th width="70">价格/单位</th>
            <th width="35">库存</th>
            <th width="110">操作</th>
        </tr>
        <tr class="searchInfo rowTr" v-for="(item,index) in wareList">
            <td>
    <div style="width: 215px; overflow: hidden" :title="item.install">
    <img v-if="item.is_special == 1" src="https://static.huiparts.com/new/images/tejia.png" alt="" class="tejia_pic">
    <span :class="'ware_name'+ item.is_special?'te_ware_name':item.is_hot?'hot_ware_name':''">
        <span v-if="item.is_top == 1" class="icon_bk" title="置顶">置顶</span>
        <a class="ware_img_btn" v-if="item.ware_img.length>30" @click="viewImg(item)">图片</a>
        {{item.ware_name}}
    </span>
    <span v-if="item.is_hot == 1" style="color: #999;">
        <img src="https://static.huiparts.com/new/images/hot_icon_bg.png" alt="">
        <span v-if='item.min_num > 0'>起订量：{{item.min_num}}</span>
    </span>
    <p class="ware_name" :title="item.ware_code">{{item.ware_code}}</p>
</div></td>
<td>
    <div style="width: 180px; overflow: hidden">
	<p v-if="item.supBrand && item.supBrand.id>0" style="line-height: 40px;" onclick="openBrand(this)" :vid="item.supBrand.id">
		<img :src="item.supBrand.logo" height="40" :title="'超级品牌-'+item.supBrand.name"> <em>{{item.supBrand.name}}</em>
	</p>
    <span v-if="item.brand == '' && item.quality == '' && item.origin == ''"></span>
    <span v-else class="ware_info top_info" :title="item.brand + '  ' + item.quality + '  ' + item.origin">
         {{item.brand}}<span v-if="item.brand != '' && item.quality != ''">|</span>{{item.quality}}
        <span v-if="(item.brand != '' || item.quality != '') && item.origin != ''">|</span>{{item.origin}}
    </span>
    <p style="display: flex; justify-content: space-between;">
    	<span :title="item.car_desc">{{item.car_desc}}</span>
    	<span v-if="item.car_desc != ''" style="padding-right: 24px;">
	    			    <a href="https://www.huiparts.com/user/login/init" title="" class="view_btn">登录后查看车型</a>
		    		</span>
    </p>
</div></td>
<td>
    <div style="width: 275px;" class="pClick rComp" :uid="item.uid" :cid="item.member_id" :msg="item.ware_code+' '+item.ware_name+' '+item.brand+' '+item.quality">
        <a class="txt_3 company_name_box wid_hid" href="https://www.huiparts.com/user/login/init" style="margin: 0;">
        {{item.company_name}}</a>
        <img v-if="item.is_online == 1" src="https://static.huiparts.com/new/images/is_online.png" title="在线"
         style="margin-top: 4px;margin-left: 2px;">
    <img v-else-if="item.is_online == 0 && item.mobile_online == 0"
         src="https://static.huiparts.com/new/images/no_online.png" title="离线"
         style="margin-top: 4px;margin-left: 2px;">
    <img v-else-if="item.is_online == 0 && item.mobile_online == 1"
         src="https://static.huiparts.com/new/images/mobile_online1.png" title="手机在线" style="margin-left: 2px;">
    <br>
    <a v-if="item.sign_icon == 1" class="icon_bk" title="VIP"
       href="https://i.huiparts.com/#/supplier/service/index?from=2&page_title=服务开通"
       target="_blank">VIP</a>
    <a v-if="item.sign_icon == 3" class="icon_bk" title="同城VIP"
       href="https://i.huiparts.com/#/supplier/service/index?from=4&page_title=服务开通"
       target="_blank">同城VIP</a>
    <a v-if="item.sign_icon == 4" class="icon_bk_blue" title="会员"
       href="https://i.huiparts.com/#/supplier/service/index?from=9&page_title=服务开通"
       target="_blank">会员</a>
    <a href="https://i.huiparts.com/#/supplier/service/index?from=1&page_title=服务开通"
       target="_blank"
       v-if="item.company_type == 1 || item.company_type == 2">
        <img v-if="item.company_type == 1" src="https://static.huiparts.com/new/images/gongchang.png" title="工厂店铺">
        <img v-if="item.company_type == 2" src="https://static.huiparts.com/new/images/pifashang.png" title="批发商">
    </a>
    <a :href="item.shop_url"
       v-if="item.shop_url && (item.company_type == 1 || item.company_type == 2)"
       class="icon_bk" target="_blank">进入店铺</a>
    <img v-if="item.stock_update == 1" src="https://static.huiparts.com/new/images/2.png" title="库存同步" width="30">
    <span v-if="item.tagList"><span v-for="tg in item.tagList" :style="'color:'+tg.color">{{tg.name}} </span></span>
    <span style="color:#ccc;" v-if="item.return_work != 1">休息中</span>
    <div style="color:#ccc;" v-if="item.sign_guarantee == 2 && item.stock_update == 2">库存更新不及时，仅供参考</div>
</div>

</td>
<td class="red_price">
    <div style="width: 70px;">
        <a href="https://www.huiparts.com/user/login/init" title="" class="view_btn">登录后查看</a>
    </div></td>
<td>
    <div style="width: 35px;">
    <span class="txt_9" v-if="item.virtual_stock > 10">10+</span>
    <span class="txt_9" v-else>{{item.virtual_stock}}</span>
</div></td>
<td class="variable_item">
    <div style="width: 110px;" class="pClick" :uid="item.uid" :sid="item.supplier_id" :cid="item.member_id">
    <span v-if="item.shelf==1&&item.off_buy!=1&&item.share_price>0">
        <input type="number" :min="item.min_num>0?item.min_num:1" :value="item.min_num>0?item.min_num:1" name="" :class="'num_box num_box'+key+'_'+index" @input="changeNum">
        <img src="https://static.huiparts.com/new/images/shopping_car111.png" @click="addCart(key+'_'+index,item.quote_id,item.member_id)"
             class="add_shop_btn" alt="" title="加入购物车">
        <a @click="buyBtn(key+'_'+index,item.quote_id,item.member_id)" class="buy_btn">购买</a>
    </span>
    <!-- 询价 -->
    <span v-else>
        <span :class="'buy_btn stock_show stock_show'+key+'_'+index"
              @click="askPrice($event,key+'_'+index)">询价</span>
        <a :class="'buy_btn stock_hide stock_hide'+key+'_'+index" onclick="clickCompany(this,0)">沟通</a>
    </span>
</div></td>
        </tr>
    </table>
        <div class="LoadBox" v-show="Loading"><span><img src="https://static.huiparts.com/new/images/loading.gif"
                                                     alt="">数据加载中，请稍等</span></div>
    <div id="recall_box" v-show="isShowNo">
        <div v-if="errorMsg" class="error_msg">
            {{errorMsg}}<a class="error_btn" href="javascript:void(0);" @click="reloadPage">点击再试试看</a>
        </div>
        <div v-else>
                        <span v-if="searchStatus==2">请不要在短时间重复查询，稍后再试。</span>
            <span v-else-if="searchStatus==403" >
                请不要在短时间内大量查询！！如果有特别需要可开通《数据洞察》服务，提高查询频率限制门槛。
                <a style="text-decoration: underline;" href="https://i.huiparts.com/#/supplier/service/index?from=5&page_title=服务开通" target="_blank">点我立刻开通</a></span>
            <span v-else-if="searchData.collect==1" style="font-size: 26px;">
                暂时没有在您收藏的商家库存中查询到配件信息。<br>您可以通过对话页面收藏配件商，方便查询指定配件商的库存信息！
                <div>
                    <img src="https://static.huiparts.com/new/images/collect_company.png" style="width:90%" />
                </div>
            </span>
            <span v-else-if="!notUpdate">
                在实时更新的库存中没有找到与 '{{searchData.keywords}}' 相符合的配件信息。<span v-show="isShowNoRecall">已帮你发布求购到查询未得 <span id="recall_box_btn" @click="recallSearch">撤回</span></span>
            </span>
                                </div>
    </div>
    <div class="page">
        <div id="pageId" style="display: none"></div>
        <div @click="showNotUpdateList();" style="cursor: pointer;text-align: left;" v-show="!isShowNo">{{notUpdateTxt}}</div>
        <div @click="askFoldReason();" style="cursor: pointer;text-align: left;margin-top: 10px;" v-show="!isShowNo">{{foldReason}}</div>
    </div>
    <div style="text-align: center; padding: 10px; color:#fff; background: #f60; margin: 10px 0; display: none" id="showPayUser">
    还有更多结果暂未展示，成为会员，可以查看更多搜索结果！<a href="https://i.huiparts.com/#/supplier/service/index?page_title=服务开通" style="padding: 5px 10px; background: #fff;color:#f60;border-radius: 16px;" target="_blank">点此开通》</a></div>
    </div>
<div class="imgGallery" style="display: none">
    <a :href="item" class="fancybox" data-fancybox-group="thumb" v-for="item in imgList"></a>
</div>        </div>
        <div style="width: 935px; float: left;">
            <p v-show="searchTable" class="want_title" v-cloak>没找到想要的配件？试试发布到求购专区<span
                    class="txt_9">发布一个求购，全国配件商为您服务！</span></p>
            <div id="wantBuyBox" v-show="searchTable" v-cloak>
                <div class="wantbuy_info_div">
                    <p class="wantbuy_info_box">
                        <span class="txt_3"><span style="color: #FF0000;">*</span>求购配件：</span>
                        <input type="text" name="" v-model="searchData.keywords">
                    </p>
                    <div class="multiple_select2">
                        <span class="txt_3" style="float: left;margin-top: 9px;">品质要求：</span>
                        <select name="" id="checkedLevel2" multiple>
                            <option value="原厂件">原厂件</option>
                            <option value="纯三产">纯三产</option>
                            <option value="组装三产">组装三产</option>
                            <option value="配套品牌件">配套品牌件</option>
                            <option value="品牌件">品牌件</option>
                            <option value="FC">FC</option>
                            <option value="新车拆车件">新车拆车件</option>
                            <option value="拆车件">拆车件</option>
                            <option value="翻新件">翻新件</option>
                        </select>
                    </div>
                    <p class="wantbuy_info_box">
                        <span class="txt_3">备注：</span>
                        <input v-model="select.remark" type="text" name="" placeholder="如：车架号/VIN等">
                    </p>
                    
                </div>
                <div class="wantbuy_btn">
                    <span class="btn" @click="addIssue('checkedLevel2')">立即发布一个求购</span>
                </div>
            </div>
        </div>
        <div v-if="searchBottomImg.length > 0" id="ad_box_bottom" v-cloak>
            <dl id="slider_one_bottom">
                <dd v-for="item in searchBottomImg">
                    <a href="javascript:void(0);" :data-id="item.ad_id" :data-url="item.url" data-type="顶部"
                       onclick="adClick(this);" tab="0" :target_type="item.open_type==2?'_blank':''">
                        <img :src="item.photo" alt="">
                    </a>
                </dd>
            </dl>
        </div>
    </template>
</div>
<div style="display: inline-block;width:935px;">
        <script type="text/javascript">
        var jd_union_pid="60431703748712426";var jd_union_euid="";
    </script>
        <script type="text/javascript">
        var jd_script = document.createElement('script');
        jd_script.src = 'https://ads-union.jd.com/static/js/union.js';
        jd_script.async = true; // 设置为异步
        document.head.appendChild(jd_script);
    </script>
</div>
<div class="sideBar">
    <a href="#top_div" id="back_top">
        <img src="https://static.huiparts.com/b2b/newcheyipei/images/shop_top_new.png" alt="回到顶部"></a>
    <p style="margin-bottom: 5px;"></p>
</div><!-- 报价提醒 -->
<style>
    #unQuoted{
        padding: 20px;
        display: none;
    }
    #unQuoted_msg{
        font-size: 20px;
        margin: 10px 0 0 10px;
    }
    .unQuoted_img{
        margin: 10px 0 0 10px;
        width:550px;
    }
    .unQuoted_button_div{
        margin-top: 10px;
        text-align: center;
    }
    .unQuoted_button{
        font-size: 20px;
        height: 40px;
        padding: 5px 20px;
        background-color: #0099cc;
        border-color: #0099cc;
        color: #FFF;
    }
</style>
<div id="unQuoted">
    <div id="unQuoted_msg">您今天有<span id="unQuoted_count">1</span>张询价单未报价，请按照下面图中方式去报价！及时准确报价会获得分值，提升排名。</div>
    <img class="unQuoted_img" src="https://static.huiparts.com/new/images/unQuoted.png" />
    <div class="unQuoted_button_div">
        <input type="button" class="unQuoted_button" value="点击去报价" uid="0" onclick="toQuote(this);">
        <input type="button" class="unQuoted_button" style="margin-left: 30px;" value="今日不再提醒" onclick="noQuoteRemind();">
    </div>
</div>
<script>
    var unQuotedLayer;
    $(function(){
        showUnQuoted();
    });
    function showUnQuoted(){
        if (Cookies.get('unQuoted') == 1) {
            return;
        }
        $.get('/homeApi/quoteApi/unQuotedCheck', function (res) {
            if(res.code == 0){
                var NowTime = new Date();
                NowTime.setTime(NowTime.getTime()+60*60*1000);//有效期1小时
                Cookies.set('unQuoted', 1, {expires: NowTime, path: '/'});
                var data = res.data;
                if(data.to_remind == 1){
                    $('#unQuoted_count').text(data.count);
                    $('.unQuoted_button').attr('uid', data.uid);
                    unQuotedLayer = layer.open({
                        type:1,
                        title: false,
                        closeBtn: 0,
                        shadeClose: false,
                        isOutAnim: false,
                        area: ['600px', '480px'],
                        content: $('#unQuoted'),
                        success:function(){
                        },
                    })
                }
            } 
        }, 'json');
    }
    function toQuote(obj){
        layer.close(unQuotedLayer);
        var uid = $(obj).attr('uid');
        openChat(uid)
    }
    function noQuoteRemind(){
        Cookies.set('unQuoted', 1, {expires: 1, path: '/'});
        layer.close(unQuotedLayer);
    }
</script><script>
    var mySearchData = {
        area_type: 0, // 0=全部 1=本地
        has_price: '0', // 是否有价格 0=否 1=是
        accurate: '0', // 是否精准查询 0=否 1=是
        collect: 0, // 是否是收藏 0=否 1=是
        wareCityId: '0', // 汽配城ID
        soCityId: '0', // 省市ID
        soQuaId: '0', // 省市ID
        soSimple: '0',
        brandId : '',
        canSearch: '0',
        is_special: 0,
        cate_id: '',
        quality: '',
        area_id: GetQueryString("area_id"),
        epc_search: GetQueryString("epc_search"),
        erp_search: GetQueryString("erp_search"),
        is_db: 0,
        keywords: '',
        city: GetQueryString("city"),
        to_member: GetQueryString('to_member'),
        page: 1,
        rows: 20
    }, myFrom = ''

    var outputJson = [],tuanJson=[],wareCityListJson=[];
</script>
<script type="text/javascript" src="https://static.huiparts.com/b2b/newcheyipei/lib/layer/layer.js"></script>
<script type="text/javascript" src="https://static.huiparts.com/static/js/plugins/fancyBox/source/jquery.fancybox.js?v=v1.20260512"></script>
<script type="text/javascript" src="https://static.huiparts.com/static/js/plugins/fancyBox/lib/jquery.mousewheel-3.0.6.pack.js?v=v1.20260512"></script>
<link rel="stylesheet" href="https://static.huiparts.com/static/js/plugins/fancyBox/source/jquery.fancybox.css" type="text/css" media="screen" />
<script type="text/javascript" src="https://static.huiparts.com/b2b/pagejs/adSlider.js?v=v1.20260512"></script>
<script>
    var app = new Vue({
        el: "#search",
        data() {
            return {
                imgList: [],          // 图片
                Loading: false,
                hasNext: false,
                isShowNo: false,
                isShowNoRecall: false,
                searchTxt: '',
                searchNo: true,
                searchTable: true,
                chaiCompanyListTable: false,
                energyCompanyListTable: false,
                energyCompany: [],
                energyCompanyPageNum: 1,
                energy: [],
                canBuy: true,
                searchData: mySearchData,
                select: {
                    keywords: '',
                    remark: ''
                },
                wareList: [],
                staffId: '',
                keywordsImg: [],
                rightKeywordsImg: [],
                factoryData: {
                    keywords: '',
                    wareCodePre: '',
                    number: '',
                },
                statData: {price: '', hasPay: 0, soR: '', stNum: '', code: '', fPrice: ''},
                factoryList: [],
                flagshipList: [],
                companyList: [],
                goldAdvPos: [],
                chaiImgList: [],
                searchStatus: 1,
                bigBusinessList: [],
                bigTuanList: [],
                provinceList: [],
                searchBottomImg: [],
                energyNoteList: [],
                notUpdate: false,
                notUpdateTxt: '',//未及时更新显示文字
                notUpdateAutoShowTxt: '',//折叠自动显示后，下面显示的文字
                notUpdateList: [],//未及时更新的配件
                errorMsg: '',//报错
                foldReason: '',//折叠原因
                energyType: 1,//1=新能源，2=大灯以旧换新
                condSearchNoMsg: '',//有条件时没查询到，提示信息
			    nxtGrp:1, nxtPag:2, //默认nxtPag-2组
            }
        },
        created() {
            this.searchData.keywords = GetQueryString("keywords");
            if (this.searchData.keywords == null) {
                this.searchData.keywords = '';
            }

            if (myFrom == 'energy') {
                this.getEnergy();
                this.searchData.car = GetQueryString('car');
                if (this.searchData.car == null) {
                    this.searchData.car = '';
                }
                this.searchData.ware_code = GetQueryString('ware_code');
                if (this.searchData.ware_code == null) {
                    this.searchData.ware_code = '';
                }
                this.energyType = GetQueryString('type');
                if (this.energyType == undefined || this.energyType == null || !this.energyType) {
                    this.energyType = 1;
                }
                if (this.searchData.keywords == '' && this.searchData.car == '' && this.searchData.ware_code == '') {
                    this.getEnergyNoteList();
                    this.energyCompanyList();
                    if (this.energyType == 2) {
                        this.searchData.keywords = '大灯';
                    }
                    return;
                } else {
                    return this.getList(1);
                }
            }

            if (myFrom == 'chai') {
                this.searchData.car = GetQueryString('car');
                if (this.searchData.car == null) {
                    this.searchData.car = '';
                }
                this.searchData.vin = GetQueryString('vin');
                if (this.searchData.vin == null) {
                    this.searchData.vin = '';
                }
                //this.getChaiImgList();//广告
                if (this.searchData.keywords == '' && this.searchData.car == '') {
                    return this.chaiCompanyList();
                } else {
                    return this.getList(1);
                }
            }
            this.getList(1)
            this.staffId = ''
            window.localStorage.setItem('number', Math.round(Math.random() * 100))
            this.factoryData.number = window.localStorage.getItem('number')
            this.searchBottomImgList();
        },
        mounted() {
            if (myFrom != '') return
            if (GetQueryString("keywords") == null) {
                this.searchData.keywords = ''
            } else {
                this.searchData.keywords = GetQueryString("keywords")
            }
            $('#checkedLevel2').ySelect({
                placeholder: '品质可多选',
                showSearch: false,
                numDisplayed: 9,
                overflowText: '已选中 {n}项',
                isCheck: false
            })
        },
        methods: {
            soVin() {
                const vin = this.searchData.vin
                if (vin.length != 17) return
                this.searchData.car = ''
                this.$http.get('https://i.huiparts.com/api/parts/vin?vin=' + vin, {}).then(function (res) {
                    if (res.body.error == 0) this.searchData.car = res.body.data.join(',')
                });
            },
            soBrand(e) {
                this.searchData.brand = e.target.checked ? '整拆' : ''
            },
            showChaiNote() {
                layIdx = layer.open({
                    type: 1,
                    title: false,
                    closeBtn: 0,
                    shadeClose: false,
                    isOutAnim: false,
                    area: ['700px', '400px'],
                    content: $('#quality_assurance'),
                    success: function () {
                    },
                })
            },
            showCarOwnerSearch() {
                $('#iptFCar').val(this.searchData.car)
                $('#iptFName').val(this.searchData.keywords)
                layIdx = layer.open({
                    type: 1,
                    title: false,
                    closeBtn: 1,
                    shadeClose: false,
                    isOutAnim: false,
                    area: ['800px', '580px'],
                    content: $('#car_owner_search'),
                    success: function () {
                    },
                })
            },
            showGoldAdvPos() {
                layIdx = layer.open({
                    type: 1,
                    title: false,
                    closeBtn: 1,
                    shadeClose: false,
                    isOutAnim: false,
                    area: ['500px', '400px'],
                    content: $('#gold_adv_pos'),
                    success: function () {
                    },
                })
            },
            viewImg(item) {
                const that = this
                that.imgList = []
                item.ware_img = item.ware_img.replace('!b2b', '')
                that.imgList.push(item.ware_img)
                var reloadImg = function () {
                    setTimeout(function () {
                        $('.fancybox').fancybox({
                            openEffect: 'none',
                            closeEffect: 'none',
                            prevEffect: 'none',
                            nextEffect: 'none',
                            closeBtn: false,
                            helpers: {
                                title: {
                                    type: 'inside'
                                },
                                overlay: {
                                    locked: false
                                },
                                buttons: {}
                            },
                            afterLoad: function () {
                                this.title = '图' + (this.index + 1) + ' / 共' + this.group.length + (this.title ? ' - ' + this.title : '张');
                            }
                        });
                        $(".imgGallery a:first").trigger('click')
                    }, 300)
                }
                this.$http.get('/homeApi/wareApi/getGallery?id=' + item.id, {}).then(function (res) {
                    if (res.body.code == 0 && res.body.data.length > 0) {
                        that.imgList = res.body.data
                        reloadImg()
                    }
                });
                reloadImg()
            },
            getList(type, hasSmp = 1) {
               if(mySearchData.canSearch<1) return
                this.errorMsg = '';
                this.notUpdate = false;
                this.hasNext = false;
                this.notUpdateTxt = '';
                this.notUpdateAutoShowTxt = '';
                this.foldReason = '';
                this.searchData.stock_update = 0;
                this.condSearchNoMsg = '';
                if (this.searchData.keywords) {
                    this.searchData.stock_update = 1;
                }
                if (type == 1) {
                    this.searchData.page = 1;
                }
                var data = this.searchData
                var _this = this
                if (myFrom == 'energy') {
                    if (!data.car && !data.keywords && !data.ware_code) {
                        msgShow("操作提示", '请输入车型、名称或编号');
                        return;
                    }
                    if ('' < 1) {
                        this.energySearchLogin();
                        return;
                    }
                    if (parseInt('') <= 0) {
                        this.toLoginReviewEnergy();
                        return;
                    }
                    this.searchData.stock_update = 1;
                }

                if (myFrom == 'chai') {
                    if ('' < 1) {
                        this.chaiSearchLogin();
                        return;
                    }
                    if (parseInt('') <= 0) {
                        this.toLoginReviewChai();
                        return;
                    }
                    if ('' == 6) {//车主查询不出结果
                        if (!data.keywords) {
                            msgShow("操作提示", '请输入您要的配件');
                            return;
                        }
                        this.showCarOwnerSearch();
                        return;
                    }
                    if (data.keywords || data.car) {
                        this.searchData.stock_update = 1;
                    }
                }
                if ('' == 1) {//购买会员服务的客户，将折叠的配件也一起查出来
                    data.stock_update = 0;
                }

                this.searchTable = true;
                this.chaiCompanyListTable = false;
                this.energyCompanyListTable = false;
                if (this.searchData.page < 2) this.wareList = []
                this.Loading = true
                this.isShowNo = false;
                this.isShowNoRecall = false;

                if (myFrom == '' && outputJson) {
                    var result = this.dealData({body: outputJson}, data, type);
                    if (!result) {
                        return false;
                    }
                    this.hasNext = outputJson.hasNext
                    this.$nextTick(function () {
                        resetPage(outputJson.total, this.searchData, 0)
                        this.getNotUpdateList(outputJson.total, outputJson.searchStatus);
                        outputJson = '';//清空
                    })
                } else {
                    data.isNew = '0',data.nxtGrp=this.nxtGrp,data.nxtPag=this.nxtPag;
                    if(data.page==1) data.nxtGrp=data.nxtPag=0; //ajax重新查
                    this.$http.get('https://www.huiparts.com/homeApi/searchApi/getWareList?_t=' + Math.random(), {params: data}).then(function (res) {
                        var result = this.dealData(res, data, type);
                        if (!result) {
                            return false;
                        }
                        this.hasNext = res.body.nxtHas, _this.nxtGrp = res.body.nxtGrp, _this.nxtPag = res.body.nxtPag
                        resetPage(res.body.total, this.searchData, 0)
                        this.getNotUpdateList(res.body.total, res.body.searchStatus);
                    });
                    if (this.searchData.page > 1) {
                        //$('html,body').animate({scrollTop: $('#tableDiv').offset().top}, 300);
                    }
                }

                if (type == 1 && hasSmp == 1) {
                    _this.statData.price = ''
                    $.ajaxSettings.async = false;
                    $.getJSON('https://www.huiparts.com/homeApi/searchApi/getStatSimple?keywords=' + _this.searchData.keywords, function (result) {
                        res = result.data
                        if (!res || !res.price) return
                        _this.statData = res
                    });
                    $.ajaxSettings.async = true;
                }
            },
            showNoCondList(data) {
                this.condSearchNoMsg = '';
                if (data.soCityId > 0) {
                    this.condSearchNoMsg += '在' + $("#myCityOption a[vid=" + data.soCityId + "]").text() + '地区中';
                } else if (data.wareCityId > 0) {
                    this.condSearchNoMsg += '在' + $("#wareCityOption a[vid=" + data.wareCityId + "]").text() + '汽配城中';
                }
                if (data.has_price == 1) {
                    this.condSearchNoMsg += '有价格';
                }
                if (data.accurate == 1) {
                    this.condSearchNoMsg += '精准匹配';
                }
                this.condSearchNoMsg += '没有查询到';
                if (data.soQuaId > 0) {
                    this.condSearchNoMsg += $("#myQuaOption a[vid=" + data.soQuaId + "]").text() + '品质的';
                }
                this.condSearchNoMsg += '配件，以下是';
                if (data.soCityId > 0 || data.wareCityId > 0) {
                    this.condSearchNoMsg += '在全国';
                }
                if (data.accurate == 1) {
                    this.condSearchNoMsg += '智能匹配';
                }
                this.condSearchNoMsg += '查询出来的';
                if (data.soQuaId > 0) {
                    this.condSearchNoMsg += '全部品质';
                }
                this.condSearchNoMsg += '配件';
                this.getNoCondList(1);
            },
            getNoCondList(page) {
                var data = {keywords:this.searchData.keywords, page: page, rows: this.searchData.rows, isNew: '0', extra: 1};
                this.wareList = [];
                this.$http.get('https://www.huiparts.com/homeApi/searchApi/getWareList?_t=' + Math.random(), {params: data}).then(function (res) {
                    var result = this.dealData(res, data, 0);
                    if (!result) {
                        return false;
                    }
                    if (res.body.total > 0) {
                        this.isShowNo = false;
                    }
                    resetNoCondPage(res.body.total, data)
                });
            },
            getNotUpdateList(total, searchStatus) {
                if (searchStatus != 1) {
                    return false;
                }
                if ('' == 1) {//购买会员服务的客户，折叠的已在首次查询中展示
                    return false;
                }
                var page = this.searchData.page;
                var size = this.searchData.rows;
                var data = JSON.parse(JSON.stringify(this.searchData));
                var _this = this;
                this.notUpdateList = [];
                if (total < 200 && page * size >= total) {//最后一页
                    data.stock_update = 2;
                    data.page = 1;
                    data.rows = 200;
                    data.isNew = '0';
                    data.nxtPag = data.nxtGrp = 0;
                    this.$http.get('https://www.huiparts.com/homeApi/searchApi/getWareList?_t=' + Math.random(), {params: data}).then(function (res) {
                        if (res.body.total > 0) {
                            this.notUpdate = true;
                            this.notUpdateTxt = '在被折叠的信息中搜索到' + res.body.total + '条配件信息，您可以点击查看>>';
                            this.notUpdateList = res.body.rows;
                            $(this.notUpdateList).each(function (i, v) {
                                if (data.isNew > 0) {
                                    var member_id = v[0].member_id
                                } else {
                                    var member_id = v.member_id;
                                }
                                if (member_id == '') {
                                    _this.foldReason = '为什么我的产品被折叠，点击查看原因>>';
                                }
                            });
                            if (this.isShowNo == true) {//没有搜索到实时更新的，将折叠的自动展开
                                this.$nextTick(function () {
                                    this.showNotUpdateList();
                                    this.notUpdateAutoShowTxt = '在被折叠的信息中搜索到' + res.body.total + '条配件信息。';
                                });
                            } else if (total < 6) {//搜索结果小于6条，折叠自动展开
                                this.$nextTick(function () {
                                    this.showNotUpdateList();
                                });
                            }
                        } else {
                            if (total == 0 && data.keywords && (data.soCityId > 0 || data.has_price == 1 || data.accurate == 1 || data.wareCityId > 0 || data.soQuaId > 0)) {
                                    this.showNoCondList(data);
                            }
                        }
                    });
                }
            },
            showNotUpdateList() {
                for (var key in this.notUpdateList) {
                    this.wareList.push(this.notUpdateList[key]);
                }
                this.notUpdateTxt = '';
                this.notUpdateList = [];
            },
            askFoldReason() {
                openChat(-1,'为什么我的配件被折叠')
            },
            dealData(res, data, type) {
                var _this = this
                this.Loading = false
                if (data.page == 1) {
                    this.bigBusinessList = this.bigTuanList = [];
                }
                //this.wareList = res.body.rows
                this.wareList = this.wareList.concat(res.body.rows)
                this.total = res.body.total
                this.searchStatus = res.body.searchStatus;
                if (this.total == 0) {
                    //如果选择了地区或者精准匹配，没查询到就去掉条件查询
                    if (!myFrom && '' == 1 && data.keywords && (data.soCityId > 0 || data.has_price == 1 || data.accurate == 1 || data.wareCityId > 0 || data.soQuaId > 0)) {
                        this.$nextTick(function () {
                            this.showNoCondList(data);
                        });
                    } else {
                        if (data.keywords) {
                            this.isShowNo = true
                        }
                    }
                }
                if (res.body.errorMsg) {
                    _this.errorMsg = res.body.errorMsg;
                    return false;
                }

                if (myFrom == 'chai') {
                    var keywords_tmp = data.keywords;
                    if (data.car) {
                        var car_arr = data.car.split(',');
                        if (car_arr.length == 4) {
                            keywords_tmp = car_arr[1] + ' ' + keywords_tmp;
                        } else {
                            keywords_tmp = data.car + ' ' + keywords_tmp;
                        }
                    }
                    keywords_tmp = $.trim(keywords_tmp);
                    $("#keywords_chai").text(keywords_tmp);

                    if (data.keywords && '' > 0 && data.brand != '整拆' && data.page == 1) this.addIssue()
                    if (this.total == 0 && data.brand != '整拆' && data.car.length > 0) { //搜整拆
                        this.isShowNo = false
                        this.searchData.brand = '整拆'
                        this.getList(1)
                    } else {
                        this.searchData.brand = ''
                    }
                    return true;
                } else if (myFrom == 'energy') {
                    if ('' > 0 && data.page == 1 && this.energyType == 1) {
                        this.addIssue();
                    }
                } else {
                    if (data.keywords && '' > 0 && data.page == 1) {
                        if (data.keywords.indexOf(" 拆") > -1) {//普通搜索，带“拆”，也发起求购
                            this.addIssue();
                        } else if ('' == 4 && /[\u4e00-\u9fa5]+/.test(data.keywords)) {//修理厂搜索关键词里有中文，也发求购
                            this.addIssue();
                        }
                    }
                    let isNew = '0';
                    if (data.keywords && data.page == 1) {
                        var tmpWareList = this.wareList;
                        this.wareList = [];
                        if (isNew > 0) {
                            for (var key in tmpWareList) {
                                var tmp = tmpWareList[key];
                                var tmpBigBusinessList = [];
                                var tmpList = [];
                                for (var k in tmp) {
                                    if (tmp[k].big_business == 1 && tmp[k].share_price > 0 && tmp[k].shelf == 1 && tmp[k].off_buy != 1) {
                                        tmpBigBusinessList.push(tmp[k]);
                                    } else {
                                        tmpList.push(tmp[k]);
                                    }
                                }
                                if (tmpBigBusinessList.length > 0) {
                                    this.bigBusinessList.push(tmpBigBusinessList);
                                }
                                if (tmpList.length > 0) {
                                    this.wareList.push(tmpList);
                                }   
                            }
                        } else {
                            for (var key in tmpWareList) {
                                if (tmpWareList[key].big_business == 1 && tmpWareList[key].share_price > 0 && tmpWareList[key].shelf == 1 && tmpWareList[key].off_buy != 1) {
                                    this.bigBusinessList.push(tmpWareList[key]);
                                } else {
                                    this.wareList.push(tmpWareList[key]);
                                }
                            }
                        }  
                    }
                    if (tuanJson) this.bigTuanList = tuanJson
                }

                this.factoryData.keywords = res.body.ad_keywords
                this.factoryData.wareCodePre = res.body.ware_code_pre
                if (myFrom == '' && type == 1) {
                    this.getFactory()
                }

                if (type == 1) {
                    $.ajaxSettings.async = false;
                    _this.topAd(res.body.ad_keywords)
                    $.ajaxSettings.async = true;
                }
                return true;
            },
            topAd(keywords) {
              if(mySearchData.soSimple>0) return
                var _this = this
                $.post('/homeApi/adApi/homePageAd', {
                    keywords: keywords,
                    ad_pos: 'keywords,right_keywords'
                }, function (ad_res) {
                    if (ad_res.code == 0) {
                        _this.keywordsImg = ad_res.data.keywords
                        _this.rightKeywordsImg = ad_res.data.right_keywords
                        _this.$nextTick(function () {
                            if (ad_res.data.keywords.length > 1) {
                                adSlider()
                            }
                        })
                    }
                }, 'json');
            },
            getFactory() {
                this.getFlagship(6);
            },
            getFlagship(num) {
                if (num < 1 || '' < 1) {
                    return;
                }
                var keywords = '';
                if (this.searchData.keywords && (this.factoryData.keywords || this.factoryData.wareCodePre)) {
                    keywords = this.factoryData.keywords + ',' + this.factoryData.wareCodePre;
                }
                this.$http.get('/homeApi/companyApi/factoryList?type=1,2&show_logo=1&priority_union=1&rand=1&rows=' + num + '&keywords=' + keywords).then(function (res) {
                    res = res.body;
                    this.flagshipList = res.rows;
                })
            },
            remindStat(type=0) {
                let that = this,title='['+that.searchData.keywords+']';
              title+=(type==1?'汇配AI大模型定价':'数据洞察')
			  let url='https://www.huiparts.com/homeApi/searchApi/getStatDetail?keywords=' + that.searchData.keywords
			  if(type==1) url='/home/ai?code='+that.searchData.keywords
				  layer.open({
					type: 2,
					title: title,
					closeBtn: 1,
					shadeClose: true,
					isOutAnim: false,
					area: ['850px', '600px'],
					content: url
				  })
            },

            toChat(id) {
            },
            localCheck(e) {
                this.searchData.area_type = e
                $("#wareCityOption a,#myCityOption a").removeClass('cur')
                this.searchData.wareCityId = this.searchData.soCityId = 0
                this.searchData.page = 1
                this.getList(1, 0)
            },
            hasPriceCheck(e) {
                this.searchData.has_price = e
                this.searchData.page = 1
                this.getList(1, 0)
            },
            accurateCheck(e) {
                this.searchData.accurate = e
                this.searchData.page = 1
                this.getList(1, 0)
            },
            collectCheck(e) {
                this.searchData.collect = e
                this.searchData.page = 1
                this.getList(1, 0)
            },
            myCityCheck(e) {
                this.searchData.wareCityId = 0
                this.searchData.soCityId = e
                if (this.searchData.soCityId > 0) this.searchData.area_type = 0
                this.searchData.page = 1
                this.getList(1, 0)
            },
            myCityChange(vid) {
                $("#wareCityOption a,#myCityOption a").removeClass('cur')
                if (vid > 0) {
                    if (vid == this.searchData.soCityId) vid = 0
                    else $("#myCityOption a[vid=" + vid + "]").addClass('cur')
                } else {
                    $("#myCityOption a[vid=0]").addClass('cur')
                }
                this.myCityCheck(vid)
            },
            getProvince() {
                let that = this;
                let myProvince = $('#myCityOption').find('a').eq(1).attr('vid');
                $.ajaxSettings.async = false;
                $.getJSON('https://www.huiparts.com/homeApi/areaApi/getProvince', function (result) {
                    if (result.code == 0) {
                        $(result.data).each(function(i,v){
                            if (v.area_id != myProvince) {
                                v.area_name = v.area_name.replace('其他', '');
                                that.provinceList.push(v);
                            }
                        });
                    }
                });
                $.ajaxSettings.async = true;
            },
            wareCityCheck(e) {
                this.searchData.soCityId = 0
                this.searchData.wareCityId = e
                if (this.searchData.wareCityId > 0) this.searchData.area_type = 0
                this.searchData.page = 1
                this.getList(1, 0)
            },
            changeNum: function changeNum(e) {
                if (e.target.value <= 0) {
                    e.target.value = 1
                }
            },
            buyBtn(index, quote_id, member_id, tuanId = 0) {
                if ('' == member_id) {
                    msgShow("操作提示", '不能购买自己的商品', "error");
                    return
                }
                if (this.canBuy == false) {
                    return false
                }
                this.addCart(index, quote_id, member_id, 1, tuanId)
            },
            // 加入购物车
            addCart(index, quote_id, member_id, type, tuanId = 0) {
                if ('' > 0) {//登录状态
                    if ('' == 1) {
                        if ('' == member_id) {
                            msgShow("操作提示", '不能将自己的商品加入购物车', "error");
                            return
                        }
                        var num = $(".num_box" + index + "").val()
                        if (num == 0 || !num) {
                            num = 1;
                        }
                        this.canBuy = false
                        let param = {
                            quote_ids: quote_id,
                            member_ids: member_id,
                            buy_num: num
                        }
                        if (tuanId > 0) param.tuan_ids = tuanId, param.quote_ids = '';
                        this.$http.post('https://www.huiparts.com/homeApi/cartApi/addCart', param, {emulateJSON: true}).then(function (res) {
                            if (res.body.code == 0) {
                                var count = res.body.data.count;
                                parent.$('#shop_num').text(count);
                                if (type != 1) {
                                    $.messager.show({"title": "操作提示", "msg": "已添加" + num + "个配件", "timeout": 1});
                                } else {
                                    window.location.href = seOption.url_i + '/order/orderHtml/orderConfirm?cart_ids=' + res.body.data.cart_info.cart_id;
                                }

                            } else {
                                msgShow("操作提示", res.body.message, "error");
                            }
                        }, function (res) {
                            msgShow("操作提示", res.body.message, "error");
                        })
                    } else {
                        location.href = seOption.url_w + '/register/supplyHtml/loginReview';
                    }
                } else {
                    this.toLogin();
                }
            },
            submitNeed(params, id) {
                this.$http.post('https://www.huiparts.com/homeApi/purchaseApi/submitPurchase', params, {emulateJSON: true}).then(function (res) {
                    if (id != undefined) {
                        if (res.body.code == 0) {
                            this.isShowNoRecall = true;
                            $.messager.show({
                                "title": "操作提示",
                                "msg": "发布成功",
                                "timeout": 2000,
                                showType: 'success',
                                style: {}
                            });
                            this.isNeedBuySub = true
                        } else {
                            msgShow("操作提示", res.body.message, "error");
                        }
                    }
                }, function (res) {
                    msgShow("操作提示", res.body.message, "error");
                })
            },
            addIssue(id) {
                if (id == undefined && '' == '250135') {
                    return;
                }
                var quality = $("#" + id + "").ySelectedTexts(",")
                if ('' > 0) {//登录状态
                    var params = {}
                    if (myFrom == 'chai') {
                        if ('' == 6) {//车主查询不出结果
                            return this.showCarOwnerSearch();
                        }

                        params = {
                            keywords: $.trim(this.searchData.keywords + ' ' + this.searchData.car),
                            quality: '拆车件',
                            remark: this.searchData.vin
                        }
                    } else if (myFrom == 'energy') {
                        var tmp = $.trim(this.searchData.car + ' ' + this.searchData.keywords + ' ' + this.searchData.ware_code);
                        if (!tmp) {
                            return;
                        }
                        params = {
                            keywords: '新能源 ' + tmp,
                            quality: '',
                            remark: '',
                        }
                    } else {
                        var keywords = this.searchData.keywords;
                        var quality = $("#" + id + "").ySelectedTexts(",");
                        var remark = this.select.remark;
                        if (keywords.indexOf(" 拆") > -1) {
                            keywords = keywords.replace(/ (拆车件|拆车|拆)/, '');
                            quality = '拆车件';
                        }
                        params = {keywords: keywords, quality: quality, remark: remark}
                    }
                    if ($.trim(params.keywords) == '') {
                        if (id != undefined) {
                            msgShow("操作提示", "请输入需要的配件", "error");
                        }
                        return
                    }
                    this.submitNeed(params, id)
                } else {
                    this.toLogin();
                }
            },
            // 快速询价
            askPrice(e, index) {
                let $p = $(e.target).closest('.pClick'), member_id = $p.attr('cid'), supplier_id = $p.attr('sid'),
                    uid = $p.attr('uid')
                var myId = '', is_auth = ''
                if (myId > 0) {//登录状态
                    if (is_auth == 1) {
                        if (myId == member_id) {
                            return layer.msg('不能向自己询价')
                        }
                        let enqFunc = (staffId = 0) => {
                            this.$http.post('https://www.huiparts.com/homeApi/enquiryApi/submitEnquiry', {
                                staffId: staffId,
                                supplier_id: supplier_id,
                                invoice_info: 1,
                                keywords: this.searchData.keywords
                            }, {emulateJSON: true}).then(function (res) {
                                if (res.body.code == 0) {
                                    $(".stock_hide" + index + "").css('display', 'inline-block');
                                    $(".stock_show" + index + "").hide()
                                    layer.msg('消息已发送给对方', {
                                        icon: 1, time: 0, title: null
                                        , btn: ['继续沟通', '留在本页']
                                        , yes: function (index) {
                                            openChat(uid), layer.close(index);
                                        }
                                    });
                                } else {
                                    if(res.body.code==403) return layer.alert("<div style='font-size:18px;color:red'>"+res.body.message+"</div>", {
                                      icon: 5, title: null, closeBtn: 0
                                      , btn: ['立刻开通', '留在本页']
                                      , yes: function (index) {
										location.href='https://i.huiparts.com/#/supplier/service/index?from=5&page_title=服务开通', layer.close(index);
                                      }
                                    });
                                    layer.msg(res.body.message)
                                }
                            }, function (res) {
                            })
                        }
                        selOneStaff($p.closest('.rowTr'), enqFunc)
                    } else {
                        location.href = seOption.url_w + '/register/supplyHtml/loginReview';
                    }
                } else {
                    this.toLogin();
                }
            },
            //询价联系
            showContact(member_id, mobile, contact, supplier_id) {
                var staff_id = ''
                var is_auth = ''
                if (staff_id > 0) {//登录状态
                    if (is_auth == 1) {
                        if (staff_id == member_id) {
                            return layer.msg('不能向自己询价')
                        }
                        this.$http.post('https://www.huiparts.com/homeApi/enquiryApi/submitEnquiry', {
                            company_id: member_id,
                            supplier_id: supplier_id,
                            invoice_info: 1,
                            keywords: this.searchData.keywords
                        }, {emulateJSON: true}).then(function (res) {
                            if (res.body.code == 0) {
                                var msg = '卖家暂时不在线，请拨打电话<span style="color:#126EC2;">' + mobile + '</span>联系';
                                if (contact != undefined && contact) {
                                    msg += contact;
                                }
                                msg += '进行询价。询价时向卖家说明来自汇配可以获得最优惠价格。';
                                layer.open({
                                    type: 1,
                                    title: false,
                                    closeBtn: 1,
                                    shadeClose: true,
                                    area: ['300px', '150px'],
                                    content: '<div style="padding:30px 20px;">' + msg + '</div>'
                                });
                            } else {
                                msgShow("操作提示", res.body.message, "error");
                            }
                        });
                    } else {
                        location.href = seOption.url_w + '/register/supplyHtml/loginReview';
                    }
                } else {
                    this.toLogin();
                }
            },
            // 撤回查询未得
            recallSearch() {
                var _this = this
                window.top.$.messager.confirm('提示', '确定撤回此条查询未得？', function (r) {
                    if (r) {
                        _this.$http.post('https://www.huiparts.com/homeApi/searchApi/recallSearchNo', {keywords: _this.searchData.keywords}, {emulateJSON: true}).then(function (res) {
                            if (res.body.code == 0) {
                                _this.searchData.keywords = ''
                                _this.getList(1, 0)
                            } else {
                                msgShow("操作提示", res.body.message);
                            }
                        }, function (res) {
                            msgShow("操作提示", res.body.message, "error");
                        })
                    }

                });
            },
            chaiSearchLogin: function chaiSearchLogin() {//拆车件查询页面登录
                var redirect_uri = seOption.url_w + location.pathname + '?vin=' + this.searchData.vin + '&car=' + this.searchData.car + '&keywords=' + this.searchData.keywords;
                var url = seOption.url_w + '/passport/login/redirect?code_login=1&redirect_uri=' + encodeURIComponent(redirect_uri);
                location.href = url;
            },
            energySearchLogin: function energySearchLogin() {//新能源查询页面登录
                var redirect_uri = seOption.url_w + location.pathname + '?car=' + this.searchData.car + '&keywords=' + this.searchData.keywords + '&ware_code=' + this.searchData.ware_code + '&type=' + this.energyType;
                var url = seOption.url_w + '/passport/login/redirect?code_login=1&redirect_uri=' + encodeURIComponent(redirect_uri);
                location.href = url;
            },
            toLogin: function toLogin() {
                if (myFrom == 'chai') {
                    this.chaiSearchLogin();
                } else if (myFrom == 'energy') {
                    this.energySearchLogin();
                } else {
                    location.href = seOption.url_w + '/passport/login/redirect?redirect_uri=' + encodeURIComponent(location.href);
                }
            },
            toLoginReview: function toLoginReview() {
                if (myFrom == 'chai') {
                    this.toLoginReviewChai();
                } else if (myFrom == 'energy') {
                    this.toLoginReviewEnergy();
                } else {
                    location.href = seOption.url_w + '/register/supplyHtml/loginReview?redirect_uri=' + encodeURIComponent(location.href);
                }
            },
            toLoginReviewChai: function toLoginReviewChai() {
                var redirect_uri = seOption.url_w + location.pathname + '?vin=' + this.searchData.vin + '&car=' + this.searchData.car + '&keywords=' + this.searchData.keywords;
                var url = seOption.url_w + '/register/supplyHtml/loginReview?redirect_uri=' + encodeURIComponent(redirect_uri);
                location.href = url;
            },
            toLoginReviewEnergy: function toLoginReviewEnergy() {
                var redirect_uri = seOption.url_w + location.pathname + '?car=' + this.searchData.car + '&keywords=' + this.searchData.keywords + '&ware_code=' + this.searchData.ware_code + '&type=' + this.energyType;
                var url = seOption.url_w + '/register/supplyHtml/loginReview?redirect_uri=' + encodeURIComponent(redirect_uri);
                location.href = url;
            },
            toSearchAll: function toSearchAll() {//查询所有的配件
                location.href = '/home/search/init?keywords=' + $('#keywords_chai').text();
            },
            chaiCompanyList: function chaiCompanyList() {//拆车件商
                this.searchTable = false;
                this.chaiCompanyListTable = true;
                this.$http.get('/homeApi/companyApi/factoryList?page=1&rows=100&type=3&rand=1').then(function (res) {
                    this.companyList = res.body.rows
                    this.goldAdvPos = [1, 2];
                });
            },
            energyCompanyList: function energyCompanyList() {//新能源车商家
                this.searchTable = false;
                this.energyCompanyListTable = true;
                var size = 20;
                this.$http.get('/homeApi/energyApi/showCompanyList?page=' + this.energyCompanyPageNum + '&size=' + size + '&type=' + this.energyType).then(function (res) {
                    this.energyCompany = res.body.data.data;
                    resetEnergyPage(res.body.data.count, size);
                });
            },
            fatoUrl: function fatoUrl(url, company_id) {
                if ('' > 0) {//登录状态
                    if ('' == company_id) {
                        msgShow("操作提示", '不能和自己对话');
                        return false;
                    }
                    url = seOption.url_i + url
                    window.open(url, 'windowOpenCompanyMessage');
                } else {
                    this.toLogin();
                }
            },
            chaiClick: function chaiClick() {
                $.post('/homeApi/clickLogApi/chaiClick', {}, function (result) {
                    location.href = '/home/search/chai';
                }, 'json');
            },
            getChaiImgList: function getChaiImgList() {
                if (this.chaiImgList.length > 0) {
                    return;
                }
                this.$http.get('/homeApi/adApi/homePageAd', {params: {ad_pos: 'chai_search'}}).then(function (val) {
                    val = val.body;
                    this.chaiImgList = val.data.chai_search
                    this.$nextTick(function () {
                        $('#ad_box').css('height', $('#ad_box').find('img').css('height'));
                        if (this.chaiImgList.length > 1) {
                            adSlider()
                        }
                    })
                })
            },
            searchBottomImgList: function searchBottomImgList() {
              if(mySearchData.soSimple>0) return
                this.$http.get('/homeApi/adApi/homePageAd', {params: {ad_pos: 'search_bottom'}}).then(function (val) {
                    val = val.body;
                    this.searchBottomImg = val.data.search_bottom
                    this.$nextTick(function () {
                        var img_h = $('#ad_box_bottom').find('img:first').css('height');
                        if (img_h == '0px' || img_h == '0') {
                            img_h = '158px';
                        }
                        $('#ad_box_bottom').css('height', img_h);
                        if (this.searchBottomImg.length > 1) {
                            adSlider({name: '#ad_box_bottom'})
                        }
                    })
                })
            },
            getEnergyNoteList: function getEnergyNoteList() {
                this.$http.get('/homeApi/energyApi/showNoteList?page=1&size=20&type=' + this.energyType).then(function (res) {
                    this.energyNoteList = res.body.data.data;
                    this.$nextTick(function () {
                        var height = '';
                        if (this.energyNoteList.length == 1) {
                            height = '45px';
                        } else if (this.energyNoteList.length == 2) {
                            height = '75px';
                        } else if (this.energyNoteList.length == 3) {
                            height = '105px';
                        }
                        if (height) {
                            $('.energy_note_span').css('height', height);
                        }
                    })
                });
            },
            submitEnergyShow: function submitEnergyShow() {
                if ('' < 1) {
                    this.energySearchLogin();
                    return;
                }
                if (parseInt('') <= 0) {
                    this.toLoginReviewEnergy();
                    return;
                }

                layIdx = layer.open({
                    type: 1,
                    title: false,
                    closeBtn: 1,
                    shadeClose: false,
                    isOutAnim: false,
                    area: ['450px', '300px'],
                    content: $('#submit_energy'),
                    success: function () {
                    },
                })
            },
            reloadPage: function reloadPage() {
                if (myFrom == 'chai') {
                    var url = seOption.url_w + location.pathname + '?vin=' + this.searchData.vin + '&car=' + this.searchData.car + '&keywords=' + this.searchData.keywords;
                    location.href = url;
                } else if (myFrom == 'energy') {
                    var url = seOption.url_w + location.pathname + '?car=' + this.searchData.car + '&keywords=' + this.searchData.keywords + '&ware_code=' + this.searchData.ware_code;
                    location.href = url;
                } else {
                    location.reload();
                }
            },
            getEnergy() {
                var num = 6;
                this.$http.get('/homeApi/companyApi/factoryList?type=4&show_logo=1&rand=1&rows=' + num).then(function (res) {
                    res = res.body;
                    this.energy = res.rows;
                })
            },
        }
    })

    function resetEnergyPage(recordCount, size) {
        var pageIndex = app.energyCompanyPageNum;
        var pages = recordCount % size == 0 ? recordCount / size : recordCount / size + 1;
        laypage({
            cont: "energyPageId", //容器。值支持id名、原生dom对象，jquery对象。【如该容器为】：<div id="page1"></div>
            pages: pages, //通过后台拿到的总页数
            curr: pageIndex, //当前页
            prev: '<img src="https://static.huiparts.com/new/images/left11.png" height="20" style="padding-top:4px" alt="向左">',
            next: '<img src="https://static.huiparts.com/new/images/right11.png" height="20" style="padding-top:4px" alt="向右">',
            jump: function jump(obj, first) {
                //触发分页后的回调
                if (!first) {
                    //点击跳页触发函数自身，并传递当前页：obj.curr
                    app.energyCompanyPageNum = obj.curr;
                    app.energyCompanyList();
                }
            }
        });
    };

    function resetPage(recordCount, queryPara, type) {
        var pageIndex = queryPara.page;
        var pages = recordCount % queryPara.rows == 0 ? recordCount / queryPara.rows : recordCount / queryPara.rows + 1;
        laypage({
            cont: "pageId", //容器。值支持id名、原生dom对象，jquery对象。【如该容器为】：<div id="page1"></div>
            pages: pages, //通过后台拿到的总页数
            curr: pageIndex, //当前页
            prev: '<img src="https://static.huiparts.com/new/images/left11.png" height="20" style="padding-top:4px" alt="向左">',
            next: '<img src="https://static.huiparts.com/new/images/right11.png" height="20" style="padding-top:4px" alt="向右">',
            jump: function jump(obj, first) {
                //触发分页后的回调
                if (!first) {
                    //点击跳页触发函数自身，并传递当前页：obj.curr
                    queryPara.page = obj.curr;
                    app.getList(0)
                }
            }
        });
    };

    function resetNoCondPage(recordCount, queryPara) {
        var pageIndex = queryPara.page;
        var pages = recordCount % queryPara.rows == 0 ? recordCount / queryPara.rows : recordCount / queryPara.rows + 1;
        laypage({
            cont: "pageId", //容器。值支持id名、原生dom对象，jquery对象。【如该容器为】：<div id="page1"></div>
            pages: pages, //通过后台拿到的总页数
            curr: pageIndex, //当前页
            prev: '<img src="https://static.huiparts.com/new/images/left11.png" height="20" style="padding-top:4px" alt="向左">',
            next: '<img src="https://static.huiparts.com/new/images/right11.png" height="20" style="padding-top:4px" alt="向右">',
            jump: function jump(obj, first) {
                //触发分页后的回调
                if (!first) {
                    //点击跳页触发函数自身，并传递当前页：obj.curr
                    app.getNoCondList(obj.curr)
                }
            }
        });
    };

    function toUrl(obj, type, num) {
        var url = $(obj).attr('data-url')
        var cid = $(obj).attr('cid')
        if (seOption.staffId == cid) {
            if (num == 1) {
                msgShow("操作提示", '不能与自己进行对话', "error");
            }
            return
        }
        if (seOption.staffId > 0) {//登录状态
            if (seOption.is_auth == 1) {
                if (type == 1) {
                    openChat($(obj).attr('uid'))
                } else if (type == 2) {
                    openChat($(obj).attr('uid'))
                    openOperate();
                } else {
                    location.href = url;
                }
            } else {
                location.href = seOption.url_w + '/register/supplyHtml/loginReview';
            }
        } else {
            app.toLogin();
        }
    };

    function saveClickLog(obj) {
        $.post('https://www.huiparts.com/homeApi/clickLogApi/companyClickLog', {
            company_id: $(obj).attr('cid'),
            type: 1
        }, function (data) {
        }, 'json');
    }

    function adClick(obj) {
        var ad_id = $(obj).attr('data-id')
        var url = $(obj).attr('data-url');
        var target = $(obj).attr('target_type');
        var data = {ad_id: ad_id};

        $.post('https://www.huiparts.com/homeApi/adApi/adClick', data, function (result) {
        }, 'json');
        if (target == '_blank') {
            window.open(url);
        } else {
            location.href = url;
        }
    }

    function submitEnergy() {
        var energy_note = $('#energy_note').val();
        if (energy_note.length > 500) {
            layer.msg('不能超过500字');
            return false;
        }
        $.post('/homeApi/energyApi/submit', {note: energy_note, type: app.energyType}, function (result) {
            layer.msg(result.message);
            if (result.code == 0) {
                $('#energy_note').val('');
                layer.close(layIdx);
            }
        }, 'json');
    }

    function openSet() {
        let html = '<div id="soSetBox"><p vid="ui">搜索界面：<a href="javascript:;" vid="1">按商家组合(新)</a> <a href="javascript:;" vid="0">逐条展示(老)</a></p>'
            + '<p vid="city" class="none">城市锁定：' + $('#myCityOption').html() + '</p>';
        if ($('#wareCityOption').length > 0) html += '<p vid="ware" class="none">汽配城锁定：' + $('#wareCityOption').html() + '</p>'
        html += '</div>'
        layer.open({
            id: 'hpPopSet',
            type: 0, closeBtn: 0, title: false,
            content: html, btn: ['确定', '取消']
            , yes: function (index) {
                let param = {isNew: 1, soCityId: 0, wareCityId: 0}, $ui = $("#soSetBox p:eq(0)").find('a.cur'),
                    $city = $("#soSetBox p:eq(1)").find('a.cur')
                if ($ui.length > 0) param.isNew = $ui.attr('vid')
                if ($city.length > 0) param.soCityId = $city.attr('vid')
                if ($("#soSetBox p").length > 2) {
                    let $ware = $("#soSetBox p:eq(2)").find('a.cur')
                    if ($ware.length > 0) param.wareCityId = $ware.attr('vid')
                }
                $.get('/homeApi/searchApi/setSearch', param, function (res) {
                    if (res.code > 0) return layer.msg(res.message);
                    layer.close(index);
                    location.reload(true);
                }, 'json')
            }, success: function () {
                $("#soSetBox a").live('click', function () {
                    let e = $(this), p = e.closest('p'), vid = p.attr('vid')
                    if (e.hasClass('cur')) e.removeClass('cur')
                    else p.find('a').removeClass('cur'), e.addClass('cur')
                    if (vid == 'ui') return
                    else if (vid == 'city') $('#soSetBox p:eq(2) a').removeClass('cur')
                    else $('#soSetBox p:eq(1) a').removeClass('cur')
                })
                let isNew = '0' > 0 ? 0 : 1
                $("#soSetBox p:first").find("a:eq(" + isNew + ")").addClass('cur')
            }
        });
    }

    function otherCityShow() {
        //获取地区数据
        if (app.provinceList.length == 0) {
            app.getProvince()
        }

        //排列地区
        let cols = 9;//九列
        let html = '';
        $(app.provinceList).each(function(i,v){
            if(i%cols == 0){
                html += '<div>';
            }
            html += '<li vid="'+v.area_id+'" vTitle="'+v.area_name+'">'+v.area_name+'</li>';
            if(i%cols == cols-1){
                html += '</div>';
            }
        });
        $('#filterOtherCity .otherCityUl').html(html)
        $('#filterOtherCity .otherCityUl').show()

        $('#filterOtherCity li').on('click', function(){
            $('#otherCityOption a').text($(this).attr('vTitle')),$('#filterOtherCity .otherCityUl').hide()
            $("#wareCityOption a,#myCityOption a").removeClass('cur')
            $('#otherCityOption a').addClass('cur')
            app.myCityCheck($(this).attr('vid'))
        })
    }

    function openBrand(obj) {
      let e=$(obj),bid=e.attr('vid'),name=e.find('em').text()
      say.open('超级品牌-'+name, "/home/search/brand?brandId=" + bid, '700px', '500px')
    }

    $(function () {
        if(mySearchData.canSearch<1){
          layer.confirm('本验证旨在防止机器人滥用资源，无需频繁操作。点击下方按钮后继续查询👇', {
            btn: ['点击开始验证'],
            title :'智能验证'
          },function(){
            $.get('/homeApi/searchApi/canSearch', {}, function (res) {
              if (res.code > 0) return layer.msg(res.message);
              layer.closeAll(),location.reload(true);
            }, 'json')
          });
          return
        }

        //品质
		  $('#filterQua').hover(function(){
			$('#filterQua .quaUl').show()
		  },function(){
			$('#filterQua .quaUl').hide()
		  })
		  $('#filterQua li').click(function(){
			$('#myQuaOption a').text($(this).attr('vTitle')),$('#filterQua .quaUl').hide()
            app.searchData.soQuaId = $(this).attr('vid'),app.searchData.page = 1
            app.getList(1, 0)
		  })

        //汽配城
        $('#filterWareCity').hover(function(){
            $('#filterWareCity .wareCityUl').show()
        },function(){
            $('#filterWareCity .wareCityUl').hide()
        })
        $('#filterWareCity li').click(function(){
            $('#wareCityOption a').text($(this).attr('vTitle')),$('#filterWareCity .wareCityUl').hide()
            $("#wareCityOption a,#myCityOption a").removeClass('cur')
            $('#wareCityOption a').addClass('cur')
            app.wareCityCheck($(this).attr('vid'))
        })

        //其他省份
        $('#filterOtherCity').hover(function(){
            otherCityShow();
        },function(){
            $('#filterOtherCity .otherCityUl').hide()
        })

      $('#mySuperBrand a').click(function () {
        let has=$(this).hasClass('cur'), brandId=''
        $('#mySuperBrand a').removeClass('cur')
        if(!has) $(this).addClass('cur'), brandId=$(this).attr('vid')
        app.searchData.brandId = brandId, app.searchData.page = 1, app.getList(1, 0)
      })

        if(mySearchData.soSimple>0){
          $('.top_nav_box,footer,.factoryContainer').hide()
        }
        $('.tdMore').live('click', function () {
            let e = $(this), vv = e.attr('vv'), tb = e.closest('tbody'), td = e.find('td')
            if (vv < 1) tb.find('tr').show(), e.attr('vv', '1'), td.html('隐藏👆')
            else tb.find('tr:gt(1)').hide(), tb.find('tr:last').show(), e.attr('vv', '0'), td.html('查看更多👇')
        })
        $('.rowMore').live('click', function () {
            let e = $(this), vv = e.attr('vv'), tb = e.closest('.rowSox'), td = tb.find('.rowSub')
            if (vv < 1) td.removeClass('none'), e.attr('vv', '1'), e.html('隐藏👆')
            else tb.find('.rowSub:gt(2)').addClass('none'), e.attr('vv', '0'), e.html('查看更多👇')
        })
        if (mySearchData.wareCityId > 0) {
            let oa = $("#wareCityOption a");
            $(wareCityListJson).each(function(i,v){
                if (v.id == mySearchData.wareCityId) {
                    oa.addClass('cur')
                    oa.text(v.name)
                }
            });
        }
        if (mySearchData.soCityId > 0) {
            if ($("#myCityOption a[vid=" + mySearchData.soCityId + "]").length > 0) {
                $("#myCityOption a[vid=" + mySearchData.soCityId + "]").addClass('cur')
            } else {
                let oa = $("#otherCityOption a");
                app.getProvince()
                $(app.provinceList).each(function(i,v){
                    if (v.area_id == mySearchData.soCityId) {
                        oa.addClass('cur')
                        oa.text(v.area_name)
                    }
                });
            }
        }
        if (mySearchData.soQuaId > 0) $('.quaUl li[vid='+mySearchData.soQuaId+']').trigger('click')
        if (mySearchData.wareCityId + mySearchData.soCityId < 1) $("#myCityOption a[vid=0]").addClass('cur')
        //if(seOption.isZhushou<1 && $("#msg_num").length>0) hpChat.openChat()

        $(window).scroll(function () {
            let scrollTop = $(this).scrollTop(), scrollHeight = $(document).height(), windowHeight = $(this).height();
            if (scrollTop > 110) {
                $("#top_container").addClass('topNavFixed')
                $("#back_top").css('display', 'table-cell');
                $(".search").css({marginTop:'175px'});
            } else {
                $("#top_container").removeClass('topNavFixed')
                $("#back_top").css('display', 'none');
                $(".search").css({marginTop:'10px'});
            }
            if (app.Loading || !app.hasNext) return
            if ($("#showPayUser").length > 0 && app.searchData.page > 5) return $("#showPayUser").show()
            if (scrollTop + windowHeight + 500 >= scrollHeight) { //加载新页面
                app.searchData.page++, app.getList(0, 0)
            }
        });
    })

</script>
<script>
    function clickCompany(obj, isLog = 1) {
        var $p = $(obj).closest('.pClick'), companyId = $p.attr('cid') || 0, uid = $p.attr('uid') || '',
            msg = $p.attr('msg') || '', $tr = $(obj).closest('.rowTr'), myUid = ''
        if (myUid === companyId) return layer.msg('不能向自己对话')
        let callBack = (staffId = 0) => {
            openChat(uid, msg, staffId)
            if (isLog > 0 && companyId > 0) {
                $.post('/homeApi/clickLogApi/companyClickLog', {company_id: companyId, type: 1})
            }
        }
        selOneStaff($tr, callBack)
    }

    function selOneStaff($tr, callback) {
        let $staff = $tr.find('.staff'), $p = $tr.find('.rComp'), companyId = $p.attr('cid'),
            uid = $p.attr('uid'), staffId = 0
        if ($staff) {
            let length = $staff.find('span').length || 0;
            if (length > 1) {
                let html = '';
                $staff.find('span').each((idx, item) => {
                    let $i = $(item)
                    html += '<p><label><input type="radio" name="cStaff" value="' + $i.attr('uid') + '"> ' + $i.text() + '</label></p>'
                })
                layer.open({
                    type: 0, closeBtn: 0, title: false,
                    content: '<strong>选择一个员工：</strong>' + html, btn: ['确定', '取消']
                    , yes: function (index) {
                        staffId = $("[name=cStaff]:checked").val()
                        if (!staffId) return
                        $('.sf' + companyId).html('<span uid="' + staffId + '">x</span>')
                        layer.close(index);
                        $.post('/api/hpChat/setDefStaff', {uid, toStaff: staffId})
                        callback(staffId);
                    }
                });
                return
            } else if (length === 1) {
                staffId = $staff.find('span:eq(0)').attr('uid')
            }
        }
        callback(staffId);
    }
</script>


    </div>
    <footer>
    <div class="footer text-center hidden-xs">
        <div class="container">
            <div class="row text-center">
                <p>© 2018 上海汇配信息科技有限公司  ｜ 
                    <a href="http://beian.miit.gov.cn" target="_blank">沪ICP备18023159号</a>  ｜ 
                    <a href="http://218.242.124.22:8081/businessCheck/verifKey.do?showType=extShow&serial=9031000020180510155209000002535174-SAIC_SHOW_310000-20180821195309563879&signData=MEYCIQCEuHFWT/grVWc07MKv0puV3+5016pSkrAQ1YRVo3C2JwIhAIt54jHvff/eycwcObVpECDAX+Xc4kDe4blEGPhLihMJ" target="_blank">
                        <img src="https://static.huiparts.com/b2b/newcheyipei/images/lz.png" style="width: 25px;margin-top: -10px;">
                    </a>
                    <a href="https://www.huiparts.com/b2b/violation/stage" target="_blank" class="stage_box"><img src="https://static.huiparts.com/new/images/stage_img.png" alt=""> 汇配曝光台</a>
                </p>
                <p> 联系电话：021-60693599&nbsp;&nbsp;021-60693555 | 客服QQ：2885636572  2885638526(已满)</p>
                <p> 站点地图：<a href="/sitemap/A.html">A</a> <a href="/sitemap/B.html">B</a> <a href="/sitemap/C.html">C</a> <a href="/sitemap/D.html">D</a> <a href="/sitemap/E.html">E</a> <a href="/sitemap/F.html">F</a> <a href="/sitemap/G.html">G</a> <a href="/sitemap/H.html">H</a> <a href="/sitemap/I.html">I</a> <a href="/sitemap/J.html">J</a> <a href="/sitemap/K.html">K</a> <a href="/sitemap/L.html">L</a> <a href="/sitemap/M.html">M</a> <a href="/sitemap/N.html">N</a> <a href="/sitemap/O.html">O</a> <a href="/sitemap/P.html">P</a> <a href="/sitemap/Q.html">Q</a> <a href="/sitemap/R.html">R</a> <a href="/sitemap/S.html">S</a> <a href="/sitemap/T.html">T</a> <a href="/sitemap/U.html">U</a> <a href="/sitemap/V.html">V</a> <a href="/sitemap/W.html">W</a> <a href="/sitemap/X.html">X</a> <a href="/sitemap/Y.html">Y</a> <a href="/sitemap/Z.html">Z</a> <a href="/sitemap/0.html">0</a> <a href="/sitemap/1.html">1</a> <a href="/sitemap/2.html">2</a> <a href="/sitemap/3.html">3</a> <a href="/sitemap/4.html">4</a> <a href="/sitemap/5.html">5</a> <a href="/sitemap/6.html">6</a> <a href="/sitemap/7.html">7</a> <a href="/sitemap/8.html">8</a> <a href="/sitemap/9.html">9</a></p>
            </div>
        </div>
    </div>
</footer>
<script type="text/javascript">
    $(function() {
        var inBrowser = typeof window !== 'undefined';
        var UA = inBrowser && window.navigator.userAgent.toLowerCase();
        var isIE = UA && /msie|trident/.test(UA);
        if(isIE){
           $('#wrapper').addClass('disBlock');
        }
    });
</script>
    <div id="adShowcontent"></div>
    </div>
</body>
</html>
