zs 2 år sedan
förälder
incheckning
386d76d5de
2 ändrade filer med 105 tillägg och 12 borttagningar
  1. 104 11
      pagesMy/dough/handle.vue
  2. 1 1
      pagesMy/dough/index.vue

+ 104 - 11
pagesMy/dough/handle.vue

@@ -2,7 +2,7 @@
 	<mobile-frame>
 		<view class="main">
 			<view class="one">
-				<input type="text" v-model="searchInfo.customer" @input="toInput" placeholder="搜索购买用户名称">
+				<button size="mini" @tap="toDislog">查询条件</button>
 			</view>
 			<view class="two">
 				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
@@ -77,6 +77,25 @@
 					</view>
 				</scroll-view>
 			</view>
+			<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">
+							<uni-easyinput type="text" v-model="searchInfo.customer" placeholder="请输入购买者姓名" />
+						</uni-forms-item>
+						<uni-forms-item label="状态" name="status">
+							<picker class="picker" mode="selector" :range="statusList" @change="statusChange"
+								range-key="label">
+								<view>{{status_name||'请选择状态'}}</view>
+							</picker>
+						</uni-forms-item>
+					</uni-forms>
+					<view class="btn">
+						<button type="primary" @click="onSubmit" size="mini">确定</button>
+						<button type="primary" @click="dialogClose" size="mini">取消</button>
+					</view>
+				</view>
+			</view>
 		</view>
 	</mobile-frame>
 </template>
@@ -101,7 +120,13 @@
 				is_bottom: false,
 				scrollTop: 0,
 				// 字典表
-				statusList: []
+				statusList: [],
+				status_name: "",
+				// 条件弹出框
+				dialog: {
+					show: false,
+					type: '1'
+				}
 			};
 		},
 		onLoad: function(e) {
@@ -216,13 +241,44 @@
 				let num = Math.sign(up - e.detail.scrollTop);
 				if (num == 1) that.$set(that, `is_bottom`, false);
 			},
-			// 输入框
-			toInput(e) {
+			// 查询条件
+			toDislog() {
+				const that = this;
+				that.$set(that, `searchInfo`, {})
+				that.$set(that, `status_name`, '')
+				that.$set(that, `dialog`, {
+					show: true,
+					type: '1'
+				})
+			},
+			// 状态选择
+			statusChange(e) {
+				const that = this;
+				let data = that.statusList[e.detail.value];
+				if (data) {
+					that.$set(that.searchInfo, `status`, data.value);
+					that.$set(that, `status_name`, data.label);
+				}
+			},
+			// 关闭弹框
+			dialogClose() {
 				const that = this;
-				if (that.searchInfo.customer) that.$set(that.searchInfo, `customer`, e.detail.value)
-				else that.$set(that, `searchInfo`, {})
 				that.clearPage();
 				that.search();
+				that.$set(that, `dialog`, {
+					show: false,
+					type: '1'
+				})
+			},
+			// 查询
+			onSubmit() {
+				const that = this;
+				that.clearPage();
+				that.search();
+				that.$set(that, `dialog`, {
+					show: false,
+					type: '1'
+				})
 			},
 			// 订单详细信息
 			toInfo(item) {
@@ -451,12 +507,11 @@
 
 		.one {
 			padding: 2vw;
+			text-align: center;
 
-			input {
-				padding: 2vw;
-				background-color: var(--f1Color);
-				font-size: var(--font14Size);
-				border-radius: 5px;
+			button {
+				background-color: #23B67A;
+				color: #ffffff;
 			}
 		}
 
@@ -562,6 +617,44 @@
 		}
 	}
 
+	.dialog {
+		position: fixed;
+		width: 96vw;
+		height: 100vh;
+		background-color: #ffffff;
+		z-index: 99999;
+		display: flex;
+		flex-direction: column;
+		padding: 2vw;
+
+		.uni-input {
+			border: #f1f1ff 1px solid;
+			padding: 2vw 2vw;
+			border-radius: 1vw;
+		}
+
+		.picker {
+			border: 1px solid #3333;
+			border-radius: 5px;
+			padding: 2vw;
+		}
+
+		.btn {
+			text-align: center;
+
+			button {
+				margin: 0 2vw 2vw 2vw;
+				background-color: #23B67A;
+				color: #ffffff;
+			}
+
+			.name {
+				color: var(--f85Color);
+				font-size: var(--font14Size);
+			}
+		}
+	}
+
 	.scroll-view {
 		position: absolute;
 		top: 0;

+ 1 - 1
pagesMy/dough/index.vue

@@ -175,7 +175,7 @@
 			<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 v-if="tabs.active!='-1'" label="商品名称查询" name="goods">
+						<uni-forms-item v-if="tabs.active=='0'" label="商品名称查询" name="goods">
 							<uni-easyinput type="text" v-model="searchInfo.goods" placeholder="请输入商品名称" />
 						</uni-forms-item>
 						<uni-forms-item label="状态" name="status">