| | |
| | | isShow: false, |
| | | causeList: [], |
| | | causeIndex: null, |
| | | images:[], |
| | | array:["2022/08/19/5040f71639fd44b48228ce0e5c242727.jpeg", "2022/08/19/47bbd7c1d7bd4c07a0b17d671fe47010.jpeg"] |
| | | images: [], |
| | | array: ["2022/08/19/5040f71639fd44b48228ce0e5c242727.jpeg", "2022/08/19/47bbd7c1d7bd4c07a0b17d671fe47010.jpeg"] |
| | | }, |
| | | // 事件处理函数 |
| | | bindViewTap() { |
| | |
| | | url: '../logs/logs', |
| | | }) |
| | | }, |
| | | //查看图片 |
| | | face(){ |
| | | wx.previewMedia({ |
| | | sources:[{url:managerReportDetail.globalData.imageUrl+"/img/"+this.data.reportDetail.pic}] |
| | | }) |
| | | }, |
| | | //查看图片 |
| | | face() { |
| | | wx.previewMedia({ |
| | | sources: [{ url: managerReportDetail.globalData.imageUrl + "/img/" + this.data.reportDetail.pic }] |
| | | }) |
| | | }, |
| | | //选择案件 |
| | | pickCause(e: { detail: { value: string | number; }; }) { |
| | | console.log(e); |
| | |
| | | }) |
| | | this.data.reportDetail.causeId = this.data.causeList[e.detail.value].id |
| | | }, |
| | | cancel(){ |
| | | cancel() { |
| | | console.log("cancel") |
| | | wx.navigateBack({ |
| | | |
| | | }) |
| | | }, |
| | | //通过 |
| | | pass(){ |
| | | if(this.data.reportDetail.causeId==null){ |
| | | pass() { |
| | | if (this.data.reportDetail.causeId == null) { |
| | | wx.showToast({ |
| | | title:"请选择关联案件", |
| | | icon:"error" |
| | | title: "请选择关联案件", |
| | | icon: "error" |
| | | }) |
| | | }else{ |
| | | } else { |
| | | wx.request( |
| | | { |
| | | url: managerReportDetail.globalData.url +"/report/audit" , |
| | | method:"POST", |
| | | data:this.data.reportDetail, |
| | | header: { 'token':wx.getStorageSync('token') , |
| | | 'content-type': 'application/json' |
| | | } ,success:(res)=>{ |
| | | console.log(res) |
| | | wx.reLaunch({ |
| | | url:'../../cause/index' |
| | | }) |
| | | } |
| | | }) |
| | | url: managerReportDetail.globalData.url + "/report/audit", |
| | | method: "POST", |
| | | data: this.data.reportDetail, |
| | | header: { |
| | | 'token': wx.getStorageSync('token'), |
| | | 'content-type': 'application/json' |
| | | }, success: (res) => { |
| | | console.log(res) |
| | | wx.reLaunch({ |
| | | url: '../../cause/index' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e) |
| | | wx.request( |
| | | { |
| | | url:managerReportDetail.globalData.url+"/report/" + e.id, |
| | | url: managerReportDetail.globalData.url + "/report/" + e.id, |
| | | method: "GET", |
| | | header: { 'token':wx.getStorageSync('token') }, |
| | | header: { 'token': wx.getStorageSync('token') }, |
| | | success: (res) => { |
| | | let contractMaterials = res.data.data.contractMaterials.split(",") |
| | | let elseMaterials = res.data.data.elseMaterials.split(",") |
| | | let idCardMaterials = res.data.data.idCardMaterials.split(",") |
| | | let transactionMaterials = res.data.data.transactionMaterials.split(",") |
| | | this.setData({ |
| | | reportDetail: res.data.data, |
| | | images:res.data.data.reportMaterials.split(",") |
| | | images: [...idCardMaterials,...contractMaterials,...transactionMaterials,...elseMaterials] |
| | | }) |
| | | console.log(this.data.reportDetail) |
| | | for (let index = 0; index < this.data.images.length; index++) { |
| | | if(this.data.images!=null&&this.data.images[index]!=""&&this.data.images!=undefined){ |
| | | this.data.images[index]=managerReportDetail.globalData.imageUrl+"/img/"+this.data.images[index] |
| | | } else{ |
| | | this.data.images=[] |
| | | } |
| | | if (this.data.images != null && this.data.images[index] != "" && this.data.images != undefined) { |
| | | this.data.images[index] = managerReportDetail.globalData.imageUrl + "/img/" + this.data.images[index] |
| | | } else { |
| | | this.data.images = [] |
| | | } |
| | | } |
| | | this.setData({ |
| | | images:this.data.images |
| | | images: this.data.images |
| | | }) |
| | | console.log(this.data.images) |
| | | } |
| | | }) |
| | | wx.request( |
| | | { |
| | | url: managerReportDetail.globalData.url+ "/cause/getCauseList", |
| | | url: managerReportDetail.globalData.url + "/cause/getCauseList", |
| | | method: "GET", |
| | | header: { 'token': wx.getStorageSync('token')}, |
| | | header: { 'token': wx.getStorageSync('token') }, |
| | | success: (res) => { |
| | | this.setData({ |
| | | causeList: res.data.data.records |