Browse Source

bug 修复

lilei 3 years ago
parent
commit
a06b053eda

+ 1 - 1
App.vue

@@ -5,7 +5,7 @@
 			token: '',
 			changeOrg:'',
 			version: '', // 当前版本号
-			buildType: 'dev', // 打包环境对应类型,pro 生产 uat 预发布 dev 本地开发
+			buildType: 'uat', // 打包环境对应类型,pro 生产 uat 预发布 dev 本地开发
 			envTips: '', // 环境文字提示
 			theme: 'default', // 主题,default
 			isIphoneXup: false //是否iphonex以及以上的版本

+ 7 - 6
pages/common/productBrand.vue

@@ -121,10 +121,16 @@
 <style lang="scss" scoped>
 	.brand-picker{
 		.brand-header{
-			padding: 20upx 30upx;
+			padding: 0 30upx;
 			position: relative;
 			.brand-picker-btn{
 				color: rgb(96, 98, 102);
+				margin: 10upx;
+			}
+			.color-blue{
+				display: inline-block;
+				padding: 10upx 20upx;
+				margin: 10upx 0;
 			}
 		}
 		.brand-header:after{
@@ -145,12 +151,7 @@
 			padding: 6upx 0 20upx;
 			position: relative;
 			.picker-main{
-				position: absolute;
-				top: 50%;
-				left: 50%;
-				transform: translate(-50%,-50%);
 				width: 100%;
-				max-height: 300upx;
 				.picker-main-item{
 					position: relative;
 					padding: 0 30upx;

+ 8 - 7
pages/common/productType.vue

@@ -153,10 +153,16 @@
 <style lang="scss" scoped>
 	.type-picker{
 		.type-header{
-			padding: 20upx 30upx;
+			padding: 0 30upx;
 			position: relative;
-			.type-picker-btn{
+			.brand-picker-btn{
 				color: rgb(96, 98, 102);
+				margin: 10upx;
+			}
+			.color-blue{
+				display: inline-block;
+				padding: 10upx 20upx;
+				margin: 10upx 0;
 			}
 		}
 		.type-header:after{
@@ -178,12 +184,7 @@
 			padding: 6upx 0 20upx;
 			position: relative;
 			.picker-main{
-				position: absolute;
-				top: 50%;
-				left: 50%;
-				transform: translate(-50%,-50%);
 				width: 100%;
-				max-height: 300upx;
 				.picker-main-item{
 					position: relative;
 					padding: 0 30upx;

+ 13 - 13
pages/sales/index.vue

@@ -36,19 +36,19 @@
 					<text class="nav-txt">产品查询</text>
 				</view>
 			</view>
-		</view>
-		<!-- 销售单 -->
-		<view class="sales-list">
-			<view class="title">
-				<text class="title-name" @click="$refs.salesList.refash()">
-					销售单 
-					<u-icon name="reload" color="#2979ff" size="28"></u-icon>
-				</text>
-				<view class="title-all" @click="toPage('/pages/sales/list')">查看全部<u-icon name="arrow-right" color="rgb(144, 147, 153)" size="28"></u-icon></view>
+			<!-- 销售单 -->
+			<view class="sales-list">
+				<view class="title">
+					<text class="title-name" @click="$refs.salesList.refash()">
+						销售单 
+						<u-icon name="reload" color="#2979ff" size="28"></u-icon>
+					</text>
+					<view class="title-all" @click="toPage('/pages/sales/list')">查看全部<u-icon name="arrow-right" color="rgb(144, 147, 153)" size="28"></u-icon></view>
+				</view>
 			</view>
-			<!-- 销售单列表 -->
-			<listComponent ref="salesList" :height="listHeight" />
 		</view>
+		<!-- 销售单列表 -->
+		<listComponent ref="salesList" :height="listHeight" />
 	</view>
 </template>
 
@@ -81,7 +81,7 @@
 			const _this = this
 			this.$nextTick(function(){
 				// 监听整改完成后刷新事件
-				uni.$on('refreshSalesBL', function(data){
+				uni.$on('refreshSalesHomeBL', function(data){
 					_this.$refs.salesList.refash()
 				})
 			})
@@ -118,7 +118,7 @@
 			})
 		},
 		onUnload() {
-			uni.$off('refreshSalesBL')
+			uni.$off('refreshSalesHomeBL')
 		},
 		onShow() {
 			this.navInd = 0

+ 9 - 2
pages/sales/list.vue

@@ -1,12 +1,12 @@
 <template>
 	<view class="sales-list-wrap">
-		<u-dropdown class="search-top-box">
+		<u-dropdown class="search-top-box" id="tjCons">
 			<u-dropdown-item v-model="searchForm.billStatus" @change="handleChange('bill')" title="业务状态" :options="billStatusOpt"></u-dropdown-item>
 			<u-dropdown-item v-model="searchForm.financialStatus" @change="handleChange('financial')" title="财务状态" :options="financialStatusOpt"></u-dropdown-item>
 		</u-dropdown>
 		<!-- 销售单列表 -->
 		<view class="list-box">
-			<listComponent ref="salesList" height="100" :params="searchParams" />
+			<listComponent ref="salesList" :height="listHeight" :params="searchParams" />
 		</view>
 		<!-- 查询右侧弹框 -->
 		<salesSearch :openModal="openModal" :defaultParams="searchForm" @refresh="refresh" @close="openModal=false" />
@@ -34,12 +34,19 @@
 					financialStatus: null
 				},
 				searchParams: {},
+				listHeight: 200,
 				openModal: false
 			}
 		},
 		onNavigationBarButtonTap(e){  // 标题栏 按钮操作
 			this.openModal = true
 		},
+		onReady() {
+			const query = uni.createSelectorQuery().in(this);
+			query.select('#tjCons').boundingClientRect(data => {
+			  this.listHeight = data.height
+			}).exec();
+		},
 		onLoad() {
 			const _this = this
 			this.getLookUpItem('SALES_BILL_STATUS')

+ 2 - 3
pages/sales/listComponent.vue

@@ -92,13 +92,12 @@
 		},
 		watch:{
 			height(a,b){
-				console.log(a)
-				this.scrollH = (uni.getSystemInfoSync().windowHeight - a - 69)*2
+				const sys = uni.getSystemInfoSync()
+				this.scrollH = (sys.windowHeight - a - sys.statusBarHeight) * 2
 			},
 		},
 		mounted() {
 			this.getList()
-			this.scrollH = (uni.getSystemInfoSync().windowHeight - 85)*2
 		},
 		methods:{
 			refash(){

+ 1 - 1
pages/stock/index.vue

@@ -96,7 +96,7 @@
 		},
 		onShow() {
 			// 是否默认包括禁用产品
-			this.form.productEnabledFlag = uni.getStorageSync('productEnabledFlag-' + this.$store.state.vuex_userData.orgId)
+			this.form.productEnabledFlag = uni.getStorageSync('productEnabledFlag-' + this.$store.state.vuex_userData.orgId) || true
 			this.getTotal()
 		},
 		methods: {

+ 6 - 4
pages/userCenter/index.vue

@@ -62,9 +62,11 @@
 				// 当前连锁账户
 				const orgs = this.$store.state.vuex_authOrgs;
 				const user = this.$store.state.vuex_userData;
-				orgs.map(item => {
-					item.text = item.orgName
-				})
+				if(orgs){
+					orgs.map(item => {
+						item.text = item.orgName
+					})
+				}
 				return orgs.filter(item => item.orgSn != user.orgSn) 
 			},
 			userData () {
@@ -104,7 +106,7 @@
 							getApp().globalData.token = res.data.access_token;
 							uni.setStorageSync('loginTimeOut', 'NO');
 							this.toMain()
-							uni.$emit("refreshSalesBL")
+							uni.$emit("refreshSalesHomeBL")
 							uni.showToast({ icon: 'none', title: '切换成功!' });
 						}else{
 							uni.showToast({ icon: 'none', title: res.message });