From c3b2d6d35b77d11ff86d45926501493b7fc8886e Mon Sep 17 00:00:00 2001
From: wjt <1797368093@qq.com>
Date: 星期二, 23 七月 2024 10:30:20 +0800
Subject: [PATCH] 新功能添加

---
 qiye/complaint/complaint.vue |  100 +++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 83 insertions(+), 17 deletions(-)

diff --git a/qiye/complaint/complaint.vue b/qiye/complaint/complaint.vue
index a9b360e..743ae5b 100644
--- a/qiye/complaint/complaint.vue
+++ b/qiye/complaint/complaint.vue
@@ -5,31 +5,52 @@
 				<u-search placeholder="璇疯緭鍏�" @search="search" @blur="search" shape="square" :showAction="false"></u-search>
 			</view>
 			<view class="border"></view>
-			<u-tabs :list="list1" @click="click" :current="current" :scrollable="false" bgColor="white"></u-tabs>
+			<u-tabs :list="list" @change="click" :current="current" :scrollable="false" bgColor="white"></u-tabs>
 		</u-sticky>
-		<view class="item">
+		<view class="item" v-for="(item,index) in list1">
 			<img src="/static/i05.png" class="img" alt="" />
 			<view class="right">
 				<view class="name">
 					<view class="l">
-						鍖椾含灏氱瓥浜掑姩绉戞妧鏈夐檺鍏徃鍖椾含灏氱瓥浜掑姩绉戞妧鏈夐檺鍏徃鍖椾含灏氱瓥浜掑姩绉戞妧鏈夐檺鍏徃鍖椾含灏氱瓥浜掑姩绉戞妧鏈夐檺鍏徃鍖椾含灏氱瓥浜掑姩绉戞妧鏈夐檺鍏徃
+						{{item.companyName}}
 					</view>
-					<view class="r color1">
+					<template v-if="item.complaintStatus==0">
+						<view class="r color2">
+							寰呭搷搴�
+						</view>
+					</template>
+					<template v-if="item.complaintStatus==1">
+						<view class="r color1">
+							澶勭悊涓�
+						</view>
+					</template>
+					<template v-if="item.complaintStatus==2">
+						<view class="r color3">
+							宸插姙缁�
+						</view>
+					</template>
+					<!-- <view class="r color1">
 						寰呰瘎浠�
-					</view>
+					</view> -->
+					<template v-if="item.complaintStatus==-1">
+						<view class="r color4">
+							宸查┏鍥�
+						</view>
+					</template>
 				</view>
 				<view class="box">
 					<view class="l">
-						<p>鎵ф硶鍗曚綅锛氬啘涓氬啘鏉戝眬</p>
-						<p>鎵ф硶鏃堕棿锛�2024-06-03 12:30:67</p>
+						<p style="align-items: flex-start;display: flex;justify-content: flex-start;"><text style="display: inline-block;width: 35%;">鎵ф硶鍗曚綅锛�</text> <text style="display: inline-block;width: 65%;">{{item.executeDeptName}}</text></p>
+						<p>鎶曡瘔鏃堕棿锛� {{item.complaintTime}}</p>
 					</view>
-					<view class="r">
+					<view class="r" @click="chakan(item.id, item.orderId)">
 						鍘绘煡鐪�
 					</view>
 				</view>
 			</view>
 		</view>
-		<view class="item">
+		<u-empty v-if="!list1.length"></u-empty>
+		<!-- <view class="item">
 			<img src="/static/i05.png" class="img" alt="" />
 			<view class="right">
 				<view class="name">
@@ -72,37 +93,79 @@
 					</view>
 				</view>
 			</view>
-		</view>
+		</view> -->
 		<view style="height: 50rpx;"></view>
 		
 	</view>
 </template>
 
 <script>
+	import { complaintList } from '@/api/qiye.js'
+	
 	export default {
 		data() {
 			return {
 				current: 0,
-				list1: [{
+				list: [{
 					name: '鍏ㄩ儴',
 					value: ''
 				}, {
 					name: '寰呭搷搴�',
-					value: 1
+					value: 0
 				}, {
 					name: '澶勭悊涓�',
-					value: 2
+					value: 1
 				}, {
 					name: '宸插姙缁�',
-					value: 3
+					value: 2
 				}],
+				list1:[],
+				queryParams: {
+					pageNum: 1,
+					pageSize: 10,
+					companyId:'',
+				},
+				total: 1,
 			}
 		},
+		onLoad() {
+			this.list1 = []
+			this.queryParams.pageNum = 1
+			this.getList()
+		},
+		onReachBottom() {
+			if(this.list1.length == this.total) {
+				return
+			}
+			this.queryParams.pageNum++
+			this.getList()
+		},
 		methods: {
+			chakan(id,orderId){
+				uni.navigateTo({
+					url: `/qiye/complaint/details?id=${id}&orderId=${orderId}`
+				})
+			},
+			getList() {
+				let data = uni.getStorageSync("qiyedata")
+				this.queryParams.companyId = data.companyId
+				complaintList({...this.queryParams}).then(val => {
+					this.total = val.data.total
+					this.list1 = [...this.list1,...val.data.rows]
+				})
+			},
 			search(e){
-				// this.queryParams.pageNum =1
-				// this.queryParams.companyName = e
-				// this.orderList()
+				this.list1 = []
+				this.queryParams.pageNum =1
+				this.queryParams.companyName = e
+				this.getList()
+			},
+			click(i) {
+				this.list1 = []
+				this.queryParams.pageNum = 1
+				this.queryParams.complaintStatus = this.list[i.index].value
+				
+				this.getList()
 			}
 		}
 	}
@@ -186,4 +249,7 @@
 		color: #3EB47A;
 		
 	}
+	.color4{
+		color: gray;
+	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.1