$(function () { var name = ""; $("#fileupload").click(function () { show.UploadDialog(function (urls) { if (urls.length != 0) { $("#fileupload").attr("data-id", urls[0]); $("#fileupload").text("上传(已上传文档)"); } else { $("#fileupload").text("上传(未上传文档)") } }); }) if (name != null && name != "") { $(".cnt span").each(function () { if ($(this).html() == name) { $(this).parents(".system").show(); $(this).parents("li").css("margin-bottom", "20px"); } }); } else $(".system").css("display", "inline-block"); $(".btn_submit").click(function () { if ($("#freight_name").val().trim() == "") { alert("物流名称不能为空"); return; } $(this).text("正在申请.."); $(this).css("background", "#bbb"); net.save("save_freight_request", { data: JSON.stringify(Get()) }, function (e) { if (e.success) { alert("提交成功,客服将在24小时内联系您"); $(".btn_submit").text("提交申请"); $(".btn_submit").css("background", "#ff7900"); } }); }); var Get = function () { var data = { freight_name: $("#freight_name").val(), system_name: $("input[type='radio'][name='system_type']:checked").siblings("span").html(), interface_file:$("#fileupload").attr("data-id"), order_url: $("#order_url").val(), find_url: $("#find_url").val(), sheet_url: $("#sheet_url").val(), website: $("#website").val(), phone: $("#phone").val(), contact: $("#contact").val(), qq: $("#qq").val(), mobile: $("#mobile").val(), email: $("#email").val(), intro: $("#intro").val(), test_number: $("#test_number").val(), test_password: $("#test_password").val(), } return data; } });