一張普通的收據(jù)代表著一個機構的形象,在培訓機構激烈競爭的今天,我們怎樣去處理這類看似微不足道,而又并不平凡的管理細節(jié)?
麥田培訓學校管理軟件,默認收據(jù)采用噴墨打印機模板,這種方式可以就地取材,在不專業(yè)極端情況下也能完成收據(jù)的打印。然而,我們很多培訓機構需要有很高的要求。即:打印真正專業(yè)的、高標準收據(jù),來提高學校形象。
下面筆者就帶大家體驗一下,在麥田平臺上DIY專業(yè)收據(jù)。首先我們需要印刷一些收據(jù)做背景,以下圖麥田公司的收據(jù)為例:

這張收據(jù)的尺寸為19CM X 10CM,與移動話費收據(jù)差不多大。
然后我們登錄麥田軟件后臺,在[分析]--[報表管理]這里增加一張新的報表,名稱為“套打消費單(針式)”,
如圖:

增加后,我們再編輯這張報表,進入代碼設計。

套打的代碼設計,相對要簡單的多,因為不需要考慮表格等樣式,只要把內(nèi)容編排好,保持能夠打印在背景的規(guī)定區(qū)域內(nèi)即可。設計這樣的報表有一些技巧,比如先插入一張背景圖片,在圖片上面畫內(nèi)容,等內(nèi)容完成后,再把背景圖去掉,然后實際打印一下,調(diào)整一下X,Y坐標即可。完整的代碼見如下:
<?xml version="1.0" encoding="utf-8"?><xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:String="urn:SWString"> <xsl:param name="SystemName"/> <xsl:param name="SchoolName"/> <xsl:param name="SiteUrl"/> <xsl:param name="Email"/> <xsl:param name="Tel"/> <xsl:param name="Fax"/> <xsl:param name="Address"/> <xsl:param name="PostCode"/> <xsl:param name="CurrencySymbol"/> <xsl:param name="PrintTrueName"/> <xsl:param name="PrintUserID"/> <xsl:param name="PrintSchoolName"/> <xsl:param name="PrintSchoolID"/> <xsl:param name="PrintDateTime"/> <xsl:template match="/"> <html> <head> <pagesetting> <landscape>false
</landscape> <paperkind>Custom
</paperkind> <papername>收據(jù)
</papername> <resolutionkind>2
</resolutionkind> <paperwidth>19cm
</paperwidth> <paperheight>10cm
</paperheight> <pageleft>0
</pageleft> <pageright>0
</pageright> <pagetop>0cm
</pagetop> <pagebottom>0
</pagebottom> <fontsize>8
</fontsize> <pageno></pageno> <doctype>1
</doctype> </pagesetting> <style> .thead{
border-top-width:0.5mm;
border-left-width:0.5mm;
border-bottom-width:0.5mm;
border-right-width:0.5mm;
text-align:center;
font-style:bold
}
.bottom{
border-left-width:0.5mm;
border-bottom-width:0.5mm;
border-right-width:0.5mm;
font-style:bold
}
.left{
border-left-width:0.5mm;
font-style:bold
}
.right{
border-right-width:0.5mm;
font-style:bold
}
.leftright{
border-left-width:0.5mm;
border-right-width:0.5mm;
font-style:bold
}
</style> </head> <body> <img x="0" y="0cm" style="width:19cm;height:10cm" src="images/bg1.jpg"></img> <div x="1.2cm" y="-0.4cm" style="padding:0"> <span x="1.6cm" y="2.65cm" align="left" width="18cm" height="1.27cm"> <xsl:value-of select="String:Replace(String:FormatDate('{0:yyyy-MM-dd}',ds/Bill/DateAndTime),' ','$nbsp;')" /> </span> <span x="0cm" y="3.2cm" align="left" width="18cm" height="1.27cm"> 付款方名稱:
<xsl:value-of select="ds/Student/StudentName" />$nbsp;$nbsp;$nbsp;$nbsp;$nbsp;$nbsp;$nbsp;$nbsp;$nbsp;流水號:
<xsl:value-of select="ds/Bill/BillID" /> </span> <table x="0" y="3.8cm" maxlines="7" style="border:0mm;border-color:red"> <thead> <tr height="0.5cm"> <td width="7cm">項目
</td> <td width="1.2cm">單位
</td> <td width="1.2cm">數(shù)量
</td> <td width="2cm">單價
</td> <td width="3cm">小計
</td> </tr> </thead> <tbody> <xsl:for-each select="ds/BillItem"> <tr height="0.45cm" style="border-top-width:0mm;border-bottom-width:0mm;text-valign:top"> <td width="7cm" style="text-align:left;text-valign:top"> <xsl:value-of select="ProductName" /> </td> <td width="1.2cm" style="text-valign:top"> <xsl:value-of select="UnitName" /> </td> <td width="1.2cm" style="text-valign:top"> <xsl:value-of select="Amount" /> </td> <td width="2cm"> <xsl:value-of select="String:FormatNumber('{0:c2}',UnitPrice)" /> </td> <td width="3cm"> <xsl:value-of select="String:FormatNumber('{0:c2}',Amount * UnitPrice)" /> </td> </tr> </xsl:for-each> <filltr height="0.45cm" style="border-top-width:0mm;border-bottom-width:0mm;"> <td width="7cm"> </td> <td width="1.2cm"> </td> <td width="1.2cm"> </td> <td width="2cm"> </td> <td width="3cm"> </td> </filltr> </tbody> <tfoot> <tr height="0.8cm"> <td width="14.4cm" format="p"> 金額合計(大寫):人民幣$nbsp;$nbsp;
<xsl:value-of select="String:CHSMoney(ds/Bill/Payed)"/> $nbsp;$nbsp;$nbsp;$nbsp;$nbsp;$nbsp;(小寫)
<xsl:value-of select="String:FormatNumber('{0:c2}',ds/Bill/Payed)"/><br /> 備注:
<xsl:value-of select="ds/Bill/Remark" /> </td> </tr> <tr height="0.5cm"> <td width="14.4cm" style="text-align:left"> 開票人:
<xsl:value-of select="$PrintTrueName" /> $nbsp;$nbsp; $nbsp;$nbsp;收款方名稱:
<xsl:value-of select="$SchoolName" /> </td> </tr> </tfoot> </table> </div> </body> </html> </xsl:template></xsl:stylesheet>設計好報表之后,我們將它設置為默認消費單報表。
[分析]--[默認報表]--消費單默認報表:

預覽效果:

打印效果: