Bläddra i källkod

提交编辑信息

lvhao 2 månader sedan
förälder
incheckning
32ee3c99fc
2 ändrade filer med 58 tillägg och 2 borttagningar
  1. 18 1
      template/erp/fullordertt_edit.html
  2. 40 1
      template/erp/js/fullorder-addedit.js

+ 18 - 1
template/erp/fullordertt_edit.html

@@ -911,6 +911,23 @@ if(eid == '2' || eid == '64')//联邦的话替换签名选项
 				
 	
 		}
+		// let kdfws_content_text = $("select[name=ttsp_xz]").text().toLocaleLowerCase()
+		// if(kdfws_content_text.includes("usps")){
+		// 	alert(1)
+		// }
+		// if(kdfws_content_text.includes("fedex")){
+		// 	alert(2)
+		// }
+		// if(kdfws_content_text.includes("ups")){
+		// 	alert(3)
+		// }
+		
+		// $(".express_tips").click(function(){
+		// 	let msg = $(this).data('ts')
+		// 	showExpressTiShi(msg)
+		// })
+		// $(".express_tips").hover(function(){
+	
 /**
 if($("select[name='express']").find("option:selected").val() == '24' || $("select[name='express']").find("option:selected").val() == '31')//联邦的话替换签名选项11
 		{
@@ -1169,6 +1186,6 @@ $("#is_jiaji_id").on('change',function(){
 });
 
 </script>
-<script src="{$theme}js/fullorder-addedit.js?v=20240115000222212"></script>
+<script src="{$theme}js/fullorder-addedit.js?v=20240115000222213"></script>
 <script type="text/javascript" src="{$theme}js/time.js"></script>
 {Template footer}

+ 40 - 1
template/erp/js/fullorder-addedit.js

@@ -653,7 +653,46 @@ $("#currency").change(function(){
 			 $("select[name='qm']").html('<option value="0" selected="selected">无</option>');//<option value="1">需要</option>
 		}
 
-
+		if(id == '85' || id == '87'){
+			let kdfws_content_text = $("select[name=ttsp_xz]").text().toLocaleLowerCase()
+			let usps_tmp_bx_arr = [];
+			let fedex_tmp_bx_arr = [];
+			$("select[name=ttsp_xz] option").map(function(option){
+				if($(this).text().toLowerCase().includes("usps")){
+					usps_tmp_bx_arr.push($(this).val())
+				}
+				if($(this).text().toLowerCase().includes("fedex")){
+					fedex_tmp_bx_arr.push($(this).val())
+				}
+			})
+			if(id == '85'){
+				if(!kdfws_content_text.includes("usps")){
+				   $(".ts p").html("快递承运商没有usps");
+		           return $(".ts").show();
+				}else{
+					if(usps_tmp_bx_arr.length > 0){
+						$("select[name=ttsp_xz]").val(usps_tmp_bx_arr[0])
+					}else{
+						$(".ts p").html("快递承运商没有usps");
+						return $(".ts").show();
+					}
+				}
+			}
+			if(id == '87'){
+				if(!kdfws_content_text.includes("fedex")){
+					$(".ts p").html("快递承运商没有fedex");
+		            return $(".ts").show();
+				}else{
+					if(fedex_tmp_bx_arr.length > 0){
+						$("select[name=ttsp_xz]").val(fedex_tmp_bx_arr[0])
+					}else{
+						$(".ts p").html("快递承运商没有usps");
+						return $(".ts").show();
+					}
+				}
+			}
+			
+		}
 		
 		if(id == '2' || id == '64')//联邦的话替换签名选项
 		{