$(function () { // ================ 신청인 정보 ================ // // 신청사유 추가 $(".btn_add_reason").click(function () { //$(this).prev(".select").find("option:selected").attr("selected"); var reasonSelect = $(this).prev(".select").html(); var addLi = '
  • '; $(".reason_list").append(addLi); }); // 신청인 추가 var apl_info = `
  • `; apl_info += `
    `; apl_info += ``; apl_info += ``; apl_info += ``; apl_info += ``; apl_info += `

    *필수입력

    상호

    *필수입력

    대표자

    *필수입력

    개인/법인

    *필수입력

    우편번호

    *우편물(공문)을 수령할 수 있는 자택/사업장 주소를 기입 바랍니다.

    *필수입력

    도로명 주소

    *필수입력

    이메일

    *필수입력

    휴대폰
    - -
    FAX
    - -

    *필수입력

    사업자등록번호
    (' - '제외)
    법인등록번호
    (' - '제외)
  • `; $(".btn_add_apl").click(function () { var aplNum = $(".apl_list>li").length + 1; if ($(this).closest(".table_top").siblings(".apl_list").is(".rapl_list")) { console.log("1") $(".apl_list").append(apl_info); $(".apl_list>li").last().find('.btn_apl_slide').html('피신청인' + aplNum + ' '); $(".apl_list>li").last().find('.btn_delete_apl').attr("title", "피신청인" + aplNum + " 삭제").text("피신청인 삭제"); } else { console.log("2") $(".apl_list").append(apl_info); $(".apl_list>li").last().find('.btn_apl_slide').html('신청인' + aplNum + ' '); $(".apl_list>li").last().find('.btn_delete_apl').attr("title", "신청인" + aplNum + " 삭제"); } }); // 하도급대금 내역, 도급대금 내역 입력 추가 및 삭제 // var priceTr = `` // priceTr +=``; // priceTr +=``; // priceTr +=``; // priceTr +=``; // priceTr +=``; // priceTr +=``; // priceTr +=``; // priceTr +=``; // priceTr +=``; // priceTr +=``; $(".btn_add_tr").on("click", function () { var trName = $(this).closest('.table_top').next(".price_table"); trName = trName[0].classList[4]; var trLength = $(this).closest('.table_top').next(".price_table").find(".contract_input").length; var priceTr = `` priceTr += `` priceTr += ``; priceTr += ``; priceTr += ``; priceTr += ``; priceTr += ``; priceTr += ``; priceTr += ``; priceTr += ``; priceTr += ``; priceTr += ``; $(this).closest('.table_top').next(".price_table").find("tbody").prepend(priceTr); $(".contract_input .select").change(function () { if ($(this).val() !== "00") { var selectTitle = $(this).find(":selected").text(); var reasonTr = `소계:` + selectTitle + ``; reasonTr += ``; reasonTr += ``; reasonTr += ``; reasonTr += ``; reasonTr += ``; reasonTr += ``; reasonTr += ``; reasonTr += ``; reasonTr += ``; reasonTr += ``; reasonTr += ``; if ($(".reason_tr." + trName + trLength).length == 0) { $(this).closest('.price_table').find("tbody").append(reasonTr); } else { $(this).closest(".price_table").find(".reason_tr." + trName + trLength).find("td").eq(0).text("소계:" + selectTitle); } $(this).closest(".contract_input").find(".input_text").removeAttr("readonly"); } else {} }) }); $(".contract_input .select").change(function () { if ($(this).val() !== "00") { var selectTitle = $(this).find(":selected").text(); console.log(selectTitle) $(this).closest(".contract_input").find(".input_text").removeAttr("readonly"); var trClass = $(this).closest(".contract_input")[0].classList[1]; if ($(".reason_tr." + trClass).length == 0) {} else { $(this).closest(".price_table").find(".reason_tr." + trClass).find("td").eq(0).text("소계:" + selectTitle); } } else {} }) }) // 타이틀 클릭 시 하위 정보 노출/숨김 function aplSlide(button) { $(button).closest(".apl_title").toggleClass("active"); $(button).closest(".apl_title").next(".apl_info_input").slideToggle(300); } function removeLi(button) { $(button).closest("li").remove(); setTimeout(function () { if ($(button).is(".btn_delete_apl")) { $(".btn_apl_slide").each(function (idx1, itm1) { idx1 += 1; if ($(itm1).closest(".apl_list").is(".rapl_list")) { $(itm1).html('피신청인' + idx1 + ' '); $(itm1).next(".btn_delete_apl").attr("title", "피신청인" + idx1 + " 삭제"); } else { $(itm1).html('신청인' + idx1 + ' '); $(itm1).next(".btn_delete_apl").attr("title", "신청인" + idx1 + " 삭제"); } }) } }) } function deleteReadOnly(select) { }