Commit 6efdb900 authored by 徐州's avatar 徐州

新增print接口

parent 42fea1e5
......@@ -242,25 +242,26 @@
</style>
<script>
function doPrint(type) {
myDoc = {
settings: {
pageWidth: 2100,
pageHeight: 1400,
orientation: 2},
documents: document,
marginIgnored:true,
dragDesigner: {viewSource:true},
settingsID: 'mydoc3',
classesReplacedWhenPrint: new Array('.only_for_print{display:block}'),
copyrights: "杰创软件拥有版权 www.jatools.com"
}
var jatoolsPrinter = document.getElementById("jatoolsPrinter");
// myDoc = {
// settings: {
// pageWidth: 2100,
// pageHeight: 1400,
// orientation: 2},
// documents: document,
// marginIgnored:true,
// dragDesigner: {viewSource:true},
// settingsID: 'mydoc3',
// classesReplacedWhenPrint: new Array('.only_for_print{display:block}'),
// copyrights: "杰创软件拥有版权 www.jatools.com"
// }
// var jatoolsPrinter = document.getElementById("jatoolsPrinter");
if("pre"==type){
updateZslxdbh();
jatoolsPrinter.printPreview(myDoc);
// jatoolsPrinter.printPreview(myDoc);
alert(${paymentItemHis.zslxdbh})
}else if("print"==type){
updateZslxdbh();
jatoolsPrinter.print(myDoc,true);
// jatoolsPrinter.print(myDoc,true);
}
}
......
......@@ -18,5 +18,10 @@
</action>
<!-- 跳转收费信息列表页面 -->
<action name="print" class="com.jshx.jfzm.web.JfzmAction" method="print">
<result name="view">/WEB-INF/pages/jfzm/jfzm_print.jsp</result>
</action>
</package>
</struts>
......@@ -130,20 +130,11 @@ public class JfzmAction extends BaseAction {
/**
* 打印缴费证明时,查询所需要的数据
*/
public void queryDetail() {
public String print() {
rfxm = rfxmService.getById(id);
xmxxb = xmxxbService.getById(rfxm.getXmxxbId());
paymentItemHis = paymentItemHisService.getById(rfxm.getPaymentHisId());
JSONObject jo = new JSONObject();
jo.put("rfxm",rfxm);
jo.put("xmxxb",xmxxb);
jo.put("paymentItemHis",paymentItemHis);
try {
this.getResponse().getWriter().write(jo.toString());
this.getResponse().getWriter().flush();
} catch (IOException e) {
e.printStackTrace();
}
return VIEW;
}
public Pagination getPagination() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment