|
@@ -9,20 +9,21 @@
|
|
|
<van-cell-group :border="false">
|
|
<van-cell-group :border="false">
|
|
|
<van-field
|
|
<van-field
|
|
|
label="退款原因"
|
|
label="退款原因"
|
|
|
- :value="reason"
|
|
|
|
|
|
|
+ :value="form.reason"
|
|
|
placeholder="请选择退款原因"
|
|
placeholder="请选择退款原因"
|
|
|
is-link
|
|
is-link
|
|
|
readonly
|
|
readonly
|
|
|
@click="show = true"
|
|
@click="show = true"
|
|
|
>
|
|
>
|
|
|
</van-field>
|
|
</van-field>
|
|
|
- <van-field label="退款金额" :value="price" @input="price = $event.detail" placeholder="¥970"> </van-field>
|
|
|
|
|
|
|
+ <van-field label="退款金额" :value="form.total" @input="form.total = $event.detail"> </van-field>
|
|
|
<van-field
|
|
<van-field
|
|
|
- label="补充描述"
|
|
|
|
|
- :value="message"
|
|
|
|
|
- @input="message = $event.detail"
|
|
|
|
|
|
|
+ label="补充说明"
|
|
|
|
|
+ :value="form.message"
|
|
|
|
|
+ @input="form.message = $event.detail"
|
|
|
rows="1"
|
|
rows="1"
|
|
|
autosize
|
|
autosize
|
|
|
|
|
+ type="textarea"
|
|
|
placeholder="选填"
|
|
placeholder="选填"
|
|
|
/>
|
|
/>
|
|
|
<div class="field">
|
|
<div class="field">
|
|
@@ -32,7 +33,7 @@
|
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
|
|
|
|
|
|
<div class="btn-list">
|
|
<div class="btn-list">
|
|
|
- <van-button :color="$colors.prim" :disabled="!canSubmit" block @click="submit">提交</van-button>
|
|
|
|
|
|
|
+ <van-button color="#FF6C00" :disabled="!canSubmit" block @click="submit">提交</van-button>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<van-action-sheet
|
|
<van-action-sheet
|
|
@@ -45,7 +46,7 @@
|
|
|
@select="select"
|
|
@select="select"
|
|
|
>
|
|
>
|
|
|
</van-action-sheet>
|
|
</van-action-sheet>
|
|
|
- <van-dialog
|
|
|
|
|
|
|
+ <!-- <van-dialog
|
|
|
use-slot
|
|
use-slot
|
|
|
:show="showdialog"
|
|
:show="showdialog"
|
|
|
show-cancel-button
|
|
show-cancel-button
|
|
@@ -65,7 +66,7 @@
|
|
|
<span>025-5644356</span>
|
|
<span>025-5644356</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </van-dialog>
|
|
|
|
|
|
|
+ </van-dialog> -->
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -73,72 +74,91 @@ export default {
|
|
|
name: 'apply',
|
|
name: 'apply',
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- reason: '',
|
|
|
|
|
- message: '',
|
|
|
|
|
- price: '',
|
|
|
|
|
|
|
+ form: {
|
|
|
|
|
+ reason: '',
|
|
|
|
|
+ message: '',
|
|
|
|
|
+ total: ''
|
|
|
|
|
+ },
|
|
|
|
|
+ orderInfoId: 0,
|
|
|
|
|
+ refundId: 0,
|
|
|
show: false,
|
|
show: false,
|
|
|
- max: 100,
|
|
|
|
|
- showdialog: false,
|
|
|
|
|
|
|
+ // showdialog: false,
|
|
|
actions: [
|
|
actions: [
|
|
|
- {
|
|
|
|
|
- name: '地址/电话等信息填写错误'
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
name: '多拍/错拍/不想要'
|
|
name: '多拍/错拍/不想要'
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '未按约定时间发货'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '其他'
|
|
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
canSubmit() {
|
|
canSubmit() {
|
|
|
- if (this.reason && this.price) {
|
|
|
|
|
|
|
+ if (this.form.reason && this.form.total) {
|
|
|
return true;
|
|
return true;
|
|
|
} else {
|
|
} else {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- created() {},
|
|
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.rufundApply();
|
|
|
|
|
+ this.rufundApply2();
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ rufundApply2() {
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post('orderRefundApply/refundApply', { orderInfoId: this.$mp.query.id })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+ this.hideLoading();
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ this.hideLoading();
|
|
|
|
|
+ if (e.error) {
|
|
|
|
|
+ this.toast(e.rror);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ rufundApply() {
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .get('/orderInfo/get/' + this.$mp.query.id)
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ this.orderInfoId = res.id;
|
|
|
|
|
+ this.refundId = res.refundId;
|
|
|
|
|
+ this.form = {
|
|
|
|
|
+ total: res.total
|
|
|
|
|
+ };
|
|
|
|
|
+ this.hideLoading();
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ this.hideLoading();
|
|
|
|
|
+ if (e.error) {
|
|
|
|
|
+ this.toast(e.rror);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
select(action) {
|
|
select(action) {
|
|
|
- this.reason = action.detail.name;
|
|
|
|
|
|
|
+ this.form.reason = action.detail.name;
|
|
|
this.show = false;
|
|
this.show = false;
|
|
|
},
|
|
},
|
|
|
submit() {
|
|
submit() {
|
|
|
- if (!this.reason) {
|
|
|
|
|
|
|
+ if (!this.form.reason) {
|
|
|
wx.showToast({
|
|
wx.showToast({
|
|
|
icon: 'none',
|
|
icon: 'none',
|
|
|
title: '退货原因不能为空'
|
|
title: '退货原因不能为空'
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if (!this.price) {
|
|
|
|
|
- wx.showToast({
|
|
|
|
|
- icon: 'none',
|
|
|
|
|
- title: '退货价格不能为空'
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- console.log(this.reason);
|
|
|
|
|
- console.log(this.price);
|
|
|
|
|
- console.log(this.message);
|
|
|
|
|
wx.showToast({
|
|
wx.showToast({
|
|
|
title: '提交成功'
|
|
title: '提交成功'
|
|
|
});
|
|
});
|
|
|
|
|
+ this.navigateTo('/pages/Applydetails?id=' + this.orderInfoId);
|
|
|
},
|
|
},
|
|
|
cancel() {
|
|
cancel() {
|
|
|
this.show = false;
|
|
this.show = false;
|
|
|
- },
|
|
|
|
|
- dialog() {
|
|
|
|
|
- console.log(333);
|
|
|
|
|
- this.showdialog = true;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ // dialog() {
|
|
|
|
|
+ // this.showdialog = true;
|
|
|
|
|
+ // }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|