|
@@ -54,8 +54,7 @@
|
|
<el-col :span="24" class="goods_total">
|
|
<el-col :span="24" class="goods_total">
|
|
<el-col :span="6">实付金额</el-col>
|
|
<el-col :span="6">实付金额</el-col>
|
|
<el-col :span="18" class="other">
|
|
<el-col :span="18" class="other">
|
|
- <p v-if="total_detail.discount_detail">¥{{ goods_total }}</p>
|
|
|
|
- <p v-else>¥{{ total_detail.goods_total }}</p>
|
|
|
|
|
|
+ <p>¥{{ pay.pay_money }}</p>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
@@ -70,10 +69,34 @@
|
|
<el-col :span="6">寄出运单号</el-col>
|
|
<el-col :span="6">寄出运单号</el-col>
|
|
<el-col :span="18" class="other">{{ transport.shop_transport_no || '暂无单号' }}</el-col>
|
|
<el-col :span="18" class="other">{{ transport.shop_transport_no || '暂无单号' }}</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-col :span="6">寄出快递类型</el-col>
|
|
|
|
+ <el-col :span="18" class="other">{{ transport.shop_transport_name || '暂无快递类型' }}</el-col>
|
|
|
|
+ </el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
|
|
<el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
|
|
- <el-form-item label="寄出运单号" prop="shop_transport_no" v-if="form.status == '1' && !transport.shop_transport_no">
|
|
|
|
- <el-input v-model="form.shop_transport_no" placeholder="请输入运单号" size="small"></el-input>
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="寄出运单号"
|
|
|
|
+ prop="shop_transport_no"
|
|
|
|
+ v-if="(form.status == '1' || form.status == '2') && (!transport.shop_transport_no || !transport.shop_transport_name)"
|
|
|
|
+ >
|
|
|
|
+ <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="(form.status == '1' || form.status == '2') && (!transport.shop_transport_no || !transport.shop_transport_name)"
|
|
|
|
+ >
|
|
|
|
+ <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>
|
|
<el-form-item label="订单状态" prop="status">
|
|
<el-form-item label="订单状态" prop="status">
|
|
<el-select v-model="form.status" clearable filterable placeholder="请选择订单状态" size="small" style="width: 100%">
|
|
<el-select v-model="form.status" clearable filterable placeholder="请选择订单状态" size="small" style="width: 100%">
|
|
@@ -118,25 +141,25 @@ export default {
|
|
components: {},
|
|
components: {},
|
|
data: function () {
|
|
data: function () {
|
|
return {
|
|
return {
|
|
- form: {},
|
|
|
|
|
|
+ form: { transport: {} },
|
|
// 地址
|
|
// 地址
|
|
address: {},
|
|
address: {},
|
|
// 实付金额
|
|
// 实付金额
|
|
- goods_total: 0,
|
|
|
|
total_detail: {},
|
|
total_detail: {},
|
|
// 商铺
|
|
// 商铺
|
|
shop: {},
|
|
shop: {},
|
|
// 运单号
|
|
// 运单号
|
|
transport: {},
|
|
transport: {},
|
|
|
|
+ pay: {},
|
|
// 商品列表
|
|
// 商品列表
|
|
list: [],
|
|
list: [],
|
|
- typeList: [],
|
|
|
|
- statusList: [],
|
|
|
|
// 物流
|
|
// 物流
|
|
reverse: false,
|
|
reverse: false,
|
|
activities: [],
|
|
activities: [],
|
|
// 订单状态
|
|
// 订单状态
|
|
order_processList: [],
|
|
order_processList: [],
|
|
|
|
+ // 快递类型
|
|
|
|
+ shop_transport_typeList: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
@@ -157,31 +180,15 @@ export default {
|
|
this.$set(this, `address`, res.data.address);
|
|
this.$set(this, `address`, res.data.address);
|
|
this.$set(this, `shop`, res.data.shop);
|
|
this.$set(this, `shop`, res.data.shop);
|
|
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);
|
|
this.$set(this, `transport`, res.data.transport);
|
|
}
|
|
}
|
|
// 商品
|
|
// 商品
|
|
this.$set(this, `list`, res.data.goods);
|
|
this.$set(this, `list`, res.data.goods);
|
|
- // 实付金额
|
|
|
|
|
|
+ // 应付金额
|
|
this.$set(this, `total_detail`, res.data.total_detail);
|
|
this.$set(this, `total_detail`, res.data.total_detail);
|
|
- var goods_total = 0;
|
|
|
|
- let discount_detail = res.data.total_detail.discount_detail;
|
|
|
|
- for (const key in discount_detail) {
|
|
|
|
- if (Object.hasOwnProperty.call(discount_detail, key)) {
|
|
|
|
- const element = discount_detail[key];
|
|
|
|
- for (const i in element) {
|
|
|
|
- if (Object.hasOwnProperty.call(element, i)) {
|
|
|
|
- if (element[i].realPay) {
|
|
|
|
- const ele = element[i].realPay;
|
|
|
|
- goods_total += ele;
|
|
|
|
- } else {
|
|
|
|
- const ele = element[i];
|
|
|
|
- goods_total += ele;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- this.$set(this, `goods_total`, goods_total);
|
|
|
|
|
|
+ this.$set(this, `pay`, res.data.order.pay);
|
|
}
|
|
}
|
|
let activities = [
|
|
let activities = [
|
|
{
|
|
{
|
|
@@ -213,8 +220,9 @@ export default {
|
|
let form = this.form;
|
|
let form = this.form;
|
|
let transport = {};
|
|
let transport = {};
|
|
let res;
|
|
let res;
|
|
- if (form.shop_transport_no) {
|
|
|
|
|
|
+ if (form.shop_transport_no && form.shop_transport_type) {
|
|
transport.shop_transport_no = form.shop_transport_no;
|
|
transport.shop_transport_no = form.shop_transport_no;
|
|
|
|
+ transport.shop_transport_type = form.shop_transport_type;
|
|
form.transport = transport;
|
|
form.transport = transport;
|
|
}
|
|
}
|
|
if (form.id) res = await this.update(form);
|
|
if (form.id) res = await this.update(form);
|
|
@@ -235,6 +243,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);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|