Forráskód Böngészése

Merge branch 'deploy' of http://git.chelingzhu.com/chelingzhu-web/storeCheck-app into deploy

lilei 4 éve
szülő
commit
d3da2b722b

+ 1 - 1
pages.json

@@ -47,7 +47,7 @@
 			"path": "pages/searchPage/searchPage",
 			"style": {
 				"navigationStyle": "custom", // 隐藏系统导航栏
-				"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+				"navigationBarTextStyle": "black" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
 			}
 		},
 		{

+ 25 - 21
pages/organization/organization.vue

@@ -1,22 +1,19 @@
 <template>
 	<view class="organization-wrap">
-		<u-sticky>
-			<!-- 组织结构根节点 -->
-			<view class="organization-root-tit">
-				<view class="structure-con" v-for="(item,index) in nowStructure" :key="index">
-					<text class="structure-name" @click="checkedStructure(index)">{{item}}</text>
-					<u-icon class="structure-icon" name="arrow-right" color="#999" size="28"></u-icon>
-				</view>
-				
+		<!-- 组织结构根节点 -->
+		<view class="organization-root-tit">
+			<view class="structure-con" v-for="(item,index) in nowStructure" :key="index">
+				<text class="structure-name" @click="checkedStructure(index)">{{item}}</text>
+				<u-icon class="structure-icon" name="arrow-right" color="#999" size="28"></u-icon>
 			</view>
-			<!-- 组织结构子节点 -->
-			<view class="organization-node-con">
-				<view class="organization-node-item" v-for="(item, index) in organizationNowList" :key="index" @click="clickOrganization(item, index)">
-					<text class="organization-node-item-name">{{item.name}}</text>
-					<u-icon class="organization-node-item-icon" name="arrow-right" color="#999" size="28"></u-icon>
-				</view>
+		</view>
+		<!-- 组织结构子节点 -->
+		<view class="organization-node-con">
+			<view class="organization-node-item" v-for="(item, index) in organizationNowList" :key="index" @click="clickOrganization(item, index)">
+				<text class="organization-node-item-name">{{item.name}}</text>
+				<u-icon class="organization-node-item-icon" name="arrow-right" color="#999" size="28"></u-icon>
 			</view>
-		</u-sticky>
+		</view>
 		<!-- 门店列表 -->
 		<view class="list-con">
 			<view class="list-tit">门店列表</view>
@@ -173,16 +170,23 @@
 	}
 </script>
 
-<style lang="scss" scoped>
+<style lang="scss">
 	page {
 		background-color: #f8f8f8;
 		height: calc(100vh - 44px);
+		position: relative;
 	}
 	.organization-wrap{
+		padding-top: 98upx;
 		.organization-root-tit{
+			position: fixed;
+			left: 0;
+			top: 0;
+			width: 100%;
 			padding: 20upx 30upx;
 			background-color: #fff;
 			border-bottom: 20upx solid #f8f8f8;
+			z-index: 1;
 			.structure-con{
 				display: inline-block;
 				.structure-name{
@@ -199,7 +203,7 @@
 			.organization-node-item{
 				display: flex;
 				padding: 20upx 0;
-				border-bottom: 1upx dashed #f8f8f8;
+				border-bottom: 1px solid #f8f8f8;
 				&-name{
 					flex-grow: 1;
 				}
@@ -210,20 +214,20 @@
 		}
 		// 门店列表
 		.list-con{
-			background-color: #fff;
-			margin-top: 20upx;
 			.list-tit{
 				padding: 20upx 30upx;
 				border-bottom: 1upx solid #f8f8f8;
 			}
 			.listData-con{
 				padding: 0 30upx;
+				box-sizing: border-box;
 				.listData-item{
 					display: flex;
 					justify-content: space-between;
 					align-items: center;
-					padding: 20upx 0;
-					border-bottom: 1upx dashed #f8f8f8;
+					padding: 20upx;
+					border-bottom: 1px solid #f8f8f8;
+					background-color: #fff;
 					&-l{
 						flex-grow: 1;
 						padding-right: 10upx;

+ 1 - 1
pages/searchPage/searchPage.vue

@@ -3,7 +3,7 @@
 		<!-- 自定义标题 -->
 		<u-navbar :is-back="false" :border-bottom="false" id="navbar">
 			<view class="slot-wrap">
-				<u-search class="left-icon" shape="square" placeholder="请输入门店名称搜索" v-model="keyword" action-text="取消" @change="change" @search="search" @custom="custom"></u-search>
+				<u-search class="left-icon" :focus="true" shape="square" placeholder="请输入门店名称搜索" v-model="keyword" action-text="取消" @change="change" @search="search" @custom="custom"></u-search>
 			</view>
 		</u-navbar>
 		<!-- 列表数据 -->

+ 11 - 1
pages/signIn/signIn.vue

@@ -61,9 +61,18 @@ export default {
 				geocode: true,
 				success: function(res) {
 					console.log(res);
-					// _this.location = res.address.province + res.address.city + res.address.district + res.address.street + res.address.streetNum +'靠近' + res.address.poiName
+					_this.location = res.address.province + res.address.city + res.address.district + res.address.street + res.address.streetNum +'靠近' + res.address.poiName
 					// console.log(_this.location, '城市编码 ', res.address.cityCode)
 					_this.position = res;
+				},
+				fail: function(error){
+					console.log(error)
+					if(JSON.parse(error.errMsg.replace('getLocation:fail ','')).message){
+						uni.showToast({
+							icon: 'none',
+							title: JSON.parse(error.errMsg.replace('getLocation:fail ','')).message
+						})
+					}
 				}
 			});
 		},
@@ -142,6 +151,7 @@ page {
 }
 .signIn-wrap {
 	height: 100%;
+	background-color: #f8f8f8;
 	.module-con {
 		padding: 0 30upx 20upx;
 		.info-main {

+ 1 - 1
pages/siteInspection/siteInspection.vue

@@ -39,7 +39,7 @@
 		data(){
 			return{
 				queryValue: '',
-				location: '',
+				location: '陕西省西安市雁塔区丈八东路卡的时间段卡萨34345的想法双方都第三方的',
 				noDataText: '未查找到附近门店',  //  列表请求状态提示语
 				status: 'loadmore',  //  加载中状态
 				listdata: [],  //  列表数据

+ 19 - 9
pages/toDoList/addBacklog.vue

@@ -2,19 +2,18 @@
 	<view class="back-body">
 		<view class="back-content">
 			<!-- 轮播图 -->
-			<view class="paizhao">
-				<view class="icon">
-					<u-icon name="xianchangpaishe" custom-prefix="xd-icon" size="64" color="#888888"></u-icon>
-				</view>
-			</view>
 			<swiper v-if="backlogPhotoList.length" class="top-ad-swiper" :indicator-dots="false" :autoplay="true" :interval="5000" :duration="600" :circular="true">
 				<swiper-item v-for="(item,index) in backlogPhotoList" :key="index">
 					<div class="swiper-item uni-bg-red">
-						<!-- <image class="swiper-item-imgse" :fade-show='true' :src="item.photo"></image> -->
-						<u-image mode="scaleToFill" width="750upx" height="400upx" :src="item.photo"></u-image>
+						<u-image mode="scaleToFill" width="750upx" height="400upx" :src="item"></u-image>
 					</div>
 				</swiper-item>
 			</swiper>
+			<view v-else class="paizhao">
+				<view class="icon" @click="takePhone">
+					<u-icon name="xianchangpaishe" custom-prefix="xd-icon" size="64" color="#888888"></u-icon>
+				</view>
+			</view>
 			<u-form class="form-content" :model="form" ref="uForm" label-width="180">
 				<u-form-item label="门店" prop="storeName">
 					<u-input @click="chooseStore" input-align="right" v-model="form.storeName" disabled placeholder="请选择门店" />
@@ -70,8 +69,19 @@
 		},
 		onLoad(option) {
 			
-		},
-		methods: {
+		}, 
+		methods: { 
+			// 拍照 或从相册选相片
+			takePhone () {
+				let _this = this
+				uni.chooseImage({
+				    count: 6, //默认9
+				    success: function (res) {
+				        console.log(JSON.stringify(res.tempFilePaths));
+						_this.backlogPhotoList = res.tempFilePaths
+				    }
+				})
+			},
 			// 确认日期选择
 			onSelected (v) {
 				console.log(v,'vvvvvvvv')

+ 114 - 24
pages/toDoList/toDoList.vue

@@ -15,21 +15,25 @@
 					 swiperWidth="750"></u-tabs-swiper>
 				</view>
 				<view class="all-filter" v-show="current==2">
-					<u-row>
+					<u-dropdown>
+						<u-dropdown-item v-model="createTimeSort" title="发起时间" :options="createTimeSortList"></u-dropdown-item>
+						<u-dropdown-item v-model="handleTimeSort" title="处理时间" :options="handleTimeSortList"></u-dropdown-item>
+					</u-dropdown>
+					<!-- <u-row>
 						<text>发起时间</text>
 						<view class="filter-icon">
-							<u-icon name="arrow-up-fill" color="#888888" size="24"></u-icon>
-							<u-icon name="arrow-down-fill" color="#2979ff" size="24"></u-icon>
+							<u-icon @click="changeSort(0)" name="arrow-up-fill" :color="(sortIndex===0)?'#2979ff':'#888888'" size="24"></u-icon>
+							<u-icon @click="changeSort(1)" name="arrow-down-fill" :color="(sortIndex===1)?'#2979ff':'#888888'" size="24"></u-icon>
 						</view>
 					</u-row>
 					<u-row>
 						<text>处理时间</text>
 						<view class="filter-icon">
-							<u-icon name="arrow-up-fill" color="#888888" size="24"></u-icon>
-							<u-icon name="arrow-down-fill" color="#888888" size="24"></u-icon>
+							<u-icon @click="changeSort(2)" name="arrow-up-fill" :color="(sortIndex===2)?'#2979ff':'#888888'" size="24"></u-icon>
+							<u-icon @click="changeSort(3)" name="arrow-down-fill" :color="(sortIndex===3)?'#2979ff':'#888888'" size="24"></u-icon>
 						</view>
-					</u-row>
-					<view @click="showSearch=true">
+					</u-row> -->
+					<view class="filter" @click="showSearch=true">
 						<text>筛选</text>
 						<u-icon name="shaixuan" custom-prefix="xd-icon" size="32" color="#888888"></u-icon>
 					</view>
@@ -53,7 +57,7 @@
 										 {{item.clsName}}
 									</view>
 									 <view class="text-right">
-										 <text>{{item.userName}}</text>
+										 <text>{{item.putUserName}}</text>
 									 </view>
 									 <view class="icon-xian" >
 										 <u-icon name="icon-xian-11" custom-prefix="xd-icon" size="30" color="#888888"></u-icon>
@@ -95,7 +99,7 @@
 		data() {
 			return {
 				showSearch: false, // 是否显示搜索弹框
-				searchParams: null, // 查询数据参数
+				searchParams: null, // 全部查询数据参数
 				status: 'loadmore',
 				noDataText: '暂无数据',
 				background: {
@@ -105,15 +109,18 @@
 				tabList: [
 					  {
 						  dispName: '发给我的',
-						  typeId: 3
+						  typeId: 3,
+						  queryLabel: 'TO_ME' // tab参数
 					   },
 					  {
 					    dispName: '我创建的',
-					  	typeId: 1
+					  	typeId: 1,
+						queryLabel: 'FROM_ME' // tab参数
 					  },
 					  {
 					    dispName: '全部',
-					  	typeId: 2
+					  	typeId: 2,
+						queryLabel: 'ALL' // tab参数
 					  },
 				  ],
 				current: 0,
@@ -122,6 +129,58 @@
 				pageSize: 10,
 				list: [],
 				total: 0,
+				action:'swiperChange', // 操作类型,上划分页,或左右滑动
+				sortField: 'create_time', // 全部  排序字段 默认按发起时间
+				sortOrder: 'desc', // 全部  排序字段 默认按发起时间降序
+				createTimeSort: 'desc',
+				handleTimeSort: null,
+				createTimeSortList: [
+					{
+						label: '默认排序',
+						value: ''
+					},
+					{
+						label: '升序',
+						value: 'asc'
+					},
+					{
+						label: '降序',
+						value: 'desc'
+					},
+				],
+				handleTimeSortList: [
+					{
+						label: '默认排序',
+						value: ''
+					},
+					{
+						label: '升序',
+						value: 'asc'
+					},
+					{
+						label: '降序',
+						value: 'desc'
+					},
+				],
+				sortList: [  // 排序列表
+					{
+						sortField: 'create_time',
+						sortOrder: 'asc'
+					},
+					{
+						sortField: 'create_time',
+						sortOrder: 'desc'
+					},
+					{
+						sortField: 'handle_time',
+						sortOrder: 'asc'
+					},
+					{
+						sortField: 'handle_time',
+						sortOrder: 'desc'
+					}
+				],
+				sortIndex: 1, // 排序下标 默认按发起时间降序
 			}
 		},
 		onLoad() {
@@ -131,10 +190,9 @@
 			// tabs通知swiper切换
 			tabsChange(index) {
 				this.swiperCurrent = index;
-				this.resetPage()
 			},
 			swiperChange(event){
-				this.list = [];
+				this.action = 'swiperChange'
 				this.status = 'loading'
 			},
 			// swiper-item左右移动,通知tabs的滑块跟随移动
@@ -146,14 +204,24 @@
 			// swiper滑动结束,分别设置tabs和swiper的状态
 			animationfinish(e) {
 				let current = e.detail.current;
-				this.$refs.uTabs.setFinishCurrent(current);
-				this.swiperCurrent = current;
-				this.current = current;
-				this.resetPage()
+				let isCurtab = this.current == current
+				if(this.status!="nomore"){
+					let loadData = this.action == 'swiperChange' ? !isCurtab : isCurtab;
+					if(loadData){
+						this.$refs.uTabs.setFinishCurrent(current);
+						this.swiperCurrent = current;
+						this.current = current;
+						this.resetPage();
+					}
+				}
+			},
+			// 全部 排序
+			changeSort (index) {
+				this.sortIndex = this.sortIndex === index ? null : index
 			},
 			// scroll-view到底部加载更多
 			onreachBottom() {
-				console.log(this.list.length, this.total)
+				this.action = 'onreachBottom'
 				if(this.list.length < this.total){
 					this.pageNo += 1
 					this.getRow()
@@ -167,10 +235,21 @@
 			  if (pageNo) {
 			    this.pageNo = pageNo
 			  }
-			  
 			  let params = {
 			    pageNo: this.pageNo,
-			    pageSize: this.pageSize
+			    pageSize: this.pageSize,
+			    queryLabel: this.tabList[this.current].queryLabel, // tab分类
+			    status: '', // 状态(pending 待整改 check_pending待审核 finished 整改完成 expired 已过期)
+			    sourceType: '', // 问题来源(远程巡店 VIDEO_INSPECTION /现场巡店 SPOT_INSPECTION/点检 POINT_INSPECTION /手动创建  MANUAL)
+			    putUserName: '', // 巡店人
+			    storeName: '', // 门店名称
+				createTime: '', // 发起时间
+				sortField: '', // 排序字段 create_time  发起时间  handle_time 处理时间
+				sortOrder: '' // asc 升序    desc 降序
+			  }
+			  if (params.queryLabel == 'ALL') {
+				  params.sortField = this.sortIndex === null ? '' :this.sortList[this.sortIndex].sortField
+				  params.sortOrder = this.sortIndex === null ? '' :this.sortList[this.sortIndex].sortOrder
 			  }
 			  this.status = "loading"
 			  getBackLogList(params).then(res => {
@@ -191,8 +270,15 @@
 			},
 			resetPage(){
 				this.status = 'loading';
-				this.list = [];
-				this.getRow(1);
+				// 上划分页
+				if(this.action == 'onreachBottom'){
+					this.getRow();
+				}
+				// 左右切换tab
+				if(this.action == 'swiperChange'){
+					this.list = [];
+					this.getRow(1);
+				}
 			},
 			// 查询刷新
 			refresh(params){
@@ -282,7 +368,7 @@
 					}
 				}
 			}
-			// 全部筛选
+			// 全部筛选 
 			.all-filter{
 				width: 100%;
 				height: 100upx;
@@ -295,6 +381,10 @@
 					flex-direction: column;
 					margin-left: 10upx;
 				}
+				.filter{
+					width: 30%;
+					text-align: center;
+				}
 			}
 			// 列表样式
 			.check-order-list{

+ 21 - 23
pages/videoShopTour/videoShopTour.vue

@@ -1,23 +1,21 @@
 <template>
 	<view class="videoShopTour-wrap">
-		<u-sticky>
-			<!-- 搜索方式 -->
-			<u-grid :col="2" class="search-type-con" hover-class="none">
-				<u-grid-item class="search-module" @click="goSearch">
-					<u-icon class="search-icon" name="xundianguanli" custom-prefix="xd-icon" size="80" color="#2b85e4"></u-icon>
-					<view class="search-txt">按门店名称查询</view>
-				</u-grid-item>
-				<u-grid-item class="search-module" @click="goOrgSearch">
-					<u-icon class="search-icon" name="zuzhijigou" custom-prefix="xd-icon" size="80" color="#19be6b"></u-icon>
-					<view class="search-txt">按组织机构查询</view>
-				</u-grid-item>
-			</u-grid>
-		</u-sticky>
+		<!-- 搜索方式 -->
+		<u-grid :col="2" class="search-type-con" hover-class="none">
+			<u-grid-item class="search-module" @click="goSearch">
+				<u-icon class="search-icon" name="xundianguanli" custom-prefix="xd-icon" size="80" color="#2b85e4"></u-icon>
+				<view class="search-txt">按门店名称查询</view>
+			</u-grid-item>
+			<u-grid-item class="search-module" @click="goOrgSearch">
+				<u-icon class="search-icon" name="zuzhijigou" custom-prefix="xd-icon" size="80" color="#19be6b"></u-icon>
+				<view class="search-txt">按组织机构查询</view>
+			</u-grid-item>
+		</u-grid>
 		<!-- 门店列表 -->
 		<view class="list-con">
 			<view class="list-tit">门店列表</view>
 			<!-- 列表数据 -->
-			<view class="listData-con">
+			<scroll-view class="listData-con" scroll-y>
 				<view class="listData-item" v-for="(item, index) in list" :key="item.id" @click="goPage(item)">
 					<view class="listData-item-l">
 						<u-icon class="listData-item-l-icon" name="mendian" custom-prefix="xd-icon" size="40" color="#888"></u-icon>
@@ -28,7 +26,7 @@
 					</view>
 				</view>
 				<u-empty :text="noDataText" img-width="120" v-if="list.length == 0 && status != 'loading'" :margin-top="220" style="padding-bottom: 120px;" mode="list"></u-empty>
-			</view>
+			</scroll-view>
 		</view>
 	</view>
 </template>
@@ -115,12 +113,13 @@
 	}
 </script>
 
-<style lang="scss" scoped>
+<style lang="scss">
 	page {
 		background-color: #f8f8f8;
 		height: calc(100vh - 44px);
 	}
 	.videoShopTour-wrap{
+		height: 100%;
 		// 搜索方式
 		.search-type-con{
 			.search-module{
@@ -132,23 +131,22 @@
 		}
 		// 门店列表
 		.list-con{
-			background-color: #fff;
-			margin-top: 20upx;
+			margin-top: 10upx;
 			.list-tit{
 				padding: 20upx 30upx;
 				border-bottom: 1upx solid #f8f8f8;
 			}
 			.listData-con{
 				padding: 0 30upx;
+				height: calc(100vh - 165px);
+				box-sizing: border-box;
 				.listData-item{
 					display: flex;
 					justify-content: space-between;
 					align-items: center;
-					padding: 20upx 0;
-					border-bottom: 1upx dashed #f8f8f8;
-					&:active{
-						background: #F8F8F8;
-					}
+					padding: 20upx;
+					border-bottom: 1px solid #F8F8F8;
+					background-color: #fff;
 					&-l{
 						flex-grow: 1;
 						padding-right: 10upx;