From 1a0abf4788e8b1ee17d5a3a9834385bbc6b8f14b Mon Sep 17 00:00:00 2001
From: hailu <962012470@qq.com>
Date: 星期四, 07 十二月 2023 17:38:53 +0800
Subject: [PATCH] 备份
---
GoldC/pages/problemReport/proRep.js | 70 +++++++++++++++++++++--------------
1 files changed, 42 insertions(+), 28 deletions(-)
diff --git a/GoldC/pages/problemReport/proRep.js b/GoldC/pages/problemReport/proRep.js
index 93902c1..66e267c 100644
--- a/GoldC/pages/problemReport/proRep.js
+++ b/GoldC/pages/problemReport/proRep.js
@@ -41,13 +41,12 @@
selectDate: '',
paramsInfo: {},
showJD: false,
- view:false,
+ view: false,
},
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
onLoad: function (options) {
-
if (options && options.info) {
let info = JSON.parse(options.info)
console.log(info);
@@ -58,18 +57,16 @@
time: info.appointmentTime,
deviceIndex: 0,
deviceList2: [info.device.deviceName],
- erectoIndex: 0,
- erectoList2: [info.erectoName],
- view:info.imgUrl?true:false
-
+ // erectoIndex: 0,
+ // erectoList2: [info.erectoName],
+ view: info.imgUrl ? true : false
})
wx.setNavigationBarTitle({
- title: this.data.form.device.deviceName
+ title: 'ID' + this.data.form.id + ' | ' + this.data.form.device.deviceName
})
- } else {
- this.getErectoList()
- this.getDeviceList()
}
+ this.getErectoList()
+ this.getDeviceList()
},
changeUserName(e) {
this.data.form.userName = e.detail.value
@@ -88,7 +85,7 @@
},
Yes() {
console.log(this.data.form);
-
+
if (this.data.form.state == 3) {
if (!this.data.form.imgUrl) {
wx.showToast({
@@ -97,7 +94,7 @@
});
return
}
- this.data.form.orderType='1'
+ this.data.form.orderType = '1'
if (this.data.form.appointmentTime) {
this.data.form.appointmentTime += ':00'
}
@@ -280,9 +277,9 @@
"Access-Control-Allow-Headers": 'token',
Authorization: `Bearer ${wx.getStorageSync('token')}`
},
- params: data,
+ data: data,
success: (res, header) => {
- if (res.data.code != 200) {
+ if (res.data.code != 200 || res.data.rows.length == 0) {
wx.showToast({
title: res.data.msg,
icon: 'none'
@@ -306,9 +303,10 @@
let data = {
pageNum: 1,
pageSize: 10000,
- deptId: wx.setStorageSync('deptId'),
+ deptId: wx.getStorageSync('deptId'),
isAuthentication: 1
}
+ console.log(data);
wx.request({
url: 'https://puyue.yhupai.com/prod-api/system/user/list',
method: "GET",
@@ -316,7 +314,7 @@
"Access-Control-Allow-Headers": 'token',
Authorization: `Bearer ${wx.getStorageSync('token')}`
},
- params: data,
+ data: data,
success: (res, header) => {
if (res.data.code != 200) {
wx.showToast({
@@ -324,20 +322,35 @@
icon: 'none'
});
} else {
- let data = []
+ console.log(res);
+
+ res.data.rows.unshift({
+ nickName:'鏈寚娲�',
+ erectoId:-1
+ })
+ let data1 = []
for (let i = 0; i < res.data.rows.length; i++) {
- data.push(res.data.rows[i].nickName)
+ data1.push(res.data.rows[i].nickName)
}
- data.unshift(
- '鏈寚娲�'
- )
this.setData({
erectoList1: res.data.rows,
- erectoList2: data
+ erectoList2: data1
})
-
- this.data.form.erectoId = -1
- this.data.form.erectoName = '鏈寚娲�'
+
+ if (this.data.showJD) {
+ console.log(11111111111);
+ for (let i = 0; i < this.data.erectoList1.length; i++) {
+ if (this.data.erectoList1[i].userId == this.data.paramsInfo.erectoId) {
+ console.log(i);
+ this.setData({
+ erectoIndex: i,
+ })
+ }
+ }
+ } else {
+ this.data.form.erectoId = -1
+ this.data.form.erectoName = '鏈寚娲�'
+ }
}
}
})
@@ -371,8 +384,9 @@
form: item
})
// this.data.form.state = 1
- this.data.form.erectoId = this.data.erectoList1[Number(e.detail.value)-1].userId
- this.data.form.erectoName = this.data.erectoList1[Number(e.detail.value)-1].nickName
+ this.data.form.erectoId = this.data.erectoList1[Number(e.detail.value)].userId
+ this.data.form.erectoName = this.data.erectoList1[Number(e.detail.value)].nickName
+ console.log(this.data.form);
}
console.log(this.data.erectoList1, this.data.erectoList2, e.detail.value, this.data.form);
@@ -609,7 +623,7 @@
this.setData({
multiArray: loadPickerData,//picker鏁扮粍璧嬪�硷紝鏍煎紡 [years, months, days, hours, minutes]
multiIndex: GetMultiIndex,//璁剧疆pickerIndex锛孾0,0,0,0,0]
- time: year + '-' + month + '-' + day + ' ' + hour + '-' + minute, //璁剧疆褰撳墠鏃堕棿 锛宑urrentYears+'-'+mm+'-'+dd+' '+hh+':'+min
+ time: year + '-' + month + '-' + day + ' ' + hour + ':' + minute, //璁剧疆褰撳墠鏃堕棿 锛宑urrentYears+'-'+mm+'-'+dd+' '+hh+':'+min
year: year,//璁板綍閫夋嫨鐨勫勾
month: month,//璁板綍閫夋嫨鐨勬湀
day: day,//璁板綍閫夋嫨鐨勬棩
--
Gitblit v1.8.0