최초커밋
This commit is contained in:
554
inspection/ins_confirm.asp
Normal file
554
inspection/ins_confirm.asp
Normal file
@@ -0,0 +1,554 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<%
|
||||
Dim prj_code : prj_code = Request("prj_code")
|
||||
Dim prj_name : prj_name = Request("prj_name")
|
||||
%>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<h1><3E><><EFBFBD><EFBFBD> <20>ٹ<EFBFBD>Ȯ<EFBFBD><C8AE></h1>
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
<!-- Main content -->
|
||||
<div class="content-body">
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<% Dim f_menu : f_menu = "nk" %>
|
||||
<!-- #include file = "f_menu.asp" -->
|
||||
<form name='punchform' id="punchform" method='post'>
|
||||
<div id="prj_list"></div>
|
||||
<table width="1200px" class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||||
<tr>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</td>
|
||||
<td align="center" id="prj_sel" style="cursor:pointer;">
|
||||
<span class="prj_name"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD></span>
|
||||
</td>
|
||||
<td align="center"><button type="button" id="all_cnt" ><3E><>ü Ÿ<><C5B8> <20><><EFBFBD><EFBFBD></button></td>
|
||||
<td align="center"><button type="button" id="excel_down" ><3E><><EFBFBD><EFBFBD> <20>ٿ<EFBFBD><D9BF>ε<EFBFBD></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:center;"><3E>ܰ<EFBFBD> <20><><EFBFBD><EFBFBD></td>
|
||||
<td style="text-align:left;"><input type="text" name="all_unit_cost" id="all_unit_cost" value="" /> <20><> <button type="button" id="all_unit"><3E>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD></button></td>
|
||||
<td style="text-align:center;">Confrim ó<><C3B3></td>
|
||||
<td style="text-align:center;"><button type="button" id="all_check"><3E><>ü Ȯ<><C8AE></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center' colspan='4'>
|
||||
<table id="p_list" class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||||
<tr>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD></td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20>ڵ<EFBFBD></td>
|
||||
<td align="center" ><3E><>ó</td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td align="center" ><3E>ٹ<EFBFBD><D9B9><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td align="center" ><3E>Ϸ<EFBFBD></td>
|
||||
<td align="center" ><label for="error_check"><input type="checkbox" name="error_check" id="error_check" value="1" style="vertical-align:middle;"/><3E><><EFBFBD><EFBFBD></label></td>
|
||||
<td align="center" ><label for="no_check"><input type="checkbox" name="no_check" id="no_check" value="1" style="vertical-align:middle;"/><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></label></td>
|
||||
<td align="center" style="width:15%;"><3E>ܰ<EFBFBD></td>
|
||||
<td align="center" style="width:10%;"><3E>հ<EFBFBD></td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD></td>
|
||||
<td align="center" >Ȯ<><C8AE></td>
|
||||
</tr>
|
||||
<%
|
||||
dim no : no = 0
|
||||
query = ""
|
||||
query = query&" select isnull(cast(BB.Id as varchar),'') as ID, isnull(cast(CC.Id as varchar),'') as pay_id, AA.*,isnull(BB.job_add_time_memo,'') as job_add_time_memo, isnull(BB.job_confirm_yn,'N') as job_confirm_yn, "&VbCrlf
|
||||
query = query&" isnull(CC.s_pay_unit,'0') as s_pay_unit, isnull(CC.s_wan,'0') as s_wan, isnull(CC.s_sum, '0') as s_sum, isnull(CC.insert_user,'') as insert_user, "&VbCrlf
|
||||
query = query&" isnull(CC.attribute01,'') as attribute01, isnull(CC.attribute05,'') as attribute05, CC.chk1, CC.chk2,"&VbCrlf
|
||||
query = query&" case when DD.d_order_cnt = '77' then '<27><><EFBFBD><EFBFBD> <20>Ϸ<EFBFBD>' when DD.d_order_cnt is null then '' else '<27><><EFBFBD><EFBFBD> <20><>' end as d_order_cnt from "&VbCrlf
|
||||
query = query&" ( "&VbCrlf
|
||||
query = query&" select p_sn, ins_user, ins_birth, ins_date, sum(TOK) as TOK, sum(ERROR) as ERROR, sum(NOTEL) as NOTEL from "&VbCrlf
|
||||
query = query&" ( "&VbCrlf
|
||||
query = query&" select left(pvt.p_sn,11) as p_sn, "&VbCrlf
|
||||
query = query&" (select m_name from project2.dbo.man where id = inspection_user) as ins_user, "&VbCrlf
|
||||
query = query&" (select left(m_jumin,6) from project2.dbo.man where id = inspection_user) as ins_birth, "&VbCrlf
|
||||
query = query&" pvt.ins_date, TOK, ERROR, NOTEL from "&VbCrlf
|
||||
query = query&" ( "&VbCrlf
|
||||
query = query&" select * from "&VbCrlf
|
||||
query = query&" ( "&VbCrlf
|
||||
query = query&" select p_sn, inspection_user, convert(varchar, inspection_date, 23) as ins_date, pass_stat from T_INSPECTION_RES where pass_stat in ('TOK', 'ERROR') "&VbCrlf
|
||||
query = query&" union all "&VbCrlf
|
||||
query = query&" select p_sn, inspection_user, convert(varchar, inspection_date, 23) as ins_date, pass_stat from T_INSPECTION_RES_log where pass_stat in ('NOTEL') "&VbCrlf
|
||||
query = query&" ) u "&VbCrlf
|
||||
query = query&" ) a "&VbCrlf
|
||||
query = query&" pivot "&VbCrlf
|
||||
query = query&" ( "&VbCrlf
|
||||
query = query&" count(pass_stat) for pass_stat in (TOK, ERROR, NOTEL) "&VbCrlf
|
||||
query = query&" )as pvt "&VbCrlf
|
||||
query = query&" where len(pvt.inspection_user) <> 8 "&VbCrlf
|
||||
query = query&" ) as PP "&VbCrlf
|
||||
query = query&" group by p_sn, ins_user, ins_birth, ins_date "&VbCrlf
|
||||
query = query&" ) as AA "&VbCrlf
|
||||
query = query&" left join "&VbCrlf
|
||||
query = query&" ( "&VbCrlf
|
||||
query = query&" select id, p_child_sn, neakeun_name, left(neakeun_jumin,6) as neakeun_jumin, date, job_add_time_memo, job_confirm_yn, workload from project2.dbo.neakeun_work "&VbCrlf
|
||||
query = query&" where p_sebu='<27><><EFBFBD><EFBFBD>' and ISNULL(workload, '') = '' "&VbCrlf
|
||||
query = query&" ) BB on AA.ins_user=BB.neakeun_name and AA.ins_birth=BB.neakeun_jumin and left(AA.p_sn,11)=BB.p_child_sn and AA.ins_date=BB.date "&VbCrlf
|
||||
query = query&" left join "&VbCrlf
|
||||
query = query&" ( "&VbCrlf
|
||||
query = query&" select id, p_sn, m_name, left(m_jumin,6) as m_jumin, s_pay_unit, s_wan, s_sum, insert_user, attribute01, attribute05, chk1, chk2 from project2.dbo.T_NEAKEUN_PAY "&VbCrlf
|
||||
query = query&" where s_gubun='<27><><EFBFBD><EFBFBD>' and ISNULL(attribute02, '') = '' "&VbCrlf
|
||||
query = query&" ) CC on AA.ins_user=CC.m_name and AA.ins_birth=CC.m_jumin and left(AA.p_sn,11)=CC.p_sn and BB.id=CC.attribute01 "&VbCrlf
|
||||
query = query&" left join "&VbCrlf
|
||||
query = query&" ( "&VbCrlf
|
||||
query = query&" select d_no, d_order_cnt from project2.dbo.Document "&VbCrlf
|
||||
query = query&" where d_delok='N' "&VbCrlf
|
||||
query = query&" ) DD on CC.attribute05=DD.d_no "&VbCrlf
|
||||
query = query&" where AA.p_sn = '" & prj_code & "' "&VbCrlf
|
||||
query = query&" order by AA.p_sn, AA.ins_user, AA.ins_date "&VbCrlf
|
||||
'Response.Write query
|
||||
Rs.open query, adoconn, adopenstatic, adlockreadonly
|
||||
Dim input_readonly
|
||||
while not rs.eof
|
||||
If rs("job_confirm_yn") = "Y" Then
|
||||
input_readonly = "readonly='reaonldy'"
|
||||
else
|
||||
input_readonly = ""
|
||||
End If
|
||||
no = no + 1
|
||||
%>
|
||||
<tr>
|
||||
<td ><%=no %></td>
|
||||
<td ><%=rs("p_sn") %></td>
|
||||
<td ><%=rs("ins_user") %><input type="hidden" name="n_id" class="n_id" value="<%=rs("ID") %>" /><input type="hidden" name="n_pay_id" class="n_pay_id" value="<%=rs("pay_ID") %>" /></td>
|
||||
<td ><%=rs("ins_birth") %></td>
|
||||
<td ><%=rs("ins_date") %></td>
|
||||
<td ><%=rs("TOK") %></td>
|
||||
<td ><input type="checkbox" name="err_chk" value="1" <%If rs("chk1") = "1" Then%> checked="checked" <%End If %>/><%=rs("ERROR") %></td>
|
||||
<td ><input type="checkbox" name="no_chk" value="1" <%If rs("chk2") = "1" Then%> checked="checked" <%End If %>/><%=rs("NOTEL") %></td>
|
||||
<td style="text-align:right;"><input type="text" name="p_unit" value="<%=rs("s_pay_unit") %>" class="p_unit" tabindex="<%=no %>" <%=input_readonly %>/><3E><></td>
|
||||
<td style="text-align:right;"><%=FormatNumber(rs("s_sum"),0) %><3E><></td>
|
||||
<td ><input type="text" name="p_etc" value="<%=rs("job_add_time_memo") %>" class="p_etc" tabindex="1000+<%=no %>" <%=input_readonly %> style="width:100%;"/></td>
|
||||
<td >
|
||||
<%If rs("job_confirm_yn") = "N" Then%>
|
||||
<button type="button" class="confirm" data-value="save">Ȯ<><C8AE></button>
|
||||
<%Else %>
|
||||
<%If rs("attribute05") = "" Then %>
|
||||
<button type="button" class="confirm" data-value="del" style="background:#CA7C7B;"><3E><><EFBFBD><EFBFBD></button>
|
||||
<%Else %>
|
||||
<b style="color:red;"><%=rs("d_order_cnt") %></b>
|
||||
<%End If %>
|
||||
<%End If %>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
rs.movenext
|
||||
wend
|
||||
|
||||
rs.Close
|
||||
%>
|
||||
</table>
|
||||
<button type="button" id="pay_go"><3E><><EFBFBD><EFBFBD></button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
var prjDialog;
|
||||
$(function () {
|
||||
prj_code = "<%=prj_code %>";
|
||||
prj_name = "<%=prj_name %>";
|
||||
|
||||
if (prj_code != "") {
|
||||
$(".prj_name").text("(" + prj_code + ") " + prj_name);
|
||||
}else{
|
||||
$("#p_list").css("display", "none");
|
||||
$("#p_list").parent("td").text("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20>ֽʽÿ<CABD>.");
|
||||
}
|
||||
|
||||
$(".n_pay_id").each(function (e) {
|
||||
if ($(this).val() != "") {
|
||||
$("input[name=err_chk]").eq(e).prop("disabled", true);
|
||||
$("input[name=no_chk]").eq(e).prop("disabled", true);
|
||||
}
|
||||
});
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>
|
||||
$("#prj_sel").click(function () {
|
||||
var url = "prj_list_modal.asp?gubun=v1";
|
||||
modal_open(url, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>");
|
||||
});
|
||||
|
||||
//<2F><>ü Ÿ<><C5B8>
|
||||
$("#all_cnt").click(function () {
|
||||
if (prj_code == "") {
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20>ֽʽÿ<CABD>.");
|
||||
return false;
|
||||
} else {
|
||||
var url = "ins_cnt.asp?prj_code=" + prj_code + "&prj_name=" + escape(prj_name);
|
||||
modal_open(url, "<22><>ü Ÿ<><C5B8> <20><><EFBFBD><EFBFBD>");
|
||||
}
|
||||
});
|
||||
|
||||
//<2F><>ü <20>ܰ<EFBFBD>
|
||||
$("#all_unit_cost").click(function () {
|
||||
unit_evt($(this));
|
||||
});
|
||||
|
||||
//<2F><>ü <20>ܰ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
$("#all_unit").click(function () {
|
||||
if($("#all_unit_cost").val() == ""){
|
||||
alert("<22><>ü <20>ܰ<EFBFBD><DCB0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20>ֽñ<D6BD> <20>ٶ<EFBFBD><D9B6>ϴ<EFBFBD>.");
|
||||
return false;
|
||||
}else{
|
||||
if (confirm("<22>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD> <20>κ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ܰ<EFBFBD><DCB0><EFBFBD> <20><><EFBFBD><EFBFBD> <20>˴ϴ<CBB4>.\n<><6E><EFBFBD><EFBFBD> <20>Ͻðڽ<C3B0><DABD>ϱ<EFBFBD>?")) {
|
||||
var all_unit_cost = $("#all_unit_cost").val();
|
||||
$(".p_unit").each(function (e) {
|
||||
if ($(".p_unit").eq(e).prop("readonly") == false) {
|
||||
$(".p_unit").eq(e).val(all_unit_cost);
|
||||
|
||||
var sum = cnt_sum($(this));
|
||||
if (isNaN(sum)) {
|
||||
$(this).parent("td").next().text(0 + " <20><>");
|
||||
} else {
|
||||
$(this).parent("td").next().text(commify(Math.ceil(sum)));
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//<2F><>ü Confirm
|
||||
$("#all_check").click(function () {
|
||||
if (confirm("Ȯ<><C8AE> ó<><C3B3> <20>ȵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>鸸 ó<><C3B3> <20>˴ϴ<CBB4>.\n<><6E><EFBFBD><EFBFBD> <20>Ͻðڽ<C3B0><DABD>ϱ<EFBFBD>?")) {
|
||||
$(".confirm").each(function () {
|
||||
var gubun = $(this).text();
|
||||
if (gubun == "Ȯ<><C8AE>") {
|
||||
$(this).trigger("click");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD> Confirm
|
||||
$(".confirm").click(function () {
|
||||
var gubun = "v1";
|
||||
var obj = $(this);
|
||||
var prj_code = $(this).parent("td").siblings().eq(1).text();
|
||||
var n_name = $(this).parent("td").siblings().eq(2).text();
|
||||
var n_id = $(this).parent("td").siblings().eq(2).children(".n_id").val();
|
||||
var n_pay_id = $(this).parent("td").siblings().eq(2).children(".n_pay_id").val();
|
||||
var n_birth = $(this).parent("td").siblings().eq(3).text();
|
||||
var n_date = $(this).parent("td").siblings().eq(4).text();
|
||||
var n_cnt = parseInt($(this).parent("td").siblings().eq(5).text());
|
||||
var p_danga = $(this).parent("td").siblings().eq(8).children(".p_unit").val();
|
||||
var p_sum = $(this).parent("td").siblings().eq(9).text().replace(/,/g, '');
|
||||
p_sum = p_sum.replace('<27><>', '');
|
||||
var p_etc = $(this).parent("td").siblings().eq(10).children(".p_etc").val();
|
||||
var error = parseInt($(this).parent("td").siblings().eq(6).text());
|
||||
var notel = parseInt($(this).parent("td").siblings().eq(7).text());
|
||||
var err_chk = $(this).parent("td").siblings().eq(6).children("input[name=err_chk]");
|
||||
var no_chk = $(this).parent("td").siblings().eq(7).children("input[name=no_chk]");
|
||||
|
||||
if (p_danga == "" || p_sum == "") {
|
||||
alert("<22>ݾ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȵǾ<C8B5> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.");
|
||||
$(this).parent("td").siblings().eq(8).children($(".p_unit")).focus();
|
||||
return false
|
||||
}
|
||||
//alert(n_cnt);
|
||||
if (obj.text() == "Ȯ<><C8AE>") {
|
||||
url = "neakeun_save_ajax.asp";
|
||||
} else {
|
||||
url = "neakeun_del_ajax.asp";
|
||||
}
|
||||
|
||||
if (err_chk.is(":checked") == true) {
|
||||
err_chk = err_chk.val();
|
||||
n_cnt = n_cnt + error;
|
||||
} else {
|
||||
err_chk = "0";
|
||||
}
|
||||
|
||||
if (no_chk.is(":checked") == true) {
|
||||
no_chk = no_chk.val();
|
||||
n_cnt = n_cnt + notel;
|
||||
} else {
|
||||
no_chk = "0";
|
||||
}
|
||||
|
||||
ajax_confirm(url, gubun, prj_code, escape(n_name), n_id, n_pay_id, n_birth, n_date, n_cnt, p_danga, p_sum, escape(p_etc), err_chk, no_chk, obj);
|
||||
});
|
||||
|
||||
//all <20><><EFBFBD><EFBFBD> üũ
|
||||
$("input[name=error_check]").click(function () {
|
||||
if ($(this).is(":checked") == true) {
|
||||
$("input[name=err_chk]").not(":disabled").prop("checked", true);
|
||||
} else {
|
||||
$("input[name=err_chk]").not(":disabled").prop("checked", false);
|
||||
}
|
||||
|
||||
$(".p_unit").each(function (e) {
|
||||
if ($("input[name=n_pay_id]").eq(e).val() == "") {
|
||||
if ($(this).val() != "0" && $(this).val() != "") {
|
||||
var sum = cnt_sum($(this));
|
||||
|
||||
if (isNaN(sum)) {
|
||||
$(this).parent("td").next().text(0 + " <20><>");
|
||||
} else {
|
||||
$(this).parent("td").next().text(commify(Math.ceil(sum)));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> üũ
|
||||
$("input[name=err_chk]").each(function (e) {
|
||||
$(this).click(function () {
|
||||
if ($(".p_unit").eq(e).val() != "0" && $(".p_unit").eq(e).val() != "") {
|
||||
var sum = cnt_sum($(".p_unit").eq(e));
|
||||
|
||||
if (isNaN(sum)) {
|
||||
$(".p_unit").eq(e).parent("td").next().text(0 + " <20><>");
|
||||
} else {
|
||||
$(".p_unit").eq(e).parent("td").next().text(commify(Math.ceil(sum)));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//all <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ
|
||||
$("input[name=no_check]").click(function () {
|
||||
if ($(this).is(":checked") == true) {
|
||||
$("input[name=no_chk]").not(":disabled").prop("checked", true);
|
||||
} else {
|
||||
$("input[name=no_chk]").not(":disabled").prop("checked", false);
|
||||
}
|
||||
|
||||
$(".p_unit").each(function (e) {
|
||||
if ($("input[name=n_pay_id]").eq(e).val() == "") {
|
||||
if ($(this).val() != "0" && $(this).val() != "") {
|
||||
var sum = cnt_sum($(this));
|
||||
|
||||
if (isNaN(sum)) {
|
||||
$(this).parent("td").next().text(0 + " <20><>");
|
||||
} else {
|
||||
$(this).parent("td").next().text(commify(Math.ceil(sum)));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ
|
||||
$("input[name=no_chk]").each(function (e) {
|
||||
$(this).click(function () {
|
||||
if ($(".p_unit").eq(e).val() != "0" && $(".p_unit").eq(e).val() != "") {
|
||||
var sum = cnt_sum($(".p_unit").eq(e));
|
||||
|
||||
if (isNaN(sum)) {
|
||||
$(".p_unit").eq(e).parent("td").next().text(0 + " <20><>");
|
||||
} else {
|
||||
$(".p_unit").eq(e).parent("td").next().text(commify(Math.ceil(sum)));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD> <20>ܰ<EFBFBD>
|
||||
$(".p_unit").click(function () {
|
||||
unit_evt($(this));
|
||||
});
|
||||
|
||||
//<2F>ܰ<EFBFBD><DCB0><EFBFBD> <20>հ<EFBFBD>
|
||||
$(".p_unit").each(function (e) {
|
||||
$(this).keyup(function () {
|
||||
var sum = cnt_sum($(this));
|
||||
|
||||
if (isNaN(sum)) {
|
||||
$(this).parent("td").next().text(0+" <20><>");
|
||||
} else {
|
||||
$(this).parent("td").next().text(commify(Math.ceil(sum)));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#pay_go").click(function () {
|
||||
var url = "/approval/doc_myun_pay.asp?title=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>";
|
||||
$("#punchform").attr("action", url);
|
||||
$("#punchform").submit();
|
||||
});
|
||||
|
||||
$("#excel_down").click(function () {
|
||||
var d = new Date()
|
||||
$("#p_list").table2excel({
|
||||
name: "<%=prj_code %>_" + d.getFullYear() + d.getMonth() + d.getDate(),
|
||||
filename: "<%=prj_code %>_" + d.getFullYear() + d.getMonth() + d.getDate(),
|
||||
fileext: ".xls",
|
||||
exclude_inputs: true
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//<2F>ܰ<EFBFBD>, <20>հ<EFBFBD>
|
||||
function cnt_sum(obj){
|
||||
var n_pay_id = obj.parent("td").siblings().eq(2).children("input[name=n_pay_id]").val();
|
||||
var tok = parseInt(obj.parent("td").siblings().eq(5).text());
|
||||
var error = parseInt(obj.parent("td").siblings().eq(6).text());
|
||||
var notel = parseInt(obj.parent("td").siblings().eq(7).text());
|
||||
var err_chk = obj.parent("td").siblings().eq(6).children("input[type=checkbox]");
|
||||
var no_chk = obj.parent("td").siblings().eq(7).children("input[type=checkbox]");
|
||||
var cnt = tok;
|
||||
|
||||
if (err_chk.is(":checked") == true && n_pay_id == "") {
|
||||
cnt = cnt + error;
|
||||
} else {
|
||||
cnt = cnt;
|
||||
}
|
||||
|
||||
if (no_chk.is(":checked") == true && n_pay_id == "") {
|
||||
cnt = cnt + notel;
|
||||
} else {
|
||||
cnt = cnt;
|
||||
}
|
||||
|
||||
var unit_cost = parseFloat(obj.val());
|
||||
|
||||
return cnt * unit_cost;
|
||||
}
|
||||
|
||||
function modal_open(url, x) {
|
||||
$("body").css({
|
||||
overflow: 'hidden'
|
||||
});
|
||||
prjDialog = $("#prj_list").dialog({
|
||||
autoOpen: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
position: { my: "center", at: "top" },
|
||||
show: "blind",
|
||||
width: "600",
|
||||
height: "500",
|
||||
title: x,
|
||||
open: function () {
|
||||
$(".ui-widget-overlay").css({
|
||||
opacity: 0.5,
|
||||
filter: "Alpha(Opacity=50)",
|
||||
backgroundColor: "gray"
|
||||
});
|
||||
},
|
||||
close: function (event, ui) {
|
||||
$("body").css({
|
||||
overflow: 'inherit'
|
||||
});
|
||||
url = "";
|
||||
prjDialog.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
prjDialog.load(url, function () {
|
||||
prjDialog.dialog("open");
|
||||
});
|
||||
}
|
||||
|
||||
function unit_evt(obj) {
|
||||
$(obj).css('imeMode', 'disabled').keypress(function (evt) {
|
||||
if (evt.which && (evt.which < 45 || evt.which > 57)) {
|
||||
evt.preventDefault();
|
||||
}
|
||||
|
||||
var charCode = (evt.which) ? evt.which : event.keyCode;
|
||||
if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var regexp = /^\d*[.]\d*$/;//<2F>Ҽ<EFBFBD><D2BC><EFBFBD>
|
||||
var val = $(this).val();
|
||||
|
||||
if (regexp.test(val)) {//<2F>Ҽ<EFBFBD><D2BC><EFBFBD> Prevent
|
||||
if (charCode == 46) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}).keyup(function (evt) {
|
||||
if ($(this).val() != null && $(this).val() != '') {
|
||||
$(this).val($(this).val().replace(/[^\.0-9]/g, ''));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//Confirm
|
||||
function ajax_confirm(url, gubun, prj_code, n_name, n_id, n_pay_id, n_birth, n_date, n_cnt, p_danga, p_sum, p_etc, err_chk, no_chk,obj) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "get",
|
||||
data:
|
||||
{
|
||||
"gubun": gubun,
|
||||
"n_id": n_id,
|
||||
"n_pay_id": n_pay_id,
|
||||
"prj_code": prj_code,
|
||||
"n_name": n_name,
|
||||
"n_birth": n_birth,
|
||||
"n_date": n_date,
|
||||
"n_cnt": n_cnt,
|
||||
"p_danga": p_danga,
|
||||
"p_sum": p_sum,
|
||||
"p_etc": p_etc,
|
||||
"err_chk": err_chk,
|
||||
"no_chk": no_chk,
|
||||
},
|
||||
dataType:"JSON",
|
||||
success: function (data) {
|
||||
console.log(data);
|
||||
if (data.ok == "1") {
|
||||
if (obj.text() == "Ȯ<><C8AE>") {
|
||||
if (n_id == "" && n_pay_id == "") {
|
||||
obj.parent("td").siblings().eq(2).children(".n_id").val(data.id);
|
||||
obj.parent("td").siblings().eq(2).children(".n_pay_id").val(data.pay_id);
|
||||
obj.parent("td").siblings().eq(6).children("input[name=err_chk]").prop("disabled", true);
|
||||
obj.parent("td").siblings().eq(7).children("input[name=no_chk]").prop("disabled", true);
|
||||
obj.parent("td").siblings().eq(8).children(".p_unit").prop("readonly", true);
|
||||
obj.parent("td").siblings().eq(10).children(".p_etc").prop("readonly", true);
|
||||
}
|
||||
obj.text("<22><><EFBFBD><EFBFBD>");
|
||||
obj.css("background", "#CA7C7B");
|
||||
} else {
|
||||
if (n_id != "" || n_pay_id != "") {
|
||||
obj.parent("td").siblings().eq(2).children(".n_id").val("");
|
||||
obj.parent("td").siblings().eq(2).children(".n_pay_id").val("");
|
||||
obj.parent("td").siblings().eq(6).children("input[name=err_chk]").prop("disabled", false);
|
||||
obj.parent("td").siblings().eq(7).children("input[name=no_chk]").prop("disabled", false);
|
||||
obj.parent("td").siblings().eq(8).children(".p_unit").prop("readonly", false);
|
||||
obj.parent("td").siblings().eq(10).children(".p_etc").prop("readonly", false);
|
||||
}
|
||||
obj.text("Ȯ<><C8AE>");
|
||||
obj.css("background", "");
|
||||
}
|
||||
} else {
|
||||
if (data.ok == "2") {
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.\n<><6E><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ٶ<EFBFBD><D9B6>ϴ<EFBFBD>.");
|
||||
} else {
|
||||
alert("<22><><EFBFBD><EFBFBD>!\n <20>Է<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٽ<EFBFBD> Ȯ<><C8AE> <20>Ͽ<EFBFBD> <20>ֽñ<D6BD> <20>ٶ<EFBFBD><D9B6>ϴ<EFBFBD>.");
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
alert("<22><><EFBFBD><EFBFBD> <20><EFBFBD>\n<><6E><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ͻʽÿ<CABD>.");
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
Reference in New Issue
Block a user