@model IQueryable<Com._9pm2.ClientWeb.Database.Technic>
@{
    ViewBag.Title = "材料工艺";
}
<script src="../../Scripts/technic.js?vn=20180813"></script>

<div class="callout callout-success lead ">提示：添加工艺以后，需要在 [材料管理] 页面为材料设置可选的工艺以及工艺的销售价格和外协价格。</div>

<div class="list">
    <div>
        <button type="button" class="btn btn-default" id="btnNew">新增</button>
    </div>
    <table id="tTechnic" style="max-width:600px">
        <thead>
            <tr>
                <th style="width:160px">工艺名称</th>
                <th>备注</th>
                <th style="width:120px"></th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr id="@item.Id">

                    <td>@item.Name</td>
                    <td>@item.Memo</td>
                    <td>
                        <div class="operation-btns">
                            <div>
                                <button id="select">&nbsp;</button>
                            </div>
                            <ul>
                                <li><a href="javascript:void(0);" onclick="EditTechnic('@item.Id','@item.Name','@item.Memo');">编辑 </a></li>
                                <li><a href="javascript:void(0);" onclick="DeleteTechnic('@item.Id');">删除</a></li>
                            </ul>
                        </div>

                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>

<div id="divTechnic" title="工艺信息" style="display:none">
    <div id="divTechnicContent" style="overflow-y: auto; ">

        <table id="tableEdit" class="font85 tableEdit">
            <tr>
                <td class="label">工艺名称</td>
                <td>
                    @Html.TextBox("Name", null, new { maxlength = "50" })&nbsp;<span class="redStar">*</span>
                    @Html.Hidden("Id")
                </td>
            </tr>
            <tr>
                <td class="label">工艺备注</td>
                <td>
                    @Html.TextArea("Memo", null, new { maxlength = "250", @style = "height:100px;width:90%" })
                </td>

            </tr>

        </table>
        <br />

    </div>
    <div style="text-align:right;">
        <div class="error-msg"></div>
        <input type="button" class="btn btn-primary" id="btnSave" value="保存" />
        <input type="button" id="btnCancel" class="btn btn-default" onclick="$('#divTechnic').dialog('close');" value="取消" />
    </div>
</div>
