Rev 28940 | Rev 29007 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
$(function() {$(document).on('click', '.submit1', function() {var row = $(this).closest("tr");console.log(row);var rowIndex = $(this).closest('tr').prevAll().length;var data0 = $(row).find("td:eq(0)").text();var data1 = $(row).find("td:eq(1)").text();var data2 = $(row).find("td:eq(2)").text();if (data2 != "") {data2 = data2 + "T00:00:00";}var data3 = $(row).find("td:eq(3) input[type='date']").val();if (data3 != "") {data3 = data3 + "T00:00:00";}var data4 = $(row).find("td:eq(4) input[type='text']").val();var data5 = $(row).find("td:eq(5) input[type='number']").val();var rbmAuthId = $(row).find("td:eq(6) input[type='hidden']").val();console.log(rbmAuthId)var data6 = $(row).find("td:eq(7) input[type='text']").val();var data7 = $(row).find("td:eq(8) input[type='text']").val();var data8 = $(row).find("td:eq(9) input[type='text']").val();var data9 = $(row).find("td:eq(10) input[type='text']").val();var data10 = $(row).find("td:eq(11) input[type='text']").val();var data11 = $(row).find("td:eq(12) input[type='date']").val();if (data11 != "") {data11 = data11 + "T00:00:00";}var data12 = $(row).find("td:eq(13) input[type='text']").val();var data13 = $(row).find("td:eq(14) input[type='date']").val();if (data13 != "") {data13 = data13 + "T00:00:00";}var data14 = $(row).find(".kyc input[type=hidden]").val();var data15 = $(row).find(".aadhar input[type=hidden]").val();var data16 = $(row).find(".pan input[type=hidden]").val();var data17 = $(row).find(".gst input[type=hidden]").val();var data18 = $(row).find(".cancheque input[type=hidden]").val();var data19 = $(row).find(".rent input[type=hidden]").val();console.log("data19" + data19);var data20 = $(row).find(".loi input[type=hidden]").val();console.log("data18" + data18);var docCompleted = $(row).find("td:eq(22) option:selected").val();var data21 = $(row).find("td:eq(23) input[type='text']").val();console.log(data21);var data22 = $(row).find("td:eq(24) input[type='date']").val();if (data22 != "") {data22 = data22 + "T00:00:00";}var data23 = $(row).find("td:eq(25) input[type='date']").val();if (data23 != "") {data23 = data23 + "T00:00:00";}var data24 = $(row).find("td:eq(26) input[type='date']").val();if (data24 != "") {data24 = data24 + "T00:00:00";}var data25 = $(row).find("td:eq(27) input[type='date']").val();if (data25 != "") {data25 = data25 + "T00:00:00";}var data26 = $(row).find("td:eq(28) input[type='text']").val();var data27 = $(row).find("td:eq(29) input[type='date']").val();if (data27 != "") {data27 = data27 + "T00:00:00";}var data28 = $(row).find("td:eq(30) input[type='date']").val();if (data28 != "") {data28 = data28 + "T00:00:00";}var data29 = $(row).find("td:eq(31) input[type='date']").val();if (data29 != "") {data29 = data29 + "T00:00:00";}var data30 = $(row).find("td:eq(32) input[type='checkbox']").is(":checked") ? 1 : 0;var prebookingListingObject = {};prebookingListingObject['id'] = data0prebookingListingObject['createdTimestamp'] = data2prebookingListingObject['acquiredDate'] = data3prebookingListingObject['outletName'] = data4prebookingListingObject['phoneNumber'] = data5prebookingListingObject['authId'] = rbmAuthIdprebookingListingObject['city'] = data6prebookingListingObject['stateHead'] = data7prebookingListingObject['bdm'] = data8prebookingListingObject['agreedBrandFees'] = data9prebookingListingObject['receivedBrandFees'] = data10prebookingListingObject['finalBrandFees'] = data11prebookingListingObject['agreedWallet'] = data12prebookingListingObject['investmentDate'] = data13prebookingListingObject['kyc'] = data14prebookingListingObject['aadharDoc'] = data15prebookingListingObject['panDoc'] = data16prebookingListingObject['gst'] = data17prebookingListingObject['cancelCheque'] = data18prebookingListingObject['rentAgreement'] = data19prebookingListingObject['loi'] = data20prebookingListingObject['docCompleted'] = docCompletedprebookingListingObject['code'] = data21prebookingListingObject['receePlaned'] = data22prebookingListingObject['receeActual'] = data23prebookingListingObject['deploymentPlanedDate'] = data24prebookingListingObject['deploymentDate'] = data25prebookingListingObject['stockPayment'] = data26prebookingListingObject['expectedDate'] = data27prebookingListingObject['payDate'] = data28prebookingListingObject['inaugrationDate'] = data29prebookingListingObject['billingStatus'] = data30var jsonObject = JSON.stringify(prebookingListingObject);console.log(jsonObject);if (confirm("Are you sure you want to submit the request") == true) {doAjaxRequestWithJsonHandler(context + "/partnerOnBoardingListing", "POST", jsonObject, function(response) {row.html(response);row.css("background-color", "#F8F8FF");});}});$(document).on('click', '.submit-design', function() {var row = $(this).closest("tr");console.log(row);var rowIndex = $(this).closest('tr').prevAll().length;var id = $(row).find("td:eq(0)").text();var outletName = $(row).find("td:eq(1) input[type='text']").val();var createdTimestamp = $(row).find("td:eq(2)").text();if (createdTimestamp != "") {createdTimestamp = createdTimestamp + "T00:00:00";}var acquiredDate = $(row).find("td:eq(3) input[type='date']").val();if (acquiredDate != "") {acquiredDate = acquiredDate + "T00:00:00";}var phoneNumber = $(row).find("td:eq(4) input[type='number']").val();var city = $(row).find("td:eq(5) input[type='text']").val();var stateHead = $(row).find("td:eq(6) input[type='text']").val();var bdm = $(row).find("td:eq(7) input[type='text']").val();var agreedBrandFees = $(row).find("td:eq(8) input[type='text']").val();console.log("agreedBrandFees" + agreedBrandFees);var investmentDate = $(row).find("td:eq(9) input[type='date']").val();if (investmentDate != "") {investmentDate = investmentDate + "T00:00:00";}console.log("investmentDate" + investmentDate);var loi = $(row).find(".loiDesign input[type=hidden]").val();console.log("loi" + loi);var kycDesign = $(row).find(".kycDesign input[type=hidden]").val();var code = $(row).find("td:eq(12) input[type='text']").val();console.log("code" + code);var receePlaned = $(row).find("td:eq(13) input[type='date']").val();if (receePlaned != "") {receePlaned = receePlaned + "T00:00:00";}var receeActual = $(row).find("td:eq(14) input[type='date']").val();if (receeActual != "") {receeActual = receeActual + "T00:00:00";}console.log("receeActual" + receeActual);var twoDBoqPlanedDate = $(row).find("td:eq(16) input[type='date']").val();if (twoDBoqPlanedDate != "") {twoDBoqPlanedDate = twoDBoqPlanedDate + "T00:00:00";}var twoDBoqdate = $(row).find("td:eq(17) input[type='date']").val();if (twoDBoqdate != "") {twoDBoqdate = twoDBoqdate + "T00:00:00";}var twodBOQ = $(row).find(".twoDBoq input[type=hidden]").val();var threeDBoqPlanedDate = $(row).find("td:eq(19) input[type='date']").val();if (threeDBoqPlanedDate != "") {threeDBoqPlanedDate = threeDBoqPlanedDate + "T00:00:00";}var threeDBoqdate = $(row).find("td:eq(20) input[type='date']").val();if (threeDBoqdate != "") {threeDBoqdate = threeDBoqdate + "T00:00:00";}var threeDBoq = $(row).find(".threeDBoq input[type=hidden]").val();var poVenderPlanedDate = $(row).find("td:eq(22) input[type='date']").val();if (poVenderPlanedDate != "") {poVenderPlanedDate = poVenderPlanedDate + "T00:00:00";}var poVenderDate = $(row).find("td:eq(23) input[type='date']").val();if (poVenderDate != "") {poVenderDate = poVenderDate + "T00:00:00";}var briefingPartnerPlaned = $(row).find("td:eq(24) input[type='date']").val();if (briefingPartnerPlaned != "") {briefingPartnerPlaned = briefingPartnerPlaned + "T00:00:00";}var briefingPartner = $(row).find("td:eq(25) input[type='date']").val();if (briefingPartner != "") {briefingPartner = briefingPartner + "T00:00:00";}var deploymentPlanedDate = $(row).find("td:eq(26) input[type='date']").val();if (deploymentPlanedDate != "") {deploymentPlanedDate = deploymentPlanedDate + "T00:00:00";}var deploymentDate = $(row).find("td:eq(27) input[type='date']").val();if (deploymentDate != "") {deploymentDate = deploymentDate + "T00:00:00";}var finalPicsOutletPlanedDate = $(row).find("td:eq(28) input[type='date']").val();if (finalPicsOutletPlanedDate != "") {finalPicsOutletPlanedDate = finalPicsOutletPlanedDate + "T00:00:00";}var finalPicsOutletDate = $(row).find("td:eq(29) input[type='date']").val();if (finalPicsOutletDate != "") {finalPicsOutletDate = finalPicsOutletDate + "T00:00:00";}var finalPicsOutlet = $(row).find(".finalPics input[type=hidden]").val();var nocDate = $(row).find("td:eq(31) input[type='date']").val();if (nocDate != "") {nocDate = nocDate + "T00:00:00";}var noc = $(row).find(".noc input[type=hidden]").val();var prebookingListingObject = {};prebookingListingObject['id'] = idprebookingListingObject['outletName'] = outletNameprebookingListingObject['createdTimestamp'] = createdTimestampprebookingListingObject['acquiredDate'] = acquiredDateprebookingListingObject['phoneNumber'] = phoneNumberprebookingListingObject['city'] = cityprebookingListingObject['stateHead'] = stateHeadprebookingListingObject['bdm'] = bdmprebookingListingObject['agreedBrandFees'] = agreedBrandFeesprebookingListingObject['investmentDate'] = investmentDateprebookingListingObject['loi'] = loiprebookingListingObject['kycDesign'] = kycDesignprebookingListingObject['code'] = codeprebookingListingObject['receePlaned'] = receePlanedprebookingListingObject['receeActual'] = receeActualprebookingListingObject['twoDBoqPlanedDate'] = twoDBoqPlanedDateprebookingListingObject['twoDBoqdate'] = twoDBoqdateprebookingListingObject['twodBOQ'] = twodBOQprebookingListingObject['threeDBoqPlanedDate'] = threeDBoqPlanedDateprebookingListingObject['threeDBoqdate'] = threeDBoqdateprebookingListingObject['threeDBoq'] = threeDBoqprebookingListingObject['poVenderPlanedDate'] = poVenderPlanedDateprebookingListingObject['poVenderDate'] = poVenderDateprebookingListingObject['briefingPartnerPlaned'] = briefingPartnerPlanedprebookingListingObject['briefingPartner'] = briefingPartnerprebookingListingObject['deploymentPlanedDate'] = deploymentPlanedDateprebookingListingObject['deploymentDate'] = deploymentDateprebookingListingObject['finalPicsOutletPlanedDate'] = finalPicsOutletPlanedDateprebookingListingObject['finalPicsOutletDate'] = finalPicsOutletDateprebookingListingObject['finalPicsOutlet'] = finalPicsOutletprebookingListingObject['nocDate'] = nocDateprebookingListingObject['noc'] = nocvar jsonObject = JSON.stringify(prebookingListingObject);console.log(jsonObject);if (confirm("Are you sure you want to submit the request") == true) {doAjaxRequestWithJsonHandler(context + "/partnerOnboardingDesignaTatPanel", "POST", jsonObject, function(response) {row.html(response);row.css("background-color", "#F8F8FF");});}});$(document).on('click', ".noticPartneronboarding", function() {var id = $(this).data('id');console.log(id);if (confirm("Are you sure you want to Notice Isssue this Partner") == true) {doPostAjaxRequestHandler(context + "/partnerOnboardingNotice?id=" + id,function(response) {console.log("reponse" + response);if (response == 'true') {alert("successfully Done");panelListing("main-content");}});}});$(document).on('click', ".holdPartnerOnboarding", function() {var id = $(this).data('id');console.log(id);if (confirm("Are you sure you want to hold this Partner") == true) {doPostAjaxRequestHandler(context + "/partnerOnboardingHold?id=" + id,function(response) {console.log("reponse" + response);if (response == 'true') {alert("successfully Done");panelListing("main-content");}});}});$(document).on('click', ".unHoldPartnerOnboarding", function() {var id = $(this).data('id');console.log(id);if (confirm("Are you sure you want to Unhold this Partner") == true) {doPostAjaxRequestHandler(context + "/partnerOnboardingUnhold?id=" + id,function(response) {console.log("reponse" + response);if (response == 'true') {alert("successfully Done");panelListing("main-content");}});}});$(document).on('click', ".partner-onboarding-index", function() {panelListing("main-content");});$(document).on('click', ".partner-onboarding-open", function() {console.log("yes");partnerOnboardingOpen("main-content");});$(document).on('click', ".design-completed", function() {console.log("yes");partnerOnboardinDesignCompleted("main-content");});$(document).on('click', ".design_tat", function() {console.log("yes");partnerOnboardingDesign("main-content");});$(document).on('click', ".partner-onboarding-reject", function() {console.log("helo");partnerOnboardingReject("main-content");});$(document).on('input', 'table#example input[type=file]', function() {if (confirm('Confirm upload ?')) {var fileSelector = $(this)[0];if (fileSelector != undefined&& fileSelector.files[0] != undefined) {var url = `${context}/document-upload`;console.log(url);var file = this.files[0];console.log("file" + file);let fileInput = $(this);console.log("fileInput" + file);doAjaxUploadRequestHandler(url,'POST',file,function(response) {console.log(response);var documentId = response.response.document_id;console.log("documentId : " + documentId);fileInput.closest('td').find("input[type=hidden]").val(documentId);});// alert("Retailer Shop Document// is required");}} else {// Do nothing!}});$(document).on('input', 'table#partnerVerification input[type=file]', function() {if (confirm('Confirm upload ?')) {var fileSelector = $(this)[0];if (fileSelector != undefined&& fileSelector.files[0] != undefined) {var url = `${context}/document-upload`;console.log(url);var file = this.files[0];console.log("file" + file);let fileInput = $(this);console.log("fileInput" + file);doAjaxUploadRequestHandler(url,'POST',file,function(response) {console.log(response);var documentId = response.response.document_id;console.log("documentId : " + documentId);fileInput.closest('td').find("input[type=hidden]").val(documentId);});// alert("Retailer Shop Document// is required");}} else {// Do nothing!}});$(document).on('input', 'table#OnboardingDesign input[type=file]', function() {if (confirm('Confirm upload ?')) {var fileSelector = $(this)[0];if (fileSelector != undefined&& fileSelector.files[0] != undefined) {var url = `${context}/document-upload`;console.log(url);var file = this.files[0];console.log("file" + file);let fileInput = $(this);console.log("fileInput" + file);doAjaxUploadRequestHandler(url,'POST',file,function(response) {console.log(response);var documentId = response.response.document_id;console.log("documentId : " + documentId);fileInput.closest('td').find("input[type=hidden]").val(documentId);});// alert("Retailer Shop Document// is required");}} else {// Do nothing!}});$(document).on('click', '#newmodal', function() {var prebookingListingObject = {};var outletName = $('#outLetName1').val();var phoneNumber =$('#number1').val();if (outletName == "") {alert("outletName is required ");return;}prebookingListingObject['outletName'] = $('#outLetName1').val();if (phoneNumber == "") {alert("Phone Number is required ");return false;}if(phoneNumber.length > 6 && phoneNumber.length < 11) {prebookingListingObject['phoneNumber'] = $('#number1').val();}else{alert("Number should be greater then 6 and less then 11");return false;}acquireddate1 = $('#acquireddate1').val();if (acquireddate1 != "") {acquireddate1 = acquireddate1 + "T00:00:00";}prebookingListingObject['authId'] = $('#authUserOnboarding').val();prebookingListingObject['acquiredDate'] = acquireddate1var json = JSON.stringify(prebookingListingObject);console.log(json);doAjaxRequestWithJsonHandler(context+ "/partnerOnBoardingListing","POST",json,function(response) {panelListing("main-content");});});var table = $('#example').DataTable();$(document).on('dblclick', '#example tbody tr', function() {var data = table.row(this).data();var statusHold= $(this).find("td:eq(37) button[type='submit']").val();console.log("statusHold"+statusHold);if(statusHold.localeCompare("hold") ){$(this).find(":input").attr('disabled', true);$(this).find("td:eq(37) button[type='submit']").attr('disabled', false);$(this).find("td:eq(36) button[type='submit']").attr('disabled', false);}else{$(this).find(":input").attr('disabled', false).show();$(this).find(":selected").attr('disabled', false).show();}$(this).find("input[name=rbmAuthId]").attr('disabled', true);$(this).find("input[name=verificationStatusOnboarding]").attr('disabled', true);$(this).find("input[name=code1]").attr('disabled', true);$(this).css("background-color", "#87d3f8");let a=12;let b=12;console.log("yes"+a==b);});var table = $('#OnboardingDesign').DataTable();$(document).on('dblclick', '#OnboardingDesign tbody tr', function() {var data = table.row(this).data();$(this).find(":input").attr('disabled', false).show();$(this).find("input[name=acquireddate]").attr('disabled', true);$(this).find("input[name=outlateName]").attr('disabled', true);$(this).find("input[name=phonenumber1]").attr('disabled', true);$(this).find("input[name=kyc1]").attr('disabled', true);$(this).find("input[name=city1]").attr('disabled', true);$(this).find("input[name=shead1]").attr('disabled', true);$(this).find("input[name=bdm1]").attr('disabled', true);$(this).find("input[name=abrand1]").attr('disabled', true);$(this).find("input[name=recbrand1]").attr('disabled', true);$(this).find("input[name=BrandFeesdate1]").attr('disabled', true);$(this).find("input[name=idate1]").attr('disabled', true);$(this).find("input[name=loi1]").attr('disabled', true);$(this).find("input[name=code1]").attr('disabled', true);$(this).find("input[name=rplaned1]").attr('disabled', true);$(this).find("input[name=stockPaymentDesign]").attr('disabled', true);$(this).find("input[name=twoDBoq1]").attr('disabled', true);$(this).find("input[name=threeBoqDate1]").attr('disabled', true);$(this).find("input[name=poVenderDate1]").attr('disabled', true);$(this).find("input[name=briefingPartnerPlanedDate1]").attr('disabled', true);$(this).find("input[name=deploymentPlanedDate]").attr('disabled', true);$(this).find("input[name=FinalPicsOutLets]").attr('disabled', true);$(this).find("input[name=poVenderDate1]").attr('disabled', true);$(this).css("background-color", "#87d3f8");let a = 12;let b = 12;console.log("yes" + a == b);});$(document).on('click', ".delete", function() {var id = $(this).data('id');console.log('helo');var id = $(this).data('id');console.log(id);if (confirm("Are you sure your outlet is open") == true) {doPostAjaxRequestHandler(context + "/partnerOnBoardingOpen?id=" + id,function(response) {console.log("reponse" + response);if (response == 'true') {alert("congratulations your outlet is successfully open");panelListing("main-content");}});}});$(document).on('click', ".design-complete", function() {var id = $(this).data('id');console.log('helo');var id = $(this).data('id');console.log(id);if (confirm("Are you sure your Design TAT is Complete") == true) {doPostAjaxRequestHandler(context + "/partnerDesignTatCompleted?id=" + id,function(response) {console.log("reponse" + response);if (response == 'true') {alert("congratulations your Desiging is successfully Done");partnerOnboardingDesign("main-content");}});}});$(document).on('click', ".rejectpartneronboarding", function() {var id = $(this).data('id');console.log('helo');var id = $(this).data('id');console.log(id);if (confirm("Are you sure you want to reject the request") == true) {doPostAjaxRequestHandler(context + "/partnerOnBoardingReject?id=" + id,function(response) {console.log("reponse" + response);if (response == 'true') {alert("successfully rejected");panelListing("main-content");}});}});});$(document).on('click', ".Del", function() {var $td = $(this).closest("td");//var delDoc= $(this).closest('td').find('.gst', "input[type=hidden]").val();//var columnName= $(this).closest('td' , "input[type=hidden]").val();var dataDel = $td.find("input[type=hidden]").val('0');dataDel = 0;console.log(dataDel);if (confirm("Are you sure you want to delete this doc") == true) {if (dataDel == 0) {$td.css({ 'background-color': 'pink' });console.log("true");$td.find('a', ".download").hide();$td.find('a', ".Del").hide();}}});function panelListing(domId) {doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",function(response) {$('#' + domId).html(response);});}function panelListing(domId) {doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",function(response) {$('#' + domId).html(response);});}function partnerOnboardingOpen(domId) {doAjaxRequestHandler(context + "/partnerOnBoardingOpenShow", "GET",function(response) {$('#' + domId).html(response);});}function partnerOnboardinDesignCompleted(domId) {doAjaxRequestHandler(context + "/DesignTatCompletedShow", "GET",function(response) {$('#' + domId).html(response);});}function partnerOnboardingDesign(domId) {doAjaxRequestHandler(context + "/partnerOnBoardingDesign", "GET",function(response) {$('#' + domId).html(response);});}function partnerOnboardingReject(domId) {doAjaxRequestHandler(context + "/partnerOnBoardingRejectShow", "GET",function(response) {$('#' + domId).html(response);});}function panelOnBoardingListing(domId) {doAjaxRequestHandler(context + "/partnerOnBoardingListing", "POST",function(response) {$('#' + domId).html(response);});}function panelListing(domId) {doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",function(response) {$('#' + domId).html(response);});}