12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <div>
- <el-dialog title="查看卡密" :visible.sync="camiloShow" :before-close="close">
- <el-table :data="camiloData">
- <el-table-column property="cardNo" label="卡号" min-width="250" align="center">
- <template slot-scope="{row}">
- {{ row.cardNo?row.cardNo:'--' }}
- </template>
- </el-table-column>
- <el-table-column property="cardPwd" label="密码(激活码)" min-width="250" align="center"></el-table-column>
- </el-table>
- <pagination :total="total" :page.sync="pageParams.pageNum" :limit.sync="pageParams.pageSize"
- @pagination="getList()"/>
- </el-dialog>
- </div>
- </template>
- <script>
- import {cradCamiloList} from "../../api/business/goods";
- export default {
- name: "camilo",
- props: {
- camiloShow: {
- type: Boolean,
- default: true
- },
- camiloGoodsId: {
- type: Number,
- default: 0
- },
- },
- data() {
- return {
- pageParams: {
- pageNum: 1,
- pageSize: 10
- },
- loading: false,
- camiloData: [],
- total: 0,
- };
- },
- mounted() {
- this.getList()
- },
- methods: {
- close() {
- this.$emit('cancel')
- },
- getList() {
- if (this.loading) {
- return
- }
- this.loading = true
- cradCamiloList('pageNum=' + this.pageParams.pageNum + '&pageSize=' + this.pageParams.pageSize + '&', {goodsId: this.camiloGoodsId}).then(res => {
- this.loading = false
- if (res.code === 0) {
- this.camiloData = res.rows
- this.total = res.total
- }
- }).catch(() => {
- this.loading = false
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- </style>
|