瀏覽代碼

完成退货登记的店铺和订单不一致

lvhao 5 月之前
父節點
當前提交
71ebf5c7fc
共有 2 個文件被更改,包括 41 次插入3 次删除
  1. 2 2
      template/erp/returns_add.html
  2. 39 1
      template/erp/returns_edit.html

+ 2 - 2
template/erp/returns_add.html

@@ -318,7 +318,7 @@ $("input[name='number']").on('blur',function(){
             $(".ts").hide();
             $(".ts p").html(res.msg);
             $(".ts").fadeIn();
-            setTimeout('$(".ts").fadeOut()', 800);
+            setTimeout('$(".ts").fadeOut()', 1200);
         }
     },'json')
    
@@ -337,7 +337,7 @@ $(".shopselect").on('change',function(){
             $(".ts").hide();
             $(".ts p").html(res.msg);
             $(".ts").fadeIn();
-            setTimeout('$(".ts").fadeOut()', 800);
+            setTimeout('$(".ts").fadeOut()', 1200);
         }
     },'json')
 })

+ 39 - 1
template/erp/returns_edit.html

@@ -13,7 +13,7 @@
 
 <li>
 <em>店铺:</em>
-<select name="shop" class="select class">
+<select name="shop" class="select class shopselect">
 {loop usershop() as $val}
 <option value="{$val['id']}" {if $returns['shop'] == $val['id']}selected="selected"{/if}>{$val['shopname']}</option>
 {/loop}
@@ -301,6 +301,44 @@ $(document).on("click", ".scimg .upimg .deldata em", function() {
 $(document).on("click", ".scimg .upimg .deldata em", function() {
     $(this).parent(".deldata").remove();
 });
+
+$("input[name='number']").on('blur',function(){
+    let order_no = $("input[name='number']").val()
+    if(!order_no){
+        return ;
+    }
+    let shop = $(".shopselect").val()
+    $.post("/returns/csao",{
+        shop:shop,
+        number:order_no,
+    },function(res){
+        if(res.code != 1){
+            $(".ts").hide();
+            $(".ts p").html(res.msg);
+            $(".ts").fadeIn();
+            setTimeout('$(".ts").fadeOut()', 1200);
+        }
+    },'json')
+   
+})
+$(".shopselect").on('change',function(){
+    let shop = $(".shopselect").val()
+    let order_no = $("input[name='number']").val()
+    if(!order_no){
+        return ;
+    }
+    $.post("/returns/csao",{
+        shop:shop,
+        number:order_no,
+    },function(res){
+        if(res.code != 1){
+            $(".ts").hide();
+            $(".ts p").html(res.msg);
+            $(".ts").fadeIn();
+            setTimeout('$(".ts").fadeOut()', 1200);
+        }
+    },'json')
+})
 </script>
 <script type="text/javascript" src="{$theme}js/ajaxupload.3.5.js"></script>
 <script type="text/javascript" src="{$theme}js/laydate.js"></script>