shish 2 лет назад
Родитель
Сommit
37dba26da4
1 измененных файлов с 27 добавлено и 0 удалено
  1. 27 0
      ghsApp/src/pagesPurchase/info.vue

+ 27 - 0
ghsApp/src/pagesPurchase/info.vue

@@ -365,6 +365,33 @@ export default {
 		}
 	},	
 	methods: {
+		changeView(){
+			if(this.showSeat == 0){
+				if(this.detailInfo.status == 4){
+					this.initCgData()
+					this.showSeat = 1
+				}else if(this.detailInfo.status == 5){
+					this.$msg('订单已取消')
+				}else{
+					this.assignOrder()
+				}
+			}else{
+				this.showSeat = 0
+			}	
+		},
+		assignOrder(){
+			uni.showLoading()
+			assignSeat({id:this.detailInfo.id,salt:this.salt}).then(res=>{
+				uni.hideLoading()
+				if(res.code == 1){
+					if(res.data && res.data.assign == 1){
+						this.$msg(res.msg)
+						this.initCgData()
+						this.showSeat = 1
+					}
+				}
+			})
+		},
 		printBillFn(info){
 			let that = this
 			if(this.wcPrintNum > 1){