<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        @page {
            margin: 30px 20px 20px 10px;
            size: 210mm 93mm;
        }

        body {
            font-family: Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Arial,sans-serif;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            color-adjust: exact;
            -webkit-print-color-adjust: exact;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 10px;
            table-layout:fixed;
        }

        th, td {
            text-align: center;
            padding: 2px;
            border: 1px solid #000;
        }

        .total-row {
            font-weight: bold;
            /*background-color: lightgray;*/
            text-align: center;
        }

        .right-align { text-align: right; }
        .center-align { text-align: center; }
        .left-align { text-align: left; }

        .right-align1 {
            font-size: 12px;
            margin-left: auto;
            padding-right: 110px;
        }
        .center-align1 {
            font-size: 13px;
            padding-right: 90px;
        }
        .left-align1 {
            font-size: 14px;
            margin-right: 5px;
        }
        .title-row {
            font-size: 13px ;
            display: flex;
            justify-content: space-between; /* 元素之间的间距均匀分布 */
            align-items: center; /* 垂直居中对齐 */
            width: 100%; /* 确保标题行占满整个容器宽度 */
            /*margin-bottom: 10px; !* 根据需要调整间距 *!*/
        }

        .title-row div {
            /* 移除默认的外边距 */
            margin: 0 ;
        }

    </style>
</head>
<#list inboundOrder.detailLists as detail>
<body>

<!-- 标题行 -->
<div class="title-row">
    <div class="right-align1" style=" font-size: 14px ; margin-left: 5px;padding-right: 30px ">
        厂别： <#if inboundOrder.tenantName??>${inboundOrder.tenantName} </#if>
    </div>
    <div class="right-align1" style=" font-size: 14px ; margin-left: 5px;padding-right: 45px;">包装形式： ${inboundOrder.packageType} </div>
    <div class="center-align1"  style="font-size: 16px ;padding-right: 70px; font-weight: 600;">大连德迈仕精密科技股份有限公司</div>
    <div class="left-align1"  style=" font-size: 14px ;font-weight: 600;">入库单号：${inboundOrder.inboundNumber}</div>
</div>
<!-- 标题行 -->
<div class="title-row" style="margin-top: 3px ; font-size: 14px ;">
    <div class="right-align" style="margin-left: 5px; padding-right:5px;" >部门：${inboundOrder.deptCode} ${inboundOrder.deptName}</div>
    <div class="right-align" style="margin-left 5px; padding-right: 80px;">转运托盘码： ${inboundOrder.transferCode}</div>
    <div class="center-align" style="font-size: 15px ; padding-right: 205px; font-weight: 600;">产成品入库单</div>
    <div class="left-align" style="margin-right: 5px">第${detail_index+1}页 共 ${inboundOrder.detailLists?size}页</div>
</div>
<div class="title-row" style="margin-top: 3px ; font-size: 12px ;">
    <div class="right-align" style="margin-left: 5px;">客户: ${ inboundOrder.companyCode  } ${ inboundOrder.companyAlias} </div>
    <div class="left-align" style="margin-left: 258px;">单据日期: ${inboundOrder.inboundDateStr } </div>
    <div class="left-align" style="margin-left: 103px;">CDMS/JH-1-019</div>
</div>
<div class="title-row" style="margin-top: 3px ; font-size: 12px ;">
    <div class="right-align" style="margin-left: 5px;">图号: ${ inboundOrder.drawingNo }</div>
    <div class="center-align" style="margin-left: 150px;">规格: ${ inboundOrder.standard }</div>
    <div class="left-align" style="margin-left: 30px;">产品编码: ${ inboundOrder.productCode }</div>
    <div class="left-align" style="margin-left: 30px;">箱数: ${ inboundOrder.boxNumber }</div>
</div>
<table>
    <!-- 第三行 -->
    <tr>
        <td style="width: 12px;">序号</td>
        <td style="width: 60px;">批号</td>
        <td style="width: 20px;">数量（支）</td>
        <td style="width: 180px;">备注/客户批号/箱号等信息</td>
    </tr>

    <!-- 动态数据行 -->
    <#list detail as item>
    <tr>
        <td style="width: 14px;">${ item_index + 1 }</td>
        <td style="width: 60px;"  >
            <#if item.lotCode??>
                ${ item.lotCode }
            </#if>
        </td>
        <td style="width: 20px;text-align: right;" >
            <#if item.inboundNum??>
                ${ item.inboundNum }
        </#if>
        </td>
        <td style="width: 180px;" >
            <#if item.remark??>
                ${ item.remark }
            <#else>
        </#if>
        </td>

    </tr>
</#list>
<!--小计行-->
<tr class="total-row">
    <td></td>
    <td>总计</td>
    <td>${inboundOrder.inboundTotalNum}</td>
    <td>支</td>
</tr>
</table>
<div class="title-row"  style="margin-bottom: 5px;font-size: 12px ;">
    <!--    <div  style=" height: 25px"></div>-->
    <div class="center-align"  style="margin-left: 60px;padding-right: 48px">保管员：${inboundOrder.storageNickName}</div>
    <div class="center-align"  style="margin-left: 60px;padding-right: 78px">搬运员：</div>
    <div class="center-align" style="margin-left: 60px;padding-right: 78px">录入员：${inboundOrder.inputNickName}</div>
    <div class="left-align" style="margin-right: 15px">白-库房, 红-财务, 黄-存根</div>
</div>
</body>
</#list>
</html>