|
|
|
@ -256,7 +256,7 @@ import {
|
|
|
|
|
} from '@/config/host.js' |
|
|
|
|
import MzSubsection from '@/components/MzSubsection/Index.vue'; |
|
|
|
|
import api from '@/utils/functions.js'; |
|
|
|
|
import {houseOrderDetail, submitHouseOrder, userExtends} from "@/api/user"; |
|
|
|
|
import {houseOrderDetail, submitApplyHouseOrder, submitHouseOrder, userExtends} from "@/api/user"; |
|
|
|
|
import {feedback} from "@/api/feed"; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
@ -315,9 +315,9 @@ export default {
|
|
|
|
|
trigger: ['blur', 'change'] |
|
|
|
|
}, |
|
|
|
|
'order.payment_voucher': { |
|
|
|
|
type: 'string', |
|
|
|
|
type: 'array', |
|
|
|
|
required: true, |
|
|
|
|
message: '请上传打印凭证', |
|
|
|
|
message: '请上传打款凭证', |
|
|
|
|
trigger: ['blur', 'change'] |
|
|
|
|
}, |
|
|
|
|
'order.lease_agreement': { |
|
|
|
@ -429,6 +429,16 @@ export default {
|
|
|
|
|
uni.$u.toast(errors[0].message) |
|
|
|
|
return; |
|
|
|
|
} else { |
|
|
|
|
if(this.type === 'create'||this.type === 'edit'){ |
|
|
|
|
this.doCreate(); |
|
|
|
|
}else{ |
|
|
|
|
this.doApply(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
doCreate(){ |
|
|
|
|
submitHouseOrder(this.model.order).then(res => { |
|
|
|
|
if(res.code === 200){ |
|
|
|
|
this.model = { |
|
|
|
@ -450,9 +460,29 @@ export default {
|
|
|
|
|
uni.$u.toast(res.msg) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
doApply(){ |
|
|
|
|
submitApplyHouseOrder(this.model.order).then(res => { |
|
|
|
|
if(res.code === 200){ |
|
|
|
|
this.model = { |
|
|
|
|
order: { |
|
|
|
|
house_id: '', |
|
|
|
|
name: '', |
|
|
|
|
id_card: '', |
|
|
|
|
phone: '', |
|
|
|
|
month: '', |
|
|
|
|
rent: '', |
|
|
|
|
payment_voucher: '', |
|
|
|
|
lease_agreement: '', |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
this.fileList1 = []; |
|
|
|
|
this.fileList2 = []; |
|
|
|
|
this.navTo('/pages/Order/done?type=room'); |
|
|
|
|
}else{ |
|
|
|
|
uni.$u.toast(res.msg) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//上传文件 |
|
|
|
|
async afterFileRead1 (event){ |
|
|
|
|