|
@@ -66,7 +66,18 @@ Page({
|
|
finishdate: null,
|
|
finishdate: null,
|
|
finishtime: null,
|
|
finishtime: null,
|
|
accendantids: [],
|
|
accendantids: [],
|
|
- userNames:[]
|
|
|
|
|
|
+ userNames:[],
|
|
|
|
+ chargStationName:'',
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ chargStationNameSelect:function(e){
|
|
|
|
+ let url = `/pages/worksheetinfo/findstation`;
|
|
|
|
+ wx.navigateTo({
|
|
|
|
+ url
|
|
|
|
+ });
|
|
},
|
|
},
|
|
bindChargstationsChange: function(e) {
|
|
bindChargstationsChange: function(e) {
|
|
if (this.data.chargstationsindex != e.detail.value) {
|
|
if (this.data.chargstationsindex != e.detail.value) {
|
|
@@ -113,7 +124,7 @@ Page({
|
|
});
|
|
});
|
|
},
|
|
},
|
|
bindAccendantChange: function(e) {
|
|
bindAccendantChange: function(e) {
|
|
- let chargstationid = this.data.chargstations[this.data.chargstationsindex].id;
|
|
|
|
|
|
+ let chargstationid = this.data.worksheetinfo.chargStationId;
|
|
let accendant = this.data.worksheetinfo.accendant;
|
|
let accendant = this.data.worksheetinfo.accendant;
|
|
let url = `/pages/worksheetinfo/accendant?chargstationid=${chargstationid}&accendant=${accendant}`;
|
|
let url = `/pages/worksheetinfo/accendant?chargstationid=${chargstationid}&accendant=${accendant}`;
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
@@ -444,39 +455,9 @@ Page({
|
|
|
|
|
|
|
|
|
|
if (userInfo && isLogin) {
|
|
if (userInfo && isLogin) {
|
|
- wx.getLocation({
|
|
|
|
- success: function(res) {
|
|
|
|
- //console.log(res);
|
|
|
|
- let {
|
|
|
|
- latitude,
|
|
|
|
- longitude,
|
|
|
|
- } = res;
|
|
|
|
- wx.request({
|
|
|
|
- url: getApp().globalData.postHeadAgreement + '/restapi/wechat/userChargStations',
|
|
|
|
- data: {
|
|
|
|
- userId: userInfo.userId,
|
|
|
|
- lat: latitude,
|
|
|
|
- lon: longitude
|
|
|
|
- },
|
|
|
|
- method: 'POST',
|
|
|
|
- success(res) {
|
|
|
|
- //console.log(res);
|
|
|
|
- let {
|
|
|
|
- data: chargstations
|
|
|
|
- } = res;
|
|
|
|
- chargstations.forEach((item, index) => {
|
|
|
|
- if (item.chargStationName && worksheetinfo.chargStationName && item.chargStationName == worksheetinfo.chargStationName) {
|
|
|
|
- that.setData({
|
|
|
|
- chargstationsindex: index
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- that.setData({
|
|
|
|
- chargstations
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ that.setData({
|
|
|
|
+ chargStationName:worksheetinfo.chargStationName,
|
|
|
|
+ worksheetinfo
|
|
});
|
|
});
|
|
}
|
|
}
|
|
wx.request({
|
|
wx.request({
|