From 9fe35e2394ea32269957328342bba12442986df5 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期二, 16 五月 2023 16:30:07 +0800
Subject: [PATCH] 工单管理

---
 igds-app/js/admin/work-apply.js |  249 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 249 insertions(+), 0 deletions(-)

diff --git a/igds-app/js/admin/work-apply.js b/igds-app/js/admin/work-apply.js
new file mode 100644
index 0000000..6c93a9f
--- /dev/null
+++ b/igds-app/js/admin/work-apply.js
@@ -0,0 +1,249 @@
+var url = null;
+//宸ュ崟鐢宠
+var data = {
+	"interfaceId": "5701",
+	"outId": "10701",
+	"reqDateTime": new Date(),
+	"tokenAuth": "",
+	"data": {
+		"depotId": "",
+		"type": "",
+		"startTime": "",
+		"endTime": "",
+	}
+};
+//鑾峰彇搴撳尯鍒楄〃
+var data = {
+	"interfaceId": "5002",
+	"outId": "10002",
+	"reqDateTime": new Date(),
+	"tokenAuth": "",
+	"data": {
+	}
+};
+
+
+function init() {
+	var user = JSON.parse(localStorage.getItem('user'));
+	var selectDeptId = JSON.parse(localStorage.getItem('selectDeptId'));
+	url = user.url + "/api-phone/v35/gateway";
+	data.tokenAuth = user.tokenAuth;
+	// data.data.deptId = selectDeptId;
+}
+
+function chooseDate() {
+	var dtpicker = new mui.DtPicker({
+		type: "date", //璁剧疆鏃ュ巻鍒濆瑙嗗浘妯″紡
+		// beginDate: new Date(2015, 04, 25), //璁剧疆寮�濮嬫棩鏈�
+		// endDate: new Date(2016, 04, 25), //璁剧疆缁撴潫鏃ユ湡
+
+	})
+	dtpicker.show(function(e) {
+		var date_el = document.getElementById("date1-val")
+		date_el.innerText = e.value
+		data.data.startTime = e.value;
+		jQuery(date_el).prev().hide()
+	})
+}
+
+function chooseDate1() {
+	var dtpicker = new mui.DtPicker({
+		type: "date", //璁剧疆鏃ュ巻鍒濆瑙嗗浘妯″紡
+		// beginDate: new Date(2015, 04, 25), //璁剧疆寮�濮嬫棩鏈�
+		// endDate: new Date(2016, 04, 25), //璁剧疆缁撴潫鏃ユ湡
+
+	})
+	dtpicker.show(function(e) {
+		var date_el = document.getElementById("date2-val")
+		date_el.innerText = e.value
+		data.data.endTime = e.value
+		jQuery(date_el).prev().hide()
+	})
+}
+
+//宸ュ崟鐢宠
+function workApply() {
+	//鍙戦�佽姹傝繘琛屽伐鍗曠敵璇�
+	mui.ajax(url, {
+		type: "POST",
+		dataType: "json",
+		crossDomain: true,
+		contentType: "application/json;charset=utf-8",
+		data: JSON.stringify(data),
+		success: function(result) {
+			if (result.code == "0000") {
+				console.log(JSON.stringify(result))
+			} else {
+				mui.alert(result.msg, '鎻愮ず', ["纭畾"], function() {}, "div");
+			}
+		},
+		error: function() {
+			mui.alert('绯荤粺绻佸繖,璇烽噸鏂扮櫥褰曞皾璇曪紒', '鎻愮ず', ["纭畾"], function() {}, "div");
+		}
+	})
+}
+
+//鎻愪氦
+mui(".mui-scroll").on("tap", ".wp form .submit", function() {
+	console.log("111")
+	workApply();
+})
+
+mui('.mui-scroll-wrapper').scroll({
+	indicators: false, //鏄惁鏄剧ず婊氬姩鏉�
+	deceleration: 0.0006, //闃诲凹绯绘暟,绯绘暟瓒婂皬婊戝姩瓒婄伒鏁�
+	bounce: false, //鏄惁鍚敤鍥炲脊
+	deceleration: 0.0005 //flick 鍑忛�熺郴鏁帮紝绯绘暟瓒婂ぇ锛屾粴鍔ㄩ�熷害瓒婃參锛屾粴鍔ㄨ窛绂昏秺灏忥紝榛樿鍊�0.0006
+});
+(function($, doc) {
+	$.init();
+	$.ready(function() {
+		/**
+		 * 鑾峰彇瀵硅薄灞炴�х殑鍊�
+		 * 涓昏鐢ㄤ簬杩囨护涓夌骇鑱斿姩涓紝鍙兘鍑虹幇鐨勬渶浣庣骇鐨勬暟鎹笉瀛樺湪鐨勬儏鍐碉紝瀹為檯寮�鍙戜腑闇�瑕佹敞鎰忚繖涓�鐐癸紱
+		 * @param {Object} obj 瀵硅薄
+		 * @param {String} param 灞炴�у悕
+		 */
+		var _getParam = function(obj, param) {
+			return obj[param] || '';
+		};
+		//鏅�氱ず渚�
+		var userPicker = new $.PopPicker();
+		userPicker.setData([{
+			value: 'ywj',
+			text: '钁d簨闀� 鍙舵枃娲�'
+		}, {
+			value: 'aaa',
+			text: '鎬荤粡鐞� 鑹続A'
+		}, {
+			value: 'lj',
+			text: '缃楄緫'
+		}, {
+			value: 'ymt',
+			text: '浜戝ぉ鏄�'
+		}, {
+			value: 'shq',
+			text: '鍙插己'
+		}, {
+			value: 'zhbh',
+			text: '绔犲寳娴�'
+		}, {
+			value: 'zhy',
+			text: '搴勯'
+		}, {
+			value: 'gyf',
+			text: '鍏充竴甯�'
+		}, {
+			value: 'zhz',
+			text: '鏅哄瓙'
+		}, {
+			value: 'gezh',
+			text: '姝岃��'
+		}]);
+		var showUserPickerButton = doc.getElementById('ywlx');
+		var userResult = doc.getElementById('ywlx-val');
+		showUserPickerButton.addEventListener('tap', function(event) {
+			userPicker.show(function(items) {
+				// userResult.innerText = JSON.stringify(items[0]);
+				userResult.innerText = items[0].text;
+				// userResult.previousSibling.style.display="none"
+				jQuery(userResult).prev().hide()
+				//杩斿洖 false 鍙互闃绘閫夋嫨妗嗙殑鍏抽棴
+				//return false;
+			});
+		}, false);
+		//-----------------------------------------
+		//鎵�灞炲垎搴�:
+		var picker1 = new $.PopPicker();
+		picker1.setData([{
+			value: 'ywj',
+			text: '钁d簨闀� 鍙舵枃娲�'
+		}, {
+			value: 'aaa',
+			text: '鎬荤粡鐞� 鑹続A'
+		}, {
+			value: 'lj',
+			text: '缃楄緫'
+		}, {
+			value: 'ymt',
+			text: '浜戝ぉ鏄�'
+		}, {
+			value: 'shq',
+			text: '鍙插己'
+		}, {
+			value: 'zhbh',
+			text: '绔犲寳娴�'
+		}, {
+			value: 'zhy',
+			text: '搴勯'
+		}, {
+			value: 'gyf',
+			text: '鍏充竴甯�'
+		}, {
+			value: 'zhz',
+			text: '鏅哄瓙'
+		}, {
+			value: 'gezh',
+			text: '姝岃��'
+		}]);
+		var showPicker1Button = doc.getElementById('ssfk');
+		var picker1Result = doc.getElementById('ssfk-val');
+		showPicker1Button.addEventListener('tap', function(event) {
+			picker1.show(function(items) {
+				// userResult.innerText = JSON.stringify(items[0]);
+				picker1Result.innerText = items[0].text;
+				// userResult.previousSibling.style.display="none"
+				jQuery(picker1Result).prev().hide()
+				//杩斿洖 false 鍙互闃绘閫夋嫨妗嗙殑鍏抽棴
+				//return false;
+			});
+		}, false);
+		//-----------------------------------------
+		//鍏宠仈浠撳簱:
+		var picker2 = new $.PopPicker();
+		picker2.setData([{
+			value: 'ywj',
+			text: '钁d簨闀� 鍙舵枃娲�'
+		}, {
+			value: 'aaa',
+			text: '鎬荤粡鐞� 鑹続A'
+		}, {
+			value: 'lj',
+			text: '缃楄緫'
+		}, {
+			value: 'ymt',
+			text: '浜戝ぉ鏄�'
+		}, {
+			value: 'shq',
+			text: '鍙插己'
+		}, {
+			value: 'zhbh',
+			text: '绔犲寳娴�'
+		}, {
+			value: 'zhy',
+			text: '搴勯'
+		}, {
+			value: 'gyf',
+			text: '鍏充竴甯�'
+		}, {
+			value: 'zhz',
+			text: '鏅哄瓙'
+		}, {
+			value: 'gezh',
+			text: '姝岃��'
+		}]);
+		var showPicker2Button = doc.getElementById('glck');
+		var picker2Result = doc.getElementById('glck-val');
+		showPicker2Button.addEventListener('tap', function(event) {
+			picker2.show(function(items) {
+				// userResult.innerText = JSON.stringify(items[0]);
+				picker2Result.innerText = items[0].text;
+				// userResult.previousSibling.style.display="none"
+				jQuery(picker2Result).prev().hide()
+				//杩斿洖 false 鍙互闃绘閫夋嫨妗嗙殑鍏抽棴
+				//return false;
+			});
+		}, false);
+
+	});
+})(mui, document);
\ No newline at end of file

--
Gitblit v1.9.3