|
|
@@ -27,8 +27,8 @@
|
|
|
</template>
|
|
|
|
|
|
<template #table-column-stock="{scope}">
|
|
|
- <span v-if="scope.row.switchOrder==1">{{ scope.row.stock }}</span>
|
|
|
- <span v-else>
|
|
|
+ <span v-if="scope.row.switchOrder==1" @click="printA42(scope.row)">{{ scope.row.stock }}</span>
|
|
|
+ <span v-else @click="printA42(scope.row)">
|
|
|
<span v-if="Number(scope.row.stock)>Number(scope.row.itemNum)">{{ scope.row.stock }}</span>
|
|
|
<span v-else style="font-weight:bold;color:blue;font-size:20px;">{{ scope.row.stock }}</span>
|
|
|
</span>
|
|
|
@@ -228,6 +228,17 @@ export default {
|
|
|
hiprintTemplate.print(printData)
|
|
|
info.printOrder = 1
|
|
|
})
|
|
|
+ },
|
|
|
+ printA42(info){
|
|
|
+ this.$service.liveOrder.printOrder({ 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.print2(printData)
|
|
|
+ info.printOrder = 1
|
|
|
+ })
|
|
|
},
|
|
|
getStaff(e){
|
|
|
this.currentStaffId = e
|