Index: ssts-web/src/main/webapp/disinfectsystem/print/print.js =================================================================== diff -u -r26046 -r26057 --- ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 26046) +++ ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 26057) @@ -1937,7 +1937,15 @@ // LODOP.PREVIEW(); } } - +function satisfactionSurveyTablePrint(printObject){ + if(printObject){ + formTypeOfPrinted = "printSatisfactionSurveyData"; + setPrinterByConfig(); + print2(printObject); + LODOP.PRINT(); +// LODOP.PREVIEW(); + } +} /** * 打印签收单。 * @param recyclingPrintDatas Index: ssts-web/src/main/webapp/homepage/portalPage.jsp =================================================================== diff -u -r25625 -r26057 --- ssts-web/src/main/webapp/homepage/portalPage.jsp (.../portalPage.jsp) (revision 25625) +++ ssts-web/src/main/webapp/homepage/portalPage.jsp (.../portalPage.jsp) (revision 26057) @@ -87,6 +87,8 @@ + + Index: ssts-web/src/main/webapp/disinfectsystem/satisfactionsurvey/satisfactionSurveyTableForm.js =================================================================== diff -u -r25932 -r26057 --- ssts-web/src/main/webapp/disinfectsystem/satisfactionsurvey/satisfactionSurveyTableForm.js (.../satisfactionSurveyTableForm.js) (revision 25932) +++ ssts-web/src/main/webapp/disinfectsystem/satisfactionsurvey/satisfactionSurveyTableForm.js (.../satisfactionSurveyTableForm.js) (revision 26057) @@ -1,7 +1,6 @@ var satisfactionSurveyTableItemTreeStore; //意度调查表实例项的top.Ext4.data.TreeStore var formObj; //意度调查表的表单 var windowObj; //意度调查表的窗口 - /** * 每次点击需要把每个节点的“satisfaction”属性更新. * @param nodeId 节点的id @@ -11,8 +10,6 @@ var node = satisfactionSurveyTableItemTreeStore.getNodeById(nodeId); node.set('satisfaction', thiz.value); } - - /** * 渲染每个选项调用的函数. */ @@ -39,6 +36,7 @@ * @param callBack 添加完成的回调函数 */ function addSatisfactionSurveyTable(id, existGrid, templateId, callBack) { + /** * 意度调查表实例项的数据模型 */ @@ -213,6 +211,29 @@ } }], buttons : [{ + id : 'printBtn', + text : '打印', + hidden:true, + handler : function(index,aa) { + var ids = top.Ext4.getCmp('id').getValue(); + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/satisfactionsurvey/satisfactionSurveyTableAction!loadSatisfactionSurveyTable.do', + params : { + id : ids + }, + success : function(response, options) { + var result = Ext.decode(response.responseText); + if(result.success){ + var data = result.data; + satisfactionSurveyTablePrint(data); + windowObj.close(); + }else{ + showResult(result.message); + } + } + }); + } + },{ id : 'saveBtn', text : '提交', handler : function() { @@ -224,9 +245,9 @@ handler : function() { top.Ext4.getCmp('satisfactionSurveyTableWindow').close(); } - }] + }] }); - + //解决在低分辨率(1024*768)下满意度调查表填写时"提交"按钮未显示的问题 var windowHeight = (top.screen.height > 1000 ? 650 : 500); windowObj = new top.Ext4.window.Window({ @@ -244,7 +265,9 @@ plain : true, items : formObj }); - + if(id != ""){ + top.Ext4.getCmp('printBtn').show(); + } formObj.form.load({ url : WWWROOT + '/disinfectSystem/satisfactionsurvey/satisfactionSurveyTableAction!loadSatisfactionSurveyTable.do', method : 'POST', @@ -274,6 +297,7 @@ templateId: templateId } }); + } /** @@ -393,4 +417,5 @@ icon: top.Ext4.Msg.QUESTION }); } + } Index: ssts-web/src/main/webapp/disinfectsystem/satisfactionsurvey/satisfactionSurveyTableView.jsp =================================================================== diff -u -r22783 -r26057 --- ssts-web/src/main/webapp/disinfectsystem/satisfactionsurvey/satisfactionSurveyTableView.jsp (.../satisfactionSurveyTableView.jsp) (revision 22783) +++ ssts-web/src/main/webapp/disinfectsystem/satisfactionsurvey/satisfactionSurveyTableView.jsp (.../satisfactionSurveyTableView.jsp) (revision 26057) @@ -35,6 +35,9 @@ SSTS_SatisfactionSurveyTable_Delete = false; + + + Index: ssts-web/src/main/webapp/disinfectsystem/config/gdsy/print/printConfig.js =================================================================== diff -u -r23141 -r26057 --- ssts-web/src/main/webapp/disinfectsystem/config/gdsy/print/printConfig.js (.../printConfig.js) (revision 23141) +++ ssts-web/src/main/webapp/disinfectsystem/config/gdsy/print/printConfig.js (.../printConfig.js) (revision 26057) @@ -1,4 +1,4 @@ -var appropriationInListConfig = { +var appropriationInListConfig = { headerFooter : [ // 页眉名称 {label : "广东省人民医院调拨入库单", dataIndex : '', fontSize : 15, position : ["0.3cm","37%","99%",5]}, @@ -1656,6 +1656,151 @@ LODOP.ADD_PRINT_BARCODE("18mm","5mm","40mm","10mm","128Auto", barcode);// 条码1 LODOP.PRINT(); } +//满意度调查表 +var printSatisfactionSurveyConfig = { + customPrint:printSatisfactionSurvey +} +function satisfactionSurveycheckInput(htmls,satisfactionObj){ + htmls += ""; + if(satisfactionObj == "SATISFACTION"){ + htmls += " "; + }else{ + htmls += " "; + } + + htmls += ""; + if(satisfactionObj == "MORESATISFACTION"){ + htmls += " "; + }else{ + htmls += " "; + } + + htmls += ""; + if(satisfactionObj == "BASICSATISFACTION"){ + htmls += " "; + }else{ + htmls += " "; + } + + htmls += ""; + if(satisfactionObj == "NOTVERYSATISFACTION"){ + htmls += " "; + }else{ + htmls += " "; + } + + htmls += ""; + if(satisfactionObj == "NOSATISFACTION"){ + htmls += " "; + }else{ + htmls += " "; + } + htmls +="" + htmls +=""; + return htmls; +} + +function printSatisfactionSurvey(data){ + var headHtml = "
"+data.satisfactionSurveyTemplateName+"
"; + //调查内容1 + var surveyItemHtml = ""; + surveyItemHtml += "" + + "" + + ""+ + ""+ + ""; + for(var i = 0; i < data.answerItems.length;i++){ + surveyItemHtml += "" + + "" + + ""; + + if(data.answerItems[i].children != undefined && data.answerItems[i].children.length > 0){//有子级 + surveyItemHtml += ""; + var childrens = data.answerItems[i].children; + for(var j = 0;j < childrens.length;j++){ + surveyItemHtml += "" + + "" + + ""+ + "" + + "" + + ""+ + ""+ + ""; */ + surveyItemHtml += "
序号项目内容评价
"+(i+1)+""+data.answerItems[i].content+"
"+(i+1)+"."+(j+1)+""+childrens[j].content+""; + surveyItemHtml = satisfactionSurveycheckInput(surveyItemHtml,childrens[j].satisfaction); + } + }else{ + surveyItemHtml += ""; + surveyItemHtml = satisfactionSurveycheckInput(surveyItemHtml,data.answerItems[i].satisfaction); + } + } +/* surveyItemHtml += "
20"+data.remark+""+ + "、"+ + "、"+ + "、"+ + "、"+ + ""+ + "
"; + //调查内容2 + var surveyCustomHtml = ""; + surveyCustomHtml += "" + + ""+ + ""+ + ""; + var formInstanceItems = data.formInstanceItems; + if(formInstanceItems != undefined && formInstanceItems.length > 0){ + for(var k = 0;k < formInstanceItems.length;k++){ + surveyCustomHtml += "" + + ""; + surveyCustomHtml += ""; + surveyCustomHtml += ""; + } + } +/* surveyCustomHtml += "" + + "" + + ""+ + ""; */ + surveyCustomHtml += "" + + ""; + surveyCustomHtml += "" + + "" + + ""+ + ""; + + surveyCustomHtml += "
调查内容评价
"+formInstanceItems[k].name+""; + if(formInstanceItems[k].answer != undefined && formInstanceItems[k].answer.length > 0){ + var answers = formInstanceItems[k].answer; + if(formInstanceItems[k].options != undefined && formInstanceItems[k].options.length > 0){ + var options = formInstanceItems[k].options; + for(var m = 0;m < options.length;m++){ + surveyCustomHtml += ""; + if(answers.indexOf(options[m]) != -1){//存在 + surveyCustomHtml += "  "; + }else{ + surveyCustomHtml += "  "; + } + } + }else{ + surveyCustomHtml += ""+answers+""; + } + } + surveyCustomHtml += "
"+data.remark+""+ + " "+ + " "+ + " "+ + ""+ + "
意见及建议: "+data.remark+"
科室: "+data.depart+"日期: "+data.surveyDate+"
"; + var surveyAllHtml = "" + surveyAllHtml += ""; + surveyAllHtml += " "; + surveyAllHtml += "
"+surveyItemHtml+"
"+surveyCustomHtml+"
"; + //打印设置 + var LODOP = getLodop(document.getElementById('LODOP'),document.getElementById('LODOP_EM')); + //项目内容 + LODOP.ADD_PRINT_TABLE(80,"5%","90%","100%",surveyAllHtml); + //标题 + LODOP.ADD_PRINT_HTM(30,20,"95%",30,headHtml); +} var printConfig = { //发货计划单 invoicePlan : invoicePlanPrintConfig, @@ -1721,5 +1866,7 @@ //调拨入库单 appropriationInList : appropriationInListConfig, //调拨出库单 - appropriationOutList : appropriationOutListConfig + appropriationOutList : appropriationOutListConfig, + //满意度调查表 + printSatisfactionSurveyData :printSatisfactionSurveyConfig };