打印模板修改

master
e 2018-10-23 23:42:51 +08:00
parent fd59b499cb
commit d4d3761830
5 changed files with 277 additions and 6 deletions

View File

@ -1,10 +1,7 @@
package com.zzjee.wm.controller;
import com.zzjee.api.ResultDO;
import com.zzjee.md.entity.MdCusEntity;
import com.zzjee.md.entity.MdGoodsEntity;
import com.zzjee.md.entity.MdSupEntity;
import com.zzjee.md.entity.MvGoodsEntity;
import com.zzjee.md.entity.*;
import com.zzjee.wm.entity.*;
import com.zzjee.wm.page.WmNoticeImpPage;
import com.zzjee.wm.service.WmImNoticeHServiceI;
@ -167,6 +164,68 @@ public class WmImNoticeHController extends BaseController {
public ModelAndView tbatchlist(HttpServletRequest request) {
return new ModelAndView("com/zzjee/wm/wmintqmbatchList");
}
@RequestMapping(params = "doPrintpage")
public ModelAndView doPrint(String id,HttpServletRequest request) {
WmImNoticeHEntity wmImNoticeHEntity = wmImNoticeHService.getEntity(WmImNoticeHEntity.class, id);
request.setAttribute("wmImNoticeHPage", wmImNoticeHEntity);
request.setAttribute("kprq",DateUtils.date2Str(wmImNoticeHEntity.getCreateDate(),DateUtils.date_sdf));
request.setAttribute("comname", ResourceUtil.getConfigByName("comname"));
if(StringUtil.isNotEmpty(wmImNoticeHEntity.getImCusCode())){
request.setAttribute("noticeid", wmImNoticeHEntity.getImCusCode());
}else{
request.setAttribute("noticeid", wmImNoticeHEntity.getNoticeId());
}
try{
MdSupEntity mdSupEntity = systemService.findUniqueByProperty(MdSupEntity.class,"gysBianMa",wmImNoticeHEntity.getSupCode());
MdCusEntity mdcus = systemService.findUniqueByProperty(MdCusEntity.class,"keHuBianMa",wmImNoticeHEntity.getCusCode());
request.setAttribute("cusname",wmImNoticeHEntity.getCusCode()+"-"+mdcus.getZhongWenQch());
request.setAttribute("supname",mdSupEntity.getGysBianMa()+"-"+ mdSupEntity.getZhongWenQch());
}catch (Exception e){
}
//获取参数
Object id0 = wmImNoticeHEntity.getNoticeId();
//===================================================================================
//查询-产品
Double tomsum = 0.00;
Double noticesum = 0.00;
List<WmImNoticeIEntity> wmImNoticeIEntitynewList = new ArrayList<>();
String hql0 = "from WmImNoticeIEntity where 1 = 1 AND iM_NOTICE_ID = ? ";
try {
List<WmImNoticeIEntity> wmImNoticeIEntityList = systemService
.findHql(hql0, id0);
for (WmImNoticeIEntity wmImNoticeIEntity : wmImNoticeIEntityList) {
if (StringUtil.isEmpty(wmImNoticeIEntity.getBinPlan())){
String hqlup = "from WmToUpGoodsEntity where 1 = 1 AND goodsId = ? order by createDate desc";
try {
WmToUpGoodsEntity wmToUpGoodsEntity = (WmToUpGoodsEntity)systemService.findHql(hqlup,wmImNoticeIEntity.getGoodsCode()).get(0);
wmImNoticeIEntity.setBinPlan(wmToUpGoodsEntity.getKuWeiBianMa());
}catch (Exception e){
}
}
wmImNoticeIEntitynewList.add(wmImNoticeIEntity);
}
request.setAttribute("wmImNoticeIList", wmImNoticeIEntitynewList);
}catch (Exception e){
}
return new ModelAndView("com/zzjee/wm/print/imnotice-print");
}
@RequestMapping(params = "datagridbatch")
public void datagridbatch(WmImNoticeIEntity wmImNoticeI,
HttpServletRequest request, HttpServletResponse response,

View File

@ -115,7 +115,8 @@ public class WmImNoticeIEntity implements java.io.Serializable {
/**基本单位收货数量*/
private java.lang.String baseQmcount;
@Excel(name="商品条码")
private java.lang.String barCode;
/**
*: java.lang.String
*@return: java.lang.String
@ -645,4 +646,18 @@ public class WmImNoticeIEntity implements java.io.Serializable {
public void setOtherId(java.lang.String otherId){
this.otherId = otherId;
}
@Column(name ="BARCODE",nullable=true,length=32)
public java.lang.String getBarCode(){
return this.barCode;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setBarCode(java.lang.String barCode){
this.barCode = barCode;
}
}

View File

@ -52,7 +52,7 @@ public class WmImNoticeHServiceImpl extends CommonServiceImpl implements WmImNot
mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmImNoticeI.getGoodsCode()) ;
if(mvgoods!=null){
wmImNoticeI.setGoodsName(mvgoods.getGoodsName());
wmImNoticeI.setBarCode(mvgoods.getShpTiaoMa());
try {
try {

View File

@ -0,0 +1,190 @@
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>入库通知打印</title>
<t:base type="jquery,easyui,tools"></t:base>
<script type="text/javascript" charset="utf-8" src="webpage/com/zzjee/wmjs/jquery.jqprint.js"></script>
<script language="javascript">
function printall(){
$(".printdiv").jqprint();
}
function printview(){
document.all.WebBrowser1.ExecWB(7,1);
}
</script>
<style>
tr
{mso-height-source:auto;
mso-ruby-visibility:none;}
col
{mso-width-source:auto;
mso-ruby-visibility:none;}
br
{mso-data-placement:same-cell;}
ruby
{ruby-align:left;}
.style0
{mso-number-format:General;
text-align:general;
vertical-align:bottom;
white-space:nowrap;
mso-rotate:0;
mso-background-source:auto;
mso-pattern:auto;
color:windowtext;
font-size:14pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family: 黑体;
mso-font-charset:0;
border:none;
mso-protection:locked visible;
mso-style-name:常规;
mso-style-id:0;}
td
{mso-style-parent:style0;
padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:windowtext;
font-size:14pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:黑体;
mso-font-charset:0;
mso-number-format:General;
text-align:general;
vertical-align:bottom;
border:none;
mso-background-source:auto;
mso-pattern:auto;
mso-protection:locked visible;
white-space:nowrap;
mso-rotate:0;}
.xl65
{mso-style-parent:style0;
color:black;
font-size:16pt;
text-align:center;
border:1.0pt solid black;}
.xl66
{mso-style-parent:style0;
color:black;
font-size:16pt;}
.xl67
{mso-style-parent:style0;
color:black;
font-size:18pt;
text-align:center;}
.xl68
{mso-style-parent:style0;
color:black;
font-size:16pt;
white-space:normal;}
.xl69
{mso-style-parent:style0;
text-align:center;}
</style>
</head>
<body style="overflow-y:hidden" scroll="no">
<a class="easyui-linkbutton" style="margin-top:3px" icon="icon-print" href="javascript:printall()">打印</a>
<div class="printdiv"><t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" >
<input id="content" type="hidden" value="${wmOmNoticeHPage.omNoticeId}">
<table border=0 cellpadding=0 cellspacing=0 width=680 style='border-collapse:
collapse;table-layout:fixed;width:438pt;margin-left: 30px;margin-top: -30px'>
<col width=102 style='mso-width-source:userset;mso-width-alt:3612;width:76pt'>
<col width=84 style='mso-width-source:userset;mso-width-alt:2986;width:63pt'>
<col width=253 style='mso-width-source:userset;mso-width-alt:4010;width:252pt'>
<col width=45 style='mso-width-source:userset;mso-width-alt:1592;width:34pt'>
<col width=94 style='mso-width-source:userset;mso-width-alt:2986;
width:73pt'>
<col width=67 style='mso-width-source:userset;mso-width-alt:2389;width:50pt'>
<col width=102 style='mso-width-source:userset;mso-width-alt:2389;width:102pt'>
<col width=67 style='mso-width-source:userset;mso-width-alt:2389;width:50pt'>
<tr height=18 style='height:13.2pt'>
<td colspan=8 height=18 width=585 style='height:13.2pt;width:438pt'></td>
</tr>
<tr height=40 style='mso-height-source:userset;height:30.0pt'>
<td colspan=4 height=40 class=xl67 style='height:30.0pt'><span style="font-size: 18pt">${comname}</span></td>
<td colspan=3 class=xl68 width=168 style='width:126pt'>日期:${kprq}</td>
<td rowspan="2" class=xl69>
<img src="rest/wmBaseController/showOrDownqrcodeByurl?qrvalue=${wmImNoticeHPage.noticeId}" style="width:80px;height:80px;vertical-align:right">
</td>
</tr>
<tr height=40 style='mso-height-source:userset;height:30.0pt'>
<td colspan=4 height=40 class=xl67 style='height:30.0pt'><span style="font-size: 18pt">入库通知单</span></td>
<td colspan=3 class=xl68 width=168 style='width:126pt'>单号:${noticeid}</td>
<td colspan=1 style='mso-ignore:colspan'></td>
</tr>
<tr height=40 style='mso-height-source:userset;height:30.0pt'>
<td colspan=4 height=40 class=xl68 width=242 style='height:30.0pt;width:182pt'>货主:${cusname}</td>
<td colspan=3 height=40 class=xl68 width=242 style='height:30.0pt;width:182pt'>供应商:${supname}</td>
<td></td>
</tr>
<tr height=40 style='mso-height-source:userset;height:30.0pt'>
<td colspan=4 class=xl68 width=337 style='width:252pt'>备注:${wmOmNoticeHPage.imBeizhu}</td>
<td colspan=3 >WMS单号${wmImNoticeHPage.noticeId}</td>
<td></td>
</tr>
<tr height=33 style='mso-height-source:userset;height:25.05pt'>
<td class=xl65 style='border:1.0pt solid black;text-align: center'>最近上架</td>
<td class=xl65 style='border:1.0pt solid black;text-align: center'>商品编码</td>
<td height=33 class=xl65 style='height:25.05pt;border:1.0pt solid black;text-align: center'>商品名称</td>
<td class=xl65 style='border:1.0pt solid black;text-align: center'>单位</td>
<td class=xl65 style='border:1.0pt solid black;text-align: center'>生产日期</td>
<td class=xl65 style='border:1.0pt solid black;text-align: center'>数量</td>
<td class=xl65 style='border:1.0pt solid black;text-align: center'>托盘</td>
<td class=xl65 style='border:1.0pt solid black;text-align: center'>流通码</td>
<td ></td>
</tr>
<c:if test="${fn:length(wmImNoticeIList) > 0 }">
<c:forEach items="${wmImNoticeIList}" var="poVal" varStatus="stuts">
<tr height=33 style='mso-height-source:userset;height:50px'>
<td class=xl65 style='border:1.0pt solid black;text-align: center'>${poVal.binPlan } </td>
<td height=33 class=xl65 style='height:25.05pt;border:1.0pt solid black;text-align: center'>${poVal.goodsCode }</td>
<td class=xl65 style='border:1.0pt solid black;text-align: center;word-break:break-all;'><span style='word-break:break-all;width: auto;font-size: 14pt'>${poVal.goodsName }</span></td>
<td class=xl65 style='border:1.0pt solid black;text-align: center'>${poVal.goodsUnit }</td>
<td class=xl65 style='border:1.0pt solid black;text-align: center'>${poVal.goodsPrdData }</td>
<td class=xl65 style='border:1.0pt solid black;text-align: center'>${poVal.goodsCount }</td>
<td class=xl65 style='border:1.0pt solid black;text-align: center'></td>
<td class=xl65 align="center" valign="middle" style='border:1.0pt solid black'><img src="rest/wmBaseController/showOrDownqrcodeByurl?qrvalue=${poVal.barCode }" alt="${poVal.barCode }" style="width:40px;height:40px;vertical-align:middle;"> </td>
<td ></td>
</tr>
</c:forEach>
</c:if>
<tr height=20 style='height:25.0pt'>
<td height=20 class=xl66 colspan=8 style='height:15.0pt;mso-ignore:colspan;text-align: justify'>主管:<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>制单: ${wmOmNoticeHPage.createBy}<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>仓管:<span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>叉车:<span
style='mso-spacerun:yes'></span></td>
<td></td>
</tr>
</table>
</t:formvalid></div>
</body>

View File

@ -29,6 +29,8 @@
<t:dgCol title="单据状态" field="imSta" query="true" queryMode="single" width="50"></t:dgCol>
<t:dgConfOpt title="删除" url="wmImNoticeHController.do?doDel&id={id}" urlclass="ace_button" message="确定要删除此收货通知" urlfont="fa-trash-o" exp="imSta#eq#计划中"/>
<%--<t:dgFunOpt title="预约通知" funname="print(id)" urlclass="ace_button" urlfont=" fa-print" exp="imSta#ne#已删除"/>--%>
<t:dgFunOpt title="通知单" funname="doprint(id)" urlclass="ace_button" exp="imSta#ne#已删除" />
<t:dgFunOpt title="验收单" funname="printysd(id)" urlclass="ace_button" urlfont=" fa-print" exp="imSta#ne#已删除"/>
<t:dgFunOpt title="货品ID" funname="printhpid(id)" urlclass="ace_button" urlfont=" fa-print" exp="imSta#ne#已删除"/>
<t:dgFunOpt title="完成" funname="closeor(id)" urlclass="ace_button" exp="imSta#ne#已完成"/>
@ -88,7 +90,12 @@
$('#wmImNoticeHList').datagrid('reload',{});
}
}
function doprint(id){
var url = "wmImNoticeHController.do?doPrintpage&id="+id;
createdetailwindow(" 进货通知单", url, 1000, 1000);
// window.open(url);
}
function addorder(){
var url = "wmImNoticeHController.do?goAdd&orderTypeCode=01";
openwindow("添加",url,"进货",770,500);