최초커밋
This commit is contained in:
746
project/project_ContactReg.asp
Normal file
746
project/project_ContactReg.asp
Normal file
@@ -0,0 +1,746 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<%
|
||||
Dim p_sn
|
||||
|
||||
project_document_flag = Request("project_document_flag")
|
||||
|
||||
'---------------------------------------
|
||||
'p_sn<73><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if request("p_sn") <> "" then
|
||||
p_sn = request("p_sn")
|
||||
Else
|
||||
query = " SELECT isnull(max(cast(p_sn as int)),'0') as p_sn FROM T_PROJECT_BASE WHERE substring(p_sn, 0, 5) = CONVERT(CHAR(4), getdate(), 12) "&VbCrlf
|
||||
Rs.Open query, adoConn, 1
|
||||
if Rs.RecordCount > 0 then
|
||||
If Rs("p_sn") = "0" Then
|
||||
p_sn = right("0" & year(date()), 2) & right("0" & month(date()), 2) & "001"
|
||||
Else
|
||||
p_sn = Cdbl(Rs("p_sn"))+1
|
||||
End IF
|
||||
else
|
||||
p_sn = right("0" & year(date()), 2) & right("0" & month(date()), 2) & "001"
|
||||
end if
|
||||
Rs.Close
|
||||
End If
|
||||
%>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<style>
|
||||
table.contact {
|
||||
width:1000px;
|
||||
border:1px solid #dddddd;
|
||||
border-spacing:1px;
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
.contact td, th{
|
||||
border:1px solid #dddddd;
|
||||
}
|
||||
|
||||
tbody th.t_label{
|
||||
width:100px;
|
||||
text-align:center;
|
||||
vertical-align:middle;
|
||||
background-color:#eaeaea;
|
||||
}
|
||||
|
||||
.ComList{
|
||||
border:1px solid #dddddd;
|
||||
cursor:pointer;
|
||||
}
|
||||
.ComList:hover{
|
||||
background-color:#fed600;
|
||||
}
|
||||
|
||||
.PerList{
|
||||
width:100%;
|
||||
border:1px solid #dddddd;
|
||||
border-spacing:1px;
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
.PerList tbody tr:hover{
|
||||
background-color:#fed600;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
.PerAdd{
|
||||
width:100%;
|
||||
border:1px solid #dddddd;
|
||||
border-spacing:1px;
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
textarea{
|
||||
width:100%;
|
||||
height:300px;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
input{
|
||||
vertical-align: middle;
|
||||
margin-right: -4px;
|
||||
font-size: 12px;
|
||||
outline:none;
|
||||
}
|
||||
select{
|
||||
vertical-align: middle;
|
||||
/*margin-right: -4px;*/
|
||||
font-size: 12px;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
.inputBtn{
|
||||
border-bottom-left-radius: 0px;
|
||||
border-top-left-radius: 0px;
|
||||
font-size: 6px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.InputUnit{
|
||||
background:#f6f6f6;
|
||||
border: 1px solid #c5c5c5;
|
||||
border-bottom-left-radius: 0px;
|
||||
border-top-left-radius: 0px;
|
||||
vertical-align: middle;
|
||||
padding: .1em 1em;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin-left:3px;
|
||||
}
|
||||
.InputNumber{
|
||||
text-align:right;
|
||||
}
|
||||
legend{
|
||||
font-weight:bold;
|
||||
font-size:14px;
|
||||
}
|
||||
fieldset > label {
|
||||
margin: 3px 3px;
|
||||
}
|
||||
.SaveWarp{
|
||||
width:100%;
|
||||
margin: 15px 0px;
|
||||
}
|
||||
|
||||
.SaveContainer{
|
||||
width:1000px;
|
||||
text-align:center;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.SaveContainer button{
|
||||
margin: 0px 5px;
|
||||
}
|
||||
|
||||
#p_subject{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.ClientAdd {
|
||||
display:none;
|
||||
}
|
||||
|
||||
label{
|
||||
margin-bottom:0;
|
||||
}
|
||||
|
||||
input[type=text], input[type=number], textarea, select{
|
||||
border:1px solid #c5c5c5;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<h1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD></h1>
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
<!-- Main content -->
|
||||
<div class="content-body">
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div id="dialog-form" title="Client Search">
|
||||
<input type="hidden" name="CompanyCode" id="CompanyCode" />
|
||||
<input type="hidden" name="CompanyName" id="CompanyName" />
|
||||
<fieldset>
|
||||
<input type="text" name="SearchText" id="SearchText" value="" placeholder="ȸ<><C8B8><EFBFBD><EFBFBD>"/>
|
||||
<label>
|
||||
<button type="button" class="ui-button ui-widget ui-corner-all" id="Search"><span class="ui-icon ui-icon-search" ></span></button>
|
||||
</label>
|
||||
</fieldset>
|
||||
<fieldset class="ClientList">
|
||||
</fieldset>
|
||||
<fieldset class="ClientAdd">
|
||||
</fieldset>
|
||||
</div>
|
||||
<form id="proposalForm" name="pms" method="post">
|
||||
<table class='contact'>
|
||||
<tbody class="ui-widget-content">
|
||||
<tr>
|
||||
<th class="t_label" colspan="2"><3E><><EFBFBD>ȸ<EFBFBD></th>
|
||||
<td>
|
||||
<input type='hidden' name='p_sn' id= 'p_sn' value='<%=p_sn %>' />
|
||||
<input type='text' class='txt-md' name='p_subject' id='p_subject' value=''/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="t_label" colspan="2"><3E><EFBFBD> <20><><EFBFBD><EFBFBD></th>
|
||||
<td colspan="2">
|
||||
<select name="p_contactor" id="p_contactor">
|
||||
<option value=""><3E><><EFBFBD><EFBFBD></option>
|
||||
<option value="001"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
||||
<option value="002"><3E><><EFBFBD>Ȱ<EFBFBD><C8B0><EFBFBD></option>
|
||||
<option value="003"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
||||
<option value="004"><3E><><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="t_label" rowspan='6'>Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ</th>
|
||||
<th class="t_label">ȸ<><C8B8></th>
|
||||
<td>
|
||||
<input type='hidden' name='p_cli_company_cd' id='p_cli_company_cd'/>
|
||||
<input type='text' name='p_cli_company_nm' id='p_cli_company_nm' readonly="readonly"/>
|
||||
<button type="button" class="ui-button ui-widget ui-corner-all inputBtn" id="ClientSearch"><span class="ui-icon ui-icon-search"></span></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="t_label"><3E>μ<EFBFBD></th>
|
||||
<td>
|
||||
<input type='text' class='Client' name='p_cli_depart' id='p_cli_depart' readonly="readOnly"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="t_label"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD></th>
|
||||
<td>
|
||||
<input type='hidden' class='Client' name='p_cli_per_cd' id='p_cli_per_cd' readonly="readOnly"/>
|
||||
<input type='text' class='Client' name='p_cli_per_nm' id='p_cli_per_nm' readonly="readOnly"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="t_label">ȸ<><C8B8> <20><>ȭ<EFBFBD><C8AD>ȣ</th>
|
||||
<td>
|
||||
<input type='text' class='Client' name='p_cli_per_com_tel' id='p_cli_per_com_tel' readonly="readOnly"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="t_label"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DEB4><EFBFBD></th>
|
||||
<td>
|
||||
<input type='text' class='Client' name='p_cli_per_tel' id='p_cli_per_tel' readonly="readOnly"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="t_label"><3E≯<EFBFBD><CCB8><EFBFBD></th>
|
||||
<td>
|
||||
<input type='text' class='Client' name='p_cli_per_email' id='p_cli_per_email' readonly="readOnly"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="t_label" colspan="2">KRi or KRC or KRD</th>
|
||||
<td>
|
||||
<input type="radio" name="p_project_type_cd" class="p_project_type_cd" value="kri" checked> KRi
|
||||
|
||||
<input type="radio" name="p_project_type_cd" class="p_project_type_cd" value="krc" > KRC
|
||||
|
||||
<input type="radio" name="p_project_type_cd" class="p_project_type_cd" value="krd" > KRD
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="t_label" colspan="2"><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></th>
|
||||
<td>
|
||||
<input type="radio" name="p_project_nation_cd" class="p_project_nation_cd" value="ko" checked> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
<input type="radio" name="p_project_nation_cd" class="p_project_nation_cd" value="fn" > <20>ؿ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="t_label" colspan="2"><3E><><EFBFBD><EFBFBD></th>
|
||||
<td>
|
||||
<select name="p_client_type_cd" id="p_client_type_cd">
|
||||
<option value=""><3E><><EFBFBD><EFBFBD></option>
|
||||
<%
|
||||
query = " select p_client_type_cd, p_client_type_nm from project2.dbo.T_CLIENT_TYPE_CD where p_client_type_yn='y' "
|
||||
Rs.Open query, adoConn, 1
|
||||
if not Rs.eof Then
|
||||
while not Rs.eof
|
||||
Response.Write "<option value='"&Rs("p_client_type_cd")&"'>"&Rs("p_client_type_nm")&"</option>"
|
||||
Rs.movenext
|
||||
wend
|
||||
End If
|
||||
Rs.close
|
||||
%>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="t_label" colspan="2"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
|
||||
<td>
|
||||
<input type='text' class='InputNumber' name='p_cont_cost' id='p_cont_cost' value=''/><label class="ui-widget ui-corner-all InputUnit"><3E><></label>(Vat<61><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="t_label" colspan="2"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
|
||||
<td>
|
||||
<input type='number' class='InputNumber' name='p_cost_rate' id='p_cost_rate' value=''/><label class="ui-widget ui-corner-all InputUnit">%</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="t_label" colspan="2"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
|
||||
<td>
|
||||
<input type='text' class='txt-xsm' name='p_decide_date' id='p_decide_date' value='' readOnly="readOnly"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="t_label" colspan="2"><3E><><EFBFBD><EFBFBD></th>
|
||||
<td>
|
||||
<textarea class='txt-lg' name="p_memo" id="p_memo"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="SaveWarp">
|
||||
<div class="SaveContainer" style="width: 1000px;">
|
||||
<button type='button' class="ui-button ui-widget ui-corner-all" name="ContactSave" id="ContactSave"><3E><><EFBFBD><EFBFBD></button>
|
||||
</div>
|
||||
</div>
|
||||
<% if p_state = "X" then %>
|
||||
<div style="z-index:10;position:absolute; top:120px; left:720px;;width:340px;height:320px;background-color:#F8E0E0;">
|
||||
<div style="z-index:100;position:absolute; top:5px; left:5px;width:330px;height:310px;background-color:#FFFFFF;">
|
||||
<table style="z-index:150;position:absolute; top:25px; left:25px;;width:280px;height:260px;background-color:#E6E6E6;" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td align="center" style="font-family:'malgun gothic';"><font color="red" size="3"><b>Ż<><C5BB> <20><><EFBFBD><EFBFBD></b></font></td>
|
||||
</tr>
|
||||
<tr height="180px">
|
||||
<td align="LEFT" style="font-family:'malgun gothic';">
|
||||
<div style="z-index:200;position:absolute; top:60px; left:3px;width:250px;height:170px;background-color:#FFFFFF;margin:15px;overflow:auto;">
|
||||
<%=replace(p_drop_reason, chr(13), "<br>") %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<% end if %>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
// <20>Ѿ<EFBFBD><D1BE><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ<C3BC>մϴ<D5B4>.
|
||||
// !value <20>ϸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> value == <20><><EFBFBD><EFBFBD>
|
||||
// [], {} <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3>
|
||||
var isEmpty = function(value){
|
||||
if( value == "" || value == null || value == undefined || ( value != null && typeof value == "object" && !Object.keys(value).length ) ){
|
||||
return true
|
||||
}else{
|
||||
return false
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
$("input[type='text']").attr("autocomplete","off");
|
||||
$(".widget").find("input").checkboxradio();
|
||||
|
||||
//Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ Dialog
|
||||
var dialog = $("#dialog-form").dialog({
|
||||
autoOpen: false,
|
||||
height: 400,
|
||||
width: 350,
|
||||
modal: true,
|
||||
beforeClose: function() {
|
||||
$("#dialog-form").find("input").val("");
|
||||
$(".ClientList").empty();
|
||||
$(".ClientAdd").empty();
|
||||
$(".ClientAdd").css("display","none");
|
||||
},
|
||||
buttons: {
|
||||
Cancel: function() {
|
||||
$("#dialog-form").find("input").val("");
|
||||
$(".ClientList").empty();
|
||||
$(".ClientAdd").empty();
|
||||
$(".ClientAdd").css("display","none");
|
||||
dialog.dialog( "close" );
|
||||
}
|
||||
},
|
||||
close: function() {
|
||||
}
|
||||
});
|
||||
|
||||
//Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20>˻<EFBFBD>
|
||||
$("#ClientSearch").button().on("click", function() {
|
||||
dialog.dialog( "open" );
|
||||
});
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD>
|
||||
$(document).off('click', "#add").on('click', "#add",function(){
|
||||
ClientAjax("CliInfo");
|
||||
});
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>
|
||||
$(document).off("click", "#addOk").on("click", "#addOk", function(){
|
||||
|
||||
if($("#cli_nm").val() == ""){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD> <20>Է<EFBFBD><D4B7>Ͽ<EFBFBD> <20>ֽʽÿ<CABD>.");
|
||||
$("#cli_nm").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
var p_flag;
|
||||
if($("#cli_per_cd").val() == ""){
|
||||
p_flag="CliPerson";
|
||||
}else{
|
||||
p_flag="CliEdit";
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url:"project_AjaxCliSave.asp",
|
||||
type:"POST",
|
||||
async:false,
|
||||
data:{
|
||||
"flag" : p_flag,
|
||||
"p_cli_company_cd": $("#CompanyCode").val(),
|
||||
"p_cli_per_cd": $("#cli_per_cd").val(),
|
||||
"cli_depart": escape($("#cli_depart").val()),
|
||||
"cli_nm": escape($("#cli_nm").val()),
|
||||
"cli_tel": $("#cli_tel").val(),
|
||||
"cli_phone": $("#cli_phone").val(),
|
||||
"cli_email": $("#cli_email").val(),
|
||||
},
|
||||
success:function(res){
|
||||
alert("<22><><EFBFBD><EFBFBD> <20>Ϸ<EFBFBD>");
|
||||
},
|
||||
error:function(err){
|
||||
alert("System Error\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
||||
console.log(err);
|
||||
return false
|
||||
}
|
||||
|
||||
});
|
||||
CompanyAjax("CompanyPerson", $("#CompanyCode").val());
|
||||
$(".cnm").text($(".cnm2").text());
|
||||
$(".ClientAdd").empty();
|
||||
$(".ClientAdd").css("display", "none");
|
||||
});
|
||||
|
||||
//Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20>˻<EFBFBD>
|
||||
$("#p_cli_company_nm").on("click",function(){
|
||||
$("#ClientSearch").trigger("click");
|
||||
});
|
||||
|
||||
//Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20>˻<EFBFBD>
|
||||
$("#SearchText").keypress(function (e) {
|
||||
if (e.which == 13){
|
||||
$("#Search").trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
//Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20>˻<EFBFBD>
|
||||
$("#Search").on("click",function(){
|
||||
var flag = "CompanyList";
|
||||
var SearchText = $("#SearchText").val();
|
||||
if(SearchText == ""){
|
||||
alert("<22>˻<EFBFBD><CBBB> <20>Է<EFBFBD><D4B7>Ͽ<EFBFBD> <20>ֽʽÿ<CABD>.");
|
||||
$("#SearchText").focus();
|
||||
return false;
|
||||
}
|
||||
CompanyAjax(flag, SearchText);
|
||||
$(".ClientAdd").empty();
|
||||
});
|
||||
|
||||
//Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE>
|
||||
$(document).off("click",".ComList").on("click",".ComList",function(){
|
||||
var flag = "CompanyPerson";
|
||||
var CompanyCode = $(this).find("input").val();
|
||||
var CompanyName = $(this).text();
|
||||
$("#CompanyCode").val(CompanyCode);
|
||||
$("#CompanyName").val(CompanyName);
|
||||
if (CompanyName == ""){
|
||||
alert("ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD>Ͽ<EFBFBD> <20>ֽʽÿ<CABD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
CompanyAjax(flag, CompanyCode);
|
||||
$(".Cnm").text(CompanyName);
|
||||
|
||||
});
|
||||
|
||||
$(document).off("click","#ComAddBtn").on("click","#ComAddBtn",function(){
|
||||
if($("#ComAddCancleBtn").is(":visible")){
|
||||
if($("#ComAddName").val().trim() == ""){
|
||||
alert("<22>߰<EFBFBD><DFB0>Ͻ<EFBFBD> Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Է<EFBFBD><D4B7><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
url:"cli_new_ok_2014.asp",
|
||||
type:"POST",
|
||||
data:{"comp_name" : escape($("#ComAddName").val())},
|
||||
success:function(res){
|
||||
if(res == "1"){
|
||||
alert("Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20>߰<EFBFBD> <20>Ϸ<EFBFBD><CFB7>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
$("#SearchText").val($("#ComAddName").val());
|
||||
$("#Search").click();
|
||||
}else if(res == "2"){
|
||||
alert("<22>̹<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20>Դϴ<D4B4>.");
|
||||
}else{
|
||||
alert("System Error\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
||||
}
|
||||
},
|
||||
error:function(err){
|
||||
alert("System Error\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
||||
console.log(err);
|
||||
return false
|
||||
},
|
||||
complete:function(){
|
||||
$("#ComAddCancleBtn").hide();
|
||||
$("#ComAddName").hide();
|
||||
$("#ComAddBtn").css("width", "100%");
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$("#ComAddCancleBtn").show();
|
||||
$("#ComAddName").show();
|
||||
$(this).css("width", "20%");
|
||||
$("#ComAddName").focus();
|
||||
}
|
||||
});
|
||||
$(document).off("click","#ComAddCancleBtn").on("click","#ComAddCancleBtn",function(){
|
||||
$("#ComAddCancleBtn").hide();
|
||||
$("#ComAddName").hide();
|
||||
$("#ComAddBtn").css("width", "100%");
|
||||
});
|
||||
|
||||
//Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> or <20><><EFBFBD><EFBFBD>
|
||||
$(document).off("click",".PerList tbody > tr").on("click",".PerList tbody > tr", function(e){
|
||||
//console.log(e.target.tagName);
|
||||
if(e.target.tagName == 'BUTTON'){
|
||||
ClientAjax("CliInfo",$(this).find("input[name=PerCode]").val());
|
||||
}else{
|
||||
$("#p_cli_company_cd").val($("#CompanyCode").val());
|
||||
$("#p_cli_company_nm").val($("#CompanyName").val());
|
||||
if ($(this).find("input").length == 0){
|
||||
$(".Client").val("");
|
||||
$('#dialog-form').dialog('close');
|
||||
}else{
|
||||
$(this).find("input").each(function(e){
|
||||
$(".Client").eq(e).val($(this).val());
|
||||
});
|
||||
$('#dialog-form').dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
$("#p_cont_cost").on("keyup", function() {
|
||||
$(this).val(addCommas($(this).val().replace(/[^0-9]/g,"")));
|
||||
});
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
$("#p_cost_rate").on("keyup", function() {
|
||||
$(this).val(addCommas($(this).val().replace(/[^0-9]/g,"")));
|
||||
});
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
$("#p_decide_date").datepicker({
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
prevText: '<27><><EFBFBD><EFBFBD> <20><>',
|
||||
nextText: '<27><><EFBFBD><EFBFBD> <20><>',
|
||||
yearRange: '1900:+10',
|
||||
dateFormat: "yy-mm-dd",
|
||||
monthNames: ['1<><31>', '2<><32>', '3<><33>', '4<><34>', '5<><35>', '6<><36>', '7<><37>', '8<><38>', '9<><39>', '10<31><30>', '11<31><31>', '12<31><32>'],
|
||||
monthNamesShort: ['1<><31>', '2<><32>', '3<><33>', '4<><34>', '5<><35>', '6<><36>', '7<><37>', '8<><38>', '9<><39>', '10<31><30>', '11<31><31>', '12<31><32>'],
|
||||
showMonthAfterYear: true,
|
||||
yearSuffix: '<27><>'
|
||||
});
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>
|
||||
$("#ContactSave").on("click", function(){
|
||||
|
||||
if($("#p_sn").val() == ""){
|
||||
alert("<22><><EFBFBD>ȹ<EFBFBD>ȣ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>\n(<28><><EFBFBD>ΰ<EFBFBD>ħ <20><>)ó<><C3B3> <20><><EFBFBD><EFBFBD> <20>ٽ<EFBFBD> <20>Է<EFBFBD> <20>Ͽ<EFBFBD><CFBF>ֽʽÿ<CABD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#p_subject").val() == ""){
|
||||
alert("<22><><EFBFBD>ȸ<EFBFBD><C8B8><EFBFBD> <20>Է<EFBFBD><D4B7>Ͽ<EFBFBD> <20>ֽʽÿ<CABD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#p_contactor").val() == ""){
|
||||
alert("<22><EFBFBD> <20><><EFBFBD>θ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20>ֽʽÿ<CABD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#p_cli_company_cd").val() == "" || $("#p_cli_company_nm").val() == ""){
|
||||
alert("Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE> <20>Է<EFBFBD><D4B7>Ͽ<EFBFBD> <20>ֽʽÿ<CABD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if( isEmpty($('input[class=p_project_type_cd]:checked').val()) ){
|
||||
alert("KRi <20>Ǵ<EFBFBD> KRC<52><43> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20>ֽʽÿ<CABD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if( isEmpty($('input[class=p_project_nation_cd]:checked').val()) ){
|
||||
alert("<22><><EFBFBD>籹<EFBFBD><E7B1B9><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20>ֽʽÿ<CABD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if($("#p_client_type_cd").val() == ""){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20>ֽʽÿ<CABD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#p_cont_cost").val() == ""){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20>ֽʽÿ<CABD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#p_cost_rate").val() == "" || $("#p_cost_rate").val() == 0 ){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Է<EFBFBD><D4B7><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
//console.log("-------- test"); return false;
|
||||
|
||||
if($("#p_decide_date").val() == ""){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20>ֽʽÿ<CABD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#p_subject").val(escape($("#p_subject").val()));
|
||||
$("#p_memo").val(escape($("#p_memo").val()));
|
||||
$("#p_cli_company_nm").val(escape($("#p_cli_company_nm").val()));
|
||||
$("#p_cli_depart").val(escape($("#p_cli_depart").val()));
|
||||
$("#p_cli_per_nm").val(escape($("#p_cli_per_nm").val()));
|
||||
|
||||
$("#proposalForm").ajaxSubmit({
|
||||
type:"POST",
|
||||
url:"project_AjaxSave.asp",
|
||||
success:function(data){
|
||||
$("#p_subject").val(unescape($("#p_subject").val()));
|
||||
$("#p_memo").val(unescape($("#p_memo").val()));
|
||||
$("#p_cli_company_nm").val(unescape($("#p_cli_company_nm").val()));
|
||||
$("#p_cli_depart").val(unescape($("#p_cli_depart").val()));
|
||||
$("#p_cli_per_nm").val(unescape($("#p_cli_per_nm").val()));
|
||||
alert("<22><><EFBFBD><EFBFBD> <20>Ϸ<EFBFBD>");
|
||||
location.href="project_ContactList.asp";
|
||||
},
|
||||
error:function(err){
|
||||
$("#p_subject").val(unescape($("#p_subject").val()));
|
||||
$("#p_memo").val(unescape($("#p_memo").val()));
|
||||
$("#p_cli_company_nm").val(unescape($("#p_cli_company_nm").val()));
|
||||
$("#p_cli_depart").val(unescape($("#p_cli_depart").val()));
|
||||
$("#p_cli_per_nm").val(unescape($("#p_cli_per_nm").val()));
|
||||
alert("System Error\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
function CompanyAjax(flag, Search){
|
||||
$.ajax({
|
||||
url:"project_AjaxSelect.asp",
|
||||
method:"POST",
|
||||
data:{"Flag":flag, "Search":escape(Search)},
|
||||
contentType:"application/x-www-form-urlencoded; charset=euc-kr",
|
||||
async:false,
|
||||
success:function(res){
|
||||
$(".ClientList").html(res);
|
||||
},
|
||||
error:function(err){
|
||||
alert("System Error");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function ClientAjax(flag,p_cli_per_cd){
|
||||
$.ajax({
|
||||
url:"project_AjaxCliSave.asp",
|
||||
method:"POST",
|
||||
data:{
|
||||
"p_cli_per_cd":p_cli_per_cd,
|
||||
"p_client_type_cd":$("#p_client_type_cd").val(),
|
||||
"cli_depart":$("#cli_depart").val(),
|
||||
"cli_nm":$("#cli_nm").val(),
|
||||
"cli_tel":$("#cli_tel").val(),
|
||||
"cli_phone":$("#cli_phone").val(),
|
||||
"cli_email":$("#cli_email").val(),
|
||||
"flag":flag
|
||||
},
|
||||
contentType:"application/x-www-form-urlencoded; charset=euc-kr",
|
||||
async:false,
|
||||
success:function(res){
|
||||
$(".ClientAdd").append(res);
|
||||
$(".cnm2").text($(".cnm").text());
|
||||
$(".ClientList").empty();
|
||||
$(".ClientAdd").css("display", "block");
|
||||
},
|
||||
error:function(err){
|
||||
alert("System Error");
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function addCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function FileExtCheck(data){
|
||||
|
||||
var FileExt = data.split('.').pop().toString();
|
||||
|
||||
if($.inArray(FileExt,['xls',"xlsx","doc","docx","ppt","pptx","hwp"]) == -1){
|
||||
alert("<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>, <20>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD>Ʈ, <20>ѱ<EFBFBD><D1B1><EFBFBD> <20>ƴ<EFBFBD> <20><><EFBFBD><EFBFBD> ÷<><C3B7> <20>Ұ<EFBFBD> <20>մϴ<D5B4>.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function FileUpload(kind,data){
|
||||
var FileData = data;
|
||||
var f_kind = parseInt(kind)+1;
|
||||
var formData = new FormData();
|
||||
formData.append("f_work_type","001");
|
||||
formData.append("f_kind","00"+f_kind);
|
||||
formData.append("p_sn",$("#p_sn").val());
|
||||
formData.append("File",FileData);
|
||||
var flag = false;
|
||||
$.ajax({
|
||||
url: 'project_AjaxFileSave.asp',
|
||||
processData:false,
|
||||
contentType:false,
|
||||
data:formData,
|
||||
async:false,
|
||||
type:'POST',
|
||||
success:function(result){
|
||||
flag = true;
|
||||
},
|
||||
error:function(err){
|
||||
alert("system Error\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
||||
return false
|
||||
}
|
||||
});
|
||||
return flag;
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
Reference in New Issue
Block a user