|
|
|
@ -190,8 +190,9 @@
|
|
|
|
|
uploadIcon="plus" |
|
|
|
|
@afterRead="afterFileRead1" |
|
|
|
|
@delete="deleteFile1" |
|
|
|
|
:disabled="type === 'detail'" |
|
|
|
|
:deletable="(type !== 'detail')" |
|
|
|
|
:maxCount="1" |
|
|
|
|
:maxCount="((type === 'create' || type === 'edit'|| type === 'apply')?999:fileList1.length)" |
|
|
|
|
></u-upload> |
|
|
|
|
</u-form-item> |
|
|
|
|
<u-form-item |
|
|
|
@ -212,9 +213,9 @@
|
|
|
|
|
uploadIcon="plus" |
|
|
|
|
@afterRead="afterFileRead2" |
|
|
|
|
@delete="deleteFile2" |
|
|
|
|
:disabled="(type !== 'create')" |
|
|
|
|
:disabled="(type !== 'create' && type !== 'edit')" |
|
|
|
|
:deletable="(type === 'create' || type === 'edit')" |
|
|
|
|
:maxCount="((type === 'create')?5:fileList2.length)" |
|
|
|
|
:maxCount="((type === 'create' || type === 'edit')?999:fileList2.length)" |
|
|
|
|
></u-upload> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -222,7 +223,7 @@
|
|
|
|
|
</u-form> |
|
|
|
|
</u-col> |
|
|
|
|
</u-row> |
|
|
|
|
<view class="foot-button border-box" v-if="(type === 'create' || type === 'edit')"> |
|
|
|
|
<view class="foot-button border-box" v-if="(type === 'create' || type === 'edit' || type === 'apply')"> |
|
|
|
|
<u-button |
|
|
|
|
type="primary" |
|
|
|
|
text="我要兑换" |
|
|
|
@ -380,7 +381,9 @@ export default {
|
|
|
|
|
getDetail(id){ |
|
|
|
|
// let house_id = this.model.order.house_id; |
|
|
|
|
houseOrderDetail({house_order_id : id}).then(res => { |
|
|
|
|
this.model = {order: res.data}; |
|
|
|
|
let data = res.data; |
|
|
|
|
data.end_time = uni.$u.timeFormat(data.end_time,'yyyy-mm-dd') |
|
|
|
|
this.model = {order: data}; |
|
|
|
|
// this.model.order.house_id = house_id; |
|
|
|
|
// this.model.order.month = ''+this.model.order.month; |
|
|
|
|
// this.model.order.month = parseInt(this.model.order.month); |
|
|
|
@ -396,7 +399,7 @@ export default {
|
|
|
|
|
this.fileList1.forEach(item => { |
|
|
|
|
file1.push(item.url) |
|
|
|
|
}); |
|
|
|
|
this.model.order.payment_voucher = file1.join(); |
|
|
|
|
this.model.order.payment_voucher = file1; |
|
|
|
|
let file2 = []; |
|
|
|
|
this.fileList2.forEach(item => { |
|
|
|
|
file2.push(item.url) |
|
|
|
@ -423,8 +426,7 @@ export default {
|
|
|
|
|
} |
|
|
|
|
this.$refs.orderForm.validateField(checkedField,(errors) => { |
|
|
|
|
if(errors.length) { |
|
|
|
|
// 如果错误提示方式为toast,则进行提示 |
|
|
|
|
this.errorType === 'toast' && uni.$u.toast(errors[0].message) |
|
|
|
|
uni.$u.toast(errors[0].message) |
|
|
|
|
return; |
|
|
|
|
} else { |
|
|
|
|
submitHouseOrder(this.model.order).then(res => { |
|
|
|
@ -551,7 +553,7 @@ export default {
|
|
|
|
|
if(token && this.type === 'create'){ |
|
|
|
|
this.getUserExtend(); |
|
|
|
|
} |
|
|
|
|
if(this.type === 'detail' || this.type === 'edit'){ |
|
|
|
|
if(this.type === 'detail' || this.type === 'edit' || this.type === 'apply'){ |
|
|
|
|
this.getDetail(this.model.order.house_id); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|