Browse Source

新增工单和修改工单,场站可以为空, 地址、维修人员、工作内容不能为空

XWookey 2 years ago
parent
commit
14d00d7b77

+ 1 - 1
app.js

@@ -5,7 +5,7 @@ App({
   globalData: {
    // postHeadAgreement: 'http://127.0.0.1:10301',
     // 测试
-  //  postHeadAgreement: 'https://jqcs.pjnes.com/cloud/chargapi',
+    // postHeadAgreement: 'https://jqcs.pjnes.com/cloud/chargapi',
 
     // 正式
     postHeadAgreement: 'https://cdglyy.pjnes.com/cloud/chargapi',

BIN
images/clear.png


+ 26 - 1
pages/charginfo/charginfo.js

@@ -30,6 +30,7 @@ Page({
     chargList: [],
     seeInfoChargPile:{},
     userInfo:{},
+    chargfeatureList:[],
     isLogin: false,
   },
 
@@ -43,16 +44,27 @@ Page({
     wx.getStorage({
       key: 'index_seeInfo_chargpile',
       success: function (res) {
+        console.info(res)
         var seeInfoChargPile = res.data;
+        let chargfeatureList;
+
+        if(seeInfoChargPile.chargfeatures){
+          chargfeatureList = seeInfoChargPile.chargfeatures.split(',')
+        }else{
+          chargfeatureList = [];
+        }
+
         seeInfoChargPile.sharpTotalPrice = (seeInfoChargPile.sharpChargPrice==null || seeInfoChargPile.sharpServicePrice==null)? null:(seeInfoChargPile.sharpChargPrice + seeInfoChargPile.sharpServicePrice).toFixed(6);
         seeInfoChargPile.peakTotalPrice = (seeInfoChargPile.peakChargPrice==null || seeInfoChargPile.peakServicePrice==null)? null:(seeInfoChargPile.peakChargPrice + seeInfoChargPile.peakServicePrice).toFixed(6);
         seeInfoChargPile.flatTotalPrice = (seeInfoChargPile.flatChargPrice==null || seeInfoChargPile.flatServicePrice==null)? null:(seeInfoChargPile.flatChargPrice + seeInfoChargPile.flatServicePrice).toFixed(6);
         seeInfoChargPile.valleyTotalPrice = (seeInfoChargPile.valleyChargPrice==null || seeInfoChargPile.valleyServicePrice==null)? null:(seeInfoChargPile.valleyChargPrice + seeInfoChargPile.valleyServicePrice).toFixed(6);
         seeInfoChargPile.totalprice =  (seeInfoChargPile.chargprice==null || seeInfoChargPile.serviceprice==null)? null:(seeInfoChargPile.chargprice + seeInfoChargPile.serviceprice).toFixed(6);
         that.setData({
-          seeInfoChargPile
+          seeInfoChargPile,
+          chargfeatureList
         });
         console.info(seeInfoChargPile)
+        console.info(chargfeatureList)
         wx.removeStorage({
           key: 'index_seeInfo_chargpile',
           success(res) {
@@ -83,6 +95,19 @@ Page({
  
     this.getPage();
   },
+  previewImage(e){
+    var that = this,
+    //获取当前图片的下表
+      index = e.currentTarget.dataset.index,
+      //数据源
+      pictures = this.data.chargfeatureList;
+    wx.previewImage({
+    //当前显示下表
+     current: pictures[index],
+     //数据源
+     urls: pictures
+    })
+  },
   getPage(){
 
     if(this.data.chargList.length == this.data.total){

+ 9 - 1
pages/charginfo/charginfo.wxml

@@ -1,4 +1,5 @@
 <!--pages/charging/charging.wxml-->
+<view  style="height: 100%;width: 100%;overflow: scroll;">
 <view class="charginfo" hover-class='active'>
 
   <view class="map_text">
@@ -54,6 +55,12 @@
       <text decode='true' style='font-size:20rpx;color:#aaaaaa;'>尖峰:7\8月11:00-13:00&nbsp;&nbsp;16:00-17:00</text>
     </view>
 
+    <scroll-view class='pictureScroll' scroll-x='true'>
+      <view wx:for="{{chargfeatureList}}" wx:key="unique" data-index="{{index}}" bindtap="previewImage" class="chargfeatureImage">
+      <image src="{{item}}" ></image>
+      </view>
+    </scroll-view>
+
 	  <view class="btn_list">
 		  <view class="btn">
 			  <view class="icon">快</view>
@@ -85,7 +92,8 @@
         <view class="startpower" wx:if="{{!userInfo.flag && item.chargstatusname=='已插枪'}}" >启动充电 ></view>
       </view>
     </view>
+    <view class = "bottomm"></view>
   </scroll-view>
-  <view class = "bottomm"></view>
 
 </view>
+</view >

+ 22 - 4
pages/charginfo/charginfo.wxss

@@ -6,14 +6,32 @@ page {
   overflow-y: hidden;
   
 }
-
+.chargfeatureImage{
+  display: inline-block;
+  width: 240rpx;
+  height: 135rpx;
+  margin: 20rpx 20rpx 20rpx 0;
+  border-radius: 15rpx;
+  overflow: hidden;
+  background-color: #00AADD;
+}
+.chargfeatureImage image{
+  display: inline-block;
+  width: 240rpx;
+  height: 135rpx;
+}
+.pictureScroll{
+  display: flex;
+  white-space:nowrap;
+}
 .charginfo{
   height: 100%;
+  display: flex;
+  flex-direction: column;
 }
 
 .map_text{
   background:#FFFFFF;
-  height: 560rpx;
   margin: 12rpx 0;
   padding:20rpx 40rpx;
 }
@@ -78,10 +96,10 @@ text.price {
   color: #9d9d9d;
 }
 .context {
-  height: calc(100% - 720rpx);
+  height: 720rpx;
 }
 
-.chargprice {
+.chargprice {   
   height: 50rpx;
   margin-bottom: 4rpx;
 }

+ 137 - 83
pages/index/index.js

@@ -5,8 +5,19 @@ let wechat = require("../../utils/wechat");
 let amap = require("../../utils/amap");
 let Util = require("../../utils/util");
 let log = require('../../utils/log.js');
+let wxpro = require('../../utils/wx-promise-pro.js');
 let mapregionchange_makertap = false;
 
+
+wxpro.promisifyAll()
+// wxpro.promisify(wx.getSystemInfo)().then(console.log)
+for (var variable in wx) {
+  if (wx.hasOwnProperty(variable)) {
+    wx.pro[variable] = wxpro.promisify(wx[variable])
+  }
+}
+
+
 Page({
   data: {
     scanFlag:false,
@@ -172,7 +183,8 @@ Page({
     }
   },
   onLoad(e) {
-    this.scanFlag = false;
+
+   this.scanFlag = false;
     wx.hideLoading();
     if (e.q) {
       //console.log(decodeURIComponent(e.q));
@@ -181,7 +193,18 @@ Page({
       //if (charePileId){
 
       //}
-      this.wxScan(e.q);
+
+      let userInfo = wx.getStorageSync('userInfo');
+      let isLogin = wx.getStorageSync('isLogin');
+      // userInfo.flag=true;
+      this.setData({
+        userInfo,
+        isLogin
+      });
+
+
+      this.click_scan_control(e.q,false);
+      // this.wxScan(e.q);
     }
     log.info('[首页]', '[加载完成]');
 
@@ -286,6 +309,7 @@ Page({
                       address: item.address,
                       width: "46rpx",
                       height: "67rpx",
+                      chargfeatures: chargfeatures , 
                       iconPath: iconPath,
                       id: item.id,
                       callout: {},
@@ -342,6 +366,7 @@ Page({
                   address: item.address,
                   width: "46rpx",
                   height: "67rpx",
+                  chargfeatures: item.chargfeatures , 
                   iconPath: iconPath,
                   id: item.id,
                   callout: {},
@@ -623,10 +648,11 @@ Page({
     mpCtx.moveToLocation();
   },
   //打开扫一扫
-  click_scan_control(e) {
-    if(!this.phoneCheck()){
-      return;
-    }
+  click_scan_control_outer(){
+    this.click_scan_control("",true)
+  },
+
+  click_scan_control(scanResult,inner) {
     if(this.scanFlag){
       return;
     }
@@ -649,6 +675,9 @@ Page({
       });
       return;
     } else {
+      if(!this.phoneCheck()){
+        return;
+      }
       log.info('[首页]', '[获取用户是否有未支付订单]', '[请求]', { userId: this.data.userInfo.userId });
       wx.request({
         url: getApp().globalData.postHeadAgreement + '/restapi/pileLog/wechatsettlement',
@@ -688,85 +717,23 @@ Page({
             //console.log('无订单');
             log.info('[首页]', '[用户无未支付订单]');
             //console.log("打开扫一扫");
-            wx.scanCode({
-              success: function (d) {
-                //console.log("完成扫一扫");
-                //console.log(d);
-                //兼容标准格式hlht://202001022222220101.330414214二维码
-                let scanResult = d.result;
-                if((!scanResult) || scanResult == ""){
-                  scanResult="*"
-                }
-                console.log(scanResult);
-                if (scanResult.startsWith("hlht://") || scanResult.startsWith("HLHT://")){
-                  scanResult = scanResult.substring(7, scanResult.indexOf("."));
-                }
-                console.log(scanResult);
-                log.info('[首页]', '[用户完成扫一扫]', scanResult);
-                log.info('[首页]', '[获取扫一扫充电桩]', '[请求]', scanResult);
-                wx.request({
-                  url: getApp().globalData.postHeadAgreement + '/restapi/wechat/chargPile',
-                  // data: scanResult,
-                  data: {
-                    chargPileId:scanResult,
-                    userId: that.data.userInfo.userId
-                  },
-                  method: 'POST',
-                  success(res) {
-                    console.log(scanResult);
-                    log.info('[首页]', '[获取扫一扫充电桩]', '[响应]', res.data);
-                    if (!res.data || res.data.code == 500) {
-                      that.scanFlag = false;
-                      wx.hideLoading();
-                      //没有该充电桩信息
-                      wx.showModal({
-                        showCancel: false,
-                        content: res && res.data && res.data.msg ? res.data.msg :'无效的终端编号',
-                        confirmColor:'#00AADD',
-                      });
-                    } else {
-                      res.data = res.data.result
-                      //充电状态0:离线、1:故障、2:空闲中、3:充电中、4:欠压故障、5:过压故障、6:过电流故障、8:预约、9:在线升级、10:操作中、11:已插枪等
-                      if (!res.data.chargstatus || res.data.chargstatus == 0 || res.data.chargstatus == 1 || res.data.chargstatus == 4 || res.data.chargstatus == 5 || res.data.chargstatus == 6 || res.data.chargstatus == 9) {
-                        //充电桩故障    
-                        wx.showModal({
-                          showCancel: false,
-                          content: '终端故障,维修中',
-                          confirmColor:'#00AADD',
-                        });
-                      } else if (res.data.chargstatus == 3 || res.data.chargstatus == 8 || res.data.chargstatus == 10) {
-                        wx.showModal({
-                          showCancel: false,
-                          content: '正在充电中',
-                          confirmColor:'#00AADD',
-                        });
-                      } else if (res.data.chargstatus == 2 || res.data.chargstatus == 11) {
-                        wx.setStorage({
-                          key: "scan_chargpile",
-                          data: res.data
-                        });
-                        log.info('[首页]', '[扫一扫充电桩空闲跳转去充电界面]');
-                        let url = `/pages/scan_result/scan_result`;
-                        that.scanFlag = false;
-                        wx.hideLoading();
-                        wx.navigateTo({
-                          url
-                        });
-                      }
-                      that.scanFlag = false;
-                      wx.hideLoading();
-                    }
-                  },
-                  fail(e) {
-                    getApp().showNetworkError();
-                  }
-                });
-              },
-              fail(e){
+            
+
+
+
+            if(inner){
+              wx.pro.scanCode().then(d=>{
+                that.afterScanCode(d,that,inner)
+              }).catch(e=>{
                 that.scanFlag = false;
                 wx.hideLoading();
-              }
-            });
+              });
+            }else{
+              that.afterScanCode(scanResult,that,inner)
+            }
+
+
+
           }
         },
         fail(e) {
@@ -778,6 +745,90 @@ Page({
     }
     
   },
+  afterScanCode(d,that,inner){
+    let scanResult = ""
+    if(inner){
+      //console.log("完成扫一扫");
+      //console.log(d);
+      //兼容标准格式hlht://202001022222220101.330414214二维码
+      scanResult = d.result;
+      if((!scanResult) || scanResult == ""){
+        scanResult="*"
+      }
+
+  }else{
+    scanResult = decodeURIComponent(d)
+    //console.log(charePileId);
+    log.info('[首页]', '[微信扫一扫]', { 'd': d });
+    if(!scanResult){
+      scanResult = "0"
+    }
+  }
+  if (scanResult.startsWith("hlht://") || scanResult.startsWith("HLHT://")){
+    scanResult = scanResult.                                                                                                                                                                                                                substring(7, scanResult.indexOf("."));
+  }
+  scanResult = scanResult.replace("https://cdgl.pjnes.com/", "");
+  scanResult = scanResult.replace("https://cdglyy.pjnes.com/", "");
+  console.log('扫描到的内容: [' + scanResult + '] , 是否内部按钮:' + inner)
+    log.info('[首页]', '[用户完成扫一扫]', scanResult);
+    log.info('[首页]', '[获取扫一扫充电桩]', '[请求]', scanResult);
+    wx.request({
+      url: getApp().globalData.postHeadAgreement + '/restapi/wechat/chargPile',
+      // data: scanResult,
+      data: {
+        chargPileId:scanResult,
+        userId: that.data.userInfo.userId
+      },
+      method: 'POST',
+      success(res) {
+        log.info('[首页]', '[获取扫一扫充电桩]', '[响应]', res.data);
+        if (!res.data || res.data.code == 500) {
+          that.scanFlag = false;
+          wx.hideLoading();
+          //没有该充电桩信息
+          wx.showModal({
+            showCancel: false,
+            content: res && res.data && res.data.msg ? res.data.msg :'无效的终端编号',
+            confirmColor:'#00AADD',
+          });
+        } else {
+          res.data = res.data.result
+          //充电状态0:离线、1:故障、2:空闲中、3:充电中、4:欠压故障、5:过压故障、6:过电流故障、8:预约、9:在线升级、10:操作中、11:已插枪等
+          if (!res.data.chargstatus || res.data.chargstatus == 0 || res.data.chargstatus == 1 || res.data.chargstatus == 4 || res.data.chargstatus == 5 || res.data.chargstatus == 6 || res.data.chargstatus == 9) {
+            //充电桩故障    
+            wx.showModal({
+              showCancel: false,
+              content: '终端故障,维修中',
+              confirmColor:'#00AADD',
+            });
+          } else if (res.data.chargstatus == 3 || res.data.chargstatus == 8 || res.data.chargstatus == 10) {
+            wx.showModal({
+              showCancel: false,
+              content: '正在充电中',
+              confirmColor:'#00AADD',
+            });
+          } else if (res.data.chargstatus == 2 || res.data.chargstatus == 11) {
+            wx.setStorage({
+              key: "scan_chargpile",
+              data: res.data
+            });
+            log.info('[首页]', '[扫一扫充电桩空闲跳转去充电界面]');
+            let url = `/pages/scan_result/scan_result`;
+            that.scanFlag = false;
+            wx.hideLoading();
+            wx.navigateTo({
+              url
+            });
+          }
+          that.scanFlag = false;
+          wx.hideLoading();
+        }
+      },
+      fail(e) {
+        getApp().showNetworkError();
+      }
+    });
+  },
   //地图位移
   mapchange(e) {
     if (e.type == 'end') {
@@ -842,6 +893,7 @@ Page({
                     address: item.address,
                     width: "46rpx",
                     height: "67rpx",
+                    chargfeatures: item.chargfeatures ,
                     iconPath: iconPath,
                     id: item.id,
                     callout: {},
@@ -901,6 +953,8 @@ Page({
   },
 
   phoneCheck(){
+
+
     if (this.data.userInfo.bindingPhone==0) {
       wx.showModal({
         title: '提示',

+ 1 - 1
pages/index/index.wxml

@@ -80,7 +80,7 @@
     <image src='/images/index_selected.png'></image>
     <text class='selected'>首页</text>
   </view>
-  <view class='footer_2' bindtap='click_scan_control' wx:if='{{!userInfo.flag}}'>
+  <view class='footer_2' bindtap="click_scan_control_outer" wx:if='{{!userInfo.flag}}'>
     <image src='/images/scan.png'></image>
   </view>
   <view class='footer_3' bindtap='bindUserAvatarUrl'>

+ 3 - 3
pages/scan_result/scan_result.wxml

@@ -63,12 +63,12 @@
       <rich-text style='line-height:48rpx;color:red;font-size:32rpx;word-break:break-all;'>信息展现:{{chargPile.showinfo}}</rich-text> 
     </view> -->
   </view>
+  <view wx:if="{{chargPile.showinfo}}" style='margin-top:24rpx;'>
+    <rich-text style='line-height:48rpx;color:#1D9BF7;font-size:32rpx;word-break:break-all;font-weight: bold;'>{{chargPile.showinfo}}</rich-text>
+  </view>
   <view  style='margin-top:24rpx;'>
     <rich-text style='line-height:48rpx;color:red;font-size:32rpx;word-break:break-all;'>您当前余额为:{{repaidbalance}}元。</rich-text><rich-text style='line-height:48rpx;color:black;font-size:32rpx;word-break:break-all;'>建议参考充电总费用(元/度电)与您爱车的电池容量(度),避免因费用不足导致充电量不足的情况发生。</rich-text>
   </view>
-  <view wx:if="{{chargPile.showinfo}}" style='margin-top:24rpx;'>
-    <rich-text style='line-height:48rpx;color:black;font-size:32rpx;word-break:break-all;'>{{chargPile.showinfo}}</rich-text>
-  </view>
   <button wx:if="{{chargPile}}" class='charg_button' bindtap="beginCharge" >开始充电</button>
 
 <!-- <view style="width: 100%;margin-top:50rpx">

+ 4 - 0
pages/search_result/search_result.js

@@ -96,6 +96,7 @@ Page({
                   width: "46rpx",
                   height: "67rpx",
                   iconPath: "/images/marker.png",
+                  chargfeatures:item.chargfeatures,
                   id: item.id,
                   callout: {},
                   latitude: item.lat,
@@ -158,6 +159,7 @@ Page({
               width: "46rpx",
               height: "67rpx",
               iconPath: "/images/marker.png",
+              chargfeatures:item.chargfeatures,
               id: item.id,
               callout: {},
               latitude: item.lat,
@@ -285,6 +287,7 @@ Page({
                   width: "46rpx",
                   height: "67rpx",
                   iconPath: "/images/marker.png",
+                  chargfeatures:item.chargfeatures,
                   id: item.id,
                   callout: {},
                   latitude: item.lat,
@@ -351,6 +354,7 @@ Page({
               width: "46rpx",
               height: "67rpx",
               iconPath: "/images/marker.png",
+              chargfeatures:item.chargfeatures,
               id: item.id,
               callout: {},
               latitude: item.lat,

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

@@ -8,7 +8,7 @@
           <image src='/images/myworksheet.png'></image>
         </view>
         <view class='worksheet_text_title1'>
-          <view class='bold inline'>{{item.chargStationName}}</view>
+          <view class='bold inline'>{{item.chargStationName==null?'无关联场站':item.chargStationName}}</view>
           <view class="h1 inline">{{item.mainLocation==null?'':item.mainLocation}}</view>
         </view>
       </view>

+ 38 - 4
pages/worksheetinfo/addworksheetinfo.js

@@ -93,6 +93,7 @@ Page({
     accendantids: [],
     userNames:[],
     chargStationName:'',
+    chargStationNameClearFlag: true
 
   },
   bindChargstationsChange: function(e) {
@@ -220,9 +221,34 @@ Page({
     this.data.pcitures.forEach((item, index) =>{
       pciString.push(item.src);
     });
-
+    if(worksheetinfo.mainLocation == '' || worksheetinfo.mainLocation == undefined){
+      wx.showModal({
+        showCancel: false,
+        content: '地址不能为空,请填写!',
+        confirmColor:'#00AADD',
+      });
+      return;
+    }
+    if(worksheetinfo.pams.length == 0){
+      wx.showModal({
+        showCancel: false,
+        content: '运维人员不能为空,请填写!',
+        confirmColor:'#00AADD',
+      });
+      return;
+    }
+    if(worksheetinfo.content == '' || worksheetinfo.content == undefined){
+      wx.showModal({
+        showCancel: false,
+        content: '工作内容不能为空,请填写!',
+        confirmColor:'#00AADD',
+      });
+      return;
+    }
     let signs = this.data.signs;
     console.log(signs.length == 0);
+
+
     var signString = [];
     if (signs.length == 0) {
       //2021-1-1撤销校验
@@ -421,6 +447,14 @@ Page({
     })
   },
 
+  clear_chargStationName(e){
+    this.setData({
+      worksheetinfo:{chargStationId: 0,pams:[]},
+      chargStationNameClearFlag: true
+
+    });
+  },
+
   /**
    * 生命周期函数--监听页面加载
    */
@@ -434,7 +468,7 @@ Page({
     // //worksheetinfo.breakdownType = 2;
     // this.setData({
     //   worksheetinfo
-    // });z
+    // });
     let worksheetinfo = {
       workStatus: 1,
       workBigclass: 1,
@@ -498,12 +532,12 @@ Page({
           let chargStationId=0;
           chargstations.forEach((item, index) => {
             chargStationName = item.chargStationName
-            chargStationId = item.id
+            // chargStationId = item.id
           });
           let worksheetinfo = that.data.worksheetinfo;
           worksheetinfo.chargStationId = chargStationId;
           that.setData({
-            chargStationName,
+            // chargStationName:that.data.chargStationNameNullValue,
             worksheetinfo 
           });
         }

+ 8 - 1
pages/worksheetinfo/addworksheetinfo.wxml

@@ -6,7 +6,14 @@
 <scroll-view scroll-y='true'>
   <view class="context">
     <text>场站</text>
-    <view class='input' bindtap='chargStationNameSelect' type='text'>{{chargStationName}}</view>
+    <view class='input' type='text'>
+    <!-- 有清除按钮 -->
+    <view class="span_withclear" bindtap='chargStationNameSelect' wx:if="{{!chargStationNameClearFlag}}">{{chargStationName}}</view>
+    <image class='img_clear' bindtap='clear_chargStationName' src="/images/clear.png"  wx:if="{{!chargStationNameClearFlag}}"></image>
+    <!-- 木有清除按钮 -->
+    <view class="span_withoutclear" bindtap='chargStationNameSelect' wx:if="{{chargStationNameClearFlag}}">请选择</view>
+    </view>
+  
     <!-- <picker class="picker" disabled="{{worksheetinfo.workStatus==6}}" bindchange="bindChargstationsChange" value="{{chargstationsindex}}" range-key="chargStationName" range="{{chargstations}}">
       <text>{{chargstations[chargstationsindex].chargStationName}}</text>
     </picker> -->

+ 22 - 0
pages/worksheetinfo/addworksheetinfo.wxss

@@ -62,6 +62,28 @@ text {
   margin-right: 0;
   width: 100%;
 }
+
+.input .span_withoutclear{
+  float: left;
+  line-height: 87rpx;
+  min-height: 87rpx;
+  width: 100%;
+}
+
+.input .span_withclear{
+  float: left;
+  line-height: 87rpx;
+  min-height: 87rpx;
+  width: calc(100% - 50rpx);  
+}
+
+.img_clear{
+  float: right;
+  width: 40rpx;
+  height:40rpx;
+ margin: 30rpx -4rpx 30rpx 8rpx;
+}
+
 .context_image {
   margin: 0rpx 32rpx;
   height: 239rpx;

+ 1 - 0
pages/worksheetinfo/findstation.js

@@ -72,6 +72,7 @@ Page({
       worksheetinfo.mainLocation =  keywords.address;
       prevPage.setData({
         chargStationName,
+        chargStationNameClearFlag:false,
         worksheetinfo
       });
     }

+ 32 - 2
pages/worksheetinfo/worksheetinfo.js

@@ -91,7 +91,7 @@ Page({
     accendantids: [],
     userNames:[],
     chargStationName:'',
-
+    chargStationNameClearFlag: true
 
 
 
@@ -218,7 +218,30 @@ Page({
     this.data.pcitures.forEach((item, index) =>{
       pciString.push(item.src);
     });
-
+    if(worksheetinfo.mainLocation == '' || worksheetinfo.mainLocation == undefined){
+      wx.showModal({
+        showCancel: false,
+        content: '地址不能为空,请填写!',
+        confirmColor:'#00AADD',
+      });
+      return;
+    }
+    if(worksheetinfo.pams.length == 0){
+      wx.showModal({
+        showCancel: false,
+        content: '运维人员不能为空,请填写!',
+        confirmColor:'#00AADD',
+      });
+      return;
+    }
+    if(worksheetinfo.content == '' || worksheetinfo.content == undefined){
+      wx.showModal({
+        showCancel: false,
+        content: '工作内容不能为空,请填写!',
+        confirmColor:'#00AADD',
+      });
+      return;
+    }
     let signs = this.data.signs;
     console.log(signs.length == 0);
     var signString = [];
@@ -418,6 +441,13 @@ Page({
     })
   },
 
+  clear_chargStationName(e){
+    this.setData({
+      worksheetinfo:{chargStationId: 0,pams:[]},
+      chargStationNameClearFlag: true
+    });
+  },
+
   /**
    * 生命周期函数--监听页面加载
    */

+ 7 - 1
pages/worksheetinfo/worksheetinfo.wxml

@@ -2,7 +2,13 @@
 <scroll-view scroll-y='true'>
   <view class="context">
     <text>场站</text>
-    <view class='input' bindtap='chargStationNameSelect' type='text'>{{chargStationName}}</view>
+    <view class='input' type='text'>
+    <!-- 有清除按钮 -->
+    <view class="span_withclear" bindtap='chargStationNameSelect' wx:if="{{!chargStationNameClearFlag}}">{{chargStationName}}</view>
+    <image class='img_clear' bindtap='clear_chargStationName' src="/images/clear.png"  wx:if="{{!chargStationNameClearFlag}}"></image>
+    <!-- 木有清除按钮 -->
+    <view class="span_withoutclear" bindtap='chargStationNameSelect' wx:if="{{chargStationNameClearFlag}}">请选择</view>
+    </view>
     <!-- <picker class="picker" disabled="{{worksheetinfo.workStatus==6}}" bindchange="bindChargstationsChange" value="{{chargstationsindex}}" range-key="chargStationName" range="{{chargstations}}">
       <text>{{chargstations[chargstationsindex].chargStationName}}</text>
     </picker> -->

+ 24 - 0
pages/worksheetinfo/worksheetinfo.wxss

@@ -62,6 +62,30 @@ text {
   margin-right: 0;
   width: 100%;
 }
+
+
+.input .span_withoutclear{
+  float: left;
+  line-height: 87rpx;
+  min-height: 87rpx;
+  width: 100%;
+}
+
+.input .span_withclear{
+  float: left;
+  line-height: 87rpx;
+  min-height: 87rpx;
+  width: calc(100% - 50rpx);  
+}
+
+.img_clear{
+  float: right;
+  width: 40rpx;
+  height:40rpx;
+ margin: 30rpx -4rpx 30rpx 8rpx;
+}
+
+
 .context_image {
   margin: 0rpx 32rpx;
   height: 239rpx;

+ 5 - 2
project.config.json

@@ -33,11 +33,14 @@
     "packNpmManually": false,
     "packNpmRelationList": [],
     "minifyWXSS": true,
-    "ignoreUploadUnusedFiles": true
+    "ignoreUploadUnusedFiles": true,
+    "condition": false
   },
   "compileType": "miniprogram",
   "simulatorType": "wechat",
-  "simulatorPluginLibVersion": {},
+  "simulatorPluginLibVersion": {
+    "wxext14566970e7e9f62": "2.27.3"
+  },
   "condition": {
     "miniprogram": {
       "list": [

+ 2 - 2
project.private.config.json

@@ -1,8 +1,8 @@
 {
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "libVersion": "2.29.1",
   "projectname": "wechat-pilelog",
   "setting": {
     "compileHotReLoad": true
-  }
+  },
+  "libVersion": "2.31.0"
 }

+ 8 - 0
project.private.config.json.bak

@@ -0,0 +1,8 @@
+{
+  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+  "libVersion": "2.30.0",
+  "projectname": "wechat-pilelog",
+  "setting": {
+    "compileHotReLoad": true
+  }
+}

File diff suppressed because it is too large
+ 0 - 0
utils/wx-promise-pro.js


Some files were not shown because too many files changed in this diff