瀏覽代碼

工单编辑

XWookey 1 年之前
父節點
當前提交
fcb17d790c

+ 1 - 1
pages/ucenter/myworksheet/myworksheet.js

@@ -64,7 +64,7 @@ Page({
         },
         method: 'POST',
         success(res) {
-          console.log(res);
+          // console.log(res);
           if (res.data) {
             let {
               data: worksheets

+ 0 - 1
pages/worksheetinfo/addworksheetinfo.js

@@ -151,7 +151,6 @@ Page({
   },
   chargStationNameSelect:function(e){
     let url = `/pages/worksheetinfo/findstation`;
-    console.info(url)
     wx.navigateTo({
       url
     });

+ 2 - 2
pages/worksheetinfo/findstation.js

@@ -61,7 +61,7 @@ Page({
     let pages = getCurrentPages();
     //console.log(pages);
     //console.log(e);
-    console.log(keywords);
+    // console.log(keywords);
     if (keywords) {
       let pages = getCurrentPages();
       let prevPage = pages[pages.length - 2]; //上一个页面
@@ -144,7 +144,7 @@ Page({
       success(res) {
         let chargList = res.data.rows;
 
-        console.log(chargList);
+        // console.log(chargList);
         // that.rechargeTimeOrder(chargemoneylogs);
         wx.hideLoading()
         that.setData({

+ 16 - 35
pages/worksheetinfo/worksheetinfo.js

@@ -66,7 +66,18 @@ Page({
     finishdate: null,
     finishtime: null,
     accendantids: [],
-    userNames:[]
+    userNames:[],
+    chargStationName:'',
+
+
+
+
+  },
+  chargStationNameSelect:function(e){
+    let url = `/pages/worksheetinfo/findstation`;
+    wx.navigateTo({
+      url
+    });
   },
   bindChargstationsChange: function(e) {
     if (this.data.chargstationsindex != e.detail.value) {
@@ -113,7 +124,7 @@ Page({
     });
   },
   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 url = `/pages/worksheetinfo/accendant?chargstationid=${chargstationid}&accendant=${accendant}`;
     wx.navigateTo({
@@ -444,39 +455,9 @@ Page({
 
 
     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({

+ 3 - 2
pages/worksheetinfo/worksheetinfo.wxml

@@ -2,9 +2,10 @@
 <scroll-view scroll-y='true'>
   <view class="context">
     <text>场站</text>
-    <picker class="picker" disabled="{{worksheetinfo.workStatus==6}}" bindchange="bindChargstationsChange" value="{{chargstationsindex}}" range-key="chargStationName" range="{{chargstations}}">
+    <view class='input' bindtap='chargStationNameSelect' type='text'>{{chargStationName}}</view>
+    <!-- <picker class="picker" disabled="{{worksheetinfo.workStatus==6}}" bindchange="bindChargstationsChange" value="{{chargstationsindex}}" range-key="chargStationName" range="{{chargstations}}">
       <text>{{chargstations[chargstationsindex].chargStationName}}</text>
-    </picker>
+    </picker> -->
   </view>
   <view class="context">
     <text>地址</text>