From b642a88b35271f37e411a603c29a57875111730c Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期一, 10 七月 2023 18:18:34 +0800
Subject: [PATCH] App读卡功能问题修改

---
 igds-app/js/admin/work-record.js |   52 ++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 42 insertions(+), 10 deletions(-)

diff --git a/igds-app/js/admin/work-record.js b/igds-app/js/admin/work-record.js
index de11e4c..acc668a 100644
--- a/igds-app/js/admin/work-record.js
+++ b/igds-app/js/admin/work-record.js
@@ -1,5 +1,6 @@
 var url = null;
 var recordList = null;
+var dateTime;
 //鐢宠璁板綍
 var data = {
 	"interfaceId": "5702",
@@ -15,8 +16,26 @@
 	var user = JSON.parse(localStorage.getItem('user'));
 	url = user.url + "/api-phone/v35/gateway";
 	data.tokenAuth = user.tokenAuth;
-	data.data.userName = user.userName;
+	data.data.userName = user.username;
+	console.log(JSON.stringify(data.data),"work-record")
+	dateTime = getDate(new Date());
 	getRecordList();
+}
+//鏃ユ湡鏍煎紡鍖杫yyy-MM-dd HH:mm
+function getDate(date) {
+	var year = date.getFullYear();
+	var month, day,hour,minute;
+	month = date.getMonth() + 1;
+	if (month > 0 && month <= 9) {
+		month = "0" + month;
+	}
+	day = date.getDate()
+	if (day > 0 && day <= 9) {
+		day = "0" + day
+	}
+	hour = date.getHours();
+	minute = date.getMinutes();
+	return year + "-" + month + "-" + day + " "+ hour + ":" + minute
 }
 
 //鑾峰彇鐢宠璁板綍鍒楄〃
@@ -34,7 +53,7 @@
 				renderRecordList();
 			} else {
 				renderRecordList();
-				mui.alert(result.msg, '鎻愮ず', ["纭畾"], function() {}, "div");
+				mui.toast(result.msg, '鎻愮ず', ["纭畾"], function() {}, "div");
 			}
 		},
 		error: function() {
@@ -48,14 +67,14 @@
 	var html = '';
 	if (recordList && recordList.length > 0) {
 		$.each(recordList, function(index, item) {
-			html += '<li><div class="con" info = "' + item.info + '"><span class="status">';
+			html += '<li><div class="con conInfo" info = "' + item.info + '"><span class="status">';
 			//宸插鏍�
 			if (item.status == '10') {
 				html += '<img src="images/icons/g-i29.png" alt=""></span>'
 			} else if (item.status == '20') { // 寰呭鏍�
 				html += '<img src="images/icons/g-i28.png" alt=""></span>'
 			}
-			html += '<div class="title">鎵�灞炲垎搴�:<b>' + item.deptName + '</b></div><div class="box"><ul class="gd-list">';
+			html += '<div class="title"><b></b></div><div class="box"><ul class="gd-list">';
 			html += '<li><a href="" class="con"style="background-image: url(images/icons/a-bg12.png);">';
 			html += '<div class="tit">涓氬姟绫诲瀷:</div><div class="name">' + item.type + '</div></a></li>';
 			html += '<li><a href="" class="con"style="background-image: url(images/icons/a-bg13.png);">';
@@ -64,22 +83,35 @@
 				item.endTime + '</span></p></div>';
 		})
 	} else {
-		html +=
-			'<li><div class="con"><div style="text-align: center;font-size: 20px;color:#dd524d;padding-top: 18px;">鏆傛棤鐢宠璁板綍淇℃伅</div></div></li>';
+		html += '<li><div class="con conInfo" info = "鏆傛棤鐢宠璁板綍"><span class="status">';
+		//宸插鏍�
+		html += '<img src="images/icons/g-i29.png" alt=""></span>'
+		html += '<div class="title"><b>鏆傛棤鐢宠璁板綍</b></div><div class="box"><ul class="gd-list">';
+		html += '<li><a href="" class="con"style="background-image: url(images/icons/a-bg12.png);">';
+		html += '<div class="tit">涓氬姟绫诲瀷:</div><div class="name">--</div></a></li>';
+		html += '<li><a href="" class="con"style="background-image: url(images/icons/a-bg13.png);">';
+		html += '<div class="tit">鍏宠仈浠撳簱:</div><div class="name">--</div></a></li></ul>';
+		html += '<div class="time"><p>鏈夋晥寮�濮嬫椂闂�: <span>' + dateTime + '</span></p><p>鏈夋晥缁撴潫鏃堕棿: <span>' + dateTime + '</span></p></div>';
 	}
 	$("#handleList").html(html);
-
 }
 
 //鏌ョ湅淇℃伅
-mui(".mui-scroll").on("tap",".wp ul li .con",function(){
+mui(".mui-scroll").on("tap", ".wp ul li .conInfo", function() {
 	var info = this.getAttribute("info");
-	mui.alert(info, '宸ュ崟鍐呭', ["纭畾"], function() {}, "div");
+	// mui.alert(info, '宸ュ崟鍐呭', ["纭畾"], function() {}, "div");
+	$("#textareaPop").val(info)
+	$('#m-pop').css('display', 'flex');
 	console.log("鏌ョ湅淇℃伅")
 })
 
+//鍏抽棴寮圭獥
+function closePop() {
+	$("#m-pop").css('display', 'none');
+}
+
 mui('.mui-scroll-wrapper').scroll({
-	indicators: false, //鏄惁鏄剧ず婊氬姩鏉�
+	indicators: true, //鏄惁鏄剧ず婊氬姩鏉�
 	deceleration: 0.0006, //闃诲凹绯绘暟,绯绘暟瓒婂皬婊戝姩瓒婄伒鏁�
 	bounce: false, //鏄惁鍚敤鍥炲脊
 	deceleration: 0.0005 //flick 鍑忛�熺郴鏁帮紝绯绘暟瓒婂ぇ锛屾粴鍔ㄩ�熷害瓒婃參锛屾粴鍔ㄨ窛绂昏秺灏忥紝榛樿鍊�0.0006

--
Gitblit v1.9.3