|
@@ -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="9" class="one">
|
|
|
<el-col :span="24" class="add">
|
|
|
<el-col :span="2">
|
|
|
<i class="el-icon-location"></i>
|
|
@@ -52,7 +52,6 @@
|
|
|
<p v-else>¥{{ total_detail.goods_total }}</p>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
-
|
|
|
<el-col :span="24">
|
|
|
<el-col :span="6">下单时间</el-col>
|
|
|
<el-col :span="18" class="other">{{ form.buy_time }}</el-col>
|
|
@@ -61,21 +60,40 @@
|
|
|
<el-col :span="6">支付时间</el-col>
|
|
|
<el-col :span="18" class="other">{{ form.pay_time }}</el-col>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" v-if="form.status == '1'">
|
|
|
+ <el-col :span="24">
|
|
|
<el-col :span="6">寄出运单号</el-col>
|
|
|
<el-col :span="18" class="other">{{ transport.shop_transport_no || '暂无单号' }}</el-col>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" v-if="form.status == '1' && !transport.shop_transport_no">
|
|
|
+ <el-col :span="24">
|
|
|
<el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
|
|
|
- <el-form-item label="寄出运单号" prop="shop_transport_no">
|
|
|
+ <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>
|
|
|
+ <el-form-item label="订单状态" prop="status">
|
|
|
+ <el-select v-model="form.status" clearable filterable placeholder="请选择订单状态" size="small" style="width: 100%">
|
|
|
+ <el-option v-for="i in order_processList" :key="i.label" :label="i.label" :value="i.value"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="onSubmit()">保存</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
+ <el-col :span="9" class="one" v-if="transport.shop_transport_no">
|
|
|
+ <el-col :span="24">中通快递: 75527648947663</el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <p>订单编号: 20010930-4075-527648947663</p>
|
|
|
+ <p>收货地址:吉林省长春市朝阳区南湖中街</p>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-timeline :reverse="reverse">
|
|
|
+ <el-timeline-item v-for="(activity, index) in activities" :key="index" :timestamp="activity.timestamp" :color="activity.color">
|
|
|
+ {{ activity.content }}
|
|
|
+ </el-timeline-item>
|
|
|
+ </el-timeline>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -86,6 +104,8 @@ const _ = require('lodash');
|
|
|
const moment = require('moment');
|
|
|
import { mapState, mapGetters, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions } = createNamespacedHelpers('orderDetail');
|
|
|
+const { mapActions: dictData } = createNamespacedHelpers('dictData');
|
|
|
+
|
|
|
export default {
|
|
|
name: 'form-1',
|
|
|
props: {},
|
|
@@ -93,20 +113,33 @@ export default {
|
|
|
data: function () {
|
|
|
return {
|
|
|
form: {},
|
|
|
+ // 地址
|
|
|
address: {},
|
|
|
+ // 实付金额
|
|
|
goods_total: 0,
|
|
|
+ total_detail: {},
|
|
|
+ // 商铺
|
|
|
shop: {},
|
|
|
+ // 运单号
|
|
|
transport: {},
|
|
|
+ // 商品列表
|
|
|
list: [],
|
|
|
- total_detail: {},
|
|
|
typeList: [],
|
|
|
statusList: [],
|
|
|
+ // 物流
|
|
|
+ reverse: false,
|
|
|
+ activities: [],
|
|
|
+ // 订单状态
|
|
|
+ order_processList: [],
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
|
+ await this.searchOther();
|
|
|
+
|
|
|
await this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
+ ...dictData({ dictQuery: 'query' }),
|
|
|
...mapActions(['query', 'fetch', 'create', 'update']),
|
|
|
// 查询
|
|
|
async search() {
|
|
@@ -131,14 +164,43 @@ export default {
|
|
|
const element = discount_detail[key];
|
|
|
for (const i in element) {
|
|
|
if (Object.hasOwnProperty.call(element, i)) {
|
|
|
- const ele = element[i].realPay;
|
|
|
- goods_total += ele;
|
|
|
+ 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);
|
|
|
}
|
|
|
+ let activities = [
|
|
|
+ {
|
|
|
+ content: '【广州市】快件离开【广州夏茅】已发往【长春中转】',
|
|
|
+ timestamp: '2018-04-15',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ content: '【广州市】【广州夏茅】(020-79479549)的快递员(111111111)已揽收',
|
|
|
+ timestamp: '2018-04-15',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ content: '订单已确认,正等待中通快递揽收',
|
|
|
+ timestamp: '2018-04-13',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ content: '订单确认,商家配货中',
|
|
|
+ timestamp: '2018-04-11',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ content: '您已提交订单,请等待系统确认',
|
|
|
+ timestamp: '2018-04-11',
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ activities[0].color = '#0bbd87';
|
|
|
+ this.$set(this, `activities`, activities);
|
|
|
},
|
|
|
// 提交
|
|
|
async onSubmit() {
|
|
@@ -159,6 +221,15 @@ export default {
|
|
|
toBack() {
|
|
|
window.history.go('-1');
|
|
|
},
|
|
|
+ // 查询其他信息
|
|
|
+ async searchOther() {
|
|
|
+ let res;
|
|
|
+ // 减免方式
|
|
|
+ res = await this.dictQuery({ code: 'order_process' });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `order_processList`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
id() {
|
|
@@ -182,7 +253,7 @@ export default {
|
|
|
.main {
|
|
|
.one {
|
|
|
font-size: 20px;
|
|
|
- margin: 10px 0 0 20%;
|
|
|
+ margin: 10px 0 0 5%;
|
|
|
padding: 5px;
|
|
|
.add {
|
|
|
border-bottom: 2px dashed #ccc;
|
|
@@ -211,4 +282,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+/deep/.el-timeline {
|
|
|
+ margin: 20px 0 0 0;
|
|
|
+ font-size: 20px;
|
|
|
+}
|
|
|
+/deep/.el-timeline-item__node {
|
|
|
+ // background-color: green;
|
|
|
+}
|
|
|
+/deep/.el-timeline-item__node:nth-child(1) {
|
|
|
+ background-color: green;
|
|
|
+}
|
|
|
</style>
|