<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('入库单详情')" />
</head>
<body>
    <div class="main-content">
        <form class="form-horizontal" th:object="${amsInboundOrder}">
            <h4 class="form-header h4">基本信息</h4>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">入库单号：</label>
                        <div class="col-sm-8">
                            <p class="form-control-plaintext" th:text="*{inboundNo}"></p>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">入库仓库：</label>
                        <div class="col-sm-8">
                            <p class="form-control-plaintext" th:text="*{warehouseCode + ' - ' + warehouseName}"></p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">单据状态：</label>
                        <div class="col-sm-8">
                            <p class="form-control-plaintext" th:text="*{@dict.getLabel('ams_inbound_status', orderStatus)}"></p>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">入库人：</label>
                        <div class="col-sm-8">
                            <p class="form-control-plaintext" th:text="*{inboundUserName}"></p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">入库时间：</label>
                        <div class="col-sm-8">
                            <p class="form-control-plaintext"
                               th:text="*{inboundTime == null ? '' : #dates.format(inboundTime, 'yyyy-MM-dd HH:mm:ss')}"></p>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">备注：</label>
                        <div class="col-sm-8">
                            <p class="form-control-plaintext" th:text="*{remark}"></p>
                        </div>
                    </div>
                </div>
            </div>

            <h4 class="form-header h4">入库明细</h4>
            <div class="row">
                <div class="col-sm-12 select-table table-striped">
                    <table class="table table-bordered">
                        <thead>
                            <tr>
                                <th>序号</th>
                                <th>资产编码</th>
                                <th>资产名称</th>
                                <th>资产类别</th>
                                <th>规格型号</th>
                                <th>品牌</th>
                                <th>入库位置</th>
                                <th>数量</th>
                                <th>备注</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr th:each="item, stat : *{amsInboundOrderItemList}">
                                <td th:text="${stat.count}"></td>
                                <td th:text="${item.assetCode}"></td>
                                <td th:text="${item.assetName}"></td>
                                <td th:text="${item.categoryName}"></td>
                                <td th:text="${item.specModel}"></td>
                                <td th:text="${item.brand}"></td>
                                <td th:text="${item.locationCode + ' - ' + item.locationName}"></td>
                                <td th:text="${item.inboundQuantity}"></td>
                                <td th:text="${item.remark}"></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
</body>
</html>
