lvhao 2 settimane fa
parent
commit
b3811bb5d2
2 ha cambiato i file con 36 aggiunte e 32 eliminazioni
  1. 1 1
      template/erp/fullordertt_edit.html
  2. 35 31
      template/erp/js/fullorder-addedit.js

+ 1 - 1
template/erp/fullordertt_edit.html

@@ -1186,6 +1186,6 @@ $("#is_jiaji_id").on('change',function(){
 });
 
 </script>
-<script src="{$theme}js/fullorder-addedit.js?v=20240115000222213"></script>
+<script src="{$theme}js/fullorder-addedit.js?v=20240115000222215"></script>
 <script type="text/javascript" src="{$theme}js/time.js"></script>
 {Template footer}

+ 35 - 31
template/erp/js/fullorder-addedit.js

@@ -654,44 +654,48 @@ $("#currency").change(function(){
 		}
 
 		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])
+			let tmp_printtype =  $("select[name=printtype").val();
+			if(tmp_printtype == 1){
+
+				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{
-						$(".ts p").html("快递承运商没有usps");
-						return $(".ts").show();
+						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");
+				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')//联邦的话替换签名选项