|
@@ -4,6 +4,10 @@ Page({
|
|
|
|
|
|
onLoad(e) {
|
|
|
|
|
|
+ this.setData({
|
|
|
+ buslogId: e.buslogId,
|
|
|
+ busInspectionId: e.busInspectionId
|
|
|
+ })
|
|
|
this.getZhenggaijindu(e.busInspectionId)
|
|
|
},
|
|
|
|
|
@@ -13,14 +17,47 @@ 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) {
|
|
|
+ console.log('picker发送选择改变,携带值为', e.detail.value+1)
|
|
|
+
|
|
|
+ let obj = new Object();
|
|
|
+ obj.busInspectionId = this.data.busInspectionId
|
|
|
+ obj.logId = this.data.buslogId
|
|
|
+ obj.lat_day = e.detail.value+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,7 +65,10 @@ Page({
|
|
|
host: app.globalData.host,
|
|
|
pictureBasePath: null,
|
|
|
zgjdList: null,
|
|
|
- isRefreshUP:true,
|
|
|
+ isRefreshUP: false,
|
|
|
+ buslogId: '',
|
|
|
+ busInspectionId: '',
|
|
|
+
|
|
|
processData: [{
|
|
|
name: '提交工单',
|
|
|
start: '#fff',
|
|
@@ -60,9 +100,8 @@ Page({
|
|
|
icon: '../../img/process_1.png'
|
|
|
}
|
|
|
],
|
|
|
- // 期限按钮
|
|
|
- buttons: [{ id: 1, name: "一天" }, { id: 2, name: "两天" }, { id: 3, name:"三天" }]
|
|
|
-
|
|
|
+ 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 () {
|
|
@@ -92,60 +131,33 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
|
|
|
-<<<<<<< HEAD
|
|
|
-
|
|
|
- onUnload(){
|
|
|
+ onUnload() {
|
|
|
let page = getCurrentPages();
|
|
|
let prevPage = page[page.length - 2];
|
|
|
prevPage.setData({
|
|
|
- isRefresh :this.data.isRefreshUP,
|
|
|
+ isRefresh: this.data.isRefreshUP,
|
|
|
});
|
|
|
- }
|
|
|
-=======
|
|
|
- // 期限按钮
|
|
|
- onLoad: function (options) {
|
|
|
- this.data.buttons[0].checked = true;
|
|
|
- this.setData({
|
|
|
- buttons: this.data.buttons,
|
|
|
- })
|
|
|
- },
|
|
|
- radioButtonTap: function (e) {
|
|
|
- console.log(e)
|
|
|
- let id = e.currentTarget.dataset.id
|
|
|
- console.log(id)
|
|
|
- for (let i = 0; i < this.data.buttons.length; i++) {
|
|
|
- if (this.data.buttons[i].id == id) {
|
|
|
- //当前点击的位置为true即选中
|
|
|
- this.data.buttons[i].checked = true;
|
|
|
- }
|
|
|
- else {
|
|
|
- //其他的位置为false
|
|
|
- this.data.buttons[i].checked = false;
|
|
|
- }
|
|
|
- }
|
|
|
- this.setData({
|
|
|
- buttons: this.data.buttons,
|
|
|
- msg: "id:"+id
|
|
|
- })
|
|
|
},
|
|
|
- checkButtonTap:function(e){
|
|
|
- console.log(e)
|
|
|
- let id = e.currentTarget.dataset.id
|
|
|
- console.log(id)
|
|
|
- for (let i = 0; i < this.data.buttons.length; i++) {
|
|
|
- if (this.data.buttons[i].id == id) {
|
|
|
- if (this.data.buttons[i].checked == true) {
|
|
|
- this.data.buttons[i].checked = false;
|
|
|
-
|
|
|
- } else {
|
|
|
- this.data.buttons[i].checked = true;
|
|
|
-
|
|
|
+ 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);
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
+ })
|
|
|
|
|
|
+ },
|
|
|
|
|
|
->>>>>>> 57f7980a209c37c9f7735fbe7e3a57926d779ed2
|
|
|
})
|