Commit 28da898e by 张权

定向礼包0719需求開發

1 parent 859b14dc
...@@ -40,6 +40,15 @@ ...@@ -40,6 +40,15 @@
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<glsx-dialog class="dialog" width="720px" title="生成二维码" btnOkLabel="下载" :isVisible.sync="isQrcodeVisible" @confirmDialog="handleCancelConfirm" @closeDialog="handleCancelClose">
<div class="qrcode-body">
<p>可生成对应发放员工的领取二维码</p>
<el-select v-model="curStaff" placeholder="请选择">
<el-option v-for="item in curStaffList" :key="item.staffUUID" :label="item.staffName" :value="item.staffUUID"></el-option>
</el-select>
<img :src="url" alt="" />
</div>
</glsx-dialog>
</div> </div>
</template> </template>
...@@ -47,10 +56,17 @@ ...@@ -47,10 +56,17 @@
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { aToExport } from '@/common/constant' import { aToExport } from '@/common/constant'
import glsxDialog from '@/components/glsx-dialog'
export default { export default {
name: 'giftList', name: 'giftList',
components: {
glsxDialog
},
data() { data() {
return { return {
isQrcodeVisible: false,
curStaff: '',
curStaffList: [],
attrToIcon: { attrToIcon: {
2: 'discount', 2: 'discount',
3: 'cash', 3: 'cash',
...@@ -83,6 +99,18 @@ export default { ...@@ -83,6 +99,18 @@ export default {
listeners: { listeners: {
click: row => this.handleDelete(row.scope) click: row => this.handleDelete(row.scope)
} }
},
{
type: 'el-button',
name: row => {
return '生成二维码'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.makeQrcode(row.scope)
}
} }
], ],
size: 'small', size: 'small',
...@@ -133,8 +161,8 @@ export default { ...@@ -133,8 +161,8 @@ export default {
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: { tableOption: {
width:120, width: 200,
align:'center' align: 'center'
}, },
tableColumns: [ tableColumns: [
{ {
...@@ -172,7 +200,8 @@ export default { ...@@ -172,7 +200,8 @@ export default {
{ {
label: '发放员工', label: '发放员工',
prop: 'staffList', prop: 'staffList',
width: 150, width: 200,
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.staffList.map(item => item.staffName).join(',') return cellValue.staffList.map(item => item.staffName).join(',')
} }
...@@ -260,6 +289,19 @@ export default { ...@@ -260,6 +289,19 @@ export default {
}, },
methods: { methods: {
makeQrcode(row) {
this.curStaffList = row.staffList
this.isQrcodeVisible = true
},
handleCancelConfirm() {
this.handleCancelClose()
},
handleCancelClose() {
console.log(this.curStaff)
this.curStaff = ''
this.curStaffList = []
this.isQrcodeVisible = false
},
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate.length) { if (this.searchForm.createDate.length) {
...@@ -398,7 +440,7 @@ export default { ...@@ -398,7 +440,7 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.p-b-12 { .p-b-12 {
margin-bottom: 14px; margin-bottom: 14px;
font-weight: 500; font-weight: 500;
...@@ -411,6 +453,33 @@ export default { ...@@ -411,6 +453,33 @@ export default {
margin-right: 8px; margin-right: 8px;
display: inline-block; display: inline-block;
} }
.dialog {
/deep/.el-dialog__body {
padding: 20px;
.qrcode-body {
display: flex;
flex-direction: column;
align-items: center;
p {
line-height: 28px;
margin-bottom: 16px;
}
.el-select {
.el-input__inner {
width: 360px;
height: 36px;
}
}
img {
width: 160px;
height: 160px;
margin-top: 16px;
}
}
}
}
.gift-detail .gift-item { .gift-detail .gift-item {
margin-right: 80px; margin-right: 80px;
display: flex; display: flex;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!