PageSourceSearch

https://www.yw56.com.cn/webfile/CnResource/js/ywwlspace.js

js yw56.com.cn collected 2026-10-02 03:51:49 UTC 96,744 bytes, 2,110 lines download raw bytes

1// !!!注册全局函数
2    var ywwlspace = {
3        util: {},    // 工具函数
4        ajax: {},    // 数据请求
5        message: {}  // 全局提示
6    };
7	
8
9// util 工具函数
10    // -获取url参数
11    ywwlspace.util.getUrlParams = function() {
12        var url = location.search;
13        var theRequest = {};
14        if (url.indexOf("?") !== -1) {
15            var str = url.substr(1);
16            if (str.indexOf("&") !== -1) {
17                var strs = str.split("&");
18                for (var i = 0; i < strs.length; i++) {
19                    theRequest[strs[i].split("=")[0]] = decodeURI(strs[i].split("=")[1]);
20                }
21            } else {
22                theRequest[str.split("=")[0]] = decodeURI(str.split("=")[1]);
23            }
24        }
25        return theRequest;
26    };
27    // -格式化时间
28    ywwlspace.util.timeFormat = function(dateVal, fmt) {
29        if (!dateVal) return '-';
30        var date = new Date(parseInt(dateVal * 1000, 10));
31        var o = {
32            'M+': date.getMonth() + 1, // 月份
33            'd+': date.getDate(), // 日
34            'h+': date.getHours() % 12 === 0 ? 12 : date.getHours() % 12, // 小时
35            'H+': date.getHours(), // 小时
36            'm+': date.getMinutes(), // 分
37            's+': date.getSeconds(), // 秒
38            'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
39            'S': date.getMilliseconds() // 毫秒
40        };
41        var week = {
42            cn: {
43                '0': '/u65e5',
44                '1': '/u4e00',
45                '2': '/u4e8c',
46                '3': '/u4e09',
47                '4': '/u56db',
48                '5': '/u4e94',
49                '6': '/u516d'
50            }
51        };
52        if (/(y+)/.test(fmt)) {
53            fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
54        }
55        if (/(E+)/.test(fmt)) {
56            fmt = fmt.replace(RegExp.$1, ((RegExp.$1.length > 1) ? (RegExp.$1.length > 2 ? '/u661f/u671f' : '/u5468') : '') + week[date.getDay() + ''])
57        }
58        for (var k in o) {
59            if (new RegExp('(' + k + ')').test(fmt)) {
60                fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
61            }
62        }
63        return fmt
64    };
65    // -每 5 项分组
66    ywwlspace.util.sliceFive = function(arr) {
67        var newArr=[], i=0, len = arr.length;
68        for (; i < len; i += 5) {
69            newArr.push(arr.slice(i, i + 5));
70        }
71        return newArr;
72    };
73    // -每 3 项分组
74    ywwlspace.util.sliceThree = function(arr) {
75        var newArr=[], i=0, len = arr.length;
76        for (; i < len; i += 3) {
77            newArr.push(arr.slice(i, i + 3));
78        }
79        return newArr;
80    };
81    ywwlspace.util.NAMES = {};
82
83// ajax 请求模块
84    // -首页相关
85    // --轮播图--右侧浮动公告
86    ywwlspace.ajax.getNoticeList = function() {
87        var parm = {
88            currentPage : 1,
89            pageSize : 10,
90            language : language,
91            typecode : "notice"
92        };
93        $.ajax({
94            url : ywwlPath+"/article/pageList.action",
95            data : JSON.stringify(parm),
96            async : true,
97            type : "post",
98            dataType : "json",
99            contentType : 'application/json;charset=UTF-8',
100            success : function(data) {
101                var page = data.page;
102                var maList = data.maList;
103                var floatHtml = "";
104                if (maList !== 0 && maList.length > 0) {
105                    var ma = maList[0];
106                    var title2 = ma.title;
107                    if (title2.length > 20) {
108                        title2 = title2.substr(0, 20) + "...";
109                    }
110                    floatHtml = floatHtml
111                        + "<div class='iteam'><a href='"+ywwlPath+"/chn/news?fKey=fwgg&sKey="+ ma.id + "' title='"
112                        + ma.title
113                        + "' onclick='noticeDetail("
114                        + ma.id + ")'>" + title2 + "</a></div>";
115                }
116                window.localStorage.setItem("admin_key_notice", JSON.stringify(ma));
117                $(".index-banner").find(".float-notice").find(".list").html(floatHtml);
118            },
119            error : function() {
120                ywwlspace.message.xcConfirm("公告获取失败,请重试", "error");
121                return false;
122            },
123            beforeSend : function() {
124                //$("#round").show();
125            },
126            complete : function() {
127                //$("#round").hide();
128            }
129        });
130    };
131    // --合作伙伴logo
132    ywwlspace.ajax.cptPartner = function() {
133        var parm = {
134            language : language,
135            typecode : "cptPartner"
136            // currentPage : 1,
137            // pageSize : 10
138        };
139        $.ajax({
140            url: ywwlPath+"/article/articleList.action",
141            data: JSON.stringify(parm),
142            async: true,
143            type: "post",
144            dataType: "json",
145            contentType: "application/json;charset-UTF-8",
146            success: function(data) {
147                var groupFive=[], groupThree=[], strHtml="", resHtml="", cmsUrl = data.cmsUrl;
148                if (window.innerWidth > 992) {
149                    // pc
150                    groupFive = ywwlspace.util.sliceFive(data.list);
151                    for (var i=0; i<groupFive.length; i++) {
152                        for (var j=0; j<groupFive[i].length; j++) {
153                            strHtml += "<li class='col-xs-5'>"
154                                    +  groupFive[i][j].icon
155                                    +  "</li>";
156                        }
157                        resHtml += "<ul class='row item'>"
158                                +  strHtml
159                                +  "</ul>";
160                        strHtml = "";
161                    }
162                    // 导入html
163                    $('.full-md>.carousel-inner').html(resHtml);
164                    // 图片加入前缀
165                    $(".full-md>.carousel-inner").find("img").each(function(){
166                        var src = $(this).attr("src");
167                        if(src.indexOf("http")<0){
168                            $(this).attr("src",cmsUrl+src).attr("title","");
169                        }
170                    });
171                    // 轮播初始化 active
172                    $('.full-md>.carousel-inner>ul:first-child').addClass("active");
173                } else {
174                    // 移动端
175                    groupThree = ywwlspace.util.sliceThree(data.list);
176                    for (var i=0; i<groupThree.length; i++) {
177                        for (var j=0; j<groupThree[i].length; j++) {
178                            strHtml += "<li class='col-xs-4'>"
179                                +  groupThree[i][j].icon
180                                +  "</li>";
181                        }
182                        resHtml += "<ul class='row item'>"
183                            +  strHtml
184                            +  "</ul>";
185                        strHtml = "";
186                    }
187                    // 导入html
188                    $('.full-xs>.carousel-inner').html(resHtml);
189                    // 图片加入前缀
190                    $(".full-xs>.carousel-inner").find("img").each(function(){
191                        var src = $(this).attr("src");
192                        if(src.indexOf("http")<0){
193                            $(this).attr("src",cmsUrl+src).attr("title","合作伙伴");
194                            $(this).addClass('img-responsive');
195                        }
196                    });
197                    // 轮播初始化 active
198                    $('.full-xs>.carousel-inner>ul:first-child').addClass("active");
199                }
200
201            },
202            error: function() {
203                ywwlspace.message.xcConfirm("合作伙伴获取失败,请重试", "error");
204                return false;
205            },
206            beforeSend : function() {
207                //$("#round").show();
208            },
209            complete : function() {
210                //$("#round").hide();
211            }
212        })
213    };
214
215    
216
217    // -服务
218    // --价格比较--查询价格
219    ywwlspace.ajax.getPrice = function(address) {
220        $('#priceResult').DataTable().destroy();
221        //出发地区域
222        var areaName = areacodeToAreaname(address);
223        function areacodeToAreaname(obj) {
224            if(parseInt(obj.areaCode) == 1001) {
225                return '华北';
226            } else if (parseInt(obj.areaCode) == 1002) {
227                return '华东';
228            } else if (parseInt(obj.areaCode) == 1003) {
229                return '华南';
230            //} else if (parseInt(obj.areaCode) == 1004) {
231            //    return '香港';
232            } else if (parseInt(obj.areaCode) == 1) {
233                return '北京';
234            } else if (parseInt(obj.areaCode) == 1006) {
235                return '西南'; 
236			} else if (parseInt(obj.areaCode) == 1005) {
237                return '华中';
238            } else {
239                return '华北';
240            }
241        }
242        //目的地
243        var destination = address.destination;
244        var countryid = address.countryId;
245        //重量
246        var weight = address.weight;
247        // 产品类型
248        // 货品属性
249
250
251        var parm = {
252            areaCode:address.areaCode.toString(),
253            productTypes: address.productTypes.length == 0 ? 'N' : address.productTypes.join(','),
254            level2Catalog: address.electricTehuoTypes.length == 0 ? 'N' : address.electricTehuoTypes.join(","),
255            countryId:address.countryId,
256            destination:address.destination,
257            weight:address.weight
258        };
259        // console.log(address)
260        // console.log(parm)
261
262        $.ajax({
263            url : 'api/queryPriceComparisonCondition',
264            data: parm,
265            async: true,
266            type: "post",
267            dataType: "json",
268            contentType: 'application/json;charset=UTF-8',
269            success:function(data){
270                if (data.messageCode != 0) {
271                    // ywwlspace.message.xcConfirm("提示信息:"+data.messageMark, "info");
272                    // return;
273                    if (data && !data.priceList) {
274                        data.priceList = []
275                    }
276                }
277
278                var tableHead = "<tr>" +
279                    "<th style='padding-right: 0;color:#000;width: 200px;'>产品名称</th>" +
280                    "<th style='padding-right: 0;color:#000;'>产品类型</th>" +
281                    "<th style='padding-right: 0;color:#000;width: 150px;'>货品属性</th>" +
282                    // "<th style='padding-right: 0;color:#000;'>带电类型</th>" +
283                    "<th style='padding-right: 0;color:#000;'>燃油费率</th>" +
284                    // "<th style='padding-right: 0;color:#000;'>时效(工作日)</th>" +
285                    "<th style='padding-right: 0;color:#000;'>是否可追踪</th>"+
286                    "<th style='padding-right: 0;color:#000;'>是否计泡</th>"+
287                    "<th style='padding-right: 0;color:#000;'>计泡系数</th>"+
288                    "<th style='padding-right: 0;color:#000;'>重量(克)</th>" +
289                    "<th style='padding-right: 0;color:#000;'>资费(元)</th>" +
290                    "<th style='padding-right: 0;color:#000;'>折扣%(可输入)</th>" +
291                    "<th style='padding-right: 0;color:#000;'>折后价(元)</th>" +
292                    "<th style='padding-right: 0;color:#000;display: none'>产品说明</th>" +
293                    // "<th>计算公式</th>" +
294                    "</tr>";
295                var priceList = data.priceList;
296                // console.log(priceList)
297                var tbody = "";
298                for (var keyP = 0; keyP<priceList.length; keyP ++ ) {
299                    var price = priceList[keyP];
300                    var priceDetailList = price.priceDetailList;
301                    if (price.productName!=null) {
302                        // var img = "<img src='"+ywwlPath + "/style/images/yes.png'>"
303                        var img = "全程追踪"
304                        if (parseInt(price.isTrack) !== 1) {
305                            // img = "<img src='"+ywwlPath + "/style/images/no.png'>"
306                            var img = "半程追踪"
307                        }
308                        // 拼接结算公式
309                        var formulaText = "<div>【资费计算】</div>";
310                        for(var c=0;c<priceList[keyP].priceDetailList.length;c++) {
311                            formulaText
312                                += "<div>"+priceList[keyP].priceDetailList[c].itemName + ":" + priceList[keyP].priceDetailList[c].formula + "</div>"
313                        }
314                        tbody = tbody +
315                            "<tr>"+
316                            "<td class='productCode ti-1 ti-show' code='"+price.productCode+"' name='"+price.productCode+"' data='"+(!price.desc ? formulaText : (formulaText + price.desc))+"' style='cursor: pointer;white-space: nowrap;'><i style='margin: 0 5px;background-position: 0 -44px;vertical-align: middle;'></i>"+price.productName+"</td>"+
317                            "<td class='productTypeName'>"+(price.productTypeName==null||price.productTypeName=='undefined'?"":price.productTypeName)+"</td>"+
318                            "<td class='productCode' code='"+price.productCode+"' style='text-align: center;'>"+(price.level2CatalogNames.length>0 ? price.level2CatalogNames.join("/") : '')+"</td>"+
319                            // "<td class='areaCode' code='"+address.areaCode+"'>"+areaName+"</td>"+
320                            // "<td class='countryid' code='"+address.countryId+"'>"+destination.split('/')[0]+"</td>"+
321                            // "<td class='electricTypeCode' code='"+price.electricTypeCode+"'>"+price.electricTypeName+"</td>"+
322                            "<td class='fuelRate'>"+(price.fuelRate==null||price.fuelRate==undefined?"":price.fuelRate)+"</td>"+
323                            // "<td class='limitTime'>"+(price.limitTime==null||price.limitTime=='undefined'?"":price.limitTime)+"</td>"+
324                            "<td class=''>"+img+"</td>"+
325                            "<td class=''>"+(price.calcGweight==null || price.calcGweight==undefined?"":(price.calcGweight=="1"?"是":"否"))+"</td>"+
326                            "<td class=''>"+(price.calcGweightRate==null || price.calcGweightRate==undefined?'':price.calcGweightRate)+"</td>"+
327                            "<td class='weight'>"+address.weight+"</td>"+
328                            "<td class='chargePrice'>"+(price.chargePrice==null?"":price.chargePrice.toFixed(2))+"</td>"+
329                            "<td>" +(parseInt(priceList[keyP].discountFlag) === 1 ? "<input type='text' value='100' class='form-control' style='width:80px'>" : "<input type='text' value='100' disabled class='form-control' style='width:80px'>") +"</td>"+
330                            // "<td class='discountPrice' style='position: relative'><span>"+(price.discountPrice==null?"":price.discountPrice.toFixed(2))+"</span><a class='calc'>?</a><a class='cost'>"+formulaText+"</a></td>"+从这里删除即可使用,计费计算的悬浮效果
331                            "<td class='discountPrice' style='position: relative;cursor: default;'><span>"+(price.discountPrice==null?"":price.discountPrice.toFixed(2))+"</span></td>"+
332                            "<td class='' style='display: none'><i name='"+price.productCode+"' class='ti-1 ti-show' data='"+price.desc+"'></i></td>"+
333                            // "<td class=''><i name='"+price.productCode+"' class='ti-2 ti-show'></i></td>"+
334                            "</tr>";
335                    }
336                }
337                if (tbody != "") {
338                    $("#priceThead").empty();
339                    $("#priceThead").append(tableHead);
340                    $("#priceTbody").empty();
341                    $("#priceTbody").append(tbody);
342                }
343
344                // 点击产品说明
345                $('#priceResult').off().on('click', '.ti-1', function (event) {
346                    event.preventDefault();
347                    var id = $(this).attr("name");
348                    // console.log(id)
349
350                    if($(this).hasClass('ti-show')){
351                        var desc = $(this).attr("data");
352                        // debugger
353                        if (desc==null || desc=='undefined') {
354                            desc = '暂无';
355                        }
356                        $(this).parents("tr").after("<tr class='notice' name='"+id+"'>" +
357                            "<td colspan='11'>" +
358                            desc +
359                            "</td>" +
360                            "</tr>");
361                        $(this).removeClass('ti-show');
362                    }else{
363                        $(this).parents("table").find(".notice[name='"+id+"']").remove();
364                        $(this).addClass('ti-show');
365                    }
366
367                });
368
369                // 折扣
370                $("#priceTbody").find("input").each(function(){
371                    $(this).bind('input propertychange', function() {
372                        var tr = $(this).parents("tr");
373                        var productCode = tr.find(".productCode").attr("code");
374                        var areaCode = tr.find(".areaCode").attr("code") || address.areaCode;
375                        var countryid = tr.find(".countryid").attr("code") || address.countryId;
376                        var electricTypeCode = tr.find(".electricTypeCode").attr("code");
377                        var weight = tr.find(".weight").html();
378                        var discount = $(this).val();
379                        var temp=/^\d+(\.\d+)?$/;
380                        if(temp.test(discount)==false||discount==0){
381                            return;
382                        }
383                        var param = {
384                            productCode: productCode,
385                            areaCode: areaCode,
386                            countryId: countryid,
387                            weight: weight,
388                            discount: discount/100
389                        };
390                        // console.log(param)
391                        $.ajax({
392                            url : ywwlPath + "/busHalOnline/reckonPrice.htm",
393                            data: JSON.stringify(param),
394                            async: true,
395                            type: "post",
396                            dataType: "json",
397                            contentType: 'application/json;charset=UTF-8',
398                            success:function(data){
399                                if(data==null){
400                                    ywwlspace.message.xcConfirm("网络异常,请重试", "error");
401                                }else if(data.messageCode==0){
402                                    tr.find(".discountPrice span").html(data.disocuntPrice!=null?data.disocuntPrice.toFixed(2):"");
403                                }else{
404                                    ywwlspace.message.xcConfirm(data.messageMark+"|-错误码:"+data.messageCode, 'error');
405                                }
406                            },
407                            beforeSend:function(){
408                                //$("#round").show();
409                            },
410                            complete:function(){
411                                //$("#round").hide();
412                            }
413                        });
414                    });
415                });
416
417                $('#priceResult').DataTable().destroy();
418                table = $('#priceResult').dataTable({
419                    "destroy": true,
420                    "bSort": false,
421                    "sPaginationType" : "full_numbers",
422                    "aLengthMenu": [
423                        [-1, 100, 50, 10],
424                        ['显示所有数据', '每页100条', '每页50条', '每页10条'] // change per page values here
425                    ],
426                    "oLanguage" : {
427                        "sLengthMenu": "每页显示 _MENU_ 条记录",
428                        "sZeroRecords": "暂无数据",
429                        "sInfo": "第 _PAGE_ 页 ( 总共 _PAGES_ 页 ) /共 _TOTAL_ 条数据",
430                        "sInfoEmpty": "",
431                        "sInfoFiltered": "(从 _MAX_ 条数据中检索)",
432                        "sSearch": "搜索:",
433                        "oPaginate": {
434                            "sFirst": "首页",
435                            "sPrevious": "前一页",
436                            "sNext": "后一页",
437                            "sLast": "尾页"
438                        }
439                    }
440                } );
441            },
442            error:function(e){
443                $(".error-tip").show();
444                return;
445            },
446            beforeSend:function(){
447                // $("#priceThead").empty();
448                $("#priceTbody").empty();
449                // $(".error-tip").show();
450                //$("#round").show();
451            },
452            complete:function(){
453                //$("#round").hide();
454            }
455        });
456    };
457    // --价格比较--查询条件
458    ywwlspace.ajax.getNetworkAddress = function() {
459        var parm = {"country":{"regionId":"N"},"city":{"name":"N"}};
460        $.ajax({
461            url: 'api/queryPriceComparisonCondition',
462            data: parm,
463            async: true,
464            type: "get",
465            dataType: "json",
466            contentType: 'application/json;charset=UTF-8',
467            success: function (data) {
468                var origin = data.lineCity.lineCityList;
469                var destination = data.country.regionList;
470				console.log(data);
471
472                // filter 华南/华北/华东/香港/河北/北京/其他
473                var address = {
474                    areaCode: '1001',
475                    areaName: '华北',
476                    cityId:'',
477                    cityName:'',
478                    productTypes:[],
479                    electricTypes:[],
480                    electricTehuoTypes:[],
481                    countryId:'',
482                    destination:'',
483                    weight:''
484                };
485                // filter 华南/华北/华东/香港/西南
486                var southChina=[], northChina=[], eastChina=[], hk=[], southwest=[], centralChina=[];
487                for(var i=0; i<origin.length; i++) {
488                    if (origin[i].areaCode === '1003') {
489                        southChina.push(origin[i]);
490                    } else if (origin[i].areaCode === '1001') {
491                        northChina.push(origin[i]);
492                    } else if (origin[i].areaCode === '1002') {
493                        eastChina.push(origin[i]);
494                    //} else if (origin[i].areaCode === '1004') {
495                    //    hk.push(origin[i]);
496                    } else if (origin[i].areaCode === '1006') {
497                        southwest.push(origin[i]);
498                    } else if (origin[i].areaCode === '1005') {
499                        centralChina.push(origin[i]);
500                    }
501                }
502                // 拼接地址
503                var areaHtml='', southChinaHtml='', northChinaHtml='';
504                var eastChinaHtml='', hkHtml='', beijingHtml='', southwestHtml='', otherHtml='', centralChinaHtml='';
505                areaHtml = "<li data-areacode='1001' class='current' style='padding:5px;margin:0;'>华北</li>" +
506                            "<li data-areacode='1003' style='padding:5px;margin:0;'>华南</li>" +
507                            "<li data-areacode='1002' style='padding:5px;margin:0;'>华东</li>" +
508                            //"<li data-areacode='1004' style='padding:5px;margin:0;'>香港</li>" +
509							"<li data-areacode='1005' style='padding:5px;margin:0;'>华中</li>" +
510                            "<li data-areacode='1006' style='padding:5px;margin:0;'>西南</li>"
511                for(var j=0; j<southChina.length; j++){
512                    southChinaHtml += "<li data-name='" +southChina[j].id+ "'>" +southChina[j].name+ "</li>"
513                }
514                for(var k=0; k<northChina.length; k++){
515                    northChinaHtml += "<li data-name='" +northChina[k].id+ "'>" +northChina[k].name+ "</li>"
516                }
517                for(var l=0; l<eastChina.length; l++){
518                    eastChinaHtml += "<li data-name='" +eastChina[l].id+ "'>" +eastChina[l].name+ "</li>"
519                }
520                for(var m=0; m<hk.length; m++){
521                    hkHtml += "<li data-name='" +hk[m].name+ "'>" +hk[m].id+ "</li>"
522                }
523                for(var o=0; o<southwest.length; o++){
524                    southwestHtml += "<li data-name='" +southwest[o].id+ "'>" +southwest[o].name+ "</li>"
525                }
526				for(var c=0; c<centralChina.length; c++){
527                    centralChinaHtml += "<li data-name='" +centralChina[c].id+ "'>" +centralChina[c].name+ "</li>"
528                }
529                // 选择出发地
530                handleAddress('top-box', address);
531                function handleAddress(ele, obj) {
532                    // 文本框显示内容
533                    function handleInputValue() {
534                        var str = '';
535                        if(parseInt(obj.areaCode) == 1001) {
536                            str = '华北' + '-' + obj.cityName;
537                        } else if (parseInt(obj.areaCode) == 1002) {
538                            str = '华东' + '-' + obj.cityName;
539                        } else if (parseInt(obj.areaCode) == 1003) {
540                            str = '华南' + '-' + obj.cityName;
541                        //} else if (parseInt(obj.areaCode) == 1004) {
542                        //    str = '香港' + '-' + obj.cityName;
543                        } else if (parseInt(obj.areaCode) == 1006) {
544                            str = '西南' + '-' + obj.cityName;
545                        } else if (parseInt(obj.areaCode) == 1005) {
546                            str = '华中' + '-' + obj.cityName;
547                        }
548                        $("."+ ele + "-input").val(str);
549                    }
550                    // box显示与隐藏
551                    var firstBtn = false;
552                    $("." + ele).off().on('click', "." + ele + "-choose", function() {
553                        $("." + ele + "-content").slideToggle('fast');
554
555                        if (!firstBtn) {
556                            // html 插入
557                            $("."+ele+"-content .first-floor").html(areaHtml);
558                            $("."+ele+"-content .third-floor").html(northChinaHtml);
559                            firstBtn = true
560                        }
561
562                    });
563
564                    // 根据一楼选择进行显示三楼nearing
565                    $("." + ele + " .first-floor").off().on('click', 'li', function() {
566                        $(this).addClass('current').siblings().removeClass('current');
567                        obj.areaCode = $(this).data('areacode');
568                        obj.areaName = $(this).text();
569                        obj.cityName = '';
570                        obj.cityId = null;
571                        $(".top-box-input-box").data("areaCode", address.areaCode);
572                        $(".top-box-input-box").data("areaName", address.areaName);
573                        $(".top-box-input-box").data("cityId", "");
574                        $(".top-box-input-box").data("cityName", "");
575                        console.log(obj);
576                        // $(".top-box-input").val(address.areaName);
577                        var $thirdFloor = $("."+ele+"-content .third-floor");
578
579                        handleInputValue();
580                        if(obj.areaCode == '1001') {
581                            $thirdFloor.html(northChinaHtml);
582                        } else if (obj.areaCode == '1002') {
583                            $thirdFloor.html(eastChinaHtml);
584                        } else if (obj.areaCode == '1003') {
585                            $thirdFloor.html(southChinaHtml);
586                        }
587                        // else if (obj.areaCode == '1004') {
588                        //     $thirdFloor.html(hkHtml);
589                        // }
590                        else if (obj.areaCode == '1006') {
591                            $thirdFloor.html(southwestHtml);
592                        } else if (obj.areaCode == '1005') {
593                            $thirdFloor.html(centralChinaHtml);
594                        }
595
596                    });
597                    $("." + ele + " .third-floor").off().on('click', 'li', function() {
598                        $(this).addClass('current').siblings().removeClass('current');
599                        //obj.areaCodeName = $(this).text();
600						obj.cityId = $(this).data('name') + '';
601                        obj.cityName = $(this).text();
602                        $(".top-box-input-box").data("cityId",address.cityId);
603                        $(".top-box-input-box").data("cityName",address.cityName);
604                        handleInputValue()
605                        $("." + ele + "-content").slideToggle('fast');
606                        // console.log(obj);
607                    });
608                }
609
610                // 选择目的地
611                var regionRelList = new Array();
612                for(i=0;i<destination.length;i++){
613                    var region = destination[i];
614                    var label = region.chinesename + '/' + region.chinesepinyin + '/' + region.englishname + '/' + region.english2bit;
615                    regionRelList[i] = {label: label, value: region.id, enname: region.englishname, shotname: region.english2bit};
616                    // console.log(regionRelList)
617                }
618                $("#destination").autocomplete({
619                    source: regionRelList,
620                    select: function( event, ui ) {
621                        $("#destination").val(ui.item.label.split('/')[0]);
622                        $("#destination-id").val(ui.item.value);
623                        address.countryId = ui.item.value;
624                        address.destination = ui.item.label;
625                        event.preventDefault();
626                    }
627                });
628                $("#destination").blur(function(){
629                    // console.log(address)
630                    var dest = $(this).val();
631                    var iscountry = false;
632                    for(var key in destination){
633                        var country = destination[key];
634                        if((country.chinesename)==dest){
635                            $("#destination-id").val(country.id);
636							address.countryId = country.id;
637                            address.destination = country.chinesename;
638                            iscountry = true;
639                            break;
640                        }
641                    }
642                    if(!iscountry){
643                        $("#destination").val("");
644                        $("#destination-id").val("");
645                    }
646                    if(!dest){
647                        // console.log('不存在目的地')
648                        address.countryId = ""
649                    }
650                });
651
652                // 填写重量
653                $('.weight-box-input').change(function(){
654                    address.weight = $(this).val()
655                    // console.log(address)
656                })
657
658                // 产品类型
659                function multselInit(){
660                    $_sel=$("div.multsel");
661                    $_sel.each(function(){
662                        $(this).append("<i></i>");
663                    });
664                    $_sel.find("span.view").click(function(){
665                    	alert("快让我出去")
666                        $_t=$(this).parent("div.multsel");
667                        if($_t.hasClass('expand')){
668                            $("div.multsel .selist").hide();
669                            $_t.find("i:first").removeClass("pop");
670                            $_t.removeClass('expand');
671                        }else {
672                            $("div.multsel .selist").show();
673                            $_t.find("i:first").addClass("pop");
674                            $_t.addClass('expand');
675                        }
676                    });
677                    $_sel.find(".selist").find("span.seitem").click(function(){
678                        $_this=$(this);
679
680                        if($_this.hasClass('checked')){
681                            $_this.removeClass('checked');
682                        }else{
683                            $_this.addClass('checked');
684                        }
685                        multselCheck($("div.multsel .selist"));
686                    });
687
688                    $(document).click(function(e){
689                        var t = $("div.multsel")[0],target = e.target;
690                        if (t !== target && !$.contains(t, target)) {
691                            $("div.multsel").removeClass('expand').find(".selist").hide();
692                            $("div.multsel").find("i:first").removeClass("pop");
693                        }
694                    });
695                }
696                function multselCheck($obj){
697                    var names='',vals=[];
698                    $obj.find('span.checked').each(function(){
699                        var $t=$(this);
700                        names+=$t.html()+"  |  "
701                        vals.push($t.attr("value"));
702                    });
703                    if(!names){
704                        names='请选择...';
705                    }
706                    $('#choose-clear').show()
707                    $obj.parent('div.multsel').find('span.view').html(names);
708                    multselVals(vals);
709                }
710                function multselVals(vals){
711                    var arrProductTypes = []
712                    for(var i=0,size=vals.length;i<size;i++){
713                        arrProductTypes.push(vals[i]);
714                    }
715                    if(arrProductTypes.length) {
716                        address.productTypes = arrProductTypes;
717                    } else {
718                        address.productTypes = [];
719                    }
720                }
721
722                // 产品属性 - 一级选择 - 不作为筛选条件
723                function multselInit2(){
724                    $_sel=$("div.multsel2");
725                    $_sel.each(function(){
726                        $(this).append("<i></i>");
727                    });
728                    $_sel.find("span.view").click(function(){
729                        $_t=$(this).parent("div.multsel2");
730                        if($_t.hasClass('expand')){
731                            $("div.multsel2 .selist").hide();
732                            $_t.find("i:first").removeClass("pop");
733                            $_t.removeClass('expand');
734                        }else {
735                            $("div.multsel2 .selist").show();
736                            $_t.find("i:first").addClass("pop");
737                            $_t.addClass('expand');
738                        }
739                    });
740                    $_sel.find(".selist").find("span.seitem").click(function(){
741                        $_this=$(this);
742
743                        $("div.multsel2 span.seitem").each(function(item, ele) {
744                            if($(ele).hasClass('checked')) {
745                                $(ele).removeClass('checked')
746                            }
747                        })
748
749                        $_this.addClass('checked');
750                        if($_this.html() == "普货") {
751                            $('.multsel3').html("<span class='view' style='font-size: 14px;'>默认全部</span><div class='selist'><span class='seitem' value='101'>普通货物</span> </div><a href='javascript:;' id='choose2-clear'>X</a>")
752                        } else if($_this.html() == "特货") {
753                            $('.multsel3').html(
754                                "<span class='view' style='font-size: 14px;'>默认全部</span>" +
755                                "<div class='selist'>" +
756                                    "<span class='seitem' value='1'>纯电池</span>" +
757                                    "<span class='seitem' value='2'>内置电池</span>" +
758                                    "<span class='seitem' value='3'>外置电池品</span>" +
759                                    "<span class='seitem' value='4'>微磁产品具</span>" +
760                                    "<span class='seitem' value='5'>固体化妆品</span>" +
761                                    "<span class='seitem' value='6'>非管制刀具</span>" +
762                                    "</div><a href='javascript:;' id='choose2-clear'>X</a>" +
763                                "</div>")
764                        } else {
765                            $('.multsel3').html('');
766                        }
767                        $('div.multsel2').removeClass('expand');
768                        $("div.multsel2 .selist").hide();
769                        multselInit3();
770                        multselCheck2($("div.multsel2 .selist"));
771
772                        // 清空货品属性
773                        $('#choose2-clear').off().on('click', function() {
774                            $('.multsel2').removeClass('expand');
775                            $(".multsel2 .selist").hide();
776                            $('.multsel2 .view').html('');
777                            $('.multsel2 .selist').find('span.seitem').each(function(i, ele) {
778                                $(ele).removeClass('checked')
779                            })
780                            $('.multsel3').removeClass('expand');
781                            $(".multsel3 .selist").hide();
782                            $('.multsel3 .view').html('');
783                            $('.multsel3 .selist').find('span.seitem').each(function(i, ele) {
784                                $(ele).removeClass('checked')
785                            })
786                            address.electricTehuoTypes = [];
787                            address.electricTypes = [];
788                            $(this).hide()
789                        })
790                    });
791
792                    $(document).click(function(e){
793                        var t = $("div.multsel2")[0],target = e.target;
794                        if (t !== target && !$.contains(t, target)) {
795                            $("div.multsel2").removeClass('expand').find(".selist").hide();
796                            $("div.multsel2").find("i:first").removeClass("pop");
797                        }
798                    });
799                }
800                function multselCheck2($obj){
801                    var names='',vals=[];
802                    $obj.find('span.checked').each(function(){
803                        var $t=$(this);
804                        names+=$t.html();
805                        vals.push($t.attr("value"));
806                        // 清除货品属性二级类目
807                        address.electricTehuoTypes = []
808                    });
809                    if(!names){
810                        names='请选择...';
811                    }
812                    $('#choose2-clear').show()
813                    $obj.parent('div.multsel2').find('span.view').html(names);
814                    multselVals2(vals);
815                }
816                function multselVals2(vals){
817                    // console.log(vals)
818                    var arrElectricTypes = []
819                    for(var i=0,size=vals.length;i<size;i++){
820                        arrElectricTypes.push(vals[i]);
821                    }
822                    if(arrElectricTypes.length) {
823                        address.electricTypes = arrElectricTypes;
824                    } else {
825                        address.electricTypes = []
826                    }
827                    // 选择一级属性,默认选择全部二级属性
828                    if (vals[0] === "1") { // 全部普货属性
829                        address.electricTehuoTypes = ["101"]
830                    } else if (vals[0] === "2") { // 全部特货属性
831                        address.electricTehuoTypes = ["1", "2", "3", "4", "5", "6"]
832                    }
833                }
834
835                // 产品属性 - 二级选择 - 作为筛选条件
836                function multselInit3(){
837                    $_sel=$("div.multsel3");
838                    $_sel.each(function(){
839                        $(this).append("<i></i>");
840                    });
841                    $_sel.find("span.view").click(function(){
842                        if (!address.electricTypes.length) {
843                            ywwlspace.message.xcConfirm("请先选择一级货品属性!", "info");
844                            return false;
845                        }
846
847                        $_t=$(this).parent("div.multsel3");
848                        if($_t.hasClass('expand')){
849                            $("div.multsel3 .selist").hide();
850                            $_t.find("i:first").removeClass("pop");
851                            $_t.removeClass('expand');
852                        }else {
853                            $("div.multsel3 .selist").show();
854                            $_t.find("i:first").addClass("pop");
855                            $_t.addClass('expand');
856                        }
857                    });
858                    $_sel.find(".selist").find("span.seitem").click(function(){
859                        $_this=$(this);
860
861                        if($_this.hasClass('checked')){
862                            $_this.removeClass('checked');
863                        }else{
864                            $_this.addClass('checked');
865                        }
866                        multselCheck3($("div.multsel3 .selist"));
867                    });
868
869                    $(document).click(function(e){
870                        var t = $("div.multsel3")[0],target = e.target;
871                        if (t !== target && !$.contains(t, target)) {
872                            $("div.multsel3").removeClass('expand').find(".selist").hide();
873                            $("div.multsel3").find("i:first").removeClass("pop");
874                        }
875                    });
876                }
877                function multselCheck3($obj){
878                    var names='',vals=[];
879                    $obj.find('span.checked').each(function(){
880                        var $t=$(this);
881                        names+=$t.html()+"  |  ";
882                        vals.push($t.attr("value"));
883                    });
884                    if(!names){
885                        names='请选择...';
886                    }
887                    $obj.parent('div.multsel3').find('span.view').html(names);
888                    multselVals3(vals);
889                }
890                function multselVals3(vals){
891                    var arrTehuoTypes = [];
892                    address.electricTehuoTypes = [];
893                    for(var i=0,size=vals.length;i<size;i++){
894                        arrTehuoTypes.push(vals[i]);
895                    }
896                    if(arrTehuoTypes.length) {
897                        address.electricTehuoTypes = arrTehuoTypes;
898                    } else {
899                        address.electricTehuoTypes = [];
900                    }
901                }
902
903                multselInit();
904                multselInit2();
905                // 清除产品类型选择
906                $('#choose-clear').off().on('click', function() {
907                    $('.multsel').removeClass('expand');
908                    $(".multsel .selist").hide();
909                    $('.multsel .view').html('');
910                    $('.multsel .selist').find('span.seitem').each(function(i, ele) {
911                        $(ele).removeClass('checked')
912                    })
913                    address.productTypes = [];
914                    $(this).hide()
915                })
916
917                // 查询 - 校验
918                $('.price-choose').click(function() {
919                    if(!parseInt(address.areaCode)) {
920                        ywwlspace.message.xcConfirm("请选择出发地", "info");
921                    }
922                    if(!parseInt(address.countryId)) {
923                        ywwlspace.message.xcConfirm("请输入后选择目的地!", "info");
924                        // $('#destination').focus();
925                        ywwlspace.message.$html = $('#destination');
926                        return false;
927                    }
928                    if(!parseInt(address.weight)) {
929                        ywwlspace.message.xcConfirm("请填写重量!", "info");
930                        ywwlspace.message.$html = $('.weight-box-input');
931                        return false;
932                    }
933                    // 检验重量信息
934                    if (!/^[0-9]*$/.test(address.weight)) {
935                        ywwlspace.message.xcConfirm("重量只允许输入数字!", "info");
936                        ywwlspace.message.$html = $('.weight-box-input');
937                        return false;
938                    }
939                    // 检验销售产品类型
940                    // if(address.productTypes.length == 0) {
941                    //     ywwlspace.message.xcConfirm("请选择产品属性!", "info");
942                    //     return false;
943                    // }
944                    // 检验带电类型
945                    if(address.electricTypes.length && !address.electricTehuoTypes.length) {
946                        ywwlspace.message.xcConfirm("请正确选择货品属性!", "info");
947                        return false;
948                    }
949                    // 价格查询
950                    ywwlspace.ajax.getPrice(address);
951                })
952            },
953            error: function () {
954                ywwlspace.message.xcConfirm("查询失败,请重试1", "error");
955                return false;
956            },
957            beforeSend: function () {
958                // $("#round").show();
959            },
960            complete: function () {
961                // $("#round").hide();
962            }
963        });
964    };
965    // --网点查询--获取网点城市&选择城市
966    ywwlspace.ajax.getNetworkCity = function() {
967        //站点查询
968        var parm = {language:language,typecode:"siteQuery"};
969        $.ajax({
970            url : getNetworkCityUrl,
971            data: parm,
972            async : true,
973            type : "get",
974            dataType: "json",
975            contentType:'application/json;charset=UTF-8',
976            success:function(data){
977				//console.log(data);
978                var cmsUrl = data.cmsUrl;
979                var list = data.list;
980                // console.log(data);
981
982                var tempHtml='';
983                for(var i=0; i<list.length; i++){
984                    tempHtml += "<li data-city='"+list[i].title+"'>"+list[i].title+"</li>";
985                    // ywwlspace.ajax.getMap(list[i].title);
986                }
987                $('.network-query .third-floor').html(tempHtml);
988                // 默认加载北京
989                ywwlspace.ajax.getMap(cmsUrl, '北京');
990
991                // 控制地址弹出框
992                // $('.network-query .city-box-choose').click(function() {
993                //     $('.city-box-content').slideToggle('fast');
994                // })
995                // 选择地址
996                $('.network-query .third-floor li').click(function() {
997                    // console.log($(this))
998                    if(!$(this).hasClass('current')){
999                        $('.network-query .third-floor li').each(function() {
1000                            $(this).removeClass('current');
1001                        })
1002                        $(this).addClass('current');
1003                    }
1004                    $('.city-box-input').val($(this).data('city'));
1005                    // $('.city-box-content').slideToggle('fast');
1006                    // 请求对应地址的ajax
1007                    ywwlspace.ajax.getMap(cmsUrl, $(this).data('city'));
1008                    //$("#round").show();
1009                })
1010            },
1011            error:function(){
1012                window.wxc.xcConfirm("获取失败,请重试", window.wxc.xcConfirm.typeEnum.error);
1013                return;
1014            },
1015            beforeSend:function(){
1016                //$("#round").show();
1017            },
1018            complete:function(){
1019                //$("#round").hide();
1020            }
1021        });
1022    };
1023    // --网点查询--获取地图
1024    ywwlspace.ajax.getMap = function(cmsUrl, city) {
1025		console.log(city);
1026        var parm = {"city":city};
1027        $.ajax({
1028            url : getMapUrl,
1029            data: parm,
1030            async : true,
1031            type : "get",
1032            dataType: "json",
1033            contentType:'application/json;charset=UTF-8',
1034            success:function(data){
1035				console.log(data);
1036                // 百度地图API功能
1037                var map = new BMap.Map("allmap");
1038                map.centerAndZoom(city, 12);
1039                map.enableScrollWheelZoom(true);
1040                map.addEventListener("tilesloaded",function(){
1041                    //$("#round").hide();
1042                });
1043
1044                var data_info=[];
1045                var opts = {
1046                    width:500,
1047                    enableMessage: false
1048                };
1049                // 遍历组别,绘制范围
1050                for(var i in data){
1051                    //获取当前组别下的所有坐标点对象
1052                    var list = data[i];
1053
1054                    var points = new Array();
1055                    for(var j in list){
1056                        var p = list[j];
1057                        //转换成百度的坐标点对象,添加到数组中
1058                        var point = new BMap.Point(p.lng, p.lat);
1059                        points.push(point);
1060                    }
1061                    //将第一个坐标点作为最后一个坐标点,形成闭合图形
1062                    points.push(list[0]);
1063                    drowPolyline(map, points);
1064                };
1065                // 获取网点信息
1066                ywwlspace.ajax.getNets(cmsUrl, map, city);
1067            }
1068        });
1069    };
1070    // --网点查询--根据点绘制折线函数
1071    function drowPolyline(map, points){
1072        var polyline = new BMap.Polyline(points,{strokeColor:"blue", strokeWeight:2, strokeOpacity:1});
1073        map.addOverlay(polyline);
1074    }
1075    // --网点查询--获取网点信息
1076    ywwlspace.ajax.getNets = function(cmsUrl, map, city) {
1077        var parm = {"city":city};
1078        $.ajax({
1079            url : getNetsUrl,
1080            async : false,
1081            type : "get",
1082            dataType: "json",
1083            data: parm,
1084            contentType:'application/json;charset=UTF-8',
1085            success:function(res){
1086                // console.log(res);
1087                var opts = {
1088                    width:500,
1089                    enableMessage: false
1090                };
1091                var detailAddressHtml=""
1092                if (res && res.length) {
1093                    for(var i=0; i<res.length; i++){
1094
1095                        var myIcon = new BMap.Icon("/Public/Home/images/1505235697932025343.png", new BMap.Size(54,58));
1096                        var marker=new BMap.Marker(new BMap.Point(res[i].lng, res[i].lat), {icon:myIcon});
1097                        var content=editMsgHtml(res[i]);
1098                        map.addOverlay(marker);
1099                        marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
1100
1101                        var label = new BMap.Label("燕文网点",{offset:new BMap.Size(45,0)});
1102                        label.setStyle({"max-width":"55px",padding:"3px"});
1103                        marker.setLabel(label);
1104
1105                        addClickHandler(content, marker);
1106
1107                        detailAddressHtml += "<p>城市:<span>"+res[i].city+"</span></p><p>地址:<span>"+res[i].address+"</span></p><p>联系电话:"+res[i].phone+"</p>"
1108                    }
1109
1110                    // 添加网点信息
1111                    $('.detail-address').html(detailAddressHtml);
1112                    // --信息窗口显示
1113                    function addClickHandler(content, marker) {
1114                        marker.addEventListener("click",function(e){
1115                            openInfo(content,e);
1116                        });
1117                    }
1118                    function openInfo(content,e){
1119                        var p = e.target;
1120                        var point = new BMap.Point(p.getPosition().lng, p.getPosition().lat);
1121                        var infoWindow = new BMap.InfoWindow(content,opts);  // 创建信息窗口对象
1122                        map.openInfoWindow(infoWindow,point); //开启信息窗口
1123                    }
1124                    // 编辑信息窗口
1125                    function editMsgHtml(data) {
1126                        var html = '';
1127                        if (window.innerWidth>414) {
1128                            html = "<div class='msg-box'> <div class='msg-box-cont'> " +
1129                                "<p class='msg-box-cont__title'>燕文物流</p> " +
1130                                "<p>联系方式:"+data.phone+"</p></div> <div class='msg-box-text'>"
1131                                + data.address +
1132                                "</div>"
1133                        } else {
1134                            html="<div><p style='color:red'>"+data.address+"</p><p style='color:green'>电话:"+data.phone+"</p></div>";
1135                        }
1136
1137                        return html;
1138                    }
1139                } else {
1140                    console.log('该城市暂无网点信息,快去添加吧~');
1141                    // 添加网点信息
1142                    detailAddressHtml = "<p>该城市没有添加网点信息哦~</p>"
1143                    $('.detail-address').html(detailAddressHtml);
1144                }
1145
1146            }
1147        })
1148    };
1149
1150    //【newHome 页面ajax start】
1151    //--newHome 追踪
1152    ywwlspace.ajax.getTraces = function(billNosString) {
1153        var parm = {billNums: billNosString, language: "chn"};
1154        // console.log(billNosString)
1155        $.ajax({
1156            url: ywwlPath + "/busHalOnline/getTrack",
1157            data: JSON.stringify(parm),
1158            async: true,
1159            type: "post",
1160            dataType: "json",
1161            contentType: "application/json;charset=UTF-8",
1162            success: function(data) {
1163                // console.log(billNosString);
1164                if (billNosString) {
1165                    var returnHtml = ywwlspace.returnDomFn(data);
1166                    $("#returnHtml").html(returnHtml);
1167
1168                    // 更多选择的显示与隐藏
1169                    $('.showmore').off().on('click', function() {
1170                        console.log($('.showmorebox'))
1171                        $('.showmorebox').fadeToggle('fast');
1172                    });
1173                } else {
1174                    var clearHtml = "<div class='panel panel-default'>" +
1175                            "<p style='text-align: center;margin: 10px 0;'>暂无相关信息...</p>" +
1176                        "</div>"
1177                    $("#returnHtml").html(clearHtml);
1178                }
1179            },
1180            error: function () {
1181                ywwlspace.message.xcConfirm("查询失败,请重试2", "error");
1182                return false;
1183            },
1184            beforeSend: function () {
1185                //$("#round").show();
1186            },
1187            complete: function () {
1188                //$("#round").hide();
1189            }
1190        })
1191    };
1192    ywwlspace.returnDomFn = function(data) {
1193        var boxHtml = "", destinItemsHtml = "", originItemsHtml = "";
1194        for(var item in data) {
1195            // 检查是否正确返回信息
1196            if (data[item].message === null) {
1197                continue;
1198            }
1199            var t = data[item];
1200
1201            // 拼接目的地信息表
1202            if (t.destin_items.length > 0) {
1203                for(var i=0, l=t.destin_items.length; i<l; i++) {
1204                    destinItemsHtml +=
1205                        "<tr>" +
1206                            "<td class='text-right'>"+ ( t.destin_items[i].timestamp ) +"</td>" +
1207                            "<td>"+ ( t.destin_items[i].location && t.destin_items[i].location + "&nbsp;&nbsp;" ) + ( t.destin_items[i].message ) +"</td>" +
1208                        "</tr>"
1209                }
1210            }
1211
1212            // 拼接发货地信息表
1213            if (t.origin_items.length > 0) {
1214                for(var j=0, k=t.origin_items.length; j<k; j++) {
1215                    originItemsHtml +=
1216                        "<tr>" +
1217                            "<td class='text-right'>"+ ( t.origin_items[j].timestamp ) +"</td>" +
1218                            "<td>"+ ( t.origin_items[j].location && t.origin_items[j].location + "&nbsp;&nbsp;" ) + ( t.origin_items[j].message ) +"</td>" +
1219                        "</tr>"
1220                }
1221            }
1222
1223            // 拼接html
1224            boxHtml +=
1225                "<div class='panel panel-default'>" +
1226                    "<div class='panel-heading ' role='tab'>" +
1227                       "<div class='row'>" +
1228                            "<div class='col-lg-3 media-middle'>" +
1229                                "<div class='btn-group'>" +
1230                                    "<i class='btn btn-success btn-large font' title='Delivered'>" +
1231                                        (
1232                                            t.message === "success"
1233                                            ? "<span class='glyphicon glyphicon-ok' aria-hidden='true'></span>"
1234                                            : "<span class='glyphicon glyphicon-remove' aria-hidden='true'></span>"
1235                                        )
1236                                    + "</i>" +
1237                                    "<i class='btn btn-success btn-large font'>"+ ( t.message === "success" ? "签收成功" : "签收失败" ) +"</i>" +
1238                                    "<i class='btn btn-success btn-large font'>"+ ( t.days + "天" ) +"</i>" +
1239                                 "</div>" +
1240                            "</div>" +
1241                            "<div class='col-md-9'>" +
1242                                "<h4 title='运单号-[订单号]-转单号'>"+ ( t.waybill_number ) +"-[<em>"+ ( t.order_number ) +"</em>]-<small>"+ ( t.exchange_number ) +"</small></h4>"+
1243                                "<div>" +
1244                                    "<a class='' data-toggle='collapse' data-parent='#accordion' href='#"+ (t.waybill_number) +"' aria-expanded='true' aria-controls='123456'>" +
1245                                        "<code>"+ ( t.last_item && t.last_item.timestamp ) +"</code>" +
1246                                        ( t.last_item && t.last_item.location ) + "&nbsp;&nbsp;" + ( t.last_item && t.last_item.message ) +
1247                                    "</a>" +
1248                                "</div>" +
1249                            "</div>" +
1250                        "</div>" +
1251                        "<div class='row'><div class='col-lg-3'></div><div class='col-md-9'></div></div>" +
1252                    "</div>" +
1253                    "<div id='"+ ( t.waybill_number ) +"' class='panel-collapse collapse showmorebox' role='tabpanel' aria-labelledby='headingOne' aria-expanded='true'>" +
1254                        "<table class='table table-hover'>" +
1255                            "<tbody>" +
1256                                "<tr>" +
1257                                    "<th class='text-right' style='width:20%;'><b>目的国</b></th>" +
1258                                    "<th><code>
1258"+ ( t.destin_country ) +"</code></th>" +
1259                                "</tr>" +
1260                                ( destinItemsHtml )
1261                                + "<tr>" +
1262                                    "<th class='text-right'><b>发件国</b></th>" +
1263                                    "<td><code style='color: forestgreen;'>"+ ( t.origin_country ) +"</code></td>" +
1264                                "</tr>" +
1265                                ( originItemsHtml )
1266                             + "</tbody>" +
1267                        "</table>" +
1268                    "</div>" +
1269                "</div>"
1270        }
1271
1272        return boxHtml;
1273    };
1274    
1275    
1276    //--newHome 比价功能-条件选择部分
1277    ywwlspace.ajax.newHomePriceComparisonCondition = function() {
1278        //var parm = {"country":{"regionId":"N"},"city":{"name":"N"}};
1279		var parm = "";
1280      $.ajax({
1281          url: '../api/queryPriceComparisonCondition',
1282          data: parm,
1283          async: true,
1284          type: "get",
1285          dataType: "json",
1286          contentType: 'application/json;charset=UTF-8',
1287          success: function (data) {
1288                var origin = data.lineCity.lineCityList;
1289                var destination =data.country.regionList;
1290
1291                // filter 华南/华北/华东/香港/河北/北京/其他
1292                var address = {
1293                    areaCode: '1001',
1294                    areaName: '华北',
1295                    cityId:'',
1296                    cityName:'',
1297                    productTypes:[],
1298                    electricTypes:[],
1299                    electricTehuoTypes:[],
1300                    countryId:'',
1301                    destination:'',
1302                    weight:''
1303                };
1304                // filter 华南/华北/华东/香港/西南
1305                var southChina=[], northChina=[], eastChina=[], hk=[], southwest=[], centralChina=[];
1306                for(var i=0; i<origin.length; i++) {
1307                    if (origin[i].areaCode === '1003') {
1308                        southChina.push(origin[i]);
1309                    } else if (origin[i].areaCode === '1001') {
1310                        northChina.push(origin[i]);
1311                    } else if (origin[i].areaCode === '1002') {
1312                        eastChina.push(origin[i]);
1313                    //} else if (origin[i].areaCode === '1004') {
1314                    //    hk.push(origin[i]);
1315                    } else if (origin[i].areaCode === '1006') {
1316                        southwest.push(origin[i]);
1317                    } else if (origin[i].areaCode === '1005') {
1318                        centralChina.push(origin[i]);
1319                    }
1320                }
1321                // 拼接地址
1322                var areaHtml='', southChinaHtml='', northChinaHtml='';
1323                var eastChinaHtml='', hkHtml='', beijingHtml='', southwestHtml='', otherHtml='', centralChinaHtml='';
1324                areaHtml = "<li data-areacode='1001' class='current' style='padding:5px;margin:0;'>华北</li>" +
1325                    "<li data-areacode='1003' style='padding:5px;margin:0;'>华南</li>" +
1326                    "<li data-areacode='1002' style='padding:5px;margin:0;'>华东</li>" +
1327                    //"<li data-areacode='1004' style='padding:5px;margin:0;'>香港</li>" +
1328					"<li data-areacode='1005' style='padding:5px;margin:0;'>华中</li>" +
1329                    "<li data-areacode='1006' style='padding:5px;margin:0;'>西南</li>"
1330                for(var j=0; j<southChina.length; j++){
1331                    southChinaHtml += "<li data-name='" +southChina[j].id+ "'>" +southChina[j].name+ "</li>"
1332                }
1333                for(var k=0; k<northChina.length; k++){
1334                    northChinaHtml += "<li data-name='" +northChina[k].id+ "'>" +northChina[k].name+ "</li>"
1335                }
1336                for(var l=0; l<eastChina.length; l++){
1337                    eastChinaHtml += "<li data-name='" +eastChina[l].id+ "'>" +eastChina[l].name+ "</li>"
1338                }
1339                for(var m=0; m<hk.length; m++){
1340                    hkHtml += "<li data-name='" +hk[m].name+ "'>" +hk[m].id+ "</li>"
1341                }
1342                for(var o=0; o<southwest.length; o++){
1343                    southwestHtml += "<li data-name='" +southwest[o].id+ "'>" +southwest[o].name+ "</li>"
1344                }
1345                for(var c=0; c<centralChina.length; c++){
1346                    centralChinaHtml += "<li data-name='" +centralChina[c].id+ "'>" +centralChina[c].name+ "</li>"
1347                }
1348                // 选择出发地
1349                handleAddress('top-box', address);
1350                function handleAddress(ele, obj) {
1351                    // 文本框显示内容
1352                    function handleInputValue() {
1353                        var str = '';
1354                        if(parseInt(obj.areaCode) == 1001) {
1355                            str = '华北' + '-' + obj.cityName;
1356                        } else if (parseInt(obj.areaCode) == 1002) {
1357                            str = '华东' + '-' + obj.cityName;
1358                        } else if (parseInt(obj.areaCode) == 1003) {
1359                            str = '华南' + '-' + obj.cityName;
1360                        //} else if (parseInt(obj.areaCode) == 1004) {
1361                        //    str = '香港' + '-' + obj.cityName;
1362                        } else if (parseInt(obj.areaCode) == 1006) {
1363                            str = '西南' + '-' + obj.cityName;
1364                        } else if (parseInt(obj.areaCode) == 1005) {
1365                            str = '华中' + '-' + obj.cityName;
1366                        }
1367                        $("."+ ele + "-input").val(str);
1368                    }
1369                    // box显示与隐藏
1370                    var firstBtn = false;
1371                    $("." + ele).off().on('click', "." + ele + "-choose", function() {
1372                        $("." + ele + "-content").slideToggle('fast');
1373                        if (!firstBtn) {
1374                            // html 插入
1375                            $("."+ele+"-content .first-floor").html(areaHtml);
1376                            $("."+ele+"-content .third-floor").html(northChinaHtml);
1377                            firstBtn = true
1378                        }
1379
1380                    });
1381
1382                    // 根据一楼选择进行显示三楼nearing
1383                    $("." + ele + " .first-floor").off().on('click', 'li', function() {
1384                        $(this).addClass('current').siblings().removeClass('current');
1385                        obj.areaCode = $(this).data('areacode');
1386                        obj.areaName = $(this).text();
1387						obj.cityName = '';
1388                        obj.cityId = null;
1389                        $(".top-box-input-box").data("areaCode", address.areaCode);
1390                        $(".top-box-input-box").data("areaName", address.areaName);
1391                        $(".top-box-input-box").data("cityId", "");
1392                        $(".top-box-input-box").data("cityName", "");
1393                        // $(".top-box-input").val(address.areaName);
1394                        var $thirdFloor = $("."+ele+"-content .third-floor");
1395						
1396                        handleInputValue()
1397                        if(obj.areaCode == '1001') {
1398                            $thirdFloor.html(northChinaHtml);
1399                        } else if (obj.areaCode == '1002') {
1400                            $thirdFloor.html(eastChinaHtml);
1401                        } else if (obj.areaCode == '1003') {
1402                            $thirdFloor.html(southChinaHtml);
1403                        }
1404                        // else if (obj.areaCode == '1004') {
1405                        //     $thirdFloor.html(hkHtml);
1406                        // }
1407                        else if (obj.areaCode == '1006') {
1408                            $thirdFloor.html(southwestHtml);
1409                        } else if (obj.areaCode == '1005') {
1410                            $thirdFloor.html(centralChinaHtml);
1411                        }
1412
1413                    });
1414                    $("." + ele + " .third-floor").off().on('click', 'li', function() {
1415                        $(this).addClass('current').siblings().removeClass('current');
1416						obj.cityId = $(this).data('name') + '';
1417                        obj.cityName = $(this).text();
1418                        $(".top-box-input-box").data("cityId",address.cityId);
1419                        $(".top-box-input-box").data("cityName",address.cityName);
1420                        handleInputValue()
1421                        $("." + ele + "-content").slideToggle('fast');
1422                        // console.log(obj);
1423                    });
1424                }
1425
1426                // 选择目的地
1427                var regionRelList = new Array();
1428                for(i=0;i<destination.length;i++){
1429                    var region = destination[i];
1430                    var label = region.chinesename + '/' + region.chinesepinyin + '/' + region.englishname + '/' + region.english2bit;
1431                    regionRelList[i] = {label: label, value: region.id, enname: region.englishname, shotname: region.english2bit};
1432                    // console.log(regionRelList)
1433                }
1434                $("#destination").autocomplete({
1435                    source: regionRelList,
1436                    select: function( event, ui ) {
1437                        $("#destination").val(ui.item.label.split('/')[0]);
1438                        $("#destination-id").val(ui.item.value);
1439                        address.countryId = ui.item.value;
1440                        address.destination = ui.item.label;
1441                        event.preventDefault();
1442                    }
1443                });
1444                $("#destination").blur(function(){
1445                    // console.log(address)
1446                    var dest = $(this).val();
1447                    var iscountry = false;
1448                    for(var key in destination){
1449                        var country = destination[key];
1450                        if((country.chinesename)==dest){
1451                            $("#destination-id").val(country.id);
1452							address.countryId = country.id;
1453                            address.destination = country.chinesename;
1454                            iscountry = true;
1455                            break;
1456                        }
1457                    }
1458                    if(!iscountry){
1459                        $("#destination").val("");
1460                        $("#destination-id").val("");
1461                    }
1462                    if(!dest){
1463                        // console.log('不存在目的地')
1464                        address.countryId = ""
1465                    }
1466                });
1467
1468                // 填写重量
1469                $('.weight-box-input').change(function(){
1470                    address.weight = $(this).val()
1471                    // console.log(address)
1472                })
1473
1474                // 产品类型
1475                function multselInit(){
1476                    $_sel=$("div.multsel");
1477                    $_sel.each(function(){
1478                        $(this).append("<i></i>");
1479                    });
1480                    $_sel.find("span.view").click(function(){
1481                        $_t=$(this).parent("div.multsel");
1482                        if($_t.hasClass('expand')){
1483                            $("div.multsel .selist").hide();
1484                            $_t.find("i:first").removeClass("pop");
1485                            $_t.removeClass('expand');
1486                        }else {
1487                            $("div.multsel .selist").show();
1488                            $_t.find("i:first").addClass("pop");
1489                            $_t.addClass('expand');
1490                        }
1491                    });
1492                    $_sel.find(".selist").find("span.seitem").click(function(){
1493                        $_this=$(this);
1494
1495                        if($_this.hasClass('checked')){
1496                            $_this.removeClass('checked');
1497                        }else{
1498                            $_this.addClass('checked');
1499                        }
1500                        multselCheck($("div.multsel .selist"));
1501                    });
1502
1503                    $(document).click(function(e){
1504                        var t = $("div.multsel")[0],target = e.target;
1505                        if (t !== target && !$.contains(t, target)) {
1506                            $("div.multsel").removeClass('expand').find(".selist").hide();
1507                            $("div.multsel").find("i:first").removeClass("pop");
1508                        }
1509                    });
1510                }
1511                function multselCheck($obj){
1512                    var names='',vals=[];
1513                    $obj.find('span.checked').each(function(){
1514                        var $t=$(this);
1515                        names+=$t.html()+"  |  "
1516                        vals.push($t.attr("value"));
1517                    });
1518                    if(!names){
1519                        names='请选择...';
1520                    }
1521                    $('#choose-clear').show()
1522                    $obj.parent('div.multsel').find('span.view').html(names);
1523                    multselVals(vals);
1524                }
1525                function multselVals(vals){
1526                    var arrProductTypes = []
1527                    for(var i=0,size=vals.length;i<size;i++){
1528                        arrProductTypes.push(vals[i]);
1529                    }
1530                    if(arrProductTypes.length) {
1531                        address.productTypes = arrProductTypes;
1532                    } else {
1533                        address.productTypes = [];
1534                    }
1535                }
1536
1537                // 产品属性 - 一级选择 - 不作为筛选条件
1538                function multselInit2(){
1539                    $_sel=$("div.multsel2");
1540                    $_sel.each(function(){
1541                        $(this).append("<i></i>");
1542                    });
1543                    $_sel.find("span.view").click(function(){
1544                        $_t=$(this).parent("div.multsel2");
1545                        if($_t.hasClass('expand')){
1546                            $("div.multsel2 .selist").hide();
1547                            $_t.find("i:first").removeClass("pop");
1548                            $_t.removeClass('expand');
1549                        }else {
1550                            $("div.multsel2 .selist").show();
1551                            $_t.find("i:first").addClass("pop");
1552                            $_t.addClass('expand');
1553                        }
1554                    });
1555                    $_sel.find(".selist").find("span.seitem").click(function(){
1556                        $_this=$(this);
1557
1558                        $("div.multsel2 span.seitem").each(function(item, ele) {
1559                            if($(ele).hasClass('checked')) {
1560                                $(ele).removeClass('checked')
1561                            }
1562                        })
1563
1564                        $_this.addClass('checked');
1565                        if($_this.html() == "普货") {
1566                            $('.multsel3').html("<span class='view' style='font-size: 14px;'>默认全部</span><div class='selist'><span class='seitem' value='101'>普通货物</span> </div><a href='javascript:;' id='choose2-clear'>X</a>")
1567                        } else if($_this.html() == "特货") {
1568                            $('.multsel3').html(
1569                                "<span class='view' style='font-size: 14px;'>默认全部</span>" +
1570                                "<div class='selist'>" +
1571                                "<span class='seitem' value='1'>纯电池</span>" +
1572                                "<span class='seitem' value='2'>内置电池</span>" +
1573                                "<span class='seitem' value='3'>外置电池品</span>" +
1574                                "<span class='seitem' value='4'>微磁产品具</span>" +
1575                                "<span class='seitem' value='5'>固体化妆品</span>" +
1576                                "<span class='seitem' value='6'>非管制刀具</span>" +
1577                                "</div><a href='javascript:;' id='choose2-clear'>X</a>" +
1578                                "</div>")
1579                        } else {
1580                            $('.multsel3').html('');
1581                        }
1582                        $('div.multsel2').removeClass('expand');
1583                        $("div.multsel2 .selist").hide();
1584                        //multselInit3();
1585                        multselCheck2($("div.multsel2 .selist"));
1586
1587                        // 清空货品属性
1588                        $('#choose2-clear').off().on('click', function() {
1589                            $('.multsel2').removeClass('expand');
1590                            $(".multsel2 .selist").hide();
1591                            $('.multsel2 .view').html('');
1592                            $('.multsel2 .selist').find('span.seitem').each(function(i, ele) {
1593                                $(ele).removeClass('checked')
1594                            })
1595                            address.level1Catalog = '';
1596                            $("div.multsel.productTypeName-box>span.view").prop("level1Catalog", '');
1597                            $(this).hide()
1598                        })
1599                    });
1600
1601                    $(document).click(function(e){
1602                        var t = $("div.multsel2")[0],target = e.target;
1603                        if (t !== target && !$.contains(t, target)) {
1604                            $("div.multsel2").removeClass('expand').find(".selist").hide();
1605                            $("div.multsel2").find("i:first").removeClass("pop");
1606                        }
1607                    });
1608                }
1609                function multselCheck2($obj){
1610                     var level1Catalog = $obj.find('span.checked').first().attr("value");
1611                    var showText='请选择...';
1612                    if(level1Catalog){
1613                        if (level1Catalog == '1') {
1614                            showText='普货';
1615                        } else if (level1Catalog == '2') {
1616                            showText='特货';
1617                        }else if (level1Catalog == '3') {
1618                            showText='敏感货';
1619						}else if (level1Catalog == '4') {
1620							showText='特品';
1621                        }
1622                    }
1623                    address.level1Catalog = level1Catalog;
1624                    $('#choose2-clear').show();
1625                    $obj.parent('div.multsel2').find('span.view').html(showText);
1626                }
1627                
1628
1629                multselInit();
1630                multselInit2();
1631                // 清除产品类型选择
1632                $('#choose-clear').off().on('click', function() {
1633                    $('.multsel').removeClass('expand');
1634                    $(".multsel .selist").hide();
1635                    $('.multsel .view').html('');
1636                    $('.multsel .selist').find('span.seitem').each(function(i, ele) {
1637                        $(ele).removeClass('checked')
1638                    })
1639                    address.productTypes = [];
1640                    $(this).hide()
1641                })
1642
1643                // 查询 - 校验
1644                $('#price-choose').click(function() {
1645                    console.log(address);
1646                    if(!parseInt(address.areaCode) || !parseInt(address.cityId)) {
1647                        ywwlspace.message.xcConfirm("请选择出发地", "info");
1648                        ywwlspace.message.$html = $('.top-box-input');
1649                        return false;
1650                    }
1651                    if(!parseInt(address.countryId)) {
1652                        ywwlspace.message.xcConfirm("请输入后选择目的地!", "info");
1653                        ywwlspace.message.$html = $('#destination');
1654                        return false;
1655                    }
1656                    if(!parseInt(address.weight)) {
1657                        ywwlspace.message.xcConfirm("请填写重量!", "info");
1658                        ywwlspace.message.$html = $('.weight-box-input');
1659                        return false;
1660                    }
1661                    // 检验重量信息
1662                    if (!/^[0-9]*$/.test(address.weight)) {
1663                        ywwlspace.message.xcConfirm("重量只允许输入数字!", "info");
1664                        ywwlspace.message.$html = $('.weight-box-input');
1665                        return false;
1666                    }
1667                    // address 本地话存储
1668                    if (localStorage.getItem("ywAddress")) {
1669                        localStorage.removeItem("ywAddress");
1670                    }
1671                    localStorage.setItem("ywAddress", JSON.stringify(address));
1672					console.log(JSON.stringify(address));
1673					action_url =  "https://price.yw56.com.cn/chn/service/servicePriceComparison?type=1"
1674					//action_url =  "http://116.62.33.194:8011/ywwl/chn/service/servicePriceComparison?type=1"
1675					var form = $("<form method='post'></form>");  
1676					form.attr({"action":action_url});
1677					form.attr('target', '_blank');
1678					var input = $("<input type='hidden'>");  
1679					input.attr({"name":"reqParams"});  
1680					input.val(JSON.stringify(address));  
1681					form.append(input);  
1682					$("html").append(form);  
1683					form.submit();
1684                    //location.href =  "http://www.wise-mate.com/chn/service/servicePriceComparison?type=1"
1685                })
1686          },
1687          error: function () {
1688//              // ywwlspace.message.xcConfirm("查询失败,请重试3", "error");
1689              return false;
1690          },
1691          beforeSend: function () {
1692//              //$("#round").show();
1693          },
1694          complete: function () {
1695//              //$("#round").hide();
1696          }
1697      });
1698    };
1699    //【newHome 页面ajax end】
1700
1701    //【产品592, 1:9610退税服务,2:中港服务,3:企业荣誉,4:企业介绍,5:金融服务,6:保险服务 start】
1702    //--9610退税服务
1703    ywwlspace.ajax.taxRebateService = function() {
1704
1705        $.ajax({
1706            url: ywwlPath+"/article/articleList.action",
1707            data: JSON.stringify({language: language, parentid: 592, typecode:"productArticle"}),
1708            async: true,
1709            type: "post",
1710            dataType: "json",
1711            contentType: "application/json;charset-UTF-8",
1712            success: function (data) {
1713                var cmsUrl = data.cmsUrl;
1714                $('#tax').html(data.list[0].content);
1715
1716                $("#tax").find("img").each(function () {
1717                    var src = $(this).attr("src");
1718                    if (src.indexOf("http") < 0) {
1719                        $(this).attr("src", cmsUrl + src).attr("title", "9610");
1720                        $(this).addClass('img-responsive');
1721                        // $(this).css('display', 'inline-block')
1722                    }
1723                })
1724                // $("#tax").find('p').each(function() {
1725                //     $(this).css('text-align', 'center')
1726                // })
1727            },
1728            error: function () {
1729                ywwlspace.message.xcConfirm("查询失败,请重试4", "error");
1730                return false;
1731            },
1732            beforeSend: function () {
1733                //$("#round").show();
1734            },
1735            complete: function () {
1736                //$("#round").hide();
1737            }
1738        })
1739    };
1740    //--中港服务
1741    ywwlspace.ajax.zhongGangService = function() {
1742        $.ajax({
1743            url: ywwlPath+"/article/articleList.action",
1744            data: JSON.stringify({language: language, parentid: 592, typecode:"productArticle"}),
1745            async: true,
1746            type: "post",
1747            dataType: "json",
1748            contentType: "application/json;charset-UTF-8",
1749            success: function (data) {
1750                var cmsUrl = data.cmsUrl;
1751                $('#zhongGang').html(data.list[1].content);
1752
1753                $("#zhongGang").find("img").each(function () {
1754                    var src = $(this).attr("src");
1755                    if (src.indexOf("http") < 0) {
1756                        $(this).attr("src", cmsUrl + src).attr("title", "9610");
1757                        $(this).addClass('img-responsive');
1758                    }
1759                })
1760            },
1761            error: function () {
1762                ywwlspace.message.xcConfirm("查询失败,请重试5", "error");
1763                return false;
1764            },
1765            beforeSend: function () {
1766                //$("#round").show();
1767            },
1768            complete: function () {
1769                //$("#round").hide();
1770            }
1771        })
1772    };
1773    //--金融服务
1774    ywwlspace.ajax.featureFinancialService = function() {
1775        $.ajax({
1776            url: ywwlPath+"/article/articleList.action",
1777            data: JSON.stringify({language: language, parentid: 592, typecode:"productArticle"}),
1778            async: true,
1779            type: "post",
1780            dataType: "json",
1781            contentType: "application/json;charset-UTF-8",
1782            success: function (data) {
1783                var cmsUrl = data.cmsUrl;
1784
1785                if (data.list.length >= 5) {
1786                    $('#featureFinancial').html(data.list[4].content);
1787
1788                    $("#featureFinancial").find("img").each(function () {
1789                        var src = $(this).attr("src");
1790                        if (src.indexOf("http") < 0) {
1791                            $(this).attr("src", cmsUrl + src).attr("title", "financial");
1792                            $(this).addClass('img-responsive');
1793                        }
1794                    })
1795                }
1796
1797            },
1798            error: function () {
1799                ywwlspace.message.xcConfirm("查询失败,请重试6", "error");
1800                return false;
1801            },
1802            beforeSend: function () {
1803                //$("#round").show();
1804            },
1805            complete: function () {
1806                //$("#round").hide();
1807            }
1808        })
1809    };
1810    //--保险服务
1811    ywwlspace.ajax.featureInsuranceService = function() {
1812        $.ajax({
1813            url: ywwlPath+"/article/articleList.action",
1814            data: JSON.stringify({language: language, parentid: 592, typecode:"productArticle"}),
1815            async: true,
1816            type: "post",
1817            dataType: "json",
1818            contentType: "application/json;charset-UTF-8",
1819            success: function (data) {
1820                var cmsUrl = data.cmsUrl;
1821
1822                if (data.list.length >= 6) {
1823                    $('#featureInsurance').html(data.list[5].content);
1824
1825                    $("#featureInsurance").find("img").each(function () {
1826                        var src = $(this).attr("src");
1827                        if (src.indexOf("http") < 0) {
1828                            $(this).attr("src", cmsUrl + src).attr("title", "insurance");
1829                            $(this).addClass('img-responsive');
1830                        }
1831                    })
1832                }
1833
1834            },
1835            error: function () {
1836                ywwlspace.message.xcConfirm("查询失败,请重试7", "error");
1837                return false;
1838            },
1839            beforeSend: function () {
1840                //$("#round").show();
1841            },
1842            complete: function () {
1843                //$("#round").hide();
1844            }
1845        })
1846    };
1847    //--企业介绍 + 企业荣誉
1848    ywwlspace.ajax.companyHonorService = function() {
1849        $.ajax({
1850            url: ywwlPath+"/article/articleList.action",
1851            data: JSON.stringify({language: language, parentid: 592, typecode:"productArticle"}),
1852            async: true,
1853            type: "post",
1854            dataType: "json",
1855            contentType: "application/json;charset-UTF-8",
1856            success: function (data) {
1857                var cmsUrl = data.cmsUrl;
1858
1859                if (data.list.length >= 3) {
1860                    $('#companyHonor').html(data.list[2].content);
1861
1862                    $("#companyHonor").find("img").each(function () {
1863                        var src = $(this).attr("src");
1864                        if (src.indexOf("http") < 0) {
1865                            $(this).attr("src", cmsUrl + src).attr("title", "honor");
1866                            $(this).addClass('img-responsive');
1867                        }
1868                    })
1869                }
1870                if (data.list.length >= 4) {
1871                    $('#companyIntroduce').html(data.list[3].content)
1872                    $("#companyIntroduce").find("img").each(function () {
1873                        var src = $(this).attr("src");
1874                        if (src.indexOf("http") < 0) {
1875                            $(this).attr("src", cmsUrl + src).attr("title", "honor");
1876                            $(this).addClass('img-responsive');
1877                        }
1878                    })
1879                }
1880
1881            },
1882            error: function () {
1883                ywwlspace.message.xcConfirm("查询失败,请重试8", "error");
1884                return false;
1885            },
1886            beforeSend: function () {
1887                //$("#round").show();
1888            },
1889            complete: function () {
1890                //$("#round").hide();
1891            }
1892        })
1893    };
1894    //【产品592, 第一篇文章:9610退税服务,第二篇文章:中港服务,第三篇文章:企业荣誉 end】
1895
1896// message 全局提示
1897    /*
1898     * 使用说明:
1899     * ywwlspace.message.xcConfirm(popHtml, [type], [options])
1900     * popHtml:html字符串
1901     * type:ywwlspace.message.xcConfirm.typeEnum集合中的元素
1902     * options:扩展对象
1903     * 用法:
1904     * 1. ywwlspace.message.xcConfirm("我是弹窗<span>lalala</span>");
1905     * 2. ywwlspace.message.xcConfirm("成功","success");
1906     * 3. ywwlspace.message.xcConfirm("请输入","input",{onOk:function(){}})
1907     * 4. ywwlspace.message.xcConfirm("自定义",{title:"自定义"})
1908     */
1909    ywwlspace.message = ywwlspace.message || {};
1910    ywwlspace.message.xcConfirm = function(popHtml, type, options) {
1911        var btnType = ywwlspace.message.xcConfirm.btnEnum;
1912        var eventType = ywwlspace.message.xcConfirm.eventEnum;
1913        var popType = {
1914            info: {
1915                title: "信息",
1916                icon: "0 0",//蓝色i
1917                btn: btnType.ok
1918            },
1919            success: {
1920                title: "成功",
1921                icon: "0 -48px",//绿色对勾
1922                btn: btnType.ok
1923            },
1924            error: {
1925                title: "错误",
1926                icon: "-48px -48px",//红色叉
1927                btn: btnType.ok
1928            },
1929            confirm: {
1930                title: "提示",
1931                icon: "-48px 0",//黄色问号
1932                btn: btnType.okcancel
1933            },
1934            warning: {
1935                title: "警告",
1936                icon: "0 -96px",//黄色叹号
1937                btn: btnType.okcancel
1938            },
1939            input: {
1940                title: "输入",
1941                icon: "",
1942                btn: btnType.ok
1943            },
1944            custom: {
1945                title: "",
1946                icon: "",
1947                btn: btnType.ok
1948            }
1949        };
1950        var itype = type ? type instanceof Object ? type : popType[type] || {} : {};//格式化输入的参数:弹窗类型
1951        var config = $.extend(true, {
1952            //属性
1953            title: "", //自定义的标题
1954            icon: "", //图标
1955            btn: btnType.ok, //按钮,默认单按钮
1956            //事件
1957            onOk: $.noop,//点击确定的按钮回调
1958            onCancel: $.noop,//点击取消的按钮回调
1959            onClose: $.noop//弹窗关闭的回调,返回触发事件
1960        }, itype, options);
1961
1962        var $txt = $("<p>").html(popHtml);//弹窗文本dom
1963        var $tt = $("<span>").addClass("tt").text(config.title);//标题
1964        var icon = config.icon;
1965        var $icon = icon ? $("<div>").addClass("bigIcon").css("backgroundPosition",icon) : "";
1966        var btn = config.btn;//按钮组生成参数
1967
1968        var popId = creatPopId();//弹窗索引
1969
1970        var $box = $("<div>").addClass("xcConfirm");//弹窗插件容器
1971        var $layer = $("<div>").addClass("xc_layer");//遮罩层
1972        var $popBox = $("<div>").addClass("popBox");//弹窗盒子
1973        var $ttBox = $("<div>").addClass("ttBox");//弹窗顶部区域
1974        var $txtBox = $("<div>").addClass("txtBox");//弹窗内容主体区
1975        var $btnArea = $("<div>").addClass("btnArea");//按钮区域
1976
1977        var $ok = $("<a>").addClass("sgBtn").addClass("ok").text("确定");//确定按钮
1978        var $cancel = $("<a>").addClass("sgBtn").addClass("cancel").text("取消");//取消按钮
1979        var $input = $("<input>").addClass("inputBox");//输入框
1980        var $clsBtn = $("<a>").addClass("clsBtn");//关闭按钮
1981
1982        //建立按钮映射关系
1983        var btns = {
1984            ok: $ok,
1985            cancel: $cancel
1986        };
1987
1988        init();
1989
1990        function init(){
1991            //处理特殊类型input
1992            if(popType["input"] === itype){
1993                $txt.append($input);
1994            }
1995
1996            creatDom();
1997            bind();
1998        }
1999
2000        function creatDom(){
2001            $popBox.append(
2002                $ttBox.append(
2003                    $clsBtn
2004                ).append(
2005                    $tt
2006                )
2007            ).append(
2008                $txtBox.append($icon).append($txt)
2009            ).append(
2010                $btnArea.append(creatBtnGroup(btn))
2011            );
2012            $box.attr("id", popId).append($layer).append($popBox);
2013            $("body").append($box);
2014        }
2015
2016        function bind(){
2017            //点击确认按钮
2018            $ok.click(doOk);
2019
2020            //回车键触发确认按钮事件
2021            $(window).bind("keydown", function(e){
2022                if(e.keyCode == 13) {
2023                    if($("#" + popId).length == 1){
2024                        doOk();
2025                    }
2026                }
2027            });
2028
2029            //点击取消按钮
2030            $cancel.click(doCancel);
2031
2032            //点击关闭按钮
2033            $clsBtn.click(doClose);
2034        }
2035
2036        //确认按钮事件
2037        function doOk(){
2038            var $o = $(this);
2039            var v = $.trim($input.val());
2040            if ($input.is(":visible"))
2041                config.onOk(v);
2042            else
2043                config.onOk();
2044            $("#" + popId).remove();
2045            config.onClose(eventType.ok);
2046            if (ywwlspace.message.$html) {
2047                ywwlspace.message.$html.focus();
2048                ywwlspace.message.$html = ''
2049            }
2050        }
2051
2052        //取消按钮事件
2053        function doCancel(){
2054            var $o = $(this);
2055            config.onCancel();
2056            $("#" + popId).remove();
2057            config.onClose(eventType.cancel);
2058        }
2059
2060        //关闭按钮事件
2061        function doClose(){
2062            $("#" + popId).remove();
2063            config.onClose(eventType.close);
2064            $(window).unbind("keydown");
2065            if (ywwlspace.message.$html) {
2066                ywwlspace.message.$html.focus();
2067                ywwlspace.message.$html = ''
2068            }
2069        }
2070
2071        //生成按钮组
2072        function creatBtnGroup(tp){
2073            var $bgp = $("<div>").addClass("btnGroup");
2074            $.each(btns, function(i, n){
2075                if( btnType[i] == (tp & btnType[i]) ){
2076                    $bgp.append(n);
2077                }
2078            });
2079            return $bgp;
2080        }
2081
2082        //重生popId,防止id重复
2083        function creatPopId(){
2084            var i = "pop_" + (new Date()).getTime()+parseInt(Math.random()*100000);//弹窗索引
2085            if($("#" + i).length > 0){
2086                return creatPopId();
2087            }else{
2088                return i;
2089            }
2090        }
2091    }
2092    ywwlspace.message.xcConfirm.btnEnum = {
2093        ok: parseInt("0001",2), //确定按钮
2094        cancel: parseInt("0010",2), //取消按钮
2095        okcancel: parseInt("0011",2) //确定&&取消
2096    };
2097    ywwlspace.message.xcConfirm.eventEnum = {
2098        ok: 1,
2099        cancel: 2,
2100        close: 3
2101    };
2102    ywwlspace.message.xcConfirm.typeEnum = {
2103        info: "info",
2104        success: "success",
2105        error:"error",
2106        confirm: "confirm",
2107        warning: "warning",
2108        // input: "input",
2109        custom: "custom"
2110    };

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.