<!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="${amsInventoryTask}">
            <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="*{taskNo}"></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="*{@dict.getLabel('ams_inventory_task_status', taskStatus)}"></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_inventory_scope_type', scopeType)}"></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="*{ownerUserName}"></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="*{warehouseName}"></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="*{locationName}"></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="*{categoryName}"></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="*{#dates.format(issueTime, 'yyyy-MM-dd HH:mm:ss')}"></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="*{#dates.format(finishTime, '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>
        </form>

        <h4 class="form-header h4">应盘明细</h4>
        <div class="col-sm-12 select-table table-striped">
            <table class="table table-bordered table-hover">
                <thead>
                    <tr>
                        <th>资产编码</th>
                        <th>资产名称</th>
                        <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 : ${amsInventoryTask.amsInventoryTaskItemList}">
                        <td th:text="${item.assetCode}"></td>
                        <td th:text="${item.assetName}"></td>
                        <td th:text="${item.categoryName}"></td>
                        <td th:text="${item.bookWarehouseName}"></td>
                        <td th:text="${item.bookLocationName}"></td>
                        <td th:text="${@dict.getLabel('ams_inventory_result', item.inventoryResult)}"></td>
                        <td th:text="${item.inventoryWarehouseName}"></td>
                        <td th:text="${item.inventoryLocationName}"></td>
                        <td th:text="${item.inventoryUserName}"></td>
                        <td th:text="${#dates.format(item.inventoryTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
                        <td th:text="${item.remark}"></td>
                    </tr>
                </tbody>
            </table>
        </div>

        <h4 class="form-header h4">盘盈明细</h4>
        <div class="col-sm-12 select-table table-striped">
            <table class="table table-bordered table-hover">
                <thead>
                    <tr>
                        <th>类型</th>
                        <th>识别方式</th>
                        <th>资产编码</th>
                        <th>资产名称</th>
                        <th>EPC</th>
                        <th>账面仓库</th>
                        <th>账面位置</th>
                        <th>盘点仓库</th>
                        <th>盘点位置</th>
                        <th>状态</th>
                        <th>盘点人</th>
                        <th>盘点时间</th>
                        <th>备注</th>
                    </tr>
                </thead>
                <tbody>
                    <tr th:each="surplus : ${amsInventoryTask.amsInventoryTaskSurplusList}">
                        <td th:text="${@dict.getLabel('ams_inventory_surplus_type', surplus.surplusType)}"></td>
                        <td th:text="${@dict.getLabel('ams_inventory_identify_method', surplus.identifyMethod)}"></td>
                        <td th:text="${surplus.assetCode}"></td>
                        <td th:text="${surplus.assetName}"></td>
                        <td th:text="${surplus.epcCode}"></td>
                        <td th:text="${surplus.bookWarehouseName}"></td>
                        <td th:text="${surplus.bookLocationName}"></td>
                        <td th:text="${surplus.inventoryWarehouseName}"></td>
                        <td th:text="${surplus.inventoryLocationName}"></td>
                        <td th:text="${@dict.getLabel('ams_inventory_surplus_status', surplus.confirmStatus)}"></td>
                        <td th:text="${surplus.inventoryUserName}"></td>
                        <td th:text="${#dates.format(surplus.inventoryTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
                        <td th:text="${surplus.remark}"></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <th:block th:include="include :: footer" />
</body>
</html>
