|
@@ -5,7 +5,7 @@
|
|
|
<el-col class="top-btn">
|
|
|
<el-button type="primary" size="mini" @click="toBack()">返回</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" class="one">
|
|
|
+ <el-col :span="8" class="one" v-if="info.type == '1' || info.type == '2' || info.type == '3'">
|
|
|
<el-col :span="24" class="shop"> <i class="el-icon-s-shop"></i>{{ shop.name }}</el-col>
|
|
|
<el-col :span="24" class="goods">
|
|
|
<el-col :span="6"><el-image :src="file"></el-image></el-col>
|
|
@@ -52,45 +52,56 @@
|
|
|
<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 == '1' && info.status == '0'"> 正在处理退款 </el-button>
|
|
|
- <el-button type="primary" @click="toStatus('-1')" v-if="info.type == '1' && info.status == '1'"> 已退款 </el-button>
|
|
|
- <el-button type="primary" @click="toStatus('2')" v-if="info.type == '2' && info.status == '0'"> 正在处理退货 </el-button>
|
|
|
- <el-button type="primary" @click="toStatus('-2')" v-if="info.type == '2' && info.status == '2'"> 已退货 </el-button>
|
|
|
- <el-button type="primary" @click="toStatus('3')" v-if="info.type == '3' && info.status == '0'"> 正在处理换货 </el-button>
|
|
|
- <el-button type="primary" @click="toStatus('-3')" v-if="info.type == '3' && 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-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 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>
|
|
|
- <el-form-item label="快递类型" prop="shop_transport_type" v-if="info.type == '2' && !transport.shop_transport_no">
|
|
|
- <el-select
|
|
|
- v-model="form.shop_transport_type"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- placeholder="请选择快递类型,运单号,同时填入"
|
|
|
- size="small"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- <el-option v-for="i in shop_transport_typeList" :key="i._id" :label="i.label" :value="i.value"> </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="售后结束时间" prop="end_time" v-if="!info.end_time">
|
|
|
- <el-date-picker v-model="form.end_time" type="datetime" placeholder="选择时间" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" @click="onSubmit()">保存</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8" class="one" v-if="info.type == '4' || info.type == '5'">
|
|
|
+ <el-col :span="24" class="shop"> <i class="el-icon-s-shop"></i>{{ shop.name }}</el-col>
|
|
|
+ <el-col :span="24" v-for="(item, index) in list" :key="index">
|
|
|
+ <el-col :span="24" class="goods bode">
|
|
|
+ <el-col :span="6"><el-image :src="item.goods.file[0].url"></el-image></el-col>
|
|
|
+ <el-col :span="18">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-col>
|
|
|
+ <p>{{ item.goods.name }}</p>
|
|
|
+ </el-col>
|
|
|
+ <el-col>
|
|
|
+ <p>规格:{{ item.name }}</p>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" class="money">
|
|
|
+ <el-col>
|
|
|
+ <p v-if="form.type == '0'">¥{{ item.sell_money }}</p>
|
|
|
+ <p v-else-if="form.type == '1'">¥{{ item.group_config.money }}</p>
|
|
|
+ </el-col>
|
|
|
+ <el-col>
|
|
|
+ <p>X{{ item.buy_num }}</p>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="bode">
|
|
|
+ <el-col :span="6">运费</el-col>
|
|
|
+ <el-col :span="18" class="other" v-if="!item.goods.freight == '0'">{{ item.goods.freight }}</el-col>
|
|
|
+ <el-col :span="18" class="other" v-else>包邮</el-col>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
+ <el-col :span="12" class="two">
|
|
|
+ <steps-1 v-if="info.type == '1'" @next="next" @exam="exam" :active="active"></steps-1>
|
|
|
+ <steps-2 v-if="info.type == '2'" @next="next" @exam="exam" :active="active" :activities="activities"></steps-2>
|
|
|
+ <steps-3
|
|
|
+ v-if="info.type == '3'"
|
|
|
+ @next="next"
|
|
|
+ @exam="exam"
|
|
|
+ :active="active"
|
|
|
+ @onSubmit="onSubmit"
|
|
|
+ :form="form"
|
|
|
+ :shop_transport_typeList="shop_transport_typeList"
|
|
|
+ @querySearch="querySearch"
|
|
|
+ :activities="activities"
|
|
|
+ ></steps-3>
|
|
|
+ <steps-4 v-if="info.type == '4'" @next="next" @exam="exam" :active="active"></steps-4>
|
|
|
+ <steps-5 v-if="info.type == '5'" @next="next" @exam="exam" :active="active"></steps-5>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -107,10 +118,20 @@ const { mapActions: sot } = createNamespacedHelpers('sot');
|
|
|
export default {
|
|
|
name: 'form-1',
|
|
|
props: {},
|
|
|
- components: {},
|
|
|
+ components: {
|
|
|
+ steps1: () => import('./parts/steps-1.vue'),
|
|
|
+ steps2: () => import('./parts/steps-2.vue'),
|
|
|
+ steps3: () => import('./parts/steps-3.vue'),
|
|
|
+ steps4: () => import('./parts/steps-4.vue'),
|
|
|
+ steps5: () => import('./parts/steps-5.vue'),
|
|
|
+ },
|
|
|
data: function () {
|
|
|
return {
|
|
|
+ // 商品
|
|
|
shop: {},
|
|
|
+ // 状态4,5商品
|
|
|
+ list: [],
|
|
|
+ // 图片
|
|
|
file: '',
|
|
|
goods: {},
|
|
|
good: {},
|
|
@@ -120,7 +141,10 @@ export default {
|
|
|
status: [],
|
|
|
form: {},
|
|
|
info: {},
|
|
|
+ // 物流
|
|
|
shop_transport_typeList: [],
|
|
|
+ activities: [],
|
|
|
+ active: 0,
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
@@ -141,71 +165,54 @@ export default {
|
|
|
if (status) res.data.zhStatus = status.label;
|
|
|
this.$set(this, `info`, res.data);
|
|
|
this.$set(this, `shop`, res.data.shop);
|
|
|
- if (res.data.transport) {
|
|
|
- this.$set(this, `transport`, res.data.transport);
|
|
|
+ if (res.data.type == '4' || res.data.type == '5') {
|
|
|
+ // 商品
|
|
|
+ this.$set(this, `list`, res.data.order_detail.goods);
|
|
|
+ } else if (res.data.type == '1' || res.data.type == '2' || res.data.type == '3') {
|
|
|
+ if (res.data.transport) {
|
|
|
+ this.$set(this, `transport`, res.data.transport);
|
|
|
+ }
|
|
|
+ // 图片
|
|
|
+ this.$set(this, `file`, res.data.goods.goods.file[0].url);
|
|
|
+ // 商品
|
|
|
+ this.$set(this, `goods`, res.data.goods.goods);
|
|
|
+ // 规格
|
|
|
+ this.$set(this, `good`, res.data.goods);
|
|
|
}
|
|
|
- // 图片
|
|
|
- this.$set(this, `file`, res.data.goods.goods.file[0].url);
|
|
|
- // 商品
|
|
|
- this.$set(this, `goods`, res.data.goods.goods);
|
|
|
- // 规格
|
|
|
- this.$set(this, `good`, res.data.goods);
|
|
|
- // 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);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // } 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('是否确认修改订单状态', '提示', {
|
|
|
+ next(active) {
|
|
|
+ this.active = active + 1;
|
|
|
+ },
|
|
|
+ async exam(status) {
|
|
|
+ let info = this.info;
|
|
|
+ info.status = status;
|
|
|
+ let res;
|
|
|
+ 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 (info.id) res = await this.update(info);
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$message({ type: `success`, message: `维护信息成功` });
|
|
|
this.search();
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- // 提交
|
|
|
- async onSubmit() {
|
|
|
+ async querySearch(value) {
|
|
|
+ let res = await this.dictQuery({ code: 'transport_type', label: value });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, 'shop_transport_typeList', res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async onSubmit(val) {
|
|
|
let info = this.info;
|
|
|
- let form = this.form;
|
|
|
let transport = {};
|
|
|
let res;
|
|
|
- if (form.end_time) info.end_time = form.end_time;
|
|
|
- // 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;
|
|
|
+ if (val.shop_transport_no && val.shop_transport_type) {
|
|
|
+ transport.shop_transport_no = val.shop_transport_no;
|
|
|
+ transport.shop_transport_type = val.shop_transport_type;
|
|
|
info.transport = transport;
|
|
|
}
|
|
|
if (info.id) res = await this.update(info);
|
|
@@ -214,6 +221,7 @@ export default {
|
|
|
this.search();
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
// 查询其他信息
|
|
|
async searchOther() {
|
|
|
let res;
|
|
@@ -226,11 +234,11 @@ export default {
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, `statusList`, res.data);
|
|
|
}
|
|
|
- // 减免方式
|
|
|
- res = await this.dictQuery({ code: 'transport_type' });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `shop_transport_typeList`, res.data);
|
|
|
- }
|
|
|
+ // 物流
|
|
|
+ // res = await this.dictQuery({ code: 'transport_type' });
|
|
|
+ // if (this.$checkRes(res)) {
|
|
|
+ // this.$set(this, `shop_transport_typeList`, res.data);
|
|
|
+ // }
|
|
|
},
|
|
|
// 返回
|
|
|
toBack() {
|
|
@@ -259,7 +267,7 @@ export default {
|
|
|
.main {
|
|
|
.one {
|
|
|
font-size: 20px;
|
|
|
- margin: 10px 0 0 20%;
|
|
|
+ margin: 10px 0 0 8%;
|
|
|
padding: 5px;
|
|
|
.add {
|
|
|
border-bottom: 2px dashed #ccc;
|
|
@@ -287,5 +295,8 @@ export default {
|
|
|
margin: 4px 0;
|
|
|
}
|
|
|
}
|
|
|
+ .two {
|
|
|
+ margin: 0 0 0 20px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|