온라인/혼합일 경우 : 소속 선택 시 오프라인>비환급과 마찬가지로 팝업을 띄우는 것이 아닌,
아래에 회사정보 확인 칸 출력
This commit is contained in:
parent
18f86bbe4b
commit
cd46c38e8a
|
|
@ -297,27 +297,10 @@ namespace NP.Base.Controllers
|
||||||
}
|
}
|
||||||
else if (isCompany == 1) //업체
|
else if (isCompany == 1) //업체
|
||||||
{
|
{
|
||||||
//강의유형 온라인 or 혼합(온+오프)
|
//업체인데 회사정보가 안넘어오면 에러처리
|
||||||
if (ppllog.cshape == 0 || ppllog.cshape == 2)
|
if (vm.Assign == null)
|
||||||
{
|
{
|
||||||
ppllog.asno = vm.asno;
|
return JsonNoData();
|
||||||
vm.Assign = Dao.Get<Assign>("cm.assign.applyedu.byasno", new Hashtable() { { "asno", vm.asno } }).FirstOrDefault();
|
|
||||||
if (vm.Assign != null)
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(vm.Assign.MphoneFormat) && vm.Assign.MphoneFormat.IndexOf("-") >= 0)
|
|
||||||
{
|
|
||||||
string[] mphoneArr = vm.Assign.MphoneFormat.Split('-');
|
|
||||||
vm.Assign.mphone1 = mphoneArr.Length > 0 ? mphoneArr[0] : string.Empty;
|
|
||||||
vm.Assign.mphone2 = mphoneArr.Length > 1 ? mphoneArr[1] : string.Empty;
|
|
||||||
vm.Assign.mphone3 = mphoneArr.Length > 2 ? mphoneArr[2] : string.Empty;
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(vm.Assign.taxemail) && vm.Assign.taxemail.IndexOf("@") >= 0)
|
|
||||||
{
|
|
||||||
string[] taxemailArr = vm.Assign.taxemail.Split('@');
|
|
||||||
vm.Assign.taxemail1 = taxemailArr.Length > 0 ? taxemailArr[0] : string.Empty;
|
|
||||||
vm.Assign.taxemail2 = taxemailArr.Length > 1 ? taxemailArr[1] : string.Empty;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
|
|
@ -135,10 +135,10 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>업체/개인 선택</th>
|
<th>업체/개인 선택</th>
|
||||||
<td>
|
<td>
|
||||||
<input type="radio" name="isCompany" id="isCompany1" value="1" @(Model.Assign.asno != 0 ? "checked" : "") /><label for="isCompany1"> 업체</label>
|
<ul class="bakRadio">
|
||||||
<input type="hidden" name="asno" id="asno" value="@(Model.Assign.asno)">
|
<li><input type="radio" name="isCompany" id="isCompany1" value="1" @(Model.Assign.asno != 0 ? "checked" : "") /><label for="isCompany1"> 업체</label></li>
|
||||||
<input type="text" id="asname" name="asname" placeholder="" readonly="readonly" value="@(Model.Assign.asname)" style="background-color:#ddd;" />
|
<li><input type="radio" name="isCompany" id="isCompany0" value="0" @(Model.Assign.asno != 0 ? "" : "checked") /><label for="isCompany0"> 개인</label></li>
|
||||||
<input type="radio" name="isCompany" id="isCompany0" value="0" @(Model.Assign.asno != 0 ? "" : "checked") style="padding-left:5px" /><label for="isCompany0"> 개인</label>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
@ -183,7 +183,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>*회사명</th>
|
<th>*회사명</th>
|
||||||
<td>
|
<td>
|
||||||
@Html.TextBoxFor(x => x.Assign.asname, new { @class = "apylpt", @maxlength = "100" })
|
@Html.TextBoxFor(x => x.Assign.asname, new { @class = "apylpt", @maxlength = "100", @style = "background-color:#ddd;", @readonly = true })
|
||||||
<a href="#" id="btnassign" class="btnassign">검색</a>
|
<a href="#" id="btnassign" class="btnassign">검색</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -444,17 +444,9 @@
|
||||||
|
|
||||||
$("input:radio[name='isCompany']").on("click", function () {
|
$("input:radio[name='isCompany']").on("click", function () {
|
||||||
if ($(this).val() == "0") {
|
if ($(this).val() == "0") {
|
||||||
$("#asno").val("");
|
|
||||||
$("#asname").val("");
|
|
||||||
$(".div-companyInfo").hide();
|
$(".div-companyInfo").hide();
|
||||||
} else {
|
} else {
|
||||||
if (model.cm.cshape == 1) {
|
|
||||||
$(".div-companyInfo").show();
|
$(".div-companyInfo").show();
|
||||||
} else {
|
|
||||||
if (model.isloaded) {
|
|
||||||
boxassignview();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -464,7 +456,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#btnassign").on("click", function () {
|
$("#btnassign").on("click", function () {
|
||||||
boxassignview(bindassign2);
|
boxassignview(bindassign);
|
||||||
});
|
});
|
||||||
|
|
||||||
initControl();
|
initControl();
|
||||||
|
|
@ -482,16 +474,12 @@
|
||||||
}, 300);
|
}, 300);
|
||||||
|
|
||||||
if (model.cm.cshape == 0) {
|
if (model.cm.cshape == 0) {
|
||||||
$(".div-companyInfo").hide();
|
|
||||||
$(".div-isCompany").show();
|
$(".div-isCompany").show();
|
||||||
$(".uduty").hide();
|
$(".uduty").hide();
|
||||||
} else if (model.cm.cshape == 1) {
|
} else if (model.cm.cshape == 1) {
|
||||||
$(".div-companyInfo").show();
|
|
||||||
$(".div-isCompany").hide();
|
$(".div-isCompany").hide();
|
||||||
$(".uduty").show();
|
$(".uduty").show();;
|
||||||
$("#asname").hide();
|
|
||||||
} else if (model.cm.cshape == 2) {
|
} else if (model.cm.cshape == 2) {
|
||||||
$(".div-companyInfo").hide();
|
|
||||||
$(".div-isCompany").show();
|
$(".div-isCompany").show();
|
||||||
$(".uduty").hide();
|
$(".uduty").hide();
|
||||||
}
|
}
|
||||||
|
|
@ -514,25 +502,19 @@
|
||||||
|
|
||||||
if (model.assign.asno == 0) {
|
if (model.assign.asno == 0) {
|
||||||
$("#btnassign").show();
|
$("#btnassign").show();
|
||||||
$("#Assign_asname").prop("readonly", true);
|
$(".div-companyInfo").hide();
|
||||||
$("#Assign_asname").css("background-color", "#ddd");
|
|
||||||
} else {
|
} else {
|
||||||
$("#btnassign").hide();
|
$("#btnassign").hide();
|
||||||
$("#Assign_asname").prop("readonly", false);
|
$(".div-companyInfo").show();
|
||||||
$("#Assign_asname").css("background-color", "#fff");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function bindassign(v) {
|
function bindassign(v) {
|
||||||
$("#asno").val(v.split(':')[0]);
|
|
||||||
$("#asname").val(v.split(':')[1]);
|
|
||||||
}
|
|
||||||
function bindassign2(v) {
|
|
||||||
$("#Assign_asno").val(v.split(':')[0]);
|
$("#Assign_asno").val(v.split(':')[0]);
|
||||||
$("#Assign_asname").val(v.split(':')[1]);
|
$("#Assign_asname").val(v.split(':')[1]);
|
||||||
|
|
||||||
capp("/fcommon/getassign", { asno: $("#Assign_asno").val() }, "cbbindassign2");
|
capp("/fcommon/getassign", { asno: $("#Assign_asno").val() }, "cbbindassign");
|
||||||
}
|
}
|
||||||
function cbbindassign2() {
|
function cbbindassign() {
|
||||||
if (capResult.code == 1000) {
|
if (capResult.code == 1000) {
|
||||||
var mphone = String(capResult.obj.mphone).split("-");
|
var mphone = String(capResult.obj.mphone).split("-");
|
||||||
var mphone1 = mphone.length > 0 ? mphone[0] : "";
|
var mphone1 = mphone.length > 0 ? mphone[0] : "";
|
||||||
|
|
@ -618,7 +600,7 @@
|
||||||
if (isrebate) {
|
if (isrebate) {
|
||||||
isCompanyInfoCheck = true;
|
isCompanyInfoCheck = true;
|
||||||
}
|
}
|
||||||
else if (model.cm.cshape == 1 && isCompany) {
|
else if (isCompany) {
|
||||||
isCompanyInfoCheck = true;
|
isCompanyInfoCheck = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -639,7 +621,6 @@
|
||||||
else if (isCompanyInfoCheck && !ismobilenumber(assign_mphone)) { focus("Assign_mphone1"); msg("담당자연락처를 확인해주세요."); }
|
else if (isCompanyInfoCheck && !ismobilenumber(assign_mphone)) { focus("Assign_mphone1"); msg("담당자연락처를 확인해주세요."); }
|
||||||
else if (isCompanyInfoCheck && (check("Assign_taxemail1", null, "계산서받을 이메일을 등록해주세요.") || check("Assign_taxemail2", null, "계산서받을 이메일을 등록해주세요."))) { }
|
else if (isCompanyInfoCheck && (check("Assign_taxemail1", null, "계산서받을 이메일을 등록해주세요.") || check("Assign_taxemail2", null, "계산서받을 이메일을 등록해주세요."))) { }
|
||||||
else if (isCompanyInfoCheck && !isemail(assign_taxemail)) { focus("Assign_taxemail1"); msg("올바른 이메일주소를 입력해주세요."); }
|
else if (isCompanyInfoCheck && !isemail(assign_taxemail)) { focus("Assign_taxemail1"); msg("올바른 이메일주소를 입력해주세요."); }
|
||||||
else if (!isrebate && (isCompany && model.cm.cshape != 1) && $("#asname").val() == "") { msg("업체를 선택해주세요.", null, null, null, "boxassignview()"); }
|
|
||||||
else if (check("User_userpno1", null, "주민등록번호 앞자리를 입력하십시오.") || check("User_userpno2", null, "주민등록번호 뒷자리를 입력하십시오.")) { }
|
else if (check("User_userpno1", null, "주민등록번호 앞자리를 입력하십시오.") || check("User_userpno2", null, "주민등록번호 뒷자리를 입력하십시오.")) { }
|
||||||
else if (check("User_mobile1", null, "휴대전화를 등록해주세요.") || check("User_mobile2", null, "휴대전화를 등록해주세요.") || check("User_mobile3", null, "휴대전화를 등록해주세요.")) { }
|
else if (check("User_mobile1", null, "휴대전화를 등록해주세요.") || check("User_mobile2", null, "휴대전화를 등록해주세요.") || check("User_mobile3", null, "휴대전화를 등록해주세요.")) { }
|
||||||
else if (!ismobilenumber(user_mobile)) { focus("mobile"); msg("휴대전화를 확인해주세요."); }
|
else if (!ismobilenumber(user_mobile)) { focus("mobile"); msg("휴대전화를 확인해주세요."); }
|
||||||
|
|
|
||||||
|
|
@ -66,12 +66,7 @@
|
||||||
//$("#boxassigndata").hide();
|
//$("#boxassigndata").hide();
|
||||||
boxassign_pagenum = 1;
|
boxassign_pagenum = 1;
|
||||||
$("#boxassign").slideDown("fast");
|
$("#boxassign").slideDown("fast");
|
||||||
//if (!ismobile()) {$("#boxassign_brno").focus();}
|
|
||||||
if (callback != undefined) {
|
|
||||||
boxassign_callback = callback;
|
boxassign_callback = callback;
|
||||||
} else {
|
|
||||||
boxassign_callback = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function boxassignfind() {
|
function boxassignfind() {
|
||||||
if (val("boxassign_brno") == "") {
|
if (val("boxassign_brno") == "") {
|
||||||
|
|
@ -113,7 +108,7 @@
|
||||||
}
|
}
|
||||||
function boxassignselectsingle(v) {
|
function boxassignselectsingle(v) {
|
||||||
boxassignclose();
|
boxassignclose();
|
||||||
if (boxassign_callback != null) {
|
if (boxassign_callback) {
|
||||||
boxassign_callback(v);
|
boxassign_callback(v);
|
||||||
} else {
|
} else {
|
||||||
eval("@(_method)" + "('" + v + "')");
|
eval("@(_method)" + "('" + v + "')");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue