<template>
|
<div class="bto">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tab-pane label="All" name="all"></el-tab-pane>
|
<el-tab-pane :label="$t('申购中')" name="0"></el-tab-pane>
|
<el-tab-pane :label="$t('成功')" name="1"></el-tab-pane>
|
<el-tab-pane :label="$t('失败')" name="2"></el-tab-pane>
|
</el-tabs>
|
|
<el-table
|
height="250"
|
:data="tableData"
|
style="width: 100%"
|
empty-text="No Data"
|
>
|
<el-table-column prop="stockName" :label="$t('hj313')">
|
<template slot-scope="scope">
|
<el-tag
|
:type="scope.row.stockGid != $mc ? 'success' : ''"
|
size="small"
|
style="margin-right: 8px"
|
>
|
{{ scope.row.stockGid }}
|
</el-tag>
|
<span>{{ scope.row.stockName }}</span>
|
</template>
|
</el-table-column>
|
|
<el-table-column prop="orderNum" :label="$t('sl')"> </el-table-column>
|
|
<el-table-column prop="buyOrderPrice" :label="$t('hj81')">
|
<template slot-scope="scope">
|
<span
|
>{{ scope.row.stockGid | currencySymbol }}
|
{{ scope.row.buyOrderPrice }}</span
|
>
|
</template>
|
</el-table-column>
|
|
<el-table-column prop="orderTotalPrice" :label="$t('总金额')">
|
<template slot-scope="scope">
|
<span class="sc_c" style="font-size: 18px">
|
{{ scope.row.stockGid | currencySymbol }}
|
{{ scope.row.orderTotalPrice }}
|
</span>
|
</template>
|
</el-table-column>
|
|
<el-table-column prop="checkType" :label="$t('状态')">
|
<template slot-scope="scope">
|
<el-tag type="warning" v-if="scope.row.checkType == '0'">
|
<span>{{ $t("申购中") }}</span>
|
</el-tag>
|
<el-tag type="success" v-else-if="scope.row.checkType == '1'">
|
{{ $t("成功") }}
|
</el-tag>
|
<el-tag type="danger" v-else-if="scope.row.checkType == '2'">
|
{{ $t("失败") }}
|
</el-tag>
|
</template>
|
</el-table-column>
|
|
<el-table-column prop="buyOrderTime" :label="$t('提交时间')">
|
<template slot-scope="scope">
|
<span>{{ scope.row.buyOrderTime | gettime }}</span>
|
</template>
|
</el-table-column>
|
</el-table>
|
|
<div class="pagination">
|
<el-pagination
|
background
|
layout="prev, pager, next"
|
:total="total"
|
:current-page="pageNum"
|
:page-size="pageSize"
|
@current-change="handleCurrentChange"
|
>
|
</el-pagination>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import mixins from "@/mixins/myMixins"; // 混入
|
import * as api from "@/axios/api";
|
import { mapState } from "vuex";
|
export default {
|
mixins: [mixins],
|
data() {
|
return {
|
activeName: "all",
|
// 列表参数,必须是opt和myMixins混入配合使用
|
opt: {
|
status: "",
|
},
|
};
|
},
|
computed: {
|
...mapState(["userInfo"]),
|
},
|
watch: {},
|
created() {
|
this.apiInterface = api.getDzOrderList; // 赋值接口
|
this.init(); // 获取记录列表
|
},
|
methods: {
|
handleClick() {
|
if (this.activeName === "all") this.opt.status = "";
|
else this.opt.status = this.activeName;
|
},
|
},
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
.bto {
|
width: 100%;
|
|
.pagination {
|
margin-top: 20px;
|
text-align: center;
|
}
|
}
|
</style>
|