修复bug
This commit is contained in:
@@ -18,13 +18,13 @@
|
|||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
<div @click="tabIndex = 0" :class="[tabIndex === 0 ? 'active' : '']">
|
<div @click="tabIndex = 0" :class="[tabIndex === 0 ? 'active' : '']">
|
||||||
<span>VIP</span>
|
<span>金币充值</span>
|
||||||
</div>
|
</div>
|
||||||
<div @click="tabIndex = 1" :class="[tabIndex === 1 ? 'active' : '']">
|
<div @click="tabIndex = 1" :class="[tabIndex === 1 ? 'active' : '']">
|
||||||
<span>SVIP</span>
|
<span>基础功能</span>
|
||||||
</div>
|
</div>
|
||||||
<div @click="tabIndex = 2" :class="[tabIndex === 2 ? 'active' : '']">
|
<div @click="tabIndex = 2" :class="[tabIndex === 2 ? 'active' : '']">
|
||||||
<span>超级VIP</span>
|
<span>高级功能</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-content"
|
<div class="tab-content"
|
||||||
@@ -34,17 +34,17 @@
|
|||||||
<div
|
<div
|
||||||
class="tab-content__item"
|
class="tab-content__item"
|
||||||
:class="[currIndex === i ? 'active' : '']"
|
:class="[currIndex === i ? 'active' : '']"
|
||||||
v-for="(price, i) in 4"
|
v-for="(price, i) in priceList"
|
||||||
:key="i"
|
:key="i"
|
||||||
@click="currIndex = i">
|
@click="currIndex = i, getQrcode(price)">
|
||||||
<h3>12个月</h3>
|
<h3>{{ price.remark }}</h3>
|
||||||
<div class="price">
|
<div class="price">
|
||||||
<i>¥</i>
|
<i>¥</i>
|
||||||
<span>88</span>
|
<span>{{ price.price }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="original-price">
|
<div class="original-price">
|
||||||
<i>¥</i>
|
<i>¥</i>
|
||||||
<span>88</span>
|
<span>{{ price.originPrice }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -55,7 +55,8 @@
|
|||||||
<span class="price">88</span>
|
<span class="price">88</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="code">
|
<div class="code">
|
||||||
<img src="../assets/code.png" />
|
<!-- <img src="../assets/code.png" /> -->
|
||||||
|
<vue-qr v-if="qrcode" :text="qrcode" :size="120" :margin="8" :logoSrc="wechatLogo"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="paytype">
|
<div class="paytype">
|
||||||
<svg width="13" height="13" viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg">
|
<svg width="13" height="13" viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg">
|
||||||
@@ -80,11 +81,40 @@
|
|||||||
return {
|
return {
|
||||||
isShow: false,
|
isShow: false,
|
||||||
tabIndex: 0,
|
tabIndex: 0,
|
||||||
currIndex: 0
|
currIndex: 0,
|
||||||
|
qrcode: '',
|
||||||
|
priceList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.getPriceList()
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
getPriceList() {
|
||||||
|
this.$http.post(`/api/priceConfig/page?module=2`).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.priceList = res.data.records
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getQrcode(item) {
|
||||||
|
this.$http.post(`/api/order/createOrder`, null, {
|
||||||
|
params: {
|
||||||
|
priceConfigId: item.id
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res?.data?.id) {
|
||||||
|
return res.data.id
|
||||||
|
}
|
||||||
|
}).then(id => this.$http.post(`/api/order/createPrepayOrder?id=${id}`)).then(res => {
|
||||||
|
if (res?.data) {
|
||||||
|
this.qrcode = res.data.codeUrl
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
show () {
|
show () {
|
||||||
this.isShow = true
|
this.isShow = true
|
||||||
},
|
},
|
||||||
@@ -120,8 +150,9 @@
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
z-index: 11;
|
z-index: 11;
|
||||||
width: 900px;
|
width: 1100px;
|
||||||
padding: 40px 40px;
|
height: 560px;
|
||||||
|
padding: 40px 60px;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -130,7 +161,7 @@
|
|||||||
.top {
|
.top {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 60px;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
@@ -180,6 +211,7 @@
|
|||||||
|
|
||||||
.middle {
|
.middle {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
height: 380px;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -295,6 +327,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
margin-left: 40px;
|
margin-left: 40px;
|
||||||
padding: 20px 0 20px 0;
|
padding: 20px 0 20px 0;
|
||||||
|
|
||||||
@@ -330,7 +363,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.code img {
|
.code {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
margin: 14px 0;
|
margin: 14px 0;
|
||||||
|
|||||||
@@ -196,7 +196,7 @@
|
|||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<div class="table-options">
|
<div class="table-options">
|
||||||
<el-button type="text" @click="showTemplate(row)">模板预览</el-button>
|
<el-button type="text" @click="showTemplate(row)">模板预览</el-button>
|
||||||
<el-button type="text" @click="updateTempate(row), isShowTemplate = false">使用</el-button>
|
<el-button type="text" @click="updateTempate(row)">使用</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -396,6 +396,7 @@
|
|||||||
addField() {
|
addField() {
|
||||||
const num = this.dynamicFromList.length > 9 ? this.dynamicFromList.length + 1 : `0${this.dynamicFromList.length + 1}`
|
const num = this.dynamicFromList.length > 9 ? this.dynamicFromList.length + 1 : `0${this.dynamicFromList.length + 1}`
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-empty
|
||||||
if (this.dynamicFromList.length && !this.dynamicFromList.at(-1)[`field_${num}`]) {
|
if (this.dynamicFromList.length && !this.dynamicFromList.at(-1)[`field_${num}`]) {
|
||||||
} else {
|
} else {
|
||||||
this.$set(this.dynamicFrom, `field_${num}`, '')
|
this.$set(this.dynamicFrom, `field_${num}`, '')
|
||||||
@@ -415,6 +416,9 @@
|
|||||||
const config = JSON.parse(res.data.content)
|
const config = JSON.parse(res.data.content)
|
||||||
this.hiprintTemplate.update(config)
|
this.hiprintTemplate.update(config)
|
||||||
this.hiprintTemplate.setPaper(config.panels[0].width, config.panels[0].height)
|
this.hiprintTemplate.setPaper(config.panels[0].width, config.panels[0].height)
|
||||||
|
|
||||||
|
this.dynamicFromList = JSON.parse(res.data.params)
|
||||||
|
this.isShowTemplate = false
|
||||||
}
|
}
|
||||||
|
|
||||||
this.templateLoading = false
|
this.templateLoading = false
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
/* eslint-disable no-undef */
|
||||||
import { hiprint } from 'vue-plugin-hiprint'
|
import { hiprint } from 'vue-plugin-hiprint'
|
||||||
export const customProvider = function (options) {
|
|
||||||
|
export const customProvider = function () {
|
||||||
const addElementTypes = function (context) {
|
const addElementTypes = function (context) {
|
||||||
context.removePrintElementTypes('customProvider')
|
context.removePrintElementTypes('customProvider')
|
||||||
context.addPrintElementTypes('customProvider', [
|
context.addPrintElementTypes('customProvider', [
|
||||||
@@ -24,11 +26,9 @@ export const customProvider = function (options) {
|
|||||||
printData = sukData
|
printData = sukData
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
$('body').append(`<div id="codewrapper-${elId}" style="width: ${codeWidth}pt">
|
$('body').append(`<div id="codewrapper-${elId}" style="width: ${codeWidth}pt">
|
||||||
<svg id="${elId}" width="100%" display="block" height="100%" class="hibarcode_imgcode" preserveAspectRatio="none slice"></svg>
|
<svg id="${elId}" width="100%" display="block" height="100%" class="hibarcode_imgcode" preserveAspectRatio="none slice"></svg>
|
||||||
</div>`)
|
</div>`)
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
JsBarcode('#' + elId, printData.labelCode, {
|
JsBarcode('#' + elId, printData.labelCode, {
|
||||||
format: 'CODE128B',
|
format: 'CODE128B',
|
||||||
width: 2,
|
width: 2,
|
||||||
@@ -37,13 +37,11 @@ export const customProvider = function (options) {
|
|||||||
displayValue: false
|
displayValue: false
|
||||||
})
|
})
|
||||||
|
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
const codeHtml = $(`#codewrapper-${elId}`).html()
|
const codeHtml = $(`#codewrapper-${elId}`).html()
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
$(`body>#codewrapper-${elId}`).remove()
|
$(`body>#codewrapper-${elId}`).remove()
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
const resizeObserver = new ResizeObserver(() => {
|
const resizeObserver = new ResizeObserver(() => {
|
||||||
JsBarcode('#' + elId, printData.labelCode, {
|
JsBarcode('#' + elId, printData.labelCode, {
|
||||||
format: "CODE128B",
|
format: "CODE128B",
|
||||||
width: 2,
|
width: 2,
|
||||||
height: parseInt(hinnn.pt.toPx(options.height - 22).toString()) * 0.6,
|
height: parseInt(hinnn.pt.toPx(options.height - 22).toString()) * 0.6,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
</ai-title>
|
</ai-title>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<ai-card title="标签模板" class="card" :hideTitle="true">
|
<ai-card title="标签模板" class="card" :hideTitle="true" v-loading="isLoading">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="add-label__wrapper">
|
<div class="add-label__wrapper">
|
||||||
<Print
|
<Print
|
||||||
@@ -35,7 +35,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Print from '@/components/print/Print'
|
import Print from '@/components/print/Print'
|
||||||
import template from '@/components/print/template'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -91,7 +90,8 @@
|
|||||||
this.$router.go(-1)
|
this.$router.go(-1)
|
||||||
},
|
},
|
||||||
|
|
||||||
getInfo () {
|
getInfo() {
|
||||||
|
this.isLoading = true
|
||||||
this.$http.post(`/api/template/detail?id=${this.$route.query.id}`).then(res => {
|
this.$http.post(`/api/template/detail?id=${this.$route.query.id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.info = res.data
|
this.info = res.data
|
||||||
@@ -102,6 +102,8 @@
|
|||||||
this.template = JSON.parse(res.data.content)
|
this.template = JSON.parse(res.data.content)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.isLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -344,7 +344,6 @@
|
|||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
|
|
||||||
this.lableList = list
|
this.lableList = list
|
||||||
console.log(list)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user