From 397dbf892f842c834af17a91c788c94fd96003f8 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期一, 29 五月 2023 19:13:31 +0800
Subject: [PATCH] 问题修改

---
 igds-app/js/admin/inout-in-record.js |   57 +++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 43 insertions(+), 14 deletions(-)

diff --git a/igds-app/js/admin/inout-in-record.js b/igds-app/js/admin/inout-in-record.js
index 36bb953..afe6967 100644
--- a/igds-app/js/admin/inout-in-record.js
+++ b/igds-app/js/admin/inout-in-record.js
@@ -20,7 +20,7 @@
 	url = user.url + "/api-phone/v35/gateway";
 	data.tokenAuth = user.tokenAuth;
 	data.data.deptId = selectDeptId;
-	
+
 	//鑾峰彇褰撳墠澶╂椂闂�
 	dateTime = getDate(new Date());
 	$("#dateTime").val(dateTime);
@@ -32,10 +32,10 @@
 //鏌ヨ鍏ュ簱璁板綍
 function getInRecordList() {
 	inRecordData = null;
-	
+
 	//璧嬪�煎弬鏁扮殑鏃ユ湡
 	data.data.dateTime = dateTime;
-
+	console.log(JSON.stringify(data), "inout-in-record")
 	//璇锋眰
 	mui.ajax(url, {
 		type: "POST",
@@ -48,14 +48,41 @@
 				inRecordData = result.data;
 				renderData();
 			} else {
+				
 				renderData();
-				mui.toast(result.mag);
+				mui.toast(result.msg);
+				console.log(JSON.stringify(result))
 			}
 		},
 		error: function() {
 			mui.alert("绯荤粺绻佸繖,璇烽噸璇曪紒", "鎻愮ず", ["纭畾"], function() {}, "div")
 		}
 	})
+	inRecordData = {
+		"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"
+			}
+		],
+	}
+	
 }
 
 //娓叉煋椤甸潰
@@ -63,10 +90,10 @@
 
 	var html = '';
 	var sumHtml = '0';
-	if(inRecordData){
+	if (inRecordData) {
 		sumHtml = inRecordData.sum;
-		
 		var inRecordList = inRecordData.listInout;
+		console.log(JSON.stringify(inRecordList))
 		if (inRecordList && inRecordList.length > 0) {
 			$.each(inRecordList, function(index, item) {
 				html += '<div class="item">';
@@ -77,15 +104,17 @@
 				html += '<li><div class="con" style="background-image: url(images/icons/g-i25.png);">';
 				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.foodVarietyName == null ? "" : item.foodVarietyName) + '</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 += '缁撶畻閲嶉噺:<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>';
 		}
-	}else{
+	} else {
 		html += '<div class="id" style="text-align: center;font-size: 20px;color:#dd524d">鎵�閫夋棩鏈熸殏鏃犲叆搴撹褰曚俊鎭�</div>';
 	}
 	$("#sum").html(sumHtml);
@@ -100,20 +129,21 @@
 	date = new Date(date);
 	dateTime = getDate(date);
 	$("#dateTime").val(dateTime);
-	
+
 	getInRecordList();
 }
 
 //閫夋嫨鏃ユ湡
 function chooseDate() {
 	var dtpicker = new mui.DtPicker({
-		type: "date" //璁剧疆鏃ュ巻鍒濆瑙嗗浘妯″紡 
+		type: "date" ,//璁剧疆鏃ュ巻鍒濆瑙嗗浘妯″紡 
+		value: dateTime
 	})
 	dtpicker.show(function(e) {
 		dateTime = e.value;
 		$("#dateTime").val(dateTime);
 	})
-	
+
 	getInRecordList();
 }
 
@@ -162,5 +192,4 @@
 	deceleration: 0.0006, //闃诲凹绯绘暟,绯绘暟瓒婂皬婊戝姩瓒婄伒鏁�
 	bounce: false, //鏄惁鍚敤鍥炲脊
 	deceleration: 0.0005 //flick 鍑忛�熺郴鏁帮紝绯绘暟瓒婂ぇ锛屾粴鍔ㄩ�熷害瓒婃參锛屾粴鍔ㄨ窛绂昏秺灏忥紝榛樿鍊�0.0006
-});
-
+});
\ No newline at end of file

--
Gitblit v1.9.3