fuwei il y a 4 ans
Parent
commit
2b840a382e

+ 45 - 0
ghsPad/src/admin/home/components/select-customer.vue

@@ -0,0 +1,45 @@
+<template>
+    <view>
+        <textarea @tap="activeKeyboard" disabled :value="input" placeholder="点击调起键盘输入"></textarea>
+        <VKeyboard ref="keyboard" :pointIsShow="true" :digital="false" :disorderly="false" @typing="typing" @enter="enter"></VKeyboard>
+    </view>
+</template>
+
+<script>
+    import VKeyboard from '@/components/plugin/vKeyboard/VKeyboard.vue'
+    export default {
+        name:'selectCustomer',
+        components:{
+            VKeyboard
+        },
+        data() {
+			return {
+				input: ''//键盘输入
+			};
+		},
+        methods: {
+			//键盘方法
+			activeKeyboard() {
+				this.$refs.keyboard.activate();
+			},
+			typing(e) {
+				if (e.backspace) {
+					if (this.input.length > 0) {
+						this.input = this.input.substring(0, this.input.length - 1);
+					}
+				}
+				else {
+					this.input += e.char;
+				}
+			},
+			enter() {
+				this.$refs.keyboard.deactivate();
+			},
+			//键盘方法end
+		}
+    }
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 25 - 2
ghsPad/src/admin/home/workbench.vue

@@ -75,7 +75,9 @@
 				</view>
 			</view>
 			<view class="shop-show_box">
-				<view class="show-shop_box">
+				<view 
+				@click="selectItem"
+				class="show-shop_box">
 					<image
 						class="img"
 						src="https://file02.16sucai.com/d/file/2014/0829/372edfeb74c3119b666237bd4af92be5.jpg"
@@ -98,6 +100,19 @@
 				</view>
 			</view>
 		</view>
+		<uniPopup
+		:show.sync="isShowFllowNum"
+		>
+			<div>
+				<keyboardSetFlower></keyboardSetFlower>
+			</div>
+		</uniPopup>
+		<uniPopup
+		:show.sync="isShowUser"
+		>
+			<selectCustomer></selectCustomer>
+		</uniPopup>
+		
 	</view>
 </template>
 <script>
@@ -105,12 +120,17 @@ import { mapGetters,mapActions } from "vuex";
 import NotLogin from "@/components/not-login";
 import productMins from "@/mixins/product";
 import autoUpdateMixins from "@/mixins/autoUpdate";
+import uniPopup from '@/components/uni-popup'
+import keyboardSetFlower from '@/components/app-boardSet-flower.vue'
+import selectCustomer from './components/select-customer.vue'
 export default {
 	name: "workbench",
-	components: { NotLogin },
+	components: { NotLogin,uniPopup,keyboardSetFlower,selectCustomer },
 	mixins: [productMins,autoUpdateMixins],
 	data() {
 		return {
+			isShowFllowNum: false,
+			isShowUser: true,
 			shopListType:[
 				{
 					name:'今日特价',
@@ -141,6 +161,9 @@ export default {
 	},
 	methods: {
 		init() {
+		},
+		selectItem(){
+			this.isShowFllowNum = true
 		}
 	}
 };

+ 45 - 0
ghsPad/src/components/app-boardSet-flower.vue

@@ -0,0 +1,45 @@
+<template>
+    <view>
+        <textarea @tap="activeKeyboard" disabled :value="input" placeholder="点击调起键盘输入"></textarea>
+        <VKeyboard ref="keyboard" :pointIsShow="false" :digital="true" :disorderly="false" @typing="typing" @enter="enter"></VKeyboard>
+    </view>
+</template>
+
+<script>
+    import VKeyboard from '@/components/plugin/vKeyboard/VKeyboard.vue'
+    export default {
+        name:'keyboardSetFlower',
+        components:{
+            VKeyboard
+        },
+        data() {
+			return {
+				input: ''//键盘输入
+			};
+		},
+        methods: {
+			//键盘方法
+			activeKeyboard() {
+				this.$refs.keyboard.activate();
+			},
+			typing(e) {
+				if (e.backspace) {
+					if (this.input.length > 0) {
+						this.input = this.input.substring(0, this.input.length - 1);
+					}
+				}
+				else {
+					this.input += e.char;
+				}
+			},
+			enter() {
+				this.$refs.keyboard.deactivate();
+			},
+			//键盘方法end
+		}
+    }
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 14 - 5
ghsPad/src/components/plugin/vKeyboard/VKeyboard.vue

@@ -56,7 +56,11 @@
 			disorderly: {
 				type: [Boolean, String],
 				default: false
-			}
+			},
+			pointIsShow:{
+				type: Boolean,
+				default: true
+			},
 			/* ,
 						value: String */
 		},
@@ -162,6 +166,11 @@
 		created() {
 			this.lines = this.disorderly ? disorder() : order;
 			this.digits = this.disorderly ? digits() : natural;
+			
+			if(!this.pointIsShow) {
+				this.digits = this.digits.filter(i=>i!=='.')
+			}
+			
 		}
 	}
 </script>
@@ -203,11 +212,11 @@
 	}
 
 	.v-keyboard {
-		transform: translateY(100%);
+		// transform: translateY(100%);
 		width: 100%;
-		position: absolute;
-		bottom: 0;
-		left: 0;
+		// position: absolute;
+		// bottom: 0;
+		// left: 0;
 		background: #f5f5f5;
 		padding: .5em 0;
 		z-index: 100;