|
@@ -37,6 +37,7 @@ Page({
|
|
|
text: '完成确认'
|
|
|
}],
|
|
|
workstatusindex: 0,
|
|
|
+
|
|
|
workBigclass: [{
|
|
|
value: 1,
|
|
|
text: '售后服务'
|
|
@@ -86,15 +87,12 @@ Page({
|
|
|
}],
|
|
|
breakdownTypeindex: null,
|
|
|
exceptdate: null,
|
|
|
- excepttime: null,
|
|
|
+ excepttime: '00:00',
|
|
|
finishdate: null,
|
|
|
- finishtime: null,
|
|
|
+ finishtime: '00:00',
|
|
|
accendantids: [],
|
|
|
userNames:[],
|
|
|
-
|
|
|
- school_name:'',
|
|
|
- school_id:'',
|
|
|
- schoolValidate:'',
|
|
|
+ chargStationName:'',
|
|
|
|
|
|
},
|
|
|
bindChargstationsChange: function(e) {
|
|
@@ -151,13 +149,18 @@ Page({
|
|
|
worksheetinfo
|
|
|
});
|
|
|
},
|
|
|
+ chargStationNameSelect:function(e){
|
|
|
+ let url = `/pages/worksheetinfo/findstation`;
|
|
|
+ console.info(url)
|
|
|
+ wx.navigateTo({
|
|
|
+ url
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
bindAccendantChange: function(e) {
|
|
|
- console.info(this.data.chargstations)
|
|
|
- console.info(this.data.chargstationsindex)
|
|
|
- console.info(this.data.chargstationsindex)
|
|
|
- let chargstationid = this.data.chargstations[this.data.chargstationsindex].id;
|
|
|
let accendant = this.data.worksheetinfo.accendant;
|
|
|
- let url = `/pages/worksheetinfo/accendant?chargstationid=${chargstationid}&accendant=${accendant}`;
|
|
|
+ let chargStationId = this.data.worksheetinfo.chargStationId;
|
|
|
+ let url = `/pages/worksheetinfo/accendant?chargstationid=${chargStationId}&accendant=${accendant}`;
|
|
|
wx.navigateTo({
|
|
|
url
|
|
|
});
|
|
@@ -203,10 +206,12 @@ Page({
|
|
|
worksheetinfo.operatorName = this.data.userNames.length>0?this.data.userNames[0]:"";
|
|
|
worksheetinfo.pams = this.data.accendantids;
|
|
|
worksheetinfo.accendant = null;
|
|
|
- if (this.data.exceptdate && this.data.excepttime) {
|
|
|
+ if (this.data.exceptdate ) {
|
|
|
+ // if (this.data.exceptdate && this.data.excepttime) {
|
|
|
worksheetinfo.exceptTime = this.data.exceptdate + " " + this.data.excepttime + ":00";
|
|
|
}
|
|
|
- if (this.data.finishdate && this.data.finishtime){
|
|
|
+ if (this.data.finishdate){
|
|
|
+ // if (this.data.finishdate && this.data.finishtime){
|
|
|
worksheetinfo.finishTime = this.data.finishdate + " " + this.data.finishtime + ":00";
|
|
|
}
|
|
|
let images = this.data.images;
|
|
@@ -261,9 +266,7 @@ Page({
|
|
|
//worksheetinfo.pciture = ((worksheetinfo.pciture.split(",")).concat(signString)).join(",");
|
|
|
console.log(worksheetinfo.pciture);
|
|
|
}
|
|
|
- console.info("===============================")
|
|
|
- console.info(worksheetinfo)
|
|
|
- console.info("===============================")
|
|
|
+
|
|
|
wx.request({
|
|
|
url: getApp().globalData.postHeadAgreement + '/restapi/wechat/saveWorkSheet',
|
|
|
data: worksheetinfo,
|
|
@@ -304,9 +307,6 @@ Page({
|
|
|
//worksheetinfo.pciture = ((worksheetinfo.pciture.split(",")).concat(signString)).join(",");
|
|
|
worksheetinfo.pciture = (pciString.concat(imgString).concat(signString)).join(",");
|
|
|
//var images = this.data.images.concat(res.tempFilePaths);
|
|
|
- console.info("===============================")
|
|
|
- console.info(worksheetinfo)
|
|
|
- console.info("===============================")
|
|
|
wx.request({
|
|
|
url: getApp().globalData.postHeadAgreement + '/restapi/wechat/saveWorkSheet',
|
|
|
data: worksheetinfo,
|
|
@@ -476,40 +476,37 @@ Page({
|
|
|
|
|
|
|
|
|
if (userInfo && isLogin) {
|
|
|
- wx.getLocation({
|
|
|
- success: function(res) {
|
|
|
+
|
|
|
+ wx.request({
|
|
|
+ url: getApp().globalData.postHeadAgreement + '/restapi/wechat/userChargStationsWeb',
|
|
|
+ data: {
|
|
|
+ userId: userInfo.userId,
|
|
|
+ pagenum: 1,
|
|
|
+ pagesize: 1,
|
|
|
+ },
|
|
|
+ method: 'POST',
|
|
|
+ success(res) {
|
|
|
//console.log(res);
|
|
|
let {
|
|
|
- latitude,
|
|
|
- longitude,
|
|
|
- } = res;
|
|
|
- wx.request({
|
|
|
- url: getApp().globalData.postHeadAgreement + '/restapi/wechat/userChargStationsWeb',
|
|
|
- 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 && worksheetinfo.chargStationName && item.chargStationName == worksheetinfo.chargStationName) {
|
|
|
- that.setData({
|
|
|
- chargstationsindex: index
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- that.setData({
|
|
|
- chargstations
|
|
|
- });
|
|
|
- }
|
|
|
+ rows: chargstations
|
|
|
+ } = res.data;
|
|
|
+ let chargStationName='';
|
|
|
+ let chargStationId=0;
|
|
|
+ chargstations.forEach((item, index) => {
|
|
|
+ chargStationName = item.chargStationName
|
|
|
+ chargStationId = item.id
|
|
|
+ });
|
|
|
+ let worksheetinfo = that.data.worksheetinfo;
|
|
|
+ worksheetinfo.chargStationId = chargStationId;
|
|
|
+ that.setData({
|
|
|
+ chargStationName,
|
|
|
+ worksheetinfo
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
// wx.request({
|
|
|
// url: getApp().globalData.postHeadAgreement + '/restapi/wechat/getuserworksheet',
|