shish 1 год назад
Родитель
Сommit
e9fa5fbf2c
1 измененных файлов с 15 добавлено и 6 удалено
  1. 15 6
      ghs/src/views/member/list.vue

+ 15 - 6
ghs/src/views/member/list.vue

@@ -33,13 +33,15 @@
 				<span v-if="scope.row.seatSnName == ''">
 				<span v-if="scope.row.seatSnName == ''">
 					<i class="el-icon-edit" style="font-size:15px;cursor: pointer;" @click="modifySeatSnName(scope.row)"></i>
 					<i class="el-icon-edit" style="font-size:15px;cursor: pointer;" @click="modifySeatSnName(scope.row)"></i>
 				</span>
 				</span>
-				<span v-else>{{ scope.row.seatSnName }}</span>
+				<span v-else @click="modifySeatSnName(scope.row)" style="cursor: pointer;">{{ scope.row.seatSnName }}</span>
 			</template>
 			</template>
 
 
 			<template #table-column-printSeatSn="{scope}">
 			<template #table-column-printSeatSn="{scope}">
-				<span v-if="scope.row.printSeatSn == 0"></span>
+				<span v-if="scope.row.printSeatSn == 0" style="cursor: pointer;" @click="printMySeat(scope.row)">
+					打印
+				</span>
 				<span v-else>
 				<span v-else>
-					<i class="el-icon-success" style="color:green;font-size:18px;"></i>
+					<i class="el-icon-success" style="color:green;font-size:18px;cursor: pointer;" @click="printMySeat(scope.row)"></i>
 				</span>
 				</span>
 			</template>
 			</template>
 
 
@@ -98,7 +100,6 @@
 				<el-button size="small" type="primary" @click="beginRecharge(scope.row)">充值销账</el-button>
 				<el-button size="small" type="primary" @click="beginRecharge(scope.row)">充值销账</el-button>
 				<el-button size="small" type="primary" @click="kd(scope.row,0)">开单</el-button>
 				<el-button size="small" type="primary" @click="kd(scope.row,0)">开单</el-button>
 				<el-button size="small" type="primary" @click="kd(scope.row,1)">开预订单</el-button>
 				<el-button size="small" type="primary" @click="kd(scope.row,1)">开预订单</el-button>
-				<el-button size="small" type="primary" @click="printMySeat(scope.row)">打货位</el-button>
 			</template>
 			</template>
 
 
 			<template #table-column-recentExpend="{scope}">
 			<template #table-column-recentExpend="{scope}">
@@ -322,7 +323,15 @@ export default {
 			this.$router.push({path:'/order/add',query})
 			this.$router.push({path:'/order/add',query})
 		},
 		},
 		printMySeat(info){
 		printMySeat(info){
-			info.printSeatSn = 1
+			this.$service.order.info({ 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
+			})
 		},
 		},
 		kd(info,book){
 		kd(info,book){
 			let query = {}
 			let query = {}
@@ -517,7 +526,7 @@ export default {
 					op: {
 					op: {
 						visible: true,
 						visible: true,
 						props: {
 						props: {
-							width: 360,
+							width: 300,
 							align: 'center',
 							align: 'center',
 							fixed: 'right',
 							fixed: 'right',
 							label: '操作'
 							label: '操作'