feat: 档案详情列表生成二维码

This commit is contained in:
wanglei
2024-06-25 11:28:47 +08:00
parent 587b988ade
commit f0f7f75bf3

View File

@@ -2,7 +2,8 @@
<div> <div>
<ai-list class="app-archives-list"> <ai-list class="app-archives-list">
<template slot="title"> <template slot="title">
<ai-title title="门店档案" isShowBottomBorder v-model="search.areaId" isShowArea :hideLevel="hideLevel - 1" @change="search.current = 1, getList()"></ai-title> <ai-title title="门店档案" isShowBottomBorder v-model="search.areaId" isShowArea :hideLevel="hideLevel - 1"
@change="search.current = 1, getList()"></ai-title>
</template> </template>
<template slot="content"> <template slot="content">
<ai-search-bar class="search-bar"> <ai-search-bar class="search-bar">
@@ -68,7 +69,8 @@
@success="getList()"> @success="getList()">
<el-button icon="iconfont iconImport">导入</el-button> <el-button icon="iconfont iconImport">导入</el-button>
</ai-import> </ai-import>
<ai-download :instance="instance" url="/app/appintegraluser/girdIntegralExport" :params="search" fileName="门店档案" <ai-download :instance="instance" url="/app/appintegraluser/girdIntegralExport" :params="search"
fileName="门店档案"
:disabled="tableData.length == 0"> :disabled="tableData.length == 0">
</ai-download> </ai-download>
</template> </template>
@@ -112,7 +114,9 @@
<ai-dialog title="二维码" <ai-dialog title="二维码"
:visible.sync="dialog" :visible.sync="dialog"
:destroyOnClose="true" :destroyOnClose="true"
width="720px"></ai-dialog> width="720px">
<img :src="qrSrc" class="qr-img" alt="">
</ai-dialog>
</div> </div>
</template> </template>
@@ -155,7 +159,8 @@ export default {
], ],
tableData: [], tableData: [],
dateList: [], dateList: [],
dialog:false dialog: false,
qrSrc: ''
} }
}, },
@@ -278,7 +283,20 @@ export default {
}) })
}, },
generateQr(row){ async generateQr({id}) {
try {
const {code, data} = await this.instance.post('/app/appshoparchives/generateQrCode', null, {
params: {
id
}
})
if (code === 0) {
this.dialog = true
this.qrSrc = data
}
} catch (e) {
console.error(e)
}
this.dialog = true this.dialog = true
}, },
@@ -296,6 +314,9 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.app-archives-list { .app-archives-list {
.qr-img {
width: 100%;
height: 100%;
}
} }
</style> </style>