...
|
...
|
@@ -52,8 +52,8 @@ |
|
|
<button v-if="order.isSupportRefund == 'Y' || order.isSupportExchange == 'Y'" class="normal" @click="applyRefund()">申请售后</button>
|
|
|
</template>
|
|
|
</div>
|
|
|
<select id="cancel-reason" class="cancel-reason" v-on:change="reasonChange" v-model="selected">
|
|
|
<option v-for="option in options" v-bind:value="{id:option.id}">{{option.reason}}</option>
|
|
|
<select id="cancel-reason" class="cancel-reason" v-on:blur="reasonChange" v-model="selected">
|
|
|
<option v-for="option in options" v-bind:value="{id:option.id,reason:option.reason}">{{option.reason}}</option>
|
|
|
</select>
|
|
|
</template>
|
|
|
<script>
|
...
|
...
|
@@ -71,7 +71,7 @@ |
|
|
return {
|
|
|
order: {},
|
|
|
options: [],
|
|
|
selected: null
|
|
|
selected: {}
|
|
|
};
|
|
|
},
|
|
|
ready() {
|
...
|
...
|
@@ -121,7 +121,8 @@ |
|
|
reasonChange() {
|
|
|
this.orderDetail().cancel({
|
|
|
orderCode: this.order.orderCode,
|
|
|
reasonId: this.selected.id
|
|
|
reasonId: this.selected.id || this.options[0].id,
|
|
|
reason: this.selected.reason || this.options[0].reason
|
|
|
}, (result) => {
|
|
|
if (result.code === 200) {
|
|
|
location.reload();
|
...
|
...
|
@@ -156,7 +157,11 @@ |
|
|
},
|
|
|
autoCancel(code) {
|
|
|
return () => {
|
|
|
this.orderDetail().cancel({orderCode: code}, (result) => {
|
|
|
this.orderDetail().cancel({
|
|
|
orderCode: code,
|
|
|
reasonId: this.options.length ? this.options[0].id : null,
|
|
|
reason: this.options.length ? this.options[0].reason : null
|
|
|
}, (result) => {
|
|
|
if (result.code === 200) {
|
|
|
location.reload();
|
|
|
}
|
...
|
...
|
|