XWookey 1 рік тому
батько
коміт
aaef20136b

+ 7 - 7
pages/worksheetinfo/addworksheetinfo.js

@@ -171,7 +171,7 @@ Page({
 
   bindAccendantChange: function(e) {
     let accendant = this.data.worksheetinfo.accendant;
-    let chargStationId = this.data.worksheetinfo.chargStationId;
+    let chargStationId = this.data.worksheetinfo.chargStationId==null?0:this.data.worksheetinfo.chargStationId;
     let url = `/pages/worksheetinfo/accendant?chargstationid=${chargStationId}&accendant=${accendant}`;
     wx.navigateTo({
       url
@@ -207,10 +207,10 @@ Page({
   },
   bindContentInput(e) {
     let content = e.detail.value;
-    let worksheetinfo = this.data.worksheetinfo;
-    worksheetinfo.content = content;
+    // let worksheetinfo = this.data.worksheetinfo;
+    // worksheetinfo.content = content;
     this.setData({
-      worksheetinfo
+      "worksheetinfo.content":content
     });
   },
   bindWorkSheetSubmit(e) {
@@ -468,7 +468,7 @@ Page({
 
   clear_chargStationName(e){
     let worksheetinfo = this.data.worksheetinfo;
-    worksheetinfo.chargStationId = 0;
+    worksheetinfo.chargStationId = null;
     worksheetinfo.pams = [];
     worksheetinfo.accendant =  '';
     worksheetinfo.mainLocation =  '';
@@ -520,7 +520,7 @@ Page({
       workBigclass: 1,
       wokSmallclass: 1,
       breakdownType: 1,
-      chargStationId: 0,
+      chargStationId: null,
     }
     this.setData({
       worksheetinfo: worksheetinfo
@@ -575,7 +575,7 @@ Page({
             rows: chargstations
           } = res.data;
           let chargStationName='';
-          let chargStationId=0;
+          let chargStationId=null;
           chargstations.forEach((item, index) => {
             chargStationName = item.chargStationName
             // chargStationId = item.id

+ 1 - 1
pages/worksheetinfo/worksheetinfo.js

@@ -470,7 +470,7 @@ Page({
 
   clear_chargStationName(e){
     let worksheetinfo = this.data.worksheetinfo;
-    worksheetinfo.chargStationId = 0;
+    worksheetinfo.chargStationId = null;
     worksheetinfo.pams = [];
     worksheetinfo.accendant =  '';
     worksheetinfo.mainLocation =  '';