123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363 |
- {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']}" {if $registration['shop'] == $val['id']}selected="selected"{/if}>{$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" {if $registration['objective'] == 1}selected="selected"{/if}>仅自提</option>
- <option value="2" {if $registration['objective'] == 2}selected="selected"{/if}>仅退货</option>
- <option value="3" {if $registration['objective'] == 3}selected="selected"{/if}>退换货</option>
- <option value="4" {if $registration['objective'] == 4}selected="selected"{/if}>安装头套</option>
- </select>
- </li>
- <li>
- <em>登记状态:</em>
- {if $registration['state'] < 3}
- <select name="state" class="select class">
- <option value="1" {if $registration['state'] == 1}selected="selected"{/if}>沟通中</option>
- <option value="2" {if $registration['state'] == 2}selected="selected"{/if}>待客户上门</option>
- </select>
- {else}
- <b>
- {if $registration['state'] == 3}已自提{/if}
- {if $registration['state'] == 4}已退货{/if}
- {if $registration['state'] == 5}已换货{/if}</b>
- {/if}
- </li>
- <li>
- <em>上门地点:</em>
- <select name="address" class="select class">
- <option value="1" {if $registration['address'] == 1}selected="selected"{/if}>BK850</option>
- <option value="2" {if $registration['address'] == 2}selected="selected"{/if}>Manhattan819</option>
- <option value="3" {if $registration['address'] == 3}selected="selected"{/if}>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="{$registration['number']}" name="number" type="text">
- </li>
- <li>
- <em>订单号:</em>
- <input class="must" value="{$registration['orderinfo']}" name="orderinfo" type="text" readonly style="background-color:#ccc" >
- </li>
- <li class="length">
- <em>待取货物:</em>
- <input value="{$registration['product']}" name="product" type="text" >
- </li>
- <li class="length">
- <em>产品链接:</em>
- <input value="{$registration['url']}" name="url" type="text" readonly style="background-color:#ccc" >
- </li>
- <li>
- <em>条 数:</em>
- <input class="must" value="{$registration['num']}" name="num" type="text" >
- </li>
- <li>
- <em>订单金额:</em>
- <input class="must" value="{$registration['shouldmoney']}" name="shouldmoney" type="text" >
- </li>
- <li>
- <em>客户名称:</em>
- <input class="must" value="{$registration['name']}" name="name" type="text" >
- </li>
- <li>
- <em>客户电话:</em>
- <input class="must" value="{$registration['phone']}" name="phone" type="text" >
- </li>
- <li>
- <em>店员备注颜色:</em>
- <div class="checkbox">
- <span class="ckrows"><label><input class="0" name="red" type="radio" value="0" {if $registration['red'] == 0}checked{/if}><font>正常</font></label></span>
- <span class="ckrows"><label><input class="1" name="red" type="radio" value="1" {if $registration['red'] == 1}checked{/if}><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;">{$registration['content']}</textarea>
- </li>
- <li class="length">
- <em>退货货物</em>
- <input value="{$registration['thproduct']}" name="thproduct" type="text" >
- </li>
- <li class="length">
- <em>美店备注</em>
- <b>{$registration['usacontent']}</b>
- </li>
- <li class="length scimg">
- <em>自提/退换货单<br>图片上传</em>
- <span class="upimg">{$registration['img']}</span>
- <font>+</font>
- </li>
- <div style="clear:both;"></div>
- </ul>
- <input type="hidden" name="id" value="{$registration['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="/registration/edit/";var rowsurl="/registration/rows/";
- $(".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;
- }
- }
- });
- });
- $(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></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= '{$registration["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>
- {Template footer}
|