Compare commits
7 Commits
2999d7a68e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 88be1142bc | |||
| b1bdb33a23 | |||
| 2d73de12d1 | |||
| c085599ca9 | |||
| 9e670e17b6 | |||
| bd90910b32 | |||
| 295e7a6e23 |
@@ -309,9 +309,9 @@
|
||||
var tmpHTML = "";
|
||||
$.each(tmpJsonList, function(idx, obj){
|
||||
tmpHTML += '<tr id="tr_'+ obj.d_no +'">';
|
||||
tmpHTML += ' <td class="text-center"><a href="javascript:openit(\''+ obj.d_no.substr(9, 1) +'\',\''+ obj.d_no +'\', \'' + step + '\', \''+ obj.p_subject +'\')">'+ obj.d_no +'</a></td>';
|
||||
tmpHTML += ' <td class="text-center"><a href="javascript:openit(\''+ obj.d_no.substr(9, 1) +'\',\''+ obj.d_no +'\', \'' + step + '\')">'+ obj.d_no +'</a></td>';
|
||||
// tmpHTML += ' <td class="text-left">'+ (obj.p_child_sn == "" ? "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>" : "["+ obj.p_child_sn +"] "+ obj.p_subject) +'</td>';
|
||||
tmpHTML += ' <td class="text-left">' + (obj.p_child_sn == "" ? obj.p_subject : "[" + obj.p_child_sn + "] " + obj.p_subject) + '</td>';
|
||||
tmpHTML += ' <td class="text-left">' + (obj.p_child_sn == "" ? (obj.p_subject == "<22>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭" ? "<22>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭" : "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>") : "[" + obj.p_child_sn + "] " + obj.p_subject) + '</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ obj.client +'</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ obj.hangmok +'-'+ obj.sebu +'</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ commify(obj.cost) +'</td>';
|
||||
@@ -342,7 +342,8 @@
|
||||
$("#sumTable > tbody > tr > td:eq("+ idxArr[obj.cost_type] +")").html(commify(obj.cost));
|
||||
});
|
||||
}
|
||||
function openit(z, x, y, subject){
|
||||
|
||||
function openit(z, x, y){
|
||||
var tmp_height = 960;
|
||||
var tmp_width = 850;
|
||||
if (z == 'i'){
|
||||
@@ -354,12 +355,6 @@
|
||||
}else if (z == 'r'){
|
||||
var title_type = "<22>ڱ<EFBFBD>";
|
||||
var url = '/ess/doc_expense2_print.asp?rev_type=' + y + '&d_no=' + x + '&view_chk=1&x=1&title_type=' + title_type;
|
||||
}else if (z == 't'){
|
||||
if(subject == "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>"){
|
||||
var url = '/ess/doc_myun_pay_print2.asp?rev_type=' + y + '&d_no=' + x + '&view_chk=1&x=1';
|
||||
}else{
|
||||
var url = '/ess/doc_myun_pay_print.asp?rev_type=' + y + '&d_no=' + x + '&view_chk=1&x=1';
|
||||
}
|
||||
}
|
||||
window.open(url, '', 'left=0,top=0,width=' + tmp_width + ',height=' + tmp_height + ',scrollbars=yes,resizable=yes')
|
||||
}
|
||||
|
||||
@@ -20,17 +20,15 @@ Select Case Request("command")
|
||||
|
||||
SQL = ""
|
||||
SQL = SQL & " SELECT A.d_no,A.p_child_sn,A.p_subject,A.client,A.depart_name,A.cost_type,A.hangmok,A.sebu,A.cost,A.d_write_name,A.cost_date,A.payment_date FROM( " &VBCRLF
|
||||
SQL = SQL & " SELECT M.id, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ as d_no, CASE WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' THEN '' ELSE CONVERT(varchar, M.target10) END AS p_child_sn, " &VBCRLF
|
||||
SQL = SQL & " SELECT M.id, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ as d_no, CONVERT(varchar, M.target10) AS p_child_sn, " &VBCRLF
|
||||
SQL = SQL & "CASE " &VBCRLF
|
||||
SQL = SQL & " WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 'r' " &VBCRLF
|
||||
SQL = SQL & " THEN '<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' " &VBCRLF
|
||||
SQL = SQL & " WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' " &VBCRLF
|
||||
SQL = SQL & " THEN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> " &VBCRLF
|
||||
SQL = SQL & " ELSE ISNULL(TPM.p_subject, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>') " &VBCRLF
|
||||
SQL = SQL & "END AS p_subject, " &VBCRLF
|
||||
SQL = SQL & " CASE WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' THEN '-' ELSE dbo.FN_RemoveExtraSpaces(RTRIM(CONVERT(NVARCHAR(MAX), target8))) END AS client, " &VBCRLF
|
||||
SQL = SQL & " CASE WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' THEN PARSENAME(REPLACE(CONVERT(NVARCHAR(MAX), target97), '^^', '.'), 1) ELSE ISNULL(ISNULL(DRE.depart_name, DFI.depart_name), CASE WHEN TPM.p_subject IS NULL THEN '-' ELSE 'Ű<><C5B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' END) END AS depart_name, " &VBCRLF
|
||||
SQL = SQL & " target4 AS cost_type, DC1.d_cost_name AS hangmok, DC2.d_cost_name AS sebu, CASE WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' THEN ISNULL((SELECT SUM(CAST(REPLACE(SUBSTRING(v.value, CHARINDEX('^^', v.value) + 2, 4000), ',', '') AS money)) FROM STRING_SPLIT(REPLACE(CONVERT(NVARCHAR(MAX), M.target15), '^//^', CHAR(1)), CHAR(1)) v WHERE CHARINDEX('^^', v.value) > 0), 0) ELSE CAST(CONVERT(NVARCHAR(MAX), target5) AS money) END AS cost, d_write_name, target3 as cost_date, CASE WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' THEN '-' ELSE CONVERT(NVARCHAR(MAX), remark19) END AS payment_date,remark1,remark2 " &VBCRLF
|
||||
SQL = SQL & " dbo.FN_RemoveExtraSpaces(RTRIM(CONVERT(NVARCHAR(MAX), target8))) AS client, " &VBCRLF
|
||||
SQL = SQL & " ISNULL(ISNULL(DRE.depart_name, DFI.depart_name), CASE WHEN TPM.p_subject IS NULL THEN '-' ELSE 'Ű<><C5B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' END) AS depart_name, " &VBCRLF
|
||||
SQL = SQL & " target4 AS cost_type, DC1.d_cost_name AS hangmok, DC2.d_cost_name AS sebu, target5 AS cost, d_write_name, target3 as cost_date, remark19 as payment_date,remark1,remark2 " &VBCRLF
|
||||
SQL = SQL & " FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> M WITH(nolock) LEFT JOIN Document D WITH(nolock) ON M.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ = D.d_no " &VBCRLF
|
||||
SQL = SQL & " LEFT JOIN T_PROJECT_METHOD TPM WITH(nolock) ON CONVERT(varchar, M.target10) = TPM.p_child_sn " &VBCRLF
|
||||
SQL = SQL & " LEFT JOIN T_PROJECT_BASE TPB WITH(nolock) ON TPM.p_sn = TPB.p_sn LEFT JOIN " &VBCRLF
|
||||
@@ -46,20 +44,20 @@ Select Case Request("command")
|
||||
SQL = SQL & " ) DFI ON CASE WHEN TPM.p_field_dept IN ('12', '9', '8') THEN '12' ELSE TPM.p_field_dept END = DFI.depart_code " &VBCRLF
|
||||
SQL = SQL & " LEFT JOIN direct_costcode DC1 WITH(nolock) ON CONVERT(varchar, target11) = CONVERT(varchar, DC1.id) " &VBCRLF
|
||||
SQL = SQL & " LEFT JOIN direct_costcode DC2 WITH(nolock) ON CONVERT(varchar, target12) = CONVERT(varchar, DC2.id) " &VBCRLF
|
||||
SQL = SQL & " WHERE (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' ) " &VBCRLF
|
||||
SQL = SQL & " WHERE (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' ) " &VBCRLF
|
||||
'SQL = SQL & " AND target3 LIKE '"& Request("smonth") &"%' "
|
||||
SQL = SQL & " AND ISDATE(CONVERT(varchar(30),target3)) = 1 "
|
||||
SQL = SQL & " AND CONVERT(DATE,CONVERT(varchar(30),target3)) > DATEADD(DD,-1,CONVERT(DATE,'"&SMONTH&"-01')) " &VBCRLF
|
||||
SQL = SQL & " AND CONVERT(DATE,CONVERT(varchar(30),target3)) < "&EMONTH&" " &VBCRLF
|
||||
SQL = SQL & " AND del_yes_no = 'no' " &VBCRLF
|
||||
If Request("step") = "1" Then
|
||||
SQL = SQL & " AND (((<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' OR <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' OR <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>') AND remark1 LIKE '3' AND ISNULL(convert(varchar, remark2), '') = '') OR (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' AND remark1 LIKE '3' AND ISNULL(convert(varchar, remark21), '') = '')) "
|
||||
SQL = SQL & " AND ((<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' AND remark1 LIKE '3' AND ISNULL(convert(varchar, remark2), '') = '') OR (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' AND remark1 LIKE '3' AND ISNULL(convert(varchar, remark21), '') = '')) "
|
||||
ElseIf Request("step") = "2" Then
|
||||
SQL = SQL & " AND (((<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' OR <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' OR <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>') AND remark1 LIKE '3' AND ISNULL(convert(varchar, remark2), '') <> '') OR (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' AND remark1 LIKE '3' AND ISNULL(convert(varchar, remark21), '') <> '')) "
|
||||
SQL = SQL & " AND ((<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' AND remark1 LIKE '3' AND ISNULL(convert(varchar, remark2), '') <> '') OR (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' AND remark1 LIKE '3' AND ISNULL(convert(varchar, remark21), '') <> '')) "
|
||||
ElseIf Request("step") = "3" Then
|
||||
SQL = SQL & " AND (((<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' OR <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' OR <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>') AND remark1 LIKE '77' AND ISNULL(convert(varchar, remark5), '') = '') OR (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' AND remark1 LIKE '77' AND ISNULL(convert(varchar, remark23), '') = '')) "
|
||||
SQL = SQL & " AND ((<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' AND remark1 LIKE '77' AND ISNULL(convert(varchar, remark5), '') = '') OR (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' AND remark1 LIKE '77' AND ISNULL(convert(varchar, remark23), '') = '')) "
|
||||
ElseIf Request("step") = "4" Then
|
||||
SQL = SQL & " AND (((<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' OR <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' OR <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>') AND remark1 LIKE '77' AND ISNULL(convert(varchar, remark5), '') <> '') OR (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' AND remark1 LIKE '77' AND ISNULL(convert(varchar, remark23), '') <> '')) "
|
||||
SQL = SQL & " AND ((<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' AND remark1 LIKE '77' AND ISNULL(convert(varchar, remark5), '') <> '') OR (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' AND remark1 LIKE '77' AND ISNULL(convert(varchar, remark23), '') <> '')) "
|
||||
End If
|
||||
SQL = SQL & " AND d_delok = 'N' AND D.d_order_cnt = 77 "
|
||||
SQL = SQL & " ) A WHERE 1 = 1 "
|
||||
@@ -97,16 +95,14 @@ Select Case Request("command")
|
||||
|
||||
Case "finalList"
|
||||
SQL = ""
|
||||
SQL = SQL & " SELECT <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ as d_no, CASE WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' THEN '' ELSE CONVERT(varchar, M.target10) END AS p_child_sn, "
|
||||
SQL = SQL & " SELECT <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ as d_no, CONVERT(varchar, M.target10) AS p_child_sn, "
|
||||
SQL = SQL & " CASE " &VBCRLF
|
||||
SQL = SQL & " WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 'r' " &VBCRLF
|
||||
SQL = SQL & " THEN '<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' " &VBCRLF
|
||||
SQL = SQL & " WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' " &VBCRLF
|
||||
SQL = SQL & " THEN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> " &VBCRLF
|
||||
SQL = SQL & " ELSE ISNULL(TPM.p_subject, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>') " &VBCRLF
|
||||
SQL = SQL & " END AS p_subject, CASE WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' THEN '-' ELSE dbo.FN_RemoveExtraSpaces(RTRIM(CONVERT(NVARCHAR(MAX), target8))) END AS client, " &VBCRLF
|
||||
SQL = SQL & " CASE WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' THEN PARSENAME(REPLACE(CONVERT(NVARCHAR(MAX), target97), '^^', '.'), 1) ELSE ISNULL(ISNULL(DRE.depart_name, DFI.depart_name), CASE WHEN TPM.p_subject IS NULL THEN '' ELSE 'Ű<><C5B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' END) END AS depart_name, target4 AS cost_type, "
|
||||
SQL = SQL & " DC1.d_cost_name AS hangmok, DC2.d_cost_name AS sebu, CASE WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' THEN ISNULL((SELECT SUM(CAST(REPLACE(SUBSTRING(v.value, CHARINDEX('^^', v.value) + 2, 4000), ',', '') AS money)) FROM STRING_SPLIT(REPLACE(CONVERT(NVARCHAR(MAX), M.target15), '^//^', CHAR(1)), CHAR(1)) v WHERE CHARINDEX('^^', v.value) > 0), 0) ELSE CAST(CONVERT(NVARCHAR(MAX), target5) AS money) END AS cost, ISNULL(CONVERT(varchar, remark5), '') AS chk, "
|
||||
SQL = SQL & " END AS p_subject, dbo.FN_RemoveExtraSpaces(RTRIM(CONVERT(NVARCHAR(MAX), target8))) AS client, " &VBCRLF
|
||||
SQL = SQL & " ISNULL(ISNULL(DRE.depart_name, DFI.depart_name), CASE WHEN TPM.p_subject IS NULL THEN '' ELSE 'Ű<><C5B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' END) AS depart_name, target4 AS cost_type, "
|
||||
SQL = SQL & " DC1.d_cost_name AS hangmok, DC2.d_cost_name AS sebu, target5 AS cost, ISNULL(CONVERT(varchar, remark5), '') AS chk, "
|
||||
SQL = SQL & " CONVERT(varchar(4000), target2) AS contents, CONVERT(varchar(4000), target17) AS over_comment "
|
||||
SQL = SQL & " FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> M WITH(nolock) LEFT JOIN Document D WITH(nolock) ON M.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ = D.d_no "
|
||||
SQL = SQL & " LEFT JOIN T_PROJECT_METHOD TPM WITH(nolock) ON CONVERT(varchar, M.target10) = TPM.p_child_sn "
|
||||
@@ -123,15 +119,15 @@ Select Case Request("command")
|
||||
SQL = SQL & " ) DFI ON CASE WHEN TPM.p_field_dept IN ('12', '9', '8') THEN '12' ELSE TPM.p_field_dept END = DFI.depart_code "
|
||||
SQL = SQL & " LEFT JOIN direct_costcode DC1 WITH(nolock) ON CONVERT(varchar, target11) = CONVERT(varchar, DC1.id) "
|
||||
SQL = SQL & " LEFT JOIN direct_costcode DC2 WITH(nolock) ON CONVERT(varchar, target12) = CONVERT(varchar, DC2.id) "
|
||||
SQL = SQL & " WHERE (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>') AND del_yes_no = 'no' AND remark1 LIKE '77' "
|
||||
SQL = SQL & " WHERE (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭') AND del_yes_no = 'no' AND remark1 LIKE '77' "
|
||||
SQL = SQL & " AND d_delok = 'N' AND D.d_order_cnt = 77 "
|
||||
If Request("smonth") <> "" Then
|
||||
SQL = SQL & " AND target3 LIKE '"& Request("smonth") &"%' "
|
||||
End If
|
||||
If Request("step") = "1" Then
|
||||
SQL = SQL & " AND (((<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>') and ISNULL(CONVERT(varchar, remark5), '') = '') or (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' and ISNULL(CONVERT(varchar, remark23), '') = '')) "
|
||||
SQL = SQL & " AND ((<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' and ISNULL(CONVERT(varchar, remark5), '') = '') or (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' and ISNULL(CONVERT(varchar, remark23), '') = '')) "
|
||||
ElseIf Request("step") = "2" Then
|
||||
SQL = SQL & " AND (((<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>') and ISNULL(CONVERT(varchar, remark5), '') <> '') or (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' and ISNULL(CONVERT(varchar, remark23), '') <> '')) "
|
||||
SQL = SQL & " AND ((<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' and ISNULL(CONVERT(varchar, remark5), '') <> '') or (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' and ISNULL(CONVERT(varchar, remark23), '') <> '')) "
|
||||
Else
|
||||
SQL = SQL & " AND 1=2 "
|
||||
End If
|
||||
@@ -172,19 +168,19 @@ Select Case Request("command")
|
||||
'SQL = SQL & " UPDATE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SET remark5 = '20190301', remark15 = '"& Request("today") &"' "
|
||||
'SQL = SQL & " WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ IN ("& Replace(Replace(Replace(Request("checkedList"), """", "'"), "[", ""), "]", "") &") "
|
||||
SQL = SQL & " UPDATE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
|
||||
SQL = SQL & " SET remark5 = CASE WHEN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ NOT LIKE '%-r-%' THEN '20190301' ELSE CONVERT(NVARCHAR(MAX), remark5) END, "
|
||||
SQL = SQL & " remark15 = CASE WHEN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ NOT LIKE '%-r-%' THEN '" & Replace(Request("today"), "'", "''") & "' ELSE CONVERT(NVARCHAR(MAX), remark15) END, "
|
||||
SQL = SQL & " remark23 = CASE WHEN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ LIKE '%-r-%' THEN '20190301' ELSE CONVERT(NVARCHAR(MAX), remark23) END, "
|
||||
SQL = SQL & " remark26 = CASE WHEN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ LIKE '%-r-%' THEN '" & Replace(Request("today"), "'", "''") & "' ELSE CONVERT(NVARCHAR(MAX), remark26) END "
|
||||
SQL = SQL & " SET remark5 = CASE WHEN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ NOT LIKE '%-r-%' THEN '20190301' ELSE remark5 END, "
|
||||
SQL = SQL & " remark15 = CASE WHEN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ NOT LIKE '%-r-%' THEN '" & Replace(Request("today"), "'", "''") & "' ELSE remark15 END, "
|
||||
SQL = SQL & " remark23 = CASE WHEN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ LIKE '%-r-%' THEN '20190301' ELSE remark23 END, "
|
||||
SQL = SQL & " remark26 = CASE WHEN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ LIKE '%-r-%' THEN '" & Replace(Request("today"), "'", "''") & "' ELSE remark26 END "
|
||||
SQL = SQL & " WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ IN ("& Replace(Replace(Replace(Request("checkedList"), """", "'"), "[", ""), "]", "") &") "
|
||||
|
||||
adoConn.Execute SQL
|
||||
End If
|
||||
If Request("uncheckedList") <> "[]" Then
|
||||
SQL = ""
|
||||
SQL = SQL & " SELECT <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ as d_no, CASE WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' THEN '' ELSE CONVERT(varchar, M.target10) END AS p_child_sn, CASE WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' THEN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE ISNULL(TPM.p_subject, '') END AS p_subject, CASE WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' THEN '-' ELSE target8 END AS client, "
|
||||
SQL = SQL & " CASE WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' THEN PARSENAME(REPLACE(CONVERT(NVARCHAR(MAX), target97), '^^', '.'), 1) ELSE ISNULL(ISNULL(DRE.depart_name, DFI.depart_name), CASE WHEN TPM.p_subject IS NULL THEN '' ELSE 'Ű<><C5B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' END) END AS depart_name, "
|
||||
SQL = SQL & " DC1.d_cost_name AS hangmok, DC2.d_cost_name AS sebu, CASE WHEN PARSENAME(REPLACE(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '-', '.'), 2) = 't' THEN ISNULL((SELECT SUM(CAST(REPLACE(SUBSTRING(v.value, CHARINDEX('^^', v.value) + 2, 4000), ',', '') AS money)) FROM STRING_SPLIT(REPLACE(CONVERT(NVARCHAR(MAX), M.target15), '^//^', CHAR(1)), CHAR(1)) v WHERE CHARINDEX('^^', v.value) > 0), 0) ELSE CAST(CONVERT(NVARCHAR(MAX), target5) AS money) END AS cost, ISNULL(CONVERT(varchar, remark5), '') AS chk "
|
||||
SQL = SQL & " SELECT <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ as d_no, CONVERT(varchar, M.target10) AS p_child_sn, ISNULL(TPM.p_subject, '') AS p_subject, target8 AS client, "
|
||||
SQL = SQL & " ISNULL(ISNULL(DRE.depart_name, DFI.depart_name), CASE WHEN TPM.p_subject IS NULL THEN '' ELSE 'Ű<><C5B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' END) AS depart_name, "
|
||||
SQL = SQL & " DC1.d_cost_name AS hangmok, DC2.d_cost_name AS sebu, target5 AS cost, ISNULL(CONVERT(varchar, remark5), '') AS chk "
|
||||
SQL = SQL & " FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> M WITH(nolock) LEFT JOIN Document D WITH(nolock) ON M.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ = D.d_no "
|
||||
SQL = SQL & " LEFT JOIN T_PROJECT_METHOD TPM WITH(nolock) ON CONVERT(varchar, M.target10) = TPM.p_child_sn "
|
||||
SQL = SQL & " LEFT JOIN T_PROJECT_BASE TPB WITH(nolock) ON TPM.p_sn = TPB.p_sn LEFT JOIN "
|
||||
@@ -200,7 +196,7 @@ Select Case Request("command")
|
||||
SQL = SQL & " ) DFI ON CASE WHEN TPM.p_field_dept IN ('12', '9', '8') THEN '12' ELSE TPM.p_field_dept END = DFI.depart_code "
|
||||
SQL = SQL & " LEFT JOIN direct_costcode DC1 WITH(nolock) ON CONVERT(varchar, target11) = CONVERT(varchar, DC1.id) "
|
||||
SQL = SQL & " LEFT JOIN direct_costcode DC2 WITH(nolock) ON CONVERT(varchar, target12) = CONVERT(varchar, DC2.id) "
|
||||
SQL = SQL & " WHERE (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>') AND del_yes_no = 'no' AND remark1 LIKE '77' "
|
||||
SQL = SQL & " WHERE (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭') AND del_yes_no = 'no' AND remark1 LIKE '77' "
|
||||
SQL = SQL & " AND d_delok = 'N' AND D.d_order_cnt = 77 AND ISNULL(CONVERT(varchar, remark5), '') = '' "
|
||||
SQL = SQL & " AND <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ IN ("& Replace(Replace(Replace(Request("uncheckedList"), """", "'"), "[", ""), "]", "") &") "
|
||||
SQL = SQL & " ORDER BY M.id desc "
|
||||
@@ -231,8 +227,6 @@ Select Case Request("command")
|
||||
tmp_body = tmp_body & "<td style='text-align:center;"& contentsTdStyle &"'><a target='_blank' href='http://" & Request.ServerVariables("HTTP_HOST") & "/ess/doc_expense2_print_2014.asp?rev_type=3&d_no=" + Adors("d_no") + "&title_type=<3D><><EFBFBD><EFBFBD>'>"& Adors("d_no") &"</a></td>"
|
||||
ElseIf Mid(Adors("d_no"), 10, 1) = "r" Then
|
||||
tmp_body = tmp_body & "<td style='text-align:center;"& contentsTdStyle &"'><a target='_blank' href='http://" & Request.ServerVariables("HTTP_HOST") & "/ess/doc_expense2_print.asp?rev_type=3&d_no=" + Adors("d_no") + "&view_chk=1&x=1&title_type=<3D>ڱ<EFBFBD>'>"& Adors("d_no") &"</a></td>"
|
||||
ElseIf Mid(Adors("d_no"), 10, 1) = "t" Then
|
||||
tmp_body = tmp_body & "<td style='text-align:center;"& contentsTdStyle &"'><a target='_blank' href='http://" & Request.ServerVariables("HTTP_HOST") & "/ess/doc_myun_pay_print.asp?rev_type=3&d_no=" + Adors("d_no") + "&view_chk=1&x=1'>"& Adors("d_no") &"</a></td>"
|
||||
Else
|
||||
tmp_body = tmp_body & "<td style='text-align:center;"& contentsTdStyle &"'><a target='_blank' href='http://" & Request.ServerVariables("HTTP_HOST") & "/ess/doc_expense_print_2014.asp?rev_type=3&d_no=" + Adors("d_no") + "&title_type=<3D><><EFBFBD><EFBFBD>'>"& Adors("d_no") &"</a></td>"
|
||||
End If
|
||||
|
||||
@@ -349,18 +349,18 @@
|
||||
end if%>
|
||||
|
||||
<tr>
|
||||
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28>ҼӺμ<D3BA>)</td>
|
||||
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<2F><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>)</td>
|
||||
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD></td>
|
||||
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
||||
</tr>
|
||||
<%
|
||||
|
||||
@@ -118,6 +118,61 @@
|
||||
to {color:#000;}
|
||||
*/
|
||||
}
|
||||
.attach_file_preview{
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
width:100%;
|
||||
overflow:hidden;
|
||||
padding:10px;
|
||||
box-sizing:border-box;
|
||||
text-align:center;
|
||||
}
|
||||
.attach_file_ext{
|
||||
font-weight:bold;
|
||||
color:#666;
|
||||
font-size:14px;
|
||||
}
|
||||
.attach_file_name{
|
||||
display:block;
|
||||
max-width:100%;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
font-size:11px;
|
||||
color:#333;
|
||||
}
|
||||
.attach_upload_loading{
|
||||
display:none;
|
||||
position:fixed;
|
||||
top:0;left:0;right:0;bottom:0;
|
||||
background:rgba(255,255,255,0.7);
|
||||
z-index:10000;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
}
|
||||
.attach_upload_loading.active{
|
||||
display:flex;
|
||||
}
|
||||
.attach_upload_spinner{
|
||||
width:50px;
|
||||
height:50px;
|
||||
border:5px solid #ccc;
|
||||
border-top:5px solid #333;
|
||||
border-radius:50%;
|
||||
animation:attach_spin 1s linear infinite;
|
||||
}
|
||||
@keyframes attach_spin{
|
||||
0%{ transform:rotate(0deg); }
|
||||
100%{ transform:rotate(360deg); }
|
||||
}
|
||||
.attach_upload_text{
|
||||
margin-top:10px;
|
||||
font-size:14px;
|
||||
color:#333;
|
||||
}
|
||||
</style>
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
@@ -237,7 +292,7 @@
|
||||
<td width="15%" align="center" class="align-middle"><3E><><EFBFBD><EFBFBD>÷<EFBFBD><C3B7></td>
|
||||
<td colspan="3">
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="addDocAttach();"><3E>߰<EFBFBD></button>
|
||||
<input type="file" accept="image/*,application/pdf" id="doc_attach" class="d-none"/>
|
||||
<input type="file" accept="image/*,.zip,.pdf,.hwp,.doc,.docx,.xls,.xlsx,.ppt,.pptx" id="doc_attach" multiple="multiple" class="d-none"/>
|
||||
<input type="file" name="doc_attach" multiple="multiple" class="d-none" />
|
||||
</td>
|
||||
</tr>
|
||||
@@ -343,6 +398,10 @@
|
||||
</tr>
|
||||
</table>
|
||||
<canvas id="pdf-canvas" width="400" class="d-none"></canvas>
|
||||
<div class="attach_upload_loading" id="attachUploadLoading">
|
||||
<div class="attach_upload_spinner"></div>
|
||||
<div class="attach_upload_text">업로드 중입니다...</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -377,13 +436,9 @@
|
||||
|
||||
$("#doc_attach").on("change", function(e){
|
||||
if(e.target.files.length > 0){
|
||||
if(e.target.files[0].type == "application/pdf"){
|
||||
pdfToImg(e.target.files[0]);
|
||||
}else{
|
||||
fileArray.push(e.target.files[0]);
|
||||
}
|
||||
$("#attachUploadLoading").addClass("active");
|
||||
processDocAttachFiles(e.target.files, 0);
|
||||
}
|
||||
imgPreviewSetting(fileArray);
|
||||
});
|
||||
|
||||
$(document).on("click", ".imgPreviewItem", function(){
|
||||
@@ -436,37 +491,63 @@
|
||||
$("#doc_attach").click();
|
||||
}
|
||||
|
||||
function processDocAttachFiles(files, idx){
|
||||
if(idx >= files.length){
|
||||
imgPreviewSetting(fileArray);
|
||||
$("#attachUploadLoading").removeClass("active");
|
||||
return;
|
||||
}
|
||||
if(files[idx].type == "application/pdf"){
|
||||
pdfToImg(files[idx], function(){
|
||||
processDocAttachFiles(files, idx + 1);
|
||||
});
|
||||
}else{
|
||||
fileArray.push(files[idx]);
|
||||
processDocAttachFiles(files, idx + 1);
|
||||
}
|
||||
}
|
||||
|
||||
function imgPreviewSetting(files){
|
||||
if(files.length > 0){
|
||||
var tmpHTML = "";
|
||||
tmpHTML = "<div id='imgPreviewDiv' class='d-flex'></div>";
|
||||
$("#imgPreviews").children("td").html(tmpHTML);
|
||||
$.each(files, function(i, f){
|
||||
$("#imgPreviewDiv").append(
|
||||
"<div class='d-flex p-1 m-1 imgPreviewItem' data-idx='" + i + "'>"+
|
||||
"<img src='' alt='÷<><C3B7>' class='' id='preview_" + (i+1) + "' />"+
|
||||
"</div>"
|
||||
);
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(e){
|
||||
$("#preview_" + (i+1)).attr("src", e.target.result);
|
||||
$("#preview_" + (i+1)).parent().popover({
|
||||
html: true,
|
||||
trigger: 'hover',
|
||||
container: 'body',
|
||||
placement: 'right',
|
||||
content: function () { return '<img class="imgView" src="' + e.target.result + '" />'; }
|
||||
});
|
||||
var $item = $("<div>", {
|
||||
"class": "d-flex p-1 m-1 imgPreviewItem",
|
||||
"data-idx": i
|
||||
});
|
||||
$("#imgPreviewDiv").append($item);
|
||||
if(f.type.indexOf("image/") == 0){
|
||||
var previewId = "preview_" + (i + 1);
|
||||
$item.append($("<img>", { src: "", alt: "attach", id: previewId }));
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(e){
|
||||
$("#" + previewId).attr("src", e.target.result);
|
||||
$("#" + previewId).parent().popover({
|
||||
html: true,
|
||||
trigger: "hover",
|
||||
container: "body",
|
||||
placement: "right",
|
||||
content: function () { return "<img class='imgView' src='" + e.target.result + "' />"; }
|
||||
});
|
||||
}
|
||||
reader.readAsDataURL(f);
|
||||
}else{
|
||||
var dotIdx = f.name.lastIndexOf(".");
|
||||
var fileExt = dotIdx > -1 ? f.name.substring(dotIdx + 1).toUpperCase() : "FILE";
|
||||
var $filePreview = $("<div>", { "class": "attach_file_preview" });
|
||||
$filePreview.append($("<span>", { "class": "attach_file_ext" }).text(fileExt));
|
||||
$filePreview.append($("<span>", { "class": "attach_file_name" }).text(f.name));
|
||||
$item.append($filePreview);
|
||||
}
|
||||
reader.readAsDataURL(f);
|
||||
});
|
||||
|
||||
$("#imgPreviews").show();
|
||||
}else{
|
||||
$("#imgPreviews").hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function btn_del(index){
|
||||
//var cnt = parseInt(document.frm_money.contents_cnt.value, 10);
|
||||
$("#addRow_Top_"+index).remove();
|
||||
@@ -829,7 +910,6 @@
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD> <20>Է<EFBFBD><D4B7>ϼ<EFBFBD><CFBC><EFBFBD>!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (p_sn == "") {
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20>Է<EFBFBD> <20>Ͻʽÿ<CABD>!");
|
||||
return false;
|
||||
@@ -937,14 +1017,15 @@
|
||||
$("#hangmok").append(ajaxResponse);
|
||||
}
|
||||
|
||||
function pdfToImg(file){
|
||||
function pdfToImg(file, callback){
|
||||
var pdf_url = URL.createObjectURL(file);
|
||||
var pdfTask = PDFJS.getDocument({ url: pdf_url });
|
||||
pdfTask.onPassword = passwordCB;
|
||||
pdfTask.promise.then(function(pdf_doc) {
|
||||
pdfGetPage(pdf_doc, 1, pdf_doc.numPages);
|
||||
pdfGetPage(pdf_doc, 1, pdf_doc.numPages, callback);
|
||||
}).catch(function(error) {
|
||||
alert(error.message);
|
||||
if(callback){ callback(); }
|
||||
});
|
||||
}
|
||||
|
||||
@@ -957,7 +1038,7 @@
|
||||
passwordFunc(new_password);
|
||||
}
|
||||
|
||||
function pdfGetPage(pdf_doc, currentPage, pdfMaxPage){
|
||||
function pdfGetPage(pdf_doc, currentPage, pdfMaxPage, callback){
|
||||
pdf_doc.getPage(currentPage).then(function(page){
|
||||
var scale = 1.5;
|
||||
var viewport = page.getViewport(scale);
|
||||
@@ -981,9 +1062,9 @@
|
||||
var file = new File([new Uint8Array(array)], "tmpfile.jpg", {type: 'image/jpeg'});
|
||||
fileArray.push(file);
|
||||
if(pdfMaxPage > currentPage){
|
||||
pdfGetPage(pdf_doc, currentPage + 1, pdfMaxPage);
|
||||
pdfGetPage(pdf_doc, currentPage + 1, pdfMaxPage, callback);
|
||||
}else{
|
||||
imgPreviewSetting(fileArray);
|
||||
if(callback){ callback(); }
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -367,18 +367,18 @@
|
||||
end if%>
|
||||
|
||||
<tr>
|
||||
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28>ҼӺμ<D3BA>)</td>
|
||||
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<2F><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>)</td>
|
||||
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD></td>
|
||||
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
||||
</tr>
|
||||
<%
|
||||
|
||||
@@ -686,18 +686,18 @@
|
||||
end if%>
|
||||
|
||||
<tr>
|
||||
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28>ҼӺμ<D3BA>)</td>
|
||||
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<2F><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>)</td>
|
||||
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD></td>
|
||||
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
||||
</tr>
|
||||
<%
|
||||
|
||||
@@ -183,6 +183,61 @@
|
||||
to {color:#000;}
|
||||
*/
|
||||
}
|
||||
.attach_file_preview{
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
width:100%;
|
||||
overflow:hidden;
|
||||
padding:10px;
|
||||
box-sizing:border-box;
|
||||
text-align:center;
|
||||
}
|
||||
.attach_file_ext{
|
||||
font-weight:bold;
|
||||
color:#666;
|
||||
font-size:14px;
|
||||
}
|
||||
.attach_file_name{
|
||||
display:block;
|
||||
max-width:100%;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
font-size:11px;
|
||||
color:#333;
|
||||
}
|
||||
.attach_upload_loading{
|
||||
display:none;
|
||||
position:fixed;
|
||||
top:0;left:0;right:0;bottom:0;
|
||||
background:rgba(255,255,255,0.7);
|
||||
z-index:10000;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
}
|
||||
.attach_upload_loading.active{
|
||||
display:flex;
|
||||
}
|
||||
.attach_upload_spinner{
|
||||
width:50px;
|
||||
height:50px;
|
||||
border:5px solid #ccc;
|
||||
border-top:5px solid #333;
|
||||
border-radius:50%;
|
||||
animation:attach_spin 1s linear infinite;
|
||||
}
|
||||
@keyframes attach_spin{
|
||||
0%{ transform:rotate(0deg); }
|
||||
100%{ transform:rotate(360deg); }
|
||||
}
|
||||
.attach_upload_text{
|
||||
margin-top:10px;
|
||||
font-size:14px;
|
||||
color:#333;
|
||||
}
|
||||
</style>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<!-- Content Header (Page header) -->
|
||||
@@ -331,7 +386,7 @@
|
||||
<td width="15%" align="center" class="align-middle"><3E><><EFBFBD><EFBFBD>÷<EFBFBD><C3B7></td>
|
||||
<td colspan="3">
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="addDocAttach();"><3E>߰<EFBFBD></button>
|
||||
<input type="file" accept="image/*,application/pdf" id="doc_attach" class="d-none"/>
|
||||
<input type="file" accept="image/*,.zip,.pdf,.hwp,.doc,.docx,.xls,.xlsx,.ppt,.pptx" id="doc_attach" multiple="multiple" class="d-none"/>
|
||||
<input type="file" name="doc_attach" multiple="multiple" class="d-none" />
|
||||
</td>
|
||||
</tr>
|
||||
@@ -424,6 +479,10 @@
|
||||
</div>
|
||||
</form>
|
||||
<canvas id="pdf-canvas" width="400" class="d-none"></canvas>
|
||||
<div class="attach_upload_loading" id="attachUploadLoading">
|
||||
<div class="attach_upload_spinner"></div>
|
||||
<div class="attach_upload_text">업로드 중입니다...</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -893,13 +952,9 @@
|
||||
|
||||
$("#doc_attach").on("change", function(e){
|
||||
if(e.target.files.length > 0){
|
||||
if(e.target.files[0].type == "application/pdf"){
|
||||
pdfToImg(e.target.files[0]);
|
||||
}else{
|
||||
fileArray.push(e.target.files[0]);
|
||||
}
|
||||
$("#attachUploadLoading").addClass("active");
|
||||
processDocAttachFiles(e.target.files, 0);
|
||||
}
|
||||
imgPreviewSetting(fileArray);
|
||||
});
|
||||
|
||||
$(document).on("click", ".imgPreviewItem", function(){
|
||||
@@ -972,8 +1027,6 @@
|
||||
if(retJson.length > 0){
|
||||
if($.grep(retJson, function(o, i){ return o.chk == "1"; }).length > 0){
|
||||
alert("<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>̹<EFBFBD> <20>ۼ<EFBFBD><DBBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ <20>Դϴ<D4B4>.\n<><6E><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD> <20><> <20>ۼ<EFBFBD><DBBC><EFBFBD><EFBFBD>ֽñ<D6BD> <20>ٶ<EFBFBD><D9B6>ϴ<EFBFBD>.");
|
||||
//$("#expence_num").val("");
|
||||
//return false;
|
||||
}
|
||||
var tmpHTML = "";
|
||||
$.each(retJson, function(i, o){
|
||||
@@ -993,45 +1046,72 @@
|
||||
$("#doc_attach").click();
|
||||
}
|
||||
|
||||
function processDocAttachFiles(files, idx){
|
||||
if(idx >= files.length){
|
||||
imgPreviewSetting(fileArray);
|
||||
$("#attachUploadLoading").removeClass("active");
|
||||
return;
|
||||
}
|
||||
if(files[idx].type == "application/pdf"){
|
||||
pdfToImg(files[idx], function(){
|
||||
processDocAttachFiles(files, idx + 1);
|
||||
});
|
||||
}else{
|
||||
fileArray.push(files[idx]);
|
||||
processDocAttachFiles(files, idx + 1);
|
||||
}
|
||||
}
|
||||
|
||||
function imgPreviewSetting(files){
|
||||
if(files.length > 0){
|
||||
var tmpHTML = "";
|
||||
tmpHTML = "<div id='imgPreviewDiv' class='d-flex'></div>";
|
||||
$("#imgPreviews").children("td").html(tmpHTML);
|
||||
$.each(files, function(i, f){
|
||||
$("#imgPreviewDiv").append(
|
||||
"<div class='d-flex p-1 m-1 imgPreviewItem' data-idx='" + i + "'>"+
|
||||
"<img src='' alt='÷<><C3B7>' class='' id='preview_" + (i+1) + "' />"+
|
||||
"</div>"
|
||||
);
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(e){
|
||||
$("#preview_" + (i+1)).attr("src", e.target.result);
|
||||
$("#preview_" + (i+1)).parent().popover({
|
||||
html: true,
|
||||
trigger: 'hover',
|
||||
container: 'body',
|
||||
placement: 'right',
|
||||
content: function () { return '<img class="imgView" src="' + e.target.result + '" />'; }
|
||||
});
|
||||
var $item = $("<div>", {
|
||||
"class": "d-flex p-1 m-1 imgPreviewItem",
|
||||
"data-idx": i
|
||||
});
|
||||
$("#imgPreviewDiv").append($item);
|
||||
if(f.type.indexOf("image/") == 0){
|
||||
var previewId = "preview_" + (i + 1);
|
||||
$item.append($("<img>", { src: "", alt: "attach", id: previewId }));
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(e){
|
||||
$("#" + previewId).attr("src", e.target.result);
|
||||
$("#" + previewId).parent().popover({
|
||||
html: true,
|
||||
trigger: "hover",
|
||||
container: "body",
|
||||
placement: "right",
|
||||
content: function () { return "<img class='imgView' src='" + e.target.result + "' />"; }
|
||||
});
|
||||
}
|
||||
reader.readAsDataURL(f);
|
||||
}else{
|
||||
var dotIdx = f.name.lastIndexOf(".");
|
||||
var fileExt = dotIdx > -1 ? f.name.substring(dotIdx + 1).toUpperCase() : "FILE";
|
||||
var $filePreview = $("<div>", { "class": "attach_file_preview" });
|
||||
$filePreview.append($("<span>", { "class": "attach_file_ext" }).text(fileExt));
|
||||
$filePreview.append($("<span>", { "class": "attach_file_name" }).text(f.name));
|
||||
$item.append($filePreview);
|
||||
}
|
||||
reader.readAsDataURL(f);
|
||||
});
|
||||
|
||||
$("#imgPreviews").show();
|
||||
}else{
|
||||
$("#imgPreviews").hide();
|
||||
}
|
||||
}
|
||||
|
||||
function pdfToImg(file){
|
||||
function pdfToImg(file, callback){
|
||||
var pdf_url = URL.createObjectURL(file);
|
||||
var pdfTask = PDFJS.getDocument({ url: pdf_url });
|
||||
pdfTask.onPassword = passwordCB;
|
||||
pdfTask.promise.then(function(pdf_doc) {
|
||||
pdfGetPage(pdf_doc, 1, pdf_doc.numPages);
|
||||
pdfGetPage(pdf_doc, 1, pdf_doc.numPages, callback);
|
||||
}).catch(function(error) {
|
||||
alert(error.message);
|
||||
if(callback){ callback(); }
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1044,7 +1124,7 @@
|
||||
passwordFunc(new_password);
|
||||
}
|
||||
|
||||
function pdfGetPage(pdf_doc, currentPage, pdfMaxPage){
|
||||
function pdfGetPage(pdf_doc, currentPage, pdfMaxPage, callback){
|
||||
pdf_doc.getPage(currentPage).then(function(page){
|
||||
var scale = 1.5;
|
||||
var viewport = page.getViewport(scale);
|
||||
@@ -1068,9 +1148,9 @@
|
||||
var file = new File([new Uint8Array(array)], "tmpfile.jpg", {type: 'image/jpeg'});
|
||||
fileArray.push(file);
|
||||
if(pdfMaxPage > currentPage){
|
||||
pdfGetPage(pdf_doc, currentPage + 1, pdfMaxPage);
|
||||
pdfGetPage(pdf_doc, currentPage + 1, pdfMaxPage, callback);
|
||||
}else{
|
||||
imgPreviewSetting(fileArray);
|
||||
if(callback){ callback(); }
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -550,18 +550,18 @@
|
||||
end if%>
|
||||
|
||||
<tr>
|
||||
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28>ҼӺμ<D3BA>)</td>
|
||||
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<2F><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>)</td>
|
||||
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD></td>
|
||||
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
||||
</tr>
|
||||
<%
|
||||
|
||||
@@ -362,9 +362,9 @@
|
||||
var tmpHTML = "";
|
||||
$.each(tmpJsonList, function(idx, obj){
|
||||
tmpHTML += '<tr class="cus_tooltip" id="tr_'+ obj.d_no +'" data-contents="'+ obj.contents +'" data-overcomment="'+ obj.over_comment +'">';
|
||||
tmpHTML += ' <td class="text-center"><a href="javascript:openit(\''+ obj.d_no.substr(9, 1) +'\',\''+ obj.d_no +'\', \''+ obj.p_subject +'\')">'+ obj.d_no +'</a></td>';
|
||||
tmpHTML += ' <td class="text-center"><a href="javascript:openit(\''+ obj.d_no.substr(9, 1) +'\',\''+ obj.d_no +'\')">'+ obj.d_no +'</a></td>';
|
||||
//tmpHTML += ' <td class="text-left">'+ (obj.p_child_sn == "" ? "Multi" : "["+ obj.p_child_sn +"] "+ obj.p_subject) +'</td>';
|
||||
tmpHTML += ' <td class="text-left">' + (obj.p_child_sn == "" ? obj.p_subject : "[" + obj.p_child_sn + "] " + obj.p_subject) + '</td>';
|
||||
tmpHTML += ' <td class="text-left">' + (obj.p_child_sn == "" ? (obj.p_subject == "<22>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭" ? "<22>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>༭" : "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>") : "[" + obj.p_child_sn + "] " + obj.p_subject) + '</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ obj.client +'</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ obj.depart_name +'</td>';
|
||||
tmpHTML += ' <td class="text-center">'+ obj.hangmok +'-'+ obj.sebu +'</td>';
|
||||
@@ -432,7 +432,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
function openit(z, x, subject){
|
||||
function openit(z, x){
|
||||
var tmp_height = 960;
|
||||
var tmp_width = 850;
|
||||
if (z == 'i'){
|
||||
@@ -444,12 +444,6 @@
|
||||
}else if (z == 'r'){
|
||||
var title_type = "<22>ڱ<EFBFBD>";
|
||||
var url = '/ess/doc_expense2_print.asp?rev_type=3&d_no=' + x + '&view_chk=1&x=1&title_type=' + title_type;
|
||||
}else if (z == 't'){
|
||||
if(subject == "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>"){
|
||||
var url = '/ess/doc_myun_pay_print2.asp?rev_type=3&d_no=' + x + '&view_chk=1&x=1';
|
||||
}else{
|
||||
var url = '/ess/doc_myun_pay_print.asp?rev_type=3&d_no=' + x + '&view_chk=1&x=1';
|
||||
}
|
||||
}
|
||||
window.open(url, '', 'left=0,top=0,width=' + tmp_width + ',height=' + tmp_height + ',scrollbars=yes,resizable=yes')
|
||||
}
|
||||
|
||||
@@ -243,12 +243,12 @@
|
||||
adoconn.execute query
|
||||
|
||||
query = "insert into <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, target1, target2, target3, target4, target5, "
|
||||
query = query & " target6, target7, target8, target9, target10, target11, target12, target13, target14, target15, target16, target17, target20, target21, target97,target98,target99,target100,p_sn, <20>߱<EFBFBD><DFB1><EFBFBD>, <20>߱ð<DEBD>, login_p_no, login_<6E≯<EFBFBD>,login_ip, remark1) values ( "
|
||||
query = query & " target6, target7, target8, target9, target10, target11, target12, target13, target14, target15, target16, target17, target20, target21, target97,target98,target99,target100,p_sn, <20>߱<EFBFBD><DFB1><EFBFBD>, <20>߱ð<DEBD>, login_p_no, login_<6E≯<EFBFBD>,login_ip) values ( "
|
||||
query = query & "'" & krc_no & "', "
|
||||
query = query & "'" & replace(title, " ", "") & "', "
|
||||
query = query & "'" & gap(1) & "', "
|
||||
query = query & "'" & CheckWord(gap(2)) & "', "
|
||||
query = query & "'" & year(date) & "-" & zeroformat(month(date),2) & "-" & zeroformat(day(date),2) & "', "
|
||||
query = query & "'" & gap(3) & "', "
|
||||
query = query & "'" & gap(4) & "', "
|
||||
query = query & "'" & gap(5) & "', "
|
||||
query = query & "'" & gap(6) & "', "
|
||||
@@ -277,7 +277,7 @@
|
||||
query = query & "'" & time() & "', "
|
||||
query = query & "'" & user_name(0) & "', "
|
||||
query = query & "'" & user_name(1) & "', "
|
||||
query = query & "'" & Session("USERIP") & "', '3') "
|
||||
query = query & "'" & Session("USERIP") & "') "
|
||||
|
||||
adoconn.execute query
|
||||
|
||||
@@ -683,18 +683,18 @@
|
||||
end if%>
|
||||
|
||||
<tr>
|
||||
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28>ҼӺμ<D3BA>)</td>
|
||||
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<2F><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>)</td>
|
||||
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD></td>
|
||||
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
||||
</tr>
|
||||
<%
|
||||
|
||||
@@ -277,12 +277,12 @@
|
||||
'request("aa")
|
||||
|
||||
query = "insert into <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, target1, target2, target3, target4, target5, "
|
||||
query = query & " target6, target7, target8, target9, target10, target11, target12, target13, target14, target15, target16, target17, target20, target21, target97,target98,target99,target100,p_sn, <20>߱<EFBFBD><DFB1><EFBFBD>, <20>߱ð<DEBD>, login_p_no, login_<6E≯<EFBFBD>,login_ip) values ( "
|
||||
query = query & " target6, target7, target8, target9, target10, target11, target12, target13, target14, target15, target16, target17, target20, target21, target97,target98,target99,target100,p_sn, <20>߱<EFBFBD><DFB1><EFBFBD>, <20>߱ð<DEBD>, login_p_no, login_<6E≯<EFBFBD>,login_ip, remark1) values ( "
|
||||
query = query & "'" & krc_no & "', "
|
||||
query = query & "'" & replace(title, " ", "") & "', "
|
||||
query = query & "'" & gap(1) & "', "
|
||||
query = query & "'" & CheckWord(gap(2)) & "', "
|
||||
query = query & "'" & gap(3) & "', "
|
||||
query = query & "'" & year(date) & "-" & zeroformat(month(date),2) & "-" & zeroformat(day(date),2) & "', "
|
||||
query = query & "'" & gap(4) & "', "
|
||||
query = query & "'" & gap(5) & "', "
|
||||
query = query & "'" & gap(6) & "', "
|
||||
@@ -312,7 +312,7 @@
|
||||
query = query & "'" & time() & "', "
|
||||
query = query & "'" & user_name(0) & "', "
|
||||
query = query & "'" & user_name(1) & "', "
|
||||
query = query & "'" & Session("USERIP") & "') "
|
||||
query = query & "'" & Session("USERIP") & "', '3') "
|
||||
'Response.Write query & "<br>"
|
||||
adoconn.execute query
|
||||
|
||||
|
||||
@@ -158,6 +158,11 @@ title(29, 2) = "
|
||||
tmp_view = "0"
|
||||
end if
|
||||
|
||||
'<27><><EFBFBD><EFBFBD> <20>ߴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>: <20>ް<EFBFBD><DEB0><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD>ٺ<EFBFBD><D9BA><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD>ޱ<EFBFBD>-<2D><EFBFBD><EEBFB5><EFBFBD>ο<EFBFBD>
|
||||
if i = 1 Or i = 5 Or i = 12 Or i = 23 then
|
||||
tmp_view = "0"
|
||||
end if
|
||||
|
||||
If Left(title(i, 1), 3) <> "DEL" Then
|
||||
if month(now()) < 10 then
|
||||
temp_approval_activity_date = "0" & month(now())
|
||||
|
||||
94
ess/doc_attach_add.asp
Normal file
94
ess/doc_attach_add.asp
Normal file
@@ -0,0 +1,94 @@
|
||||
<!-- #include virtual = "lib/config.asp" -->
|
||||
<%
|
||||
Response.CharSet = "euc-kr"
|
||||
Response.AddHeader "Pragma","no-cache"
|
||||
Response.Expires = -1
|
||||
|
||||
Dim attachClientIp
|
||||
attachClientIp = Replace(Replace(Trim(Request.ServerVariables("REMOTE_ADDR")), "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.")
|
||||
|
||||
If attachClientIp <> "10.10.13.47" And _
|
||||
attachClientIp <> "10.10.13.105" And _
|
||||
attachClientIp <> "10.10.13.48" And _
|
||||
attachClientIp <> "10.10.13.6" And _
|
||||
attachClientIp <> "10.10.13.29" And _
|
||||
attachClientIp <> "10.10.13.186" Then
|
||||
Response.Write "{""result"":""denied""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
Dim uploadform, fso, krc_no, folderPath, i, foundSlot, targetPath, fileName, ext
|
||||
Dim allowedExt, folderObj, oneFile, us, dt, idxPart
|
||||
Dim usedSlot(20)
|
||||
|
||||
' PDFs are rasterized into jpg on the client (pdf.js) before upload, same as the
|
||||
' registration page, so the server only ever needs to save the file as-is.
|
||||
allowedExt = "|jpg|jpeg|png|gif|zip|pdf|hwp|doc|docx|xls|xlsx|ppt|pptx|"
|
||||
|
||||
Set uploadform = Server.CreateObject("DEXT.FileUpload")
|
||||
uploadform.Codepage = 949
|
||||
|
||||
krc_no = uploadform("krc_no")
|
||||
|
||||
If krc_no = "" Or InStr(krc_no, "..") > 0 Or InStr(krc_no, "/") > 0 Or InStr(krc_no, "\") > 0 Then
|
||||
Response.Write "{""result"":""fail""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
fileName = Trim(uploadform("attach_file")(1).FileName)
|
||||
|
||||
If fileName = "" Then
|
||||
Response.Write "{""result"":""fail""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
ext = LCase(Trim(Mid(fileName, InStrRev(fileName, ".") + 1)))
|
||||
|
||||
If InStr(allowedExt, "|" & ext & "|") = 0 Then
|
||||
Response.Write "{""result"":""badtype""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
Set fso = Server.CreateObject("Scripting.FileSystemObject")
|
||||
folderPath = Server.Mappath("/") & "/Upload/DOC_ATTACH/" & krc_no
|
||||
|
||||
If fso.FolderExists(folderPath) = False Then
|
||||
fso.CreateFolder folderPath
|
||||
End If
|
||||
|
||||
' find used index slots regardless of extension
|
||||
Set folderObj = fso.GetFolder(folderPath)
|
||||
For Each oneFile In folderObj.Files
|
||||
us = InStrRev(oneFile.Name, "_")
|
||||
dt = InStrRev(oneFile.Name, ".")
|
||||
If us > 0 And dt > us Then
|
||||
idxPart = Mid(oneFile.Name, us + 1, dt - us - 1)
|
||||
If IsNumeric(idxPart) Then
|
||||
If CInt(idxPart) >= 1 And CInt(idxPart) <= 20 Then
|
||||
usedSlot(CInt(idxPart)) = 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
foundSlot = 0
|
||||
For i = 1 To 20
|
||||
If usedSlot(i) <> 1 Then
|
||||
foundSlot = i
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If foundSlot = 0 Then
|
||||
Response.Write "{""result"":""full""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
targetPath = folderPath & "/" & krc_no & "_" & CStr(foundSlot) & "." & ext
|
||||
uploadform("attach_file")(1).saveAs(targetPath)
|
||||
|
||||
Response.Write "{""result"":""ok""}"
|
||||
|
||||
Set fso = Nothing
|
||||
Set uploadform = Nothing
|
||||
%>
|
||||
84
ess/doc_attach_del.asp
Normal file
84
ess/doc_attach_del.asp
Normal file
@@ -0,0 +1,84 @@
|
||||
<!-- #include virtual = "lib/config.asp" -->
|
||||
<%
|
||||
Response.CharSet = "euc-kr"
|
||||
Response.AddHeader "Pragma","no-cache"
|
||||
Response.Expires = -1
|
||||
|
||||
Dim attachClientIp
|
||||
attachClientIp = Replace(Replace(Trim(Request.ServerVariables("REMOTE_ADDR")), "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.")
|
||||
|
||||
If attachClientIp <> "10.10.13.47" And _
|
||||
attachClientIp <> "10.10.13.105" And _
|
||||
attachClientIp <> "10.10.13.48" And _
|
||||
attachClientIp <> "10.10.13.6" And _
|
||||
attachClientIp <> "10.10.13.29" And _
|
||||
attachClientIp <> "10.10.13.186" Then
|
||||
Response.Write "{""result"":""denied""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
Dim fso, krc_no, delIdx, folderPath, i, writePos
|
||||
Dim folderObj, oneFile, us, dt, idxPart, srcName, extPart
|
||||
Dim fileMap(20)
|
||||
|
||||
krc_no = Request.Form("krc_no")
|
||||
|
||||
If krc_no = "" Or InStr(krc_no, "..") > 0 Or InStr(krc_no, "/") > 0 Or InStr(krc_no, "\") > 0 Then
|
||||
Response.Write "{""result"":""fail""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
If Not IsNumeric(Request.Form("idx")) Then
|
||||
Response.Write "{""result"":""fail""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
delIdx = CInt(Request.Form("idx"))
|
||||
|
||||
If delIdx < 1 Or delIdx > 20 Then
|
||||
Response.Write "{""result"":""fail""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
Set fso = Server.CreateObject("Scripting.FileSystemObject")
|
||||
folderPath = Server.Mappath("/") & "/Upload/DOC_ATTACH/" & krc_no
|
||||
|
||||
If fso.FolderExists(folderPath) = False Then
|
||||
Response.Write "{""result"":""ok""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
Set folderObj = fso.GetFolder(folderPath)
|
||||
For Each oneFile In folderObj.Files
|
||||
us = InStrRev(oneFile.Name, "_")
|
||||
dt = InStrRev(oneFile.Name, ".")
|
||||
If us > 0 And dt > us Then
|
||||
idxPart = Mid(oneFile.Name, us + 1, dt - us - 1)
|
||||
If IsNumeric(idxPart) Then
|
||||
If CInt(idxPart) >= 1 And CInt(idxPart) <= 20 Then
|
||||
fileMap(CInt(idxPart)) = oneFile.Name
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If fileMap(delIdx) <> "" Then
|
||||
fso.DeleteFile folderPath & "/" & fileMap(delIdx)
|
||||
fileMap(delIdx) = ""
|
||||
End If
|
||||
|
||||
' close the numbering gap, preserving each remaining file's own extension
|
||||
writePos = delIdx
|
||||
For i = delIdx + 1 To 20
|
||||
If fileMap(i) <> "" Then
|
||||
srcName = fileMap(i)
|
||||
extPart = Mid(srcName, InStrRev(srcName, "."))
|
||||
fso.MoveFile folderPath & "/" & srcName, folderPath & "/" & krc_no & "_" & CStr(writePos) & extPart
|
||||
writePos = writePos + 1
|
||||
End If
|
||||
Next
|
||||
|
||||
Response.Write "{""result"":""ok""}"
|
||||
|
||||
Set fso = Nothing
|
||||
%>
|
||||
@@ -30,6 +30,9 @@
|
||||
'--------------- <20>߰<EFBFBD>(20170306)<29><> ------------------------
|
||||
|
||||
dim xadmin : xadmin = request("xadmin") '-- <20><><EFBFBD><EFBFBD>(edit)
|
||||
dim attachClientIp, attachEditAllowed
|
||||
attachClientIp = Replace(Replace(Trim(Request.ServerVariables("REMOTE_ADDR")), "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.")
|
||||
attachEditAllowed = (attachClientIp = "10.10.13.47" Or attachClientIp = "10.10.13.105" Or attachClientIp = "10.10.13.48" Or attachClientIp = "10.10.13.6" Or attachClientIp = "10.10.13.29" Or attachClientIp = "10.10.13.186")
|
||||
'response.write "[" & xadmin & "]"
|
||||
|
||||
dim pay_type(4)
|
||||
@@ -322,6 +325,145 @@ if rsc.RecordCount > 0 then
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
.attach_modal_overlay{
|
||||
display:none;
|
||||
position:fixed;
|
||||
top:0;left:0;right:0;bottom:0;
|
||||
background:rgba(0,0,0,0.8);
|
||||
z-index:9999;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
}
|
||||
.attach_modal_overlay.active{
|
||||
display:flex;
|
||||
}
|
||||
.attach_modal_img{
|
||||
max-width:85%;
|
||||
max-height:85%;
|
||||
}
|
||||
.attach_modal_nav{
|
||||
position:absolute;
|
||||
top:50%;
|
||||
transform:translateY(-50%);
|
||||
font-size:40px;
|
||||
color:#fff;
|
||||
cursor:pointer;
|
||||
user-select:none;
|
||||
padding:10px 20px;
|
||||
}
|
||||
.attach_modal_prev{ left:20px; }
|
||||
.attach_modal_next{ right:20px; }
|
||||
.attach_modal_close{
|
||||
position:absolute;
|
||||
top:20px;
|
||||
right:30px;
|
||||
font-size:30px;
|
||||
color:#fff;
|
||||
cursor:pointer;
|
||||
}
|
||||
.attach_modal_count{
|
||||
position:absolute;
|
||||
bottom:20px;
|
||||
left:50%;
|
||||
transform:translateX(-50%);
|
||||
color:#fff;
|
||||
font-size:14px;
|
||||
}
|
||||
.attach_preview{ position:relative; }
|
||||
.attach_add_btn{
|
||||
display:flex;
|
||||
width:15%;
|
||||
height:70px;
|
||||
border:1px dashed #ccc;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
cursor:pointer;
|
||||
margin:4px;
|
||||
color:#888;
|
||||
font-size:13px;
|
||||
}
|
||||
.attach_del_btn{
|
||||
position:absolute;
|
||||
top:-6px;
|
||||
right:-6px;
|
||||
width:18px;
|
||||
height:18px;
|
||||
line-height:16px;
|
||||
text-align:center;
|
||||
background:#e74c3c;
|
||||
color:#fff;
|
||||
border-radius:50%;
|
||||
font-size:13px;
|
||||
cursor:pointer;
|
||||
z-index:2;
|
||||
}
|
||||
.attach_file_box{
|
||||
position:relative;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
width:15%;
|
||||
height:70px;
|
||||
border:1px solid #ccc;
|
||||
box-shadow: 1px 1px 2px 1px #b9b9b9;
|
||||
margin:4px;
|
||||
overflow:hidden;
|
||||
text-align:center;
|
||||
padding:4px;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
.attach_file_link{
|
||||
text-decoration:none;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
align-items:center;
|
||||
width:100%;
|
||||
}
|
||||
.attach_file_ext{
|
||||
font-weight:bold;
|
||||
color:#666;
|
||||
font-size:11px;
|
||||
}
|
||||
.attach_file_name{
|
||||
display:block;
|
||||
max-width:100%;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
font-size:10px;
|
||||
color:#333;
|
||||
}
|
||||
.attach_upload_loading{
|
||||
display:none;
|
||||
position:fixed;
|
||||
top:0;left:0;right:0;bottom:0;
|
||||
background:rgba(255,255,255,0.7);
|
||||
z-index:10000;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
}
|
||||
.attach_upload_loading.active{
|
||||
display:flex;
|
||||
}
|
||||
.attach_upload_spinner{
|
||||
width:50px;
|
||||
height:50px;
|
||||
border:5px solid #ccc;
|
||||
border-top:5px solid #333;
|
||||
border-radius:50%;
|
||||
animation:attach_spin 1s linear infinite;
|
||||
}
|
||||
@keyframes attach_spin{
|
||||
0%{ transform:rotate(0deg); }
|
||||
100%{ transform:rotate(360deg); }
|
||||
}
|
||||
.attach_upload_text{
|
||||
margin-top:10px;
|
||||
font-size:14px;
|
||||
color:#333;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
@@ -329,6 +471,8 @@ if rsc.RecordCount > 0 then
|
||||
<script src="/js/jquery.form.min.js"></script>
|
||||
<script src="/js/jquery-ui.min.js"></script>
|
||||
<script src="/js/common.js"></script>
|
||||
<script src="/js/pdf.js"></script>
|
||||
<script src="/js/pdf.worker.js"></script>
|
||||
<script language="javascript">
|
||||
|
||||
function win_close()
|
||||
@@ -741,7 +885,28 @@ if rsc.RecordCount > 0 then
|
||||
</tr>
|
||||
<%
|
||||
Set fso = Server.CreateObject("Scripting.FileSystemObject")
|
||||
If fso.FileExists(Server.Mappath("/") & "/Upload/DOC_ATTACH/" & krc_no & "/" & krc_no & "_1.jpg") = True Then
|
||||
Dim attachFolderPath, attachFolderObj, attachOneFile, attachUs, attachDt, attachIdxPart, attachExt
|
||||
Dim attachFileMap(20), attachIsImage(20)
|
||||
Dim imageExtList : imageExtList = "|jpg|jpeg|png|gif|"
|
||||
Dim attachCacheVersion : attachCacheVersion = CStr(CLng(Timer() * 1000))
|
||||
attachFolderPath = Server.Mappath("/") & "/Upload/DOC_ATTACH/" & krc_no
|
||||
If fso.FolderExists(attachFolderPath) Then
|
||||
Set attachFolderObj = fso.GetFolder(attachFolderPath)
|
||||
For Each attachOneFile In attachFolderObj.Files
|
||||
attachUs = InStrRev(attachOneFile.Name, "_")
|
||||
attachDt = InStrRev(attachOneFile.Name, ".")
|
||||
If attachUs > 0 And attachDt > attachUs Then
|
||||
attachIdxPart = Mid(attachOneFile.Name, attachUs + 1, attachDt - attachUs - 1)
|
||||
If IsNumeric(attachIdxPart) Then
|
||||
If CInt(attachIdxPart) >= 1 And CInt(attachIdxPart) <= 20 Then
|
||||
attachFileMap(CInt(attachIdxPart)) = attachOneFile.Name
|
||||
attachExt = LCase(Mid(attachOneFile.Name, attachDt + 1))
|
||||
If InStr(imageExtList, "|" & attachExt & "|") > 0 Then attachIsImage(CInt(attachIdxPart)) = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
%>
|
||||
<tr>
|
||||
<td class="tit2" align="center"><3E><><EFBFBD><EFBFBD>÷<EFBFBD><C3B7></td>
|
||||
@@ -749,19 +914,40 @@ if rsc.RecordCount > 0 then
|
||||
<div class="attach_div">
|
||||
<%
|
||||
For i=1 To 20
|
||||
if fso.FileExists(Server.Mappath("/") & "/Upload/DOC_ATTACH/" & krc_no & "/" & krc_no & "_" & cstr(i) & ".jpg") = True then
|
||||
%>
|
||||
<div class="attach_preview">
|
||||
<img src="<%="/Upload/DOC_ATTACH/" & krc_no & "/" & krc_no & "_" & cstr(i) & ".jpg"%>" />
|
||||
</div>
|
||||
<%
|
||||
End If
|
||||
If attachFileMap(i) <> "" Then
|
||||
If attachIsImage(i) Then
|
||||
%>
|
||||
<div class="attach_preview">
|
||||
<img src="<%="/Upload/DOC_ATTACH/" & krc_no & "/" & attachFileMap(i) & "?v=" & attachCacheVersion%>" />
|
||||
<% If xadmin = "edit" And attachEditAllowed Then %>
|
||||
<span class="attach_del_btn" data-idx="<%=i%>">×</span>
|
||||
<% End If %>
|
||||
</div>
|
||||
<%
|
||||
Else
|
||||
%>
|
||||
<div class="attach_file_box">
|
||||
<a href="<%="/Upload/DOC_ATTACH/" & krc_no & "/" & attachFileMap(i) & "?v=" & attachCacheVersion%>" target="_blank" class="attach_file_link">
|
||||
<span class="attach_file_ext"><%=Ucase(Mid(attachFileMap(i), InStrRev(attachFileMap(i),".")+1))%></span>
|
||||
<span class="attach_file_name"><%=attachFileMap(i)%></span>
|
||||
</a>
|
||||
<% If xadmin = "edit" And attachEditAllowed Then %>
|
||||
<span class="attach_del_btn" data-idx="<%=i%>">×</span>
|
||||
<% End If %>
|
||||
</div>
|
||||
<%
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
%>
|
||||
<% If xadmin = "edit" And attachEditAllowed Then %>
|
||||
<div class="attach_add_btn" id="attachAddBtn">+ <20>߰<EFBFBD></div>
|
||||
<input type="file" id="attachFileInput" accept="image/*,.zip,.pdf,.hwp,.doc,.docx,.xls,.xlsx,.ppt,.pptx" multiple style="display:none;" />
|
||||
<% End If %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% End If
|
||||
<%
|
||||
Set fso = Nothing
|
||||
%>
|
||||
</table>
|
||||
@@ -979,6 +1165,17 @@ if rsc.RecordCount > 0 then
|
||||
%>
|
||||
<% End If %>
|
||||
</form>
|
||||
<div class="attach_modal_overlay" id="attachModalOverlay">
|
||||
<span class="attach_modal_close" id="attachModalClose">×</span>
|
||||
<span class="attach_modal_nav attach_modal_prev" id="attachModalPrev">‹</span>
|
||||
<img class="attach_modal_img" id="attachModalImg" src="" />
|
||||
<span class="attach_modal_nav attach_modal_next" id="attachModalNext">›</span>
|
||||
<div class="attach_modal_count" id="attachModalCount"></div>
|
||||
</div>
|
||||
<div class="attach_upload_loading" id="attachUploadLoading">
|
||||
<div class="attach_upload_spinner"></div>
|
||||
<div class="attach_upload_text"><3E><><EFBFBD>ε<EFBFBD> <20><><EFBFBD>Դϴ<D4B4>...</div>
|
||||
</div>
|
||||
<script>
|
||||
var ntsUrl = "";
|
||||
$(document).ready(function () {
|
||||
@@ -998,10 +1195,177 @@ if rsc.RecordCount > 0 then
|
||||
ajaxCallJson("../approval/doc_expense2_ajax_sebu_2014.asp", { hangmok: $("#hangmok option:selected").val(), d_cost_type: document.ess.d_cost_type.value, cost_type: "2"}, null, "post", "sebureturnFunc()");
|
||||
});
|
||||
|
||||
$(".attach_preview").on("click", function(){
|
||||
window.open($(this).children("img").attr("src"), "_blank", "popup=1");
|
||||
var attachImgs = [];
|
||||
var attachIdx = 0;
|
||||
|
||||
$(".attach_preview img").each(function(){
|
||||
attachImgs.push($(this).attr("src"));
|
||||
});
|
||||
|
||||
function showAttachModal(idx){
|
||||
if(attachImgs.length == 0){ return; }
|
||||
if(idx < 0){ idx = attachImgs.length - 1; }
|
||||
if(idx >= attachImgs.length){ idx = 0; }
|
||||
attachIdx = idx;
|
||||
$("#attachModalImg").attr("src", attachImgs[attachIdx]);
|
||||
$("#attachModalCount").text((attachIdx+1) + " / " + attachImgs.length);
|
||||
$("#attachModalOverlay").addClass("active");
|
||||
}
|
||||
|
||||
$(".attach_preview").on("click", function(e){
|
||||
if($(e.target).hasClass("attach_del_btn")){ return; }
|
||||
var idx = $(".attach_preview").index(this);
|
||||
showAttachModal(idx);
|
||||
});
|
||||
|
||||
$("#attachModalPrev").on("click", function(){ showAttachModal(attachIdx - 1); });
|
||||
$("#attachModalNext").on("click", function(){ showAttachModal(attachIdx + 1); });
|
||||
$("#attachModalClose").on("click", function(){ $("#attachModalOverlay").removeClass("active"); });
|
||||
$("#attachModalOverlay").on("click", function(e){
|
||||
if(e.target.id == "attachModalOverlay"){ $("#attachModalOverlay").removeClass("active"); }
|
||||
});
|
||||
$(document).on("keydown", function(e){
|
||||
if($("#attachModalOverlay").hasClass("active")){
|
||||
if(e.keyCode == 37){ showAttachModal(attachIdx - 1); }
|
||||
else if(e.keyCode == 39){ showAttachModal(attachIdx + 1); }
|
||||
else if(e.keyCode == 27){ $("#attachModalOverlay").removeClass("active"); }
|
||||
}
|
||||
})
|
||||
|
||||
$("#attachAddBtn").on("click", function(){
|
||||
$("#attachFileInput").val("").trigger("click");
|
||||
});
|
||||
|
||||
$("#attachFileInput").on("change", function(){
|
||||
var files = this.files;
|
||||
if(!files || files.length == 0){ return; }
|
||||
$("#attachUploadLoading").addClass("active");
|
||||
expandPdfFiles(files, 0, [], function(expandedFiles){
|
||||
uploadAttachFiles(expandedFiles, 0);
|
||||
});
|
||||
});
|
||||
|
||||
function expandPdfFiles(files, idx, result, done){
|
||||
if(idx >= files.length){
|
||||
done(result);
|
||||
return;
|
||||
}
|
||||
var f = files[idx];
|
||||
if(f.type == "application/pdf"){
|
||||
pdfFileToImages(f, function(imgFiles){
|
||||
for(var i=0; i<imgFiles.length; i++){ result.push(imgFiles[i]); }
|
||||
expandPdfFiles(files, idx+1, result, done);
|
||||
});
|
||||
}else{
|
||||
result.push(f);
|
||||
expandPdfFiles(files, idx+1, result, done);
|
||||
}
|
||||
}
|
||||
|
||||
function pdfFileToImages(file, callback){
|
||||
var images = [];
|
||||
var pdf_url = URL.createObjectURL(file);
|
||||
var pdfTask = PDFJS.getDocument({ url: pdf_url });
|
||||
pdfTask.promise.then(function(pdf_doc){
|
||||
renderPdfPageToImg(pdf_doc, 1, pdf_doc.numPages, images, callback);
|
||||
}).catch(function(error){
|
||||
callback([file]);
|
||||
});
|
||||
}
|
||||
|
||||
function renderPdfPageToImg(pdf_doc, currentPage, maxPage, images, callback){
|
||||
pdf_doc.getPage(currentPage).then(function(page){
|
||||
var scale = 1.5;
|
||||
var viewport = page.getViewport(scale);
|
||||
var canvas = document.createElement("canvas");
|
||||
var context = canvas.getContext("2d");
|
||||
canvas.width = Math.floor(viewport.width);
|
||||
canvas.height = Math.floor(viewport.height);
|
||||
var renderContext = { canvasContext: context, viewport: viewport };
|
||||
page.render(renderContext).then(function(){
|
||||
var imgDataUrl = canvas.toDataURL("image/jpeg", 1.0);
|
||||
var blobBin = atob(imgDataUrl.split(",")[1]);
|
||||
var array = [];
|
||||
for(var i=0; i<blobBin.length; i++){ array.push(blobBin.charCodeAt(i)); }
|
||||
var imgFile = new File([new Uint8Array(array)], "pdfpage.jpg", {type: "image/jpeg"});
|
||||
images.push(imgFile);
|
||||
if(maxPage > currentPage){
|
||||
renderPdfPageToImg(pdf_doc, currentPage+1, maxPage, images, callback);
|
||||
}else{
|
||||
callback(images);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function uploadAttachFiles(files, idx){
|
||||
if(idx >= files.length){
|
||||
location.reload();
|
||||
return;
|
||||
}
|
||||
var fd = new FormData();
|
||||
var uploadName = "upload";
|
||||
var dotIdx = files[idx].name.lastIndexOf(".");
|
||||
if(dotIdx >= 0){
|
||||
uploadName += files[idx].name.substring(dotIdx).toLowerCase();
|
||||
}
|
||||
fd.append("attach_file", files[idx], uploadName);
|
||||
fd.append("krc_no", "<%=krc_no%>");
|
||||
$.ajax({
|
||||
url: "/ess/doc_attach_add.asp",
|
||||
type: "POST",
|
||||
data: fd,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: "json",
|
||||
success: function(ret){
|
||||
if(ret.result == "ok"){
|
||||
uploadAttachFiles(files, idx+1);
|
||||
}else if(ret.result == "full"){
|
||||
$("#attachUploadLoading").removeClass("active");
|
||||
alert("<22>ִ<EFBFBD> 20<32><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ÷<><C3B7><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.");
|
||||
}else if(ret.result == "denied"){
|
||||
$("#attachUploadLoading").removeClass("active");
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
}else if(ret.result == "badtype"){
|
||||
$("#attachUploadLoading").removeClass("active");
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.");
|
||||
}else{
|
||||
$("#attachUploadLoading").removeClass("active");
|
||||
alert("<22><><EFBFBD>ε忡 <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.");
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
$("#attachUploadLoading").removeClass("active");
|
||||
alert("<22><><EFBFBD>ε<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DFBB>߽<EFBFBD><DFBD>ϴ<EFBFBD>.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on("click", ".attach_del_btn", function(e){
|
||||
e.stopPropagation();
|
||||
var idx = $(this).data("idx");
|
||||
if(!confirm("÷<><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻðڽ<C3B0><DABD>ϱ<EFBFBD>?")){ return; }
|
||||
$.ajax({
|
||||
url: "/ess/doc_attach_del.asp",
|
||||
type: "POST",
|
||||
data: { krc_no: "<%=krc_no%>", idx: idx },
|
||||
dataType: "json",
|
||||
success: function(ret){
|
||||
if(ret.result == "ok"){
|
||||
location.reload();
|
||||
}else if(ret.result == "denied"){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
}else{
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.");
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
alert("<22><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DFBB>߽<EFBFBD><DFBD>ϴ<EFBFBD>.");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
taxInvoicePopup();
|
||||
|
||||
var today = new Date().getMonth()+1 + " / " + new Date().getDate();
|
||||
@@ -1233,7 +1597,6 @@ if rsc.RecordCount > 0 then
|
||||
window.open(url,'','left=0,top=0,width=850,height=800,scrollbars=yes,resizable=yes')
|
||||
}
|
||||
|
||||
|
||||
var mikExp = /[$\\@\\\#%\^\&\*\-\"\'\[\]\+\_\{\}\`\~\=\|]/;
|
||||
|
||||
function dodacheck(val){
|
||||
|
||||
@@ -10,8 +10,6 @@ Response.CharSet="euc-kr"
|
||||
''//=====================
|
||||
''//=====================
|
||||
|
||||
|
||||
|
||||
dim tmpstr
|
||||
dim Query
|
||||
dim i
|
||||
@@ -30,6 +28,9 @@ Response.CharSet="euc-kr"
|
||||
|
||||
'--------------- <20>߰<EFBFBD>(20170306)<29><> ------------------------
|
||||
dim xadmin : xadmin=request("xadmin") '-- <20><><EFBFBD><EFBFBD>(edit)
|
||||
dim attachClientIp, attachEditAllowed
|
||||
attachClientIp = Replace(Replace(Trim(Request.ServerVariables("REMOTE_ADDR")), "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.")
|
||||
attachEditAllowed = (attachClientIp = "10.10.13.47" Or attachClientIp = "10.10.13.105" Or attachClientIp = "10.10.13.48" Or attachClientIp = "10.10.13.6" Or attachClientIp = "10.10.13.29" Or attachClientIp = "10.10.13.186")
|
||||
dim pay_type(4)
|
||||
pay_type(1) = "ī<><C4AB>/<2F><><EFBFBD><EFBFBD>"
|
||||
pay_type(2) = "<22><><EFBFBD>ݰ<EFBFBD><DDB0>꼭"
|
||||
@@ -304,6 +305,145 @@ if rsc.RecordCount > 0 then
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
.attach_modal_overlay{
|
||||
display:none;
|
||||
position:fixed;
|
||||
top:0;left:0;right:0;bottom:0;
|
||||
background:rgba(0,0,0,0.8);
|
||||
z-index:9999;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
}
|
||||
.attach_modal_overlay.active{
|
||||
display:flex;
|
||||
}
|
||||
.attach_modal_img{
|
||||
max-width:85%;
|
||||
max-height:85%;
|
||||
}
|
||||
.attach_modal_nav{
|
||||
position:absolute;
|
||||
top:50%;
|
||||
transform:translateY(-50%);
|
||||
font-size:40px;
|
||||
color:#fff;
|
||||
cursor:pointer;
|
||||
user-select:none;
|
||||
padding:10px 20px;
|
||||
}
|
||||
.attach_modal_prev{ left:20px; }
|
||||
.attach_modal_next{ right:20px; }
|
||||
.attach_modal_close{
|
||||
position:absolute;
|
||||
top:20px;
|
||||
right:30px;
|
||||
font-size:30px;
|
||||
color:#fff;
|
||||
cursor:pointer;
|
||||
}
|
||||
.attach_modal_count{
|
||||
position:absolute;
|
||||
bottom:20px;
|
||||
left:50%;
|
||||
transform:translateX(-50%);
|
||||
color:#fff;
|
||||
font-size:14px;
|
||||
}
|
||||
.attach_preview{ position:relative; }
|
||||
.attach_add_btn{
|
||||
display:flex;
|
||||
width:15%;
|
||||
height:70px;
|
||||
border:1px dashed #ccc;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
cursor:pointer;
|
||||
margin:4px;
|
||||
color:#888;
|
||||
font-size:13px;
|
||||
}
|
||||
.attach_del_btn{
|
||||
position:absolute;
|
||||
top:-6px;
|
||||
right:-6px;
|
||||
width:18px;
|
||||
height:18px;
|
||||
line-height:16px;
|
||||
text-align:center;
|
||||
background:#e74c3c;
|
||||
color:#fff;
|
||||
border-radius:50%;
|
||||
font-size:13px;
|
||||
cursor:pointer;
|
||||
z-index:2;
|
||||
}
|
||||
.attach_file_box{
|
||||
position:relative;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
width:15%;
|
||||
height:70px;
|
||||
border:1px solid #ccc;
|
||||
box-shadow: 1px 1px 2px 1px #b9b9b9;
|
||||
margin:4px;
|
||||
overflow:hidden;
|
||||
text-align:center;
|
||||
padding:4px;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
.attach_file_link{
|
||||
text-decoration:none;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
align-items:center;
|
||||
width:100%;
|
||||
}
|
||||
.attach_file_ext{
|
||||
font-weight:bold;
|
||||
color:#666;
|
||||
font-size:11px;
|
||||
}
|
||||
.attach_file_name{
|
||||
display:block;
|
||||
max-width:100%;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
font-size:10px;
|
||||
color:#333;
|
||||
}
|
||||
.attach_upload_loading{
|
||||
display:none;
|
||||
position:fixed;
|
||||
top:0;left:0;right:0;bottom:0;
|
||||
background:rgba(255,255,255,0.7);
|
||||
z-index:10000;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
}
|
||||
.attach_upload_loading.active{
|
||||
display:flex;
|
||||
}
|
||||
.attach_upload_spinner{
|
||||
width:50px;
|
||||
height:50px;
|
||||
border:5px solid #ccc;
|
||||
border-top:5px solid #333;
|
||||
border-radius:50%;
|
||||
animation:attach_spin 1s linear infinite;
|
||||
}
|
||||
@keyframes attach_spin{
|
||||
0%{ transform:rotate(0deg); }
|
||||
100%{ transform:rotate(360deg); }
|
||||
}
|
||||
.attach_upload_text{
|
||||
margin-top:10px;
|
||||
font-size:14px;
|
||||
color:#333;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
@@ -311,6 +451,8 @@ if rsc.RecordCount > 0 then
|
||||
<script src="/js/jquery.form.min.js"></script>
|
||||
<script src="/js/jquery-ui.min.js"></script>
|
||||
<script src="/js/common.js"></script>
|
||||
<script src="/js/pdf.js"></script>
|
||||
<script src="/js/pdf.worker.js"></script>
|
||||
<script language="javascript">
|
||||
$(function(){
|
||||
$("#delRewrite_btn").click(function(){
|
||||
@@ -775,7 +917,28 @@ if rsc.RecordCount > 0 then
|
||||
</tyr>
|
||||
<%
|
||||
Set fso = Server.CreateObject("Scripting.FileSystemObject")
|
||||
If fso.FileExists(Server.Mappath("/") & "/Upload/DOC_ATTACH/" & krc_no & "/" & krc_no & "_1.jpg") = True Then
|
||||
Dim attachFolderPath, attachFolderObj, attachOneFile, attachUs, attachDt, attachIdxPart, attachExt
|
||||
Dim attachFileMap(20), attachIsImage(20)
|
||||
Dim imageExtList : imageExtList = "|jpg|jpeg|png|gif|"
|
||||
Dim attachCacheVersion : attachCacheVersion = CStr(CLng(Timer() * 1000))
|
||||
attachFolderPath = Server.Mappath("/") & "/Upload/DOC_ATTACH/" & krc_no
|
||||
If fso.FolderExists(attachFolderPath) Then
|
||||
Set attachFolderObj = fso.GetFolder(attachFolderPath)
|
||||
For Each attachOneFile In attachFolderObj.Files
|
||||
attachUs = InStrRev(attachOneFile.Name, "_")
|
||||
attachDt = InStrRev(attachOneFile.Name, ".")
|
||||
If attachUs > 0 And attachDt > attachUs Then
|
||||
attachIdxPart = Mid(attachOneFile.Name, attachUs + 1, attachDt - attachUs - 1)
|
||||
If IsNumeric(attachIdxPart) Then
|
||||
If CInt(attachIdxPart) >= 1 And CInt(attachIdxPart) <= 20 Then
|
||||
attachFileMap(CInt(attachIdxPart)) = attachOneFile.Name
|
||||
attachExt = LCase(Mid(attachOneFile.Name, attachDt + 1))
|
||||
If InStr(imageExtList, "|" & attachExt & "|") > 0 Then attachIsImage(CInt(attachIdxPart)) = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
%>
|
||||
<tr>
|
||||
<td class="tit2" align="center"><3E><><EFBFBD><EFBFBD>÷<EFBFBD><C3B7></td>
|
||||
@@ -783,19 +946,40 @@ if rsc.RecordCount > 0 then
|
||||
<div class="attach_div">
|
||||
<%
|
||||
For i=1 To 20
|
||||
if fso.FileExists(Server.Mappath("/") & "/Upload/DOC_ATTACH/" & krc_no & "/" & krc_no & "_" & cstr(i) & ".jpg") = True then
|
||||
%>
|
||||
<div class="attach_preview">
|
||||
<img src="<%="/Upload/DOC_ATTACH/" & krc_no & "/" & krc_no & "_" & cstr(i) & ".jpg"%>" />
|
||||
</div>
|
||||
<%
|
||||
End If
|
||||
If attachFileMap(i) <> "" Then
|
||||
If attachIsImage(i) Then
|
||||
%>
|
||||
<div class="attach_preview">
|
||||
<img src="<%="/Upload/DOC_ATTACH/" & krc_no & "/" & attachFileMap(i) & "?v=" & attachCacheVersion%>" />
|
||||
<% If xadmin = "edit" And attachEditAllowed Then %>
|
||||
<span class="attach_del_btn" data-idx="<%=i%>">×</span>
|
||||
<% End If %>
|
||||
</div>
|
||||
<%
|
||||
Else
|
||||
%>
|
||||
<div class="attach_file_box">
|
||||
<a href="<%="/Upload/DOC_ATTACH/" & krc_no & "/" & attachFileMap(i) & "?v=" & attachCacheVersion%>" target="_blank" class="attach_file_link">
|
||||
<span class="attach_file_ext"><%=Ucase(Mid(attachFileMap(i), InStrRev(attachFileMap(i),".")+1))%></span>
|
||||
<span class="attach_file_name"><%=attachFileMap(i)%></span>
|
||||
</a>
|
||||
<% If xadmin = "edit" And attachEditAllowed Then %>
|
||||
<span class="attach_del_btn" data-idx="<%=i%>">×</span>
|
||||
<% End If %>
|
||||
</div>
|
||||
<%
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
%>
|
||||
<% If xadmin = "edit" And attachEditAllowed Then %>
|
||||
<div class="attach_add_btn" id="attachAddBtn">+ <20>߰<EFBFBD></div>
|
||||
<input type="file" id="attachFileInput" accept="image/*,.zip,.pdf,.hwp,.doc,.docx,.xls,.xlsx,.ppt,.pptx" multiple style="display:none;" />
|
||||
<% End If %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% End If
|
||||
<%
|
||||
Set fso = Nothing
|
||||
%>
|
||||
</table>
|
||||
@@ -912,6 +1096,17 @@ if rsc.RecordCount > 0 then
|
||||
<% End If %>
|
||||
</form>
|
||||
|
||||
<div class="attach_modal_overlay" id="attachModalOverlay">
|
||||
<span class="attach_modal_close" id="attachModalClose">×</span>
|
||||
<span class="attach_modal_nav attach_modal_prev" id="attachModalPrev">‹</span>
|
||||
<img class="attach_modal_img" id="attachModalImg" src="" />
|
||||
<span class="attach_modal_nav attach_modal_next" id="attachModalNext">›</span>
|
||||
<div class="attach_modal_count" id="attachModalCount"></div>
|
||||
</div>
|
||||
<div class="attach_upload_loading" id="attachUploadLoading">
|
||||
<div class="attach_upload_spinner"></div>
|
||||
<div class="attach_upload_text"><3E><><EFBFBD>ε<EFBFBD> <20><><EFBFBD>Դϴ<D4B4>...</div>
|
||||
</div>
|
||||
<script>
|
||||
var ntsUrl = "";
|
||||
$(document).ready(function (){
|
||||
@@ -936,10 +1131,177 @@ if rsc.RecordCount > 0 then
|
||||
}
|
||||
});
|
||||
|
||||
$(".attach_preview").on("click", function(){
|
||||
window.open($(this).children("img").attr("src"), "_blank", "popup=1");
|
||||
var attachImgs = [];
|
||||
var attachIdx = 0;
|
||||
|
||||
$(".attach_preview img").each(function(){
|
||||
attachImgs.push($(this).attr("src"));
|
||||
});
|
||||
|
||||
function showAttachModal(idx){
|
||||
if(attachImgs.length == 0){ return; }
|
||||
if(idx < 0){ idx = attachImgs.length - 1; }
|
||||
if(idx >= attachImgs.length){ idx = 0; }
|
||||
attachIdx = idx;
|
||||
$("#attachModalImg").attr("src", attachImgs[attachIdx]);
|
||||
$("#attachModalCount").text((attachIdx+1) + " / " + attachImgs.length);
|
||||
$("#attachModalOverlay").addClass("active");
|
||||
}
|
||||
|
||||
$(".attach_preview").on("click", function(e){
|
||||
if($(e.target).hasClass("attach_del_btn")){ return; }
|
||||
var idx = $(".attach_preview").index(this);
|
||||
showAttachModal(idx);
|
||||
});
|
||||
|
||||
$("#attachModalPrev").on("click", function(){ showAttachModal(attachIdx - 1); });
|
||||
$("#attachModalNext").on("click", function(){ showAttachModal(attachIdx + 1); });
|
||||
$("#attachModalClose").on("click", function(){ $("#attachModalOverlay").removeClass("active"); });
|
||||
$("#attachModalOverlay").on("click", function(e){
|
||||
if(e.target.id == "attachModalOverlay"){ $("#attachModalOverlay").removeClass("active"); }
|
||||
});
|
||||
$(document).on("keydown", function(e){
|
||||
if($("#attachModalOverlay").hasClass("active")){
|
||||
if(e.keyCode == 37){ showAttachModal(attachIdx - 1); }
|
||||
else if(e.keyCode == 39){ showAttachModal(attachIdx + 1); }
|
||||
else if(e.keyCode == 27){ $("#attachModalOverlay").removeClass("active"); }
|
||||
}
|
||||
})
|
||||
|
||||
$("#attachAddBtn").on("click", function(){
|
||||
$("#attachFileInput").val("").trigger("click");
|
||||
});
|
||||
|
||||
$("#attachFileInput").on("change", function(){
|
||||
var files = this.files;
|
||||
if(!files || files.length == 0){ return; }
|
||||
$("#attachUploadLoading").addClass("active");
|
||||
expandPdfFiles(files, 0, [], function(expandedFiles){
|
||||
uploadAttachFiles(expandedFiles, 0);
|
||||
});
|
||||
});
|
||||
|
||||
function expandPdfFiles(files, idx, result, done){
|
||||
if(idx >= files.length){
|
||||
done(result);
|
||||
return;
|
||||
}
|
||||
var f = files[idx];
|
||||
if(f.type == "application/pdf"){
|
||||
pdfFileToImages(f, function(imgFiles){
|
||||
for(var i=0; i<imgFiles.length; i++){ result.push(imgFiles[i]); }
|
||||
expandPdfFiles(files, idx+1, result, done);
|
||||
});
|
||||
}else{
|
||||
result.push(f);
|
||||
expandPdfFiles(files, idx+1, result, done);
|
||||
}
|
||||
}
|
||||
|
||||
function pdfFileToImages(file, callback){
|
||||
var images = [];
|
||||
var pdf_url = URL.createObjectURL(file);
|
||||
var pdfTask = PDFJS.getDocument({ url: pdf_url });
|
||||
pdfTask.promise.then(function(pdf_doc){
|
||||
renderPdfPageToImg(pdf_doc, 1, pdf_doc.numPages, images, callback);
|
||||
}).catch(function(error){
|
||||
callback([file]);
|
||||
});
|
||||
}
|
||||
|
||||
function renderPdfPageToImg(pdf_doc, currentPage, maxPage, images, callback){
|
||||
pdf_doc.getPage(currentPage).then(function(page){
|
||||
var scale = 1.5;
|
||||
var viewport = page.getViewport(scale);
|
||||
var canvas = document.createElement("canvas");
|
||||
var context = canvas.getContext("2d");
|
||||
canvas.width = Math.floor(viewport.width);
|
||||
canvas.height = Math.floor(viewport.height);
|
||||
var renderContext = { canvasContext: context, viewport: viewport };
|
||||
page.render(renderContext).then(function(){
|
||||
var imgDataUrl = canvas.toDataURL("image/jpeg", 1.0);
|
||||
var blobBin = atob(imgDataUrl.split(",")[1]);
|
||||
var array = [];
|
||||
for(var i=0; i<blobBin.length; i++){ array.push(blobBin.charCodeAt(i)); }
|
||||
var imgFile = new File([new Uint8Array(array)], "pdfpage.jpg", {type: "image/jpeg"});
|
||||
images.push(imgFile);
|
||||
if(maxPage > currentPage){
|
||||
renderPdfPageToImg(pdf_doc, currentPage+1, maxPage, images, callback);
|
||||
}else{
|
||||
callback(images);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function uploadAttachFiles(files, idx){
|
||||
if(idx >= files.length){
|
||||
location.reload();
|
||||
return;
|
||||
}
|
||||
var fd = new FormData();
|
||||
var uploadName = "upload";
|
||||
var dotIdx = files[idx].name.lastIndexOf(".");
|
||||
if(dotIdx >= 0){
|
||||
uploadName += files[idx].name.substring(dotIdx).toLowerCase();
|
||||
}
|
||||
fd.append("attach_file", files[idx], uploadName);
|
||||
fd.append("krc_no", "<%=krc_no%>");
|
||||
$.ajax({
|
||||
url: "/ess/doc_attach_add.asp",
|
||||
type: "POST",
|
||||
data: fd,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: "json",
|
||||
success: function(ret){
|
||||
if(ret.result == "ok"){
|
||||
uploadAttachFiles(files, idx+1);
|
||||
}else if(ret.result == "full"){
|
||||
$("#attachUploadLoading").removeClass("active");
|
||||
alert("<22>ִ<EFBFBD> 20<32><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ÷<><C3B7><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.");
|
||||
}else if(ret.result == "denied"){
|
||||
$("#attachUploadLoading").removeClass("active");
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
}else if(ret.result == "badtype"){
|
||||
$("#attachUploadLoading").removeClass("active");
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.");
|
||||
}else{
|
||||
$("#attachUploadLoading").removeClass("active");
|
||||
alert("<22><><EFBFBD>ε忡 <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.");
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
$("#attachUploadLoading").removeClass("active");
|
||||
alert("<22><><EFBFBD>ε<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DFBB>߽<EFBFBD><DFBD>ϴ<EFBFBD>.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on("click", ".attach_del_btn", function(e){
|
||||
e.stopPropagation();
|
||||
var idx = $(this).data("idx");
|
||||
if(!confirm("÷<><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻðڽ<C3B0><DABD>ϱ<EFBFBD>?")){ return; }
|
||||
$.ajax({
|
||||
url: "/ess/doc_attach_del.asp",
|
||||
type: "POST",
|
||||
data: { krc_no: "<%=krc_no%>", idx: idx },
|
||||
dataType: "json",
|
||||
success: function(ret){
|
||||
if(ret.result == "ok"){
|
||||
location.reload();
|
||||
}else if(ret.result == "denied"){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
}else{
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.");
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
alert("<22><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DFBB>߽<EFBFBD><DFBD>ϴ<EFBFBD>.");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
taxInvoicePopup();
|
||||
|
||||
var today = new Date().getMonth()+1 + " / " + new Date().getDate();
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
krc_no = d_no
|
||||
print_type = request("print_type")
|
||||
view_chk= request("view_chk")
|
||||
dim rev_type : rev_type = request("rev_type")
|
||||
|
||||
db_table_name = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
|
||||
@@ -254,107 +253,6 @@ if rsc.RecordCount > 0 Then
|
||||
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
var today = new Date().getMonth()+1 + " / " + new Date().getDate();
|
||||
<% If rev_type = "1" Then %>
|
||||
var tmpHtml = "";
|
||||
tmpHtml += "<input type='button' id='rev_btn' value='<27><><EFBFBD><EFBFBD>' style='background-color: #c6fccf;cursor: pointer;' />";
|
||||
<% if cstr(tmp_ess(4, 2)) = cstr(session("user_number")) then %>
|
||||
$("#approval_tb > tbody > tr:eq(2) > td:nth-last-child(3)").html(tmpHtml) // <20>μ<EFBFBD><CEBC><EFBFBD>
|
||||
$("#approval_tb > tbody > tr:eq(3) > td:nth-last-child(3)").html(today) // <20>μ<EFBFBD><CEBC><EFBFBD>
|
||||
<% Else %>
|
||||
$("#approval_tb > tbody > tr:eq(2) > td:nth-last-child(4)").html(tmpHtml) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
$("#approval_tb > tbody > tr:eq(3) > td:nth-last-child(4)").html(today) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<% End If %>
|
||||
|
||||
$("#rev_btn").on("click", function(){
|
||||
if(confirm("Ȯ<><C8AE>ó<EFBFBD><C3B3><EFBFBD>Ͻðڽ<C3B0><DABD>ϱ<EFBFBD>?")){
|
||||
$.ajax({
|
||||
url: "/ess/doc_rev_ajax.asp",
|
||||
type: "POST",
|
||||
data: {"command":"revReqApproval", "d_no":"<%=d_no%>", "today":today},
|
||||
success: function(ret){
|
||||
if(ret == "1"){
|
||||
alert("Ȯ<>ο<EFBFBD>û<EFBFBD><C3BB> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
$(opener.document).find("#tr_<%=d_no%>").remove();
|
||||
self.close();
|
||||
}else if(ret == "2"){
|
||||
alert("Ȯ<><C8AE> ó<><C3B3><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
$(opener.document).find("#tr_<%=d_no%>").remove();
|
||||
self.close();
|
||||
}else{
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DFBB>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n<><6E><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD><CEBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
<% ElseIf rev_type = "2" Then %>
|
||||
<% if cstr(tmp_ess(4, 2)) = cstr(session("user_number")) then %>
|
||||
tmpHtml = ""
|
||||
tmpHtml += "<input type='button' id='rev_comp_btn' value='<27><><EFBFBD><EFBFBD>' style='background-color: #c6fccf;cursor: pointer;' />";
|
||||
$("#approval_tb > tbody > tr:eq(2) > td:nth-last-child(3)").html(tmpHtml) // <20>μ<EFBFBD><CEBC><EFBFBD>
|
||||
|
||||
$("#rev_comp_btn").on("click", function(){
|
||||
if(confirm("Ȯ<><C8AE><EFBFBD>Ͻðڽ<C3B0><DABD>ϱ<EFBFBD>?")){
|
||||
$.ajax({
|
||||
url: "/ess/doc_rev_ajax.asp",
|
||||
type: "POST",
|
||||
data: {"command":"revCompApproval", "d_no":"<%=d_no%>", "today":today},
|
||||
success: function(ret){
|
||||
if(ret == "1"){
|
||||
alert("Ȯ<><C8AE> ó<><C3B3><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
$(opener.document).find("#tr_<%=d_no%>").remove();
|
||||
self.close();
|
||||
}else{
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DFBB>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n<><6E><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD><CEBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
<% End If %>
|
||||
<% End If %>
|
||||
<% If d_order_cnt = 77 Then %>
|
||||
$.ajax({
|
||||
url: "/ess/doc_rev_ajax.asp",
|
||||
type: "POST",
|
||||
data: {"command":"revIngApproval", "d_no":"<%=d_no%>", "appoval_level":"2"},
|
||||
success: function(ret){
|
||||
if(ret != "0"){
|
||||
var retJson = JSON.parse(ret);
|
||||
$("#approval_tb > tbody > tr:eq(2) > td:nth-last-child(4)").html('<img src="/images/sign/' + retJson.imgFile + '.jpg" border="0" width="40" height="40">') // <20><><EFBFBD><EFBFBD>
|
||||
$("#approval_tb > tbody > tr:eq(3) > td:nth-last-child(4)").html(retJson.day) // <20><><EFBFBD><EFBFBD>
|
||||
}
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: "/ess/doc_rev_ajax.asp",
|
||||
type: "POST",
|
||||
data: {"command":"revIngApproval", "d_no":"<%=d_no%>", "appoval_level":"3"},
|
||||
success: function(ret){
|
||||
if(ret != "0"){
|
||||
var retJson = JSON.parse(ret);
|
||||
$("#approval_tb > tbody > tr:eq(2) > td:nth-last-child(3)").html('<img src="/images/sign/' + retJson.imgFile + '.jpg" border="0" width="40" height="40">') // <20>μ<EFBFBD><CEBC><EFBFBD>
|
||||
$("#approval_tb > tbody > tr:eq(3) > td:nth-last-child(3)").html(retJson.day) // <20>μ<EFBFBD><CEBC><EFBFBD>
|
||||
}
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: "/ess/doc_rev_ajax.asp",
|
||||
type: "POST",
|
||||
data: {"command":"revIngApproval", "d_no":"<%=d_no%>", "appoval_level":"5"},
|
||||
success: function(ret){
|
||||
if(ret != "0"){
|
||||
var retJson = JSON.parse(ret);
|
||||
$("#approval_tb > tbody > tr:eq(2) > td:nth-last-child(1)").html('<img src="/images/sign/' + retJson.imgFile + '.jpg" border="0" width="40" height="40">') // <20><>ǥ<EFBFBD>̻<EFBFBD>
|
||||
$("#approval_tb > tbody > tr:eq(3) > td:nth-last-child(1)").html(retJson.day) // <20><>ǥ<EFBFBD>̻<EFBFBD>
|
||||
}
|
||||
}
|
||||
});
|
||||
<% End If %>
|
||||
});
|
||||
|
||||
function win_close()
|
||||
{
|
||||
window.close();
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
krc_no = d_no
|
||||
print_type = request("print_type")
|
||||
view_chk= request("view_chk")
|
||||
dim rev_type : rev_type = request("rev_type")
|
||||
|
||||
db_table_name = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
|
||||
@@ -253,107 +252,6 @@ if rsc.RecordCount > 0 Then
|
||||
}
|
||||
|
||||
});
|
||||
$(document).ready(function(){
|
||||
var today = new Date().getMonth()+1 + " / " + new Date().getDate();
|
||||
<% If rev_type = "1" Then %>
|
||||
var tmpHtml = "";
|
||||
tmpHtml += "<input type='button' id='rev_btn' value='<27><><EFBFBD><EFBFBD>' style='background-color: #c6fccf;cursor: pointer;' />";
|
||||
<% if cstr(tmp_ess(4, 2)) = cstr(session("user_number")) then %>
|
||||
$("#approval_tb > tbody > tr:eq(2) > td:nth-last-child(3)").html(tmpHtml) // <20>μ<EFBFBD><CEBC><EFBFBD>
|
||||
$("#approval_tb > tbody > tr:eq(3) > td:nth-last-child(3)").html(today) // <20>μ<EFBFBD><CEBC><EFBFBD>
|
||||
<% Else %>
|
||||
$("#approval_tb > tbody > tr:eq(2) > td:nth-last-child(4)").html(tmpHtml) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
$("#approval_tb > tbody > tr:eq(3) > td:nth-last-child(4)").html(today) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<% End If %>
|
||||
|
||||
$("#rev_btn").on("click", function(){
|
||||
if(confirm("Ȯ<><C8AE>ó<EFBFBD><C3B3><EFBFBD>Ͻðڽ<C3B0><DABD>ϱ<EFBFBD>?")){
|
||||
$.ajax({
|
||||
url: "/ess/doc_rev_ajax.asp",
|
||||
type: "POST",
|
||||
data: {"command":"revReqApproval", "d_no":"<%=d_no%>", "today":today},
|
||||
success: function(ret){
|
||||
if(ret == "1"){
|
||||
alert("Ȯ<>ο<EFBFBD>û<EFBFBD><C3BB> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
$(opener.document).find("#tr_<%=d_no%>").remove();
|
||||
self.close();
|
||||
}else if(ret == "2"){
|
||||
alert("Ȯ<><C8AE> ó<><C3B3><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
$(opener.document).find("#tr_<%=d_no%>").remove();
|
||||
self.close();
|
||||
}else{
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DFBB>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n<><6E><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD><CEBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
<% ElseIf rev_type = "2" Then %>
|
||||
<% if cstr(tmp_ess(4, 2)) = cstr(session("user_number")) then %>
|
||||
tmpHtml = ""
|
||||
tmpHtml += "<input type='button' id='rev_comp_btn' value='<27><><EFBFBD><EFBFBD>' style='background-color: #c6fccf;cursor: pointer;' />";
|
||||
$("#approval_tb > tbody > tr:eq(2) > td:nth-last-child(3)").html(tmpHtml) // <20>μ<EFBFBD><CEBC><EFBFBD>
|
||||
|
||||
$("#rev_comp_btn").on("click", function(){
|
||||
if(confirm("Ȯ<><C8AE><EFBFBD>Ͻðڽ<C3B0><DABD>ϱ<EFBFBD>?")){
|
||||
$.ajax({
|
||||
url: "/ess/doc_rev_ajax.asp",
|
||||
type: "POST",
|
||||
data: {"command":"revCompApproval", "d_no":"<%=d_no%>", "today":today},
|
||||
success: function(ret){
|
||||
if(ret == "1"){
|
||||
alert("Ȯ<><C8AE> ó<><C3B3><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
$(opener.document).find("#tr_<%=d_no%>").remove();
|
||||
self.close();
|
||||
}else{
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DFBB>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n<><6E><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD><CEBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
<% End If %>
|
||||
<% End If %>
|
||||
<% If d_order_cnt = 77 Then %>
|
||||
$.ajax({
|
||||
url: "/ess/doc_rev_ajax.asp",
|
||||
type: "POST",
|
||||
data: {"command":"revIngApproval", "d_no":"<%=d_no%>", "appoval_level":"2"},
|
||||
success: function(ret){
|
||||
if(ret != "0"){
|
||||
var retJson = JSON.parse(ret);
|
||||
$("#approval_tb > tbody > tr:eq(2) > td:nth-last-child(4)").html('<img src="/images/sign/' + retJson.imgFile + '.jpg" border="0" width="40" height="40">') // <20><><EFBFBD><EFBFBD>
|
||||
$("#approval_tb > tbody > tr:eq(3) > td:nth-last-child(4)").html(retJson.day) // <20><><EFBFBD><EFBFBD>
|
||||
}
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: "/ess/doc_rev_ajax.asp",
|
||||
type: "POST",
|
||||
data: {"command":"revIngApproval", "d_no":"<%=d_no%>", "appoval_level":"3"},
|
||||
success: function(ret){
|
||||
if(ret != "0"){
|
||||
var retJson = JSON.parse(ret);
|
||||
$("#approval_tb > tbody > tr:eq(2) > td:nth-last-child(3)").html('<img src="/images/sign/' + retJson.imgFile + '.jpg" border="0" width="40" height="40">') // <20>μ<EFBFBD><CEBC><EFBFBD>
|
||||
$("#approval_tb > tbody > tr:eq(3) > td:nth-last-child(3)").html(retJson.day) // <20>μ<EFBFBD><CEBC><EFBFBD>
|
||||
}
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: "/ess/doc_rev_ajax.asp",
|
||||
type: "POST",
|
||||
data: {"command":"revIngApproval", "d_no":"<%=d_no%>", "appoval_level":"5"},
|
||||
success: function(ret){
|
||||
if(ret != "0"){
|
||||
var retJson = JSON.parse(ret);
|
||||
$("#approval_tb > tbody > tr:eq(2) > td:nth-last-child(1)").html('<img src="/images/sign/' + retJson.imgFile + '.jpg" border="0" width="40" height="40">') // <20><>ǥ<EFBFBD>̻<EFBFBD>
|
||||
$("#approval_tb > tbody > tr:eq(3) > td:nth-last-child(1)").html(retJson.day) // <20><>ǥ<EFBFBD>̻<EFBFBD>
|
||||
}
|
||||
}
|
||||
});
|
||||
<% End If %>
|
||||
});
|
||||
|
||||
|
||||
function win_close()
|
||||
{
|
||||
|
||||
@@ -110,22 +110,40 @@ else
|
||||
end if
|
||||
adors.close
|
||||
'response.Write "d_order_cnt : " & d_order_cnt & "<BR>"
|
||||
Dim approval_is_marketing, approval_header_left, approval_header_right
|
||||
Dim approval_label_writer, approval_label_group, approval_label_division, approval_label_manager
|
||||
approval_is_marketing = (LCase(Request.ServerVariables("SCRIPT_NAME")) = "/ess/doc_entertainment_print.asp")
|
||||
If approval_is_marketing Then
|
||||
approval_header_left = "<22><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>(<28>ҼӺμ<D3BA>)"
|
||||
approval_header_right = "<22><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>)"
|
||||
approval_label_writer = "<22><><EFBFBD><EFBFBD>"
|
||||
approval_label_group = "<22>μ<EFBFBD><CEBC><EFBFBD>"
|
||||
approval_label_division = "<22>ӿ<EFBFBD>"
|
||||
approval_label_manager = "<22><><EFBFBD><EFBFBD>"
|
||||
Else
|
||||
approval_header_left = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>"
|
||||
approval_header_right = "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>"
|
||||
approval_label_writer = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
approval_label_group = "<22><EFBFBD><D7B7><EFBFBD>"
|
||||
approval_label_division = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
approval_label_manager = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
End If
|
||||
%>
|
||||
<div style="width:100%;">
|
||||
<table width="100%" align="right" cellpadding="0" cellspacing="1" border="1" style="border-collapse:collapse;" bgcolor="#d8d8d8" id="approval_tb">
|
||||
<tr>
|
||||
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>(<28>ҼӺμ<D3BA>)</td>
|
||||
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>)</td>
|
||||
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><%=approval_header_left%></td>
|
||||
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><%=approval_header_right%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=approval_label_writer%></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1" style="display:none;"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><EFBFBD>μ<EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><EFBFBD>ӿ<EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=approval_label_group%></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=approval_label_division%></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1" colspan="2"><%=tmp_title%></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><EFBFBD>μ<EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><EFBFBD>ӿ<EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=approval_label_manager%></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=approval_label_group%></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=approval_label_division%></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
||||
</tr>
|
||||
<%
|
||||
|
||||
@@ -102,12 +102,12 @@ adors.close
|
||||
<td class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1" style="display: none;"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD>/<2F><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
<%
|
||||
'd_order_cnt = 5
|
||||
|
||||
@@ -179,9 +179,6 @@ for i=1 to request("cnt")
|
||||
lunch_alr = true
|
||||
rsa.open query, adoConn, adopenstatic, adlockreadonly
|
||||
|
||||
if cstr(rsa("m_lunch_cost")) = cstr(lunch_cost) then
|
||||
lunch_alr = false
|
||||
end if
|
||||
|
||||
If lunch_alr = true Then
|
||||
query = " insert into t_neakeun_pay (p_sn, m_name, m_jumin, work_dt, s_ot, s_gubun, s_pay_unit, s_wan, s_sum, s_time_style, pay_type, pay_month, insert_dt, insert_user, attribute01) "
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
return commify(data);
|
||||
};
|
||||
var colNumCost = function(data, type, row, meta){
|
||||
return data;
|
||||
return type !== "sort" ? commify(data) : data;
|
||||
};
|
||||
var colNumRate = function(data, type, row, meta){
|
||||
return commify(data, true) + (data != "" ? " %": "");
|
||||
@@ -194,7 +194,7 @@
|
||||
columns:[
|
||||
{"data": "Team", "class":"txt dt-body-center details-control"},
|
||||
{"data": "p_state", "class":"txt dt-body-center"},
|
||||
{"data": "p_project_type_cd", "class":"txt dt-body-center"},
|
||||
{"data": "p_project_type_cd", "class":"txt dt-body-center", "render":function(data){ return data == null ? data : String(data).toUpperCase(); }},
|
||||
{"data": "p_sn", "class":"txt dt-body-center"},
|
||||
{"data": "p_subject", "class":"txt dt-body-left"},
|
||||
{"data": "p_cli_company_nm", "class":"txt dt-body-center"},
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
sql=sql&" FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> M LEFT JOIN Document D ON M.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ = D.d_no "&VbCrlf
|
||||
sql=sql&" LEFT JOIN T_PROJECT_METHOD P ON M.p_sn = P.p_child_sn "&VbCrlf
|
||||
sql=sql&" LEFT JOIN T_PROJECT_BASE TPB ON P.p_sn = TPB.p_sn "&VbCrlf
|
||||
sql=sql&" LEFT JOIN V_Department VD ON TPB.p_depart_dep = VD.before_t_cd1 "&VbCrlf
|
||||
sql=sql&" LEFT JOIN V_Department VD ON ((ISNULL(TPB.p_depart_dep, '') = '0' AND ISNULL(TPB.p_Depart_N, '') = 'E' AND ISNULL(TPB.p_Team_N, '') = '101' AND P.p_rsch_dept = VD.before_t_cd1) OR (NOT (ISNULL(TPB.p_depart_dep, '') = '0' AND ISNULL(TPB.p_Depart_N, '') = 'E' AND ISNULL(TPB.p_Team_N, '') = '101') AND (((ISNULL(TPB.p_Depart_N, '') + ISNULL(TPB.p_Team_N, '')) <> '' AND (ISNULL(TPB.p_Depart_N, '') + ISNULL(TPB.p_Team_N, '')) = VD.Code) OR ((ISNULL(TPB.p_Depart_N, '') + ISNULL(TPB.p_Team_N, '')) = '' AND TPB.p_depart_dep = VD.before_t_cd1)))) "&VbCrlf
|
||||
sql=sql&" WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7BC><EFBFBD>' "&VbCrlf
|
||||
sql=sql&" AND d_order_cnt = '77' AND del_yes_no = 'no' "&VbCrlf
|
||||
sql=sql&" AND d_write_date >= CONVERT(varchar(10), DATEADD(MONTH, -3, getdate()), 120) "&VbCrlf
|
||||
|
||||
@@ -3595,28 +3595,7 @@
|
||||
var fileAttachCcount = 0;
|
||||
var upload_Flag = true;
|
||||
var depart_no = document.pms.depart_no.value;
|
||||
var contractAttachFlag = false;
|
||||
|
||||
$("input[name^='f_kind'][value='010']").each(function () {
|
||||
var contractFileIndex = $(this).attr("name").replace("f_kind[", "").replace("]", "");
|
||||
var contractFileId = $("input[name='f_id[" + contractFileIndex + "]']").val();
|
||||
var contractUploadPath = $("input[name='ATTACH_FILENAME[" + contractFileIndex + "]']").val();
|
||||
|
||||
if ((contractFileId != null && contractFileId != "") || (contractUploadPath != null && contractUploadPath.length > 0)) {
|
||||
contractAttachFlag = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (!contractAttachFlag) {
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>༭<EFBFBD><E0BCAD> ÷<><C3B7><EFBFBD>Ͻʽÿ<CABD>.");
|
||||
$("input[name^='f_kind'][value='010']").each(function () {
|
||||
var contractFileIndex = $(this).attr("name").replace("f_kind[", "").replace("]", "");
|
||||
$("input[name='ATTACH_FILENAME[" + contractFileIndex + "]']").focus();
|
||||
return false;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
$("input:file").each(function (index) {
|
||||
var uploadpath = $(this).val();
|
||||
|
||||
@@ -2292,7 +2292,11 @@ end if
|
||||
if (ajaxResponse == "1") {
|
||||
complete(type, p_child_sn);
|
||||
} else {
|
||||
alert("<22><><EFBFBD><EFBFBD> File Upload<61><64> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>. Ȯ<><C8AE><EFBFBD>Ͻñ<CFBD> <20>ٶ<EFBFBD><D9B6>ϴ<EFBFBD>.\n <20>뿪<EFBFBD><EBBFAA><EFBFBD><EFBFBD>-<2D><><EFBFBD>̺<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [<5B><><EFBFBD>ȼ<EFBFBD>or<6F><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD>(DP)]\n <20>뿪<EFBFBD><EBBFAA><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> [<5B><><EFBFBD>ȼ<EFBFBD>or<6F><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD>(DP)]");
|
||||
if (type == "1") {
|
||||
alert("<22><><EFBFBD><EFBFBD> File Upload<61><64> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>. Ȯ<><C8AE><EFBFBD>Ͻñ<CFBD> <20>ٶ<EFBFBD><D9B6>ϴ<EFBFBD>.\n <20>뿪<EFBFBD><EBBFAA><EFBFBD><EFBFBD>-<2D><><EFBFBD>̺<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>༭+<2B><><EFBFBD>ȼ<EFBFBD>or<6F><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD>(DP)]\n <20>뿪<EFBFBD><EBBFAA><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> [<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>༭+<2B><><EFBFBD>ȼ<EFBFBD>or<6F><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD>(DP)]");
|
||||
} else {
|
||||
alert("<22><><EFBFBD><EFBFBD> File Upload<61><64> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>. Ȯ<><C8AE><EFBFBD>Ͻñ<CFBD> <20>ٶ<EFBFBD><D9B6>ϴ<EFBFBD>.\n <20>뿪<EFBFBD><EBBFAA><EFBFBD><EFBFBD>-<2D><><EFBFBD>̺<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [<5B><><EFBFBD>ȼ<EFBFBD>or<6F><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD>(DP)]\n <20>뿪<EFBFBD><EBBFAA><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> [<5B><><EFBFBD>ȼ<EFBFBD>or<6F><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD>(DP)]");
|
||||
}
|
||||
}
|
||||
}
|
||||
function complete(type, p_child_sn) {
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
end if
|
||||
|
||||
query = "" ' export_range <- <20>뿪<EFBFBD><EBBFAA><EFBFBD><EFBFBD>, a_cnt <- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20><><EFBFBD>ȼ<EFBFBD>, b_cnt <- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, c_cnt <- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, d_cnt <- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(DP)
|
||||
query = query & " SELECT isnull(isnull(isnull(a.p_export_range, b.p_export_range), c.p_export_range), d.p_export_range) as export_range , isnull(a.a_CNT, 0) as a_cnt, isnull(b.b_CNT, 0) as b_cnt, isnull(c.c_CNT, 0) as c_cnt, isnull(d.d_CNT, 0) as d_cnt FROM "
|
||||
query = query & " SELECT isnull(isnull(isnull(a.p_export_range, b.p_export_range), c.p_export_range), d.p_export_range) as export_range , isnull(a.a_CNT, 0) as a_cnt, isnull(b.b_CNT, 0) as b_cnt, isnull(c.c_CNT, 0) as c_cnt, isnull(d.d_CNT, 0) as d_cnt, "
|
||||
query = query & " (SELECT COUNT(*) FROM T_SYSTEM_ATTACH WHERE f_p_sn = '" & LEFT(p_child_sn, 7) & "' AND f_use_yn = 'Y' AND f_kind = '010') as contract_cnt FROM "
|
||||
query = query & " ( "
|
||||
query = query & " SELECT p_export_range, count(*) as a_CNT FROM "
|
||||
query = query & " (SELECT p_export_range FROM V_PROJECT_METHOD WHERE p_child_sn = '" & p_child_sn & "') A, "
|
||||
@@ -52,11 +53,11 @@
|
||||
if rsp.recordCount > 0 then
|
||||
if depart_type = "1" then
|
||||
if rsp("export_range") = "001" then '<27>뿪<EFBFBD><EBBFAA><EFBFBD><EFBFBD> - <20><><EFBFBD>̺<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
||||
if cint(rsp("a_cnt")) >= 1 and cint(rsp("c_cnt")) >= 1 then ' <20><><EFBFBD>ȼ<EFBFBD> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ְ<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||
if cint(rsp("contract_cnt")) >= 1 and cint(rsp("a_cnt")) >= 1 and cint(rsp("c_cnt")) >= 1 then ' <20><><EFBFBD>ȼ<EFBFBD> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ְ<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||
ret_val = "1"
|
||||
end if
|
||||
else '<27>뿪<EFBFBD><EBBFAA><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, Top-line/Brief <20><><EFBFBD><EFBFBD>
|
||||
if cint(rsp("a_cnt")) >= 1 and cint(rsp("b_cnt")) >= 1 and cint(rsp("c_cnt")) >= 1 then ' <20><><EFBFBD>ȼ<EFBFBD> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ְ<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>,
|
||||
if cint(rsp("contract_cnt")) >= 1 and cint(rsp("a_cnt")) >= 1 and cint(rsp("b_cnt")) >= 1 and cint(rsp("c_cnt")) >= 1 then ' <20><><EFBFBD>ȼ<EFBFBD> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ְ<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>,
|
||||
ret_val = "1"
|
||||
end if
|
||||
end if
|
||||
|
||||
@@ -559,7 +559,7 @@ end if
|
||||
query = query & " FROM T_PROJECT_BASE TPB "
|
||||
query = query & " LEFT OUTER JOIN T_PROJECT_METHOD TPM ON TPM.p_sn = TPB.p_sn /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> */ "
|
||||
query = query & " LEFT OUTER JOIN T_PROJECT_METHOD_CD TPMC ON TPM.p_method_cd = TPMC.p_method_cd /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD> */ "
|
||||
query = query & " LEFT OUTER JOIN V_Department D ON TPB.p_depart_dep = D.before_t_cd1 /* <20>μ<EFBFBD><CEBC>ڵ<EFBFBD> */ "
|
||||
query = query & " LEFT OUTER JOIN V_Department D ON ((ISNULL(TPB.p_depart_dep, '') = '0' AND ISNULL(TPB.p_Depart_N, '') = 'E' AND ISNULL(TPB.p_Team_N, '') = '101' AND TPM.p_rsch_dept = D.before_t_cd1) OR (NOT (ISNULL(TPB.p_depart_dep, '') = '0' AND ISNULL(TPB.p_Depart_N, '') = 'E' AND ISNULL(TPB.p_Team_N, '') = '101') AND (((ISNULL(TPB.p_Depart_N, '') + ISNULL(TPB.p_Team_N, '')) <> '' AND (ISNULL(TPB.p_Depart_N, '') + ISNULL(TPB.p_Team_N, '')) = D.Code) OR ((ISNULL(TPB.p_Depart_N, '') + ISNULL(TPB.p_Team_N, '')) = '' AND TPB.p_depart_dep = D.before_t_cd1)))) /* <20>μ<EFBFBD><CEBC>ڵ<EFBFBD> */ "
|
||||
query = query & " LEFT OUTER JOIN V_CLIENT_COMP TCC ON TPB.p_cli_company_cd = TCC.p_cli_company_cd /* ȸ<><C8B8><EFBFBD>ڵ<EFBFBD> <20><><EFBFBD><EFBFBD> */ "
|
||||
query = query & " LEFT OUTER JOIN T_SYSTEM_ATTACH TSA ON TPB.p_sn = TSA.f_p_sn AND f_use_yn = 'y' "
|
||||
query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD ON TSA.f_work_type = TCCD.c_kind_code AND TSA.f_kind = TCCD.c_common_code /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> */ "
|
||||
@@ -883,7 +883,7 @@ end if
|
||||
psql=psql&" left outer join V_CLIENT_COMP as E on PB.p_cli_company_cd = E.p_cli_company_cd "
|
||||
psql=psql&" left outer join V_CLIENT_PERSON as CP on PB.p_cli_company_cd = CP.p_cli_company_cd AND PB.p_cli_per_cd = CP.p_cli_per_cd "
|
||||
psql=psql&" left outer join T_CLIENT_TYPE_CD as CT on PB.p_client_type_cd = CT.p_client_type_cd "
|
||||
psql=psql&" INNER JOIN V_Department D ON PB.p_depart_dep = d.before_t_cd1 "
|
||||
psql=psql&" INNER JOIN V_Department D ON ((ISNULL(PB.p_Depart_N, '') + ISNULL(PB.p_Team_N, '')) <> '' AND (ISNULL(PB.p_Depart_N, '') + ISNULL(PB.p_Team_N, '')) = D.Code) OR ((ISNULL(PB.p_Depart_N, '') + ISNULL(PB.p_Team_N, '')) = '' AND PB.p_depart_dep = D.before_t_cd1) "
|
||||
psql=psql&" WHERE p_sn in ( "
|
||||
psql=psql&" select AA.p_sn from ("&query&") AA group by AA.p_sn "
|
||||
psql=psql&" ) "
|
||||
|
||||
@@ -92,7 +92,7 @@ End if
|
||||
<tr>
|
||||
<td colspan = "6">
|
||||
<table width="100%" height="37" cellpadding="0" cellspacing="1" border="0">
|
||||
<% If (Session("N_depart") = "M" And Session("N_team") = "101") Or (Session("N_depart") = "S" And Session("N_team") = "601") Then %>
|
||||
<% If (Session("N_depart") = "M" And Session("N_team") = "101") Or (Session("N_depart") = "S" And Session("N_team") = "601") Or (Session("User_Number") = "20250301") Then %>
|
||||
<tr>
|
||||
<td class="tit7" align="center" colspan="<%=Max_Col%>" style="cursor:pointer" onclick="openit('99999','<27>Ϲݾ<CFB9><DDBE><EFBFBD>','','','')"><3E>Ϲݾ<CFB9><DDBE><EFBFBD></td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user