From a24e6ad3dd99b50e29af6f74c57fa646bca86d43 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期四, 02 一月 2025 17:15:48 +0800
Subject: [PATCH] 提交配置

---
 igds-app/js/admin/inout-out-record.js |   54 +++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 41 insertions(+), 13 deletions(-)

diff --git a/igds-app/js/admin/inout-out-record.js b/igds-app/js/admin/inout-out-record.js
index 1c89ee5..c34aa0d 100644
--- a/igds-app/js/admin/inout-out-record.js
+++ b/igds-app/js/admin/inout-out-record.js
@@ -25,17 +25,17 @@
 	dateTime = getDate(new Date());
 	$("#dateTime").val(dateTime);
 
-	//鑾峰彇鍏ュ簱璁板綍
+	//鑾峰彇鍑哄簱璁板綍
 	getOutRecordList();
 }
 
-//鏌ヨ鍏ュ簱璁板綍
+//鏌ヨ鍑哄簱璁板綍
 function getOutRecordList() {
 	outRecordData = null;
 	
 	//璧嬪�煎弬鏁扮殑鏃ユ湡
 	data.data.dateTime = dateTime;
-
+	console.log(JSON.stringify(data.data), "inout-out-record")
 	//璇锋眰
 	mui.ajax(url, {
 		type: "POST",
@@ -45,27 +45,52 @@
 		data: JSON.stringify(data),
 		success: function(result) {
 			if (result.code == "0000") {
+				console.log(JSON.stringify(result))
 				outRecordData = result.data;
 				renderData();
 			} else {
-				renderData();
 				mui.toast(result.mag);
+				renderData();
+				
 			}
 		},
 		error: function() {
 			mui.alert("绯荤粺绻佸繖,璇烽噸璇曪紒", "鎻愮ず", ["纭畾"], function() {}, "div")
 		}
 	})
+	// outRecordData = {
+	// 	"sum": "55",
+	// 	"listInout": [{
+	// 			"id": "98",
+	// 			"plateNum": "39",
+	// 			"depotId": "83",
+	// 			"depotName": "鑳藉闄呮硶楂樼瓑",
+	// 			"foodVariety": "quis Ut",
+	// 			"foodVarietyName": "琚緳娴庢潵",
+	// 			"recordWeight": "25",
+	// 			"completeTime": "1971-10-20 14:45:38"
+	// 		},
+	// 		{
+	// 			"id": "37",
+	// 			"plateNum": "50",
+	// 			"depotId": "16",
+	// 			"depotName": "鍑嗘皯闈掑叡宸�",
+	// 			"foodVariety": "aliquip eiusmod laborum nulla",
+	// 			"foodVarietyName": "鍙疯蛋鏍瑰舰",
+	// 			"recordWeight": "30",
+	// 			"completeTime": "1971-04-09 06:42:06"
+	// 		}
+	// 	],
+	// }
 }
 
 //娓叉煋椤甸潰
 function renderData() {
-
 	var html = '';
 	var sumHtml = '0';
 	if(outRecordData){
 		sumHtml = outRecordData.sum;
-		
+		console.log()
 		var outRecordList = outRecordData.listInout;
 		if (outRecordList && outRecordList.length > 0) {
 			$.each(outRecordList, function(index, item) {
@@ -75,18 +100,18 @@
 				html += '<li><div class="con" style="background-image: url(images/icons/g-i24.png);">';
 				html += '杞︾墝鍙�:<b>' + (item.plateNum == null ? "" : item.plateNum) + '</b></div></li>';
 				html += '<li><div class="con" style="background-image: url(images/icons/g-i25.png);">';
-				html += '浠撳簱鍚嶇О:<b>' + (item.depotId == null ? "" : item.depotId) + '</b></div></li>';
+				html += '浠撳簱鍚嶇О:<b>' + (item.depotName == null ? "" : item.depotName) + '</b></div></li>';
 				html += '<li><div class="con" style="background-image: url(images/icons/g-i32.png);">';
-				html += '绮鍝佺:<b>' + (item.foodVariety == null ? "" : item.foodVariety) + '</b></div></li>';
+				html += '绮鍝佺:<b>' + (item.foodVarietyName == null ? "" : item.foodVarietyName) + '</b></div></li>';
 				html += '<li><div class="con" style="background-image: url(images/icons/g-i24.png);">';
 				html += '缁撶畻閲嶉噺:<span><em>' + (item.recordWeight == null ? "0" : item.recordWeight) + '</em>KG</span></div></li>';
 				html += '</ul><div class="time">瀹屾垚鏃堕棿锛�' + getStrDate(item.completeTime) + '</div></div>';
 			})
 		} else {
-			html += '<div class="id" style="text-align: center;font-size: 20px;color:#dd524d">鎵�閫夋棩鏈熸殏鏃犲叆搴撹褰曚俊鎭�</div>';
+			html += '<div class="id" style="text-align: center;font-size: 20px;color:#dd524d">鎵�閫夋棩鏈熸殏鏃犲嚭搴撹褰曚俊鎭�</div>';
 		}
 	}else{
-		html += '<div class="id" style="text-align: center;font-size: 20px;color:#dd524d">鎵�閫夋棩鏈熸殏鏃犲叆搴撹褰曚俊鎭�</div>';
+		html += '<div class="id" style="text-align: center;font-size: 20px;color:#dd524d">鎵�閫夋棩鏈熸殏鏃犲嚭搴撹褰曚俊鎭�</div>';
 	}
 	$("#sum").html(sumHtml);
 	$("#recordList").html(html);
@@ -107,14 +132,17 @@
 //閫夋嫨鏃ユ湡
 function chooseDate() {
 	var dtpicker = new mui.DtPicker({
-		type: "date" //璁剧疆鏃ュ巻鍒濆瑙嗗浘妯″紡 
+		type: "date" ,//璁剧疆鏃ュ巻鍒濆瑙嗗浘妯″紡 
+		value: dateTime
 	})
+	var time = dateTime
 	dtpicker.show(function(e) {
 		dateTime = e.value;
 		$("#dateTime").val(dateTime);
+		if(time != dateTime){
+			getOutRecordList();
+		}
 	})
-	
-	getOutRecordList();
 }
 
 //榛樿鑾峰彇褰撳墠鏃ユ湡(yyyy-MM-dd)

--
Gitblit v1.9.3