|
@@ -346,7 +346,11 @@
|
|
|
},
|
|
|
// 提交
|
|
|
submit(){
|
|
|
+ this.rubbishTypeList=[]
|
|
|
+ console.log('-------------提交')
|
|
|
this.$refs.uForm.validate(valid => {
|
|
|
+ const params= Object.assign(this.userDetailInfo, this.form,{userId:this.userId})
|
|
|
+ console.log('-------------校验')
|
|
|
if (valid) {
|
|
|
if(this.time ==''){
|
|
|
uni.showToast({
|
|
@@ -355,6 +359,7 @@
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
+ console.log('-------------时间校验')
|
|
|
if(this.form.info ==''){
|
|
|
uni.showToast({
|
|
|
title: '请选择用户信息',
|
|
@@ -362,6 +367,7 @@
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
+ console.log('-------------用户校验')
|
|
|
if(this.checkWeightType ==''){
|
|
|
uni.showToast({
|
|
|
title: '请选择预估重量',
|
|
@@ -369,6 +375,17 @@
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
+ console.log('-------------重量校验')
|
|
|
+ if(this.rubbishTypeListData){
|
|
|
+ this.rubbishTypeListData.map(item=>{
|
|
|
+ if(item.check==true){
|
|
|
+ this.rubbishTypeList.push(item.code)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(this.rubbishTypeListData,this.rubbishTypeList,'--------选中垃圾分类')
|
|
|
+ params.rubbishTypeList=this.rubbishTypeList
|
|
|
+ }
|
|
|
+ console.log(params,'----------params垃圾类型')
|
|
|
if(this.rubbishTypeList ==[]){
|
|
|
uni.showToast({
|
|
|
title: '请选择回收分类',
|
|
@@ -376,7 +393,7 @@
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
- const params= Object.assign(this.userDetailInfo, this.form,{userId:this.userId})
|
|
|
+ console.log(params,'----------params垃圾类型')
|
|
|
if(this.time){
|
|
|
params.reserveDateBegin=this.reserveDateBegin
|
|
|
params.reserveDateEnd=this.reserveDateEnd
|
|
@@ -387,14 +404,6 @@
|
|
|
if(this.photograph){
|
|
|
params.imageList=this.photograph
|
|
|
}
|
|
|
- if(this.rubbishTypeListData){
|
|
|
- this.rubbishTypeListData.map(item=>{
|
|
|
- if(item.check==true){
|
|
|
- this.rubbishTypeList.push(item.code)
|
|
|
- }
|
|
|
- })
|
|
|
- params.rubbishTypeList=this.rubbishTypeList
|
|
|
- }
|
|
|
console.log(params,'------------参数')
|
|
|
yuyueInfoSave(params).then(res=>{
|
|
|
if(res.status==200){
|