hailu
2023-12-21 bacb43376528c54d2be88f12ab59fbeb534ea370
备份
13个文件已修改
283 ■■■■■ 已修改文件
GoldC/pages/devicelogs/devicelogs.js 102 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
GoldC/pages/personSet/personSet.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
GoldC/pages/problemList/problemList.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
GoldC/pages/problemList/problemList.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
GoldC/pages/problemList/problemList.wxml 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
GoldC/pages/problemListwx/problemListwx.js 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
GoldC/pages/problemListwx/problemListwx.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
GoldC/pages/problemListwx/problemListwx.wxml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
GoldC/pages/problemReport/proRep.js 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
GoldC/pages/prorepwx/prorepwx.js 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
GoldC/pages/prorepwx/prorepwx.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
GoldC/pages/yetAZ/yetAZ.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
GoldC/pages/yetWX/yetWX.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
GoldC/pages/devicelogs/devicelogs.js
@@ -56,57 +56,57 @@
  },
  choseLocation() {
    console.log(111);
    wx.chooseLocation({
      success: (res) => {
        console.log(res)
        // this.setData({
        //   address: res.name,
        //   detailedaddress: res.address,
        //   locmap: {
        //     latitude: res.latitude,
        //     longitude: res.longitude
        //   },
        //   markers: [{
        //     id: 0,
        //     latitude: res.latitude,
        //     longitude: res.longitude,
        //     iconPath: '/images/ProRep/weizhi.png',
        //     width: '50rpx',
        //     height: '50rpx'
        //   }]
        // })
      },
      fail: () => {
        wx.getSetting({
          success: (res) => {
            var statu = res.authSetting;
            if (!statu['scope.userLocation']) { //未授权
              wx.showModal({
                title: '授权定位',
                content: '需要获取您的地理位置,请先设置授权',
                // cancelColor: 'skyblue',
                confirmText: "去设置",
                success: (res) => {
                  console.log(res);
                  if (res.cancel) {
                    //点击取消,默认隐藏弹框
                  } else {
                    //点击确定
                    wx.openSetting({
                      withSubscriptions: true,
                      success: (res) => {
                        console.log(res);
                        this.onLoad()
                      }
                    })
                  }
                }
              })
            }
          }
        })
      }
    })
    // wx.chooseLocation({
    //   success: (res) => {
    //     console.log(res)
    //     // this.setData({
    //     //   address: res.name,
    //     //   detailedaddress: res.address,
    //     //   locmap: {
    //     //     latitude: res.latitude,
    //     //     longitude: res.longitude
    //     //   },
    //     //   markers: [{
    //     //     id: 0,
    //     //     latitude: res.latitude,
    //     //     longitude: res.longitude,
    //     //     iconPath: '/images/ProRep/weizhi.png',
    //     //     width: '50rpx',
    //     //     height: '50rpx'
    //     //   }]
    //     // })
    //   },
    //   fail: () => {
    //     wx.getSetting({
    //       success: (res) => {
    //         var statu = res.authSetting;
    //         if (!statu['scope.userLocation']) { //未授权
    //           wx.showModal({
    //             title: '授权定位',
    //             content: '需要获取您的地理位置,请先设置授权',
    //             // cancelColor: 'skyblue',
    //             confirmText: "去设置",
    //             success: (res) => {
    //               console.log(res);
    //               if (res.cancel) {
    //                 //点击取消,默认隐藏弹框
    //               } else {
    //                 //点击确定
    //                 wx.openSetting({
    //                   withSubscriptions: true,
    //                   success: (res) => {
    //                     console.log(res);
    //                     this.onLoad()
    //                   }
    //                 })
    //               }
    //             }
    //           })
    //         }
    //       }
    //     })
    //   }
    // })
  },
  goMap() {
    let plugin = requirePlugin('routePlan');
GoldC/pages/personSet/personSet.wxml
@@ -28,7 +28,7 @@
    <view class="text">
      住址
    </view>
    <text class="" style="margin-right: 10px;"> {{personInfo.region?personInfo.region:'--'}}</text>
    <text class="" style="margin-right: 10px;"> {{personInfo.address?personInfo.address:'--'}}</text>
    <!-- <text class="iconfont icon-xiangyoujiantou"></text> -->
  </view>
GoldC/pages/problemList/problemList.js
@@ -188,6 +188,7 @@
      nickName: wx.getStorageSync('nickName'),
      index:1
    })
    this.getNumInfo()
    this.getList()
  },
  changeActive2(e) {
GoldC/pages/problemList/problemList.json
@@ -3,7 +3,8 @@
    "van-tabs":"/miniprogram_npm/vant-weapp/tabs",
    "van-tab":"/miniprogram_npm/vant-weapp/tab",
    "van-loading":"/miniprogram_npm/vant-weapp/loading",
    "van-icon": "/miniprogram_npm/vant-weapp/icon"
    "van-icon": "/miniprogram_npm/vant-weapp/icon",
    "van-tag": "/miniprogram_npm/vant-weapp/tag"
  },
  "navigationBarTitleText": "安装列表"
}
GoldC/pages/problemList/problemList.wxml
@@ -10,7 +10,7 @@
    </van-tab>
  </van-tabs>
</view>
<van-tabs active="{{ active1 }}"  info='2' bind:change="changeActive1">
<van-tabs active="{{ active1 }}" info='2' bind:change="changeActive1">
  <!-- 已上报 -->
  <van-tab title="未派单" info="{{info1}}">
    <view class="listBox">
@@ -24,7 +24,9 @@
            订单详情:
          </view>
          <view class="text">用户姓名:{{item.userName}}</view>
          <view class="text">用户电话:{{item.userPhone}} <van-icon data-base='{{item}}' bind:tap="call" name="phone" style="font-size: 18px;color: #1E90FF;position: relative;top: 3px;" /></view>
          <view class="text">用户电话:{{item.userPhone}}
            <van-icon data-base='{{item}}' bind:tap="call" name="phone" style="font-size: 18px;color: #1E90FF;position: relative;top: 3px;" />
          </view>
          <view class="text">
            预约时间:<text>{{item.appointmentTime?item.appointmentTime:'--'}}</text>
          </view>
@@ -69,10 +71,12 @@
        <view class="body">
          <view class="h2txt">
            <image class="primg" src="/images/ProRep/pingding.png"></image>
            订单详情:
            订单详情: <van-tag wx:if="{{item.finishTimeoutFlag}}" color="#FF4949" text-color="#fff">接单超时</van-tag>
          </view>
          <view class="text">用户姓名:{{item.userName}}</view>
          <view class="text">用户电话:{{item.userPhone}} <van-icon data-base='{{item}}' bind:tap="call" name="phone" style="font-size: 18px;color: #1E90FF;position: relative;top: 3px;" /></view>
          <view class="text">用户电话:{{item.userPhone}}
            <van-icon data-base='{{item}}' bind:tap="call" name="phone" style="font-size: 18px;color: #1E90FF;position: relative;top: 3px;" />
          </view>
          <view class="text" wx:if="{{roleKey!='tenantservice'}}">
            安装工人:<text>{{item.erectoName?item.erectoName:'--'}}</text>
          </view>
@@ -120,9 +124,12 @@
          <view class="h2txt">
            <image class="primg" src="/images/ProRep/pingding.png"></image>
            订单详情:
            <van-tag wx:if="{{item.finishTimeoutFlag}}" color="#007AAE" text-color="#fff">结单超时</van-tag>
          </view>
          <view class="text">用户姓名:{{item.userName}}</view>
          <view class="text">用户电话:{{item.userPhone}} <van-icon data-base='{{item}}' bind:tap="call" name="phone" style="font-size: 18px;color: #1E90FF;position: relative;top: 3px;" /></view>
          <view class="text">用户电话:{{item.userPhone}}
            <van-icon data-base='{{item}}' bind:tap="call" name="phone" style="font-size: 18px;color: #1E90FF;position: relative;top: 3px;" />
          </view>
          <view class="text" wx:if="{{roleKey!='tenantservice'}}">
            安装工人:<text>{{item.erectoName?item.erectoName:'--'}}</text>
          </view>
@@ -144,7 +151,7 @@
        <view class="footer">
          <view class="libtn">
            <!-- 修改 -->
            <view class="btn btn-jd" data-id="{{item.pk_Examine}}" data-base='{{item}}' bind:tap="statements">
            <view class="btn btn-jd" data-id="{{item.pk_Examine}}" data-base='{{item}}' bind:tap="statements" wx:if="{{item.erectoName==nickName}}">
              <van-icon name="success" class="icon" />
              <text>结单</text>
            </view>
@@ -163,7 +170,8 @@
        <view class="body">
          <view class="h2txt">
            <image class="primg" src="/images/ProRep/pingding.png"></image>
            订单详情:
            订单详情:<van-tag wx:if="{{item.finishTimeoutFlag}}" style="margin-right: 5px;" color="#FF4949" text-color="#fff">接单超时</van-tag>
            <van-tag wx:if="{{item.finishTimeoutFlag}}" color="#007AAE" text-color="#fff">结单超时</van-tag>
          </view>
          <view class="text">用户姓名:{{item.userName}}</view>
          <view class="text">用户电话:{{item.userPhone}}
@@ -211,7 +219,7 @@
<view class="page-control" wx:if="{{showPage}}">
  <view class="page-control-btns">
    <!-- class="page-btn {{prevBtnDis?'btn-disabled':''}}" -->
    <button class="page-btn {{total<=1||index==1?'btn-disabled':''}}"  disabled="{{total<=1||index==1}}" bindtap="prevPage">上一页</button>
    <button class="page-btn {{total<=1||index==1?'btn-disabled':''}}" disabled="{{total<=1||index==1}}" bindtap="prevPage">上一页</button>
    <view class="page-number" bindtap="shopPagePopup"><text>{{index}}</text>/<text>{{total}}</text></view>
    <button class="page-btn {{total<=1||index==total?'btn-disabled':''}}" disabled="{{total<=1||index==total}}" bindtap="nextPage">下一页</button>
    <!-- class="page-btn {{nextBtnDis?'btn-disabled':''}}" -->
GoldC/pages/problemListwx/problemListwx.js
@@ -47,7 +47,6 @@
    info2: 0,
    info3: 0,
    info4: 0,
  },
  lifetimes: {
    // 在组件实例进入页面节点树时执行
@@ -106,20 +105,20 @@
  //更改页码点击事件
  onChangePage: function (e) {
    //console.log("更改页码事件:",e);
    this.setData({
      pageMask: false,
      index: e.currentTarget.dataset.index //点击的页数
    })
    this.getList()
    // 先判断当前页数,是否需要更新disabled的状态
    this.triggerParent();
  },
  //上一页点击事件
  prevPage: function () {
   if (this.data.index <= 1) {
    if (this.data.index <= 1) {
      this.setData({
        prevBtnDis: false,
      })
@@ -137,6 +136,7 @@
    this.getList()
    this.triggerParent();
   
  },
  //下一页点击事件
  nextPage: function () {
@@ -162,7 +162,7 @@
    this.triggerParent();
    // 更新按钮状态
  },
  changeActive1(e) {
    console.log(e.detail.index);
@@ -396,8 +396,8 @@
    })
  },
  goAddress(e) {
    let that=this
    var address = e.currentTarget.dataset.base.address
    console.log(e.currentTarget.dataset);
    wx.request({
      url: 'https://apis.map.qq.com/ws/geocoder/v1/',
      data: {
@@ -405,14 +405,13 @@
        key: 'SRGBZ-FLCKU-2TIVH-BFHUM-D5CTO-LFBHQ'
      },
      success: function (res) {
        if (res.data.status != 200) {
        if (res.data.status != 0) {
          wx.showToast({
            title: res.data.message,
            icon: 'error'
          })
          return false
        }
        console.log(res.data.result.location);  // 打印出经纬度
        let params = res.data.result.location
        params.name = e.currentTarget.dataset.base.userName
        params.address = e.currentTarget.dataset.base.address
GoldC/pages/problemListwx/problemListwx.json
@@ -3,7 +3,9 @@
    "van-tabs":"/miniprogram_npm/vant-weapp/tabs",
    "van-tab":"/miniprogram_npm/vant-weapp/tab",
    "van-loading":"/miniprogram_npm/vant-weapp/loading",
    "van-icon": "/miniprogram_npm/vant-weapp/icon"
    "van-icon": "/miniprogram_npm/vant-weapp/icon",
    "van-tag": "/miniprogram_npm/vant-weapp/tag"
  },
  "navigationBarTitleText": "维修列表"
}
GoldC/pages/problemListwx/problemListwx.wxml
@@ -35,7 +35,7 @@
            <image class="timeicon" src="/images/ProRep/weizhi.png" style="margin-left: 10rpx;" mode="" />
          </view>
          <view class="text">
            故障描述:<text>{{item.remark?item.remark:'--'}}</text>
            故障描述:<text>{{item.description?item.description:'--'}}</text>
          </view>
          <view class="time" wx:if='{{item.receiveTime}}'>
            <image class="timeicon" src="/images/time.png"></image>
@@ -71,7 +71,7 @@
        <view class="body">
          <view class="h2txt">
            <image class="primg" src="/images/ProRep/pingding.png"></image>
            订单详情:
            订单详情: <text wx:if="{{item.finishTimeoutFlag == 1}}"><van-tag color="#FF4949" text-color="#fff">接单超时</van-tag></text>
          </view>
          <view class="text">用户姓名:{{item.userName}}</view>
          <view class="text">用户电话:{{item.userPhone}}
@@ -88,7 +88,7 @@
            <image class="timeicon" src="/images/ProRep/weizhi.png" style="margin-left: 10rpx;" mode="" />
          </view>
          <view class="text">
            故障描述:<text>{{item.remark?item.remark:'--'}}</text>
            故障描述:<text>{{item.description?item.description:'--'}}</text>
          </view>
          <view class="time" wx:if='{{item.receiveTime}}'>
            <image class="timeicon" src="/images/time.png"></image>
@@ -123,7 +123,7 @@
        <view class="body">
          <view class="h2txt">
            <image class="primg" src="/images/ProRep/pingding.png"></image>
            订单详情:
            订单详情: <text wx:if="{{item.finishTimeoutFlag == 1}}"><van-tag color="#007AAE" text-color="#fff">结单超时</van-tag></text>
          </view>
          <view class="text">用户姓名:{{item.userName}}</view>
          <view class="text">用户电话:{{item.userPhone}}
@@ -140,7 +140,7 @@
            <image class="timeicon" src="/images/ProRep/weizhi.png" style="margin-left: 10rpx;" mode="" />
          </view>
          <view class="text">
            故障描述:<text>{{item.remark?item.remark:'--'}}</text>
            故障描述:<text>{{item.description?item.description:'--'}}</text>
          </view>
          <view class="time" wx:if='{{item.receiveTime}}'>
            <image class="timeicon" src="/images/time.png"></image>
@@ -169,7 +169,8 @@
        <view class="body">
          <view class="h2txt">
            <image class="primg" src="/images/ProRep/pingding.png"></image>
            订单详情:
            订单详情:<van-tag wx:if="{{item.finishTimeoutFlag}}" style="margin-right: 5px;" color="#FF4949" text-color="#fff">接单超时</van-tag>
            <van-tag wx:if="{{item.finishTimeoutFlag}}" color="#007AAE" text-color="#fff">结单超时</van-tag>
          </view>
          <view class="text">用户姓名:{{item.userName}}</view>
          <view class="text">用户电话:{{item.userPhone}}
@@ -187,7 +188,7 @@
            <image class="timeicon" src="/images/ProRep/weizhi.png" style="margin-left: 10rpx;" mode="" />
          </view>
          <view class="text">
            故障描述:<text>{{item.remark?item.remark:'--'}}</text>
            故障描述:<text>{{item.description?item.description:'--'}}</text>
          </view>
          <view class="time" wx:if='{{item.receiveTime}}'>
            <image class="timeicon" src="/images/time.png"></image>
GoldC/pages/problemReport/proRep.js
@@ -231,7 +231,7 @@
              let data = compressedFilePath
              wx.uploadFile({
                // 上传接口路径
                url: `https://puyue.yhupai.com/prod-api/iot/deviceOrder/profile/avatar`,
                url: `https://puyue.yhupai.com/prod-api/iot/deviceOrder/Install/profile/avatar`,
                filePath: data,
                name: 'avatarfile', // 上传文件对应的 key 名称
                method: 'post',
@@ -293,8 +293,30 @@
            deviceList1: res.data.rows,
            deviceList2: data
          })
          this.data.form.deviceId = res.data.rows[0].deviceId
          this.data.form.deviceName = res.data.rows[0].deviceName
          if (this.data.showJD) {
            data = []
            res.data.rows.unshift({deviceId: this.data.paramsInfo.deviceId, deviceName: this.data.paramsInfo.device.deviceName})
            for (let i = 0; i < res.data.rows.length; i++) {
              data.push(res.data.rows[i].deviceName)
            }
            this.setData({
              deviceList1: res.data.rows,
              deviceList2: data
            })
            console.log(this.data.deviceList1, this.data.paramsInfo);
            for (let i = 0; i < this.data.deviceList1.length; i++) {
              if (this.data.deviceList1[i].deviceId == this.data.paramsInfo.deviceId) {
                console.log(i);
                this.setData({
                  deviceIndex: i,
                })
              }
            }
          } else {
            this.data.form.deviceId = res.data.rows[0].deviceId
            this.data.form.deviceName = res.data.rows[0].deviceName
          }
        }
      }
    })
@@ -323,10 +345,10 @@
          });
        } else {
          console.log(res);
          res.data.rows.unshift({
            nickName:'未指派',
            erectoId:-1
            nickName: '未指派',
            erectoId: -1
          })
          let data1 = []
          for (let i = 0; i < res.data.rows.length; i++) {
@@ -336,7 +358,7 @@
            erectoList1: res.data.rows,
            erectoList2: data1
          })
          if (this.data.showJD) {
            console.log(11111111111);
            for (let i = 0; i < this.data.erectoList1.length; i++) {
GoldC/pages/prorepwx/prorepwx.js
@@ -41,7 +41,7 @@
    selectDate: '',
    paramsInfo: {},
    showJD: false,
    view:false,
    view: false,
  },
  /**
   * 生命周期函数--监听页面加载
@@ -56,15 +56,15 @@
        paramsInfo: info,
        form: info,
        time: info.appointmentTime,
        deviceIndex: 0,
        deviceList2: [info.device.deviceName],
        // deviceIndex: 0,
        // deviceList2: [info.device.deviceName],
        // erectoIndex: 0,
        // erectoList2: [info.erectoName],
        view:info.imgUrl?true:false
        view: info.imgUrl ? true : false
      })
      wx.setNavigationBarTitle({
        title:'ID'+this.data.form.id+' | '+this.data.form.device.deviceName
        title: 'ID' + this.data.form.id + ' | ' + this.data.form.device.deviceName
      })
    }
    this.getErectoList()
@@ -80,7 +80,7 @@
    this.data.form.address = e.detail.value
  },
  changeRemark(e) {
    this.data.form.remark = e.detail.value
    this.data.form.description = e.detail.value
  },
  Cancel() {
    wx.navigateBack()
@@ -95,8 +95,14 @@
          icon: 'none'
        });
        return
      }else if(!this.data.form.description){
        wx.showToast({
          title: '请输入故障描述',
          icon: 'none'
        });
        return
      }
      this.data.form.orderType='2'
      this.data.form.orderType = '2'
      if (this.data.form.appointmentTime) {
        this.data.form.appointmentTime += ':00'
      }
@@ -141,8 +147,14 @@
          icon: 'none'
        })
        return
      }else if(!this.data.form.description){
        wx.showToast({
          title: '请输入故障描述',
          icon: 'none'
        });
        return
      }
      this.data.form.orderType='2'
      this.data.form.orderType = '2'
      if (this.data.form.appointmentTime) {
        this.data.form.appointmentTime += ':00'
      }
@@ -188,13 +200,19 @@
          icon: 'none'
        })
        return
      }else if(!this.data.form.description){
        wx.showToast({
          title: '请输入故障描述',
          icon: 'none'
        });
        return
      }
      if (this.data.form.appointmentTime) {
        this.data.form.appointmentTime += ':00'
      }
      this.data.form.orderType='2'
      this.data.form.repairFlag=1,
      console.log(this.data.form);
      this.data.form.orderType = '2'
      this.data.form.repairFlag = 1,
        console.log(this.data.form);
      wx.request({
        url: `https://puyue.yhupai.com/prod-api/iot/deviceOrder`,
        method: "post",
@@ -239,7 +257,7 @@
              let data = compressedFilePath
              wx.uploadFile({
                // 上传接口路径
                url: `https://puyue.yhupai.com/prod-api/iot/deviceOrder/profile/avatar`,
                url: `https://puyue.yhupai.com/prod-api/iot/deviceOrder/Repair/profile/avatar`,
                filePath: data,
                name: 'avatarfile', // 上传文件对应的 key 名称
                method: 'post',
@@ -301,8 +319,31 @@
            deviceList1: res.data.rows,
            deviceList2: data
          })
          this.data.form.deviceId = res.data.rows[0].deviceId
          this.data.form.deviceName = res.data.rows[0].deviceName
          if (this.data.showJD) {
            data = []
            res.data.rows.unshift({deviceId: this.data.paramsInfo.deviceId, deviceName: this.data.paramsInfo.device.deviceName})
            for (let i = 0; i < res.data.rows.length; i++) {
              data.push(res.data.rows[i].deviceName)
            }
            this.setData({
              deviceList1: res.data.rows,
              deviceList2: data
            })
            console.log(11111111111);
            for (let i = 0; i < this.data.deviceList1.length; i++) {
              if (this.data.deviceList1[i].userId == this.data.paramsInfo.deviceId) {
                console.log(i);
                this.setData({
                  deviceIndex: i,
                })
              }
            }
          } else {
            this.data.form.deviceId = res.data.rows[0].deviceId
            this.data.form.deviceName = res.data.rows[0].deviceName
          }
        }
      }
    })
@@ -330,10 +371,10 @@
          });
        } else {
          console.log(res);
          res.data.rows.unshift({
            nickName:'未指派',
            erectoId:-1
            nickName: '未指派',
            erectoId: -1
          })
          let data1 = []
          for (let i = 0; i < res.data.rows.length; i++) {
@@ -343,7 +384,7 @@
            erectoList1: res.data.rows,
            erectoList2: data1
          })
          if (this.data.showJD) {
            console.log(11111111111);
            for (let i = 0; i < this.data.erectoList1.length; i++) {
GoldC/pages/prorepwx/prorepwx.wxml
@@ -86,7 +86,7 @@
<view>
  <view class="title">
    <image class="primg" src="/images/ProRep/uptext.png"></image>
    <view>订单备注</view>
    <view>故障描述</view>
  </view>
  <textarea bindinput="changeRemark" disabled="{{view}}" class="textbox" value="{{form.description?form.description:view?' ':''}}" placeholder="请输入订单备注..."></textarea>
</view>
GoldC/pages/yetAZ/yetAZ.js
@@ -59,6 +59,7 @@
        deviceList2: [info.device.deviceName],
        erectoIndex: 0,
        erectoList2: [info.erectoName],
        view:info.imgUrl?true:false
      })
      wx.setNavigationBarTitle({
        title:'ID'+this.data.form.id+' | '+this.data.form.device.deviceName
GoldC/pages/yetWX/yetWX.js
@@ -58,6 +58,7 @@
        deviceList2: [info.device.deviceName],
        erectoIndex: 0,
        erectoList2: [info.erectoName],
        view:info.imgUrl?true:false
      })
      wx.setNavigationBarTitle({
        title:'ID'+this.data.form.id+' | '+this.data.form.device.deviceName