221 lines
10 KiB
XML
221 lines
10 KiB
XML
<page height="1040" width="608">
|
|
<% function GetTel(tel){ %>
|
|
<% if(tel.length == 11){ %>
|
|
<% var str = ""; %>
|
|
<% for (var i = 0; i < tel.length; i++) { %>
|
|
<% if(i<7 && i>2){ %>
|
|
<% str += "*"; %>
|
|
<% }else { %>
|
|
<% str += tel.substring(i,i+1); %>
|
|
<%} } return str; %>
|
|
<% }else if(tel.length >4){ %>
|
|
<% var str = ""; %>
|
|
<% for (var i = 0; i < tel.length; i++) { %>
|
|
<% if(i<tel.length -4){ %>
|
|
<% str += "*"; %>
|
|
<% }else { %>
|
|
<% str += tel.substring(i,i+1); %>
|
|
<%} } return str; %>
|
|
<% }else %>
|
|
<% return tel;%>
|
|
<%} %>
|
|
|
|
<% function GetRecipientTel(){ %>
|
|
<%var recipient_mobile = data.recipient ? (data.recipient.mobile || '') : '' %>
|
|
<%var recipient_phone = data.recipient ? (data.recipient.phone || '') : '' %>
|
|
<%var recipient_maskMobile = data.recipient ? (data.recipient.maskMobile || '') : '' %>
|
|
<% if(recipient_maskMobile.length ){ %>
|
|
<% return recipient_maskMobile; %>
|
|
<% }else if(recipient_mobile == recipient_phone) {%>
|
|
<% return GetTel(recipient_mobile);%>
|
|
<% }else %>
|
|
<% return GetTel(recipient_mobile) + " " + GetTel(recipient_phone);%>
|
|
<%} %>
|
|
<%var recipient_virtualNumber = data.recipient ? (data.recipient.virtualNumber || '') : '' %>
|
|
<%var recipient_identifyNumber = data.recipient ? (data.recipient.identifyNumber || '') : '' %>
|
|
|
|
<%var sender_name = data.sender ? (data.sender.name || '') : '' %>
|
|
<%var sender_mobile = data.sender ? (data.sender.mobile || '') : '' %>
|
|
<%var sender_phone = data.sender ? (data.sender.phone || '') : '' %>
|
|
<%var sender_telephone_number = (sender_mobile == sender_phone) ? GetTel(sender_mobile) : ( GetTel(sender_mobile) +' '+ GetTel(sender_phone)) %>
|
|
<%var sender_address =(data.sender && data.sender.address)? ((data.sender.address.province || '') +(data.sender.address.city || '') +(data.sender.address.district || '') +(data.sender.address.town || '') +(data.sender.address.detail || '')) : ''%>
|
|
|
|
<%var recipient_telephone_number = GetRecipientTel() %>
|
|
<%var recipient_name = data.recipient ? ( data.recipient.originalName ? data.recipient.originalName : (data.recipient.name || '')) : '' %>
|
|
<%var recipient_address =(data.recipient && data.recipient.address)? ((data.recipient.address.province || '') +(data.recipient.address.city || '') +(data.recipient.address.district || '') +(data.recipient.address.town || '') +(data.recipient.address.originalDetail ? data.recipient.address.originalDetail:data.recipient.address.detail || '')) : ''%>
|
|
|
|
<%var _threeSegmentCode = data.routingInfo ? (data.routingInfo.threeSegmentCode || '') : '' %>
|
|
|
|
<layout height="1040" width="608" orientation="vertical">
|
|
|
|
<!-- logo区域 -->
|
|
<layout height="112" orientation="vertical" >
|
|
<layout height="90" >
|
|
<% if(context.topLogo) {%>
|
|
<text align="left" fontSize="50" left="20" top="20" value="顺丰速运"/>
|
|
|
|
<% } %>
|
|
|
|
<text name="proCodeText" value="<%=data.commonPrintDto ? (data.commonPrintDto.proCode || '') : ''%>" height="60" left="450" top="15" width="150" align="right" fontSize="50" fontWeight="bold" zIndex="334"/>
|
|
|
|
</layout>
|
|
|
|
<layout left="50" height="32" top="90">
|
|
<text align="left" fontSize="23" value="已验视 打印时间 <%=context.date || ''%> <%=context.time || ''%> 第<%=context.index || ''%>个"/>
|
|
</layout>
|
|
|
|
</layout>
|
|
|
|
<layout height="192" width="608" >
|
|
|
|
<%var _YunDanBarCode = (data.waybillSequence==1 && data.totalPackagesCount >1 ) ? (data.parentWaybillCode || '') : (data.waybillCode || '') %>
|
|
|
|
<barcode name="YunDanBarCode" type="code128b" height="120" padding="60,8,60,0" value="<%=_YunDanBarCode %>" />
|
|
<% if(data.totalPackagesCount >1 && data.waybillSequence > 1) {%>
|
|
<text height="40" top="130" width="100" value="<%=data.waybillSequence || ''%>\<%=data.totalPackagesCount || ''%>" align="center" fontSize="30"/>
|
|
<text height="32" left="100" width="100" top="130" align="left" fontSize="30" value="子单号"/>
|
|
<text name="YunDanText" left="200" height="32" top="130" value="<%=data.waybillCode || ''%>" align="left" fontSize="30"/>
|
|
<text height="32" left="100" width="100" top="160" align="left" fontSize="30" value="母单号"/>
|
|
<text name="YunDanText" height="32" left="200" top="160" value="<%=data.parentWaybillCode || ''%>" align="left" fontSize="30"/>
|
|
<% }else if(data.waybillSequence ==1 && data.totalPackagesCount >1){ %>
|
|
<text height="40" top="130" width="100" value="<%=data.waybillSequence || ''%>\<%=data.totalPackagesCount || ''%>" align="center" fontSize="30"/>
|
|
<text height="32" left="100" width="100" top="130" align="left" fontSize="30" value="母单号"/>
|
|
<text name="YunDanText" left="200" height="32" top="130" value="<%=_YunDanBarCode %>" align="left" fontSize="30"/>
|
|
|
|
<% }else { %>
|
|
|
|
<text height="40" top="130" width="100" value="1\1" align="center" fontSize="30"/>
|
|
<text height="32" left="100" width="100" top="130" align="left" fontSize="30" value="运单号"/>
|
|
<text name="YunDanText" left="200" height="46" top="130" value="<%=_YunDanBarCode %>" align="left" fontSize="30"/>
|
|
<% } %>
|
|
</layout>
|
|
|
|
<!-- 固定区域 -->
|
|
<layout height="456" orientation="horizontal">
|
|
<%var _waybillCode = data.waybillCode || '' %>
|
|
<%var _waybillFontSize = _waybillCode.length > 12 ? (200/_waybillCode.length):22 %>
|
|
<!-- 左侧运单号 -->
|
|
<layout width="26" orientation="vertical" padding="0,50,0,50" >
|
|
|
|
<text name="YunDanText" value="<%=_waybillCode %>" width="26" height="200" align="center" valign="center" direction="left" orientation="vertical" fontSize="<%=_waybillFontSize %>"/>
|
|
|
|
<text name="YunDanText" value="<%=_waybillCode %>" width="26" height="200" align="center" valign="center" direction="left" orientation="vertical" fontSize="<%=_waybillFontSize %>"/>
|
|
|
|
</layout>
|
|
|
|
<!-- 运单内容 -->
|
|
<layout width="556" orientation="vertical" >
|
|
|
|
|
|
<layout height="80" bordersize="0,2,0,2">
|
|
<%var _fontSize = (608*2)/(_threeSegmentCode.length+1) %>
|
|
|
|
<% if(_fontSize <15){ %>
|
|
<% _fontSize = 15; %>
|
|
<% }else if(_fontSize >80){ %>
|
|
<% _fontSize = 70; %>
|
|
<%} %>
|
|
|
|
|
|
<text name="Bigpen" top="8" value="<%= _threeSegmentCode %>" fontWeight="bold" align="center" fontSize="<%= _fontSize %>"/>
|
|
</layout>
|
|
<layout height="40" orientation="horizontal" bordersize="0,0,0,2">
|
|
|
|
<% if(recipient_virtualNumber.length) {%>
|
|
<text value="隐私号码" width="140" height="40" align="center" valign="center" bkcolor="ff000000" textcolor="ffffffff" fontSize="30"/>
|
|
<text value="<%=recipient_virtualNumber%>转<%=recipient_identifyNumber%>" padding="10,5,0,0" width="300" height="40" align="left" valign="top" fontSize="30"/>
|
|
<% } %>
|
|
|
|
</layout>
|
|
<layout height="208" orientation="horizontal" bordersize="0,0,0,2">
|
|
|
|
<layout width="348" >
|
|
<image name="收" height="63" width="56" top="25" left="8"/>
|
|
<text name="ReceiverInfo" value="<%=recipient_name%>" fontSize="28" left="70" height="40" width="282" top="6" fontWeight="bold" align="left" valign="top"/>
|
|
<text name="ReceiverInfo" value="<%=recipient_telephone_number%>" fontSize="28" left="70" height="40" width="282" top="50" fontWeight="bold" align="left" valign="top"/>
|
|
|
|
|
|
<text name="ReceiverInfo" top="90" value="<%=recipient_address%>" fontSize="28" fontWeight="bold" align="left" valign="top"/>
|
|
|
|
</layout>
|
|
<layout height="208" width="208" bordersize="2,0,0,0">
|
|
<qrcode name="twoDimensionCode" type="code128b" value="<%=data.commonPrintDto ? (data.commonPrintDto.twoDimensionCode || '') : ''%>" padding="10,10,10,10"/>
|
|
</layout>
|
|
</layout>
|
|
<layout height="64" >
|
|
<layout width="80" left="0">
|
|
<text value="寄" left="8" fontSize="55" align="center" top="8"/>
|
|
</layout>
|
|
<layout width="430" left="80">
|
|
<text name="SenderInfo" value="<%=sender_name%> <%=sender_telephone_number%>
<%=sender_address%>" top="16" fontSize="24" align="left" valign="top"/>
|
|
</layout>
|
|
</layout>
|
|
<layout height="64" orientation="horizontal" bordersize="0,0,0,2">
|
|
|
|
<text name="codingMapping" value="<%=data.commonPrintDto ? (data.commonPrintDto.codingMapping || '') : ''%>" height="88" width="200" top="5" fontSize="60" align="center" valign="top"/>
|
|
<%var _IN41 = (data.logisticsServices && data.logisticsServices.IN41 ) ? "先" : '' %>
|
|
<% if(_IN41.length != 0) {%>
|
|
<text name="INSURE" value="<%=_IN41 %>" width="100" top="5" fontSize="60" align="center" valign="top"/>
|
|
<% } %>
|
|
|
|
<%var _INSURE = (data.logisticsServices && data.logisticsServices.INSURE && data.logisticsServices.INSURE.desc) ? "保价 " : '' %>
|
|
<%var _IN144 = (data.logisticsServices && data.logisticsServices.IN144 ) ? "到齐派 " : ' ' %>
|
|
<%var _abFlag = data.commonPrintDto ? (data.commonPrintDto.abFlag || '') : '' %>
|
|
|
|
<text name="INSURE" value="<%=_IN144 + _INSURE + _abFlag %>" width="200" top="20" fontSize="30" align="left" valign="top"/>
|
|
|
|
</layout>
|
|
|
|
|
|
</layout>
|
|
|
|
<!-- 右侧运单号 -->
|
|
<layout width="26" orientation="vertical" padding="0,50,0,50" >
|
|
|
|
<text name="YunDanText" value="<%=_waybillCode %>" width="26" height="200" align="center" valign="center" direction="left" orientation="vertical" fontSize="<%=_waybillFontSize %>"/>
|
|
|
|
<text name="YunDanText" value="<%=_waybillCode %>" width="26" height="200" align="center" valign="center" direction="left" orientation="vertical" fontSize="<%=_waybillFontSize %>"/>
|
|
|
|
</layout>
|
|
|
|
</layout>
|
|
|
|
|
|
<!-- 自定义 -->
|
|
<layout name="user" height="160" left="16" width="576" >
|
|
|
|
</layout>
|
|
|
|
<!-- 广告区 -->
|
|
<layout height="120" orientation="horizontal" >
|
|
<%if (context.adControl && data.ad) {%>
|
|
|
|
<%if (data.ad.type == 2) {%>
|
|
|
|
<%if( data.ad.image && data.ad.image != ''){%>
|
|
<layout width="224" margin="0,8,0,0" >
|
|
<image name="AdArea" value="<%=data.ad.image%>" width="220" height="100" />
|
|
</layout>
|
|
<%}%>
|
|
<layout width="336" margin="8,8,8,0" >
|
|
<text value="<%=data.ad.text ? data.ad.text : ''%>" fontSize="30" top="20" align="left" wrap="true" valign="top" />
|
|
</layout>
|
|
|
|
<%} else {%>
|
|
|
|
<%if( data.ad.pic && data.ad.pic != ''){%>
|
|
<layout width="472" height="120" >
|
|
<!-- 462*104 -->
|
|
<image name="AdArea" value="<%=data.ad.pic%>" width="472" height="120" padding="10,8,0,8" />
|
|
</layout>
|
|
<%}%>
|
|
<layout width="120" height="120" >
|
|
<qrcode padding="8,8,8,8" name="AdArea" value="<%=data.ad.qrCode ? data.ad.qrCode : ''%>" />
|
|
</layout>
|
|
|
|
<%}%>
|
|
|
|
<%}%>
|
|
</layout>
|
|
</layout>
|
|
</page> |