|
@@ -228,58 +228,62 @@ export default {
|
|
|
else if (res.data.status == '-5') this.$set(this, `active`, 4);
|
|
|
// 查询物流
|
|
|
if (res.data.transport) {
|
|
|
- // 快递数据回显
|
|
|
- if (res.data.transport.customer_transport_type) {
|
|
|
- let arr = await this.dictQuery({ code: 'transport_company', value: res.data.transport.customer_transport_type });
|
|
|
- if (this.$checkRes(arr)) {
|
|
|
- let type = arr.data.find((i) => i.value == res.data.transport.customer_transport_type);
|
|
|
- if (type) {
|
|
|
- res.data.transport.customer_transport_name = type.label;
|
|
|
- this.querySearch(type.label);
|
|
|
- }
|
|
|
- this.$set(this, `transport`, res.data.transport);
|
|
|
- this.$set(this.customerForm, `customer_transport_type`, this.transport.customer_transport_type);
|
|
|
- this.$set(this.customerForm, `customer_transport_no`, this.transport.customer_transport_no);
|
|
|
- }
|
|
|
+ this.toLog(res.data.transport);
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async toLog(e) {
|
|
|
+ // 快递数据回显
|
|
|
+ if (e.customer_transport_type) {
|
|
|
+ let arr = await this.dictQuery({ code: 'transport_company', value: e.customer_transport_type });
|
|
|
+ if (this.$checkRes(arr)) {
|
|
|
+ let type = arr.data.find((i) => i.value == e.customer_transport_type);
|
|
|
+ if (type) {
|
|
|
+ e.customer_transport_name = type.label;
|
|
|
+ this.querySearch(type.label);
|
|
|
+ }
|
|
|
+ this.$set(this, `transport`, e);
|
|
|
+ this.$set(this.customerForm, `customer_transport_type`, this.transport.customer_transport_type);
|
|
|
+ this.$set(this.customerForm, `customer_transport_no`, this.transport.customer_transport_no);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (e.shop_transport_type) {
|
|
|
+ let aee = await this.dictQuery({ code: 'transport_company', value: e.shop_transport_type });
|
|
|
+ if (this.$checkRes(aee)) {
|
|
|
+ let type = aee.data.find((i) => i.value == e.shop_transport_type);
|
|
|
+ if (type) {
|
|
|
+ e.shop_transport_name = type.label;
|
|
|
+ this.querySearch(type.label);
|
|
|
}
|
|
|
- if (res.data.transport.shop_transport_type) {
|
|
|
- let aee = await this.dictQuery({ code: 'transport_company', value: res.data.transport.shop_transport_type });
|
|
|
- if (this.$checkRes(aee)) {
|
|
|
- let type = aee.data.find((i) => i.value == res.data.transport.shop_transport_type);
|
|
|
- if (type) {
|
|
|
- res.data.transport.shop_transport_name = type.label;
|
|
|
- this.querySearch(type.label);
|
|
|
- }
|
|
|
- this.$set(this, `transport`, res.data.transport);
|
|
|
- this.$set(this.form, `shop_transport_type`, this.transport.shop_transport_type);
|
|
|
- this.$set(this.form, `shop_transport_no`, this.transport.shop_transport_no);
|
|
|
- }
|
|
|
+ this.$set(this, `transport`, e);
|
|
|
+ this.$set(this.form, `shop_transport_type`, this.transport.shop_transport_type);
|
|
|
+ this.$set(this.form, `shop_transport_no`, this.transport.shop_transport_no);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 显示物流
|
|
|
+ let res = await this.getFetch(this.id);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ if (res.errcode == '0') {
|
|
|
+ if (res.data.customer) {
|
|
|
+ let customer = res.data.customer.list;
|
|
|
+ this.$set(this, `customer`, customer);
|
|
|
+ customer[0].color = '#0bbd87';
|
|
|
+ if (res.data.customer.is_check == '已签收' && this.info.status == '3') this.$set(this, `active`, 3);
|
|
|
+ if (res.data.customer.is_check == '已签收' && this.info.status == '2') this.$set(this, `active`, 3);
|
|
|
}
|
|
|
- // 显示物流
|
|
|
- res = await this.getFetch(this.id);
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- if (res.errcode == '0') {
|
|
|
- if (res.data.customer) {
|
|
|
- let customer = res.data.customer.list;
|
|
|
- this.$set(this, `customer`, customer);
|
|
|
- customer[0].color = '#0bbd87';
|
|
|
- if (res.data.customer.is_check == '已签收' && this.info.status == '3') this.$set(this, `active`, 3);
|
|
|
- if (res.data.customer.is_check == '已签收' && this.info.status == '2') this.$set(this, `active`, 3);
|
|
|
- }
|
|
|
- if (res.data.shop) {
|
|
|
- if (this.info.status == '3') this.$set(this, `active`, 4);
|
|
|
- let shopList = res.data.shop.list;
|
|
|
- this.$set(this, `shopList`, shopList);
|
|
|
- shopList[0].color = '#0bbd87';
|
|
|
- if (res.data.shop.is_check == '已签收' && this.info.status == '3') this.$set(this, `active`, 5);
|
|
|
- }
|
|
|
- this.$set(this, `activit`, res.data);
|
|
|
- }
|
|
|
+ if (res.data.shop) {
|
|
|
+ if (this.info.status == '3') this.$set(this, `active`, 4);
|
|
|
+ let shopList = res.data.shop.list;
|
|
|
+ this.$set(this, `shopList`, shopList);
|
|
|
+ shopList[0].color = '#0bbd87';
|
|
|
+ if (res.data.shop.is_check == '已签收' && this.info.status == '3') this.$set(this, `active`, 5);
|
|
|
}
|
|
|
+ this.$set(this, `activit`, res.data);
|
|
|
}
|
|
|
- this.loading = false;
|
|
|
}
|
|
|
},
|
|
|
+ // 审核
|
|
|
async exam(status, form) {
|
|
|
let info = this.info;
|
|
|
info.status = status;
|
|
@@ -309,12 +313,14 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 远程查询快递公司
|
|
|
async querySearch(value) {
|
|
|
let res = await this.dictQuery({ code: 'transport_company', label: value });
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, 'shop_transport_typeList', res.data);
|
|
|
}
|
|
|
},
|
|
|
+ // 买家快递填写保存
|
|
|
async customerSubmit(val) {
|
|
|
let info = this.info;
|
|
|
let res;
|
|
@@ -334,6 +340,7 @@ export default {
|
|
|
this.search();
|
|
|
}
|
|
|
},
|
|
|
+ // 保存
|
|
|
async onSubmit(val) {
|
|
|
let info = this.info;
|
|
|
let res;
|
|
@@ -367,7 +374,9 @@ export default {
|
|
|
window.history.go('-1');
|
|
|
},
|
|
|
},
|
|
|
+
|
|
|
computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
id() {
|
|
|
return this.$route.query.id;
|
|
|
},
|