Ver Fonte

修改bug

renmy há 10 meses atrás
pai
commit
f2badeccd7
4 ficheiros alterados com 346 adições e 211 exclusões
  1. 183 90
      pages/index/orderDetail.vue
  2. 107 101
      pages/index/orderUp.vue
  3. 31 16
      pages/index/supplierDetail.vue
  4. 25 4
      pages/ucenter/mineNotes.vue

+ 183 - 90
pages/index/orderDetail.vue

@@ -24,7 +24,7 @@
 					</view>
 					<view class="order-detail-site">
 						<view class="order-detail-status">
-							{{detailInfo.status == 0 ? '待处理...' : (detailInfo.status == 1 ? '处理中...' : '已完结')}}
+							{{detailInfo.statusText || '-'}}
 						</view>
 						<view class="order-detail-site-text">
 							{{detailInfo.stationName || '-'}}
@@ -44,7 +44,7 @@
 						<u-swiper :list="detailInfo.imgList" @click="imageHandle"></u-swiper>
 					</view>
 					<view class="order-detail-swiper" v-if="detailInfo.video">
-						<video :src='detailInfo.video'></video>
+						<video style="width: 100%;" :src='detailInfo.video'></video>
 					</view>
 					<view class="order-problem-container">
 						<view class="problem-title">
@@ -94,7 +94,7 @@
 								上报人
 							</view>
 							<view class="basic-item-text">
-								{{detailInfo.createBy || '-'}}
+								{{detailInfo.firstPersonName || '-'}}
 							</view>
 						</view>
 						<view class="basic-item">
@@ -102,27 +102,32 @@
 								联系方式
 							</view>
 							<view class="basic-item-text">
-								{{detailInfo.contactPhone || '-'}}
+								{{detailInfo.firstPersonPhone || '-'}}
 							</view>
 						</view>
 					</view>
 				</view>
 				<u-form :model="form" ref="uform" :rules="rules" label-align='left' label-width="150">
-					<view class="order-detail-deal" v-if="detailInfo.status == 0 || (detailInfo.status == 1 && detailInfo.currentPerson == userinfo.userId)">
+					<view class="order-detail-deal"
+						v-if="detailInfo.status == 0 || (detailInfo.status == 1 && detailInfo.currentPerson == userinfo.userId)">
 						<view class="order-detail-deal-title">
 							处理信息
 						</view>
 						<u-form-item label="*处理方式" prop="statusText">
-							<u-input type="select" :select-open="dealSelectShow" placeholder="请选择换电站" v-model="form.statusText" @click="dealSelectShow = true"/>
+							<u-input type="select" :select-open="dealSelectShow" placeholder="请选择换电站"
+								v-model="form.statusText" @click="dealSelectShow = true" />
 						</u-form-item>
 						<u-form-item label="*处理人员" prop="nextPerson" v-if="form.status == 3">
-							<u-input type="select" :select-open="showPerson" placeholder="请选择处理人员" v-model="form.nextPerson" @click="showPerson = true"/>
+							<u-input type="select" :select-open="showPerson" placeholder="请选择处理人员"
+								v-model="form.nextPerson" @click="showPerson = true" />
 						</u-form-item>
 						<u-form-item label="*处理记录" prop="info" :label-position="'top'">
-							<u-input type="textarea" placeholder="请输入问题记录 不超过200个字" :maxlength="200" v-model="form.info" />
+							<u-input type="textarea" placeholder="请输入问题记录 不超过200个字" :maxlength="200"
+								v-model="form.info" />
 						</u-form-item>
 						<u-form-item label="问题图片(不超过5张,20M以内)" prop="intro" :label-position="'top'">
-							<u-upload multiple :fileList="fileList" @on-choose-complete="onChooseComplete" :auto-upload="false" @delete="deletePic" name="1" :maxCount="5"></u-upload>
+							<u-upload multiple :fileList="fileList" @on-choose-complete="onChooseComplete"
+								:auto-upload="false" @delete="deletePic" name="1" :maxCount="5"></u-upload>
 						</u-form-item>
 						<u-form-item label="问题视频(不超过1个,50M以内)" prop="intro" :label-position="'top'">
 							<view class="uploadv" @click="onVideoChooseComplete" v-if="!form.video">
@@ -131,12 +136,14 @@
 							</view>
 							<view class="uploadv" v-if="form.video">
 								<video class="u-add-btn" :src="form.video"></video>
-								<image class="u-add-img" src="@/static/index-delete.png" alt="" @click="delHandle"/>
+								<image class="u-add-img" src="@/static/index-delete.png" alt="" @click="delHandle" />
 							</view>
 						</u-form-item>
 					</view>
-				</u-form>	
-				<view class="order-footer-button" :disabled="isClick" v-if="detailInfo.status == 0 || (detailInfo.status == 1 && detailInfo.currentPerson == userinfo.userId)" @click="submitHandle">
+				</u-form>
+				<view class="order-footer-button" :disabled="isClick"
+					v-if="detailInfo.status == 0 || (detailInfo.status == 1 && detailInfo.currentPerson == userinfo.userId)"
+					@click="submitHandle">
 					处理
 				</view>
 			</view>
@@ -152,15 +159,18 @@
 							<view style="margin-left: 20rpx;">
 								<view class="u-order-title">
 									<span class="u-order-time">{{item.handleTime || '-'}}</span>
-									<span class="u-order-name" v-if="item.processorName && item.nextPerson">{{item.processorName + '>' + item.nextPerson}}</span>
-									<span class="u-order-name" v-else-if="item.processorName && !item.nextPerson">{{item.processorName}}</span>
+									<span class="u-order-name"
+										v-if="item.processorName && item.nextPerson">{{item.processorName + '>' + item.nextPerson}}</span>
+									<span class="u-order-name"
+										v-else-if="item.processorName && !item.nextPerson">{{item.processorName}}</span>
 									<span class="u-order-name" v-else>{{item.processorName}}</span>
 								</view>
 								<view class="u-order-desc">{{item.info || '-'}}</view>
 								<view class="u-order-images" v-if="item.attachment">
-									<image :src="img" v-for="(img, i) in item.imgList" :key="i" class="u-order-img"></image>
+									<image :src="img" v-for="(img, i) in item.imgList" :key="i" class="u-order-img"
+										@click="imageSingleHandle(item.imgList, i)"></image>
 								</view>
-								<view class="u-order-images"  v-if="item.video">
+								<view class="u-order-images" v-if="item.video">
 									<video :src="item.video" class="u-order-img"></video>
 								</view>
 							</view>
@@ -173,12 +183,13 @@
 			</view>
 		</view>
 		<u-select :list="dealSelectList" v-model="dealSelectShow" @confirm="dealSelectCallback"> </u-select>
-		<u-select :list="personSelectList" v-model="showPerson" value-name="userId" label-name="nickName" @confirm="personSelectCallback"> </u-select>
+		<u-select :list="personSelectList" v-model="showPerson" value-name="userId" label-name="nickName"
+			@confirm="personSelectCallback"> </u-select>
 	</view>
 </template>
 
 <script>
-	export default{
+	export default {
 		data() {
 			return {
 				//当前选中下标
@@ -208,47 +219,50 @@
 				//人员列表
 				personSelectList: [],
 				//处理列表
-				dealSelectList: [{label: '处理中', value: 1}, {label: '转发', value: 3}, {label: '已处理', value: 2}],
+				dealSelectList: [{
+					label: '处理中',
+					value: 1
+				}, {
+					label: '转发',
+					value: 3
+				}, {
+					label: '已处理',
+					value: 2
+				}],
 				//验证规则对象
 				rules: {
-					statusText: [
-						{ 
-							required: true, 
-							message: '请选择处理', 
-							// 可以单个或者同时写两个触发验证方式 
-							trigger: ['change','blur'],
-						}
-					],
-					info: [
-						{
-							max: 200, 
-							message: '记录不能大于200个字', 
-							trigger: ['change','blur'],
-							message: '请输入问题记录',
-							required: true, 
-						}
-					],
-					nextPerson: [
-						{
-							trigger: ['change','blur'],
-							message: '请选择流转人员',
-							required: true, 
-						}
-					],
+					statusText: [{
+						required: true,
+						message: '请选择处理',
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change', 'blur'],
+					}],
+					info: [{
+						max: 200,
+						message: '记录不能大于200个字',
+						trigger: ['change', 'blur'],
+						message: '请输入问题记录',
+						required: true,
+					}],
+					nextPerson: [{
+						trigger: ['change', 'blur'],
+						message: '请选择流转人员',
+						required: true,
+					}],
 				},
 				timeDatas: [],
 				//是否点击按钮
 				isClick: false,
-			} 
+			}
 		},
 		//第一次加载
 		onLoad(e) {
-			  this.id = e.id;
-			  let userinfo = uni.getStorageSync('user')
-			  this.userinfo = JSON.parse(userinfo)
+			this.id = e.id;
+			let userinfo = uni.getStorageSync('user')
+			this.userinfo = JSON.parse(userinfo)
 		},
 		onReady() {
-		  this.$refs.uform.setRules(this.rules);
+			this.$refs.uform.setRules(this.rules);
 		},
 		mounted() {
 			this.getDetailData();
@@ -257,7 +271,7 @@
 			//tab选择
 			tabHandle(type) {
 				this.currIndex = type;
-				if(type == 2) {
+				if (type == 2) {
 					this.getDealList();
 				} else {
 					this.getDetailData();
@@ -286,6 +300,17 @@
 					current: this.detailInfo.imgList[data]
 				})
 			},
+			//点击放大图片
+			imageSingleHandle(imgList, index) {
+				let list = [];
+				imgList.forEach(item => {
+					list.push(item);
+				})
+				uni.previewImage({
+					urls: list,
+					current: imgList[index]
+				})
+			},
 			//是否收起/展开详细信息
 			showHandle() {
 				this.isShowMore = !this.isShowMore
@@ -298,13 +323,31 @@
 				})
 				_that.detailInfo = {};
 				_that.$http.getOrderDetail(_that.id).then(res => {
-					if(res.code == 200) {
-						 let detailInfo = {...res.data};
-						 if(detailInfo.attachment) {
-							 detailInfo.imgList = detailInfo.attachment.split(',')
-						 }
-						 _that.detailInfo = detailInfo;
-						 this.getPersons(detailInfo.stationCode);
+					if (res.code == 200) {
+						let detailInfo = {
+							...res.data
+						};
+						let userinfo = uni.getStorageSync('user')
+						let user = null
+						if (userinfo) {
+							user = JSON.parse(userinfo)
+						}
+						if (detailInfo.attachment) {
+							detailInfo.imgList = detailInfo.attachment.split(',')
+						}
+						if (detailInfo.status == 0) {
+							detailInfo.statusText = '未处理';
+						} else if (detailInfo.status == 1) {
+							if (user.userId == detailInfo.currentPerson) {
+								detailInfo.statusText = '待处理';
+							} else {
+								detailInfo.statusText = '处理中';
+							}
+						} else {
+							detailInfo.statusText = '已完结';
+						}
+						_that.detailInfo = detailInfo;
+						this.getPersons(detailInfo.stationCode);
 					} else {
 						_that.$utils.msg(res.msg);
 					}
@@ -318,17 +361,19 @@
 					title: '加载中...',
 				})
 				_that.timeDatas = [];
-				_that.$http.getOrderDealList({parentId: _that.id}).then(res => {
-					if(res.code == 200) {
-						 let timeDatas = res.data || [];
-						 if(timeDatas.length > 0) {
-							 timeDatas.forEach(item => {
-								 if(item.attachment) {
-									 item.imgList = item.attachment.split(',')
-								 }
-								 _that.timeDatas.push(item);
-							 })
-						 }
+				_that.$http.getOrderDealList({
+					parentId: _that.id
+				}).then(res => {
+					if (res.code == 200) {
+						let timeDatas = res.data || [];
+						if (timeDatas.length > 0) {
+							timeDatas.forEach(item => {
+								if (item.attachment) {
+									item.imgList = item.attachment.split(',')
+								}
+								_that.timeDatas.push(item);
+							})
+						}
 					} else {
 						_that.$utils.msg(res.msg);
 					}
@@ -341,16 +386,16 @@
 				_that.personSelectList = [];
 				let userinfo = uni.getStorageSync('user')
 				let user = null
-				if(userinfo) {
+				if (userinfo) {
 					user = JSON.parse(userinfo)
 				}
 				_that.$http.getUserListByStationCode(code).then(res => {
 					uni.hideLoading();
-					if(res.code == 200) {
+					if (res.code == 200) {
 						let list = res.data || [];
-						if(list && list.length > 0) {
+						if (list && list.length > 0) {
 							list.forEach(item => {
-								if(user.userId != item.userId) {
+								if (user.userId != item.userId) {
 									_that.personSelectList.push(item);
 								}
 							})
@@ -372,7 +417,7 @@
 						header: {
 							"Authorization": `${uni.getStorageSync("token")}`
 						},
-							//	这个res是后端返回给你上传成功的数据里边一般会有上传之后图片的在线路径
+						//	这个res是后端返回给你上传成功的数据里边一般会有上传之后图片的在线路径
 						success: (res) => {
 							let data = JSON.parse(res.data)
 							_that.form.img.push(data.msg)
@@ -385,9 +430,9 @@
 				let _that = this;
 				uni.showModal({
 					title: '提示',
-					content:'确定删除该视频文件吗?',
+					content: '确定删除该视频文件吗?',
 					success: (res) => {
-						if(res.confirm) {
+						if (res.confirm) {
 							_that.form.video = null
 						} else {
 							return
@@ -400,9 +445,9 @@
 				const _that = this;
 				uni.chooseVideo({
 					sourceType: ['album', 'camera'],
-				    success: (chooseImageRes) => {
-				        const tempFilePaths = chooseImageRes.tempFilePath;
-						if( chooseImageRes.size >= 52428800 ) {
+					success: (chooseImageRes) => {
+						const tempFilePaths = chooseImageRes.tempFilePath;
+						if (chooseImageRes.size >= 52428800) {
 							uni.showToast({
 								title: '不能超过50M',
 								icon: 'none',
@@ -414,23 +459,23 @@
 							title: '视频上传中...'
 						})
 						uni.uploadFile({
-						    url: 'https://tess.fast-fun.cn/zl/mini/file/upload',
-						    filePath: tempFilePaths,
-						    name: 'file',
+							url: 'https://tess.fast-fun.cn/zl/mini/file/upload',
+							filePath: tempFilePaths,
+							name: 'file',
 							method: 'post',
-						    formData: {
-						        "Authorization": `${uni.getStorageSync("token")}`
-						    },
-						    success: (uploadFileRes) => {
+							formData: {
+								"Authorization": `${uni.getStorageSync("token")}`
+							},
+							success: (uploadFileRes) => {
 								let data = JSON.parse(uploadFileRes.data)
 								_that.form.video = data.msg;
 								uni.hideLoading();
-						    },
+							},
 							fail: () => {
 								uni.hideLoading();
 							}
 						});
-				    }
+					}
 				});
 			},
 			//提交
@@ -444,12 +489,12 @@
 					}
 					let form = _that.form;
 					form.parentId = _that.id;
-					if(form.img && form.img.length > 0) {
+					if (form.img && form.img.length > 0) {
 						form.attachment = form.img.join(',')
 					}
 					_that.$http.orderDeal(_that.form).then(res => {
 						_that.isClick = false;
-						if(res.code == 200) {
+						if (res.code == 200) {
 							uni.showToast({
 								title: '处理成功',
 								icon: 'success',
@@ -471,7 +516,7 @@
 						} else {
 							_that.$utils.msg(res.msg);
 						}
-					}).catch(error =>{
+					}).catch(error => {
 						_that.$utils.msg(error);
 					})
 				});
@@ -489,12 +534,15 @@
 		padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
 		padding-top: 15rpx;
 		overflow-y: hidden;
+
 		.detail-page-content {
 			height: calc(100vh - 120rpx - env(safe-area-inset-bottom));
 			overflow-y: auto;
+
 			.detail-top-container {
 				display: flex;
 				margin: 0rpx 30rpx;
+
 				.detail-top-left-active {
 					height: 90rpx;
 					background: #FFFFFF;
@@ -507,6 +555,7 @@
 					color: #1D2129;
 					border-radius: 16rpx 16rpx 0rpx 0rpx;
 				}
+
 				.detail-top-left {
 					height: 72rpx;
 					background: #E8F3FF;
@@ -521,16 +570,19 @@
 					margin-top: 18rpx;
 				}
 			}
+
 			.order-detail-content {
-				
+
 				.order-detail-info {
 					background: #FFFFFF;
 					padding: 30rpx;
 					margin: 0 30rpx;
 					border-radius: 0rpx 0rpx 16rpx 16rpx;
 					min-height: 220rpx;
+
 					.order-detail-title {
 						display: flex;
+
 						.order-detail-level {
 							font-size: 20rpx;
 							font-family: PingFang SC-Regular, PingFang SC;
@@ -543,6 +595,7 @@
 							border-radius: 4rpx 4rpx 4rpx 4rpx;
 							text-align: center;
 						}
+
 						.order-detail-name {
 							font-size: 30rpx;
 							font-family: PingFang SC-Medium, PingFang SC;
@@ -556,6 +609,7 @@
 							text-overflow: ellipsis;
 						}
 					}
+
 					.order-detail-time {
 						font-size: 24rpx;
 						font-family: PingFang SC-Regular, PingFang SC;
@@ -564,10 +618,12 @@
 						line-height: 28rpx;
 						margin-top: 20rpx;
 					}
+
 					.order-detail-site {
 						display: flex;
 						position: relative;
 						margin-top: 20rpx;
+
 						.order-detail-status {
 							font-size: 30rpx;
 							font-family: PingFang SC-Regular, PingFang SC;
@@ -575,6 +631,7 @@
 							color: #3F8CFF;
 							line-height: 36rpx;
 						}
+
 						.order-detail-site-text {
 							font-size: 26rpx;
 							font-family: PingFang SC-Regular, PingFang SC;
@@ -586,13 +643,16 @@
 						}
 					}
 				}
+
 				.order-detail-fault-describe {
 					background: #FFFFFF;
 					border-radius: 16rpx;
 					padding: 30rpx;
 					margin: 30rpx;
+
 					.fault-describe-container {
 						display: flex;
+
 						.fault-describe-title {
 							font-size: 30rpx;
 							font-family: PingFang SC-Medium, PingFang SC;
@@ -602,6 +662,7 @@
 							text-align: left;
 							flex: 1;
 						}
+
 						.fault-describe-remark {
 							font-size: 24rpx;
 							font-family: PingFang SC-Regular, PingFang SC;
@@ -612,13 +673,17 @@
 							text-align: right;
 						}
 					}
+
 					.order-detail-swiper {
 						margin-top: 30rpx;
 					}
+
 					.order-problem-container {
 						margin-top: 30rpx;
+
 						.problem-title {
 							display: flex;
+
 							.problem-icon {
 								height: 36rpx;
 								width: 36rpx;
@@ -632,6 +697,7 @@
 								line-height: 36rpx;
 								text-align: center;
 							}
+
 							.problem-title-text {
 								font-size: 30rpx;
 								font-family: PingFang SC-Regular, PingFang SC;
@@ -640,6 +706,7 @@
 								line-height: 36rpx;
 							}
 						}
+
 						.problem-text {
 							font-size: 28rpx;
 							font-family: PingFang SC-Regular, PingFang SC;
@@ -650,13 +717,16 @@
 						}
 					}
 				}
+
 				.order-detail-basic {
 					background: #FFFFFF;
 					border-radius: 16rpx;
 					padding: 30rpx;
 					margin: 0rpx 30rpx 30rpx;
+
 					.order-detail-basic-title {
 						display: flex;
+
 						.basic-title-text {
 							font-size: 30rpx;
 							font-family: PingFang SC-Medium, PingFang SC;
@@ -665,6 +735,7 @@
 							line-height: 36rpx;
 							flex: 1;
 						}
+
 						.basic-title-show {
 							font-size: 26rpx;
 							font-family: PingFang SC-Regular, PingFang SC;
@@ -676,11 +747,14 @@
 							margin-right: 5rpx;
 						}
 					}
+
 					.basic-items {
 						margin-top: 30rpx;
+
 						.basic-item {
 							display: flex;
 							height: 100rpx;
+
 							.basic-item-title {
 								font-size: 30rpx;
 								font-family: PingFang SC-Regular, PingFang SC;
@@ -689,6 +763,7 @@
 								line-height: 100rpx;
 								width: 200rpx;
 							}
+
 							.basic-item-text {
 								font-size: 30rpx;
 								font-family: PingFang SC-Regular, PingFang SC;
@@ -704,11 +779,13 @@
 						}
 					}
 				}
+
 				.order-detail-deal {
 					background: #FFFFFF;
 					border-radius: 16rpx;
 					padding: 30rpx;
 					margin: 0rpx 30rpx 30rpx;
+
 					.order-detail-deal-title {
 						font-size: 30rpx;
 						font-family: PingFang SC-Medium, PingFang SC;
@@ -718,12 +795,14 @@
 					}
 				}
 			}
+
 			.order-detail-timeLine {
 				background: #FFFFFF;
 				padding: 30rpx 30rpx 30rpx 60rpx;
 				margin: 0 30rpx;
 				border-radius: 0rpx 0rpx 16rpx 16rpx;
 				min-height: 220rpx;
+
 				.time-line-node {
 					background: #3F8CFF;
 					line-height: 80rpx;
@@ -735,8 +814,10 @@
 					color: #FFFFFF;
 					text-align: center;
 				}
+
 				.u-order-title {
 					display: flex;
+
 					.u-order-time {
 						font-size: 28rpx;
 						font-family: PingFang SC-Regular, PingFang SC;
@@ -744,6 +825,7 @@
 						color: #1D2129;
 						line-height: 32rpx;
 					}
+
 					.u-order-name {
 						flex: 1;
 						text-align: right;
@@ -754,6 +836,7 @@
 						line-height: 32rpx;
 					}
 				}
+
 				.no-data {
 					text-align: center;
 					font-size: 22rpx;
@@ -768,6 +851,7 @@
 				}
 			}
 		}
+
 		.u-order-desc {
 			font-size: 24rpx;
 			font-family: PingFang SC-Regular, PingFang SC;
@@ -776,17 +860,20 @@
 			line-height: 28rpx;
 			margin-top: 20rpx;
 		}
+
 		.u-order-images {
 			display: flex;
 			margin-top: 20rpx;
 			width: 100%;
 			flex-wrap: wrap;
+
 			.u-order-img {
 				width: 120rpx;
 				height: 120rpx;
 				margin: 0 10rpx 10rpx 0;
 			}
 		}
+
 		.order-footer-button {
 			line-height: 100rpx;
 			text-align: center;
@@ -802,6 +889,7 @@
 			bottom: env(safe-area-inset-bottom);
 			opacity: 1;
 		}
+
 		.uploadv {
 			width: 208rpx;
 			height: 208rpx;
@@ -816,10 +904,12 @@
 			display: flex;
 			align-items: center;
 			justify-content: center;
+
 			.u-add-tips {
 				margin-top: 20rpx;
 				line-height: 20rpx;
 			}
+
 			.u-add-img {
 				width: 50rpx;
 				height: 50rpx;
@@ -827,14 +917,17 @@
 				top: 10rpx;
 				right: 15rpx;
 			}
+
 			.img {
 				width: 60%;
 				height: 60%;
+
 				image {
 					height: 100%;
 					width: 100%;
 				}
 			}
+
 			.u-delete-icon {
 				position: absolute;
 				top: 10rpx;

+ 107 - 101
pages/index/orderUp.vue

@@ -7,31 +7,38 @@
 		<scroll-view class="content" scroll-y="true" scroll-top=0 enable-back-to-top>
 			<u-form :model="form" ref="uform" :rules="rules" label-align='left' label-width="170">
 				<u-form-item label="*电站名称" prop="stationName">
-					<u-input type="select" :select-open="siteSelectShow" placeholder="请选择换电站" v-model="form.stationName" @click="siteSelectShow = true"/>
+					<u-input type="select" :select-open="siteSelectShow" placeholder="请选择换电站" v-model="form.stationName"
+						@click="siteSelectShow = true" />
 				</u-form-item>
 				<u-form-item label="*设备名称" prop="deviceName">
-					<u-input type="select" :select-open="nameSelectShow" placeholder="请选择设备名称" v-model="form.deviceName" @click="nameSelectShow = true"/>
+					<u-input type="select" :select-open="nameSelectShow" placeholder="请选择设备名称" v-model="form.deviceName"
+						@click="nameSelectShow = true" />
 				</u-form-item>
 				<u-form-item label="设备编号">
 					<u-input v-model="form.sn" placeholder="请输入设备编号" />
 				</u-form-item>
 				<u-form-item label="故障等级">
-					<u-input type="select" :select-open="levelSelectShow" placeholder="请选择故障等级" v-model="form.levelText" @click="levelSelectShow = true"/>
+					<u-input type="select" :select-open="levelSelectShow" placeholder="请选择故障等级" v-model="form.levelText"
+						@click="levelSelectShow = true" />
 				</u-form-item>
 				<u-form-item label="*发生时间" prop="occurrenceTime">
-					<u-input type="select" :select-open="show" placeholder="请选择发生时间" v-model="form.occurrenceTime" @click="show = true"/>
+					<u-input type="select" :select-open="show" placeholder="请选择发生时间" v-model="form.occurrenceTime"
+						@click="show = true" />
 				</u-form-item>
 				<u-form-item label="处理人员">
-					<u-input type="select" :select-open="showPerson" placeholder="请选择处理人员" v-model="form.nextPerson" @click="personHandle"/>
+					<u-input type="select" :select-open="showPerson" placeholder="请选择处理人员" v-model="form.nextPerson"
+						@click="personHandle" />
 				</u-form-item>
 				<u-form-item label="*问题描述" prop="problemTitle" :label-position="'top'">
 					<u-input placeholder="请输入问题描述 不超过15个字" :maxlength="15" v-model="form.problemTitle" />
 				</u-form-item>
 				<u-form-item label="*问题记录" prop="deviceProblem" :label-position="'top'">
-					<u-input type="textarea" placeholder="请输入问题记录 不超过200个字" :maxlength="200" v-model="form.deviceProblem" />
+					<u-input type="textarea" placeholder="请输入问题记录 不超过200个字" :maxlength="200"
+						v-model="form.deviceProblem" />
 				</u-form-item>
 				<u-form-item label="问题图片(不超过5张,20M以内)" prop="intro" :label-position="'top'">
-					<u-upload action="#" multiple :fileList="fileList" @on-choose-complete="onChooseComplete" :auto-upload="false" @delete="deletePic" name="1" :maxCount="5"></u-upload>
+					<u-upload action="#" multiple :fileList="fileList" @on-choose-complete="onChooseComplete"
+						:auto-upload="false" @delete="deletePic" name="1" :maxCount="5"></u-upload>
 				</u-form-item>
 				<u-form-item label="问题视频(不超过1个,50M以内)" prop="intro" :label-position="'top'">
 					<view class="uploadv" @click="onVideoChooseComplete" v-if="!form.video">
@@ -39,18 +46,23 @@
 						<view class="u-add-tips">选择视频</view>
 					</view>
 					<view class="uploadv" v-if="form.video">
-						<video class="u-add-btn" :src="form.video"></video>
-						<image class="u-add-img" src="@/static/index-delete.png" alt="" @click="delHandle"/>
+						<video class="u-add-btn" style="width: 100%;" :src="form.video"></video>
+						<image class="u-add-img" src="@/static/index-delete.png" alt="" @click="delHandle" />
 					</view>
 				</u-form-item>
 			</u-form>
 		</scroll-view>
-		<u-select :list="siteSelectList" v-model="siteSelectShow" value-name="stationCode" label-name="stationName" @confirm="siteSelectCallback"> </u-select>
-		<u-select :list="levelSelectList" v-model="levelSelectShow" value-name="dictValue" label-name="dictLabel" @confirm="levelSelectCallback"> </u-select>
-		<u-select :list="personSelectList" v-model="showPerson" value-name="userId" label-name="nickName" @confirm="personSelectCallback"> </u-select>
-		<u-select :list="nameSelectList" v-model="nameSelectShow" value-name="remark" label-name="dictLabel" @confirm="nameSelectCallback"> </u-select>
-		<u-picker v-model="show" mode="time" :params="params" end-year="2050" :defaultTime="defaultTime" @confirm="timeHandle"></u-picker>
-		<u-button type="primary" class="commit-button" @click="submiHandle" :disabled="isClick">上  报</u-button>
+		<u-select :list="siteSelectList" v-model="siteSelectShow" value-name="stationCode" label-name="stationName"
+			@confirm="siteSelectCallback"> </u-select>
+		<u-select :list="levelSelectList" v-model="levelSelectShow" value-name="dictValue" label-name="dictLabel"
+			@confirm="levelSelectCallback"> </u-select>
+		<u-select :list="personSelectList" v-model="showPerson" value-name="userId" label-name="nickName"
+			@confirm="personSelectCallback"> </u-select>
+		<u-select :list="nameSelectList" v-model="nameSelectShow" value-name="remark" label-name="dictLabel"
+			@confirm="nameSelectCallback"> </u-select>
+		<u-picker v-model="show" mode="time" :params="params" end-year="2050" :defaultTime="defaultTime"
+			@confirm="timeHandle"></u-picker>
+		<u-button type="primary" class="commit-button" @click="submiHandle" :disabled="isClick">上 报</u-button>
 	</view>
 </template>
 
@@ -80,7 +92,7 @@
 				},
 				//时间picker 默认值
 				params: {
-				    year: true,
+					year: true,
 					month: true,
 					day: true,
 					hour: true,
@@ -98,61 +110,46 @@
 				show: false,
 				//验证规则对象
 				rules: {
-					stationName: [
-						{ 
-							required: true, 
-							message: '请选择站点', 
-							// 可以单个或者同时写两个触发验证方式 
-							trigger: ['change','blur'],
-						}
-					],
-					deviceName: [
-						{
-							// min: 5, 
-							// message: '简介不能少于5个字', 
-							trigger: ['change','blur'],
-							message: '请选择设备名称',
-							required: true, 
-						}
-					],
-					sn: [
-						{
-							// min: 5, 
-							// message: '简介不能少于5个字', 
-							trigger: ['change','blur'],
-							message: '请选择输入设备编号',
-							required: true, 
-						}
-					],
-					levelText: 
-					[
-						{ 
-							required: true, 
-							message: '请选择故障等级', 
-							trigger: ['change','blur'],
-						}
-					],
-					occurrenceTime: [
-						{ 
-							required: true, 
-							message: '请选择发生时间', 
-							trigger: ['change','blur'],
-						}
-					],
-					problemTitle: [
-						{ 
-							required: true, 
-							message: '请输入问题描述', 
-							trigger: ['change','blur'],
-						}
-					],
-					deviceProblem: [
-						{
-							required: true, 
-							message: '请输入问题记录', 
-							trigger: ['change','blur'],
-						}
-					]
+					stationName: [{
+						required: true,
+						message: '请选择站点',
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change', 'blur'],
+					}],
+					deviceName: [{
+						// min: 5, 
+						// message: '简介不能少于5个字', 
+						trigger: ['change', 'blur'],
+						message: '请选择设备名称',
+						required: true,
+					}],
+					sn: [{
+						// min: 5, 
+						// message: '简介不能少于5个字', 
+						trigger: ['change', 'blur'],
+						message: '请选择输入设备编号',
+						required: true,
+					}],
+					levelText: [{
+						required: true,
+						message: '请选择故障等级',
+						trigger: ['change', 'blur'],
+					}],
+					occurrenceTime: [{
+						required: true,
+						message: '请选择发生时间',
+						trigger: ['change', 'blur'],
+					}],
+					problemTitle: [{
+						required: true,
+						message: '请输入问题描述',
+						trigger: ['change', 'blur'],
+					}],
+					deviceProblem: [{
+						required: true,
+						message: '请输入问题记录',
+						trigger: ['change', 'blur'],
+					}]
 				},
 				//是否显示站点弹窗
 				siteSelectShow: false,
@@ -176,10 +173,9 @@
 			}
 		},
 		computed: {
-			
-		},
-		mounted() {
+
 		},
+		mounted() {},
 		// 获取系统默认时间
 		onLoad() {
 			var date = new Date(),
@@ -195,7 +191,7 @@
 			this.defaultTime = timer
 		},
 		onReady() {
-		  this.$refs.uform.setRules(this.rules);
+			this.$refs.uform.setRules(this.rules);
 		},
 		mounted() {
 			this.getSites();
@@ -208,7 +204,7 @@
 				this.datalist = [];
 				this.$http.getHasStationCodeAndName().then(res => {
 					uni.hideLoading();
-					if(res.code == 200) {
+					if (res.code == 200) {
 						this.siteSelectList = res.data || [];
 					} else {
 						this.$utils.msg(res.msg);
@@ -242,11 +238,12 @@
 			},
 			//时间选择
 			timeHandle(data) {
-				this.form.occurrenceTime = data.year + '-' + data.month + '-' + data.day + ' ' + data.hour + ':' + data.minute + ':00';
+				this.form.occurrenceTime = data.year + '-' + data.month + '-' + data.day + ' ' + data.hour + ':' + data
+					.minute + ':00';
 			},
 			//打开人员选择
 			personHandle() {
-				if(!this.form.stationCode) {
+				if (!this.form.stationCode) {
 					return uni.showToast({
 						title: '请先选择站点'
 					})
@@ -259,7 +256,7 @@
 				_that.nameSelectList = [];
 				_that.$http.getDictType('device_name').then(res => {
 					uni.hideLoading();
-					if(res.code == 200) {
+					if (res.code == 200) {
 						let list = res.data || [];
 						_that.nameSelectList = list;
 					} else {
@@ -273,7 +270,7 @@
 				_that.levelSelectList = [];
 				_that.$http.getDictType('order_level').then(res => {
 					uni.hideLoading();
-					if(res.code == 200) {
+					if (res.code == 200) {
 						let list = res.data || [];
 						_that.levelSelectList = list;
 					} else {
@@ -287,16 +284,16 @@
 				_that.personSelectList = [];
 				let userinfo = uni.getStorageSync('user')
 				let user = null
-				if(userinfo) {
+				if (userinfo) {
 					user = JSON.parse(userinfo)
 				}
 				_that.$http.getUserListByStationCode(code).then(res => {
 					uni.hideLoading();
-					if(res.code == 200) {
+					if (res.code == 200) {
 						let list = res.data || [];
-						if(list && list.length > 0) {
+						if (list && list.length > 0) {
 							list.forEach(item => {
-								if(user.userId != item.userId) {
+								if (user.userId != item.userId) {
 									_that.personSelectList.push(item);
 								}
 							})
@@ -311,7 +308,7 @@
 				let _that = this;
 				_that.isClick = true;
 				let form = _that.form;
-				if(form.img && form.img.length > 0) {
+				if (form.img && form.img.length > 0) {
 					form.attachment = form.img.join(',')
 				}
 				_that.$refs.uform.validate(valid => {
@@ -321,7 +318,7 @@
 					}
 					_that.$http.addOrder(form).then(res => {
 						_that.isClick = false;
-						if(res.code == 200) {
+						if (res.code == 200) {
 							uni.showToast({
 								title: '上报成功',
 								icon: 'success',
@@ -352,7 +349,7 @@
 						header: {
 							"Authorization": `${uni.getStorageSync("token")}`
 						},
-							//	这个res是后端返回给你上传成功的数据里边一般会有上传之后图片的在线路径
+						//	这个res是后端返回给你上传成功的数据里边一般会有上传之后图片的在线路径
 						success: (res) => {
 							let data = JSON.parse(res.data)
 							_that.form.img.push(data.msg)
@@ -365,9 +362,9 @@
 				const _that = this;
 				uni.chooseVideo({
 					sourceType: ['album', 'camera'],
-				    success: (chooseImageRes) => {
-				        const tempFilePaths = chooseImageRes.tempFilePath;
-						if( chooseImageRes.size >= 52428800 ) {
+					success: (chooseImageRes) => {
+						const tempFilePaths = chooseImageRes.tempFilePath;
+						if (chooseImageRes.size >= 52428800) {
 							uni.showToast({
 								title: '不能超过50M',
 								icon: 'none',
@@ -379,23 +376,23 @@
 							title: '视频上传中...'
 						})
 						uni.uploadFile({
-						    url: 'https://tess.fast-fun.cn/zl/mini/file/upload',
-						    filePath: tempFilePaths,
-						    name: 'file',
+							url: 'https://tess.fast-fun.cn/zl/mini/file/upload',
+							filePath: tempFilePaths,
+							name: 'file',
 							method: 'post',
-						    formData: {
-						        "Authorization": `${uni.getStorageSync("token")}`
-						    },
-						    success: (uploadFileRes) => {
+							formData: {
+								"Authorization": `${uni.getStorageSync("token")}`
+							},
+							success: (uploadFileRes) => {
 								let data = JSON.parse(uploadFileRes.data)
 								_that.form.video = data.msg;
 								uni.hideLoading();
-						    },
+							},
 							fail: () => {
 								uni.hideLoading();
 							}
 						});
-				    }
+					}
 				});
 			},
 			//删除视频
@@ -403,9 +400,9 @@
 				let _that = this;
 				uni.showModal({
 					title: '提示',
-					content:'确定删除该视频文件吗?',
+					content: '确定删除该视频文件吗?',
 					success: (res) => {
-						if(res.confirm) {
+						if (res.confirm) {
 							_that.form.video = null
 						} else {
 							return
@@ -425,6 +422,7 @@
 		padding-bottom: calc(80rpx + env(safe-area-inset-bottom));
 		background-color: #FFFFFF;
 		padding: 0 30rpx;
+
 		.content {
 			height: calc(100vh - 200rpx - env(safe-area-inset-bottom));
 			margin-bottom: 30rpx;
@@ -441,16 +439,19 @@
 			color: #BFBDBD;
 			padding-left: 30rpx;
 			margin: 0 -30rpx;
+
 			.order-imp {
 				margin-right: 5rpx;
 			}
 		}
+
 		.commit-button {
 			position: fixed;
 			width: calc(100% - 60rpx);
 			bottom: calc(20rpx + env(safe-area-inset-bottom));
 			z-index: 999;
 		}
+
 		.uploadv {
 			width: 208rpx;
 			height: 208rpx;
@@ -465,10 +466,12 @@
 			display: flex;
 			align-items: center;
 			justify-content: center;
+
 			.u-add-tips {
 				margin-top: 20rpx;
 				line-height: 20rpx;
 			}
+
 			.u-add-img {
 				width: 50rpx;
 				height: 50rpx;
@@ -476,14 +479,17 @@
 				top: 10rpx;
 				right: 15rpx;
 			}
+
 			.img {
 				width: 60%;
 				height: 60%;
+
 				image {
 					height: 100%;
 					width: 100%;
 				}
 			}
+
 			.u-delete-icon {
 				position: absolute;
 				top: 10rpx;

+ 31 - 16
pages/index/supplierDetail.vue

@@ -9,16 +9,17 @@
 					{{detailData.contactName || '-'}}
 				</view>
 			</view>
-			<view class="supplier-detail-tel">
+			<view class="supplier-detail-tel" @click="makeOhoneHandle">
+				<u-icon name="phone"></u-icon>
 				{{detailData.contactPhone || '-'}}
 			</view>
 		</view>
 		<view class="supplier-detail-basic">
-			<view class="supplier-detail-telphone" @click="makeOhoneHandle">
+			<!-- <view class="supplier-detail-telphone" @click="makeOhoneHandle">
 				<u-icon name="phone"></u-icon>
 				<span style="margin-left: 10rpx;">{{detailData.contactPhone || '-'}}</span>
-			</view>
-			<view class="supplier-detail-address" @click="getLocalHandle">
+			</view> -->
+			<view class="supplier-detail-address">
 				<u-icon name="map"></u-icon>
 				<span style="margin-left: 10rpx;">{{detailData.address || '-'}}</span>
 			</view>
@@ -32,7 +33,8 @@
 				附件
 			</view>
 			<view class="supp-detail-annex-text">
-				<image :src="img" v-for="(img, i) in detailData.urls" :key="i" class="supp-detail-annex-img" @click="imageHandle(i)"></image>
+				<image :src="img" v-for="(img, i) in detailData.urls" :key="i" class="supp-detail-annex-img"
+					@click="imageHandle(i)"></image>
 			</view>
 		</view>
 	</view>
@@ -40,26 +42,26 @@
 
 <script>
 	export default {
-	  data() {
-	    return {
-			detailData: {},
-	    }
-	  },
+		data() {
+			return {
+				detailData: {},
+			}
+		},
 		//第一次加载
 		onLoad(options) {
 			let data = decodeURIComponent(options.dataInfo)
 			let detailData = JSON.parse(data)
-			if(detailData.attachment) {
+			if (detailData.attachment) {
 				detailData.urls = detailData.attachment.split(',')
 			}
 			this.detailData = detailData
 		},
-	   onReady() {
-	        
-	    },
+		onReady() {
+
+		},
 		//页面显示
 		onShow() {
-	
+
 		},
 		methods: {
 			//拨打电话
@@ -93,7 +95,7 @@
 					current: _that.detailData.urls[data]
 				})
 			},
-		}	
+		}
 	}
 </script>
 
@@ -105,14 +107,17 @@
 		background: $uni-bg-color;
 		padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
 		padding-top: 30rpx;
+
 		.supp-detail-info {
 			height: 160rpx;
 			background: #FFFFFF;
 			border-radius: 16rpx 16rpx 16rpx 16rpx;
 			margin: 0 30rpx 30rpx;
 			padding: 30rpx;
+
 			.supplier-detail-title {
 				display: flex;
+
 				.supplier-detail-title-text {
 					flex: 1;
 					font-size: 30rpx;
@@ -121,6 +126,7 @@
 					color: #1D2129;
 					line-height: 44rpx;
 				}
+
 				.supplier-detail-title-contacts {
 					font-size: 30rpx;
 					font-family: PingFang SC-Regular, PingFang SC;
@@ -130,6 +136,7 @@
 					text-align: right;
 				}
 			}
+
 			.supplier-detail-tel {
 				text-align: right;
 				font-size: 26rpx;
@@ -140,11 +147,13 @@
 				margin-top: 20rpx;
 			}
 		}
+
 		.supplier-detail-basic {
 			background: #FFFFFF;
 			border-radius: 16rpx 16rpx 16rpx 16rpx;
 			margin: 0 30rpx 30rpx;
 			padding: 30rpx;
+
 			.supplier-detail-telphone {
 				font-size: 30rpx;
 				font-family: PingFang SC-Regular, PingFang SC;
@@ -152,6 +161,7 @@
 				color: #1D2129;
 				line-height: 44rpx;
 			}
+
 			.supplier-detail-address {
 				font-size: 30rpx;
 				font-family: PingFang SC-Regular, PingFang SC;
@@ -160,6 +170,7 @@
 				line-height: 44rpx;
 				margin-top: 20rpx;
 			}
+
 			.supp-detail-scope-title {
 				font-size: 30rpx;
 				font-family: PingFang SC-Regular, PingFang SC;
@@ -168,6 +179,7 @@
 				line-height: 44rpx;
 				margin-top: 20rpx;
 			}
+
 			.supp-detail-scope-text {
 				font-size: 30rpx;
 				font-family: PingFang SC-Regular, PingFang SC;
@@ -176,6 +188,7 @@
 				line-height: 44rpx;
 				margin-top: 10rpx;
 			}
+
 			.supp-detail-annex-title {
 				font-size: 30rpx;
 				font-family: PingFang SC-Regular, PingFang SC;
@@ -184,11 +197,13 @@
 				line-height: 44rpx;
 				margin-top: 20rpx;
 			}
+
 			.supp-detail-annex-text {
 				display: flex;
 				margin-top: 20rpx;
 				width: 100%;
 				flex-wrap: wrap;
+
 				.supp-detail-annex-img {
 					width: 120rpx;
 					height: 120rpx;

+ 25 - 4
pages/ucenter/mineNotes.vue

@@ -19,7 +19,7 @@
 							{{order.problemTitle || '-'}}
 						</view>
 						<view class="order-status">
-							{{order.status == 0 ? '未处理' : (order.status == 1 ? '处理中' : '已完结')}}
+							{{order.statusText || '-'}}
 						</view>
 					</view>
 					<view class="order-time">
@@ -169,10 +169,31 @@
 				_that.$http.getOrderLogList(_that.formData).then(res => {
 					uni.hideLoading();
 					if(res.code == 200) {
+						let userinfo = uni.getStorageSync('user')
+						let user = null
+						if(userinfo) {
+							user = JSON.parse(userinfo)
+						}
 						if (_that.formData.pageIndex == 1) _that.orderlist = [];
-						 _that.pageTotal = res.data.total;
-						 _that.orderlist = _that.orderlist.concat(res.data.list);
-						 _that.noMore = false;
+						_that.pageTotal = res.data.total;
+						let orderlist = res.data.list || []
+						if(orderlist && orderlist.length > 0) {
+							orderlist.forEach(item => {
+								if(item.status == 0) {
+								 	item.statusText = '未处理';
+								} else if(item.status == 1) {
+								 	if(user.userId == item.currentPerson) {
+										item.statusText = '待处理';
+								 	} else {
+										item.statusText = '处理中';
+								 	}
+								} else {
+								 	item.statusText = '已完结';
+								}
+							})
+						}
+						_that.orderlist = _that.orderlist.concat(orderlist);
+						_that.noMore = false;
 					} else {
 						_that.$utils.msg(res.msg);
 					}