Răsfoiți Sursa

fix: bug 修复

fuwei 4 ani în urmă
părinte
comite
a8ca3b87ee

+ 11 - 11
ghsPad/src/admin/home/components/shopTypeSelect.vue

@@ -82,11 +82,11 @@
         created(){
         created(){
             this.init()
             this.init()
         },
         },
-								watch:{
-										selectItem(){
-											console.log(3333,this.selectItem)
-										}
-								},
+        watch:{
+                selectItem(){
+                    console.log(3333,this.selectItem)
+                }
+        },
         methods:{
         methods:{
            async init(){
            async init(){
                try {
                try {
@@ -114,7 +114,7 @@
                 this.updateCurrentShop()
                 this.updateCurrentShop()
             },
             },
             selectItemChange(item){
             selectItemChange(item){
-															this.$emit('selectItemChange',item)
+			    this.$emit('selectItemChange',item)
                 // this.selectItem = {
                 // this.selectItem = {
                 //     ...item,
                 //     ...item,
                 //     currentUnit:item.bigUnit,
                 //     currentUnit:item.bigUnit,
@@ -147,9 +147,9 @@
                 overflow-y: scroll;
                 overflow-y: scroll;
 				& > view {
 				& > view {
 					border:1px solid #e4e4e4;
 					border:1px solid #e4e4e4;
-					padding: 8rpx 5rpx;
-					font-size: 14px;
-                    min-width: 80rpx;
+					padding: 12rpx 0rpx;
+					font-size: 12px;
+                    min-width: 75rpx;
                     text-align: center;
                     text-align: center;
 					&.active {
 					&.active {
 						background-color: #428369;
 						background-color: #428369;
@@ -167,8 +167,8 @@
 				& .show-shop_box {
 				& .show-shop_box {
 					position: relative;
 					position: relative;
 					width: 18%;
 					width: 18%;
-                    margin-right: 1%;
-                    margin-bottom: 1%;
+                    margin-right: 5rpx;
+                    margin-bottom: 5rpx;
 					height: 70rpx;
 					height: 70rpx;
 					& .img {
 					& .img {
 						height: 100%;
 						height: 100%;

+ 34 - 14
ghsPad/src/admin/home/workbench.vue

@@ -285,35 +285,55 @@ export default {
 
 
 		},
 		},
 		clearShop(){
 		clearShop(){
-			this.shopList = []
+			let self = this
+			uni.showModal({
+				title: '提示',
+				content: '确认清空?',
+				success: function (res) {
+				if (res.confirm) {
+					self.shopList = []
+				}
+				}
+			})	
 		},
 		},
 		logout(){
 		logout(){
 		let that = this
 		let that = this
 			uni.showModal({
 			uni.showModal({
-							title: '提示',
-							content: '确认退出?',
-							success: function (res) {
-											if (res.confirm) {
-												uni.clearStorage()
-												that.$store.commit("setLoginInfo", {})
-												plus.runtime.restart()
-											}
-							}
+				title: '提示',
+				content: '确认退出?',
+				success: function (res) {
+				if (res.confirm) {
+					uni.clearStorage()
+					that.$store.commit("setLoginInfo", {})
+					plus.runtime.restart()
+				}
+				}
 			})
 			})
 		},
 		},
 		deleteShop(){
 		deleteShop(){
 			if(this.$util.isEmpty(this.selectCurrentActiveItem)) {
 			if(this.$util.isEmpty(this.selectCurrentActiveItem)) {
-					this.$msg('请选择要删除的商品')
+				this.$msg('请选择要删除的商品')
+				return false
 			}
 			}
-			let index =	this.shopList.findIndex(i=>this.selectCurrentActiveItem.id === i.id)
-			this.shopList = this.shopList.filter(i=>this.selectCurrentActiveItem.id !== i.id)
+			let self = this
+			uni.showModal({
+				title: '提示',
+				content: '确认删除?',
+				success: function (res) {
+				if (res.confirm) {
+					let index =	self.shopList.findIndex(i=>self.selectCurrentActiveItem.id === i.id)
+					self.shopList = self.shopList.filter(i=>self.selectCurrentActiveItem.id !== i.id)
+				}
+				}
+			})
+			
 		},
 		},
 		selectItemChange(item){
 		selectItemChange(item){
 		    this.selectItem = {
 		    this.selectItem = {
 		        ...item,
 		        ...item,
 		        currentUnit:item.bigUnit,
 		        currentUnit:item.bigUnit,
 		        currentUnitPrice:item.property==1?item.bigPrice:item.price,
 		        currentUnitPrice:item.property==1?item.bigPrice:item.price,
-		        currentNum: 0,
+		        currentNum: 1,
 				unitType: 0
 				unitType: 0
 		    }
 		    }
 		    this.isShowFllowNum = true
 		    this.isShowFllowNum = true