wangxin 1 рік тому
батько
коміт
c73f0f1317

+ 11 - 0
api/business/processInspection.js

@@ -12,6 +12,17 @@ export function getProcessInspecionList(data) {
 	})
 }
 
+/**
+ * 查询用户序检信息
+ * @param userId
+ */
+export function getOutsourcedInspection(data) {
+	return req.request({
+		url: '/business/inspecion/outsourcedlist',
+		method: 'post',
+		data: data
+	})
+}
 
 
 /**

+ 2 - 1
pages/outsourcedInspection/form.vue

@@ -252,7 +252,8 @@
 	function endWork() {
 		let unf = unfitInfos.value;
 		for (var i = 0; i < unfitInfos.value.length; i++) {
-			if (!unf.checkStandard && !unf.checkResult && !unf.rejectNum) {
+			console.log("废品信息");
+			if (!unf[i].checkStandard && !unf[i].checkResult && !unf[i].rejectNum) {
 				uni.showToast({
 					icon: 'none',
 					title: "废品信息不能为空",

+ 2 - 2
pages/outsourcedInspection/index.vue

@@ -48,7 +48,7 @@
 		ref
 	} from 'vue'
 	import {
-		getProcessInspecionList,
+		getOutsourcedInspection,
 		getLotInfo
 	} from '@/api/business/processInspection.js'
 	import {
@@ -97,7 +97,7 @@
 		});
 		quer.value.userId = store.userInfo.userId;
 		getP2();
-		getProcessInspecionList(quer.value).then(res => {
+		getOutsourcedInspection(quer.value).then(res => {
 			console.log("res", res);
 			if (res.code == 200) {
 				original.value = res.rows;

+ 31 - 3
pages/processInspection/index.vue

@@ -87,11 +87,12 @@
 
 	/***************************** 页面生命周期函数 *****************************/
 	onShow(() => {
+		// getList()
 		uni.showLoading({
 			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) {
@@ -100,15 +101,42 @@
 				uni.hideLoading();
 				// uni.hideLoading();
 			}
-
 		});
 	})
 
 	/***************************** 定义了一些方法 *****************************/
 
+	function getList() {
+		uni.showLoading({
+			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) {
+				original.value = res.rows;
+				timeSizer();
+				uni.hideLoading();
+				// uni.hideLoading();
+			}
+		});
+	}
 
-	//时间筛选
+	//时间筛选,暂时注释,使用搜索向
 	function timeSizer() {
+		// quer.value.startTime = startTime.value;
+		// 显示加载指示器
+		// uni.showLoading();
+		// getProcessInspecionList(quer.value).then(res => {
+		// 	console.log("res", res);
+		// 	if (res.code == 200) {
+		// 		original.value = res.rows;
+		// 		timeSizer();
+		// 		uni.hideLoading();
+		// 		// uni.hideLoading();
+		// 	}
+		// });
 		inspecionList.value = filterSameDayItems(original.value, startTime.value);
 	}