工作记录(7)

<div class="page" style="width:110mm;padding:0;margin:0;">
    <ul style="text-indent:0">
        <t t-foreach="docs" t-as="o">
            <li style="float:left;width:55mm;height:11mm; text-align:center;">
                <span>&#160;</span>
                <img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', o.name, 2000, 200)" style="width:45mm;margin-left:-7mm;text-align:center;height:5mm;"/>
                <span style="white-space:nowrap;height:7mm;text-align:center;font: bold 13pt SimHei;" t-field="o.name"/>
            </li>
        </t>
        <t t-if="len(docs)==1">
            <li style="float:left;width:55mm;height:11mm; text-align:center;">
            </li>
        </t>
    </ul>
<!--<div class="page" style="width:110mm;padding:0;margin:0;">-->
    <!--<ul style="text-indent:0">-->
        <!--<t t-foreach="docs" t-as="o">-->
            <!--<t t-if="len(o.mac_ids)&gt;0">-->
                <!--<li style="float:left;width:55mm;height:10mm; text-align:center;">-->
                    <!--<span>&#160;</span>-->
                    <!--<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', o.mac_ids[0].name.replace('-',''), 2000, 200)" style="width:45mm;margin-left:-7mm;text-align:center;height:4mm;"/>-->
                    <!--<span style="white-space:nowrap;height:7mm;text-align:center;font: bold 11pt SimHei;" t-field="o.mac_ids[0].name"/>-->
                <!--</li>-->
                <!--<t t-if="len(o.mac_ids)&gt;1">-->
                    <!--<li style="float:left;width:55mm;height:10mm; text-align:center;">-->
                        <!--<span>&#160;</span>-->
                        <!--<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', o.mac_ids[1].name.replace('-',''), 2000, 200)" style="width:45mm;margin-left:-7mm;text-align:center;height:4mm;"/>-->
                        <!--<span style="white-space:nowrap;height:7mm;text-align:center;font: bold 11pt SimHei;" t-field="o.mac_ids[1].name"/>-->
                    <!--</li>-->
                <!--</t>-->
            <!--</t>-->
        <!--</t>-->
    <!--</ul>-->
<!--</div>-->
<div class="page" style="width:110mm;padding:0;margin:0;">
    <ul style="text-indent:0">
        <t t-foreach="docs" t-as="o">
            <li style="float:left;width:55mm;height:10mm; text-align:center;">
                <span>&#160;</span>
                <img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', o.name, 1200, 200)" style="width:45mm;margin-left:-5mm;text-align:center;height:4mm;"/>
                <span style="white-space:nowrap;height:7mm;text-align:center;font: bold 13pt SimHei;" t-field="o.name"/>
            </li>
            <t t-if="len(o.mac_ids)&gt;0">
                <li style="float:left;width:55mm;height:10mm; text-align:center;">
                    <span>&#160;</span>
                    <img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', o.mac_ids[0].name.replace('-',''), 2000, 200)" style="width:45mm;margin-left:-7mm;text-align:center;height:4mm;"/>
                    <span style="white-space:nowrap;height:7mm;text-align:center;font: bold 11pt SimHei;" t-field="o.mac_ids[0].name"/>
                </li>
                <t t-if="len(o.mac_ids)&gt;1">
                    <li style="float:left;width:55mm;height:10mm; text-align:center;">
                        <span>&#160;</span>
                        <img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', o.mac_ids[1].name.replace('-',''), 2000, 200)" style="width:45mm;margin-left:-7mm;text-align:center;height:4mm;"/>
                        <span style="white-space:nowrap;height:7mm;text-align:center;font: bold 11pt SimHei;" t-field="o.mac_ids[1].name"/>
                    </li>
                    <li style="float:left;width:55mm;height:10mm; text-align:center;" />
                </t>
          </t>
        </t>
    </ul>
</div>

猜你喜欢

转载自blog.csdn.net/weixin_41893060/article/details/82660328