From ac41a8ccfd91eeec20d019a01952bba11c260c9b Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 16 五月 2024 17:34:59 +0800
Subject: [PATCH] 1.设备维修申请开发提交

---
 pages/sbgl/wxsq.vue |   29 ++++++++++++++---------------
 1 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/pages/sbgl/wxsq.vue b/pages/sbgl/wxsq.vue
index 271481c..a5b6e5c 100644
--- a/pages/sbgl/wxsq.vue
+++ b/pages/sbgl/wxsq.vue
@@ -192,7 +192,7 @@
 		},
 		mounted() {
 			this.init()
-			this.getMaintainScanDeviceApplyQrCodeData('111')
+			this.getMaintainScanDeviceApplyQrCodeData('101')
 
 		},
 		methods: {
@@ -297,14 +297,15 @@
 			async submit() {
 				const header = {
 					// 'Content-Type': 'multipart/form-data',
-					'Content-Type': 'application/x-www-form-urlencoded',
-					'rediskey': uni.getStorageSync('rediskey'),
-					'admin': uni.getStorageSync('usercode'),
-					'username': encodeURIComponent(uni.getStorageSync('username')),
-					'navTabId': uni.getStorageSync('usercode'),
-					'userid': uni.getStorageSync('userid'),
-					'guid': uni.getStorageSync('guid'),
-					'usertype': 'APP'
+					// 'Content-Type': 'application/x-www-form-urlencoded',
+					'Token': uni.getStorageSync('Token')
+					// 'rediskey': uni.getStorageSync('rediskey'),
+					// 'admin': uni.getStorageSync('usercode'),
+					// 'username': encodeURIComponent(uni.getStorageSync('username')),
+					// 'navTabId': uni.getStorageSync('usercode'),
+					// 'userid': uni.getStorageSync('userid'),
+					// 'guid': uni.getStorageSync('guid'),
+					// 'usertype': 'APP'
 				}
 
 
@@ -335,12 +336,8 @@
 
 
 				// #ifdef APP-PLUS ||MP  
-				// const temp = [{
-				// 	name: 'files1'
-				// }]
 
 				let formData = {
-					username: uni.getStorageSync('username'),
 					eqpcode: this.topContent[0].code,
 					wkshpcode: this.topContent[0].wksp_code,
 					faultsourcecode: this.selectValue,
@@ -349,11 +346,12 @@
 
 
 				console.log(formData)
+				console.log(this.fileList, 'fileList')
 
 
 				this.isDisabledSubmitButton = true
 				uni.uploadFile({
-					url: this.$baseUrl + '/DeviceManage/MaintainScanDeviceApplySave',
+					url: this.$baseUrl + '/DeviceManager/MaintainScanDeviceApplySave',
 					files: this.fileList.length === 0 ? [{
 						uri: '/'
 					}] : this.fileList,
@@ -361,7 +359,7 @@
 					header: header,
 					formData: formData,
 					success: (res) => {
-						console.log(res, 1)
+						// console.log(res, '1')
 						let result = JSON.parse(res.data)
 						if (res.statusCode == 200 && result.code == '200') {
 							uni.$u.toast('鎻愪氦鎴愬姛锛�')
@@ -376,6 +374,7 @@
 						this.isDisabledSubmitButton = false
 					},
 					fail(res) {
+						// console.log(res, '1')
 						uni.$u.toast('鎻愪氦澶辫触锛�')
 						this.isDisabledSubmitButton = false
 					},

--
Gitblit v1.9.3