js Tìm kiếm chuyên viên FPTS - PhucVM2019/frontEnd GitHub Wiki

phần js

//2019-07-22 15:35:38 PhucVM
function $$(id) { return document.getElementById(id); }

(function () {
    selfSearch = this;

    const ID_PROFILE = '#ProfileUser';
    const CLASS_PROFILE = '.showDesUse';
    const ID_DICHVU = '#showDichVu';
    const CLASS_DICHVU = '.row-topmenu--content';
    const CLASS_CONTENT = '.fpts-body';
    const ID_MENUHOME = 'MenuResposive';
    const CLASS_MENUHOME = 'fptsNavBoxshadow';
    const ID_MENUTIME = 'time';
    const CLASS_MENUTAB = 'choose-menu--tvdt';
    const ID_CONTENTTAISAN = 'contenttaisan';
    const ID_TAISAN = 'taisan';
    const ID_CONTENTGIATRI = 'contentgiatri';
    const ID_GIATRI = 'giatri';
    const ID_CONTENTTIME = 'contentTime';
    var flag_Pass = true;
    var counter = 2;
    var counters = 2;

    function getStorage(storage) {
        return localStorage.getItem(storage);
    }

    function setStorage(storage, valueStorage) {
        return localStorage.setItem(storage, valueStorage);
    }

    this.setHeightScale = function () {
        var heightCenter = $("#center-info").height();
        $("#left-info").height(heightCenter);
        $("#right-info").height(heightCenter);
    }

    //js menu header
    //2019-08-01 14:05:38 PhucVM
    this.clickShowProfile = function () {
        $(ID_PROFILE).click(function () {
            $(CLASS_PROFILE).slideToggle();
            $(CLASS_DICHVU).hide();
        });

    }
    this.clickShowMenuService = function () {
        $(ID_DICHVU).click(function () {
            $(CLASS_DICHVU).slideToggle();
            $(CLASS_PROFILE).hide();
        });

    }
    this.clickBody = function () {
        $(CLASS_CONTENT).click(function () {
            $(CLASS_PROFILE).hide();
            $(CLASS_DICHVU).hide();
        })
    }

    ///menu header Desktop
    function fixTopMenu() {

        if ($(window).width() >= 1024) {
            // console.log($(window).scrollTop());
            if ($(window).scrollTop() > 100) {
                $$(ID_MENUHOME).style.position = "fixed";
                $$(ID_MENUHOME).style.zIndex = "5";
                $$(ID_MENUHOME).style.top = "0";
                $$(ID_MENUHOME).classList.add(CLASS_MENUHOME);
            }
            if ($(window).scrollTop() < 30) {
                $$(ID_MENUHOME).style.position = "relative";
                $$(ID_MENUHOME).style.zIndex = "unset";
                $$(ID_MENUHOME).style.top = "unset";
                $$(ID_MENUHOME).classList.remove(CLASS_MENUHOME);
            }

        }
    }
    function Scroll() {
        $(window).scroll(function () {
            fixTopMenu();
        })
    }

    //click show modal && call data -> input modal
    function ShowModal() {

        $(".btn-click--modal").click(function () {
            var FloorPhone;
            $("#modalbk").fadeIn(function () {
                $('body').css("overflow", "hidden");
                $('.modal-show--content').show()
            });

            var usercode = $(this).attr("data-usercode");
            var apackfeecode = $(this).attr("data-apackfeeid");
            var brokercode = $(this).attr("data-brokercode");
            var atblid = $(this).attr("data-atblid");
            var statusFees = $(this).attr("data-statusFee");
            var amethods = $(this).attr("data-method");

            if (statusFees == 1) {
                FloorPhone = "PHONE";
            } else {
                FloorPhone = "FLOOR";
            }

            $("#aclientcode").val(usercode);
            $("#apackfeecode").val(apackfeecode);
            $("#brokerid").val(brokercode);
            $("#aclientid").val(usercode);
            $("#atblid").val(atblid);
            $("#statusFee").val(statusFees);
            $("#FloorPhone").val(FloorPhone);
            //  $('#methods').val(amethods);

            console.table(["ID -" + atblid, usercode, apackfeecode, brokercode, statusFees, FloorPhone, amethods])
            $$("noteCane").innerHTML = "";
            if (amethods == "MONTH" || amethods == "DAILY" || amethods == "WEEK") {
                if (statusFees == 1) {
                    $$("noteCane").innerHTML = "Lưu ý: Quý Khách sẽ không được hoàn trả lại phí dịch vụ TVDT đã đăng ký và gói phí sẽ hết hiệu lực vào cuối ngày hôm nay.";
                } else {
                    $$("noteCane").innerHTML = "Lưu ý: Quý Khách sẽ không được hoàn phí tư vấn đầu tư đã đăng ký.";
                }
            } else {
                if (statusFees == 1) {
                    $$("noteCane").innerHTML = "Lưu ý: Gói phí sẽ hết hiệu lực vào cuối ngày hôm nay.";
                } else {
                    $$("noteCane").innerHTML = "";
                }
            }

            selfSearch.clearData();
        });


    }
    
    function hideModal() {
        $('#modalbk').click(function () {
            $('#modalbk').hide(function () {
                $('body').css("overflow", "unset");
            });
            $('.modal-show--content').hide();

            if ($("#status_mes").val() == "1") {
                location.reload();
            }
        });

    }
    function closemodel() {

        $('#CloseModal').click(function () {
            $('.modal-show--content').hide();
            $('#modalbk').hide();
            $('body').css("overflow", "unset");

            if ($("#status_mes").val() == "1") {
                location.reload();
            }
        });
    }

    function triminput() {
        $('#InputName').change(function () {
            this.value = $.trim(this.value);
        });
    }
    //2019-09-11 14:12:46 PhucVM
    //submit search data (tìm kiếm)
    //https://www.sanwebe.com/2016/07/ajax-form-submit-examples-using-jquery

    function ClickSearch() {
        var count = 0;
        $('#btnSearch').click(function () {
            // reset
            var listbrkRand = '';
            setStorage('ListbrkRand', '');

            //console.log(count);
            //count = count + 1;
            $$('pageIndexAdd').value = '';
            var post_url = "/SearchAdvisorys/dataSearch";
            var request_method = "post";

            var namebrokers = $$('InputName').value;
            var namebroker = namebrokers.toUpperCase();
            var typeinvesting = $$('SlCareSearch').value;
            var ayearofcert = $$('SlRankSearch').value;
            var acost = $$('SlAddressSearch').value;
            var pageIndex = $$('pageIndexSearch').value;

            var pAYEAROFCERTmin = -1;
            var pAYEAROFCERTmax = -1;
            //nam kinh nghiem
            debugger;
            if (ayearofcert == "0") {
                pAYEAROFCERTmin = 1;
                pAYEAROFCERTmax = 2;
            }
            else if (ayearofcert == "1") {
                pAYEAROFCERTmin = 3;
                pAYEAROFCERTmax = 5;
            }
            else if (ayearofcert == "2") {
                pAYEAROFCERTmin = 6;
                pAYEAROFCERTmax = 10;
            }
            else if (ayearofcert == "3") {
                pAYEAROFCERTmin = 10;
                pAYEAROFCERTmax = 100;
            }
            else if (ayearofcert == "") {
                //truong hop all
                pAYEAROFCERTmin = -1;
                pAYEAROFCERTmax = -1;
            }


            //gán value cho btn form xem thêm
            $$('abrokernamemore').value = namebroker;
            $$('investingtypemore').value = typeinvesting;

            $$('ayearofcertmoremin').value = pAYEAROFCERTmin;
            $$('ayearofcertmoremax').value = pAYEAROFCERTmax;

            $$('acostmore').value = acost;

            //  console.log($$('ayearofmin').value + "gia tri");
            // flag = false;
            //debugger;
            var form_data = { "abrokername": namebroker, "investingtypecde": typeinvesting, "ayearofcertmin": pAYEAROFCERTmin, "ayearofcertmax": pAYEAROFCERTmax, "acost": acost, "pageindex": pageIndex };
            console.log(form_data);
            var item;
            $.ajax({
                url: post_url,
                type: request_method,
                data: form_data

            }).done(function (data) {

                var htmlErr = "";

                if (data != "") {
                    var link_img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAA/CAYAAABQHc7KAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89 + bN / rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz / SMBAPh + PDwrIsAHvgABeNMLCADATZvAMByH / w / qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf + bTAICd + Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA / g88wAAKCRFRHgg / P9eM4Ors7ONo62Dl8t6r8G / yJiYuP + 5c + rcEAAAOF0ftH + LC + zGoA7BoBt / qIl7gRoXgugdfeLZrIPQLUAoOnaV / Nw + H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl / AV / 1s + X48 / Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H / LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k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kQcAwE+KTZLrurr09c9LKWfmtqiUcqeU8nzRC1zXLSbDRYMJUxFgLhM9CnM5ody7R1HUxoxJ2aaCzSmAR9e6IDXJA2Du0jwFQNv22La/lGXZwVkjwNhUvEcAkxyfKt8LmooAQ8JpxtgpQohVcLcrmFGRUl4uhIHFGDvFOT896TcbTliCIPgphvduR0zrWSUgy8bOTF8wtqMWAZ7naQDHATxnFmnPMAEj254DcNzYPlGmGigYRSeSJLmmlDo5qwQopW4H8IzneT+b9jebGjJ6nvdzKeXj2KJJck1ZklI+vhnwmybAJMY/A7gXwBszBP4NAPca27ClBBgSPgDwEIBvA/hwG4F/aGx4qMqDKaC5d4M/wvDd4G23CPgq/vducKXWcKHhl6NPYPh6dCtfjr4I4KWZeTm6BhEUwAMYvh1+GMD+mir/CeBPGL4dfntm3w5PIKT4enzeeMcefPxixpKJ6csA3sMtej3+3wEADqDTqOGFiSUAAAAASUVORK5CYII";
                    var html = `<div class="row-list--tuvan">`
                    for (item of data) {
                        // listbrkRand
                        listbrkRand = listbrkRand + item.ABROKERCDE + ',';

                        var Url = '/SearchAdvisorys/InfoAdvisory/' + item.ABROKERCDE;
                        html = html + `<div class="col-item--tuvan">
                                       <div class="box-item-tuvan">
                                            <div class="frames-img--tuvan img-broker--search">`
                        if (item.ImageRedisLib == "") {
                            html = html + ` <img src="${link_img}" alt="">`
                        } else {
                            html = html + ` <img src="data:image/png;base64,${item.ImageRedisLib}" alt="">`
                        }
                        html = html + `</div>
				                            <div class="frame-name--tuavan">
					                            <p  class="c-color--text c-name">${item.ABROKERNAME}</p>
				                            </div>
			                            </div>
                                         <div class="frame-content--tuvan">`
                        if (item.atitle_CD == "-1") {
                            html = html + `<p class="c-color--text" > Đang cập nhật thông tin</p> `
                        } else {
                            html = html + `<p class="c-color--text" > ${item.atitle_CD}</p>`
                        }
                        if (item.aaddress == "HN") {
                            html = html + `<p>Chi nhánh: <span class="c-color--text">Hà Nội</span></p>`
                        } else if (item.aaddress == "HCM") {
                            html = html + `<p>Chi nhánh: <span class="c-color--text">Hồ Chí Minh</span></p>`
                        } else if (item.aaddress == "DN") {
                            html = html + `<p> Chi nhánh: <span class="c-color--text">Đà Nẵng</span></p >`
                        } else {
                            html = html + `<p> Chi nhánh: <span class="c-color--text">Đang cập nhật</span></p >`
                        }
                        //
                        if (item.AYEAROFCERT == "" || item.AYEAROFCERT == "0") {
                            html = html + `<p>Năm kinh nghiệm: <span class="c-color--text">1</span></p>`
                        } else {
                            html = html + `<p>Năm kinh nghiệm: <span class="c-color--text">${item.AYEAROFCERT}</span></p>`
                        }
                        //
                        if (item.ARATEPOINT == '-1') {
                            html = html + `<p class="txt-danhgia">Điểm đánh giá CVTV: <span  class="diems c-color--text text-diem">Chưa có điểm</span></p>`
                        } else {
                            html = html + `<p class="txt-danhgia">Điểm đánh giá CVTV: <span  class="diems c-color--text">${item.ARATEPOINT}</span></p>`
                        }
                        html = html + `</div>
                                    <div class="box-btn--show">
			                            <div class="box-zindex--opaciti"></div>
			                            <a target="_blank" href="${Url}" class="btn btn-show--content">xem chi tiết</a>
                                    </div>
		                        </div> `
                    }

                    // set ListbrkRand
                    setStorage('ListbrkRand', listbrkRand);

                    htmlErr = `<p>Danh sách Tư vấn viên <span class="count-search">(${data[0].p_count})</span></p>`
                    html = html + `</div>`
                    $('#searchData').html(html);
                    $('#titleNote').html(htmlErr);
                    counter = 2;
                } else {
                    htmlErr = `<p>Danh sách Tư vấn viên <span class="count-search">(0)</span></p>`
                    var html = `<div class="row-list--tuvan">`
                    html = html + `</div>`
                    $('#searchData').html(html);

                    $('#titleNote').html(htmlErr);
                }

                console.log(data[0].p_count);

                //console.log(data.length)
                // ẩn nút xem thêm khi data < 10
                if (10 <= data.length) {
                    if (pageIndex * 10 == data[0].p_count) {
                        $('#btnClickShowRow').css("display", "none");
                    } else {
                        $('#btnClickShowRow').css("display", "block");
                    }
                } else {
                    $('#btnClickShowRow').css("display", "none");
                }
            });
        });
    }

    // xem thêm nội dung khi click vào btn "xem thêm" Page TIM KIEM CHUYEN VIEN
    //2019-09-25 16:23:51 PhucVM
    function clickShowContent() {
        $('#btnClickShowRow').click(function () {
            // get Storage ListbrkRand
            var listbrkRand = getStorage('ListbrkRand');
            
            $(this).css("display", "none");
            $(".loadingData").show();

            if (counter <= 150) {
                $$('pageIndexAdd').value = counter;
            } else {
                alert("click nhiều thế");
            }
            counter = counter + 1;
            
            if ($$('ayearofcertmoremin').value == "" && $$('ayearofcertmoremax').value == "") {
                year1 = -1;
                year2 = -1;
            } else {
                var year1 = $$('ayearofcertmoremin').value;
                var year2 = $$('ayearofcertmoremax').value;
            }
            var name = $$('abrokernamemore').value;
            var type = $$('investingtypemore').value;

            var cos = $$('acostmore').value;
            var count = $$('pageIndexAdd').value;

            var link_img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAA/CAYAAABQHc7KAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89 + bN / rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz / SMBAPh + PDwrIsAHvgABeNMLCADATZvAMByH / w / qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf + bTAICd + Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA / g88wAAKCRFRHgg / P9eM4Ors7ONo62Dl8t6r8G / yJiYuP + 5c + rcEAAAOF0ftH + LC + zGoA7BoBt / qIl7gRoXgugdfeLZrIPQ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vlfMLx0uFanphhjRRfXq6ursdaabRcBWmu2urqaFHcBxhihlK5HwpsGI9bzAAD4IQC51tcvFjpSynNZlh3ANkuWZQeklOeKNcI6XiANNkwkgHN+DsNrccXYV6Wsn/d6vW0HPxJjS17cFQghZRKeN9iwkQcAwE+KTZLrurr09c9LKWfmtqiUcqeU8nzRC1zXLSbDRYMJUxFgLhM9CnM5ody7R1HUxoxJ2aaCzSmAR9e6IDXJA2Du0jwFQNv22La/lGXZwVkjwNhUvEcAkxyfKt8LmooAQ8JpxtgpQohVcLcrmFGRUl4uhIHFGDvFOT896TcbTliCIPgphvduR0zrWSUgy8bOTF8wtqMWAZ7naQDHATxnFmnPMAEj254DcNzYPlGmGigYRSeSJLmmlDo5qwQopW4H8IzneT+b9jebGjJ6nvdzKeXj2KJJck1ZklI+vhnwmybAJMY/A7gXwBszBP4NAPca27ClBBgSPgDwEIBvA/hwG4F/aGx4qMqDKaC5d4M/wvDd4G23CPgq/vducKXWcKHhl6NPYPh6dCtfjr4I4KWZeTm6BhEUwAMYvh1+GMD+mir/CeBPGL4dfntm3w5PIKT4enzeeMcefPxixpKJ6csA3sMtej3+3wEADqDTqOGFiSUAAAAASUVORK5CYII";

            var post_url = "/SearchAdvisorys/dataSearch";
            var request_method = "post";
            var form_data = { "listbrkRand": listbrkRand,"abrokername": name, "investingtypecde": type, "ayearofcertmin": year1, "ayearofcertmax": year2, "acost": cos, "pageindex": count };
            //debugger;
            var item;
            $.ajax({
                url: post_url,
                type: request_method,
                data: form_data
            }).done(function (data) {
                console.log(data);
                if (data != "") {
                    var html = `<div class="row-list--tuvan">`
                    for (item of data) {
                        // listbrkRand
                        listbrkRand = listbrkRand + item.ABROKERCDE + ',';

                        var Url = '/SearchAdvisorys/InfoAdvisory/' + item.ABROKERCDE;
                        html = html + `<div class="col-item--tuvan">
                                       <div class="box-item-tuvan">
                                            <div class="frames-img--tuvan img-broker--search">`
                        if (item.ImageRedisLib == "") {
                            html = html + ` <img src="${link_img}" alt="">`
                        } else {
                            html = html + ` <img src="data:image/png;base64,${item.ImageRedisLib}" alt="">`
                        }
                        html = html + `</div>
				                            <div class="frame-name--tuavan">
					                            <p class="c-color--text c-name">${item.ABROKERNAME}</p>
                                             
				                            </div>
			                            </div>
                                        <div class="frame-content--tuvan">`
                        if (item.atitle_CD == "-1") {
                            html = html + `<p class="c-color--text">Đang cập nhật thông tin</p>`
                        } else {
                            html = html + `<p class="c-color--text">${item.atitle_CD}</p>`
                        }
                        // 
                        if (item.aaddress == "HN") {
                            html = html + `<p> Chi nhánh: <span class="c-color--text">Hà Nội</span></p > `
                        } else if (item.aaddress == "HCM") {
                            html = html + `<p> Chi nhánh: <span class="c-color--text">Hồ Chí Minh</span></p > `
                        } else if (item.aaddress == "DN") {
                            html = html + `<p> Chi nhánh: <span class="c-color--text">Đà Nẵng</span></p >`
                        } else {
                            html = html + `<p> Chi nhánh: <span class="c-color--text">Đang cập nhật</span></p >`
                        }
                        //
                        if (item.AYEAROFCERT == "" || item.AYEAROFCERT == "0") {
                            html = html + `<p>Năm kinh nghiệm: <span  class="c-color--text">1</span></p>`
                        } else {
                            html = html + `<p>Năm kinh nghiệm: <span  class="c-color--text">${item.AYEAROFCERT}</span></p>`
                        }

                        if (item.ARATEPOINT == '-1') {
                            html = html + `<p class="txt-danhgia" > Điểm đánh giá CVTV: <span class="diems c-color--text text-diem">Chưa có điểm</span></p> `
                        } else {
                            html = html + `<p class="txt-danhgia"> Điểm đánh giá CVTV: <span class="diems c-color--text">${item.ARATEPOINT}</span></p> `
                        }
                        html = html + `</div >
                                    <div class="box-btn--show">
			                            <div class="box-zindex--opaciti"></div>
			                            <a target="_blank" href="${Url}" target="_blank" class="btn btn-show--content">xem chi tiết</a>
                                    </div>
		                        </div> `
                    }

                    // set ListbrkRand
                    setStorage('ListbrkRand', listbrkRand);

                    html = html + `</div>`
                    $('#searchData').append(html);
                    $(".loadingData").hide();
                } else {
                    alert("Không có bản ghi nào được tìm thấy");
                }

                if (10 <= data.length) {
                    if (pageIndex * 10 == data[0].p_count) {
                        $('#btnClickShowRow').css("display", "none");
                    } else {
                        $('#btnClickShowRow').css("display", "block");
                    }
                } else {
                    $('#btnClickShowRow').css("display", "none");
                }
            });

        });
    }
    ///change khu vực thanh tìm kiếm theo session khi xảy ra load trang
    function changeAdress() {

        if (adress == "HN") {
            $('#SlAddressSearch').on('change', function () {
                $('#SlAddressSearch').val($(this).val());
            });
            $('#SlAddressSearch').val("HN");

        } else if (adress == "HCM") {
            $('#SlAddressSearch').on('change', function () {
                $('#SlAddressSearch').val($(this).val());
            });
            $('#SlAddressSearch').val("HCM");

        } else if (adress == "DN") {
            $('#SlAddressSearch').on('change', function () {
                $('#SlAddressSearch').val($(this).val());
            });
            $('#SlAddressSearch').val("DN");

        }
    }

    //cut text
    function cutString(s, n) {
        var cut = s.indexOf(' ', n);
        if (cut == -1){return s};
        return s.substring(0, cut)
    }

    //hạn chế số ký tự nhập vào.
    function Cut_comment() {
        $("#comment[maxlength]").bind('input propertychange', function () {
            //console.log( $( this ).val().length + "số ký tự" );
            var maxLength = $(this).attr('maxlength');
            if ($(this).val().length > 490) {
                alert('Quý khách đã nhập quá 500 ký tự');
            }
            if ($(this).val().length > maxLength) {
                $(this).val($(this).val().substring(0, maxLength));

            }
        });
    }
    //cut text
    //có tính cả khoảng trắng
    function Cut_text() {
        var $commentRate = $(".commentRate");
        $commentRate.each(function (i, item) {
            var str = $(this).text();
            if (str.length > 50) {
                var strCut = cutString(str, 50);
                $(this).text(strCut + "...");
            } else {
                $(this).text(strCut);
            }

        });

        // console.log(strCut.length);
    }

    //sort table
    function sortTable() {
        const getCellValue = (tr, idx) => tr.children[idx].innerText || tr.children[idx].textContent;

        const comparer = (idx, asc) => (a, b) => ((v1, v2) =>
            v1 !== '' && v2 !== '' && !isNaN(v1) && !isNaN(v2) ? v1 - v2 : v1.toString().localeCompare(v2)
        )(getCellValue(asc ? a : b, idx), getCellValue(asc ? b : a, idx));

        // do the work...
        document.querySelectorAll('tr:first-child td').forEach(td => td.addEventListener('click', (() => {
            const table = td.closest('table');
            Array.from(table.querySelectorAll('tr:nth-child(n+2)'))
                .sort(comparer(Array.from(td.parentNode.children).indexOf(td), this.asc = !this.asc))
                .forEach(tr => table.appendChild(tr));
        })));
    }

    //2019-09-11 14:12:46 PhucVM
    //submit data khi hủy
    function ajaxSubmit() {
        $('#CancelRegistration').click(function () {
            var post_url = "/SearchAdvisorys/CancelAndInsert";
            var request_method = "post";

            var aclientcode = $$('aclientcode').value;
            var apackfeecode = $$('apackfeecode').value;
            var brokerid = $$('brokerid').value;
            var personaccount = $$('aclientid').value;
            var atblid = $$('atblid').value;
            var comment = $$('comment').value;
            var pass2 = $("#TradingPasswordtvdt").val();
            var statusFee = $('#statusFee').val();
            var FloorPhone = $("#FloorPhone").val();

            var form_data = { "acustaccount": aclientcode, "apackfeeid": apackfeecode, "abrokercde": brokerid, "personaccount": personaccount, "p_atblid": atblid, "opinion": comment, "TradingPasswordtvdt": pass2, "StatusFee": statusFee, "FloorPhone": FloorPhone };


            if ($("#TradingPasswordtvdt").val() != null && $("#TradingPasswordtvdt").val() != "") {
                $.ajax({
                    url: post_url,
                    type: request_method,
                    data: form_data
                }).done(function (response) {
                    var msg = response.split('/')[0];
                    if (msg != "999") {
                        $("#status_mes").val(response.split('/')[1]).css("color", "#034e94");
                        $("#message_status").html(msg);
                        $('body').css("overflow", "unset");
                        $("#CancelRegistration").hide();
                        $("#CloseModal").addClass("Cant-tvdt--add");
                        setTimeout(function () {
                            location.reload();
                        }, 7000);
                    }
                    else {
                        $("#message_status").html("Sai mật khẩu giao dịch.");
                        $('#TradingPasswordtvdt').focus();
                    }
                });
            } else {
                $("#message_status").html("Bạn Chưa nhập mật khẩu.");
                $('#TradingPasswordtvdt').focus();
            }
        });
    }

    this.clearData = function () {
        $("#TradingPasswordtvdt").val("");
        $("#comment").val("");
        $("#message_status").html("");
        $("#status_mes").val("");
    }

    this.clearMessageErr = function () {
        $("#TradingPasswordtvdt").onchange
    }

    this.horizontalArrangement = function () {
        if ($(window).width() >= 768) {
            var ThongTinUngVien = $("#ThongTinUngVien").height();
            var GioiThieuUngVien = $("#GioiThieuUngVien").height();
            var max = ThongTinUngVien > GioiThieuUngVien ? ThongTinUngVien : GioiThieuUngVien;
            $("#ImageUngVien").height(max);
            $("#GioiThieuUngVien").height(max);
            $("#ThongTinUngVien").height(max);
        }
        if ($(window).width() < 768) {
            var ThongTinUngVien = $("#ThongTinUngVien").height();
            var ImageUngVien = $("#ImageUngVien").height();
            var max = ThongTinUngVien > ImageUngVien ? ThongTinUngVien : ImageUngVien;
            $("#ImageUngVien").height(max);
            $("#ThongTinUngVien").height(max);
        }
    }

    //show - hide contract
    function ShowContract() {
        if ($(".showContract")) {
            counter = 0;
            $(".showContract").click(function () {
                counter++;
                $("#ShowContracts").show();
            });
        }

        if ($(".CloseContract")) {
            $(".CloseContract").click(function () {
                counter++;
                $("#ShowContracts").hide();
            });
        }
    }

    this.confirmCheckContract = function () {

        $('#confirmCheckContract').click(function () {
            debugger;
            var checkRules = $('#checkRules').is(":checked");
            var $errReg = $('#ErrReg');
            var $passDeal = $("input[sid=passDeal]");
            var $checkPassDone = $('#checkPassDone');
            var $checkPass = $('#checkPass');

            // check checkbox điều khoản
            if (checkRules == false) {
                $errReg.html(LANGUAGE.ALERT_CHOOSE_TERMS_AGREE);
                return;
            }

            // check null input password
            if ($passDeal.val() == null || $passDeal.val() == "") {
                $errReg.html(LANGUAGE.ALERT_ENTER_PASSWORD_PLS);
                return;
            }

            // check pass 
            var dataform = {
                pass: $passDeal.val(),
            }
            $.ajax({
                url: '/SearchAdvisorys/CheckPass',
                type: 'post',
                data: dataform,
            }).done(function (response) {
                if (response.data == 1) {

                    $checkPass.hide();
                    $checkPass.html('');
                    $checkPassDone.show();
                    $errReg.html('Quý khách vui lòng in hợp đồng vừa được tải về máy, ký xác nhận và gửi về FPTS trong vòng 15 ngày.');
                    $errReg.addClass("sucess");

                    // create DOM
                    var link = document.createElement("a");
                    link.download = '';
                    link.href = "/Public/img/PDF/Documents-FPTS.pdf";
                    link.target = '_self';
                    link.click();
                    //thông báo sau khi dowload file hợp đồng
                    alert("Quý khách vui lòng in hợp đồng vừa được tải về máy, ký xác nhận và gửi về FPTS trong vòng 15 ngày.");
                }

                if (response.data == 0) {
                    $errReg.html('Sai mật khẩu giao dịch');
                    return;
                }

                if (response.data == -1) {
                    $errReg.html('Có lỗi trong quá trình sử lý, Quý khách vui lòng thực hiện lại!');
                    return;
                }
            });
        });
    }

    // init cac code xu ly su kien cua cac DOM tren form
    this.initHandlers = function () {
       
        selfSearch.horizontalArrangement();

        if (onload) {
            counter = 2;
            counters = 2;
        }
        selfSearch.clickShowProfile();
        selfSearch.clickShowMenuService();
        selfSearch.clickBody();
        Scroll();
        ShowModal();
        hideModal();
        closemodel();
        ClickSearch();
        clickShowContent();
        changeAdress();
        Cut_text();
        triminput();
        Cut_comment();
        ajaxSubmit();
        selfSearch.setHeightScale();

        // confirmCheckContract
        selfSearch.confirmCheckContract();
    }
    // tat ca init can thiet (init all)
    this.initForm = function () {
        // init event handlers
        this.initHandlers();

    }
    // contructor => auto exec
    this.initForm();
})();

/// phần view

@using PagedList.Mvc;
@using WebApp.Models;

@{
    /**/

    ViewBag.Title = "SearchAdvisorys";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var listData = ViewBag.DatalistBrocker as List<BrokerProfile>;
    var listMyAviceinvest = ViewBag.DataMyListAviceinvest as List<MyListAviceinvest>;
    var InvestingtypeName = ViewBag.DataOption as List<BrokerProfile>;

    int count = 0;

    <script>
        var adress = "@ViewBag.Address";

        var countBroker = "@ViewBag.countGetbroker";  //js gọi số lượng broker
    </script>
}

<style>
    #message_status {
        color: red;
        font-size: 15px;
        padding: 0px;
        margin: 0px;
        text-align: center;
    }
</style>

<section class="fpts-body">
    @if (listMyAviceinvest != null && listMyAviceinvest.Count() > 0)
    {
        <article class="list--chuyenviens" id="@listMyAviceinvest.Count();">
            <div class="container fix-container">
                <div class="row">
                    <div class="content-list--chuyenvien">
                        <div class="list-of--me">
                            <p>Chuyên viên tư vn ca tôi</p>
                        </div>
                        <table class="table table-customize table-responsive table-list--ofme">
                            <thead>
                                <tr>
                                    <th>Danh sách tư vn viên</th>
                                    <th>Phí tư vn</th>
                                    <th>Thi gian</th>
                                    <th>Hy</th>
                                </tr>
                            </thead>
                            <tbody>

                                @foreach (var item in listMyAviceinvest)
                                {

                                    <tr class="tr-title">
                                        <td data-title="Danh sách tư vấn viên">
                                            <div class="content-img">
                                                @{
                                                    var strImageRedis = "data:image/png;base64," + item.ImageRedisLib;
                                                    if (item.ImageRedisLib == "")
                                                    {
                                                        strImageRedis = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAA/CAYAAABQHc7KAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV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9bzAAD4IQC51tcvFjpSynNZlh3ANkuWZQeklOeKNcI6XiANNkwkgHN+DsNrccXYV6Wsn/d6vW0HPxJjS17cFQghZRKeN9iwkQcAwE+KTZLrurr09c9LKWfmtqiUcqeU8nzRC1zXLSbDRYMJUxFgLhM9CnM5ody7R1HUxoxJ2aaCzSmAR9e6IDXJA2Du0jwFQNv22La/lGXZwVkjwNhUvEcAkxyfKt8LmooAQ8JpxtgpQohVcLcrmFGRUl4uhIHFGDvFOT896TcbTliCIPgphvduR0zrWSUgy8bOTF8wtqMWAZ7naQDHATxnFmnPMAEj254DcNzYPlGmGigYRSeSJLmmlDo5qwQopW4H8IzneT+b9jebGjJ6nvdzKeXj2KJJck1ZklI+vhnwmybAJMY/A7gXwBszBP4NAPca27ClBBgSPgDwEIBvA/hwG4F/aGx4qMqDKaC5d4M/wvDd4G23CPgq/vducKXWcKHhl6NPYPh6dCtfjr4I4KWZeTm6BhEUwAMYvh1+GMD+mir/CeBPGL4dfntm3w5PIKT4enzeeMcefPxixpKJ6csA3sMtej3+3wEADqDTqOGFiSUAAAAASUVORK5CYII";
                                                    }
                                                }
                                                <img src="@strImageRedis" alt="@item.abrokercde.ToLower()">
                                            </div>
                                            <div class="content-name">

                                                <p>@item.abrokername</p>
                                            </div>
                                        </td>
                                        <td data-title="Phí tư vấn">
                                            <div class="content-feename">
                                                <p class="table-coment--broker"> @item.apackfeename</p>
                                            </div>
                                        </td>
                                        <td data-title="Thời gian">
                                            <div class="content-feename">
                                                <p class="table-coment--broker">
                                                    đến @item.ATODATE
                                                </p>
                                            </div>
                                        </td>
                                        <td data-title="Hủy" data-code="@item.dahuy">
                                            @if (item.dahuy == "0")
                                            {
                                                <div class="img-remove btn-click--modal" data-usercode="@item.acustaccount" data-apackfeeid="@item.apackfeeid" data-brokercode="@item.abrokercde" data-atblid="@item.p_atblid" data-statusFee="@item.StatusFee" data-method="@item.Amethods"></div>
                                            }
                                            else if (item.dahuy == "1")
                                            {
                                                //cha lam j ca
                                            }
                                        </td>

                                    </tr>
                                }
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div id="ShowDeleteService" class="ShowDeleteService fixModel">
                <div class="back-modal" id="modalbk"></div>
                <div class="container fix-container">
                    <div class="modal-show--content">
                        <div class="modal-contents">
                            <div class="modal-header header-modal--top">

                                <h4 class="modal-title">Hy Dch Vụ</h4>
                            </div>
                            <div class="modal-body content-modal--body">
                                <h2>cm ơn quý khách </h2>
                                <h2>đã sdng dch vtư vn đầu tư ca fpts</h2>
                                <form id="modalCancel">
                                    <input type="text" value="" name="acustaccount" id="aclientcode" hidden /> @*số tài khoản*@
                                    <input type="text" value="" name="apackfeeid" id="apackfeecode" hidden /> @*mã gói phí *@
                                    <input type="text" value="" name="abrokercde" id="brokerid" hidden /> @*id broker*@
                                    <input type="text" value="" name="personaccount" id="aclientid" hidden /> @*người hủy -  mặc định số tài khoản*@
                                    <input type="text" value="" name="p_atblid" id="atblid" hidden />
                                    <input type="text" value="" name="StatusFee" id="statusFee" hidden />
                                    <input type="text" value="" name="FloorPhone" id="FloorPhone" hidden />
                                    <input type="text" value="" name="" id="methods" hidden />
                                    <p>Hãy cho chúng tôi đánh giá ca bn vdch vnày</p>
                                    <textarea class="form-control form-input-danhgia" rows="5" id="comment" name="opinion" placeholder="Ý kiến của bạn?" maxlength="493"></textarea>

                                    <p class="note" id="noteCane"></p>
                                    <div class="btn-pass">
                                        <div class="Pass-k pass-cant">
                                            <i class="fa fa-key key-pass--eztvdt" aria-hidden="true"></i>
                                            <input type="password" name="TradingPasswordtvdt" id="TradingPasswordtvdt" placeholder="Nhập mật khẩu ở đây" value="" class="form-control form-input--pass fpts-tradding--pass" autocomplete="off">
                                        </div>
                                        <div name="" class="btn btn-xacnhan btn-xacnhan--huydk" id="CancelRegistration">Xác Nhn</div>
                                        <button type="button" class="btn btn-huydichvu close-daily" id="CloseModal">Đóng</button>
                                        @*  onclick="ajaxSubmit()" *@
                                    </div>
                                    <div>
                                        <input type="hidden" id="status_mes" />
                                        <p id="message_status"></p>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </article>
    }


    <article class="Content-list--chuyenvien">
        <div class="container fix-container">
            <div class="row">
                <div class="title">
                    <p>Tìm kiếm chuyên viên tư vấn</p>
                </div>

                <div class="content-list--search">
                    <from id="searchbroker">
                        <input type="number" value="1" id="pageIndexSearch" name="pageindex" hidden />
                        <ul>
                            <li><input type="text" placeholder="Tên chuyên viên tư vấn" name="abrokername" id="InputName" class="search-name form-control search-input--timkiem"></li>
                            <li>
                                <select class="form-control search-truongphai search-input--timkiem" id="SlCareSearch" name="investingtypecde">
                                    @if (InvestingtypeName != null && InvestingtypeName.Count > 0)
                                    {
                                        <option value="">Tt cả</option>
                                        foreach (var item in InvestingtypeName)
                                        {

                                            <option value="@item.TYPECDE">@item.ATITLE_VN</option>

                                            count = count + 1;
                                        }
                                    }
                                </select>
                            </li>
                            <li>
                                <select class="form-control search-Kinhnghiem search-input--timkiem" id="SlRankSearch" name="ayearofcert">
                                    <option value="">Tất cả</option>
                                    <option value="0">1 đến 2 năm</option>
                                    <option value="1">3 đến 5 năm</option>
                                    <option value="2">6 đến 10 năm</option>
                                    <option value="3">Trên 10 năm</option>
                                </select>
                            </li>
                            <li>
                                <select class="form-control search-chinhanh search-input--timkiem" id="SlAddressSearch" name="acost">
                                    <option value="all">Tất cả</option>
                                    <option value="HN">Hà Nội</option>
                                    <option value="HCM">Hồ Chí Minh</option>
                                    <option value="DN">Đà Nẵng</option>

                                </select>
                            </li>
                            <li>
                                <div class="btnSearchChuyenvien search-input--timkiem" id="btnSearch">
                                    <span>Tìm kiếm</span>
                                </div>
                            </li>
                        </ul>
                        <input type="text" name="ayearofcertmin" id="ayearofmin" value="" hidden />
                        <input type="text" name="ayearofcertmax" id="ayearofmax" value="" hidden />
                    </from>
                </div>

                <div class="title-list" id="titleNote">
                    <p>Danh sách Tư vấn viên đề xuất <span class="count-search">(@ViewBag.countGetbroker)</span></p>
                </div>
                <article class="content-list--tuvan" id="searchData">
                </article>
                <div class="index-number--page">
                    @*
                        1 : khi click tìm kiếm thì sẽ gán value mà người dùng chọn đổ data vào from ở đây
                        để sử lý sự kiện xem thêm cho phần tìm kiếm.
                        2 : khi ko thực hiện tìm kiếm mà vẫn chọn xem thêm thì gán value mặc định cho data
                        trong from ở đây
                        dựa vào 1 để phân biệt vs 2.
                    *@

                    <form id="pageIndex" class="from-Get--IndexPage">
                        <input type="number" id="pageIndexAdd" name="pageindex" />
                        <input type="text" id="abrokernamemore" name="abrokername" />
                        <input type="text" id="investingtypemore" name="investingtypecde" />
                        <input type="text" id="ayearofcertmoremin" name="ayearofcertmin" />
                        <input type="text" id="ayearofcertmoremax" name="ayearofcertmax" />
                        <input type="text" id="acostmore" name="acost" />
                    </form>
                </div>

                <div class="btn-click-showrow">
                    <a id="btnClickShowRow" class="btn btn-click-showrows" style="display:none">Xem thêm</a>
                    <span class="loadingData" style="display:block"></span>
                </div>
            </div>
        </div>
    </article>
</section>
<!-- 2019-07-22 15:35:38 PhucVM-->
@section timkiemchuyenvien{
    @{
        Random rnd = new Random();
        int Random_Number = rnd.Next(1000000000);
    }

    <script src="~/Public/js/fpts-timkiemchuyenvien.js?v=@Random_Number"></script>
    <script src="~/Public/js/fpts-getBrocker.js"></script>
}
⚠️ **GitHub.com Fallback** ⚠️