@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
     layui.use(['jquery', 'form', 'laydate', 'common'], function () {
         var form = layui.form,
             $ = layui.$,
             common = layui.common,
             laydate = layui.laydate;
         var keyValue = $.request("keyValue");
         //权限字段
         common.authorizeFields('adminform');
         //此处需修改
         //类型为时间时
         //laydate.render({
             //elem: '#F_Birthday'
             //, btns: ['clear', 'now']
             //, trigger: 'click',
             //format: 'yyyy-MM-dd',
         //});

         $(function () {
             common.ajax({
                 url: '/OrderManagement/OrderCustomer/GetFormJson',
                 dataType: 'json',
                 data: { keyValue: keyValue },
                 async: false,
                 success: function (data) {
                     common.val('adminform', data);
                     common.setReadOnly('adminform');
                     form.render();
                  }
             });

                         var _fileVal = $('#F_Attachment').val();
              if(_fileVal.length<5){
                  //没有上传文件
                  $('.myDownloader').hide();
              }else{
                  $('.myDownloader').show();
                  $('#downloader').attr('href',_fileVal);
              }


        });
        wcLoading.close();

    });
</script>

<body>
    <style>
        #downloader {
            color: dodgerblue;
            cursor: pointer;
        }
    </style>


    <div class="layuimini-container">
        <div class="layuimini-main">
            <div class="layui-form layuimini-form" lay-filter="adminform">
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">客户名称</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_Name" name="F_Name" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">开始合作时间</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_CooperationTime" name="F_CooperationTime" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">发帖时间</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_PostTime" name="F_PostTime" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">合作进展</label>
                    <div class="layui-input-block">
                        @* <input type="text" id="F_OrderState" name="F_OrderState" lay-verify="required" class="layui-input"> *@
                        <select id="F_OrderState" name="F_OrderState" lay-verify="required">
                            <option value="">===请选择===</option>
                            <option value="1">持续合作</option>
                            <option value="0">断续</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">联系方式</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_Contact" name="F_Contact" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">对接人</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_ContactPerson" name="F_ContactPerson" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">对接情况</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_Docking" name="F_Docking" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">附件</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_Attachment" name="F_Attachment" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item myDownloader" style="display:none">
                    <label class="layui-form-label"></label>
                    <a target="_blank" id="downloader">下载附件</a>
                </div>

                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label required">备注</label>
                    <div class="layui-input-block">
                        @* <input type="text" id="F_Remark" name="F_Remark" lay-verify="required" class="layui-input"> *@
                        <textarea id="F_Remark" name="F_Remark" value="" autocomplete="off" class="layui-textarea"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

