Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.191.171.86
Current Path : /var/www/html/pget/js/pg/ |
| Current File : //var/www/html/pget/js/pg/loadSavedData.js |
const loadSavedData = fappno => {
$.ajax({
type: "POST",
async: false,
url: $host_url + "getSavedData&fappno=" + fappno,
success: function getSavedDataResponce(responce) {
responce = eval("(" + responce + ")");
var { data, error_code, status } = responce;
console.log(responce.error_code);
$("#personal_det input[type=text],#personal_det select").each(function() {
$(this).val(data.student[$(this).attr("id")]);
});
$("#prefDet select").each(function() {
$(this).val(data.student[$(this).attr("id")]);
});
if (data.student["fphotopath"] != "") {
photo_path = data.student["fphotopath"];
$("#frmFileUpload").hide();
$("#studphoto_img").attr(
"src",
$photo_url + "" + data.student["fphotopath"]
);
$("#studphoto").show();
}
table = `
<table class="table table-bordered table-hover" id='mainTable'>
<thead style = 'height:40px;background-color: #184F76 !important;color: #fff;'>
<tr>
<th> SL. No. </th>
<th> Head Code </th>
<th> Fee </th>
</tr>
</thead>`;
totalFee = 0;
data.studtotfee.map((el, i) => {
table += `<tr class="tblRow" id="tblid">
<td> ${i + 1} </td>
<td id="fheadcode${i}"> ${el.fheadcode} </td>
<td id="fmaxfee${i}"> ${el.fmaxfee} </td>
</tr>`;
console.log(totalFee);
console.log(el.fmaxfee);
totalFee += parseInt(el.fmaxfee);
// totalFee += el.fmaxfee;
// totalFee = totalFee + el.fmaxfee ;
console.log(totalFee);
});
// var studtotfee = data.studtotfee;
// console.log(studtotfee[0].fmaxfee);
// for(var i=0;i<=studtotfee.length;i++){
// totalFee = totalFee + studtotfee[i].fmaxfee;
// }
// console.log(totalfee);
table += `
<tr>
<td colspan="2" class="text-left">Total</td>
<td id="ttlAmt">${totalFee}</td>
</tr>
</table>`;
$("#FeeTbl").html(table);
if (data.student["fgender"] != "") {
var $radios = $("input:radio[name=fgender]");
$radios
.filter("[value=" + data.student["fgender"] + "]")
.prop("checked", true);
}
var radio_names = [
"fgender",
"fselfsupsch",
"foutstud",
"fbpl",
"fogirl",
"fkarstudy",
"fkashmir",
"fhk",
"fjk",
"frural",
"fkannada",
"fbcue",
"fpumat",
"fqutype",
"fpubio",
"fbcuetype",
"fpgdegree",
"fpgunivtype",
"fmngetexam",
"funivstud",
"fpdp",
"fcof",
"fcoh",
"fgah",
"fkanm",
"fhandicap",
"fsports",
"fncc",
"fdefence",
"funikar",
"fchilsuid",
"fjks",
"fexservice",
"fnss",
"fscouts"
];
for (var i = 0; i < radio_names.length; i++) {
if (data.student[radio_names[i]] != "") {
var $radios = $("input:radio[name=" + radio_names[i] + "]");
var value = data.student[radio_names[i]];
$radios.filter(`[value="${value}"]`).prop("checked", true);
}
}
if (data.student.fhk == "Yes") {
$("#yrdno").show();
}
// var checkbox_names = [
// "fsports",
// "fculture",
// "fncc",
// "fnss",
// "fdefence",
// "fhandicap",
// "fexservice",
// ];
// var checkboxes = $("#quota input[type=checkbox]");
// for (var i = 0, n = checkbox_names.length; i < n; i++) {
// var checkbox = $(
// "#quota input[type=checkbox][name=" + checkbox_names[i] + "]"
// );
// var value = data.student[checkbox_names[i]];
// checkbox.filter(`[value="${value}"]`).prop("checked", true);
// }
$("#prevAcadDet input[type=text],#prevAcadDet select").each(function() {
$(this).val(data.student[$(this).attr("id")]);
});
$("#marksDet input[type=text]").each(function() {
$(this).val(data.student[$(this).attr("id")]);
});
$("#prevAcdMarks input[type=text]").each(() => {
$(this).val(data.student[$(this).attr("id")]);
});
$("#prevPGDet input[type=text],#prevPGDet select").each(function() {
$(this).val(data.student[$(this).attr("id")]);
});
$("#mbaEntrance input[type=text],#mbaEntrance a").each(function() {
$(this).val(data.student[$(this).attr("id")]);
});
$("#fwrkexp1").attr("href", data.student["fwrkexppath"]);
// $("#mbaEntrance a").each(function() {
// // var oldUrl = $(this).attr("href"); // Get current url
// // var newUrl = oldUrl.replace("#", data.student[$(this).attr("id")]); // Create new url
// $(this).attr("href", data.student[$(this).attr("id")]); // Set herf value
// });
$("#OtherInfo input[type=text],#OtherInfo textarea").each(function() {
$(this).val(data.student[$(this).attr("id")]);
});
$("#fdegree").val(data.student["fqdegree"]);
$("#fhkrdno").val(data.student["fhkrdno"]);
loadcombination();
$("#fcombcode").val(data.student["fcombcode"]);
$("#idUnvExam").val(data.student["fquniv"]);
$("#qulcollname").val(data.student["FQCOLLEGE"]);
$("#qulregno").val(data.student["fqregno"]);
// $("#flangttlmm").val(data.student["FLANMM"]);
// $("#flangttlms").val(data.student["FLANMO"]);
// $("#flang1").val(data.student["flang1"]);
// $("#flang2").val(data.student["flang2"]);
$("#fdocloc").val(data.student["fdocvrfloc"]);
var table = ` <thead>
<tr class='bg-cyan'>
<th class="qaltablefisrtrd qaltabletd" rowspan="2">
Sl.No
</th>
<th class="qaltabletd" style="width: 200px;" rowspan="2">
Subject
</th>
<th class="qaltabletd" colspan="2">
Sem / Year I
</th>
<th class="qaltabletd" colspan="2">
Sem / Year II
</th>
<th class="qaltabletd" colspan="2">
Sem / Year III
</th>
<th class="qaltabletd" colspan="2">
Sem / Year IV
</th>
<th class="qaltabletd" colspan="2">
Sem / Year V
</th>
<th class="qaltabletd" colspan="2">
Sem / Year VI
</th>
<th class="qaltabletd" colspan="2">
Total Marks
</th>
<th class="qaltabletd" rowspan="2">
% of Marks
</th>
</tr>
<tr class='bg-cyan'>
<th class="qaltabletd">
Max
</th>
<th class="qaltabletd" ot1>
Obt
</th>
<th class="qaltabletd" mx1>
Max
</th>
<th class="qaltabletd" ot2>
Obt
</th>
<th class="qaltabletd" mx2>
Max
</th>
<th class="qaltabletd" ot3>
Obt
</th>
<th class="qaltabletd" mx3>
Max
</th>
<th class="qaltabletd" ot4>
Obt
</th>
<th class="qaltabletd" mx4>
Max
</th>
<th class="qaltabletd" ot5>
Obt
</th>
<th class="qaltabletd" mx5>
Max
</th>
<th class="qaltabletd" ot6>
Obt
</th>
<th class="qaltabletd" mx6>
Max
</th>
<th class="qaltabletd">
Obt
</th>
</tr>
</thead>
<tbody>`;
var subdet = data.optsub;
var i = 1;
subdet.forEach(element => {
var subname = element.subname;
var value = subname.split("-");
table += `<tr id='${i}' class="ui-widget-content jqgrow">
<td class='tbl_row_new tdfirst'>
<centre>${i}. </centre>
</td>
<td class='tbl_row_new'>
<input type="text" name="subsem1_${i}" id="subsem1_${i}"
style="max-width: 200px !important;" disabled value = '${value[1]}'>
<input type="hidden" name="subcode_${i}" id="subcode_${i}" value="${
value[0]
}">
</td>
<td class='tbl_row_new'>
<input type="text" name="subsem1mm_${i}" maxlength="4"
value = '${element.famm}'
onkeypress="return acceptNumbersOnlyForModule(event);" id="subsem1mm_${i}"
onchange="gettoal('${i}')">
</td>
<td class='tbl_row_new'>
<input type="text" name="subsem1mo_${i}" maxlength="4"
value = '${element.famo}'
onkeypress="return acceptNumbersOnlyForModule(event);" onchange="gettoal('${i}')"
id="subsem1mo_${i}">
</td>
<td class='tbl_row_new'>
<input type="text" name="subsem2mm_${i}" maxlength="4"
value = '${element.fbmm}'
onkeypress="return acceptNumbersOnlyForModule(event);" id="subsem2mm_${i}"
onchange="gettoal('${i}')">
</td>
<td class='tbl_row_new'>
<input type="text" name="subsem2mo_${i}" maxlength="4"
value = '${element.fbmo}'
onkeypress="return acceptNumbersOnlyForModule(event);" id="subsem2mo_${i}"
onchange="gettoal('${i}')">
</td>
<td class='tbl_row_new'>
<input type="text" name="subsem3mm_1" maxlength="4"
value = '${element.fcmm}'
onkeypress="return acceptNumbersOnlyForModule(event);" id="subsem3mm_${i}"
onchange="gettoal('${i}')">
</td>
<td class='tbl_row_new'>
<input type="text" name="subsem3mo_${i}" maxlength="4"
value = '${element.fcmo}'
onkeypress="return acceptNumbersOnlyForModule(event);" id="subsem3mo_${i}"
onchange="gettoal('${i}')">
</td>
<td class='tbl_row_new'>
<input type="text" name="subsem4mm_${i}" maxlength="4"
value = '${element.fdmm}'
onkeypress="return acceptNumbersOnlyForModule(event);" id="subsem4mm_${i}"
onchange="gettoal('${i}')">
</td>
<td class='tbl_row_new'>
<input type="text" name="subsem4mo_${i}" maxlength="4"
value = '${element.fdmo}'
onkeypress="return acceptNumbersOnlyForModule(event);" id="subsem4mo_${i}"
onchange="gettoal('${i}')">
</td>
<td class='tbl_row_new'>
<input type="text" name="subsem5mm_${i}" maxlength="4"
value = '${element.femm}'
onkeypress="return acceptNumbersOnlyForModule(event);" id="subsem5mm_${i}"
onchange="gettoal('${i}')">
</td>
<td class='tbl_row_new'>
<input type="text" name="subsem5mo_${i}" maxlength="4"
value = '${element.femo}'
onkeypress="return acceptNumbersOnlyForModule(event);" id="subsem5mo_${i}"
onchange="gettoal('${i}')">
</td>
<td class='tbl_row_new'>
<input type="text" name="subsem6mm_${i}" maxlength="4"
value = '${element.ffmm}'
onkeypress="return acceptNumbersOnlyForModule(event);" id="subsem6mm_${i}"
onchange="gettoal('${i}')">
</td>
<td class='tbl_row_new'>
<input type="text" name="subsem6mo_${i}" maxlength="4"
value = '${element.ffmo}'
onkeypress="return acceptNumbersOnlyForModule(event);" id="subsem6mo_${i}"
onchange="gettoal('${i}')">
</td>
<td class='tbl_row_new'>
<input type="text" name="subtotalmm_${i}" maxlength="4" readonly
value = '${element.fmaxmarks}'
onkeypress="return acceptNumbersOnlyForModule(event);" id="subtotalmm_${i}">
</td>
<td class='tbl_row_new'>
<input type="text" name="subtotalmo_${i}" maxlength="4" readonly
value = '${element.fsecmarks}'
onkeypress="return acceptNumbersOnlyForModule(event);" id="subtotalmo_${i}">
</td>
<td class='tbl_row_new'>
<input type="text" name="subpercentagemm_${i}" maxlength="5" readonly
value = '${element.fpercent}'
style="max-width: 70px" onkeypress="return acceptNumbersOnlyForModule(event);"
id="subpercentagemm_${i}">
</td>
</tr>`;
i++;
});
table += `</tbody>`;
$("#qalsemdet").html(table);
var studoc = data.studoc;
var doctable = `<table class='table table-bordered table-upd' id="uploaddet">
<thead>
<tr class="bg-cyan">
<th style="width :5%">Sl. No.</th>
<th style="width : 40%;">Description</th>
<th style="width : 30%;">Upload</th>
<th style="width : 25%;">File</th>
</tr>
</thead>
<tbody>`;
var doctype = [
"SSLC Marks Card",
"UG Marks Cards",
"Caste & Income Certificate",
"HK Certificate",
"Special Quota Certificates"
];
var i = 1;
var z = 0;
studoc.forEach(element => {
doctable += `<tr>
<td style="text-align: center;">${i}</td>
<td id="doc_upload_1">${doctype[z]}</td>
<td style="
display: flex;
align-items: center;
justify-content: space-around;
">
<input type="file" name="${element.fdoctype}" id="${element.fdoctype}" class="upd-file"
style="width:100px;padding:5px 0px;" />
<input type="hidden" id="h_${element.fdoctype}">
<button class="btn btn-success waves-effect btn-lg" style="padding: 5px;"
onclick='UploadEmployeeDocuments("${element.fdoctype}")'>Upload
</button>
</td>`;
if (element.fpath == "") {
doctable += `<td id="attach_td_${element.fdoctype}"></td>`;
} else {
doctable += `<td id="attach_td_${
element.fdoctype
}"><a href = '${$photo_url + element.fpath}' target = '_blank' >${
element.fdoctype
}</a></td>`;
}
doctable += `</tr>`;
i++;
z++;
});
doctable += `</tbody></table>`;
$("#upddet").html(doctable);
loadotdeg(fappno);
//validateregno();
console.log(lansub);
//loadlansubjects(data.reslan);
// totfeeupdate();
var reslan = data.reslan;
console.log(reslan[0]["famm"]);
var table = ` <thead>
<tr class='bg-cyan'>
<td class="qaltablefisrtrd">
Sl.
</td>
<td class="qaltabletd" style="width: 200px;" rowspan="2">
Subject
</td>
<td class="qaltabletd" colspan="2">
Sem / Year I
</td>
<td class="qaltabletd" colspan="2">
Sem / Year II
</td>
<td class="qaltabletd" colspan="2">
Sem / Year III
</td>
<td class="qaltabletd" colspan="2">
Sem / Year IV
</td>
<th class="qaltabletd" colspan="2">
Sem / Year V
</th>
<th class="qaltabletd" colspan="2">
Sem / Year VI
</th>
<td class="qaltabletd" colspan="2">
Total Marks
</td>
<td class="qaltabletd" rowspan="2">
% of Marks
</td>
</tr>
<tr class='bg-cyan'>
<td class="qaltablefisrtrd">
No.
</td>
<td class="qaltabletd">
Max
</td>
<td class="qaltabletd">
Obt
</td>
<td class="qaltabletd">
Max
</td>
<td class="qaltabletd">
Obt
</td>
<td class="qaltabletd">
Max
</td>
<td class="qaltabletd">
Obt
</td>
<td class="qaltabletd">
Max
</td>
<td class="qaltabletd">
Obt
</td>
<td class="qaltabletd">
Max
</td>
<td class="qaltabletd">
Obt
</td>
<td class="qaltabletd">
Max
</td>
<td class="qaltabletd">
Obt
</td>
<td class="qaltabletd">
Max
</td>
<td class="qaltabletd">
Obt
</td>
</tr>
</thead>
<tbody>`;
var options = "";
options += `<option value="">--Select--</option>`;
lansub.map((el, i) => {
options += `<option value="${lansub[i]["int_code"]}">${
lansub[i]["val"]
}</options>`;
});
var i = 1;
for (var z = 0; z < 2; z++) {
table += `<tr id='${i}' class="ui-widget-content jqgrow">
<td class='tbl_row_new tdfirst'>
<centre>${i}. </centre>
</td>
<td class='tbl_row_new'>
<select class="form-control clr" id="flan${i}">
${options}
</select>
</td>
<td class='tbl_row_new'>
<input type="text" name="lansem1mm_${i}" maxlength="4"
onkeypress="return acceptNumbersOnlyForModule(event);" id="lansem1mm_${i}"
onchange="getlantoal('${i}')"
value = '${reslan[z]["famm"]}'>
</td>
<td class='tbl_row_new'>
<input type="text" name="lansem1mo_${i}" maxlength="4"
onkeypress="return acceptNumbersOnlyForModule(event);" onchange="getlantoal('${i}')"
id="lansem1mo_${i}"
value = '${reslan[z]["famo"]}'>
</td>
<td class='tbl_row_new'>
<input type="text" name="lansem2mm_${i}" maxlength="4"
onkeypress="return acceptNumbersOnlyForModule(event);" id="lansem2mm_${i}"
onchange="getlantoal('${i}')"
value = '${reslan[z]["fbmm"]}'>
</td>
<td class='tbl_row_new'>
<input type="text" name="lansem2mo_${i}" maxlength="4"
onkeypress="return acceptNumbersOnlyForModule(event);" id="lansem2mo_${i}"
onchange="getlantoal('${i}')"
value = '${reslan[z]["fbmo"]}'>
</td>
<td class='tbl_row_new'>
<input type="text" name="lansem3mm_1" maxlength="4"
onkeypress="return acceptNumbersOnlyForModule(event);" id="lansem3mm_${i}"
onchange="getlantoal('${i}')"
value = '${reslan[z]["fcmm"]}'>
</td>
<td class='tbl_row_new'>
<input type="text" name="lansem3mo_${i}" maxlength="4"
onkeypress="return acceptNumbersOnlyForModule(event);" id="lansem3mo_${i}"
onchange="getlantoal('${i}')"
value = '${reslan[z]["fcmo"]}'>
</td>
<td class='tbl_row_new'>
<input type="text" name="lansem4mm_${i}" maxlength="4"
onkeypress="return acceptNumbersOnlyForModule(event);" id="lansem4mm_${i}"
onchange="getlantoal('${i}')"
value = '${reslan[z]["fdmm"]}'>
</td>
<td class='tbl_row_new'>
<input type="text" name="lansem4mo_${i}" maxlength="4"
onkeypress="return acceptNumbersOnlyForModule(event);" id="lansem4mo_${i}"
onchange="getlantoal('${i}')"
value = '${reslan[z]["fdmo"]}'>
</td>
<td class='tbl_row_new'>
<input type="text" name="lansem5mm_${i}" maxlength="4"
onkeypress="return acceptNumbersOnlyForModule(event);" id="lansem5mm_${i}"
onchange="getlantoal('${i}')"
value = '${reslan[z]["femm"]}'>
</td>
<td class='tbl_row_new'>
<input type="text" name="lansem5mo_${i}" maxlength="4"
onkeypress="return acceptNumbersOnlyForModule(event);" id="lansem5mo_${i}"
onchange="getlantoal('${i}')"
value = '${reslan[z]["femo"]}'>
</td>
<td class='tbl_row_new'>
<input type="text" name="lansem6mm_${i}" maxlength="4"
onkeypress="return acceptNumbersOnlyForModule(event);" id="lansem6mm_${i}"
onchange="getlantoal('${i}')"
value = '${reslan[z]["ffmm"]}'>
</td>
<td class='tbl_row_new'>
<input type="text" name="lansem6mo_${i}" maxlength="4"
onkeypress="return acceptNumbersOnlyForModule(event);" id="lansem6mo_${i}"
onchange="getlantoal('${i}')"
value = '${reslan[z]["ffmo"]}'>
</td>
<td class='tbl_row_new'>
<input type="text" name="lantotalmm_${i}" maxlength="4" readonly
onkeypress="return acceptNumbersOnlyForModule(event);" id="lantotalmm_${i}"
value = '${reslan[z]["fmaxmarks"]}'>
</td>
<td class='tbl_row_new'>
<input type="text" name="lantotalmo_${i}" maxlength="4" readonly
onkeypress="return acceptNumbersOnlyForModule(event);" id="lantotalmo_${i}"
value = '${reslan[z]["fsecmarks"]}'>
</td>
<td class='tbl_row_new'>
<input type="text" name="lanpercentagemm_${i}" maxlength="5" readonly
style="max-width: 70px" onkeypress="return acceptNumbersOnlyForModule(event);"
id="lanpercentagemm_${i}"
value = '${reslan[z]["fpercent"]}'>
</td>
</tr>`;
i++;
}
table += `</tbody>`;
$("#lansemdet").html(table);
var subname1 = reslan[0].subname;
var subname2 = reslan[1].subname;
var value1 = subname1.split("-");
var value2 = subname2.split("-");
$("#flan1").val(value1[0]);
$("#flan2").val(value2[0]);
}
});
};
|