wangxin 1 년 전
부모
커밋
bdb470c1ca
2개의 변경된 파일21개의 추가작업 그리고 5개의 파일을 삭제
  1. 18 1
      pages/outsourcedInspection/index.vue
  2. 3 4
      pages/processInspection/index.vue

+ 18 - 1
pages/outsourcedInspection/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="page-container uni-column">
 		<view class="search-container uni-row">
-			<input type="text" v-model="keywords" placeholder="请输入关键字" />
+			<input type="text" v-model="quer.keyword" placeholder="请输入关键字" />
 			<view class="btn uni-row" @click="getList">搜索</view>
 			<!-- <uni-icons type="scan" size="24" /> -->
 		</view>
@@ -110,6 +110,23 @@
 	})
 
 	/***************************** 定义了一些方法 *****************************/
+	function getList() {
+		uni.showLoading({
+			title: '加载中'
+		});
+		quer.value.userId = store.userInfo.userId;
+		// quer.value.startTime = startTime.value;
+		getOutsourcedInspection(quer.value).then(res => {
+			console.log("res", res);
+			if (res.code == 200) {
+				original.value = res.rows;
+				timeSizer();
+				uni.hideLoading();
+				// uni.hideLoading();
+			}
+		});
+	}
+
 	//查询P2中外协完成后需要检查的工序
 	function getP2() {
 		let token = 'Bearer ' + getToken();

+ 3 - 4
pages/processInspection/index.vue

@@ -1,14 +1,14 @@
 <template>
 	<view class="page-container uni-column">
 		<view class="search-container uni-row">
-			<input type="text" v-model="keywords" placeholder="请输入关键字" />
+			<input type="text" v-model="quer.keyword" placeholder="请输入关键字" />
 			<view class="btn uni-row" @click="getList">搜索</view>
 			<!-- <uni-icons type="scan" size="24" /> -->
 		</view>
 
 		<view class="time-controls" style="margin-top: 10rpx;">
 			<uni-section title="检查日期:" type="square" class="uni-row sta">
-				<input v-model="startTime" type="date" @input="timeSizer" />
+				<input v-model="quer.startTime" type="date" @input="timeSizer" />
 			</uni-section>
 		</view>
 
@@ -63,7 +63,7 @@
 	import {
 		store
 	} from '@/store/index.js'
-	const keywords = ref('')
+	const keyword = ref('')
 	const inspecionList = ref([]); //时间后筛选数组
 	const original = ref([]); //原始数组
 	const startTime = ref(new Date().toISOString().split('T')[0])
@@ -92,7 +92,6 @@
 			title: '加载中'
 		});
 		quer.value.userId = store.userInfo.userId;
-		// quer.value.startTime = startTime.value;
 		getProcessInspecionList(quer.value).then(res => {
 			console.log("res", res);
 			if (res.code == 200) {