zs hace 2 años
padre
commit
c38540879e
Se han modificado 1 ficheros con 29 adiciones y 6 borrados
  1. 29 6
      pagesMy/dough/handle.vue

+ 29 - 6
pagesMy/dough/handle.vue

@@ -2,7 +2,12 @@
 	<mobile-frame>
 		<view class="main">
 			<view class="one">
-				<button size="mini" @tap="toDislog">查询条件</button>
+				<view class="one_1">
+					<input type="text" v-model="searchInfo.customer_name" @input="toInput" placeholder="搜索购买者名称">
+				</view>
+				<view class="one_2">
+					<button size="mini" @tap="toDislog">筛选</button>
+				</view>
 			</view>
 			<view class="two">
 				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
@@ -73,9 +78,6 @@
 			<view class="dialog" v-if="dialog.show==true">
 				<view class="dialog_1" v-if="dialog.type=='1'">
 					<uni-forms ref="form" :modelValue="searchInfo" :rules="rules" label-width="auto">
-						<uni-forms-item label="购买者" name="customer_name">
-							<uni-easyinput type="text" v-model="searchInfo.customer_name" placeholder="请输入购买者姓名" />
-						</uni-forms-item>
 						<uni-forms-item label="状态" name="status">
 							<picker class="picker" mode="selector" :range="statusList" @change="statusChange"
 								range-key="label">
@@ -399,6 +401,14 @@
 				});
 				if (res.errcode == '0') that.$set(that, `reasonList`, res.data)
 			},
+			// 输入框
+			toInput(e) {
+				const that = this;
+				if (that.searchInfo.customer_name) that.$set(that.searchInfo, `customer_name`, e.detail.value)
+				else that.$set(that, `searchInfo`, {})
+				that.clearPage();
+				that.search();
+			},
 			// 清空列表
 			clearPage() {
 				const that = this;
@@ -420,9 +430,22 @@
 		height: 100vh;
 
 		.one {
+			display: flex;
+			justify-content: center;
+			align-items: center;
 			padding: 2vw;
-			text-align: center;
-
+			
+			.one_1 {
+				padding: 0 2vw;
+				width: 75vw;
+			
+				input {
+					padding: 2vw;
+					background-color: var(--f1Color);
+					font-size: var(--font14Size);
+					border-radius: 5px;
+				}
+			}
 			button {
 				background-color: #23B67A;
 				color: #ffffff;