|
@@ -96,13 +96,17 @@
|
|
>
|
|
>
|
|
<el-select
|
|
<el-select
|
|
v-model="form.shop_transport_type"
|
|
v-model="form.shop_transport_type"
|
|
- clearable
|
|
|
|
filterable
|
|
filterable
|
|
|
|
+ remote
|
|
|
|
+ reserve-keyword
|
|
placeholder="请选择快递类型,运单号,同时填入"
|
|
placeholder="请选择快递类型,运单号,同时填入"
|
|
|
|
+ :remote-method="querySearch"
|
|
|
|
+ :loading="loading"
|
|
|
|
+ @change="handleSelect"
|
|
size="small"
|
|
size="small"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
>
|
|
>
|
|
- <el-option v-for="i in shop_transport_typeList" :key="i._id" :label="i.label" :value="i.value"> </el-option>
|
|
|
|
|
|
+ <el-option v-for="item in shop_transport_typeList" :key="item.id" :label="item.label" :value="item.value"> </el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="订单状态" prop="status">
|
|
<el-form-item label="订单状态" prop="status">
|
|
@@ -170,6 +174,7 @@ export default {
|
|
order_processList: [],
|
|
order_processList: [],
|
|
// 快递类型
|
|
// 快递类型
|
|
shop_transport_typeList: [],
|
|
shop_transport_typeList: [],
|
|
|
|
+ loading: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
@@ -196,13 +201,15 @@ export default {
|
|
this.$set(this, `total_detail`, res.data.total_detail);
|
|
this.$set(this, `total_detail`, res.data.total_detail);
|
|
this.$set(this, `pay`, res.data.order.pay);
|
|
this.$set(this, `pay`, res.data.order.pay);
|
|
if (res.data.transport) {
|
|
if (res.data.transport) {
|
|
- let type = this.shop_transport_typeList.find((i) => i.value == res.data.transport.shop_transport_type);
|
|
|
|
- if (type) res.data.transport.shop_transport_name = type.label;
|
|
|
|
- this.$set(this, `transport`, res.data.transport);
|
|
|
|
|
|
+ let arr = await this.dictQuery({ code: 'transport_type', value: res.data.transport.shop_transport_type });
|
|
|
|
+ if (this.$checkRes(arr)) {
|
|
|
|
+ let type = arr.data.find((i) => i.value == res.data.transport.shop_transport_type);
|
|
|
|
+ if (type) res.data.transport.shop_transport_name = type.label;
|
|
|
|
+ this.$set(this, `transport`, res.data.transport);
|
|
|
|
+ }
|
|
res = await this.sotFetch(this.id);
|
|
res = await this.sotFetch(this.id);
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
if (res.errcode == '0') {
|
|
if (res.errcode == '0') {
|
|
- console.log(res);
|
|
|
|
let activities = res.data.list;
|
|
let activities = res.data.list;
|
|
activities[0].color = '#0bbd87';
|
|
activities[0].color = '#0bbd87';
|
|
this.$set(this, `activities`, activities);
|
|
this.$set(this, `activities`, activities);
|
|
@@ -212,6 +219,17 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ async querySearch(value) {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ let res = await this.dictQuery({ code: 'transport_type', label: value });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, 'shop_transport_typeList', res.data);
|
|
|
|
+ }
|
|
|
|
+ this.loading = false;
|
|
|
|
+ },
|
|
|
|
+ handleSelect(value) {
|
|
|
|
+ // this.$set(this.form, `shop_transport_type`, value);
|
|
|
|
+ },
|
|
// 提交
|
|
// 提交
|
|
async onSubmit() {
|
|
async onSubmit() {
|
|
let form = this.form;
|
|
let form = this.form;
|
|
@@ -222,6 +240,7 @@ export default {
|
|
transport.shop_transport_type = form.shop_transport_type;
|
|
transport.shop_transport_type = form.shop_transport_type;
|
|
form.transport = transport;
|
|
form.transport = transport;
|
|
}
|
|
}
|
|
|
|
+ console.log(form);
|
|
if (form.id) res = await this.update(form);
|
|
if (form.id) res = await this.update(form);
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
this.$message({ type: `success`, message: `维护信息成功` });
|
|
this.$message({ type: `success`, message: `维护信息成功` });
|
|
@@ -240,11 +259,11 @@ export default {
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
this.$set(this, `order_processList`, res.data);
|
|
this.$set(this, `order_processList`, 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);
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|