@model Com._9pm2.ClientWeb.Models.StockOutModel
@{ ViewBag.Title = Model.Id == 0 ? "开出库单" : "修改出库单";}

<script src="../../Scripts/stockcommon.js?vn=20180813"></script>
<script src="../../Scripts/stockoutedit.js?vn=20180813"></script>
<script src="~/Content/resizecolumn/jquery.resizableColumns.js"></script>
<link rel="stylesheet" href="~/Content/resizecolumn/jquery.resizableColumns.css" />

<div id="divStockOut">
    <div class="error-msg"></div>
    <div id="divStockOutContent" style="min-height:240px">

        <table id="tableEdit" class="font85 tableEdit" style="width:100%">

            <tr>
                <td class="label">出库类型</td>
                <td colspan="3">
                    @Html.DropDownList("Type", new SelectList(Model.DdlType, "ItemValue", "ItemText"), new { @class = "form-control max-width-180" })
                    <span class="redStar">*</span>
                </td>
            </tr>
            <tr>
                <td class="label">出库日期</td>
                <td style="width:240px">
                    @Html.TextBox("StockOutTime", Model.StockOutTime.ToString("yyyy-MM-dd"), new { maxlength = "10", @class = "text-date" }) <span class="redStar">*</span>
                </td>
                <td class="label">经办人</td>
                <td colspan="3">
                    @Html.TextBox("Operator", null, new { maxlength = "100", @class = "form-control" }) <span class="redStar">*</span>
                </td>
            </tr>

            <tr>
                <td class="label">明细</td>
                <td colspan="5">
                    <div>
                        <div>
                            <div class="btn-group">
                                <button type="button" class="btn btn-default btn-sm" id="btnNewDetail">新增明细</button>
                                <button type="button" class="btn btn-default btn-sm" id="btnCopyDetail">复制明细</button>
                                <button type="button" class="btn btn-default btn-sm" id="btnDeleteDetail">删除明细</button>
                            </div>
                            <button id="btnNewMaterial" type="button" class="btn btn-default btn-sm">快速创建材料</button>
                        </div>
                        <div>
                            <table class="excel-table" id="simpleStockOutDetail">
                                <thead>
                                    <tr>
                                        <th></th>
                                        <th style="width:280px">材料</th>
                                        <th style="width:60px">单位</th>
                                        <th style="width:60px">数量</th>
                                        <th>备注</th>
                                    </tr>
                                </thead>
                                <tbody id="simpleStockOutTr"></tbody>
                            </table>
                        </div>
                    </div>

                </td>
            </tr>
            <tr>
                <td class="label">备注</td>
                <td colspan="5">
                    @Html.TextArea("Memo", null, new { maxlength = "1000", style = "width:98%;height:80px;", @class = "form-control" })
                </td>
            </tr>
        </table>

    </div>
    <div style="text-align:right;margin:10px 0">
        <span id="errorMessage" class="error-msg"></span>
        <button type="button" class="btn btn-default" id="btnCancel">取消</button>
        <button type="button" class="btn btn-primary" id="btnSave">保存</button>
    </div>
</div>
<div id="stock" class="hidden" style="display:none">
    <select id="Material"></select>
    @Html.Hidden("Id")
</div>

@Html.Partial("MaterialEdit")
@Html.Hidden("StockOutDetails", Model.StockOutDetailString)
@Html.Hidden("Detail")
@Html.Hidden("BackURL")



