From 1bd6821c8ccc6861c74505bab0e8c52fe38f69f7 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期四, 15 六月 2023 19:36:57 +0800
Subject: [PATCH] 出入库调整

---
 igds-app/js/admin/inout-in-handle-list.js  |   88 ++------
 igds-app/inout-in-handle.html              |   11 +
 igds-app/inout-out-handle-list.html        |    4 
 igds-app/js/admin/inout-in-handle.js       |  162 ++++++---------
 igds-app/js/admin/inout-in-record.js       |    3 
 igds-app/js/admin/inout-out-handle.js      |  166 +++++++---------
 igds-app/js/admin/basic-depot.js           |    4 
 igds-app/js/admin/inout-out-handle-list.js |   62 -----
 igds-app/inout-in-handle-list.html         |    4 
 igds-app/inout-out-handle.html             |   37 ++-
 igds-app/js/admin/es-real-electric.js      |   15 
 11 files changed, 216 insertions(+), 340 deletions(-)

diff --git a/igds-app/inout-in-handle-list.html b/igds-app/inout-in-handle-list.html
index e5e82fd..13e0782 100644
--- a/igds-app/inout-in-handle-list.html
+++ b/igds-app/inout-in-handle-list.html
@@ -43,7 +43,7 @@
 									<div style="text-align: center;font-size: 20px;color:#dd524d;padding-top: 16px;">鏆傛棤鍏ュ簱寰呭�间粨淇℃伅</div>
 								</div>
 							</li> -->
-							<li>
+							<!-- <li>
 								<div class="con">
 									<div class="top">
 										<div class="info">杞︾墝鍙�: <b>璞獳123GM</b></div>
@@ -126,7 +126,7 @@
 										</div>
 									</div>
 								</div>
-							</li> 
+							</li> -->
 						</ul>
 					</div>
 				</div>
diff --git a/igds-app/inout-in-handle.html b/igds-app/inout-in-handle.html
index 66d88b1..aeee65f 100644
--- a/igds-app/inout-in-handle.html
+++ b/igds-app/inout-in-handle.html
@@ -96,7 +96,16 @@
 	<script src="./js/admin/inout-in-handle.js"></script>
 	<script type="text/javascript" charset="utf-8">
 		//mui鍒濆鍖�
-		mui.init();
+		mui.init({
+			beforeback: function() {
+				//鑾峰緱鐖堕〉闈㈢殑webview
+				var list = plus.webview.getWebviewById('inout-in-handle-list');
+				//瑙﹀彂鐖堕〉闈㈢殑鑷畾涔変簨浠�(refresh1),浠庤�岃繘琛屽埛鏂�
+				mui.fire(list, 'refresh2');
+				//杩斿洖true,缁х画椤甸潰鍏抽棴閫昏緫
+				return true;
+			}
+		});
 		mui.plusReady(function() {
 			//鏁版嵁鍒濆鍖�
 			init();
diff --git a/igds-app/inout-out-handle-list.html b/igds-app/inout-out-handle-list.html
index de94070..cd2219b 100644
--- a/igds-app/inout-out-handle-list.html
+++ b/igds-app/inout-out-handle-list.html
@@ -37,7 +37,7 @@
 				<div class="mui-scroll">
 					<div class="wp">
 						<ul class="ul-rkzc" id="handleList">
-							<li>
+							<!-- <li>
 								<div class="con">
 									<div class="top">
 										<div class="info">杞︾墝鍙�: <b>璞獳123GM</b></div>
@@ -149,7 +149,7 @@
 										</div>
 									</div>
 								</div>
-							</li>
+							</li>-->
 						</ul>
 					</div>
 				</div>
diff --git a/igds-app/inout-out-handle.html b/igds-app/inout-out-handle.html
index 28ead73..e84d3cc 100644
--- a/igds-app/inout-out-handle.html
+++ b/igds-app/inout-out-handle.html
@@ -1,11 +1,10 @@
 <!DOCTYPE html>
 <html>
-
 	<head>
 		<meta charset="utf-8">
 		<meta name="viewport"
 			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-		<title>鍑哄簱鍊间粨</title>
+		<title>鍏ュ簱鍊间粨</title>
 		<!-- MUI鏍峰紡 -->
 		<link rel="stylesheet" href="./css/mui.min.css" />
 		<!-- 鍏叡css -->
@@ -44,7 +43,7 @@
 								<div class="item">
 									<div class="tit"><b>娣诲姞鐓х墖</b></div>
 									<div class="m-files">
-										<div class="box" onclick="choosePic('1')" >
+										<div class="box" onclick="choosePic('1')">
 											<div class="con">
 												<label class="lab" id="boxImg1">
 													<div class="icon">
@@ -53,13 +52,12 @@
 													<div class="t">鎷嶇収涓婁紶</div>
 												</label>
 											</div>
-											
 										</div>
-										<div class="box" onclick="choosePic('2')" >
+										<div class="box" onclick="choosePic('2')">
 											<div class="con">
 												<label class="lab" id="boxImg2">
 													<div class="icon">
-														<img id="img2" src="images/icons/g-i23.png" alt="">
+														<img src="images/icons/g-i23.png" alt="">
 													</div>
 													<div class="t">鎷嶇収涓婁紶</div>
 												</label>
@@ -84,26 +82,35 @@
 					</div>
 				</div>
 			</div>
-
 			<div class="m-bot_btn">
 				<div class="box">
-					<button type="button" class="mui-btn  mui-btn-block bot-btn end" onclick="toHandle('end')">缁撴潫鍊间粨</button>
-					<button type="button" class="mui-btn  mui-btn-block bot-btn start" onclick="toHandle('start')">寮�濮嬪�间粨</button>
+					<button type="button" class="mui-btn  mui-btn-block bot-btn end"
+						onclick="toHandle('end')">缁撴潫鍊间粨</button>
+					<button type="button" class="mui-btn  mui-btn-block bot-btn start"
+						onclick="toHandle('start')">寮�濮嬪�间粨</button>
 				</div>
 			</div>
 		</div>
 	</body>
-	<script src="./js/mui.min.js"></script>
+	<script src="js/mui.min.js"></script>
 	<script src="./js/mui.picker.min.js"></script>
 	<script src="./js/jquery.js"></script>
-	<script src="js/admin/inout-out-handle.js"></script>
+	<script src="./js/admin/inout-out-handle.js"></script>
 	<script type="text/javascript" charset="utf-8">
 		//mui鍒濆鍖�
-		mui.init();
-		
-		mui.plusReady(function(){
+		mui.init({
+			beforeback: function() {
+				//鑾峰緱鐖堕〉闈㈢殑webview
+				var list = plus.webview.getWebviewById('inout-out-handle-list');
+				//瑙﹀彂鐖堕〉闈㈢殑鑷畾涔変簨浠�(refresh1),浠庤�岃繘琛屽埛鏂�
+				mui.fire(list, 'refresh1');
+				//杩斿洖true,缁х画椤甸潰鍏抽棴閫昏緫
+				return true;
+			}
+		});
+		mui.plusReady(function() {
 			//鏁版嵁鍒濆鍖�
 			init();
 		})
 	</script>
-</html>
+</html>
\ No newline at end of file
diff --git a/igds-app/js/admin/basic-depot.js b/igds-app/js/admin/basic-depot.js
index 374078d..989f47c 100644
--- a/igds-app/js/admin/basic-depot.js
+++ b/igds-app/js/admin/basic-depot.js
@@ -58,7 +58,7 @@
 			html += '<div class="box"><div class="group state"><div class="desc">';
 			html += (item.depotStatusName == null?"--":item.depotStatusName) + '</div><div class="ort">浠撳簱鐘舵��</div></div></div>';
 			html += '<div class="box"><div class="group weight"><div class="desc">';
-			html += (item.storageReal == null?"--":item.storageReal) + '<span class="w"> KG</span></div><div class="ort">瀹為檯鍌ㄩ噺</div></div></div></div>';
+			html += (item.storageReal == null?"--":item.storageReal) + '</div><div class="ort">瀹為檯鍌ㄩ噺(KG)</div></div></div></div>';
 			html += '<div class="edit"><div class="sel"><div class="name">绮鍝佺</div>';
 			html += '<div class="cont">' + (item.foodVarietyName == null?"--":item.foodVarietyName) + '</div></div>';
 			html += '<div class="peo"><div class="name">淇濈鍛�</div>';
@@ -73,7 +73,7 @@
 		html += '<div class="box"><div class="group state"><div class="desc">';
 		html += '--</div><div class="ort">浠撳簱鐘舵��</div></div></div>';
 		html += '<div class="box"><div class="group weight"><div class="desc">';
-		html += '--<span class="w"> KG</span></div><div class="ort">瀹為檯鍌ㄩ噺</div></div></div></div>';
+		html += '--</div><div class="ort">瀹為檯鍌ㄩ噺(KG)</div></div></div></div>';
 		html += '<div class="edit"><div class="sel"><div class="name">绮鍝佺</div>';
 		html += '<div class="cont">--</div></div>';
 		html += '<div class="peo"><div class="name">淇濈鍛�</div>';
diff --git a/igds-app/js/admin/es-real-electric.js b/igds-app/js/admin/es-real-electric.js
index 07cdfc3..93b3a57 100644
--- a/igds-app/js/admin/es-real-electric.js
+++ b/igds-app/js/admin/es-real-electric.js
@@ -137,19 +137,18 @@
 				html += '<span class="bg" style="background-image: url(images/d3.png);"></span>'
 			}
 			html += '<span>' + item.depotName + '</span></div></div>';
-			html += '<div class="inner"><div class="info">鏇存柊鏃堕棿: <span style="font-size:15px">' + item
-				.updateTime + '</span></div>';
-			html += '<div class="txt"><div class="num">' + item.ua +
+			html += '<div class="inner"><div class="info">鏇存柊鏃堕棿: <span style="font-size:15px">' + (item.updateTime == null || item.updateTime == "" ? dateTime : item.updateTime) + '</span></div>';
+			html += '<div class="txt"><div class="num">' + (item.ua == null || item.ua == "" ? "0" : item.ua)  +
 				' <span> V</span></div><div class="desc">A鐩哥數鍘�</div></div>';
-			html += '<div class="txt"><div class="num">' + item.ub +
+			html += '<div class="txt"><div class="num">' + (item.ub == null || item.ub == "" ? "0" : item.ub) +
 				' <span> V</span></div><div class="desc">B鐩哥數鍘�</div></div>';
-			html += '<div class="txt"><div class="num">' + item.uc +
+			html += '<div class="txt"><div class="num">' + (item.uc == null || item.uc == "" ? "0" : item.uc) +
 				' <span> V</span></div><div class="desc">B鐩哥數鍘�</div></div>';
-			html += '<div class="txt"><div class="num">' + item.ia +
+			html += '<div class="txt"><div class="num">' + (item.ia == null || item.ib == "" ? "0" : item.ib) +
 				' <span> V</span></div><div class="desc">A鐩哥數娴�</div></div>';
-			html += '<div class="txt"><div class="num">' + item.ib +
+			html += '<div class="txt"><div class="num">' + (item.ib == null || item.ic == "" ? "0" : item.ic) +
 				' <span> V</span></div><div class="desc">B鐩哥數娴�</div></div>';
-			html += '<div class="txt"><div class="num">' + item.ic +
+			html += '<div class="txt"><div class="num">' + (item.ic == null || item.ic == "" ? "0" : item.ic) +
 				' <span> V</span></div><div class="desc">C鐩哥數娴�</div></div>';
 			html += '</div></div></li>'
 		})
diff --git a/igds-app/js/admin/inout-in-handle-list.js b/igds-app/js/admin/inout-in-handle-list.js
index 5dc5649..7d327fd 100644
--- a/igds-app/js/admin/inout-in-handle-list.js
+++ b/igds-app/js/admin/inout-in-handle-list.js
@@ -32,15 +32,18 @@
 	data.tokenAuth = user.tokenAuth;
 	data1.tokenAuth = user.tokenAuth;
 	data.data.deptId = selectDeptId;
-	
+
 	//鑾峰彇鍏ュ簱寰呭�间粨鍒楄〃
 	getInHandleList();
 }
+window.addEventListener('refresh2', function(e){//鎵ц鍒锋柊
+    getInHandleList();
+});
 
 //鏌ヨ鍏ュ簱璁板綍
 function getInHandleList() {
 	inHandleData = null;
-	
+
 	//鏌ヨ鐨勮溅鐗屽彿
 	data.data.plateNum = mui("#plateNum")[0].value;
 
@@ -55,7 +58,6 @@
 			if (result.code == "0000") {
 				inHandleData = result.data;
 				renderData();
-				mui.toast(result.msg);
 			} else {
 				renderData();
 				mui.toast(result.msg);
@@ -65,56 +67,6 @@
 			mui.alert("绯荤粺绻佸繖,璇烽噸璇曪紒", "鎻愮ず", ["纭畾"], function() {}, "div")
 		}
 	})
-
-	// inHandleData = [{
-	// 		"id": "44",
-	// 		"plateNum": "97",
-	// 		"deHandle": "ut",
-	// 		"depotId": "16",
-	// 		"depotName": "闈掑紶鍒楀仛鎬�",
-	// 		"foodVariety": "magna pariatur laboris sunt dolor",
-	// 		"foodVarietyName": "鎻愭竻闄�",
-	// 		"foodLevel": "fugiat",
-	// 		"foodLevelName": "搴斿彂鐑洓姘戞槸濮�",
-	// 		"storeKeeperName": ""
-	// 	},
-	// 	{
-	// 		"id": "62",
-	// 		"plateNum": "71",
-	// 		"deHandle": "dolore ut non",
-	// 		"depotId": "79",
-	// 		"depotName": "澧炶薄瀹氱珛鏍�",
-	// 		"foodVariety": "Lorem est",
-	// 		"foodVarietyName": "甯傛潯缇ゆ眰琚洟涓�",
-	// 		"foodLevel": "ex labore",
-	// 		"foodLevelName": "鎸佸湪鍐欑О鎯呭苟",
-	// 		"storeKeeperName": "2"
-	// 	},
-	// 	{
-	// 		"id": "96",
-	// 		"plateNum": "61",
-	// 		"deHandle": "nulla magna ut proident cillum",
-	// 		"depotId": "42",
-	// 		"depotName": "鏉″叏浠�",
-	// 		"foodVariety": "aliquip",
-	// 		"foodVarietyName": "杩炲紑闃跺姩闄呭共",
-	// 		"foodLevel": "in id sunt",
-	// 		"foodLevelName": "娌$疆瀹氫娇鏂�",
-	// 		"storeKeeperName": "3"
-	// 	},
-	// 	{
-	// 		"id": "61",
-	// 		"plateNum": "17",
-	// 		"deHandle": "commodo",
-	// 		"depotId": "80",
-	// 		"depotName": "灞曡蹇伀鍏ㄩ",
-	// 		"foodVariety": "voluptate eu Lorem",
-	// 		"foodVarietyName": "浠栬竟娲炬柉閲嶇",
-	// 		"foodLevel": "dolor",
-	// 		"foodLevelName": "瑁呯涓�",
-	// 		"storeKeeperName": "4"
-	// 	}
-	// ]
 }
 
 //娓叉煋椤甸潰
@@ -123,23 +75,28 @@
 	if (inHandleData && inHandleData.length > 0) {
 		$.each(inHandleData, function(index, item) {
 			html += '<li><div class="con"><div class="top">';
-			html += '<div class="info">杞︾墝鍙�: <b>' + (item.plateNum == null ? "" : item.plateNum) +'</b></div>';
-			html += '<a href="" id = "' + item.id + '" plateNum = "' + item.plateNum + '" depotName = "' + item.depotName + '" storeKeeperName = "' + (item.storeKeeperName == "" || item
-					.storeKeeperName == "" ? '--' : item.storeKeeperName) + '" class="link">鍊间粨<span class="mui-icon mui-icon-arrowright"></span></a>';
+			html += '<div class="info">杞︾墝鍙�: <b>' + (item.plateNum == null ? "" : item.plateNum) + '</b></div>';
+			html += '<a href="" id = "' + item.id + '" plateNum = "' + item.plateNum + '" depotName = "' + (item.depotName == null ? "" : item.depotName) + 
+					'" storeKeeperName = "' + (item.storeKeeperName == null ? '' : item.storeKeeperName) +
+				'" class="link">鍊间粨<span class="mui-icon mui-icon-arrowright"></span></a>';
 			html += '</div><div class="box">';
-			html += '<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i19.png);">';
+			html +=
+				'<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i19.png);">';
 			html += '<div class="h3">' + (item.depotName == null ? "" : item.depotName) + '</div>';
 			html += '<div class="bot">鐩爣浠撳簱</div></div></div>';
-			html += '<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i20.png);">';
+			html +=
+				'<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i20.png);">';
 			html += '<div class="h3">' + (item.foodVarietyName == null ? "" : item.foodVarietyName) + '</div>';
 			html += '<div class="bot">绮鍝佺</div></div></div>';
-			html += '<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i21.png);">';
+			html +=
+				'<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i21.png);">';
 			html += '<div class="h3">' + (item.foodLevelName == null ? "" : item.foodLevelName) + '</div>';
 			html += '<div class="bot">绮绛夌骇</div></div></div>';
 			html += '</div></div></li>';
 		})
 	} 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"><div style="text-align: center;font-size: 20px;color:#dd524d;padding-top: 18px;">鏆傛棤鍏ュ簱寰呭�间粨淇℃伅</div></div></li>';
 	}
 	$("#handleList").html(html);
 }
@@ -150,12 +107,12 @@
 	var depotName = this.getAttribute("depotName")
 	var plateNum = this.getAttribute("plateNum")
 	var storeKeeperName = this.getAttribute("storeKeeperName")
-	
+console.log(JSON.stringify(storeKeeperName))
 	var picker = new mui.PopPicker();
 	picker.setData([{
 		value: "photo",
 		text: "鐜板満鍊间粨"
-		
+
 	}, {
 		value: "snap",
 		text: "杩滅▼鍊间粨"
@@ -164,7 +121,7 @@
 	picker.show(function(SelectedItem) {
 		console.log(JSON.stringify(SelectedItem));
 		//鐜板満鍊间粨
-		if(SelectedItem[0].value == 'photo'){
+		if (SelectedItem[0].value == 'photo') {
 			mui.openWindow({
 				url: "inout-in-handle.html",
 				id: "inout-in-handle",
@@ -177,7 +134,7 @@
 					}
 				}
 			})
-		}else{ //杩滅▼鍊间粨
+		} else { //杩滅▼鍊间粨
 			mui.openWindow({
 				url: "inout-in-handle.html",
 				id: "inout-in-handle",
@@ -328,7 +285,8 @@
 			if (result.code == "0000") {
 				//寮圭獥淇℃伅锛氬崟瀛愯溅鐗岃窡浠撳簱锛屽幓鍊间粨鍒欒繘鍏ュ�间粨椤甸潰锛屼紶閫掑崟瀛恑d锛�
 				var btnArray = ["鍘诲�间粨", "鍙栨秷"];
-				var text = '鍊间粨浠撳簱:' + result.data.depotName + '<br/>杞︾墝鍙凤細' + result.data.plateNum + '<br/>淇濈鍛橈細' + result.data.plateNum
+				var text = '鍊间粨浠撳簱:' + result.data.depotName + '<br/>杞︾墝鍙凤細' + result.data.plateNum +
+					'<br/>淇濈鍛橈細' + result.data.plateNum
 				mui.confirm(text, "妫�娴嬪埌寰呭�间粨淇℃伅濡備笅", btnArray, function(e) {
 					if (e.index == 0) {
 						//鍏堝垽鏂崟瀛愭槸鍚﹀湪鍊间粨鐘舵��
diff --git a/igds-app/js/admin/inout-in-handle.js b/igds-app/js/admin/inout-in-handle.js
index 2ddc4cc..4d9aaca 100644
--- a/igds-app/js/admin/inout-in-handle.js
+++ b/igds-app/js/admin/inout-in-handle.js
@@ -30,7 +30,8 @@
 		"fileName2": "",
 		"deHandle": "",
 		"lon": "",
-		"lat": ""
+		"lat": "",
+		"handleUser": ""
 	}
 }
 
@@ -44,10 +45,13 @@
 	uploadUrl = user.url + "/api-phone/v35/upload-img";
 	data.tokenAuth = user.tokenAuth;
 	data1.tokenAuth = user.tokenAuth;
+	data1.data.handleUser = user.cname;
 	//鑾峰彇浠庝笂涓�涓〉闈紶閫掔殑鏁版嵁
 	var self = plus.webview.currentWebview();
 	depotData = self.data;
 	data.data.id = depotData.serialNumber;
+	data1.data.id = depotData.serialNumber;
+	console.log(JSON.stringify(depotData))
 	// data.data.intelCard = depotData.intelCard;
 	$("#plateNum").html(depotData.plateNum);
 	$("#depotName").html(depotData.depotName);
@@ -70,27 +74,22 @@
 					//鍒ゆ柇璇ュ�间粨鏄惁澶勪簬鍦ㄥ�间粨鐘舵��
 					if (result.data.progress == 'HANDLE') {
 						//鍒ゆ柇鍗曞瓙鏄惁宸茬粡寮�濮嬭繘琛屽�间粨
-						if (result.data.handelStart == null) {
-							//鍙戦�佽姹傦紝寮�濮嬪�间粨
-							mui.ajax(url, {
-								type: "POST",
-								dataType: "json",
-								crossDomain: true,
-								contentType: "application/json;charset=utf-8",
-								data: JSON.stringify(data1),
-								success: function(result) {
-									mui.toast("寮�濮嬭绮紝璇蜂笂浼犲浘鐗囷紒");
-									//閲嶆柊璇锋眰鑾峰彇鍗曞瓙璇︽儏骞舵覆鏌�
-									getDetail();
-								},
-								error: function() {
-									mui.alert('寮�濮嬭绮彁浜ゅけ璐ワ紝璇烽噸鏂版搷浣滐紒', '鎻愮ず', ["纭畾"], function() {},
-										"div");
-								}
-							})
-						} else {
-							mui.toast("宸插紑濮嬭绮紒");
-						}
+
+						//鍙戦�佽姹傦紝寮�濮嬪�间粨
+						mui.ajax(url, {
+							type: "POST",
+							dataType: "json",
+							crossDomain: true,
+							contentType: "application/json;charset=utf-8",
+							data: JSON.stringify(data1),
+							success: function(result) {
+								mui.toast("寮�濮嬭绮紝璇蜂笂浼犲浘鐗囷紒");
+							},
+							error: function() {
+								mui.alert('寮�濮嬭绮彁浜ゅけ璐ワ紝璇烽噸鏂版搷浣滐紒', '鎻愮ず', ["纭畾"], function() {},
+									"div");
+							}
+						})
 					} else {
 						//濡傛灉涓嶅湪鍊间粨鐘舵�侊紝缁欏嚭鎻愮ず淇℃伅锛屼笉杩涜鎻愪氦
 						mui.alert("璇ュ崟瀛愪笉鍦ㄥ�间粨鐘舵�侊紝涓嶈兘杩涜鍊间粨锛�", '鎻愮ず', ["纭畾"], function() {}, "div");
@@ -104,6 +103,7 @@
 			}
 		})
 	} else { //缁撴潫鍊间粨
+		data1.data.type = tag;
 		mui.ajax(url, {
 			type: "POST",
 			dataType: "json",
@@ -114,40 +114,37 @@
 				if (result.code == '0000') {
 					//鍒ゆ柇璇ュ�间粨鏄惁澶勪簬鍦ㄥ�间粨鐘舵��
 					if (result.data.progress == 'HANDLE') {
-						//鍒ゆ柇鍗曞瓙鏄惁宸茬粡寮�濮嬭繘琛屽�间粨
-						if (result.data.handelStart) {
-							deHandle = $("#number")[0].value;
-							if (fileName1 == null || fileName2 == null) {
-								mui.toast("璇峰厛涓婁紶鍥剧墖锛�");
-							} else {
-								if (deHandle) {
-									data1.data.type = tag;
-									data1.data.fileName1 = fileName1;
-									data1.data.fileName2 = fileName2;
-									data1.data.deHandle = deHandle;
-									mui.ajax(url, {
-										type: "POST",
-										dataType: "json",
-										crossDomain: true,
-										contentType: "application/json;charset=utf-8",
-										data: JSON.stringify(data1),
-										success: function(result) {
-											mui.toast("鍊间粨瀹屾垚锛�");
-											//杩斿洖涓婁竴椤�
-											mui.back();
-										},
-										error: function(result) {
-											mui.alert(result.msg, '鎻愮ず', ["纭畾"], function() {},
-												"div");
-										}
-									})
-								} else {
-									mui.toast("璇峰厛濉啓鍊间粨鎵i噸");
-								}
-							}
+						deHandle = $("#number")[0].value;
+						if (fileName1 == null || fileName2 == null) {
+							mui.toast("璇峰厛涓婁紶鍥剧墖锛�");
 						} else {
-							mui.toast("璇峰厛鐐瑰嚮寮�濮嬭绮紝骞朵笂浼犲浘鐗囷紒");
+							if (deHandle) {
+								data1.data.type = tag;
+								data1.data.fileName1 = fileName1;
+								data1.data.fileName2 = fileName2;
+								data1.data.deHandle = deHandle;
+								mui.ajax(url, {
+									type: "POST",
+									dataType: "json",
+									crossDomain: true,
+									contentType: "application/json;charset=utf-8",
+									data: JSON.stringify(data1),
+									success: function(result) {
+										// mui.toast("鍊间粨瀹屾垚锛�");
+										mui.toast(result.msg)
+										//杩斿洖涓婁竴椤�
+										mui.back();
+									},
+									error: function(result) {
+										mui.alert(result.msg, '鎻愮ず', ["纭畾"], function() {},
+											"div");
+									}
+								})
+							} else {
+								mui.toast("璇峰厛濉啓鍊间粨鎵i噸");
+							}
 						}
+
 					} else {
 						//濡傛灉涓嶅湪鍊间粨鐘舵�侊紝缁欏嚭鎻愮ず淇℃伅锛屼笉杩涜鎻愪氦
 						mui.alert("璇ュ崟瀛愪笉鍦ㄥ�间粨鐘舵�侊紝涓嶈兘杩涜鍊间粨锛�", '鎻愮ず', ["纭畾"], function() {}, "div");
@@ -166,25 +163,6 @@
 }
 //鎷嶇収涓婁紶
 function choosePic(typeNum) {
-	var picker = new mui.PopPicker();
-	picker.setData([{
-		value: "cameraImg",
-		text: "鎷嶇収涓婁紶"
-	}, {
-		value: "galleryImg",
-		text: "浠庣浉鍐岄�夋嫨"
-	}])
-	picker.show(function(SelectedItem) {
-		console.log(JSON.stringify(SelectedItem[0].value));
-		console.log()
-		if (SelectedItem[0].value == 'cameraImg') {
-			console.log("鎷嶇収")
-			cameraImg(typeNum);
-		} else {
-			console.log("鐩稿唽")
-			galleryImg(typeNum);
-		}
-	})
 	// //鑾峰彇瀹氫綅淇℃伅
 	// if (latitude == null || longitude == null) {
 	// 	return;
@@ -198,26 +176,22 @@
 		data: JSON.stringify(data),
 		success: function(result) {
 			if (result.code == '0000') {
-				if (result.data.handleStart != null) {
-					var picker = new mui.PopPicker();
-					picker.setData([{
-						value: "cameraImg",
-						text: "鎷嶇収涓婁紶"
-					}, {
-						value: "galleryImg",
-						text: "浠庣浉鍐岄�夋嫨"
-					}])
-					picker.show(function(SelectedItem) {
-						console.log(JSON.stringify(SelectedItem));
-						if (SelectedItem[0].value == 'cameraImg') {
-							cameraImg(typeNum);
-						} else {
-							galleryImg(typeNum);
-						}
-					})
-				} else {
-					mui.toast("璇峰厛鐐瑰嚮寮�濮嬭绮紒");
-				}
+				var picker = new mui.PopPicker();
+				picker.setData([{
+					value: "cameraImg",
+					text: "鎷嶇収涓婁紶"
+				}, {
+					value: "galleryImg",
+					text: "浠庣浉鍐岄�夋嫨"
+				}])
+				picker.show(function(SelectedItem) {
+					console.log(JSON.stringify(SelectedItem));
+					if (SelectedItem[0].value == 'cameraImg') {
+						cameraImg(typeNum);
+					} else {
+						galleryImg(typeNum);
+					}
+				})
 			} else {
 				mui.alert(result.msg, '鎻愮ず', ["纭畾"], function() {}, "div");
 			}
@@ -226,7 +200,7 @@
 			mui.alert('绯荤粺绻佸繖,璇烽噸璇曪紒', '鎻愮ず', ["纭畾"], function() {}, "div");
 		}
 	})
-	
+
 };
 
 //鐩告満鎷嶇収
diff --git a/igds-app/js/admin/inout-in-record.js b/igds-app/js/admin/inout-in-record.js
index 582ed31..283d619 100644
--- a/igds-app/js/admin/inout-in-record.js
+++ b/igds-app/js/admin/inout-in-record.js
@@ -50,7 +50,6 @@
 			} else {
 				renderData();
 				mui.toast(result.msg);
-				console.log(JSON.stringify(result))
 			}
 		},
 		error: function() {
@@ -93,7 +92,7 @@
 	if (inRecordData) {
 		sumHtml = inRecordData.sum;
 		var inRecordList = inRecordData.listInout;
-		console.log(JSON.stringify(inRecordList))
+		// console.log(JSON.stringify(inRecordList))
 		if (inRecordList && inRecordList.length > 0) {
 			$.each(inRecordList, function(index, item) {
 				html += '<div class="item">';
diff --git a/igds-app/js/admin/inout-out-handle-list.js b/igds-app/js/admin/inout-out-handle-list.js
index 7d0eb95..387cc5a 100644
--- a/igds-app/js/admin/inout-out-handle-list.js
+++ b/igds-app/js/admin/inout-out-handle-list.js
@@ -33,7 +33,9 @@
 	data.data.deptId = selectDeptId;
 	getInHandleList();
 }
-
+window.addEventListener('refresh1', function(e){//鎵ц鍒锋柊
+    getInHandleList();
+});
 //鏌ヨ鍑哄簱璁板綍
 function getInHandleList() {
 	outHandleData = null;
@@ -49,7 +51,7 @@
 		success: function(result) {
 			if (result.code == "0000") {
 				outHandleData = result.data;
-				console.log("if", JSON.stringify(result))
+				// console.log("if", JSON.stringify(result))
 				renderData();
 			} else {
 				renderData();
@@ -61,67 +63,17 @@
 			mui.alert("绯荤粺绻佸繖,璇烽噸璇曪紒", "鎻愮ず", ["纭畾"], function() {}, "div")
 		}
 	})
-	// outHandleData = [{
-	// 		"id": "44",
-	// 		"plateNum": "97",
-	// 		"deHandle": "ut",
-	// 		"depotId": "16",
-	// 		"depotName": "闈掑紶鍒楀仛鎬�",
-	// 		"foodVariety": "magna pariatur laboris sunt dolor",
-	// 		"foodVarietyName": "鎻愭竻闄�",
-	// 		"foodLevel": "fugiat",
-	// 		"foodLevelName": "搴斿彂鐑洓姘戞槸濮�",
-	// 		"storeKeeperName": ""
-	// 	},
-	// 	{
-	// 		"id": "62",
-	// 		"plateNum": "71",
-	// 		"deHandle": "dolore ut non",
-	// 		"depotId": "79",
-	// 		"depotName": "澧炶薄瀹氱珛鏍�",
-	// 		"foodVariety": "Lorem est",
-	// 		"foodVarietyName": "甯傛潯缇ゆ眰琚洟涓�",
-	// 		"foodLevel": "ex labore",
-	// 		"foodLevelName": "鎸佸湪鍐欑О鎯呭苟",
-	// 		"storeKeeperName": "2"
-	// 	},
-	// 	{
-	// 		"id": "96",
-	// 		"plateNum": "61",
-	// 		"deHandle": "nulla magna ut proident cillum",
-	// 		"depotId": "42",
-	// 		"depotName": "鏉″叏浠�",
-	// 		"foodVariety": "aliquip",
-	// 		"foodVarietyName": "杩炲紑闃跺姩闄呭共",
-	// 		"foodLevel": "in id sunt",
-	// 		"foodLevelName": "娌$疆瀹氫娇鏂�",
-	// 		"storeKeeperName": "3"
-	// 	},
-	// 	{
-	// 		"id": "61",
-	// 		"plateNum": "17",
-	// 		"deHandle": "commodo",
-	// 		"depotId": "80",
-	// 		"depotName": "灞曡蹇伀鍏ㄩ",
-	// 		"foodVariety": "voluptate eu Lorem",
-	// 		"foodVarietyName": "浠栬竟娲炬柉閲嶇",
-	// 		"foodLevel": "dolor",
-	// 		"foodLevelName": "瑁呯涓�",
-	// 		"storeKeeperName": "4"
-	// 	}
-	// ]
-	renderData();
 }
-
 //娓叉煋椤甸潰
 function renderData() {
 	var html = '';
 	if (outHandleData && outHandleData.length > 0) {
 		$.each(outHandleData, function(index, item) {
+			// console.log(JSON.stringify(item.depotName))
 			html += '<li><div class="con"><div class="top">';
 			html += '<div class="info">杞︾墝鍙�: <b>' + (item.plateNum == null ? "" : item.plateNum) + '</b></div>';
-			html += '<a href="" id = "' + item.id + '" plateNum = "' + item.plateNum + '" depotName = "' + item.depotName + '" storeKeeperName = "' + 
-			(item.storeKeeperName == "" || item.storeKeeperName == "" ? '--' : item.storeKeeperName) + '" class="link">鍊间粨<span class="mui-icon mui-icon-arrowright"></span></a>';
+			html += '<a href="" id = "' + item.id + '" plateNum = "' + item.plateNum + '" depotName = "' + (item.depotName == null ? "" : item.depotName) + '" storeKeeperName = "' + 
+			(item.storeKeeperName == null || item.storeKeeperName == "" ? '--' : item.storeKeeperName) + '" class="link">鍊间粨<span class="mui-icon mui-icon-arrowright"></span></a>';
 			html += '</div><div class="box">';
 			html += '<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i19.png);">';
 			html += '<div class="h3">' + (item.depotName == null ? "" : item.depotName) + '</div>';
diff --git a/igds-app/js/admin/inout-out-handle.js b/igds-app/js/admin/inout-out-handle.js
index 05f97b2..d46e298 100644
--- a/igds-app/js/admin/inout-out-handle.js
+++ b/igds-app/js/admin/inout-out-handle.js
@@ -30,7 +30,8 @@
 		"fileName2": "",
 		"deHandle": "",
 		"lon": "",
-		"lat": ""
+		"lat": "",
+		"handleUser": ""
 	}
 }
 
@@ -44,14 +45,18 @@
 	uploadUrl = user.url + "/api-phone/v35/upload-img";
 	data.tokenAuth = user.tokenAuth;
 	data1.tokenAuth = user.tokenAuth;
+	data1.data.handleUser = user.cname;
 	//鑾峰彇浠庝笂涓�涓〉闈紶閫掔殑鏁版嵁
 	var self = plus.webview.currentWebview();
 	depotData = self.data;
 	data.data.id = depotData.serialNumber;
-	data.data.intelCard = depotData.intelCard;
+	data1.data.id = depotData.serialNumber;
+	console.log(JSON.stringify(depotData))
+	// data.data.intelCard = depotData.intelCard;
 	$("#plateNum").html(depotData.plateNum);
 	$("#depotName").html(depotData.depotName);
 	$("#storeKeeperName").html(depotData.storeKeeperName);
+
 }
 
 function toHandle(tag) {
@@ -69,27 +74,22 @@
 					//鍒ゆ柇璇ュ�间粨鏄惁澶勪簬鍦ㄥ�间粨鐘舵��
 					if (result.data.progress == 'HANDLE') {
 						//鍒ゆ柇鍗曞瓙鏄惁宸茬粡寮�濮嬭繘琛屽�间粨
-						if (result.data.handelStart == null) {
-							//鍙戦�佽姹傦紝寮�濮嬪�间粨
-							mui.ajax(url, {
-								type: "POST",
-								dataType: "json",
-								crossDomain: true,
-								contentType: "application/json;charset=utf-8",
-								data: JSON.stringify(data1),
-								success: function(result) {
-									mui.toast("寮�濮嬭绮紝璇蜂笂浼犲浘鐗囷紒");
-									//閲嶆柊璇锋眰鑾峰彇鍗曞瓙璇︽儏骞舵覆鏌�
-									getDetail();
-								},
-								error: function() {
-									mui.alert('寮�濮嬭绮彁浜ゅけ璐ワ紝璇烽噸鏂版搷浣滐紒', '鎻愮ず', ["纭畾"], function() {},
-										"div");
-								}
-							})
-						} else {
-							mui.toast("宸插紑濮嬭绮紒");
-						}
+
+						//鍙戦�佽姹傦紝寮�濮嬪�间粨
+						mui.ajax(url, {
+							type: "POST",
+							dataType: "json",
+							crossDomain: true,
+							contentType: "application/json;charset=utf-8",
+							data: JSON.stringify(data1),
+							success: function(result) {
+								mui.toast("寮�濮嬭绮紝璇蜂笂浼犲浘鐗囷紒");
+							},
+							error: function() {
+								mui.alert('寮�濮嬭绮彁浜ゅけ璐ワ紝璇烽噸鏂版搷浣滐紒', '鎻愮ず', ["纭畾"], function() {},
+									"div");
+							}
+						})
 					} else {
 						//濡傛灉涓嶅湪鍊间粨鐘舵�侊紝缁欏嚭鎻愮ず淇℃伅锛屼笉杩涜鎻愪氦
 						mui.alert("璇ュ崟瀛愪笉鍦ㄥ�间粨鐘舵�侊紝涓嶈兘杩涜鍊间粨锛�", '鎻愮ず', ["纭畾"], function() {}, "div");
@@ -103,6 +103,7 @@
 			}
 		})
 	} else { //缁撴潫鍊间粨
+		data1.data.type = tag;
 		mui.ajax(url, {
 			type: "POST",
 			dataType: "json",
@@ -113,40 +114,38 @@
 				if (result.code == '0000') {
 					//鍒ゆ柇璇ュ�间粨鏄惁澶勪簬鍦ㄥ�间粨鐘舵��
 					if (result.data.progress == 'HANDLE') {
-						//鍒ゆ柇鍗曞瓙鏄惁宸茬粡寮�濮嬭繘琛屽�间粨
-						if (result.data.handelStart) {
-							deHandle = $("#number")[0].value;
-							if (fileName1 == null || fileName2 == null) {
-								mui.toast("璇峰厛涓婁紶鍥剧墖锛�");
-							} else {
-								if (deHandle) {
-									data1.data.type = tag;
-									data1.data.fileName1 = fileName1;
-									data1.data.fileName2 = fileName2;
-									data1.data.deHandle = deHandle;
-									mui.ajax(url, {
-										type: "POST",
-										dataType: "json",
-										crossDomain: true,
-										contentType: "application/json;charset=utf-8",
-										data: JSON.stringify(data1),
-										success: function(result) {
-											mui.toast("鍊间粨瀹屾垚锛�");
-											//杩斿洖涓婁竴椤�
-											mui.back();
-										},
-										error: function(result) {
-											mui.alert(result.msg, '鎻愮ず', ["纭畾"], function() {},
-												"div");
-										}
-									})
-								} else {
-									mui.toast("璇峰厛濉啓鍊间粨鎵i噸");
-								}
-							}
+						deHandle = $("#number")[0].value;
+						if (fileName1 == null || fileName2 == null) {
+							mui.toast("璇峰厛涓婁紶鍥剧墖锛�");
 						} else {
-							mui.toast("璇峰厛鐐瑰嚮寮�濮嬭绮紝骞朵笂浼犲浘鐗囷紒");
+							if (deHandle) {
+								data1.data.type = tag;
+								data1.data.fileName1 = fileName1;
+								data1.data.fileName2 = fileName2;
+								data1.data.deHandle = deHandle;
+								mui.ajax(url, {
+									type: "POST",
+									dataType: "json",
+									crossDomain: true,
+									contentType: "application/json;charset=utf-8",
+									data: JSON.stringify(data1),
+									success: function(result) {
+										// mui.toast("鍊间粨瀹屾垚锛�");
+										mui.toast(result.msg)
+										//杩斿洖涓婁竴椤�
+										mui.back();
+										
+									},
+									error: function(result) {
+										mui.alert(result.msg, '鎻愮ず', ["纭畾"], function() {},
+											"div");
+									}
+								})
+							} else {
+								mui.toast("璇峰厛濉啓鍊间粨鎵i噸");
+							}
 						}
+
 					} else {
 						//濡傛灉涓嶅湪鍊间粨鐘舵�侊紝缁欏嚭鎻愮ず淇℃伅锛屼笉杩涜鎻愪氦
 						mui.alert("璇ュ崟瀛愪笉鍦ㄥ�间粨鐘舵�侊紝涓嶈兘杩涜鍊间粨锛�", '鎻愮ず', ["纭畾"], function() {}, "div");
@@ -178,26 +177,22 @@
 		data: JSON.stringify(data),
 		success: function(result) {
 			if (result.code == '0000') {
-				if (result.data.handleStart != null) {
-					var picker = new mui.PopPicker();
-					picker.setData([{
-						value: "cameraImg",
-						text: "鎷嶇収涓婁紶"
-					}, {
-						value: "galleryImg",
-						text: "浠庣浉鍐岄�夋嫨"
-					}])
-					picker.show(function(SelectedItem) {
-						console.log(JSON.stringify(SelectedItem));
-						if (SelectedItem[0].value == 'cameraImg') {
-							cameraImg(typeNum);
-						} else {
-							galleryImg(typeNum);
-						}
-					})
-				} else {
-					mui.toast("璇峰厛鐐瑰嚮寮�濮嬭绮紒");
-				}
+				var picker = new mui.PopPicker();
+				picker.setData([{
+					value: "cameraImg",
+					text: "鎷嶇収涓婁紶"
+				}, {
+					value: "galleryImg",
+					text: "浠庣浉鍐岄�夋嫨"
+				}])
+				picker.show(function(SelectedItem) {
+					console.log(JSON.stringify(SelectedItem));
+					if (SelectedItem[0].value == 'cameraImg') {
+						cameraImg(typeNum);
+					} else {
+						galleryImg(typeNum);
+					}
+				})
 			} else {
 				mui.alert(result.msg, '鎻愮ず', ["纭畾"], function() {}, "div");
 			}
@@ -206,25 +201,10 @@
 			mui.alert('绯荤粺绻佸繖,璇烽噸璇曪紒', '鎻愮ず', ["纭畾"], function() {}, "div");
 		}
 	})
-	// var picker = new mui.PopPicker();
-	// picker.setData([{
-	// 	value: "cameraImg",
-	// 	text: "鎷嶇収涓婁紶"
-	// }, {
-	// 	value: "galleryImg",
-	// 	text: "浠庣浉鍐岄�夋嫨"
-	// }])
-	// picker.show(function(SelectedItem) {
-	// 	console.log(JSON.stringify(SelectedItem));
-	// 	if (SelectedItem[0].value == 'cameraImg') {
-	// 		cameraImg(typeNum);
-	// 	} else {
-	// 		galleryImg(typeNum);
-	// 	}
-	// })
+
 };
 
-//浣跨敤鐩告満鎷嶇収
+//鐩告満鎷嶇収
 function cameraImg(typeNum) {
 	var cmr = plus.camera.getCamera();
 	cmr.captureImage(function(p) {
@@ -284,8 +264,6 @@
 		});
 	//鎼哄甫杞︾墝鍙傛暟
 	task.addData("plateNum", depotData.plateNum);
-	//涓氬姟绫诲瀷
-	task.addData("bizType","01");
 	//鍥剧墖淇℃伅
 	task.addFile(path, {
 		key: "uploadkey"

--
Gitblit v1.9.3