746 lines
31 KiB
Plaintext
746 lines
31 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
||
<!-- #include virtual = "include/left.asp" -->
|
||
<%
|
||
Dim p_sn
|
||
|
||
project_document_flag = Request("project_document_flag")
|
||
|
||
'---------------------------------------
|
||
'p_sn¸¸µé±â
|
||
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>ÇÁ·ÎÁ§Æ® µî·Ï</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="ȸ»ç¸í"/>
|
||
<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">Á¦¾È¸í</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">¹ß»ý °æ·Î</th>
|
||
<td colspan="2">
|
||
<select name="p_contactor" id="p_contactor">
|
||
<option value="">¼±ÅÃ</option>
|
||
<option value="001">°ø°³ÀÔÂû</option>
|
||
<option value="002">Á¦¾È°æÀï</option>
|
||
<option value="003">°¡°ÝÀÔÂû</option>
|
||
<option value="004">¼öÀǰè¾à</option>
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th class="t_label" rowspan='6'>Ŭ¶óÀ̾ðÆ®</th>
|
||
<th class="t_label">ȸ»ç</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">ºÎ¼</th>
|
||
<td>
|
||
<input type='text' class='Client' name='p_cli_depart' id='p_cli_depart' readonly="readOnly"/>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th class="t_label">´ã´çÀÚ À̸§</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">ȸ»ç ÀüȹøÈ£</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">´ã´çÀÚ ÈÞ´ëÆù</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">À̸ÞÀÏ</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">Á¶»ç ±¹°¡</th>
|
||
<td>
|
||
<input type="radio" name="p_project_nation_cd" class="p_project_nation_cd" value="ko" checked> ±¹³» Á¶»ç
|
||
|
||
<input type="radio" name="p_project_nation_cd" class="p_project_nation_cd" value="fn" > ÇØ¿Ü Á¶»ç
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th class="t_label" colspan="2">¾÷Á¾</th>
|
||
<td>
|
||
<select name="p_client_type_cd" id="p_client_type_cd">
|
||
<option value="">¼±ÅÃ</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">¿¹»ó°è¾à¾×</th>
|
||
<td>
|
||
<input type='text' class='InputNumber' name='p_cont_cost' id='p_cont_cost' value=''/><label class="ui-widget ui-corner-all InputUnit">¿ø</label>(Vat¹ÌÆ÷ÇÔ)
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th class="t_label" colspan="2">¿¹»óÁ÷Á¢ºñÀ²</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">°áÁ¤¿¹Á¤ÀÏ</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">ºñ°í</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">ÀúÀå</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>Å»¶ô »çÀ¯</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>
|
||
// ³Ñ¾î¿Â °ªÀÌ ºó°ªÀÎÁö üũÇÕ´Ï´Ù.
|
||
// !value ÇÏ¸é »ý±â´Â ³í¸®Àû ¿À·ù¸¦ Á¦°ÅÇϱâ À§ÇØ
|
||
// ¸í½ÃÀûÀ¸·Î value == »ç¿ë
|
||
// [], {} µµ ºó°ªÀ¸·Î ó¸®
|
||
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();
|
||
|
||
//Ŭ¶óÀÌ¾ðÆ® 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() {
|
||
}
|
||
});
|
||
|
||
//Ŭ¶óÀÌ¾ðÆ® °Ë»ö
|
||
$("#ClientSearch").button().on("click", function() {
|
||
dialog.dialog( "open" );
|
||
});
|
||
|
||
//´ã´çÀÚ Ãß°¡
|
||
$(document).off('click', "#add").on('click', "#add",function(){
|
||
ClientAjax("CliInfo");
|
||
});
|
||
|
||
//´ã´çÀÚ ¼öÁ¤/ÀúÀå
|
||
$(document).off("click", "#addOk").on("click", "#addOk", function(){
|
||
|
||
if($("#cli_nm").val() == ""){
|
||
alert("´ã´çÀÚ¸íÀ» ÀÔ·ÂÇÏ¿© ÁֽʽÿÀ.");
|
||
$("#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("µî·Ï ¿Ï·á");
|
||
},
|
||
error:function(err){
|
||
alert("System Error\n°ü¸®ÀÚ ¹®ÀÇ");
|
||
console.log(err);
|
||
return false
|
||
}
|
||
|
||
});
|
||
CompanyAjax("CompanyPerson", $("#CompanyCode").val());
|
||
$(".cnm").text($(".cnm2").text());
|
||
$(".ClientAdd").empty();
|
||
$(".ClientAdd").css("display", "none");
|
||
});
|
||
|
||
//Ŭ¶óÀÌ¾ðÆ® °Ë»ö
|
||
$("#p_cli_company_nm").on("click",function(){
|
||
$("#ClientSearch").trigger("click");
|
||
});
|
||
|
||
//Ŭ¶óÀÌ¾ðÆ® °Ë»ö
|
||
$("#SearchText").keypress(function (e) {
|
||
if (e.which == 13){
|
||
$("#Search").trigger("click");
|
||
}
|
||
});
|
||
|
||
//Ŭ¶óÀÌ¾ðÆ® °Ë»ö
|
||
$("#Search").on("click",function(){
|
||
var flag = "CompanyList";
|
||
var SearchText = $("#SearchText").val();
|
||
if(SearchText == ""){
|
||
alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¿© ÁֽʽÿÀ.");
|
||
$("#SearchText").focus();
|
||
return false;
|
||
}
|
||
CompanyAjax(flag, SearchText);
|
||
$(".ClientAdd").empty();
|
||
});
|
||
|
||
//Ŭ¶óÀÌ¾ðÆ®»ç
|
||
$(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("ȸ»ç¸íÀ» Ŭ¸¯ÇÏ¿© ÁֽʽÿÀ.");
|
||
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("Ãß°¡ÇÏ½Ç Å¬¶óÀÌ¾ðÆ® È¸»ç¸íÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
|
||
return false;
|
||
}
|
||
$.ajax({
|
||
url:"cli_new_ok_2014.asp",
|
||
type:"POST",
|
||
data:{"comp_name" : escape($("#ComAddName").val())},
|
||
success:function(res){
|
||
if(res == "1"){
|
||
alert("Ŭ¶óÀÌ¾ðÆ® Ãß°¡ ¿Ï·áµÇ¾ú½À´Ï´Ù.");
|
||
$("#SearchText").val($("#ComAddName").val());
|
||
$("#Search").click();
|
||
}else if(res == "2"){
|
||
alert("ÀÌ¹Ì Á¸ÀçÇϴ Ŭ¶óÀÌ¾ðÆ® ÀÔ´Ï´Ù.");
|
||
}else{
|
||
alert("System Error\n°ü¸®ÀÚ ¹®ÀÇ");
|
||
}
|
||
},
|
||
error:function(err){
|
||
alert("System Error\n°ü¸®ÀÚ ¹®ÀÇ");
|
||
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%");
|
||
});
|
||
|
||
//Ŭ¶óÀÌ¾ðÆ® ¼±Åà or ¼öÁ¤
|
||
$(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');
|
||
}
|
||
}
|
||
});
|
||
|
||
//¿¹»ó°è¾à¾×
|
||
$("#p_cont_cost").on("keyup", function() {
|
||
$(this).val(addCommas($(this).val().replace(/[^0-9]/g,"")));
|
||
});
|
||
|
||
//¿¹»óÁ÷Á¢ºñÀ²
|
||
$("#p_cost_rate").on("keyup", function() {
|
||
$(this).val(addCommas($(this).val().replace(/[^0-9]/g,"")));
|
||
});
|
||
|
||
//°áÁ¤¿¹Á¤ÀÏ
|
||
$("#p_decide_date").datepicker({
|
||
changeYear: true,
|
||
changeMonth: true,
|
||
prevText: 'ÀÌÀü ´Þ',
|
||
nextText: '´ÙÀ½ ´Þ',
|
||
yearRange: '1900:+10',
|
||
dateFormat: "yy-mm-dd",
|
||
monthNames: ['1¿ù', '2¿ù', '3¿ù', '4¿ù', '5¿ù', '6¿ù', '7¿ù', '8¿ù', '9¿ù', '10¿ù', '11¿ù', '12¿ù'],
|
||
monthNamesShort: ['1¿ù', '2¿ù', '3¿ù', '4¿ù', '5¿ù', '6¿ù', '7¿ù', '8¿ù', '9¿ù', '10¿ù', '11¿ù', '12¿ù'],
|
||
showMonthAfterYear: true,
|
||
yearSuffix: '³â'
|
||
});
|
||
|
||
//ÇÁ·ÎÁ§Æ® µî·Ï
|
||
$("#ContactSave").on("click", function(){
|
||
|
||
if($("#p_sn").val() == ""){
|
||
alert("Á¦¾È¹øÈ£ »ý¼º ¿À·ù\n(»õ·Î°íħ ÈÄ)óÀ½ ºÎÅÍ ´Ù½Ã ÀÔ·Â ÇÏ¿©ÁֽʽÿÀ.");
|
||
return false;
|
||
}
|
||
|
||
if($("#p_subject").val() == ""){
|
||
alert("Á¦¾È¸íÀ» ÀÔ·ÂÇÏ¿© ÁֽʽÿÀ.");
|
||
return false;
|
||
}
|
||
|
||
if($("#p_contactor").val() == ""){
|
||
alert("¹ß»ý °æ·Î¸¦ ¼±ÅÃÇÏ¿© ÁֽʽÿÀ.");
|
||
return false;
|
||
}
|
||
|
||
if($("#p_cli_company_cd").val() == "" || $("#p_cli_company_nm").val() == ""){
|
||
alert("Ŭ¶óÀÌ¾ðÆ®¸¦ ÀÔ·ÂÇÏ¿© ÁֽʽÿÀ.");
|
||
return false;
|
||
}
|
||
|
||
|
||
if( isEmpty($('input[class=p_project_type_cd]:checked').val()) ){
|
||
alert("KRi ¶Ç´Â KRC¸¦ ¼±ÅÃÇÏ¿© ÁֽʽÿÀ.");
|
||
return false;
|
||
}
|
||
|
||
if( isEmpty($('input[class=p_project_nation_cd]:checked').val()) ){
|
||
alert("Á¶»ç±¹°¡¸¦ ¼±ÅÃÇÏ¿© ÁֽʽÿÀ.");
|
||
return false;
|
||
}
|
||
|
||
|
||
if($("#p_client_type_cd").val() == ""){
|
||
alert("¾÷Á¾À» ¼±ÅÃÇÏ¿© ÁֽʽÿÀ.");
|
||
return false;
|
||
}
|
||
|
||
if($("#p_cont_cost").val() == ""){
|
||
alert("¿¹»ó°è¾à¾×À» ¼±ÅÃÇÏ¿© ÁֽʽÿÀ.");
|
||
return false;
|
||
}
|
||
|
||
if($("#p_cost_rate").val() == "" || $("#p_cost_rate").val() == 0 ){
|
||
alert("¿¹»óÁ÷Á¢ºñÀ²À» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
|
||
return false;
|
||
}
|
||
|
||
//console.log("-------- test"); return false;
|
||
|
||
if($("#p_decide_date").val() == ""){
|
||
alert("°áÁ¤¿¹Á¤ÀÏÀ» ¼±ÅÃÇÏ¿© ÁֽʽÿÀ.");
|
||
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("µî·Ï ¿Ï·á");
|
||
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°ü¸®ÀÚ ¹®ÀÇ");
|
||
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("¿øº» ÆÄÀÏÀÌ ¿¢¼¿, ¿öµå, ÆÄ¿öÆ÷ÀÎÆ®, ÇѱÛÀÌ ¾Æ´Ñ °æ¿ì ÷ºÎ ºÒ°¡ ÇÕ´Ï´Ù.");
|
||
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°ü¸®ÀÚ ¹®ÀÇ");
|
||
return false
|
||
}
|
||
});
|
||
return flag;
|
||
}
|
||
|
||
});
|
||
</script>
|
||
</div>
|
||
<!-- /.content-wrapper -->
|
||
<!-- #include virtual = "include/footer.asp" --> |