| | |
| | | images: [], |
| | | materials:"", |
| | | cheatTime:"", |
| | | arraySex: [ |
| | | {sex:'男',id:1}, |
| | | {sex:'女',id:0} |
| | | ], |
| | | sexId:0 |
| | | }, |
| | | |
| | | uploadImage() { |
| | |
| | | url: submitReport.globalData.url+"/minio/upload", |
| | | success: res => { |
| | | const result = JSON.parse(res.data) |
| | | this.data.images.push({ |
| | | url:submitReport.globalData.imageUrl+"/img/"+result.data |
| | | }) |
| | | this.setData({ |
| | | images:this.data.images |
| | | }) |
| | | if(index< this.data.imagesFile.length-1){ |
| | | this.data.materials+=result.data+"," |
| | | }else{ |
| | | this.data.materials+=result.data |
| | | } |
| | | this.setData({ |
| | | materials:this.data.materials |
| | | }) |
| | | this.data.images.push({ |
| | | url:submitReport.globalData.imageUrl+"/img/"+result.data |
| | | }) |
| | | this.setData({ |
| | | images:this.data.images |
| | | }) |
| | | this.setData({ |
| | | materials: this.data.materials+=result.data+"," |
| | | }) |
| | | console.log(this.data.materials); |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | |
| | | onPickerChange(e){ |
| | | console.log(e) |
| | | this.data.cheatTime=e.detail.value |
| | | }, |
| | | subSex(e){ |
| | | console.log(e); |
| | | |
| | | }, |
| | | bindPickerChangeSex(e){ |
| | | console.log(e); |
| | | this.setData({ |
| | | sexId:e.detail.value |
| | | }) |
| | | }, |
| | | getMoney:function(e){ |
| | | console.log(e.detail.value) |
| | |
| | | }) |
| | | }, |
| | | pass() { |
| | | this.data.reportDetail.materials=this.data.materials |
| | | this.data.materials=this.data.materials.substring(0,this.data.materials.length-1); |
| | | this.data.reportDetail.reportMaterials=this.data.materials |
| | | this.data.reportDetail.userId=wx.getStorageSync('id') |
| | | this.data.reportDetail.cheatTime=this.data.cheatTime |
| | | if ( this.data.reportDetail.materials == null|| this.data.reportDetail.information==null|| this.data.reportDetail.reportDescription==null) { |
| | | if ( this.data.reportDetail.information==null|| this.data.reportDetail.reportDescription==null) { |
| | | wx.showToast({ |
| | | icon: "none", |
| | | title: '请完整填完表单!', |