156 lines
3.0 KiB
JavaScript
156 lines
3.0 KiB
JavaScript
function CountRows(mode)
|
|
{
|
|
if(mode=='0')
|
|
{
|
|
found=$("#alloclist tr").length-1;
|
|
if(found > 0)
|
|
{
|
|
$("#actiontr").show();
|
|
}
|
|
else
|
|
{
|
|
$("#actiontr").hide();
|
|
}
|
|
$("#recfound").html("<b> ( "+(found==0 ? "No" : found)+" record(s) found )</b>");
|
|
}
|
|
}
|
|
|
|
function updateOclStatus(btnelm,indx){
|
|
var uuid = $('#uuid-'+indx).val();
|
|
var visit = $('#visit-'+indx).val();
|
|
var ocl = $('#ocl-'+indx).val();
|
|
var distance = $('#distance-'+indx).val();
|
|
var usid = $('#usid').val();
|
|
var conveyance = 0;
|
|
distance = distance.trim().length == 0 ? 0 : distance;
|
|
QryStr="uuid="+uuid+"&visit="+visit+"&ocl="+ocl+"&distance="+distance+"&usid="+usid+"&conveyance="+conveyance;
|
|
RunAjax("POST","updateoclstatus",QryStr,1);
|
|
}
|
|
function AfterResponse(AjaxResponse,OprID)
|
|
{
|
|
if(OprID==1)
|
|
{
|
|
CallMessage(AjaxResponse,3000,200,300);
|
|
}
|
|
}
|
|
|
|
function ValidateBASearch()
|
|
{
|
|
var keycount=0;
|
|
var ver=$("#verlist").val();
|
|
var belt=$("#beltlist").val();
|
|
if(belt!='-1')
|
|
{
|
|
keycount=keycount+1;
|
|
}
|
|
if(ver!='-1')
|
|
{
|
|
keycount=keycount+1;
|
|
}
|
|
if(keycount==0)
|
|
{
|
|
CallMessage('1023CTFR:error:Please provide any input.',3000,200,300);
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
if(checkForm())
|
|
{
|
|
SubmitForm("getallocbelts", "_parent", "belttransfer");
|
|
}
|
|
}
|
|
}
|
|
function ValidateSearch()
|
|
{
|
|
var keycount=0;
|
|
var oldr=$("#older").val();
|
|
var ver=$("#verlist").val();
|
|
var port=$("#portlist").val();
|
|
var mvcode=$("#mvcode").val();
|
|
var applno=$("#applno").val();
|
|
var name=$("#customername").val();
|
|
if(oldr!='-1')
|
|
{
|
|
keycount=keycount+1;
|
|
}
|
|
if(mvcode!='')
|
|
{
|
|
keycount=keycount+1;
|
|
}
|
|
if(applno!='')
|
|
{
|
|
keycount=keycount+1;
|
|
}
|
|
if(name!='')
|
|
{
|
|
keycount=keycount+1;
|
|
}
|
|
if(port!='-1')
|
|
{
|
|
keycount=keycount+1;
|
|
}
|
|
if(ver!='-1')
|
|
{
|
|
keycount=keycount+1;
|
|
}
|
|
if(keycount==0)
|
|
{
|
|
CallMessage('1017CTFR:error:Please provide any input.',3000,200,300);
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
if(checkForm())
|
|
{
|
|
SubmitForm("getalloccases", "_parent", "casetransfer");
|
|
}
|
|
}
|
|
}
|
|
function CheckVerifier(chkel)
|
|
{
|
|
var elid=chkel.id.replace('chkcol','');
|
|
var ischecked=chkel.checked;
|
|
var ver=$('#verifier'+elid);
|
|
var pver=$('#pverifier'+elid);
|
|
var tver=$('#tverlist');
|
|
if(ischecked)
|
|
{
|
|
if($(tver).val()!='-1')
|
|
{
|
|
$(ver).val(tver.val());
|
|
}
|
|
}
|
|
else
|
|
{
|
|
$(ver).val(pver.val());
|
|
}
|
|
}
|
|
function CheckAllVerifier(ischecked)
|
|
{
|
|
$("[id*=chkcol]").each(function(){
|
|
CheckVerifier(this);
|
|
});
|
|
}
|
|
function AutoCorrectSelection()
|
|
{
|
|
$("[id*=chkcol]").each(function(){
|
|
var elid=this.id.replace('chkcol','');
|
|
if($("#verifier"+elid).val()==$("#pverifier"+elid).val())
|
|
{
|
|
$(this).removeAttr("checked");
|
|
$("#chkparent").removeAttr("checked");
|
|
}
|
|
});
|
|
}
|
|
function Transfer(targetUrl,formName)
|
|
{
|
|
AutoCorrectSelection();
|
|
if(ValidateList('chkcol')>0)
|
|
{
|
|
SubmitForm(targetUrl, "_parent", formName);
|
|
}
|
|
else
|
|
{
|
|
CallMessage('1017CTFR:error:Please select any case to transfer.',3000,200,300);
|
|
}
|
|
} |