2019-08-30 17:00:18 +08:00
|
|
|
<template>
|
2019-12-09 16:52:01 +08:00
|
|
|
<el-dialog v-dialogDrag :title="this.$t('orderAuthor.orderDetails')" :visible.sync="show" width="1000px" :before-do-close="doClose" :close-on-click-modal="false">
|
|
|
|
<el-table
|
|
|
|
ref="table2"
|
|
|
|
highlight-current-row
|
|
|
|
stripe
|
|
|
|
border
|
|
|
|
:data="orderList"
|
|
|
|
size="medium"
|
|
|
|
>
|
|
|
|
<el-table-column :key="goodsName" :label="this.$t('orderAuthor.commodityName')" prop="goodsName" />
|
|
|
|
<el-table-column :key="forever" :label="this.$t('orderAuthor.permanenceOrNot')" prop="forever">
|
|
|
|
<template slot-scope="scope">
|
2019-12-09 17:25:20 +08:00
|
|
|
{{ $ConstSelect.translate(scope.row.forever, 'Whether') }}
|
2019-12-09 16:52:01 +08:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
|
2019-12-09 17:25:20 +08:00
|
|
|
<el-table-column :key="goodsName" :label="this.$t('orderAuthor.goodsAmount')" prop="goodsAmount" />
|
2019-12-09 16:52:01 +08:00
|
|
|
<el-table-column :key="goodsName" :label="this.$t('orderAuthor.itemPricing')" prop="price" />
|
|
|
|
<el-table-column :key="goodsName" :label="this.$t('orderAuthor.startDate')" prop="startTime" />
|
|
|
|
<el-table-column :key="goodsName" :label="this.$t('orderAuthor.purchaseMonths')" prop="monthAmount">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
{{ scope.row.forever?'/':scope.row.monthAmount }}
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
2019-08-30 17:00:18 +08:00
|
|
|
</el-dialog>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-12-09 16:52:01 +08:00
|
|
|
import { getGoodsListByOrderId } from '@/api/management/goods';
|
2019-08-30 17:00:18 +08:00
|
|
|
export default {
|
2019-10-29 17:33:11 +08:00
|
|
|
name: 'RouteDetail',
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
show: false,
|
2019-12-09 16:52:01 +08:00
|
|
|
orderId:'',
|
|
|
|
orderList:[]
|
2019-10-29 17:33:11 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
doShow(data) {
|
2019-12-09 16:52:01 +08:00
|
|
|
this.orderId = data.id;
|
|
|
|
this.reloadTable();
|
2019-10-29 17:33:11 +08:00
|
|
|
this.show = true;
|
|
|
|
},
|
|
|
|
doClose() {
|
|
|
|
this.show = false;
|
2019-12-09 16:52:01 +08:00
|
|
|
},
|
|
|
|
reloadTable() {
|
|
|
|
if (this.orderId) {
|
|
|
|
this.initData();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
initData() {
|
|
|
|
getGoodsListByOrderId(this.orderId).then(res=>{
|
|
|
|
this.orderList = res.data;
|
|
|
|
});
|
2019-10-29 17:33:11 +08:00
|
|
|
}
|
|
|
|
}
|
2019-08-30 17:00:18 +08:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
|
.draft {
|
|
|
|
width: 400px;
|
|
|
|
text-align: center;
|
|
|
|
margin: 20px auto;
|
|
|
|
}
|
|
|
|
/deep/{
|
|
|
|
.data-box .el-form-item {
|
|
|
|
margin-bottom: 12px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|