二维码打印

(cherry picked from commit 9b939846f9)
This commit is contained in:
Vinjor 2024-10-15 18:47:19 +08:00
parent 2dcc5e02ca
commit 9c5846ac29
7 changed files with 41 additions and 1 deletions

View File

@ -26,3 +26,6 @@ VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab
# 大屏设计器服务
VUE_APP_BIG_SCREEN_SERVER = 'http://127.0.0.1:3000'
#小程序推广码前缀
VUE_APP_REPAIR_PREX = 'https://www.lighting-it.cn/share?inviteId='

View File

@ -24,3 +24,6 @@ VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab
# 大屏设计器服务
VUE_APP_BIG_SCREEN_SERVER = 'http://127.0.0.1:3000'
#小程序推广码前缀
VUE_APP_REPAIR_PREX = 'https://www.lighting-it.cn/share?inviteId='

View File

@ -28,3 +28,6 @@ VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab
# 大屏设计器服务
VUE_APP_BIG_SCREEN_SERVER = 'http://127.0.0.1:3000'
#小程序推广码前缀
VUE_APP_REPAIR_PREX = 'https://www.lighting-it.cn/share?inviteId='

View File

@ -26,3 +26,6 @@ VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab
# 大屏设计器服务
VUE_APP_BIG_SCREEN_SERVER = 'http://127.0.0.1:3000'
#小程序推广码前缀
VUE_APP_REPAIR_PREX = 'https://www.lighting-it.cn/share?inviteId='

View File

@ -26,3 +26,6 @@ VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab
# 大屏设计器服务
VUE_APP_BIG_SCREEN_SERVER = 'http://127.0.0.1:3000'
#小程序推广码前缀
VUE_APP_REPAIR_PREX = 'https://www.lighting-it.cn/share?inviteId='

View File

@ -33,6 +33,13 @@ export function getStaff(id) {
method: 'get'
})
}
// 设置推广码
export function setStaffUnicode() {
return request({
url: '/company/staff/setStaffUnicode',
method: 'get'
})
}
// 获得企业管理-员工信息
export function getStaffById(id) {

View File

@ -85,6 +85,10 @@
v-hasPermi="['company:staff:create']"
>新增
</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="setStaffUnicodeMethod"
v-hasPermi="['company:staff:create']"
>设置推广码
</el-button>
</el-col>
<!-- <el-col>-->
<!-- <el-button type="primary" @click="syncData">同步</el-button>-->
@ -107,7 +111,7 @@
</el-table-column>
<el-table-column label="唯一推广码" align="center" prop="uniqueCode" width="180">
<template v-slot="scope">
<qriously :value="scope.row.uniqueCode" :options="{ width: 100, height: 100 }"/>
<qriously v-if="scope.row.uniqueCode" :backgroundAlpha="1" :value="scope.row.uniqueCode" :options="{ width: 100, height: 100 }"/>
</template>
</el-table-column>
<el-table-column label="工号" align="center" prop="workNo" width="180"/>
@ -274,12 +278,26 @@ export default {
handleResetPassword(row) {
this.$refs['staffResetPassword'].open(row)
},
/** 设置推广码 */
async setStaffUnicodeMethod() {
try {
this.loading = true
const res = await StaffApi.setStaffUnicode()
} finally {
this.loading = false
}
},
/** 查询列表 */
async getList() {
try {
this.loading = true
const res = await StaffApi.getStaffPage(this.queryParams)
this.list = res.data.records
for (let i = 0; i < this.list.length; i++) {
if(this.list[i].uniqueCode){
this.list[i].uniqueCode = process.env.VUE_APP_REPAIR_PREX+this.list[i].uniqueCode
}
}
this.total = res.data.total
} finally {
this.loading = false