Просмотр исходного кода

报错、弹窗支出小数点输入

jf 5 лет назад
Родитель
Сommit
ca4a944dc2

+ 2 - 2
ghsApp/src/components/module/allMoreSelectInput.vue

@@ -37,12 +37,12 @@
 <template>
 	<view class="change-input-box">
 		<view class="change-input">
-				<input :focus="isFocus" :style="isActive?'caret-color:rgba(0,0,0,0)':'caret-color:rgba(0,0,0,1)'" type="number" @focus="initAllInput" @blur="moveAllInput" v-model="inputVal" @input="changeAllInput" >
+				<input :focus="isFocus" :style="isActive?'caret-color:rgba(0,0,0,0)':'caret-color:rgba(0,0,0,1)'" type="digit" @focus="initAllInput" @blur="moveAllInput" v-model="inputVal" @input="changeAllInput" >
 				<text :class="isActive?'active':''">{{value?value:''}}</text>
 		</view>
 		<view class="unit">扎</view>
 		<view class="change-input">
-			<input :focus="isFocusOne" :style="isActiveOne?'caret-color:rgba(0,0,0,0)':'caret-color:rgba(0,0,0,1)'" type="number" @focus="initAllInputOne" @blur="moveAllInputOne" v-model="inputValOne" @input="changeAllInputOne" >
+			<input :focus="isFocusOne" :style="isActiveOne?'caret-color:rgba(0,0,0,0)':'caret-color:rgba(0,0,0,1)'" type="digit" @focus="initAllInputOne" @blur="moveAllInputOne" v-model="inputValOne" @input="changeAllInputOne" >
 			<text :class="isActiveOne?'active':''">{{valueOne?valueOne:''}}</text>
 		</view>
 		<view class="unit">支</view>

+ 1 - 1
ghsApp/src/components/module/allSelectInput.vue

@@ -27,7 +27,7 @@
 </style>
 <template>
 	<view class="change-input" :style="'width:'+width+'rpx !important;height:'+height+'rpx !important;font-size:'+fontSize+'rpx !important'" >
-			<input :focus="isFocus" :style="isActive?'caret-color:rgba(0,0,0,0)':'caret-color:rgba(0,0,0,1)'"  :type="inputType?inputType:'number'" @focus="initAllInput" @blur="moveAllInput" v-model="inputVal" @input="changeAllInput" :placeholder="value==''&&inputVal==''?placeholder:''">
+			<input :focus="isFocus" :style="isActive?'caret-color:rgba(0,0,0,0)':'caret-color:rgba(0,0,0,1)'"  :type="inputType?inputType:'digit'" @focus="initAllInput" @blur="moveAllInput" v-model="inputVal" @input="changeAllInput" :placeholder="value==''&&inputVal==''?placeholder:''">
 			<text :class="isActive?'active':''">{{value?value:''}}</text>
 	</view>
 </template>

+ 12 - 0
ghsApp/src/mixins/BLE.js

@@ -24,6 +24,18 @@ export default {
 		//断开蓝牙链接
 		destroyed(BleVal) {
 			let self = this;
+			if(!uni.getStorageSync('BLE')){
+				uni.showModal({
+					title: '提示', content: '请先连接蓝牙',
+					confirmText: "去连接",
+					success: function (res) {
+						if (res.confirm) {
+							uni.navigateTo({url:'/pagesOrder/print'});
+						}
+					}
+				});
+				return;
+			}
 			uni.closeBLEConnection({deviceId: uni.getStorageSync('BLE').deviceId,success(res) {
 					console.log(res);
 					self.autoLinkBle(BleVal);

+ 1 - 1
ghsApp/src/pagesPurchase/details.vue

@@ -213,7 +213,7 @@ export default {
 		if(!this.$util.isEmpty(uni.getStorageSync("newGhs"))){
 			this.showCustomer = true;
 		}
-		this.selectAllPrice();
+		this.selectAllPrice;
 	},
 	onUnload(){
 		uni.removeStorageSync('newGhs');