menc 2 anni fa
parent
commit
8dca0cfd95

+ 3 - 1
base/httputil.js

@@ -1,6 +1,8 @@
 // let BASE_Server = "http://127.0.0.1:8329"
+
   let BASE_Server = "https://192.168.1.100:18080"
-// let BASE_Server = "https://sookajs.top:18080"
+//let BASE_Server = "https://sookajs.top:18080"
+
 
 
 let app = getApp()

+ 5 - 5
pages/xqzggzs/xqzggzs.js

@@ -169,11 +169,11 @@ Page({
   },
   submitSuccess(e){
     if(e.code == 200){
-      // let page = getCurrentPages();
-      // let prevPage = page[page.length - 2];
-      // prevPage.setData({
-      //   isRefresh:true,
-      // });
+      let page = getCurrentPages();
+      let prevPage = page[page.length - 2];
+      prevPage.setData({
+        isRefresh:true,
+      });
       wx.showToast({
         title: e.msg,
       })

+ 34 - 35
pages/xunjianmore/xunjianmore.js

@@ -2,58 +2,57 @@
 import http from '../../base/httputil'
 const app = getApp()
 Page({
-
   /**
    * 页面的初始数据
    */
-
-   
   data: {
     host: app.globalData.host,
     buslogid: null,
-    mapdata : null,
-    pictureBasePath : null,
-    hiddenName:true,
-    isHave_xqzgtzs:false,
-    isHave_fcyjtzs:false,
+    mapdata: null,
+    pictureBasePath: null,
+    hiddenName: true,
+    isHave_xqzgtzs: false,
+    isHave_fcyjtzs: false,
+    isRefresh: false,
   },
   onLoad(e) {
     this.data.buslogid = e.buslogid
-    
-  },
-  onShow(){
-    // let pages = getCurrentPages();
-    // let currPage = pages[pages.length-1];
-    // if(currPage.data.isRefresh != undefined &&currPage.data.isRefresh){
-
-    // }
     let obj = new Object()
-    obj.busLogId = this.data.buslogid 
-    http.post("/system/AppXunjianimgController/getXunjianimgList",obj,this.getXunjianMoreListSuccess)
+    obj.busLogId = this.data.buslogid
+    http.post("/system/AppXunjianimgController/getXunjianimgList", obj, this.getXunjianMoreListSuccess)
   },
- 
+  onShow(){
+    let pages = getCurrentPages();
+    let currPage = pages[pages.length - 1];
+    this.data.isRefresh = currPage.data.isRefresh;
+    console.log("isRefresh", this.data.isRefresh)
+    if (this.data.isRefresh) {
+      let obj = new Object()
+      obj.busLogId = this.data.buslogid
+      http.post("/system/AppXunjianimgController/getXunjianimgList", obj, this.getXunjianMoreListSuccess)
+    }
+  }, 
   getXunjianMoreListSuccess(res){
-    console.log("isHave_xqzgtzs",res.data.isHave_xqzgtzs)
-    console.log("isHave_fcyjtzs",res.data.isHave_fcyjtzs)
     this.setData({
-      pictureBasePath : res.data.pictureBasePath+"/",
-      mapdata : res.data.xunjianimgMap,
-      isHave_xqzgtzs:res.data.isHave_xqzgtzs,
-      isHave_fcyjtzs:res.data.isHave_fcyjtzs,
+      pictureBasePath: res.data.pictureBasePath + "/",
+      mapdata: res.data.xunjianimgMap,
+      isHave_xqzgtzs: res.data.isHave_xqzgtzs,
+      isHave_fcyjtzs: res.data.isHave_fcyjtzs,
     })
   },
-  bindViewZhengGaiJinDu(e){
+  bindViewZhengGaiJinDu(e) {
     let businspectionid = e.currentTarget.dataset.businspectionid
-   
+    console.log("more:", businspectionid)
+    console.log("more:", this.data.buslogid)
     wx.navigateTo({
-      url: '../zhenggaijindu/zhenggaijindu?busInspectionId='+businspectionid,
+      url: '../zhenggaijindu/zhenggaijindu?busInspectionId=' + businspectionid + "&buslogId=" + this.data.buslogid,
     })
   },
-    // 按钮显示隐藏
-    shghnn:function(){
-      this.setData({
-          hiddenName:!this.data.hiddenName
-      })
+  // 按钮显示隐藏
+  shghnn: function () {
+    this.setData({
+      hiddenName: !this.data.hiddenName
+    })
   },
   bindViewXqzgDetail(){
     wx.navigateTo({
@@ -66,9 +65,9 @@ Page({
     })
   },
   // 跳转整改进度
-  bindViewXqZgGzS(){
+  bindViewXqZgGzS() {
     wx.navigateTo({
-      url: '../xqzggzs/xqzggzs?logId='+this.data.buslogid,
+      url: '../xqzggzs/xqzggzs?logId=' + this.data.buslogid,
     })
   },
 })

+ 77 - 4
pages/zhenggaijindu/zhenggaijindu.js

@@ -4,6 +4,10 @@ Page({
 
   onLoad(e) {
 
+    this.setData({
+      buslogId: e.buslogId,
+      busInspectionId: e.busInspectionId
+    })
     this.getZhenggaijindu(e.busInspectionId)
   },
 
@@ -13,14 +17,48 @@ Page({
     http.post("/system/AppZhenggaijinduController/getZhenggaijindu", obj, this.getZhenggaijinduSuccess);
   },
   getZhenggaijinduSuccess(res) {
-    console.log(res)
+    console.log("******jindu", res)
     this.data.pictureBasePath = res.pictureBasePath
     this.setData({
-      pictureBasePath : res.pictureBasePath,
+      pictureBasePath: res.pictureBasePath,
       zgjdList: res.zgjdList
     })
   },
 
+  bindPickerChange: function (e) {
+    //let nume=e.detail.value
+    console.log('picker发送选择改变,携带值为',parseInt(nume)+1)
+
+    let obj = new Object();
+    obj.busInspectionId = this.data.busInspectionId
+    obj.logId = this.data.buslogId
+    obj.lat_day = parseInt(nume)+1
+    http.send_post("/system/AppXunjianController/changeInspection", obj, this.getChangeSuccess);
+  },
+  getChangeSuccess(res) {
+    console.log("&&&&", res)
+    if (res.code == 200) {
+      this.setData({
+        index: e.detail.value,
+        // isRefreshUP: true
+      })
+
+      this.getZhenggaijindu(this.data.busInspectionId)
+
+    }
+  },
+  getChangeSuccess2(res) {
+    console.log("&&&&", res)
+    if (res.code == 200) {
+      this.setData({
+        //index: e.detail.value,
+        isRefreshUP: true
+      })
+
+      this.getZhenggaijindu(this.data.busInspectionId)
+
+    }
+  },
   /**
    * 页面的初始数据
    */
@@ -28,6 +66,10 @@ Page({
     host: app.globalData.host,
     pictureBasePath: null,
     zgjdList: null,
+    isRefreshUP: false,
+    buslogId: '',
+    busInspectionId: '',
+
     processData: [{
         name: '提交工单',
         start: '#fff',
@@ -58,8 +100,9 @@ Page({
         end: '#fff',
         icon: '../../img/process_1.png'
       }
-    ]
-
+    ],
+    array: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30'],
+    index: 0,
   },
   //进度条的状态
   setPeocessIcon: function () {
@@ -88,4 +131,34 @@ Page({
       processData: processArr
     })
   },
+
+  onUnload() {
+    let page = getCurrentPages();
+    let prevPage = page[page.length - 2];
+    prevPage.setData({
+      isRefresh: this.data.isRefreshUP,
+    });
+  },
+  bindFinish() {
+
+    wx.showModal({
+      title: '提示',
+      content: '确认整改完成吗?',
+      complete: (res) => {
+        if (res.cancel) {
+
+        }
+
+        if (res.confirm) {
+          let obj = new Object();
+          obj.busInspectionId = this.data.busInspectionId
+          obj.logId = this.data.buslogId
+          obj.riskStatus = "risk_status_2"
+          http.send_post("/system/AppXunjianController/changeInspection", obj, this.getChangeSuccess2);
+        }
+      }
+    })
+
+  },
+
 })

+ 14 - 0
pages/zhenggaijindu/zhenggaijindu.wxml

@@ -16,4 +16,18 @@
       </view>
     </view>
   </view>
+  <view class="btm_btn">
+    <view class="time_qx">
+    
+      <view class="ttbtn">
+        <view class="section__title">期限:</view>
+        <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
+        <view class="picker">
+          <text>{{array[index]}}</text> 天
+        </view>
+  </picker>
+      </view>
+    </view>
+    <button type="primary" class="succ_btn" size="mini" bindtap="bindFinish">整改完成</button>
+  </view>
 </view>

+ 44 - 0
pages/zhenggaijindu/zhenggaijindu.wxss

@@ -95,4 +95,48 @@ margin-top: 40rpx;
   display: flex;
   background: #ccc;
   margin-right: 30rpx;
+}
+
+.btm_btn{
+  display: flex;
+  flex-direction: row;
+  position: fixed;
+  width: 80%;
+  background-color: rgb(255, 255, 255);
+  bottom: 0px;
+  padding: 40rpx 10%;
+  left: 0;
+  border-top: 1px solid rgb(233, 233, 233);
+  box-shadow: 0px 0px 10px #ccc;
+  justify-content:space-between ;
+  
+}
+.time_qx{
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+ 
+}
+.section__title{
+  padding-right: 4rpx;
+}
+.ttbtn{
+  display: flex;
+  flex-direction: row;
+  border: 1px solid rgb(230, 230, 230);
+  padding: 16rpx 30rpx;
+  border-radius: 100rpx;
+  background: rgb(230, 230, 230);
+  color: #444;
+}
+.succ_btn{
+  width: auto!important;
+padding: 10rpx 26px!important;
+font-size: 30rpx!important;
+font-weight: normal!important;
+margin: 0!important;
+}
+picker text{
+  font-weight: 500;
+  color: rgb(235, 98, 19)!important;
 }