|
|
@@ -9,18 +9,19 @@
|
|
|
<van-cell-group :border="false">
|
|
|
<van-field
|
|
|
label="退款原因"
|
|
|
- :value="reason"
|
|
|
+ :value="form.reason"
|
|
|
placeholder="请选择退款原因"
|
|
|
is-link
|
|
|
readonly
|
|
|
@click="show = true"
|
|
|
>
|
|
|
</van-field>
|
|
|
- <van-field label="退款金额" :value="price" @input="price = $event.detail" placeholder="¥970"> </van-field>
|
|
|
+ <van-field label="退款金额" :value="form.price" @input="form.price = $event.detail" placeholder="¥970">
|
|
|
+ </van-field>
|
|
|
<van-field
|
|
|
label="补充说明"
|
|
|
- :value="message"
|
|
|
- @input="message = $event.detail"
|
|
|
+ :value="form.message"
|
|
|
+ @input="form.message = $event.detail"
|
|
|
rows="1"
|
|
|
autosize
|
|
|
type="textarea"
|
|
|
@@ -74,9 +75,11 @@ export default {
|
|
|
name: 'apply',
|
|
|
data() {
|
|
|
return {
|
|
|
- reason: '',
|
|
|
- message: '',
|
|
|
- price: '',
|
|
|
+ form: {
|
|
|
+ reason: '',
|
|
|
+ message: '',
|
|
|
+ price: ''
|
|
|
+ },
|
|
|
show: false,
|
|
|
max: 100,
|
|
|
showdialog: false,
|
|
|
@@ -98,7 +101,7 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
canSubmit() {
|
|
|
- if (this.reason && this.price) {
|
|
|
+ if (this.form.reason && this.form.price) {
|
|
|
return true;
|
|
|
} else {
|
|
|
return false;
|
|
|
@@ -108,27 +111,27 @@ export default {
|
|
|
created() {},
|
|
|
methods: {
|
|
|
select(action) {
|
|
|
- this.reason = action.detail.name;
|
|
|
+ this.form.reason = action.detail.name;
|
|
|
this.show = false;
|
|
|
},
|
|
|
submit() {
|
|
|
- if (!this.reason) {
|
|
|
+ if (!this.form.reason) {
|
|
|
wx.showToast({
|
|
|
icon: 'none',
|
|
|
title: '退货原因不能为空'
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- if (!this.price) {
|
|
|
+ if (!this.form.price) {
|
|
|
wx.showToast({
|
|
|
icon: 'none',
|
|
|
title: '退货价格不能为空'
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- console.log(this.reason);
|
|
|
- console.log(this.price);
|
|
|
- console.log(this.message);
|
|
|
+ console.log(this.form.reason);
|
|
|
+ console.log(this.form.price);
|
|
|
+ console.log(this.form.message);
|
|
|
wx.showToast({
|
|
|
title: '提交成功'
|
|
|
});
|