@using MySystem.Models;
@{
    Orders editData = ViewBag.data as Orders;
}
@{
    string RightInfo = ViewBag.RightInfo as string;
    string right = ViewBag.right as string;
    List<OrderProduct> products = ViewBag.products as List<OrderProduct>;
    string ProductId = ViewBag.productId as string;
}
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>发货</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
    <script src="/admin/js/jquery-1.10.1.min.js"></script>
    <script src="/admin/js/LAreaData2.js"></script>
</head>

<body>

    <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
        <input type="hidden" name="Id" value="@editData.Id" />

        <div class="layui-card">
            <div class="layui-card-body">
                <div class="layui-tab" lay-filter="mytabbar">
                    <div class="layui-tab-content mt20">
                        <div class="layui-tab-item layui-show">
                            <div class="layui-form-item">
                                <label class="layui-form-label">*创客编号</label>
                                <div class="layui-input-inline">
                                    <input class="layui-input" type="text" readonly id="MakerCode" name="MakerCode"
                                        value="@ViewBag.MakerCode">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">*创客名称</label>
                                <div class="layui-input-inline">
                                    <input class="layui-input" type="text" readonly id="RealName" name="RealName"
                                        value="@ViewBag.RealName">
                                </div>
                            </div>
                            <div class="layui-form-item" id="TakeName" style="display: none;">
                                <label class="layui-form-label">*收件人</label>
                                <div class="layui-input-inline">
                                    <input class="layui-input" type="text" readonly id="RealName" name="RealName"
                                        value="@editData.RealName">
                                </div>
                            </div>
                            <div class="layui-form-item" id="ErpForCode" style="display: none;">
                                <label class="layui-form-label">*快递单号</label>
                                <div class="layui-input-inline">
                                    <input class="layui-input" type="text" id="ErpCode" name="ErpCode" maxlength="30"
                                        autocomplete="off" placeholder="请输入快递单号(必填)">
                                </div>
                            </div>
                            <div class="layui-form-item" id="ErpForName" style="display: none;">
                                <label class="layui-form-label">*快递名称</label>
                                <div class="layui-input-inline">
                                    <input class="layui-input" type="text" id="ErpName" name="ErpName" maxlength="30"
                                        autocomplete="off" placeholder="请输入快递名称(必填)">
                                </div>
                            </div>
                            <div class="layui-form-item layui-form-text" id="BUSN" style="display: none;">
                                <label class="layui-form-label">补录备注</label>
                                <div class="layui-input-block">
                                    <textarea class="layui-textarea" id="SnNos" name="SnNosList"
                                        placeholder="请输入补录备注(可选填所补录的机具Sn)"></textarea>
                                </div>
                            </div>
                            @* @{Dictionary<string, string> StoreHouseDic = new
                                MySystem.DictionaryClass().getStoreHouseDic();} *@
                            @foreach (OrderProduct product in products)
                            {
                                <fieldset class="layui-elem-field layui-field-title"></fieldset>
                                <input type="hidden" name="IdList" value="@product.Id">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">*产品名称</label>
                                    <div class="layui-input-inline">
                                        <input class="layui-input" type="text" readonly id="ProductName"
                                        name="ProductNameList" value="@product.ProductName">
                                    </div>
                                </div>
                                @* <div class="layui-form-item">
                                    <label class="layui-form-label">发货仓库</label>
                                    <div class="layui-input-inline">
                                    <select id="StoreId" name="StoreIdList" lay-verify="required" lay-search="">
                                    <option value="">请选择</option>
                                    @foreach (string key in StoreHouseDic.Keys)
                                    {
                                    <option value="@key">@StoreHouseDic[key]</option>
                                    }
                                    </select>
                                    </div>
                                    </div>
                                    <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">*SN编号</label>
                                    <div class="layui-input-block">
                                    <textarea class="layui-textarea" id="SnNos" name="SnNosList"
                                    placeholder="请输入SN号,多个以逗号隔开"></textarea>
                                    </div>
                                    </div> *@
                            }
                        </div>

                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <input type="button" lay-submit lay-filter="LAY-list-front-submit" id="LAY-list-front-submit"
                        value="确认">
                </div>
            </div>
        </div>
    </div>

    <script src="/layuiadmin/layui/layui.js"></script>
    <script
        src="/other/oss/upload-min@(MySystem.OssHelper.Instance.OssStatus ? "-oss" : "").js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
    <script src="/other/mybjq/kindeditor-min.js"></script>
    <script src="/other/mybjq/lang/zh_CN.js"></script>
    <script>


        //编辑器
        KindEditor.ready(function (K) {

        });

        var ids = "";
        function getChildren(obj) {
            $.each(obj, function (index, value) {
                var id = obj[index].id;
                ids += id + ",";
                var children = obj[index].children;
                if (children) {
                    getChildren(children);
                }
            });
        }
        (function () {
            if (@ViewBag.productId == "16") {
                $('#TakeName').css('display', 'none');
                $('#ErpForCode').css('display', 'none');
                $('#ErpForName').css('display', 'none');
                $('#BUSN').css('display', 'block');
            } else {
                $('#TakeName').css('display', 'block');
                $('#ErpForCode').css('display', 'block');
                $('#ErpForName').css('display', 'block');
                $('#BUSN').css('display', 'none');
            }
        })();

        var tree;
        var element;
        var upload;
        layui.config({
            base: '/layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'], function () {
            var $ = layui.$
                , form = layui.form
                , layer = layui.layer
                , layedit = layui.layedit
                , laydate = layui.laydate
                , croppers = layui.croppers
                , transfer = layui.transfer
                , util = layui.util;
            tree = layui.tree;
            element = layui.element;
            upload = layui.upload;

            //Hash地址的定位
            var layid = location.hash.replace(/^#test=/, '');
            element.tabChange('test', layid);
            element.on('tab(test)', function (elem) {
                location.hash = 'test=' + $(this).attr('lay-id');
            });

            //日期


            //上传文件


            //穿梭框


            //TreeView，比如权限管理


            //省市区

        })

    </script>
</body>

</html>
