|
|
@@ -36,6 +36,10 @@
|
|
|
<span v-else @click="modifySeatSnName(scope.row)" style="cursor: pointer;">{{ scope.row.seatSnName }}</span>
|
|
|
</template>
|
|
|
|
|
|
+ <template #table-column-buyNum="{scope}">
|
|
|
+ <span style="cursor:pointer;" @click="printZjMySeat(scope.row)">{{ scope.row.buyNum?parseFloat(scope.row.buyNum):0 }}</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template #table-column-printSeatSn="{scope}">
|
|
|
<span v-if="scope.row.printSeatSn == 0" style="cursor: pointer;" @click="printMySeat(scope.row)">
|
|
|
打印
|
|
|
@@ -323,12 +327,22 @@ export default {
|
|
|
let query = {}
|
|
|
this.$router.push({path:'/order/add',query})
|
|
|
},
|
|
|
+ printZjMySeat(info){
|
|
|
+ this.$service.custom.printSeatSn({ id: info.id }).then(res => {
|
|
|
+ let printData = res.printData ? res.printData : ''
|
|
|
+ let str = res.template ? res.template:''
|
|
|
+ let template = JSON.parse(str)
|
|
|
+ var hiprintTemplate = new hiprint.PrintTemplate({template:template});
|
|
|
+ hiprintTemplate.print2(printData)
|
|
|
+ info.printSeatSn = 1
|
|
|
+ this.$message.success('已触发')
|
|
|
+ })
|
|
|
+ },
|
|
|
printMySeat(info){
|
|
|
this.$service.custom.printSeatSn({ id: info.id }).then(res => {
|
|
|
let printData = res.printData ? res.printData : ''
|
|
|
let str = res.template ? res.template:''
|
|
|
let template = JSON.parse(str)
|
|
|
- hiprint.init();
|
|
|
var hiprintTemplate = new hiprint.PrintTemplate({template:template});
|
|
|
hiprintTemplate.print(printData)
|
|
|
info.printSeatSn = 1
|