Ver código fonte

投递记录

lilei 4 anos atrás
pai
commit
99f63aa78c

+ 1 - 1
pages/hexiao/index.vue

@@ -50,7 +50,7 @@
 		</scroll-view>
 		</scroll-view>
 		
 		
 		<view class="footer-bar">
 		<view class="footer-bar">
-			<u-button shape="circle" @click="openQuery" size="medium" type="primary">用户乐豆查询/核销</u-button>
+			<u-button shape="circle" @click="openQuery" size="medium" type="warning">用户乐豆查询/核销</u-button>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>

+ 1 - 0
pages/index/index.vue

@@ -159,6 +159,7 @@
 				    console.log(res)
 				    console.log(res)
 					// 监听寻找到新设备的事件
 					// 监听寻找到新设备的事件
 					uni.onBluetoothDeviceFound(function (res) {
 					uni.onBluetoothDeviceFound(function (res) {
+				      console.log(res,'devices list')
 					  let devices = res.devices.filter(item => item.name == 'FAYA')
 					  let devices = res.devices.filter(item => item.name == 'FAYA')
 					  console.log(devices,'devices list')
 					  console.log(devices,'devices list')
 					  if(devices.length){
 					  if(devices.length){

+ 197 - 0
pages/tdRecord/searchModal.vue

@@ -0,0 +1,197 @@
+<template>
+	<!-- 待办单查询 -->
+	<div class="modal-content">
+		<u-popup v-model="isShow" class="search-popup" mode="right" @close="handleClose" length="85%">
+			<view class="search-title">筛选</view>
+			<u-form class="form-content" :model="form" ref="uForm" label-width="150">
+				<u-form-item label="投递时间" prop="time" class="form-item">
+					<u-input clearable v-model="form.time" disabled placeholder="请选择投递时间区间" class="form-item-inp" @click="openPicker" />
+					<u-icon v-show="form.time.length != 0" name="close-circle-fill" color="#c8c0cc" size="32" class="close-circle" @click="clearTime"></u-icon>
+				</u-form-item>
+				<u-form-item label="投递用户" prop="customerMobile" class="form-item"><u-input v-model="form.customerMobile" :maxlength="11" placeholder="请输入用户手机号" /></u-form-item>
+			</u-form>
+			<view class="uni-list-btns">
+				<u-button class="handle-btn search-btn" size="medium" hover-class="none" :custom-style="customBtnStyle" @click="handleSearch">查询</u-button>
+				<u-button class="handle-btn" size="medium" hover-class="none" @click="resetForm">重置</u-button>
+			</view>
+		</u-popup>
+		<!-- 时间选择器 -->
+		<w-picker
+			class="date-picker"
+			:visible.sync="showPicker"
+			mode="range"
+			:current="true"
+			fields="day"
+			@confirm="onSelected($event, 'range')"
+			@cancel="showPicker = false"
+			ref="date"
+		></w-picker>
+	</div>
+</template>
+
+<script>
+import wPicker from '@/components/w-picker/w-picker.vue'
+export default {
+	components: { wPicker },
+	props: {
+		visible: {
+			type: Boolean,
+			default: false
+		},
+		defaultParams: {  //  默认筛选条件
+			type: Object,
+			default: () => {
+				return {};
+			}
+		}
+	},
+	watch: {
+		visible(newValue, oldValue) {
+			if (newValue) {
+				this.isShow = newValue
+			}
+		},
+		isShow(newValue, oldValue) {
+			if (newValue) {
+			} else {
+				this.init()
+				this.$emit('close')
+			}
+		}
+	},
+	data() {
+		return {
+			customBtnStyle: {  //  自定义按钮样式
+				borderColor: '#2ab4e5',
+				backgroundColor: '#2ab4e5',
+				color: '#fff'
+			},
+			isShow: this.visible, // 显示隐藏
+			showPicker: false, // 是否显示时间弹窗
+			form: {
+				time: '', // 发起时间区间
+				customerMobile: '', // 门店名称
+			},
+			beginDate: null, // 开始时间
+			endDate: null // 结束时间
+		};
+	},
+	mounted() {
+		this.init()
+	},
+	methods: {
+		//  初始化数据
+		init(){
+			if(this.defaultParams.beginDate && this.defaultParams.endDate){
+				this.form.time = this.defaultParams.beginDate + ' ~ ' + this.defaultParams.endDate
+			}
+			this.beginDate = this.defaultParams.beginDate ? this.defaultParams.beginDate : ''
+			this.endDate = this.defaultParams.endDate ? this.defaultParams.endDate : ''
+			this.form.customerMobile = this.defaultParams.customerMobile ? this.defaultParams.customerMobile : ''
+		},
+		//  清空创建时间
+		clearTime(){
+			this.form.time = ''
+			this.beginDate = ''
+			this.endDate = ''
+		},
+		// 关闭弹窗
+		handleClose() {
+			this.isShow = false
+		},
+		// 打开时间选择弹框
+		openPicker() {
+			this.showPicker = true
+		},
+		// 确认日期选择
+		onSelected(v) {
+			this.form.time = v.value[0] + ' ~ ' + v.value[1]
+			this.beginDate = v.value[0]
+			this.endDate = v.value[1]
+			this.showPicker = false
+		},
+		// 查询
+		handleSearch() {
+			let params = {
+				beginDate: this.beginDate,
+				endDate: this.endDate,
+				customerMobile: this.form.customerMobile,
+			};
+			this.$emit('refresh', params)
+			this.isShow = false
+		},
+		// 重置
+		resetForm() {
+			this.$refs.uForm.resetFields()
+			this.$emit('refresh', {})
+			this.isShow = false
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.modal-content {
+	position: relative;
+}
+.search-popup {
+	.search-title {
+		text-align: center;
+		padding: 18upx 22upx;
+		color: #333;
+		border-bottom: 1px solid #eee;
+	}
+	.form-content {
+		display: block;
+		padding: 0 20upx;
+		box-sizing: content-box;
+		.status-item {
+			width: 30%;
+			text-align: center;
+			line-height: 60upx;
+			background-color: #F8F8F8;
+			color: #333;
+			border-radius: 6upx;
+			font-size: 24upx;
+			margin: 0 10upx;
+		}
+		.active {
+			background-color: #ffaa00;
+			color: #fff;
+		}
+		.form-item-inp{
+			display: inline-block;
+			width: 88%;
+			vertical-align: top;
+		}
+	}
+	.uni-list {
+		margin: 20upx;
+		.uni-list-cell {
+			display: flex;
+			align-items: center;
+			border-bottom: 1px dashed #eeeeee;
+			.uni-list-cell-db {
+				flex: 1;
+			}
+			.uni-input {
+				height: 2.5em;
+				line-height: 2.5em;
+			}
+		}
+	}
+	.uni-list-btns {
+		display: flex;
+		padding: 20upx;
+		margin-top: 200rpx;
+		.handle-btn {
+			font-size: 28upx;
+			margin: 0 30upx;
+			width: 100%;
+			flex: 1;
+		}
+	}
+}
+.date-picker {
+}
+</style>

+ 130 - 0
pages/tdRecord/tdRecord.vue

@@ -0,0 +1,130 @@
+<template>
+	<view class="content">
+		<!-- 筛选弹框 -->
+		<search-modal v-if="openScreen" :visible="openScreen" :defaultParams="searchForm" @refresh="refresh" @close="openScreen=false"></search-modal>
+		<view class="page-head">
+			筛选
+			<image class="filter-icon" src="@/static/filter.png" @tap="openScreen=true"></image>
+		</view>
+		<view class="list">
+			<view class="list-box">
+				<view class="list-time">2020-01-13 15:25:25</view>
+				<view class="list-cons">
+					<view class="list-imgs">
+						<u-image width="80rpx" height="80rpx" src="/static/GLASS.png"></u-image>
+						<view class="cls-names">废旧纸张</view>
+					</view>
+					<view class="list-md">
+						<view>
+							<text class="red">254</text> 克
+						</view>
+						<view>13709146191</view>
+					</view>
+					<view class="list-end">
+						<text class="red">32</text> 乐豆
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import searchModal from './searchModal.vue'
+	export default {
+		components: { searchModal },
+		data() {
+			return {
+				openScreen: false,
+				searchForm: {  //  查询条件
+					beginDate: '',  //  创建时间默认筛选近7天
+					endDate: '',  //  创建时间默认筛选近7天
+					customerMobile: ''  //  手机号
+				},
+				pageNo: 1,  //  当前页码
+				pageSize: 10,  //  每页条数
+				total: 0,
+				listdata: []
+			}
+		},
+		methods: {
+			// 获取查询参数 刷新列表
+			refresh(params){
+				this.searchForm = params
+				this.listdata = []
+				this.total = 0
+				this.searchHandle(1)
+			},
+			searchHandle(){
+				
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.content{
+	width: 100%;
+    padding: 20rpx;
+	display: flex;
+	flex-direction: column;
+	height: 100vh;
+	.page-head{
+		padding: 20rpx;
+	}
+	.list{
+		flex-grow: 1;
+	}
+	.list-box{
+		background: #FFFFFF;
+		border-radius: 10rpx;
+		padding: 20rpx;
+		box-shadow: 2rpx 2rpx 6rpx #eee;
+		margin-bottom: 20rpx;
+		.list-time{
+			font-size: 28rpx;
+		}
+		.list-cons{
+			display: flex;
+			align-items: center;
+		}
+		.list-imgs{
+			padding:20rpx 0 0;
+			width: 220rpx;
+			display: flex;
+			align-items: center;
+			flex-direction: column;
+			justify-content: center;
+			.cls-names{
+				padding:10rpx 0;
+				font-size: 28rpx;
+			}
+		}
+		.list-md{
+			flex-grow: 1;
+			> view{
+				padding:6rpx 0;
+				display: flex;
+				align-items: center;
+				font-size: 30rpx;
+			}
+		}
+		.list-end{
+			padding:20rpx;
+			font-size: 30rpx;
+			display: flex;
+			align-items: center;
+			.red{
+				font-size: 50rpx;
+				color: #ff5500;
+			}
+		}
+		.red{
+			font-weight: bold;
+			color: red;
+			font-size: 40rpx;
+			margin-right: 8rpx;
+		}
+	}
+}
+</style>

+ 5 - 2
pages/userCenter/index.vue

@@ -13,7 +13,10 @@
 		<!-- 列表 -->
 		<!-- 列表 -->
 		<view class="user-list">
 		<view class="user-list">
 			<u-cell-group>
 			<u-cell-group>
-				<!-- <u-cell-item icon="search" icon-size="36" :icon-style="{color:'#ff0000'}" index="0" @click="toPage" title="用户乐豆查询及核销"></u-cell-item> -->
+				<u-cell-item icon="search" icon-size="36" :icon-style="{color:'#ff0000'}" index="0" @click="toPage" title="投递记录"></u-cell-item>
+			</u-cell-group>
+			<u-gap height="20" bg-color="#f8f8f8"></u-gap>
+			<u-cell-group>
 				<u-cell-item icon="info-circle" icon-size="38" :icon-style="{color:'#55aa00'}" index="2" @click="toPage" title="关于我们"></u-cell-item>
 				<u-cell-item icon="info-circle" icon-size="38" :icon-style="{color:'#55aa00'}" index="2" @click="toPage" title="关于我们"></u-cell-item>
 				<u-cell-item icon="file-text" icon-size="40" :icon-style="{color:'#ffaa00'}" index="1" @click="toPage" title="服务协议及隐私政策"></u-cell-item>
 				<u-cell-item icon="file-text" icon-size="40" :icon-style="{color:'#ffaa00'}" index="1" @click="toPage" title="服务协议及隐私政策"></u-cell-item>
 				<u-cell-item icon="lock" icon-size="38" :icon-style="{color:'#00aaff'}" index="3" @click="toPage" title="修改密码"></u-cell-item>
 				<u-cell-item icon="lock" icon-size="38" :icon-style="{color:'#00aaff'}" index="3" @click="toPage" title="修改密码"></u-cell-item>
@@ -49,7 +52,7 @@
 			// 打开对应的页面
 			// 打开对应的页面
 			toPage(index){
 			toPage(index){
 				let pageUrl=[
 				let pageUrl=[
-					'/pages/userCenter/leDouQuery',
+					'/pages/tdRecord/tdRecord',
 					'/pages/agreement/agreement?fromPage=usercenter',
 					'/pages/agreement/agreement?fromPage=usercenter',
 					'/pages/userCenter/aboutUs',
 					'/pages/userCenter/aboutUs',
 					'/pages/userCenter/changePwd'
 					'/pages/userCenter/changePwd'