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

开单页 和 采购的开单页 分类会往回滚动数量里的扎和支不能支持小数点

jiangfeng 5 лет назад
Родитель
Сommit
0d3cb4f422

+ 1 - 1
ghsApp/src/admin/billing/index.vue

@@ -5,7 +5,7 @@
 		</view>
 		<view class="scroll-middle_bx">
 			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop" >
-				<div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index)">
+				<div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="classIndex == index ? 'active' : ''" :data-current="index" @tap.stop="swichClass(index)">
 					<text>{{ item.className || "" }}</text>
 					<text class="tag" v-if=" getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
 						<text v-if=" getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0 ">

+ 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="digit" @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="number" @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="digit" @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="number" @focus="initAllInputOne" @blur="moveAllInputOne" v-model="inputValOne" @input="changeAllInputOne" >
 			<text :class="isActiveOne?'active':''">{{valueOne?valueOne:''}}</text>
 		</view>
 		<view class="unit">支</view>

+ 12 - 4
ghsApp/src/mixins/product.js

@@ -5,7 +5,7 @@ export default {
 	data() {
 		return {
 			pageType: "bill", //选择商品页面类别  用于区分不同功能的数据
-
+			isCut:false,
 			productInfo: [], //商品信息
 			classIndex: 0, //当前商品类别下标
 			py: "", //拼音搜索条件
@@ -544,15 +544,21 @@ export default {
 		 * 切换左侧商品类别
 		 */
 		swichClass(cur) {
+			this.isCut = true;
 			// let cur = e.currentTarget.dataset.current;
 			// if (this.classIndex == cur) {
 			// 	return false;
 			// } else {}
 			clearInterval(this.timeFun)
-				this.classIndex = cur;
 			this.scroll_into_view = '';
-			this.$nextTick(()=>{this.scroll_into_view = 'class_'+cur;})
-				this.scrollPushList();
+			this.$nextTick(()=>{
+				this.scroll_into_view = 'class_'+cur;
+					this.classIndex = cur;
+
+
+			})
+
+			this.scrollPushList();
 				//解决最后一个 ***来回*** 问题 (由于点击左侧导航,右侧锚点位置信息变化,此时滚动事件也随之滚动。)
 				uni.setStorageSync("resolve","last");
 				setTimeout(()=>{
@@ -564,6 +570,7 @@ export default {
 			* 滚动商品监听
 			* **/
 		scroll_detail(options){
+			if(this.isCut) {this.isCut = false; return;}
 			//options  为滚动信息。  options.detail.scrollTop  值为相对于scroll-view。
 			if(!uni.getStorageSync("resolve")){
 				this.get_node_details(options);
@@ -599,6 +606,7 @@ export default {
 					this.scrollPushList();
 					break;
 				}
+				console.log(this.classIndex,'this.classIndex----')
 			}
 		},
 		scroll_bottom(){