shish 3 лет назад
Родитель
Сommit
795fe1b736
2 измененных файлов с 7 добавлено и 5 удалено
  1. 5 1
      hdPad/src/pages/home/cash.vue
  2. 2 4
      hdPad/src/pages/home/components/console.vue

+ 5 - 1
hdPad/src/pages/home/cash.vue

@@ -23,7 +23,7 @@
 			</view>
 			<!-- 按钮操作 -->
 			<view class="open-box">
-				<consoleButton :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId" 
+				<consoleButton :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId" @clearAll="clearAll"
 				:customId.sync="customId" :customName.sync="customName" @changeProperty="changeProperty" @rightItemRefresh="rightItemRefresh"></consoleButton>
 			</view>
 		</view>
@@ -109,6 +109,10 @@ export default {
 		}
 	},
 	methods: {
+		clearAll(){
+			this.customId = 0
+			this.customName = ''
+		},
 		cancelRefresh(){
 			this.beginRemind()
 		},

+ 2 - 4
hdPad/src/pages/home/components/console.vue

@@ -225,8 +225,7 @@ export default {
 						this.$refs.toPayRef.open('center')
 					}else{
 						this.removeFromSaveDirect()
-						this.customId = 0
-						this.customName = ''
+						this.$emit('clearAll')
 						//开单完成之后更新花材库存
 						this.$emit('rightItemRefresh')
 						uni.showToast({ title: '操作成功', duration: 1000 })
@@ -323,8 +322,7 @@ export default {
 		confirmClearItem(){
 			this.$util.hitVoice()
 			this.removeFromSaveDirect()
-			this.customId = 0
-			this.customName = ''
+			this.$emit('clearAll')
 		},
 		confirmLogout(){
 			this.$util.hitVoice()