|
@@ -1,330 +1,332 @@
|
|
|
-{Template header}
|
|
|
-<body>
|
|
|
-<div class="warp">
|
|
|
-<div class="title winnone">信息登记 - 添加</div>
|
|
|
-<ul class="setting">
|
|
|
-
|
|
|
-<li>
|
|
|
-<em>店 铺:</em><select name="shop" class="select">
|
|
|
-{loop usershop() as $val}
|
|
|
-<option value="{$val['id']}">{$val['shopname']}</option>
|
|
|
-{/loop}</select>
|
|
|
-</li>
|
|
|
-
|
|
|
-<li>
|
|
|
-<em>仓 库:</em><select name="warehouse" class="select">
|
|
|
-<option value="5">美仓</option>
|
|
|
-</select>
|
|
|
-</li>
|
|
|
-
|
|
|
-<li>
|
|
|
-<em>上门目的:</em>
|
|
|
-<select name="objective" class="select class">
|
|
|
-<option value="1">仅自提</option>
|
|
|
-<option value="2">仅退货</option>
|
|
|
-<option value="3">退换货</option>
|
|
|
-<option value="4">安装头套</option>
|
|
|
-</select>
|
|
|
-</li>
|
|
|
-
|
|
|
-<li>
|
|
|
-<em>登记状态:</em>
|
|
|
-<select name="state" class="select class">
|
|
|
-<option value="1">沟通中</option>
|
|
|
-<option value="2">待客户上门</option>
|
|
|
-</select>
|
|
|
-</li>
|
|
|
-
|
|
|
-<li>
|
|
|
-<em>上门地点:</em>
|
|
|
-<select name="address" class="select class">
|
|
|
-<option value="1">BK850</option>
|
|
|
-<option value="2">Manhattan819</option>
|
|
|
-<option value="3">Flatbush933</option>
|
|
|
-</select>
|
|
|
-</li>
|
|
|
-
|
|
|
-<li>
|
|
|
-<em>预约上门时间:</em>
|
|
|
-<input class="must" value="{$registration['stime']}" name="stime" type="text" >
|
|
|
-</li>
|
|
|
-
|
|
|
-<li>
|
|
|
-<em>订单编号:</em>
|
|
|
-<input class="must" value="" name="number" type="text" >
|
|
|
-</li>
|
|
|
-
|
|
|
-<li>
|
|
|
-<em>订单号:</em>
|
|
|
-<input class="must" value="" name="orderinfo" type="text" >
|
|
|
-</li>
|
|
|
-
|
|
|
-
|
|
|
-<li class="length">
|
|
|
-<em>待取货物:</em>
|
|
|
-<input value="" name="product" type="text" >
|
|
|
-</li>
|
|
|
-
|
|
|
-<li class="length">
|
|
|
-<em>产品链接:</em>
|
|
|
-<input value="" name="url" type="text" readonly style="background-color:#ccc" >
|
|
|
-</li>
|
|
|
-
|
|
|
-
|
|
|
-<li>
|
|
|
-<em>条 数:</em>
|
|
|
-<input class="must" value="" name="num" type="text" >
|
|
|
-</li>
|
|
|
-
|
|
|
-<li>
|
|
|
-<em>订单金额:</em>
|
|
|
-<input class="must" value="" name="shouldmoney" type="text" >
|
|
|
-</li>
|
|
|
-
|
|
|
-<li>
|
|
|
-<em>客户名称:</em>
|
|
|
-<input class="must" value="" name="name" type="text" >
|
|
|
-</li>
|
|
|
-
|
|
|
-<li>
|
|
|
-<em>客户电话:</em>
|
|
|
-<input class="must" value="" name="phone" type="text" >
|
|
|
-</li>
|
|
|
-
|
|
|
-<li>
|
|
|
-<em>店员备注颜色:</em>
|
|
|
-<div class="checkbox">
|
|
|
-<span class="ckrows"><label><input class="0" name="red" type="radio" value="0" checked><font>正常</font></label></span>
|
|
|
-<span class="ckrows"><label><input class="1" name="red" type="radio" value="1"><font>红色</font></label></span>
|
|
|
-</div>
|
|
|
-</li>
|
|
|
-
|
|
|
-<li>
|
|
|
-<span class="jrdd" style="height: 32px;line-height: 32px;padding: 0 16px;color: #fff;background-color: #2084db;float: left;margin-right: 16px;border-radius: 5px;display: block;cursor: pointer;">一键加入 订单号/订单金额/客户名称/客户电话/产品链接<span>
|
|
|
-</li>
|
|
|
-
|
|
|
-
|
|
|
-<li class="length">
|
|
|
-<em>网站店员备注</em>
|
|
|
-<textarea name="content" style="height:160px;"></textarea>
|
|
|
-</li>
|
|
|
-
|
|
|
-<li class="length">
|
|
|
-<em>退货货物</em>
|
|
|
-<input value="" name="thproduct" type="text" >
|
|
|
-</li>
|
|
|
-
|
|
|
-<li class="length">
|
|
|
-<em>美店备注</em>
|
|
|
-<b></b>
|
|
|
-</li>
|
|
|
-
|
|
|
-<li class="length scimg">
|
|
|
-<em>自提/退换货单<br>图片上传</em>
|
|
|
-<span class="upimg"></span>
|
|
|
-<font>+</font>
|
|
|
-</li>
|
|
|
-
|
|
|
-<div style="clear:both;"></div>
|
|
|
-</ul>
|
|
|
-<div class="button"><font class="datasavezy">提 交</font> <font class="fh">关 闭</font></div>
|
|
|
-</div>
|
|
|
-<div style="display:none;">
|
|
|
-<input id="upload-file" name="files" accept="image/xls,image/xlsx" type="file">
|
|
|
-</div>
|
|
|
-<script>var addedit="/registration/add/";
|
|
|
-$(document).ready(function() {
|
|
|
-$(".jrdd").click(function() {
|
|
|
- var a = $("input[name=number]").val();
|
|
|
- if(a == '')
|
|
|
- {
|
|
|
- $(".ts p").html("请先填写编号");
|
|
|
- $(".ts").fadeIn();
|
|
|
- setTimeout('$(".ts").fadeOut()', 900);
|
|
|
- }
|
|
|
- $.ajax({
|
|
|
- url: "/registration/order",
|
|
|
- data: "number=" + a,
|
|
|
- type: "POST",
|
|
|
- dataType: "json",
|
|
|
- success: function(c) {
|
|
|
- if (c && c.success) {
|
|
|
- $("input[name=orderinfo]").val(c.msg['orderinfo']);
|
|
|
- $("input[name=shouldmoney]").val(c.msg['shouldmoney']);
|
|
|
- $("input[name=name]").val(c.msg['name']);
|
|
|
- $("input[name=phone]").val(c.msg['phone']);
|
|
|
- $("input[name=orderinfo]").attr("disabled","disabled");
|
|
|
- $("input[name=url]").val(c.msg['url']);
|
|
|
- $("input[name=orderinfo]").css("background-color","#ccc");
|
|
|
- $(".ts p").html("已成功填入");
|
|
|
- $(".ts").fadeIn();
|
|
|
- setTimeout('$(".ts").fadeOut()', 500);
|
|
|
- return false;
|
|
|
- } else {
|
|
|
- $(".ts p").html(c.msg);
|
|
|
- $(".ts").fadeIn();
|
|
|
- setTimeout('$(".ts").fadeOut()', 900);
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-});
|
|
|
-$("select[name='sl']").change();
|
|
|
- var button = $(".scimg font"), interval;
|
|
|
- var fileType = "pic", fileNum = "one";
|
|
|
- new AjaxUpload(button, {
|
|
|
- action: "/img/",
|
|
|
- name: "userfile",
|
|
|
- onSubmit: function(file, ext) {
|
|
|
- if (fileType == "pic") {
|
|
|
- if (ext && /^(jpg|png|jpeg|gif)$/.test(ext)) {
|
|
|
- this.setData({
|
|
|
- info: "文件类型为图片"
|
|
|
- });
|
|
|
- }
|
|
|
- else if (ext && /^(3gp|rmvb|flv|wmv|avi|mkv|mp4|mp3|wav)$/.test(ext)) {
|
|
|
- this.setData({
|
|
|
- info: "文件类型为视频"
|
|
|
- });
|
|
|
- } else {
|
|
|
- alert("提示:您上传的是非图片类型!");
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- $(".scimg font").hide();
|
|
|
- $(".loadimg").show();
|
|
|
- layx.load('loadId','上传中');
|
|
|
- if (fileNum == "one") {
|
|
|
- this.disable();
|
|
|
- }
|
|
|
- },
|
|
|
- onComplete: function(file, response) {
|
|
|
- eval("var obj=" + response);
|
|
|
- if (obj.ok) {
|
|
|
- layx.destroy('loadId');
|
|
|
- if (/^(.jpg|.png|.jpeg|.gif)$/.test(obj.lx)) {
|
|
|
- $(".scimg span").append('<img src="' + obj.filename + '" title="点击图片删除">');
|
|
|
- }
|
|
|
- else if (/^(.3gp|.rmvb|.flv|.wmv|.avi|.mkv|.mp4|.mp3|.wav)$/.test(obj.lx)) {
|
|
|
- $(".scimg span").append('<video src="' + obj.filename + '" controls="controls"></video>');
|
|
|
- }
|
|
|
- } else {
|
|
|
- layx.destroy('loadId');
|
|
|
- $(".ts p").html("上传失败,请重试");
|
|
|
- $(".ts").fadeIn();
|
|
|
- setTimeout('$(".ts").fadeOut()', 800);
|
|
|
- }
|
|
|
- $(".loadimg").hide();
|
|
|
- $(".scimg font").show();
|
|
|
- window.clearInterval(interval);
|
|
|
- this.enable();
|
|
|
- }
|
|
|
- });
|
|
|
-});
|
|
|
-$(".datasavezy").click(function() {
|
|
|
- $(".ts p").html("<i class='fa fa-2x fa-cog fa-spin'></i> 正在添加中,请稍后...");
|
|
|
- $(".ts").show();
|
|
|
- var f = "";
|
|
|
- var e = "";
|
|
|
- var x = '';
|
|
|
- $(".select").each(function() {
|
|
|
- f = f + $(this).attr("name") + "=" + $(this).children("option:selected").val() + "&";
|
|
|
- });
|
|
|
- $("input:text").each(function() {
|
|
|
- var str = $(this).val().replace(/\+/g,"%2B");
|
|
|
- var str = str.replace(/&/g,"%26");
|
|
|
- f = f + $(this).attr("name") + "=" + str + "&";
|
|
|
- });
|
|
|
- $("input:password").each(function() {
|
|
|
- f = f + $(this).attr("name") + "=" + $(this).val() + "&";
|
|
|
- });
|
|
|
- $("input:hidden").each(function() {
|
|
|
- f = f + $(this).attr("name") + "=" + $(this).val() + "&";
|
|
|
- });
|
|
|
- $("textarea").each(function() {
|
|
|
- var str2 = $(this).val().replace(/\+/g,"%2B");
|
|
|
- var str2 = str2.replace(/&/g,"%26");
|
|
|
- f = f + $(this).attr("name") + "=" + str2 + "&";
|
|
|
- });
|
|
|
- if($(".scimg img").length > 0 || $(".scimg video").length > 0)
|
|
|
- {
|
|
|
- var a = '';
|
|
|
- for (var b = 0; b < $(".scimg .upimg img").length; b++)
|
|
|
- {
|
|
|
- a = a + $(".scimg .upimg img")[b].src + "|";
|
|
|
- }
|
|
|
- for (var b = 0; b < $(".scimg .upimg video").length; b++)
|
|
|
- {
|
|
|
- a = a + $('.scimg .upimg video')[b].src + "|";
|
|
|
- }
|
|
|
- f = f + "img=" + a + "&";
|
|
|
- }
|
|
|
- for(i=0;i<$(".checkbox").length;i++)
|
|
|
- {
|
|
|
- var checkid = ""; var checkname = "";
|
|
|
- $(".checkbox:eq("+i+") .ckrows input:checked").each(function(){
|
|
|
- checkname = $(this).attr("name");
|
|
|
- checkid = checkid + $(this).val()+",";
|
|
|
- });
|
|
|
- if(checkname == "")
|
|
|
- {
|
|
|
- $(".ts p").text($(".checkbox:eq("+i+")").prevAll("em").text()+"为必填项");
|
|
|
- $(".ts").show();
|
|
|
- setTimeout('$(".ts").fadeOut()', 600);
|
|
|
- return false;
|
|
|
- }
|
|
|
- f = f + checkname + "=" + checkid + "&";
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- $(".dxh .xntj").each(function() {
|
|
|
- var str2 = $(this).find("textarea").val().replace(/\+/g,"%2B");
|
|
|
- var str2 = str2.replace(/&/g,"%26");
|
|
|
- x = x + $(this).find(".checkboxfbt .ckrows input:checked").val()+ "-" + str2 + "|";
|
|
|
- });
|
|
|
- f = f + "degreetext="+x+"&";
|
|
|
-
|
|
|
- var ab = 0;
|
|
|
- $(".must").each(function() {
|
|
|
- if ($.trim($(this).val()).length == 0) {
|
|
|
- $(this).css("border", "1px solid #F66");
|
|
|
- ab = ab + 1;
|
|
|
- }
|
|
|
- });
|
|
|
- if (ab > 0) {
|
|
|
- $(".ts p").text("红框为必填项");
|
|
|
- $(".ts").show();
|
|
|
- setTimeout('$(".ts").fadeOut()', 600);
|
|
|
- return false;
|
|
|
- }
|
|
|
- $.ajax({
|
|
|
- url: addedit,
|
|
|
- data: f,
|
|
|
- type: "POST",
|
|
|
- dataType: "json",
|
|
|
- success: function(a) {
|
|
|
- if (a && a.success) {
|
|
|
- $(".ts").hide();
|
|
|
- $(".express p:eq(0)").html(a.msg+"是否关闭?");
|
|
|
- $(".express p:eq(1)").html("<font class='fh'>确 定</font><font class='esc'>取 消</font>");
|
|
|
- $(".express").show();
|
|
|
- } else {
|
|
|
- $(".ts").hide();
|
|
|
- $(".ts p").html(a.msg);
|
|
|
- $(".ts").fadeIn();
|
|
|
- setTimeout('$(".ts").fadeOut()', 800);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-});
|
|
|
-
|
|
|
-$(document).on("click", ".scimg .upimg img", function() {
|
|
|
- $(this).remove();
|
|
|
-});
|
|
|
-$(document).on("click", ".scimg .upimg video", function() {
|
|
|
- $(this).remove();
|
|
|
-});
|
|
|
-</script>
|
|
|
-<script type="text/javascript" src="{$theme}js/ajaxupload.3.5.js"></script>
|
|
|
+{Template header}
|
|
|
+<body>
|
|
|
+<div class="warp">
|
|
|
+<div class="title winnone">信息登记 - 添加</div>
|
|
|
+<ul class="setting">
|
|
|
+
|
|
|
+<li>
|
|
|
+<em>店 铺:</em><select name="shop" class="select">
|
|
|
+{loop usershop() as $val}
|
|
|
+<option value="{$val['id']}">{$val['shopname']}</option>
|
|
|
+{/loop}</select>
|
|
|
+</li>
|
|
|
+
|
|
|
+<li>
|
|
|
+<em>仓 库:</em><select name="warehouse" class="select">
|
|
|
+<option value="5">美仓</option>
|
|
|
+</select>
|
|
|
+</li>
|
|
|
+
|
|
|
+<li>
|
|
|
+<em>上门目的:</em>
|
|
|
+<select name="objective" class="select class">
|
|
|
+<option value="1">仅自提</option>
|
|
|
+<option value="2">仅退货</option>
|
|
|
+<option value="3">退换货</option>
|
|
|
+<option value="4">安装头套</option>
|
|
|
+</select>
|
|
|
+</li>
|
|
|
+
|
|
|
+<li>
|
|
|
+<em>登记状态:</em>
|
|
|
+<select name="state" class="select class">
|
|
|
+<option value="1">沟通中</option>
|
|
|
+<option value="2">待客户上门</option>
|
|
|
+</select>
|
|
|
+</li>
|
|
|
+
|
|
|
+<li>
|
|
|
+<em>上门地点:</em>
|
|
|
+<select name="address" class="select class">
|
|
|
+<option value="1">BK850</option>
|
|
|
+<option value="2">Manhattan819</option>
|
|
|
+<option value="3">Flatbush933</option>
|
|
|
+<option value="4">Dallas3333</option>
|
|
|
+
|
|
|
+</select>
|
|
|
+</li>
|
|
|
+
|
|
|
+<li>
|
|
|
+<em>预约上门时间:</em>
|
|
|
+<input class="must" value="{$registration['stime']}" name="stime" type="text" >
|
|
|
+</li>
|
|
|
+
|
|
|
+<li>
|
|
|
+<em>订单编号:</em>
|
|
|
+<input class="must" value="" name="number" type="text" >
|
|
|
+</li>
|
|
|
+
|
|
|
+<li>
|
|
|
+<em>订单号:</em>
|
|
|
+<input class="must" value="" name="orderinfo" type="text" >
|
|
|
+</li>
|
|
|
+
|
|
|
+
|
|
|
+<li class="length">
|
|
|
+<em>待取货物:</em>
|
|
|
+<input value="" name="product" type="text" >
|
|
|
+</li>
|
|
|
+
|
|
|
+<li class="length">
|
|
|
+<em>产品链接:</em>
|
|
|
+<input value="" name="url" type="text" readonly style="background-color:#ccc" >
|
|
|
+</li>
|
|
|
+
|
|
|
+
|
|
|
+<li>
|
|
|
+<em>条 数:</em>
|
|
|
+<input class="must" value="" name="num" type="text" >
|
|
|
+</li>
|
|
|
+
|
|
|
+<li>
|
|
|
+<em>订单金额:</em>
|
|
|
+<input class="must" value="" name="shouldmoney" type="text" >
|
|
|
+</li>
|
|
|
+
|
|
|
+<li>
|
|
|
+<em>客户名称:</em>
|
|
|
+<input class="must" value="" name="name" type="text" >
|
|
|
+</li>
|
|
|
+
|
|
|
+<li>
|
|
|
+<em>客户电话:</em>
|
|
|
+<input class="must" value="" name="phone" type="text" >
|
|
|
+</li>
|
|
|
+
|
|
|
+<li>
|
|
|
+<em>店员备注颜色:</em>
|
|
|
+<div class="checkbox">
|
|
|
+<span class="ckrows"><label><input class="0" name="red" type="radio" value="0" checked><font>正常</font></label></span>
|
|
|
+<span class="ckrows"><label><input class="1" name="red" type="radio" value="1"><font>红色</font></label></span>
|
|
|
+</div>
|
|
|
+</li>
|
|
|
+
|
|
|
+<li>
|
|
|
+<span class="jrdd" style="height: 32px;line-height: 32px;padding: 0 16px;color: #fff;background-color: #2084db;float: left;margin-right: 16px;border-radius: 5px;display: block;cursor: pointer;">一键加入 订单号/订单金额/客户名称/客户电话/产品链接<span>
|
|
|
+</li>
|
|
|
+
|
|
|
+
|
|
|
+<li class="length">
|
|
|
+<em>网站店员备注</em>
|
|
|
+<textarea name="content" style="height:160px;"></textarea>
|
|
|
+</li>
|
|
|
+
|
|
|
+<li class="length">
|
|
|
+<em>退货货物</em>
|
|
|
+<input value="" name="thproduct" type="text" >
|
|
|
+</li>
|
|
|
+
|
|
|
+<li class="length">
|
|
|
+<em>美店备注</em>
|
|
|
+<b></b>
|
|
|
+</li>
|
|
|
+
|
|
|
+<li class="length scimg">
|
|
|
+<em>自提/退换货单<br>图片上传</em>
|
|
|
+<span class="upimg"></span>
|
|
|
+<font>+</font>
|
|
|
+</li>
|
|
|
+
|
|
|
+<div style="clear:both;"></div>
|
|
|
+</ul>
|
|
|
+<div class="button"><font class="datasavezy">提 交</font> <font class="fh">关 闭</font></div>
|
|
|
+</div>
|
|
|
+<div style="display:none;">
|
|
|
+<input id="upload-file" name="files" accept="image/xls,image/xlsx" type="file">
|
|
|
+</div>
|
|
|
+<script>var addedit="/registration/add/";
|
|
|
+$(document).ready(function() {
|
|
|
+$(".jrdd").click(function() {
|
|
|
+ var a = $("input[name=number]").val();
|
|
|
+ if(a == '')
|
|
|
+ {
|
|
|
+ $(".ts p").html("请先填写编号");
|
|
|
+ $(".ts").fadeIn();
|
|
|
+ setTimeout('$(".ts").fadeOut()', 900);
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ url: "/registration/order",
|
|
|
+ data: "number=" + a,
|
|
|
+ type: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ success: function(c) {
|
|
|
+ if (c && c.success) {
|
|
|
+ $("input[name=orderinfo]").val(c.msg['orderinfo']);
|
|
|
+ $("input[name=shouldmoney]").val(c.msg['shouldmoney']);
|
|
|
+ $("input[name=name]").val(c.msg['name']);
|
|
|
+ $("input[name=phone]").val(c.msg['phone']);
|
|
|
+ $("input[name=orderinfo]").attr("disabled","disabled");
|
|
|
+ $("input[name=url]").val(c.msg['url']);
|
|
|
+ $("input[name=orderinfo]").css("background-color","#ccc");
|
|
|
+ $(".ts p").html("已成功填入");
|
|
|
+ $(".ts").fadeIn();
|
|
|
+ setTimeout('$(".ts").fadeOut()', 500);
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ $(".ts p").html(c.msg);
|
|
|
+ $(".ts").fadeIn();
|
|
|
+ setTimeout('$(".ts").fadeOut()', 900);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+});
|
|
|
+$("select[name='sl']").change();
|
|
|
+ var button = $(".scimg font"), interval;
|
|
|
+ var fileType = "pic", fileNum = "one";
|
|
|
+ new AjaxUpload(button, {
|
|
|
+ action: "/img/",
|
|
|
+ name: "userfile",
|
|
|
+ onSubmit: function(file, ext) {
|
|
|
+ if (fileType == "pic") {
|
|
|
+ if (ext && /^(jpg|png|jpeg|gif)$/.test(ext)) {
|
|
|
+ this.setData({
|
|
|
+ info: "文件类型为图片"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else if (ext && /^(3gp|rmvb|flv|wmv|avi|mkv|mp4|mp3|wav)$/.test(ext)) {
|
|
|
+ this.setData({
|
|
|
+ info: "文件类型为视频"
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ alert("提示:您上传的是非图片类型!");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $(".scimg font").hide();
|
|
|
+ $(".loadimg").show();
|
|
|
+ layx.load('loadId','上传中');
|
|
|
+ if (fileNum == "one") {
|
|
|
+ this.disable();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onComplete: function(file, response) {
|
|
|
+ eval("var obj=" + response);
|
|
|
+ if (obj.ok) {
|
|
|
+ layx.destroy('loadId');
|
|
|
+ if (/^(.jpg|.png|.jpeg|.gif)$/.test(obj.lx)) {
|
|
|
+ $(".scimg span").append('<img src="' + obj.filename + '" title="点击图片删除">');
|
|
|
+ }
|
|
|
+ else if (/^(.3gp|.rmvb|.flv|.wmv|.avi|.mkv|.mp4|.mp3|.wav)$/.test(obj.lx)) {
|
|
|
+ $(".scimg span").append('<video src="' + obj.filename + '" controls="controls"></video>');
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ layx.destroy('loadId');
|
|
|
+ $(".ts p").html("上传失败,请重试");
|
|
|
+ $(".ts").fadeIn();
|
|
|
+ setTimeout('$(".ts").fadeOut()', 800);
|
|
|
+ }
|
|
|
+ $(".loadimg").hide();
|
|
|
+ $(".scimg font").show();
|
|
|
+ window.clearInterval(interval);
|
|
|
+ this.enable();
|
|
|
+ }
|
|
|
+ });
|
|
|
+});
|
|
|
+$(".datasavezy").click(function() {
|
|
|
+ $(".ts p").html("<i class='fa fa-2x fa-cog fa-spin'></i> 正在添加中,请稍后...");
|
|
|
+ $(".ts").show();
|
|
|
+ var f = "";
|
|
|
+ var e = "";
|
|
|
+ var x = '';
|
|
|
+ $(".select").each(function() {
|
|
|
+ f = f + $(this).attr("name") + "=" + $(this).children("option:selected").val() + "&";
|
|
|
+ });
|
|
|
+ $("input:text").each(function() {
|
|
|
+ var str = $(this).val().replace(/\+/g,"%2B");
|
|
|
+ var str = str.replace(/&/g,"%26");
|
|
|
+ f = f + $(this).attr("name") + "=" + str + "&";
|
|
|
+ });
|
|
|
+ $("input:password").each(function() {
|
|
|
+ f = f + $(this).attr("name") + "=" + $(this).val() + "&";
|
|
|
+ });
|
|
|
+ $("input:hidden").each(function() {
|
|
|
+ f = f + $(this).attr("name") + "=" + $(this).val() + "&";
|
|
|
+ });
|
|
|
+ $("textarea").each(function() {
|
|
|
+ var str2 = $(this).val().replace(/\+/g,"%2B");
|
|
|
+ var str2 = str2.replace(/&/g,"%26");
|
|
|
+ f = f + $(this).attr("name") + "=" + str2 + "&";
|
|
|
+ });
|
|
|
+ if($(".scimg img").length > 0 || $(".scimg video").length > 0)
|
|
|
+ {
|
|
|
+ var a = '';
|
|
|
+ for (var b = 0; b < $(".scimg .upimg img").length; b++)
|
|
|
+ {
|
|
|
+ a = a + $(".scimg .upimg img")[b].src + "|";
|
|
|
+ }
|
|
|
+ for (var b = 0; b < $(".scimg .upimg video").length; b++)
|
|
|
+ {
|
|
|
+ a = a + $('.scimg .upimg video')[b].src + "|";
|
|
|
+ }
|
|
|
+ f = f + "img=" + a + "&";
|
|
|
+ }
|
|
|
+ for(i=0;i<$(".checkbox").length;i++)
|
|
|
+ {
|
|
|
+ var checkid = ""; var checkname = "";
|
|
|
+ $(".checkbox:eq("+i+") .ckrows input:checked").each(function(){
|
|
|
+ checkname = $(this).attr("name");
|
|
|
+ checkid = checkid + $(this).val()+",";
|
|
|
+ });
|
|
|
+ if(checkname == "")
|
|
|
+ {
|
|
|
+ $(".ts p").text($(".checkbox:eq("+i+")").prevAll("em").text()+"为必填项");
|
|
|
+ $(".ts").show();
|
|
|
+ setTimeout('$(".ts").fadeOut()', 600);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ f = f + checkname + "=" + checkid + "&";
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ $(".dxh .xntj").each(function() {
|
|
|
+ var str2 = $(this).find("textarea").val().replace(/\+/g,"%2B");
|
|
|
+ var str2 = str2.replace(/&/g,"%26");
|
|
|
+ x = x + $(this).find(".checkboxfbt .ckrows input:checked").val()+ "-" + str2 + "|";
|
|
|
+ });
|
|
|
+ f = f + "degreetext="+x+"&";
|
|
|
+
|
|
|
+ var ab = 0;
|
|
|
+ $(".must").each(function() {
|
|
|
+ if ($.trim($(this).val()).length == 0) {
|
|
|
+ $(this).css("border", "1px solid #F66");
|
|
|
+ ab = ab + 1;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (ab > 0) {
|
|
|
+ $(".ts p").text("红框为必填项");
|
|
|
+ $(".ts").show();
|
|
|
+ setTimeout('$(".ts").fadeOut()', 600);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ url: addedit,
|
|
|
+ data: f,
|
|
|
+ type: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ success: function(a) {
|
|
|
+ if (a && a.success) {
|
|
|
+ $(".ts").hide();
|
|
|
+ $(".express p:eq(0)").html(a.msg+"是否关闭?");
|
|
|
+ $(".express p:eq(1)").html("<font class='fh'>确 定</font><font class='esc'>取 消</font>");
|
|
|
+ $(".express").show();
|
|
|
+ } else {
|
|
|
+ $(".ts").hide();
|
|
|
+ $(".ts p").html(a.msg);
|
|
|
+ $(".ts").fadeIn();
|
|
|
+ setTimeout('$(".ts").fadeOut()', 800);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+});
|
|
|
+
|
|
|
+$(document).on("click", ".scimg .upimg img", function() {
|
|
|
+ $(this).remove();
|
|
|
+});
|
|
|
+$(document).on("click", ".scimg .upimg video", function() {
|
|
|
+ $(this).remove();
|
|
|
+});
|
|
|
+</script>
|
|
|
+<script type="text/javascript" src="{$theme}js/ajaxupload.3.5.js"></script>
|
|
|
{Template footer}
|