Rev 27773 | Rev 27780 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<section class="wrapper"><div class="row"><div class="col-lg-12"><h3 class="page-header"><i class="icon_document_alt"></i>panel Listing</h3><ol class="breadcrumb"><li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li><li><i class="icon_document_alt"></i>panel Listing</li></ol></div></div><div class="col-lg-6"><button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal"style="font-size:12px; background:#696969;">New</button><div id="myModal" class="modal fade" role="dialog"><div class="modal-dialog"><!-- Modal content--><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal">×</button><h4 class="modal-title">Modal Header</h4></div><div class="modal-body"><form><div class="form-row"><div class="form-group col-md-6"><label for="outLateName1">OutLate Name</label><input type="text" class="form-control" id="outLateName1"placeholder="OutLate Name"></div><div class="form-group col-md-6"><label for="number1">Mobile Number</label><input type="number" class="form-control" id="number1" placeholder="Mobile Number"></div></div><button type="button" class="btn btn-primary" id="newmodal" data-dismiss="modal"data-backdrop='static' data-keyboard='false'>submit</button></form></div><div class="modal-footer"><button type="submit" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div></div><div class="col-lg-12"><table class="table table-border table-condensed table-bordered" id="example" style="width:100%"><thead class="row htable"><tr style="color:black;"><th>Id</th><th>Outlet Name(SM)</th><th>Phone Number(SM)</th><th>City (SM)</th><th>State Head(SM)</th><th>BDM (SM)</th><th>Store Pics(SM)</th><th>Agreed Brand fees(SM)</th><th>Received Brand fees</th><th>pending Pics(SM)</th><th>Agreed Wallet(SM)</th><th>Investment Date(SM)</th><th>KYC (SM)</th><th>Addhar(SM)</th><th>pan(SM)</th><th>GST(SM)</th><th>Cancel cheque(SM)</th><th>Rent agreement/Owner ship proof(SM)</th><th>LOI(SM)</th><th>Code(SM)</th><th>Recee Planed(Kamini)</th><th>Recee Actual(Kamini)</th><th>Designing Planed(Kamini)</th><th>Designing Actual(Kamini)</th><th>Stock payment(kamini)</th><th>Billing Status(Niranjan)</th><th>Submit</th><th>Delete</th></tr></thead><tbody>#foreach($pob in $partnerOnBoardingPanel )<tr id="trow2">#if($pob.getId())<td style="background:#7abbf8;">$pob.getId()</td>#else<td>$pob.getId()</td>#end#if($pob.getOutLetName())<td><input type="text" placeholder="OutLet Name" value="$pob.getOutLetName()" name="outlateName"disabled style="background:pink;"></td>#else<td><input type="text" placeholder="OutLet Name" name="outlateName" disabled></td>#end#if($pob.getPhoneNumber())<td><input type="number" placeholder="9999999999" value="$pob.getPhoneNumber()"name="phonenumber1"disabled style="background:pink;"></td>#else<td><input type="number" placeholder="9999999999" name="phonenumber1" disabled></td>#end#if($pob.getCity() && $pob.getCity() != "")<td><input type="text" placeholder="City (SM)" disabled name="city1" value="$pob.getCity()"style="background:pink;"></td>#else<td><input type="text" placeholder="City (SM)" disabled name="city1"></td>#end#if($pob.getStateHead() && $pob.getStateHead() != "")<td><input type="text" placeholder="State Head(SM)" disabled name="shead1"value="$pob.getStateHead()"style="background:pink;"></td>#else<td><input type="text" placeholder="State Head(SM)" disabled name="shead1"></td>#end#if($pob.getBDM() && $pob.getBDM() != "")<td><input type="text" placeholder="BDM (SM)" disabled name="bdm1" value="$pob.getBDM()"style="background:pink;"></td>#else<td><input type="text" placeholder="BDM (SM)" disabled name="bdm1"></td>#end#if($pob.getStorePics() && $pob.getStorePics() != 0)<td class="storepics docfile" style="background:pink;"><input type="hidden" class="storepicshidden" value="$pob.getStorePics()"><input type="file" class="storepic" placeholder="Store Pics(SM)" disabled name="storepics1"value="$pob.getStorePics()">##<button type="button" class="btn btn-primary download-store-file" data-docid="$pob.getStorePics()" data-id="$pob.getId()">download</button><a href="${rc.contextPath}/download-attachment?documentId=$pob.getStorePics()">DownloadDoc</a></td>#else<td class="storepics docfile"><input type="hidden"><input type="file" class="storepic" placeholder="Store Pics(SM)" disabled name="storepics1"></td>#end#if($pob.getAgreedBrandFees() != 0)<td><input type="text" placeholder="Agreed Brand fees(SM)" disabled name="abrand1"value="$pob.getAgreedBrandFees()" style="background:pink;"></td>#else<td><input type="text" placeholder="Agreed Brand fees(SM)" disabled name="abrand1"></td>#end#if($pob.getReceivedBrandFees()!= 0)<td><input type="text" placeholder="Received Brand fees" disabled name="recbrand1"value="$pob.getReceivedBrandFees()" style="background:pink;"/></td>#else<td><input type="text" placeholder="Received Brand fees" disabled name="recbrand1"></td>#end#if($pob.getPendingPics() && $pob.getPendingPics() != 0)<td class="pendingpics docfile" style="background:pink"><input type="hidden" class="pendpicshidden" value="$pob.getPendingPics()"><input type="file" class="pendpics" placeholder="pending Pics(SM)" disabled name="pendpics1"value="$pob.getPendingPics()"/>##<button type="button" class="btn btn-primary download-pending-file" data-docpid="$pob.getPendingPics()" data-id="$pob.getId()">Download Document</button><a href="${rc.contextPath}/download-attachment?documentId=$pob.getPendingPics()">DownloadDoc</a></td>#else<td class="pendingpics docfile"><input type="hidden"><input type="file" placeholder="Pending Pics(SM)" disabled name="pendpics1"></td>#end#if($pob.getAgreedWallet()!= 0)<td><input type="text" placeholder="Agreed Wallet(SM)" disabled name="awallet"value="$pob.getAgreedWallet()" style="background:pink;"></td>#else<td><input type="text" placeholder="Agreed Wallet(SM)" disabled name="awallet"></td>#end#if($pob.getInvestmentDate())<td><input type="date" placeholder="Investment Date(SM)" disabled name="idate1" id="idate"value="$pob.getInvestmentDate().format($datehiphenFormatter)"style="background:pink;"></td>#else<td><input type="date" placeholder="Investment Date(SM)" disabled name="idate1"></td>#end#if($pob.getKyc() && $pob.getKyc() != 0)<td class="kyc docfile" style="background:pink;"><input type="hidden" class="kychidden" value="$pob.getKyc()"><input type="file" class="kyc" placeholder="KYC (SM)" disabled name="kyc1"value="$pob.getKyc()">##<button type="button" class="btn btn-primary download-kyc-file" data-docpid="$pob.getKyc()" data-id="$pob.getId()">Download Document</button><a href="${rc.contextPath}/download-attachment?documentId=$pob.getKyc()">Download Doc</a></td>#else<td class="kyc docfile"><input type="hidden"><input type="file" id="kyc" placeholder="KYC (SM)" disabled name="kyc1"></td>#end#if($pob.getAadharDoc() && $pob.getAadharDoc() != 0)<td class="aadhar docfile" style="background:pink;"><input type="hidden" class="aadharhidden" value="$pob.getAadharDoc()"><input type="file" class="aadhar" placeholder="aadhar" disabled name="aadhar1"value="$pob.getAadharDoc()">##<button type="button" class="btn btn-primary download-aadhar-file" data-docpid="$pob.getAadharDoc()" data-id="$pob.getId()">Download Document</button><a href="${rc.contextPath}/download-attachment?documentId=$pob.getAadharDoc()">DownloadDoc</a></td>#else<td class="aadhar docfile"><input type="hidden"><input type="file" class="aadhar" placeholder="aadhar" disabled name="aadhar1"></td>#end#if($pob.getPanDoc() && $pob.getPanDoc() != 0)<td class="pan docfile" style="background:pink;"><input type="hidden" class="panhidden" value="$pob.getPanDoc()"><input type="file" class="pandoc" placeholder="pan(SM)" disabled name="pan1"value="$pob.getPanDoc()">##<button type="button" class="btn btn-primary download-pan-file" data-docpid="$pob.getPanDoc()" data-id="$pob.getId()">Download Document</button><a href="${rc.contextPath}/download-attachment?documentId=$pob.getPanDoc()">Download Doc</a></td>#else<td class="pan docfile"><input type="hidden"><input type="file" class="pandoc" placeholder="pan(SM)" disabled name="pan1"></td>#end#if($pob.getGstdoc() && $pob.getGstdoc() != 0)<td class="gst docfile" style="background:pink;"><input type="hidden" class="gsthidden" value="$pob.getGstdoc()"><input type="file" class="gstdoc" placeholder="GST(SM)" disabled name="gst1"value="$pob.getGstdoc()" style="background:pink;">##<button type="button" class="btn btn-primary download-gst-file" data-docpid="$pob.getGstdoc()" data-id="$pob.getId()">Download Document</button><a href="${rc.contextPath}/download-attachment?documentId=$pob.getGstdoc()">Download Doc</a></td>#else<td class="gst docfile"><input type="hidden"><input type="file" class="gstdoc" placeholder="GST(SM)" disabled name="gst1"></td>#end#if($pob.getCancelCheque() && $pob.getCancelCheque() != 0)<td class="cancheque docfile" style="background:pink;"><input type="hidden" class="canchequehidden" value="$pob.getCancelCheque()"><input type="file" class="canchequedoc" placeholder="Cancel cheque(SM)" disabled name="cancheque1"value="$pob.getCancelCheque()">##<button type="button" class="btn btn-primary download-cancheque-file" data-docpid="$pob.getCancelCheque()" data-id="$pob.getId()">Download Document</button><a href="${rc.contextPath}/download-attachment?documentId=$pob.getCancelCheque()">DownloadDoc</a></td>#else<td class="cancheque docfile"><input type="hidden"><input type="file" class="canchequedoc" placeholder="Cancel cheque(SM)" disabledname="cancheque1"></td>#end#if($pob.getRentAgreement() != 0)<td><input type="text" placeholder="Rent agreement/Owner ship proof(SM)" disabledname="ragreement1"value="$pob.getRentAgreement()" style="background:pink;"></td>#else<td><input type="text" placeholder="Rent agreement/Owner ship proof(SM)" disabledname="ragreement1"></td>#end#if($pob.getLOI() != 0)<td><input type="text" placeholder="LOI(SM)" disabled name="loi1" value="$pob.getLOI()"style="background:pink;"></td>#else<td><input type="text" placeholder="LOI(SM)" disabled name="loi1"></td>#end#if($pob.getCode() && $pob.getCode() != "")<td><input type="text" placeholder="Code(SM)" disabled name="code1" value="$pob.getCode()"style="background:pink;"></td>#else<td><input type="text" placeholder="Code(SM)" disabled name="code1"></td>#end#if($pob.getReceePlaned())<td><input type="date" id="rplaned" placeholder="Recee Planed(Kamini)" disabled name="rplaned1"value="$pob.getReceePlaned().format($datehiphenFormatter)" style="background:pink;"></td>#else<td><input type="date" id="rplaned" placeholder="Recee Planed(Kamini)" disabled name="rplaned1"></td>#end#if($pob.getReceeActual())<td><input type="date" id="ractual" placeholder="Recee Actual(Kamini)" disabled name="ractual1"value="$pob.getReceeActual().format($datehiphenFormatter)" style="background:pink;"></td>#else<td><input type="date" id="ractual" placeholder="Recee Actual(Kamini)" disabled name="ractual1"></td>#end#if($pob.getDesigningPlaned())<td><input type="date" id="dplaned" placeholder="Designing Planed(Kamini)" disabledname="dplaned1"value="$pob.getDesigningPlaned().format($datehiphenFormatter)"style="background:pink;"></td>#else<td><input type="date" id="dplaned" placeholder="Designing Planed(Kamini)" disabledname="dplaned1"></td>#end#if($pob.getDesigningActual())<td><input type="date" id="dactual" placeholder="Designing Actual(Kamini)" disabledname="dactual1"value="$pob.getDesigningActual().format($datehiphenFormatter)"style="background:pink;"></td>#else<td><input type="date" id="dactual" placeholder="Designing Actual(Kamini)" disabledname="dactual1"></td>#end#if($pob.getStockPayment()!= 0)<td><input type="text" placeholder="Stock payment(kamini)" disabled name="spayment1"value="$pob.getStockPayment()" style="background:pink;"></td>#else<td><input type="text" placeholder="Stock payment(kamini)" disabled name="spayment1""></td>#end#if($pob.getBillingStatus() && $pob.getBillingStatus() != "")<td><input type="text" placeholder="Billing Status(Niranjan)" disabled name="bstatus1"value="$pob.getBillingStatus()" style="background:pink;"></td>#else<td><input type="text" placeholder="Billing Status(Niranjan)" disabled name="bstatus1"></td>#end<td><button type="submit" form="form1" value="Submit" style="background:blue; color:black;"class="submit1">Submit</button></td><td><button type="submit" form="form2" value="Submit1" data-id="$pob.getId()"style="background:#f18681;"class="delete">delete</button></td></tr>#end</tbody></table></div></section><script type="text/javascript">$(document).ready(function () {var dtable = $('#example').DataTable({"bPaginate": true,"bLengthChange": true,"bFilter": true,"bInfo": false,"bAutoWidth": false,"scrollX": true,});$('.submit1').on('click', function () {var row = $(this).closest("tr");console.log(row);var data0 = $(row).find("td:eq(0)").text();var data1 = $(row).find("td:eq(1) input[type='text']").val();var data2 = $(row).find("td:eq(2) input[type='number']").val();var data3 = $(row).find("td:eq(3) input[type='text']").val();var data4 = $(row).find("td:eq(4) input[type='text']").val();var data5 = $(row).find("td:eq(5) input[type='text']").val();var data6 = $(row).find(".storepics input[type=hidden]").val();var data7 = $(row).find("td:eq(7) input[type='text']").val();var data8 = $(row).find("td:eq(8) input[type='text']").val();var data9 = $(row).find(".pendingpics input[type=hidden]").val();var data10 = $(row).find("td:eq(10) input[type='text']").val();var data11 = $(row).find("td:eq(11) input[type='date']").val();if (data11 != "") {data11 = data11 + "T00:00:00";}var data12 = $(row).find(".kyc input[type=hidden]").val();var data13 = $(row).find(".aadhar input[type=hidden]").val();var data14 = $(row).find(".pan input[type=hidden]").val();var data15 = $(row).find(".gst input[type=hidden]").val();var data16 = $(row).find(".cancheque input[type=hidden]").val();var data17 = $(row).find("td:eq(17) input[type='text']").val();var data18 = $(row).find("td:eq(18) input[type='text']").val();var data19 = $(row).find("td:eq(19) input[type='text']").val();var data20 = $(row).find("td:eq(20) input[type='date']").val();if (data20 != "") {data20 = data20 + "T00:00:00";}var data21 = $(row).find("td:eq(21) input[type='date']").val();if (data21 != "") {data21 = data21 + "T00:00:00";}var data22 = $(row).find("td:eq(22) input[type='date']").val();if (data22 != "") {data22 = data22 + "T00:00:00";}var data23 = $(row).find("td:eq(23) input[type='date']").val();if (data23 != "") {data23 = data23 + "T00:00:00";}var data24 = $(row).find("td:eq(24) input[type='text']").val();var data25 = $(row).find("td:eq(25) input[type='text']").val();var prebookingListingObject = {};prebookingListingObject['id'] = data0prebookingListingObject['outletName'] = data1prebookingListingObject['phoneNumber'] = data2prebookingListingObject['city'] = data3prebookingListingObject['stateHead'] = data4prebookingListingObject['bdm'] = data5prebookingListingObject['storePics'] = data6prebookingListingObject['agreedBrandFees'] = data7prebookingListingObject['receiveBrandFees'] = data8prebookingListingObject['pendingPics'] = data9prebookingListingObject['agreedWallet'] = data10prebookingListingObject['investmentDate'] = data11prebookingListingObject['kyc'] = data12prebookingListingObject['aadhar'] = data13prebookingListingObject['panDoc'] = data14prebookingListingObject['gst'] = data15prebookingListingObject['cancelCheque'] = data16prebookingListingObject['rentAgreement'] = data17prebookingListingObject['loi'] = data18prebookingListingObject['code'] = data19prebookingListingObject['receePlaned'] = data20prebookingListingObject['receeActual'] = data21prebookingListingObject['designingPlaned'] = data22prebookingListingObject['designingActual'] = data23prebookingListingObject['stockPayment'] = data24prebookingListingObject['billingStatus'] = data25var jsonObject = JSON.stringify(prebookingListingObject);console.log(jsonObject);doAjaxRequestWithJsonHandler(context+ "/partnerOnBoardingListing","POST",jsonObject,function (response) {console.log("reponse" + response);if (response == 'true') {alert("successfully submit");panelListing("main-content");localStorage.removeItem("storePics");localStorage.removeItem("pendPics");localStorage.removeItem("kyc");localStorage.removeItem("aadhar");localStorage.removeItem("pan");localStorage.removeItem("gst");localStorage.removeItem("cancheque");}});});$('#newmodal').on('click', function () {var json = partnerOnBoardingListingJson();console.log(json);doAjaxRequestWithJsonHandler(context+ "/partnerOnBoardingListing","POST",json,function (response) {console.log("reponse" + response);if (response == 'true') {alert("successfully submit");panelListing("main-content");}});});$(document).ready(function () {var table = $('#example').DataTable();$('#example tbody').on('dblclick', 'tr', function () {console.log(this);debugger;var data = table.row(this).data();$(this).find(":input").attr('disabled', false).show();$(this).css("background-color", "#87d3f8");});});$(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];let fileInput = $(this);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!}});$('.delete').on('click', function () {var id = $(this).data('id');console.log('helo');var id = $(this).data('id');console.log(id);doPostAjaxRequestHandler(context + "/partnerOnBoardingDelete?id=" + id,function (response) {console.log("reponse" + response);if (response == 'true') {alert("successfully delete");panelListing("main-content");}});});function partnerOnBoardingListingJson() {var prebookingListingObject = {};prebookingListingObject['outletName'] = $('#outLateName1').val();prebookingListingObject['phoneNumber'] = $('#number1').val();return JSON.stringify(prebookingListingObject);}function panelListing(domId) {doAjaxRequestHandler(context + "/partnerOnBoardingPanel", "GET",function (response) {$('#' + domId).html(response);});}});</script>