@model Com._9pm2.ClientWeb.Models.OrderList
@{
    ViewBag.Title = "待确认订单";
}
<script src="../../Scripts/unapprovedorder.js?vn=20180813"></script>

<div class="callout callout-info lead">提示：以下订单由客户通过自助服务平台创建</div>
<div class="list">
<table id="tOrder">
<thead>
<tr>
<th style="width:135px">订单编号</th>
<th style="width:120px">创建日期</th>
<th style="width:180px">客户</th>
<th>订单名称</th>
<th style="width:80px">订单金额</th>
<th style="width:140px">操作</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.Orders)
        {
            <tr id="@item.OrderNo">
                <td>@Html.DisplayFor(modelItem => item.OrderNo)</td>
                <td>@item.CreatedTime.ToString("yyyy-MM-dd")</td>
                <td>@Html.DisplayFor(modelItem => item.CustomerShortName)</td>
                <td>@Html.DisplayFor(modelItem => item.OrderName)</td>               
                <td>@Html.DisplayFor(modelItem => item.Amount)</td>                                       
                <td>
                    <a title="编辑" onclick="EditOrder('@item.OrderNo')" >编辑</a>  
                    <a title="删除" onclick="DeleteOrder('@item.OrderNo')" >删除</a>   
                    <a title="详细" onclick="ShowDetail('@item.OrderNo')" >详细</a>   
                    <a title="通过审核" onclick="Approve('@item.OrderNo')" >审核</a>                    
                </td>
            </tr>
        }   
</tbody>
</table>
</div>

<div id="divDetail" title="订单详细信息" style="display:none">
    <div id="divDetailContent" class="list">    
        <table class="tableDetail">
            <tr>
                <td class="label">订单编号</td>
                <td id="dOrderNo"></td>
                <td class="label">订单名称</td>                
                <td id="dOrderName"></td>
            </tr>
            <tr>
                <td class="label">客户</td>
                <td id="dCustomer"></td>
                <td class="label">联系人</td>                
                <td id="dContact"></td>
            </tr>
            <tr>
                <td class="label">数量</td>
                <td id="dNumber"></td>
                <td class="label">预计完工</td>
                <td id="dExpectDeliveryDate"></td>                
            </tr>
            <tr>
                <td class="label">订单金额</td>
                <td id="dAmount"></td>
                <td class="label">已支付金额：</td>
                <td id="dPaid"></td>
            </tr>
            <tr>
                <td class="label">外协费用</td>
                <td id="dFactoryAmount"></td>
                <td class="label">交易日期</td>
                <td id="dTransactionDate"></td>                
            </tr>
            <tr>
                <td class="label">开单人</td>
                <td id="dCreator"></td>
                <td class="label">开单时间</td>
                <td id="dCreatedTime"></td>
            </tr>
            <tr>
                <td class="label">备注</td>
                <td colspan="3" id="dMemo"></td>                
            </tr>
            <tr>
                <td class="label">自助查询URL</td>
                <td colspan="3" id="dQueryURL"></td>                
            </tr>
            <tr >
                <td class="label">明细</td>
                <td colspan="3">
                     <table id="tableDetail" style="width: 100%;">
                    </table>
                </td>                
            </tr>
           
            <tr>
                <td class="label">附件</td>
                <td colspan="3" id='tdAttachment'>
                </td>
            </tr>
                 
        </table>

    </div>
    <div style="text-align:right;">      
       
        <button type="button" class="btn btn-default"  onclick="$('#divDetail').dialog('close');">关闭</button>     
         
    </div>  
</div>
