Browse Source

修改出入库明细

caojunjie 4 years ago
parent
commit
e100a55638
4 changed files with 318 additions and 153 deletions
  1. 6 35
      App.vue
  2. 36 1
      pages/home/index.vue
  3. 143 61
      pages/me/Delivery-details/index.vue
  4. 133 56
      pages/me/Warehousing-details/index.vue

+ 6 - 35
App.vue

@@ -1,13 +1,15 @@
 <script>
 	import {
-		request
-	} from 'common/request/request'
-	require("promise.prototype.finally").shim()
-	import {
 		mapState,
 		mapMutations
 	} from 'vuex'
 	export default {
+		data() {
+			return {
+				show: false,
+				content: '东临碣石,以观沧海'
+			}
+		},
 		// 此处globalData为了演示其作用,不是uView框架的一部分
 		computed: {
 			...mapState(['hasLogin'])
@@ -39,37 +41,6 @@
 			}
 		},
 		onLaunch() {
-			request({
-					url: '/baseReq/apkUpgrade',
-					method: 'get',
-					params: {
-						osType: 0
-					}
-				}).then(res => {
-					console.log(res)
-					console.log(res.data.forceVersion) //最低版本
-					console.log(res.data.msg) //更新文案
-					console.log(res.data.url) //下载最新版地址
-					console.log(res.data.version) //最新版本
-					
-					plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
-						console.log(wgtinfo);
-						console.log(wgtinfo.version); //版本号
-						
-						if (wgtinfo.version != res.data.forceVersion || wgtinfo.version != res.data.version) {
-							console.log("需要更新")
-						}else{
-							console.log("已是最新版本")
-						}
-						
-					})
-
-				}).catch(err => {
-					console.log(err)
-				})
-				.finally(() => {
-					// Loading.close()
-				})
 
 			// 1.1.0版本之前关于http拦截器代码,已平滑移动到/common/http.interceptor.js中
 			// 注意,需要在/main.js中实例化Vue之后引入如下(详见文档说明):

+ 36 - 1
pages/home/index.vue

@@ -95,13 +95,48 @@
 					.finally(() => {
 						this.loading = false;
 						uni.hideLoading();
-				})
+					})
 			}
 		},
 		computed: {
 			...mapState(['hasLogin'])
 		},
 		methods: {
+			//升级调用的接口
+			// onLaunch_s() {
+			// 	request({
+			// 			url: '/baseReq/apkUpgrade',
+			// 			method: 'get',
+			// 			params: {
+			// 				osType: 0
+			// 			}
+			// 		}).then(res => {
+			// 			console.log(res)
+			// 			console.log(res.data.forceVersion) //最低版本
+			// 			console.log(res.data.msg) //更新文案
+			// 			console.log(res.data.url) //下载最新版地址
+			// 			console.log(res.data.version) //最新版本
+
+			// 			plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
+			// 				console.log(wgtinfo);
+			// 				console.log(wgtinfo.version); //版本号
+
+			// 				if (wgtinfo.version != res.data.forceVersion || wgtinfo.version != res.data.version) {
+			// 					console.log("需要更新")
+			// 					this.show_d = true;
+			// 				} else {
+			// 					console.log("已是最新版本")
+			// 				}
+
+			// 			})
+
+			// 		}).catch(err => {
+			// 			console.log(err)
+			// 		})
+			// 		.finally(() => {
+			// 			// Loading.close()
+			// 		})
+			// },
 			//轮播图
 			getBanners() {
 				return request({

+ 143 - 61
pages/me/Delivery-details/index.vue

@@ -1,14 +1,30 @@
 <template>
-	<!-- 库明细页面 -->
+	<!-- 库明细页面 -->
 	<view class="header">
 		<view class="header-one">
 			库存总量:<text>{{total}}</text>
 		</view>
 		<view style="width: 100%;margin-top: 60rpx;">
-			<u-tabs style="width: 350rpx;float: left;margin-top: 0;" :list="list" :is-scroll="false" :current="current" @change="change"
-			 active-color="#fff" inactive-color="#ffffff" bg-color="#ffffff00"></u-tabs>
-			<u-search class="inputbox" placeholder="请输入胎号或规格" @change="inputbox" v-model="keyword"
-			 :show-action="false"></u-search>
+			<!-- <u-tabs style="width: 350rpx;float: left;margin-top: 0;" :list="list" :is-scroll="false" :current="current" @change="change"
+			 active-color="#fff" inactive-color="#ffffff" bg-color="#ffffff00"></u-tabs> -->
+			<view style="width: 340rpx;height: 80rpx;text-align: center;padding-top: 25rpx;padding-left: 20rpx;float: left;margin-top: 0;margin-left: 30rpx;">
+				<view style="float: left;">
+					<text @click="whole">全部</text>
+					<view v-if="bottoma == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
+					<view v-else></view>
+				</view>
+				<view style="float: left;margin-left: 70rpx;">
+					<text @click="brand">品牌</text>
+					<view  v-if="bottomb == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
+					<view v-else></view>
+				</view>
+				<view style="float: left;margin-left: 70rpx;">
+					<text @click="time_s">时间</text>
+					<view  v-if="bottomc == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
+					<view v-else></view>
+				</view>
+			</view>
+			<u-search class="inputbox" placeholder="请输入胎号或规格" @change="inputbox" v-model="keyword" :show-action="false"></u-search>
 		</view>
 		<view class="nothing" v-if="judge==true">
 			<u-empty text="暂无数据"></u-empty>
@@ -43,7 +59,8 @@
 								</view>
 								<view>
 									<view>参加活动</view>
-									<view>{{item3.satisfyActivity}}</view>
+									<view v-if="item3.satisfyActivity == 1">参加</view>
+									<view v-else>不参加</view>
 								</view>
 								<view>
 									<view>创建时间</view>
@@ -59,7 +76,7 @@
 				<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
 			</view>
 			<u-action-sheet :list="list_a" @click="click" v-model="show" :mask-close-able="false" @close="close"></u-action-sheet>
-			<u-calendar v-model="show_d" :mode="mode" @change="time" :mask-close-able="false"></u-calendar>
+			<u-calendar v-model="show_d" toolTip="请选择日期范围" :closeable="false" :mode="mode" @change="time" :mask-close-able="false"></u-calendar>
 		</view>
 	</view>
 </template>
@@ -83,6 +100,7 @@
 					loading: '努力加载中',
 					nomore: '我是有底线的'
 				},
+				style: '.5rpx solid #FFFFFF',
 				list: [{
 					name: '全部'
 				}, {
@@ -94,6 +112,9 @@
 				list_a: [],
 				current: 0,
 				keyword: '',
+				bottoma: true,
+				bottomb: false,
+				bottomc: false,
 				itemList: [],
 				total: '',
 				size: 10,
@@ -101,27 +122,27 @@
 				beginDate: null,
 				endDate: null,
 				content: null,
-				length:''
+				length: ''
 			}
 		},
 		onReachBottom() {
 			this.status = 'loading';
 			this.page++
-			if(this.itemList.length >= this.length){
+			if (this.itemList.length >= this.length) {
 				this.status = 'nomore';
-			}else{
+			} else {
 				this.getPage()
 			}
 		},
 		created() {
 			this.page = 1
-			this.getPage()
+			this.whole()
 		},
 		methods: {
-			content_s(){
+			content_s() {
 				console.log(this.keyword)
 			},
-			inputbox(e){
+			inputbox(e) {
 				this.page = 1
 				console.log(e)
 				this.itemList = []
@@ -129,23 +150,24 @@
 				this.beginDate = null
 				this.endDate = null
 				this.content = e
-				if(this.itemList.length >= this.length){
+				if (this.itemList.length >= this.length) {
 					this.status = 'nomore';
-				}else{
+				} else {
 					this.getPage()
 				}
 			},
 			close() {
-				this.current = 0
-				this.page = 1
-				this.getPage()
+				this.whole()
 			},
 			time(e) {
 				this.page = 1
 				this.itemList = []
-				this.beginDate = e.startDate + " 00:00:00",
-				this.endDate = e.endDate + " 23:59:59",
-				console.log(e);
+				this.beginDate = e.startDate + " 00:00:00"
+				this.endDate = e.endDate + " 23:59:59"
+				console.log(e)
+				console.log("触发了")
+				console.log(this.show_d)
+				this.current = 0
 				this.getPage()
 			},
 			click(index) {
@@ -157,49 +179,107 @@
 				console.log(this.judge)
 				this.getPage()
 			},
-			change(index) {
-				this.current = index;
+			whole() {
+				this.bottoma = true
+				this.bottomb = false
+				this.bottomc = false
 				this.brandCode = null
 				this.beginDate = null
 				this.endDate = null
 				this.content = null
-				if (index == 1) {
-					this.show = true
-					if (this.list_a.length == 0) {
-						request({
-							url: '/baseReq/getBrandList',
-							method: 'Post',
-							data: {
-								storeId:this.$store.state.storeInfo.storeId,
-								userId:this.$store.state.storeInfo.userId
-							}
-						}).then(res => {
-							console.log(res)
-							console.log(res.data.data)
-							for (let i = 0; i < res.data.data.length; i++) {
-								console.log(res.data.data[i].brandCode)
-								this.list_a.push({
-									brandCode: res.data.data[i].brandCode,
-									text: res.data.data[i].brandName,
-									color: '#000',
-									fontSize: 28
-								})
-							}
-						}).catch(err => {
-							console.log(err)
-						}).finally(() => {
-							// Loading.close()
-						})
-					}
-				} else if (index == 0) {
-					this.page = 0
-					console.log(this.brandCode)
-					this.getPage()
-				} else if (index == 2) {
-					this.show_d = true
+				this.page = 0
+				console.log(this.brandCode)
+				this.getPage()
+			},
+			brand() {
+				this.bottoma = false
+				this.bottomb = true
+				this.bottomc = false
+				this.brandCode = null
+				this.beginDate = null
+				this.endDate = null
+				this.content = null
+				this.show = true
+				if (this.list_a.length == 0) {
+					request({
+						url: '/baseReq/getBrandList',
+						method: 'Post',
+						data: {
+							storeId: this.$store.state.storeInfo.storeId,
+							userId: this.$store.state.storeInfo.userId
+						}
+					}).then(res => {
+						console.log(res)
+						console.log(res.data.data)
+						for (let i = 0; i < res.data.data.length; i++) {
+							console.log(res.data.data[i].brandCode)
+							this.list_a.push({
+								brandCode: res.data.data[i].brandCode,
+								text: res.data.data[i].brandName,
+								color: '#000',
+								fontSize: 28
+							})
+						}
+					}).catch(err => {
+						console.log(err)
+					}).finally(() => {
+						// Loading.close()
+					})
 				}
-				console.log(this.current)
 			},
+			time_s() {
+				this.bottoma = false
+				this.bottomb = false
+				this.bottomc = true
+				this.brandCode = null
+				this.beginDate = null
+				this.endDate = null
+				this.content = null
+				this.show_d = true
+			},
+			// change(index) {
+			// 	this.current = index;
+			// 	this.brandCode = null
+			// 	this.beginDate = null
+			// 	this.endDate = null
+			// 	this.content = null
+			// 	if (index == 1) {
+			// 		this.show = true
+			// 		if (this.list_a.length == 0) {
+			// 			request({
+			// 				url: '/baseReq/getBrandList',
+			// 				method: 'Post',
+			// 				data: {
+			// 					storeId:this.$store.state.storeInfo.storeId,
+			// 					userId:this.$store.state.storeInfo.userId
+			// 				}
+			// 			}).then(res => {
+			// 				console.log(res)
+			// 				console.log(res.data.data)
+			// 				for (let i = 0; i < res.data.data.length; i++) {
+			// 					console.log(res.data.data[i].brandCode)
+			// 					this.list_a.push({
+			// 						brandCode: res.data.data[i].brandCode,
+			// 						text: res.data.data[i].brandName,
+			// 						color: '#000',
+			// 						fontSize: 28
+			// 					})
+			// 				}
+			// 			}).catch(err => {
+			// 				console.log(err)
+			// 			}).finally(() => {
+			// 				// Loading.close()
+			// 			})
+			// 		}
+			// 	} else if (index == 0) {
+			// 		this.page = 0
+			// 		console.log(this.brandCode)
+			// 		this.getPage()
+			// 	} else if (index == 2) {
+			// 		this.show_d = true
+			// 	}
+			// 	console.log(this.current)
+			// },
 			getPage() {
 				console.log(this.page)
 				console.log(this.brandCode)
@@ -216,8 +296,8 @@
 					url: '/myPage/getPageScanRecordList',
 					method: 'Post',
 					data: {
-						storeId:this.$store.state.storeInfo.storeId,
-						userId:this.$store.state.storeInfo.userId,
+						storeId: this.$store.state.storeInfo.storeId,
+						userId: this.$store.state.storeInfo.userId,
 						size: this.size,
 						current: this.page, //获取第几页
 						scanType: '2',
@@ -264,12 +344,14 @@
 	.details>view>view:nth-child(2) {
 		float: right;
 	}
-	.inputbox{
+
+	.inputbox {
 		width: 350rpx;
 		float: right;
 		padding-right: 30rpx;
 		padding-top: 10rpx;
 	}
+
 	.title {
 		width: 98%;
 		height: 60rpx;

+ 133 - 56
pages/me/Warehousing-details/index.vue

@@ -5,10 +5,26 @@
 			库存总量:<text>{{total}}</text>
 		</view>
 		<view style="width: 100%;margin-top: 60rpx;">
-			<u-tabs style="width: 350rpx;float: left;margin-top: 0;" :list="list" :is-scroll="false" :current="current" @change="change"
-			 active-color="#fff" inactive-color="#ffffff" bg-color="#ffffff00"></u-tabs>
-			<u-search class="inputbox" placeholder="请输入胎号或规格" @change="inputbox" v-model="keyword"
-			 :show-action="false"></u-search>
+			<!-- <u-tabs style="width: 350rpx;float: left;margin-top: 0;" :list="list" :is-scroll="false" :current="current" @change="change"
+			 active-color="#fff" inactive-color="#ffffff" bg-color="#ffffff00"></u-tabs> -->
+			<view style="width: 340rpx;height: 80rpx;text-align: center;padding-top: 25rpx;padding-left: 20rpx;float: left;margin-top: 0;margin-left: 30rpx;">
+				<view style="float: left;">
+					<text @click="whole">全部</text>
+					<view v-if="bottoma == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
+					<view v-else></view>
+				</view>
+				<view style="float: left;margin-left: 70rpx;">
+					<text @click="brand">品牌</text>
+					<view  v-if="bottomb == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
+					<view v-else></view>
+				</view>
+				<view style="float: left;margin-left: 70rpx;">
+					<text @click="time_s">时间</text>
+					<view  v-if="bottomc == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
+					<view v-else></view>
+				</view>
+			</view>
+			<u-search class="inputbox" placeholder="请输入胎号或规格" @change="inputbox" v-model="keyword" :show-action="false"></u-search>
 		</view>
 		<view class="nothing" v-if="judge==true">
 			<u-empty text="暂无数据"></u-empty>
@@ -84,6 +100,7 @@
 					loading: '努力加载中',
 					nomore: '我是有底线的'
 				},
+				style: '.5rpx solid #FFFFFF',
 				list: [{
 					name: '全部'
 				}, {
@@ -95,6 +112,9 @@
 				list_a: [],
 				current: 0,
 				keyword: '',
+				bottoma: true,
+				bottomb: false,
+				bottomc: false,
 				itemList: [],
 				total: '',
 				size: 10,
@@ -102,27 +122,27 @@
 				beginDate: null,
 				endDate: null,
 				content: null,
-				length:''
+				length: ''
 			}
 		},
 		onReachBottom() {
 			this.status = 'loading';
 			this.page++
-			if(this.itemList.length >= this.length){
+			if (this.itemList.length >= this.length) {
 				this.status = 'nomore';
-			}else{
+			} else {
 				this.getPage()
 			}
 		},
 		created() {
 			this.page = 1
-			this.getPage()
+			this.whole()
 		},
 		methods: {
-			content_s(){
+			content_s() {
 				console.log(this.keyword)
 			},
-			inputbox(e){
+			inputbox(e) {
 				this.page = 1
 				console.log(e)
 				this.itemList = []
@@ -130,18 +150,15 @@
 				this.beginDate = null
 				this.endDate = null
 				this.content = e
-				if(this.itemList.length >= this.length){
+				if (this.itemList.length >= this.length) {
 					this.status = 'nomore';
-				}else{
+				} else {
 					this.getPage()
 				}
 			},
 			close() {
-				this.current = 0
-				this.page = 1
-				this.getPage()
+				this.whole()
 			},
-			
 			time(e) {
 				this.page = 1
 				this.itemList = []
@@ -162,49 +179,107 @@
 				console.log(this.judge)
 				this.getPage()
 			},
-			change(index) {
-				this.current = index;
+			whole() {
+				this.bottoma = true
+				this.bottomb = false
+				this.bottomc = false
 				this.brandCode = null
 				this.beginDate = null
 				this.endDate = null
 				this.content = null
-				if (index == 1) {
-					this.show = true
-					if (this.list_a.length == 0) {
-						request({
-							url: '/baseReq/getBrandList',
-							method: 'Post',
-							data: {
-								storeId:this.$store.state.storeInfo.storeId,
-								userId:this.$store.state.storeInfo.userId
-							}
-						}).then(res => {
-							console.log(res)
-							console.log(res.data.data)
-							for (let i = 0; i < res.data.data.length; i++) {
-								console.log(res.data.data[i].brandCode)
-								this.list_a.push({
-									brandCode: res.data.data[i].brandCode,
-									text: res.data.data[i].brandName,
-									color: '#000',
-									fontSize: 28
-								})
-							}
-						}).catch(err => {
-							console.log(err)
-						}).finally(() => {
-							// Loading.close()
-						})
-					}
-				} else if (index == 0) {
-					this.page = 0
-					console.log(this.brandCode)
-					this.getPage()
-				} else if (index == 2) {
-					this.show_d = true
+				this.page = 0
+				console.log(this.brandCode)
+				this.getPage()
+			},
+			brand() {
+				this.bottoma = false
+				this.bottomb = true
+				this.bottomc = false
+				this.brandCode = null
+				this.beginDate = null
+				this.endDate = null
+				this.content = null
+				this.show = true
+				if (this.list_a.length == 0) {
+					request({
+						url: '/baseReq/getBrandList',
+						method: 'Post',
+						data: {
+							storeId: this.$store.state.storeInfo.storeId,
+							userId: this.$store.state.storeInfo.userId
+						}
+					}).then(res => {
+						console.log(res)
+						console.log(res.data.data)
+						for (let i = 0; i < res.data.data.length; i++) {
+							console.log(res.data.data[i].brandCode)
+							this.list_a.push({
+								brandCode: res.data.data[i].brandCode,
+								text: res.data.data[i].brandName,
+								color: '#000',
+								fontSize: 28
+							})
+						}
+					}).catch(err => {
+						console.log(err)
+					}).finally(() => {
+						// Loading.close()
+					})
 				}
-				console.log(this.current)
 			},
+			time_s() {
+				this.bottoma = false
+				this.bottomb = false
+				this.bottomc = true
+				this.brandCode = null
+				this.beginDate = null
+				this.endDate = null
+				this.content = null
+				this.show_d = true
+			},
+			// change(index) {
+			// 	this.current = index;
+			// 	this.brandCode = null
+			// 	this.beginDate = null
+			// 	this.endDate = null
+			// 	this.content = null
+			// 	if (index == 1) {
+			// 		this.show = true
+			// 		if (this.list_a.length == 0) {
+			// 			request({
+			// 				url: '/baseReq/getBrandList',
+			// 				method: 'Post',
+			// 				data: {
+			// 					storeId:this.$store.state.storeInfo.storeId,
+			// 					userId:this.$store.state.storeInfo.userId
+			// 				}
+			// 			}).then(res => {
+			// 				console.log(res)
+			// 				console.log(res.data.data)
+			// 				for (let i = 0; i < res.data.data.length; i++) {
+			// 					console.log(res.data.data[i].brandCode)
+			// 					this.list_a.push({
+			// 						brandCode: res.data.data[i].brandCode,
+			// 						text: res.data.data[i].brandName,
+			// 						color: '#000',
+			// 						fontSize: 28
+			// 					})
+			// 				}
+			// 			}).catch(err => {
+			// 				console.log(err)
+			// 			}).finally(() => {
+			// 				// Loading.close()
+			// 			})
+			// 		}
+			// 	} else if (index == 0) {
+			// 		this.page = 0
+			// 		console.log(this.brandCode)
+			// 		this.getPage()
+			// 	} else if (index == 2) {
+			// 		this.show_d = true
+			// 	}
+			// 	console.log(this.current)
+			// },
 			getPage() {
 				console.log(this.page)
 				console.log(this.brandCode)
@@ -221,8 +296,8 @@
 					url: '/myPage/getPageScanRecordList',
 					method: 'Post',
 					data: {
-						storeId:this.$store.state.storeInfo.storeId,
-						userId:this.$store.state.storeInfo.userId,
+						storeId: this.$store.state.storeInfo.storeId,
+						userId: this.$store.state.storeInfo.userId,
 						size: this.size,
 						current: this.page, //获取第几页
 						scanType: '1',
@@ -269,12 +344,14 @@
 	.details>view>view:nth-child(2) {
 		float: right;
 	}
-	.inputbox{
+
+	.inputbox {
 		width: 350rpx;
 		float: right;
 		padding-right: 30rpx;
 		padding-top: 10rpx;
 	}
+
 	.title {
 		width: 98%;
 		height: 60rpx;