From bcf6eff4b9445ded35288a277f3897c5192bdb68 Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期三, 20 八月 2025 15:32:03 +0800
Subject: [PATCH] 调整是否为0的判断,增加销售核对

---
 js/CangKuManage_js/GS_HBLLD.js       |    2 
 js/CangKuManage_js/GS_SCBLD.js       |    2 
 js/CangKuManage_js/GS_HBJCLLD_NEW.js |    2 
 js/CangKuManage_js/GS_SCLLD.js       |    2 
 js/CangKuManage_js/XSHD.js           |  303 ++++++++++++++++++++++++++++++++++++++++++++++++++
 js/CangKuManage_js/GS_CKPDD.js       |    2 
 6 files changed, 308 insertions(+), 5 deletions(-)

diff --git a/js/CangKuManage_js/GS_CKPDD.js b/js/CangKuManage_js/GS_CKPDD.js
index 8c6ab6d..5867727 100644
--- a/js/CangKuManage_js/GS_CKPDD.js
+++ b/js/CangKuManage_js/GS_CKPDD.js
@@ -131,7 +131,7 @@
 			$('tr').each(function() {
 				// 鑾峰彇瀹炵洏鏁伴噺鍗曞厓鏍肩殑鍊�
 				var $cell = $(this).find('td:nth-child(4)');
-				var quantity = parseInt($cell.text());
+				var quantity = parseFloat($cell.text());
 
 				// 鍒ゆ柇瀹炵洏鏁伴噺鏄惁涓�0
 				if (quantity !== 0) {
diff --git a/js/CangKuManage_js/GS_HBJCLLD_NEW.js b/js/CangKuManage_js/GS_HBJCLLD_NEW.js
index 3a8fd93..79aaaa0 100644
--- a/js/CangKuManage_js/GS_HBJCLLD_NEW.js
+++ b/js/CangKuManage_js/GS_HBJCLLD_NEW.js
@@ -112,7 +112,7 @@
 	  $('tr').each(function() {
 	    // 鑾峰彇瀹炵洏鏁伴噺鍗曞厓鏍肩殑鍊�
 	    var $cell = $(this).find('td:nth-child(3)');
-	    var quantity = parseInt($cell.text());
+	    var quantity = parseFloat($cell.text());
 	    
 	    // 鍒ゆ柇瀹炵洏鏁伴噺鏄惁涓�0
 	    if (quantity == 0) {
diff --git a/js/CangKuManage_js/GS_HBLLD.js b/js/CangKuManage_js/GS_HBLLD.js
index e9060aa..409abc3 100644
--- a/js/CangKuManage_js/GS_HBLLD.js
+++ b/js/CangKuManage_js/GS_HBLLD.js
@@ -154,7 +154,7 @@
 	  $('tr').each(function() {
 	    // 鑾峰彇瀹炵洏鏁伴噺鍗曞厓鏍肩殑鍊�
 	    var $cell = $(this).find('td:nth-child(3)');
-	    var quantity = parseInt($cell.text());
+	    var quantity = parseFloat($cell.text());
 	    
 	    // 鍒ゆ柇瀹炵洏鏁伴噺鏄惁涓�0
 	    if (quantity == 0) {
diff --git a/js/CangKuManage_js/GS_SCBLD.js b/js/CangKuManage_js/GS_SCBLD.js
index 33c7d45..5219fa5 100644
--- a/js/CangKuManage_js/GS_SCBLD.js
+++ b/js/CangKuManage_js/GS_SCBLD.js
@@ -154,7 +154,7 @@
 	  $('tr').each(function() {
 	    // 鑾峰彇瀹炵洏鏁伴噺鍗曞厓鏍肩殑鍊�
 	    var $cell = $(this).find('td:nth-child(3)');
-	    var quantity = parseInt($cell.text());
+	    var quantity = parseFloat($cell.text());
 	    
 	    // 鍒ゆ柇瀹炵洏鏁伴噺鏄惁涓�0
 	    if (quantity == 0) {
diff --git a/js/CangKuManage_js/GS_SCLLD.js b/js/CangKuManage_js/GS_SCLLD.js
index c84226a..0e78ecd 100644
--- a/js/CangKuManage_js/GS_SCLLD.js
+++ b/js/CangKuManage_js/GS_SCLLD.js
@@ -154,7 +154,7 @@
 	  $('tr').each(function() {
 	    // 鑾峰彇瀹炵洏鏁伴噺鍗曞厓鏍肩殑鍊�
 	    var $cell = $(this).find('td:nth-child(3)');
-	    var quantity = parseInt($cell.text());
+	    var quantity = parseFloat($cell.text());
 	    
 	    // 鍒ゆ柇瀹炵洏鏁伴噺鏄惁涓�0
 	    if (quantity == 0) {
diff --git a/js/CangKuManage_js/XSHD.js b/js/CangKuManage_js/XSHD.js
new file mode 100644
index 0000000..4bff12f
--- /dev/null
+++ b/js/CangKuManage_js/XSHD.js
@@ -0,0 +1,303 @@
+/**
+ * 浣滆�咃細G98138 榛庨攱
+ * 鏃堕棿锛�2018-09-04
+ * 鎻忚堪锛氬簱浣� 缁戝畾
+ * 
+ * 涓氬姟鎬濊矾锛�
+ * 1. 鎵弿鏉$爜
+ *  1.1 闈炴潯鐮佸簱瀛樿〃鐨勬潯鐮侊紝 鎻愮ず锛� OK锛� *
+ *	1.2 闈炲緟鍏ュ簱鏉$爜锛� 鎻愮ず锛� OK锛� *
+ *	1.3 閫氳繃鏉$爜鎵惧埌涓婁竴娆¤鐗╂枡鐨勫簱浣嶏紝 浣滀负鎺ㄨ崘搴撲綅锛� OK锛�
+ *	娉ㄦ剰锛� 濡傛灉鍕鹃�変簡鈥滈粯璁ゅ簱浣嶁�濓紝 涓斿湪涓婁竴娆$粦瀹氱殑搴撲綅鍜屽綋鍓嶇晫闈㈡樉绀虹殑搴撲綅涓�鑷� 锛� 鍒欑洿鎺ョ粦瀹氬簱浣嶏紝 涓嶉渶瑕佸啀鎵弿搴撲綅 *
+
+ * 2. 鎵弿搴撲綅鏉$爜 *
+ *	2.1 闈炲簱浣嶆潯鐮侊紝 鎻愮ず锛� OK锛� *
+ *	2.2 闈炶浠撳簱鐨勫簱浣嶏紝 鎻愮ず锛� OK锛� *
+ */
+
+// 鍏ㄥ眬鍙橀噺
+var billNo = '';
+var DH = '';
+var i = 0; //璁$畻鎵弿鏉$爜鏁伴噺
+var WLBM = "";//鐗╂枡缂栫爜
+var matterTable = null;
+
+//鍒濆鍖栵紝榛樿鐒︾偣
+mui.plusReady(function(){
+	app.init();
+	GetInfoGYS();
+	console.log("杩炴帴娴嬭瘯锛�");
+	//initBluetooth();
+	$('#info').height($(window).height()- $("#row001").height() - $("#div001").height()- $("#div002").height() - 70);
+});		
+
+function GetInfoGYS() {
+	$.ajax({
+		url: app.API_URL_HEADER + "/WARBAB/GetInfoGYS",
+		
+		DataType: "json",
+		type: "post",
+		async: false,
+		//timeout: 15000,
+		success: function(data) {
+		if (data.status == 0) {
+
+		  var selectElementD = document.getElementById('GYS');
+		  selectElementD.innerHTML = "";
+		  matterTable = data.data.matterTable;
+							
+							var option = document.createElement("option");
+							option.value = "";
+							option.text = "璇烽�夋嫨瀹㈡埛";
+							selectElementD.appendChild(option);
+							
+		  for (var i = 0; i < matterTable.length; i++) {
+		    var option = document.createElement("option");
+		    option.value = matterTable[i]["DFA002"];
+		    option.text = matterTable[i]["DFA002"];
+		    selectElementD.appendChild(option);
+		  }
+							
+		} else {
+							
+		  alert("鑾峰彇鏁版嵁寮傚父锛�" + response.message);
+		}
+					   
+		},
+		error: function(xhr, type, errorThrown) {
+			alert("鑾峰彇鏁版嵁寮傚父锛�" + JSON.stringify(errorThrown));
+		}
+	});
+
+}
+
+function GetInfoDFA() {
+	$.ajax({
+		url: app.API_URL_HEADER + "/WARBAB/GetInfoDFA",
+		
+		DataType: "json",
+		type: "post",
+		async: false,
+		data: {
+			GYS:$("#GYS").val(),
+			CX:$("#searchInput1").val()
+		},
+		//timeout: 15000,
+		success: function(data) {
+		if (data.status == 0) {
+
+		  var selectElementD = document.getElementById('DFA001');
+		  selectElementD.innerHTML = "";
+		  matterTable = data.data.matterTable;
+							
+							var option = document.createElement("option");
+							option.value = "";
+							option.text = "璇烽�夋嫨鍙戣揣閫氱煡鍗�";
+							selectElementD.appendChild(option);
+							
+		  for (var i = 0; i < matterTable.length; i++) {
+		    var option = document.createElement("option");
+		    option.value = matterTable[i]["DFA001"];
+		    option.text = matterTable[i]["DFA001"];
+		    selectElementD.appendChild(option);
+		  }
+							
+		} else {
+							
+		  alert("鑾峰彇鏁版嵁寮傚父锛�" + response.message);
+		}
+					   
+		},
+		error: function(xhr, type, errorThrown) {
+			alert("鑾峰彇鏁版嵁寮傚父锛�" + JSON.stringify(errorThrown));
+		}
+	});
+
+}
+
+function GetInfoBarcode(){
+	console.log(1);
+	$.ajax({
+		url: app.API_URL_HEADER + "/WARBAB/GetBarcodeInfoHD",
+		
+		DataType: "json",
+		type: "post",
+		async: false,
+		data: {
+			DFA001:$("#DFA001").val(),
+			ITEMNO:$("#ITEMNO").val()
+		},
+		//timeout: 15000,
+		success: function(data) {
+		if (data.status == 0) {
+			matterTable = data.data.matterTable;
+			populateTable(matterTable);
+			matterTableT = data.data.matterTableT;
+			$("#YSHJ").val(matterTableT[0]["hd004"]);
+			$("#SLHJ").val(matterTableT[0]["CKDD007"]);			
+		} else {
+							
+		  alert("鑾峰彇鏁版嵁寮傚父锛�" + data.message);
+		}
+					   
+		},
+		error: function(xhr, type, errorThrown) {
+			alert("鑾峰彇鏁版嵁寮傚父锛�" + JSON.stringify(errorThrown));
+		}
+	});
+}
+
+ function populateTable(data) {
+ 	
+ 	console.log(data);
+   let tbody = document.querySelector("#myTable tbody");
+ 
+   // 娓呯┖琛ㄦ牸鍐呭
+   tbody.innerHTML = "";
+ 
+   // 寰幆閬嶅巻鏁版嵁锛岀敓鎴愯〃鏍艰
+   for (let i = 0; i < data.length; i++) {
+     let tr = document.createElement("tr");
+  
+     // 鍒涘缓琛ㄦ牸鍗曞厓鏍硷紝骞跺皢鏁版嵁濉叆
+     let td1 = document.createElement("td");
+     td1.textContent = data[i]["CKDD002"];
+     tr.appendChild(td1);
+
+     let td2 = document.createElement("td");
+     td2.textContent = data[i]["CKDD009"];
+     tr.appendChild(td2);
+ 
+     let td3 = document.createElement("td");
+     td3.textContent = data[i]["CKDD011"];
+     tr.appendChild(td3);
+ 	
+ 	let td4 = document.createElement("td");
+ 	td4.textContent = data[i]["CKDD007"];
+ 	tr.appendChild(td4);
+	
+	let td5 = document.createElement("td");
+	td5.textContent = data[i]["isHD"];
+	tr.appendChild(td5);
+ 
+     tbody.appendChild(tr);
+	 
+	 $(function() {
+	   // 灏嗘爣棰樿鐨勮儗鏅鑹茶缃负鐏拌壊
+	   $('tr:first-child th').css('background-color', 'gray');
+	   
+	   // 閬嶅巻琛ㄦ牸鐨勬瘡涓�琛岋紝闄や簡鏍囬琛�
+	   $('tr').each(function() {
+	     // 鑾峰彇瀹炵洏鏁伴噺鍗曞厓鏍肩殑鍊�
+	     var $cell = $(this).find('td:nth-child(5)');
+	     var quantity = $cell.text();
+	     // 鍒ゆ柇瀹炵洏鏁伴噺鏄惁涓�0
+	     if (quantity == "鏄�") {
+	       // 璁剧疆琛岀殑鑳屾櫙棰滆壊涓洪粍鑹�
+	       $(this).css('background-color', 'greenyellow');
+	     }else
+	 	{
+	 		$(this).css('background-color', 'beige');
+	 	}
+	   });
+	 });
+   }
+ };
+
+function GetInfoITEMNO() {
+	$.ajax({
+		url: app.API_URL_HEADER + "/WARBAB/GetInfoITEMNO",
+		
+		DataType: "json",
+		type: "post",
+		async: false,
+		data: {
+			DFA001:$("#DFA001").val(),
+		},
+		//timeout: 15000,
+		success: function(data) {
+		if (data.status == 0) {
+
+		  var selectElementD = document.getElementById('ITEMNO');
+		  selectElementD.innerHTML = "";
+
+		  matterTable = data.data.matterTable;
+							
+							var option = document.createElement("option");
+							option.value = "";
+							option.text = "璇烽�夋嫨鐗╂枡缂栫爜";
+							selectElementD.appendChild(option);
+							
+		  for (var i = 0; i < matterTable.length; i++) {
+		    var option = document.createElement("option");
+		    option.value = matterTable[i]["DFB005"];
+		    option.text = matterTable[i]["DFB005"];
+		    selectElementD.appendChild(option);
+		  }
+							
+		} else {
+							
+		  alert("鑾峰彇鏁版嵁寮傚父锛�" + data.message);
+		}
+					   
+		},
+		error: function(xhr, type, errorThrown) {
+			alert("鑾峰彇鏁版嵁寮傚父锛�" + JSON.stringify(errorThrown));
+		}
+	});
+
+}
+
+function CheckBarInfo(){
+
+	if($("#DFA001").val() == ""){
+		alert("璇烽�夋嫨鍙戣揣閫氱煡鍗�");
+		return ;
+	}
+	if($("#ITEMNO").val() == ""){
+		alert("璇烽�夋嫨鐗╂枡缂栫爜");
+		return ;
+	}
+	$.ajax({
+		url: app.API_URL_HEADER + "/WARBAB/CheckBarInfo",
+		
+		DataType: "json",
+		type: "post",
+		async: false,
+		data: {
+			DFA001:$("#DFA001").val(),
+			ITEMNO:$("#ITEMNO").val(),
+			DAB001:$("#DAB001").val(),
+		},
+		//timeout: 15000,
+		success: function(data) {
+			if(data.status == 1){
+				$("#DAB001").val("");
+				GetInfoBarcode();
+			}
+			else{
+				alert("鏍稿澶辫触" + data.message);
+				$("#DAB001").val("");
+			}			   
+		},
+		error: function(xhr, type, errorThrown) {
+			alert("鑾峰彇鏁版嵁寮傚父锛�" + JSON.stringify(errorThrown));
+		}
+	});
+	
+}
+
+/**
+ *  @param {鍑哄彂DOM鎺т欢锛歵his} e
+ */
+//function SetInputFoucs(codeID) {
+//	var itemTag = document.activeElement.tagName; //鑾峰彇鍏冪礌鐨勬爣绛惧悕
+//	var name = document.activeElement.name; //鑾峰彇鍏冪礌鐨勫悕绉�	
+//	//濡傛灉鎺т欢涓嶆槸鏂囨湰
+//	//濡傛灉鎺т欢鏄枃鏈�,Name闈炵┖鏃讹紙濡俢heckbox)
+//	//鏉$爜鑾峰彇鐒︾偣
+//	if ((itemTag != 'INPUT') ||
+//		(itemTag == 'INPUT' && name != '')) {
+//		$(codeID).focus();
+//	}
+//}
\ No newline at end of file

--
Gitblit v1.9.3