123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307 |
- {Template header}
- <body>
- <div class="warp">
- <div class="title winnone">退单信息 - 补充</div>
- <ul class="setting">
- <li class="length remark">
- <em>收货地址:</em>
- <div class="checkbox">
- <span class="ckrows"><label><input name="region" type="radio" value="1" {if $returns['region'] == '1'}checked{/if}><font>国 内</font></label></span>
- <span class="ckrows"><label><input name="region" type="radio" value="2" {if $returns['region'] == '2'}checked{/if}><font>美国店</font></label></span>
- </div>
- </li>
- <li>
- <em>店铺:</em>
- <select name="shop" class="select class">
- {loop usershop() as $val}
- <option value="{$val['id']}" {if $returns['shop'] == $val['id']}selected="selected"{/if}>{$val['shopname']}</option>
- {/loop}
- <option value="0" {if $returns['shop'] == 0}selected="selected"{/if}>不确定</option>
- </select>
- </li>
- <li>
- <em>退件物流方式:</em>
- <select name="express" class="select class">
- <option value="" {if $returns['express'] == ''}selected="selected"{/if}>请选择</option>
- <option value="USPS" {if $returns['express'] == 'USPS'}selected="selected"{/if}>USPS</option>
- <option value="UPS" {if $returns['express'] == 'UPS'}selected="selected"{/if}>UPS</option>
- <option value="Fedex" {if $returns['express'] == 'Fedex'}selected="selected"{/if}>Fedex</option>
- <option value="DHL" {if $returns['express'] == 'DHL'}selected="selected"{/if}>DHL</option>
- <option value="Royal Mail" {if $returns['express'] == 'Royal Mail'}selected="selected"{/if}>Royal Mail</option>
- <option value="Canada Post" {if $returns['express'] == 'Canada Post'}selected="selected"{/if}>Canada Post</option>
- <option value="France Post" {if $returns['express'] == 'France Post'}selected="selected"{/if}>France Post</option>
- <option value="Germany Post" {if $returns['express'] == 'Germany Post'}selected="selected"{/if}>Germany Post</option>
- <option value="Australia Post" {if $returns['express'] == 'Australia Post'}selected="selected"{/if}>Australia Post</option>
- <option value="TNT" {if $returns['express'] == 'TNT'}selected="selected"{/if}>TNT</option>
- <option value="邮政" {if $returns['express'] == '邮政'}selected="selected"{/if}>邮政</option>
- <option value="其它" {if $returns['express'] == '其它'}selected="selected"{/if}>其它</option>
- </select>
- </li>
- <li>
- <em>订单编号:</em>
- <input value="{$returns['number']}" name="number" type="text" placeholder="国内填写" >
- </li>
- <li>
- <em>网站订单号:</em>
- <input value="{$returns['orderinfo']}" name="orderinfo" type="text" placeholder="国内填写" >
- </li>
- <li>
- <em>客户姓名:</em>
- <input value="{$returns['name']}" name="name" type="text" placeholder="国内填写" >
- </li>
- <li>
- <em>退回运单号:</em>
- <input value="{$returns['torderinfo']}" name="torderinfo" type="text" placeholder="国内或美国仓填写" >
- </li>
- <li>
- <em>发货日期:</em>
- <input value="{$returns['ftime']!=0?date('Y-m-d',$returns['ftime']):''}" onClick="laydate({istime: true,format:'YYYY-MM-DD'})" name="ftime" type="text" placeholder="国内填写" >
- </li>
- <li>
- <em>收到日期:</em>
- <input value="{$returns['stime']!=0?date('Y-m-d',$returns['stime']):''}" onClick="laydate({istime: true,format:'YYYY-MM-DD'})" name="stime" type="text" >
- </li>
- <li class="length remark">
- <em>应退回货物:</em>
- <textarea name="goods" style="height:55px;" placeholder="国内填写">{$returns['goods']}</textarea>
- </li>
- <li class="length remark">
- <em>实际收到货物:</em>
- <textarea name="received" style="height:55px;" placeholder="美国仓填写">{$returns['received']}</textarea>
- </li>
- <li>
- <em>退货登记编码:</em>
- <input value="{$returns['ret_regist_no']}" name="ret_regist_no" type="text">
- </li>
- <li>
- <em>退货箱号:</em>
- <input value="{$returns['xh']}" name="xh" type="text">
- </li>
- <li class="remark length">
- <em>选择产品数量:</em>
- <select name="sl" class="select class">
- <option value="0" {if $returns['sl'] == 0}selected="selected"{/if}>请选择</option>
- <option value="1" {if $returns['sl'] == 1}selected="selected"{/if}>1个</option>
- <option value="2" {if $returns['sl'] == 2}selected="selected"{/if}>2个</option>
- <option value="3" {if $returns['sl'] == 3}selected="selected"{/if}>3个</option>
- </select>
- </li>
- <div class="dxh">
- {$returns['degreetext']}
- </div>
- <li class="length scimg">
- <span class="upimg">{$returns['img']}</span>
- <font>+</font>
- </li>
- <div style="clear:both;"></div>
- </ul>
- <input type="hidden" name="id" value="{$returns['id']}" />
- <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="/returns/edit/";
- var scwd = "/fullorderexcel/scwd";
- $(document).ready(function() {
- $("select[name='sl']").change(function() {
- var t = $(this).find("option:selected").val();
- var f = 0;
- $(".dxh .xntj").each(function() {
- f = f + 1;
- });
- //$(".dxh").html("");
- if(t > f)
- {
- for(i=0;i<t-f;i++)
- {
- $(".dxh").append('<div class="xntj"><li class="length remark"><em>完好程度-'+(f+i+1)+':</em><div class="checkboxfbt"><span class="ckrows"><label><input name="degree'+(f+i+1)+'" type="radio" value="1"><font>可 用</font></label></span><span class="ckrows"><label><input name="degree'+(f+i+1)+'" type="radio" value="2"><font>精打理</font></label></span><span class="ckrows"><label><input name="degree'+(f+i+1)+'" type="radio" value="3"><font>不可用</font></label></span><span class="ckrows"><label><input name="degree'+(f+i+1)+'" type="radio" value="4"><font>其 它</font></label></span></div></li><li class="length remark"><em>完好程度补充-'+(f+i+1)+':</em><textarea name="degreetext" style="height:55px;" placeholder="美国仓填写"></textarea></li></div>');
- }
- }
- else if (t < f)
- {
- for(i=0;i<f-t+1;i++)
- {
- $(".dxh .xntj:eq("+(f-i)+")").remove();
- }
- }
- });
- var d= {$returns["degree"]};
- $.each(d, function(j, v) {
- $(".dxh .xntj:eq("+j+") .checkboxfbt input:eq("+(v-1)+")").attr("checked","checked");
- });
- 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 .deldata em", function() {
- $(this).parent(".deldata").remove();
- });
- $(document).on("click", ".scimg .upimg .deldata em", function() {
- $(this).parent(".deldata").remove();
- });
- </script>
- <script type="text/javascript" src="{$theme}js/ajaxupload.3.5.js"></script>
- <script type="text/javascript" src="{$theme}js/laydate.js"></script>
- {Template footer}
|