wsx il y a 11 mois
Parent
commit
a334856897
1 fichiers modifiés avec 32 ajouts et 10 suppressions
  1. 32 10
      pages/salesServiceManagement/demandList/index.vue

+ 32 - 10
pages/salesServiceManagement/demandList/index.vue

@@ -5,7 +5,8 @@
 		</uni-nav-bar>
 		<view class="top-wrapper">
 			<uni-section>
-				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="searchVal" placeholder="关键字">
+				<uni-easyinput @clear="clearSearch" prefixIcon="search" style="width: 460rpx" v-model="searchVal"
+					placeholder="关键字">
 				</uni-easyinput>
 			</uni-section>
 			<button class="search_btn" @click="doSearch">搜索</button>
@@ -55,7 +56,7 @@
 				</form>
 			</view>
 		</uni-popup>
-		<Screen ref="screen" @succeed="doSearch" />
+		<!-- <Screen ref="screen" @succeed="doSearch" /> -->
 		<u-toast ref="uToast"></u-toast>
 
 	</view>
@@ -72,6 +73,7 @@
 	export default {
 		components: {
 			myCard,
+			Screen
 		},
 
 		data() {
@@ -166,7 +168,13 @@
 						prop: 'contactName'
 					}, {
 						label: '故障等级:',
-						prop: 'faultLevel'
+						prop: 'faultLevel',
+						formatter(row) {
+							let cellValue = row.faultLevel;
+							return cellValue == 1 ?
+								'紧急' : cellValue == 2 ? '一般' : ''
+
+						}
 					}],
 					[{
 						label: '创建人:',
@@ -208,12 +216,15 @@
 
 		},
 
-		onShow() {
-			this.isEnd = false
-			this.page = 1
+		onReachBottom() {
+			console.log('123');
 			this.getList()
 		},
 
+		onShow() {
+			this.doSearch();
+		},
+
 		methods: {
 			handleSearch() {
 				this.$refs.screen.open();
@@ -226,6 +237,10 @@
 			//获取列表信息
 			getList() {
 				if (this.isEnd) {
+					this.$refs.uToast.show({
+						message: "暂无更多数据",
+						duration: 1000
+					})
 					return
 				}
 				uni.showLoading({
@@ -235,6 +250,7 @@
 					pageNum: this.page,
 					size: this.size,
 					type: 1,
+					keyWord: this.searchVal
 				}
 				getTableList(data).then(res => {
 					if (this.page === 1) {
@@ -291,7 +307,7 @@
 				}
 				this.getList();
 			},
-			async del(item) {
+			async del(row) {
 				const res = await uni.showModal({
 					title: '确认删除',
 					content: '确定要删除该条数据吗?',
@@ -320,12 +336,16 @@
 				// })
 			},
 
-			handleAudit(item) { 
-				console.log(item,'iitem --')
-				uni.navigateTo({ 
+			handleAudit(item) {
+				console.log(item, 'iitem --')
+				uni.navigateTo({
 					url: `/pages/salesServiceManagement/demandList/components/submission?id=${item.id}`
 				})
 			},
+			clearSearch() {
+				this.searchVal = ''
+				this.doSearch()
+			}
 		}
 	}
 </script>
@@ -344,6 +364,8 @@
 		justify-content: center;
 	}
 
+	.wrapper {}
+
 	.top-wrapper {
 		background-color: #fff;
 		display: flex;