2 Commits 3eb13be828 ... cdc03892d6

Tác giả SHA1 Thông báo Ngày
  wangxy cdc03892d6 客户页面 1 ngày trước cách đây
  wangxy d4096547c7 客户页面 1 ngày trước cách đây

+ 5 - 1
components/dialog/commonDialog.vue

@@ -6,7 +6,7 @@
 			<view class="common-title">{{title}}</view>
 			<view class="common-content" :class="dialogContentClass">{{content}}</view>
 			<view class="common-btn-box">
-				<view class="not-confirm-btn" @click="handleClose">{{notBtn}}</view>
+				<view class="not-confirm-btn" v-if="showQuxiao" @click="handleClose">{{notBtn}}</view>
 				<view class="confirm-btn" @click="confirmBtn">{{okBtn}}</view>
 			</view>
 		</view>
@@ -31,6 +31,10 @@
 	  	require: true,
 	    default: 'content-center-class'
 	  },
+	  showQuxiao: {
+		  type: Boolean,
+		  default: true
+	  },
 	  notBtn: {
 	    type: String,
 	  	require: true,

+ 6 - 1
pages/admin/Hetong/components/search.vue

@@ -125,10 +125,15 @@
 		searchInput.value = '';
 		$emit('reset-search');
 	}
+	
+	function handleSetValue(value) {
+		searchInput.value = value
+	}
 
 
 	defineExpose({
 		handleShow,
-		handleClose
+		handleClose,
+		handleSetValue
 	})
 </script>

+ 26 - 2
pages/admin/Hetong/sanfangHetong.vue

@@ -28,7 +28,7 @@
 		</view>
 
 		<view>
-			<search-dialog ref="searchDialogRef" @search-btn="dialogSearchBtn"
+			<search-dialog ref="searchDialogRef" :shenfen="shenfen" @search-btn="dialogSearchBtn"
 				@reset-search="dialogSearchReset"></search-dialog>
 		</view>
 
@@ -94,6 +94,7 @@
 		nextTick
 	} from "vue";
 	import {
+		onShow,
 		onLoad
 	} from "@dcloudio/uni-app";
 	import * as httpApi from "@/api/sanfang.js"
@@ -130,7 +131,7 @@
 			status: 3,
 		}
 	])
-
+	const shenfen = ref(null);
 
 	function toggle() {
 		searchDialogRef.value.handleShow();
@@ -246,6 +247,29 @@
 	}
 
 	onLoad((options) => {
+		console.log('options', options)
+		const {
+			from,
+			jzName,
+			khName
+		} = options;
+		if (jzName) {
+			data.jzRealName = jzName;
+			shenfen.value = 'jz'
+			nextTick(() => {
+				searchDialogRef.value.handleSetValue(jzName)
+			})
+		}
+		if (khName) {
+			data.khRealName = khName
+			shenfen.value = 'kh'
+			nextTick(() => {
+				searchDialogRef.value.handleSetValue(khName)
+			})
+		}
+	})
+
+	onShow(() => {
 		getMore()
 	})
 </script>