pdf van invullijst
This commit is contained in:
@@ -118,6 +118,7 @@ $(function(){
|
||||
bezig : ko.observable(false),
|
||||
meetellen : ko.observable(false),
|
||||
optieslengte : ko.observable(0),
|
||||
module : ko.observable(''),
|
||||
|
||||
initBindings :function(){
|
||||
var self = ls.MonitorModel;
|
||||
@@ -145,6 +146,7 @@ $(function(){
|
||||
|
||||
}; // if
|
||||
self.soort(data.soort);
|
||||
self.module(data.module);
|
||||
hideAjaxLoader();
|
||||
},'json');
|
||||
},
|
||||
@@ -211,7 +213,6 @@ $(function(){
|
||||
fUpdateScoretypeVanaf3: function(data){
|
||||
var self= ls.MonitorModel
|
||||
var indicatorscoreID = data;
|
||||
console.log(this, "this")
|
||||
|
||||
var submitData = {
|
||||
indicatorscoreid : indicatorscoreID,
|
||||
@@ -260,17 +261,73 @@ $(function(){
|
||||
|
||||
fPrint:function(){
|
||||
var self =ls.MonitorModel;
|
||||
if (self.bezig()) return;
|
||||
// if (self.bezig()) return;
|
||||
self.bezig(true);
|
||||
var items = ko.toJSON(self.listitems());
|
||||
var data ={ 'orgversie' : self.selectedOrgversion().info(),
|
||||
'tabelinfo' : items,
|
||||
'notitie' : self.notitie()}
|
||||
data=JSON.stringify(data);
|
||||
var fvID = self.fvid();
|
||||
$.post("index.php/monpas/monitor/getlistitems/" + self.selectedOrgversion().id, function(data){
|
||||
self.listitems.removeAll();
|
||||
self.scoreopties.removeAll();
|
||||
if (data.ijkpunten){
|
||||
$.each(data.ijkpunten,function(i,p){
|
||||
self.listitems.push(new fAddListitem(p));
|
||||
});// each
|
||||
}; //if
|
||||
|
||||
if(data.scoreopties){
|
||||
$.each(data.scoreopties,function(x,o){
|
||||
self.scoreopties.push(new fAddScoreoptie(o));
|
||||
});// each
|
||||
self.optieslengte(self.scoreopties().length);
|
||||
}
|
||||
|
||||
self.notitie(data.notitie);
|
||||
if(data.meetellen && data.meetellen == 1) {
|
||||
self.meetellen(true);
|
||||
}
|
||||
else{
|
||||
self.meetellen(false);
|
||||
}
|
||||
self.fvid(fvID);
|
||||
|
||||
self.fMaakPDF();
|
||||
|
||||
|
||||
},'json');
|
||||
|
||||
|
||||
|
||||
self.bezig(false);
|
||||
|
||||
},
|
||||
|
||||
fMaakPDF(){
|
||||
var self = ls.MonitorModel;
|
||||
var module = self.module();
|
||||
var info = self.selectedOrgversion().info();
|
||||
var tabel = document.getElementById("invulTabel").outerHTML;
|
||||
var notitie = false;
|
||||
var ingevuldenotitie = self.notitie();
|
||||
if (ingevuldenotitie && ingevuldenotitie.length > 0)
|
||||
notitie = document.getElementById("invulNotitie").outerHTML;
|
||||
var zichtbaar = document.getElementById("invulZichtbaar").outerHTML;
|
||||
|
||||
|
||||
console.log( notitie, "notitie")
|
||||
|
||||
var sd = {
|
||||
'module' : module,
|
||||
'info' : info,
|
||||
'tabel' : tabel,
|
||||
'notitie' : notitie,
|
||||
'zichtbaar' : zichtbaar,
|
||||
'filenaam' : 'formulier' + self.module()+ 'nr' + self.selectedOrgversion().periodenummer
|
||||
}
|
||||
|
||||
data=JSON.stringify(sd);
|
||||
|
||||
|
||||
var $form = $("<form method='post' action='index.php/monpas/monitor/printlijst' target='_blank'>").append($('<input type = "hidden" name="data" id ="data">').val(data) );
|
||||
$form.appendTo("body").submit();
|
||||
self.bezig(false);
|
||||
|
||||
}
|
||||
} ; // definition van model
|
||||
|
||||
Reference in New Issue
Block a user