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 +++++++++++--------------------------------
 1 files changed, 23 insertions(+), 65 deletions(-)

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) {
 						//鍏堝垽鏂崟瀛愭槸鍚﹀湪鍊间粨鐘舵��

--
Gitblit v1.9.3