Browse Source

优化供货商零售端花材列表、修改供货商采购input高度、多选商品弹窗高度

jf 5 years ago
parent
commit
ed026b6efc

+ 3 - 3
ghsApp/src/components/plugin/modal.vue

@@ -1,10 +1,10 @@
 <template>
 	<view @touchmove.stop.prevent>
-		<view class="tui-modal-box" :style="{width:width,padding:padding,borderRadius:radius,background:bgcolor}" :class="[(fadein || show)?'tui-modal-normal':'tui-modal-scale',show?'tui-modal-show':'']">
+		<view class="tui-modal-box" style="margin-top: -150rpx" :style="{width:width,padding:padding,borderRadius:radius,background:bgcolor}" :class="[(fadein || show)?'tui-modal-normal':'tui-modal-scale',show?'tui-modal-show':'']">
 			<view v-if="!custom">
 				<view class="tui-modal-title" v-if="title">{{title}}</view>
 				<!-- <view class="tui-modal-content" :class="[title?'':'tui-mtop']"> -->
-				<view 
+				<view
 					v-if="!isCustomContent"
 					class="tui-modal-content">
 					<block v-if="content">
@@ -124,7 +124,7 @@ export default {
 	},
 	mounted(){
 		console.log(this)
-	}, 
+	},
 	methods: {
 		handleClick(e) {
 			if (!this.show) return

+ 3 - 1
ghsApp/src/mixins/product.js

@@ -532,8 +532,10 @@ export default {
 			// if (this.classIndex == cur) {
 			// 	return false;
 			// } else {}
+			clearInterval(this.timeFun)
 				this.classIndex = cur;
-			this.scroll_into_view = 'class_'+cur;
+			this.scroll_into_view = '';
+			this.$nextTick(()=>{this.scroll_into_view = 'class_'+cur;})
 				this.scrollPushList();
 				//解决最后一个 ***来回*** 问题 (由于点击左侧导航,右侧锚点位置信息变化,此时滚动事件也随之滚动。)
 				uni.setStorageSync("resolve","last");

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

@@ -77,7 +77,7 @@
 <!--								placeholder="请填写采购总价"-->
 <!--							/>元-->
 							<allSelectInput :isActive="isAloneAllActive" :isFocus="isAloneAllFocus" :value="customData.itemPrice" :placeholder="'请填写采购总价'"
-																							:width="400" :height="60"
+																							:width="400" :height="80"
 																							@deleteInputVal="deleteAloneInputVal" @initAllInput="initAloneAllInput" @moveAllInput="moveAloneAllInput">
 							</allSelectInput> <text style="margin-left: 20rpx">元</text>
 						</view>

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

@@ -121,7 +121,7 @@
 			</scroll-view>
 		</view>
 		<!-- :maskClosable="false" -->
-		<modal-module :show="isModel" @cancel="modalCancel" @click="affirm" :title="customData.itemName" color="#333" :size="32" padding="30rpx 30rpx" >
+		<modal-module :show="isModel" @cancel="modalCancel" @click="affirm" :title="customData.itemName" color="#333" :size="32" padding="30rpx 30rpx">
 			<template slot="customContent">
 				<view class="select-cmd_bx" v-if="customData">
 					<view class="kc"> 库存 {{ customData.stock }} </view>

+ 3 - 3
hdApp/src/components/plugin/modal.vue

@@ -1,10 +1,10 @@
 <template>
 	<view @touchmove.stop.prevent>
-		<view class="tui-modal-box" :style="{width:width,padding:padding,borderRadius:radius,background:bgcolor}" :class="[(fadein || show)?'tui-modal-normal':'tui-modal-scale',show?'tui-modal-show':'']">
+		<view class="tui-modal-box" style="margin-top: -150rpx" :style="{width:width,padding:padding,borderRadius:radius,background:bgcolor}" :class="[(fadein || show)?'tui-modal-normal':'tui-modal-scale',show?'tui-modal-show':'']">
 			<view v-if="!custom">
 				<view class="tui-modal-title" v-if="title">{{title}}</view>
 				<!-- <view class="tui-modal-content" :class="[title?'':'tui-mtop']"> -->
-				<view 
+				<view
 					v-if="!isCustomContent"
 					class="tui-modal-content">
 					<block v-if="content">
@@ -124,7 +124,7 @@ export default {
 	},
 	mounted(){
 		console.log(this)
-	}, 
+	},
 	methods: {
 		handleClick(e) {
 			if (!this.show) return

+ 24 - 17
hdApp/src/mixins/product.js

@@ -651,17 +651,22 @@ export default {
 				if (element.id == item.id && element.classId == item.classId) {
 					has = true;
 					if (element.bigCount > 0) {
-						if(!this.isSmallCount){list[index] = { ...element, bigCount: --element.bigCount };}
+						if (!this.isSmallCount) {
+							list[index] = {...element, bigCount: --element.bigCount};
+						}
 					}
 					if (element.smallCount > 0) {
-						if(this.isSmallCount){list[index] = { ...element, smallCount: --element.smallCount };}
+						if (this.isSmallCount) {
+							list[index] = {...element, smallCount: --element.smallCount};
+						}
 					}
 					if (element.bigCount == 0 && element.smallCount == 0) {
 						list.splice(index, 1);
 					}
 				}
 			}
-			this.setSelectInfoByType({ type: this.pageType, info: list });
+			this.setSelectInfoByType({type: this.pageType, info: list});
+		},
 
 		// 	const list = this.selectList;
 		// 	let has = false;
@@ -722,18 +727,16 @@ export default {
 		// 	// this.$forceUpdate();
 		// },
 		// //减去所有商品
-		// delAllEvent(item) {
-		// 	const list = this.selectList;
-		// 	for (let index = 0; index < list.length; index++) {
-		// 		const element = list[index];
-		// 		if (element.id == item.id ) {
-		//
-		// 			list.splice(index, 1);
-		//
-		// 			break;
-		// 		}
-		// 	}
-		// 	this.setSelectInfoByType({ type: this.pageType, info: list });
+		delAllEvent(item) {
+			const list = this.selectList;
+			for (let index = 0; index < list.length; index++) {
+				const element = list[index];
+				if (element.id == item.id ) {
+					list.splice(index, 1);
+					break;
+				}
+			}
+			this.setSelectInfoByType({ type: this.pageType, info: list });
 		},
 		/**
 			* 通过id获取当前选中的商品类别信息  左边菜单角标  当前选中该类别商品多少件
@@ -903,8 +906,10 @@ export default {
 			* 切换左侧商品类别
 			*/
 		swichClass(cur) {
+			clearInterval(this.timeFun)
 			this.classIndex = cur;
-			this.scroll_into_view = 'class_'+cur;
+			this.scroll_into_view = '';
+			this.$nextTick(()=>{this.scroll_into_view = 'class_'+cur;})
 			this.scrollPushList();
 			//解决最后一个 ***来回*** 问题 (由于点击左侧导航,右侧锚点位置信息变化,此时滚动事件也随之滚动。)
 			uni.setStorageSync("resolve","last");
@@ -917,8 +922,10 @@ export default {
 			* 成品(多风格)-切换左侧商品类别
 			*/
 		suitSwichClass(cur) {
+			clearInterval(this.suitTimeFun)
 			this.suitClassIndex = cur;
-			this.suit_scroll_into_view = 'class_'+cur;
+			this.suit_scroll_into_view = '';
+			this.$nextTick(()=>{this.suit_scroll_into_view = 'class_'+cur;})
 			this.suitScrollPushList();
 			// this.scrollPushList();
 			//解决最后一个 ***来回*** 问题 (由于点击左侧导航,右侧锚点位置信息变化,此时滚动事件也随之滚动。)