|
@@ -52,13 +52,21 @@
|
|
|
<el-col :span="6">售后描述</el-col>
|
|
|
<el-col :span="18" class="other">{{ info.desc }}</el-col>
|
|
|
</el-col>
|
|
|
+ <el-col>
|
|
|
+ <el-button type="primary" @click="toStatus('1')" v-if="info.type == '0' && info.status == '0'"> 正在处理退款 </el-button>
|
|
|
+ <el-button type="primary" @click="toStatus('-1')" v-if="info.type == '0' && info.status == '1'"> 已退款 </el-button>
|
|
|
+ <el-button type="primary" @click="toStatus('2')" v-if="info.type == '1' && info.status == '0'"> 正在处理退货 </el-button>
|
|
|
+ <el-button type="primary" @click="toStatus('-2')" v-if="info.type == '1' && info.status == '2'"> 已退货 </el-button>
|
|
|
+ <el-button type="primary" @click="toStatus('3')" v-if="info.type == '2' && info.status == '0'"> 正在处理换货 </el-button>
|
|
|
+ <el-button type="primary" @click="toStatus('-3')" v-if="info.type == '2' && info.status == '3'"> 已换货 </el-button>
|
|
|
+ </el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
|
|
|
- <el-form-item label="售后状态" prop="status">
|
|
|
+ <!-- <el-form-item label="售后状态" prop="status">
|
|
|
<el-select v-model="form.status" clearable filterable placeholder="请选择" style="width: 100%" size="small">
|
|
|
<el-option v-for="i in status" :key="i.label" :label="i.label" :value="i.value"></el-option>
|
|
|
</el-select>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
<el-form-item label="寄出运单号" prop="shop_transport_no" v-if="info.type == '2' && !transport.shop_transport_no">
|
|
|
<el-input v-model="form.shop_transport_no" placeholder="请输入运单号,快递类型,同时填入" size="small"></el-input>
|
|
|
</el-form-item>
|
|
@@ -142,33 +150,50 @@ export default {
|
|
|
this.$set(this, `goods`, res.data.goods.goods);
|
|
|
// 规格
|
|
|
this.$set(this, `good`, res.data.goods);
|
|
|
- this.getStatusList();
|
|
|
+ // this.getStatusList();
|
|
|
}
|
|
|
},
|
|
|
- async getStatusList() {
|
|
|
- let form = this.info;
|
|
|
- let e = this.statusList;
|
|
|
- let list = [];
|
|
|
- if (form.type == '0') {
|
|
|
- for (const val of e) {
|
|
|
- if (val.value == '0' || val.value == '1' || val.value == '-1') {
|
|
|
- list.push(val);
|
|
|
- }
|
|
|
- }
|
|
|
- } else if (form.type == '1') {
|
|
|
- for (const val of e) {
|
|
|
- if (val.value == '0' || val.value == '2' || val.value == '-2') {
|
|
|
- list.push(val);
|
|
|
- }
|
|
|
+ // async getStatusList() {
|
|
|
+ // let form = this.info;
|
|
|
+ // let e = this.statusList;
|
|
|
+ // let list = [];
|
|
|
+ // if (form.type == '0') {
|
|
|
+ // for (const val of e) {
|
|
|
+ // if (val.value == '0' || val.value == '1' || val.value == '-1') {
|
|
|
+ // list.push(val);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // } else if (form.type == '1') {
|
|
|
+ // for (const val of e) {
|
|
|
+ // if (val.value == '0' || val.value == '2' || val.value == '-2') {
|
|
|
+ // list.push(val);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // for (const val of e) {
|
|
|
+ // if (val.value == '0' || val.value == '3' || val.value == '-3') {
|
|
|
+ // list.push(val);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // this.$set(this, `status`, list);
|
|
|
+ // },
|
|
|
+ // 修改状态
|
|
|
+ async toStatus(val) {
|
|
|
+ this.$confirm('是否确认修改订单状态', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }).then(async () => {
|
|
|
+ let form = this.info;
|
|
|
+ form.status = val;
|
|
|
+ let res;
|
|
|
+ if (form.id) res = await this.update(form);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$message({ type: `success`, message: `维护信息成功` });
|
|
|
+ this.search();
|
|
|
}
|
|
|
- } else {
|
|
|
- for (const val of e) {
|
|
|
- if (val.value == '0' || val.value == '3' || val.value == '-3') {
|
|
|
- list.push(val);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- this.$set(this, `status`, list);
|
|
|
+ });
|
|
|
},
|
|
|
// 提交
|
|
|
async onSubmit() {
|
|
@@ -177,7 +202,7 @@ export default {
|
|
|
let transport = {};
|
|
|
let res;
|
|
|
if (form.end_time) info.end_time = form.end_time;
|
|
|
- if (form.status) info.status = form.status;
|
|
|
+ // if (form.status) info.status = form.status;
|
|
|
if (form.shop_transport_no && form.shop_transport_type) {
|
|
|
transport.shop_transport_no = form.shop_transport_no;
|
|
|
transport.shop_transport_type = form.shop_transport_type;
|
|
@@ -186,7 +211,7 @@ export default {
|
|
|
if (info.id) res = await this.update(info);
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$message({ type: `success`, message: `维护信息成功` });
|
|
|
- this.toBack();
|
|
|
+ this.search();
|
|
|
}
|
|
|
},
|
|
|
// 查询其他信息
|