guoyujia 3 months ago
parent
commit
3cb07f826e
4 changed files with 83 additions and 8 deletions
  1. 7 0
      api/business/auxiliaryDaywork.js
  2. 2 2
      manifest.json
  3. 73 5
      pages/queryLotInfo/index.vue
  4. 1 1
      pages/reportHistory/index.vue

+ 7 - 0
api/business/auxiliaryDaywork.js

@@ -13,6 +13,13 @@ export function getDayWorkList(data) {
 		data: data
 	})
 }
+export function getAuxiliaryDayworkItemByDayworkId(data) {
+	return req.request({
+		url: '/business/auxiliaryDaywork/getAuxiliaryDayworkItemByDayworkId',
+		method: 'POST',
+		data: data
+	})
+}
 
 export function getInfoByCarrierCode(data) {
 	return req.request({

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
 	"name": "(测试)德迈仕数字生产管理平台",
 	"appid": "__UNI__54D8B02",
 	"description": "",
-	"versionName": "1.0.45",
-	"versionCode": 45,
+	"versionName": "1.0.48",
+	"versionCode": 48,
 	"transformPx": false,
 	/* 5+App特有相关 */
 	"app-plus": {

+ 73 - 5
pages/queryLotInfo/index.vue

@@ -4,8 +4,9 @@
 			<view :class="['tab-item', isActiveId === 1 ? 'active': '']" @click="handleClickTab(1)">批次信息</view>
 			<view :class="['tab-item', isActiveId === 2 ? 'active': '']" @click="handleClickTab(2)">领料信息</view>
 			<view :class="['tab-item', isActiveId === 3 ? 'active': '']" @click="handleClickTab(3)">历史报工</view>
-			<view :class="['tab-item', isActiveId === 4 ? 'active': '']" @click="handleClickTab(4)">检查信息</view>
-			<view :class="['tab-item', isActiveId === 5 ? 'active': '']" @click="handleClickTab(5)">分选信息</view>
+			<view :class="['tab-item', isActiveId === 4 ? 'active': '']" @click="handleClickTab(4)">辅助报工</view>
+			<view :class="['tab-item', isActiveId === 5 ? 'active': '']" @click="handleClickTab(5)">检查信息</view>
+			<view :class="['tab-item', isActiveId === 6 ? 'active': '']" @click="handleClickTab(6)">分选信息</view>
 		</view>
 		<scroll-view class="scroll-container" scroll-y scroll-with-animation :scroll-into-view="scrollToId"
 			:scroll-top="scrollTop" @scrolltoupper="handleScrollToUpper" @scrolltolower="handleScrollToLower"
@@ -184,8 +185,52 @@
 					</view>
 				</view>
 			</view>
-			<!-- 检查信息 -->
+			<!-- 辅助报工 -->
 			<view id="item4" class="scroll-item">
+				<view> <text style="font-size: 32rpx;display: flex;justify-content: center;">辅助报工</text></view>
+				<view v-if="auxiliaryData.length == 0" class="no-date">
+					<text>暂无数据</text>
+				</view>
+				<view v-for="(item, index) in auxiliaryData" :key="index" class="list-item" id="auxiliaryData">
+					<view class="item-info uni-row" style="margin-top: 16rpx;"> <text class="label ">工序:</text>
+						<text class="label right">{{ item['processAlias'] }}</text>
+					</view>
+					<view class="item-info uni-row"> <text class="label">辅助工序:</text>
+						<text class="label right ">{{ item['auxiliaryProcessAlias'] }}</text>
+					</view>
+					<view class="item-info uni-row"> <text class="label">投产量:</text>
+						<text class="label right ">{{ item['prodNum'] }}</text>
+					</view>
+					<view class="item-info uni-row">
+						<text class="label">合格数量:</text>
+						<text class="label right">{{ item['qualifiedNum']}}</text>
+					</view>
+					<view v-for="(info, index) in item.rejects" :key="index">
+						<view class="item-info uni-row">
+							<text class="label">废品信息:</text>
+							<text class="label right">{{ info['reason']!=""?info['reason']:'-'}}</text>
+						</view>
+						<view class="item-info uni-row">
+							<text class="label">废品数量:</text>
+							<text class="label right">{{ info['rejectNum']}}</text>
+						</view>
+					</view>
+					<!-- 				<view class="item-info uni-row">
+						<text class="label">设备:</text>
+						<text class="label right">{{ item['equipmentDetailCode'] ?item['equipmentDetailCode']:'-'}}</text>
+					</view> -->
+					<view class="item-info uni-row">
+						<text class="label">操作者:</text>
+						<text class="label right">{{ item['nickName']}}</text>
+					</view>
+					<view v-if="index!=auxiliaryData.length-1" class='middle'>
+						<view class='segment'></view>
+						<view class='segment'></view>
+					</view>
+				</view>
+			</view>
+			<!-- 检查信息 -->
+			<view id="item5" class="scroll-item">
 				<view> <text style="font-size: 32rpx;display: flex;justify-content: center;">检查信息</text></view>
 				<view v-if="inspectionData.length == 0" class="no-date">
 					<text>暂无数据</text>
@@ -255,7 +300,7 @@
 				</view>
 			</view>
 			<!-- 分选信息 -->
-			<view id="item5" class="scroll-item">
+			<view id="item6" class="scroll-item">
 				<view> <text style="font-size: 32rpx;display: flex;justify-content: center;">分选信息</text></view>
 				<view v-if="sortData.length == 0" class="no-date">
 					<text>暂无数据</text>
@@ -360,6 +405,9 @@
 		getDayworkItemByDayworkId,
 		getSortItemByDayworkId
 	} from '@/api/business/dayWorkItem.js'
+	import {
+		getAuxiliaryDayworkItemByDayworkId,
+	} from '@/api/business/auxiliaryDaywork.js'
 	import {
 		getProcessInspectionByDayworkId
 	} from '@/api/business/processInspection.js'
@@ -374,6 +422,7 @@
 	const lotData = ref(null) //批次信息
 	const furnaceData = ref(null) //领料信息
 	const historyData = ref([]) //历史报工
+	const auxiliaryData = ref([]) //辅助报工
 	const inspectionData = ref([]) //检查信息
 	const sortData = ref([]) //分选信息
 	const showRight = ref(null) // 抽屉
@@ -395,6 +444,8 @@
 
 	// 定义tab4的【SelectorQuery】对象
 	let item4Query = null
+	// 定义tab5的【SelectorQuery】对象
+	let item5Query = null
 
 	onLoad(() => {
 		init();
@@ -423,6 +474,11 @@
 				isActiveId.value = 4
 			}
 		})
+		item5Query = query.select("#item5").boundingClientRect((data) => {
+			if (data.top >= 32 && data.top <= 80) {
+				isActiveId.value = 5
+			}
+		})
 	})
 
 	//H5扫码器回调
@@ -543,6 +599,7 @@
 		getLotInfo()
 		getFurnaceInfo()
 		getHistoryReport()
+		getAuxiliaryHistoryReport()
 		getInspection()
 		getSortReport()
 	}
@@ -576,6 +633,16 @@
 			}
 		})
 	}
+	//查询辅助报工
+	function getAuxiliaryHistoryReport() {
+		getAuxiliaryDayworkItemByDayworkId({
+			dayworkId: dayworkId.value
+		}).then(response => {
+			if (response.code == 200) {
+				auxiliaryData.value = response.data
+			}
+		})
+	}
 	//查询检查信息
 	function getInspection() {
 		getProcessInspectionByDayworkId({
@@ -681,7 +748,7 @@
 		isActiveId.value = 1
 	}
 	const handleScrollToLower = () => {
-		isActiveId.value = 5
+		isActiveId.value = 6
 	}
 	const handleScroll = () => {
 		// 在滚动时候,把scrollToId的值清空,否则,会有点击tab,页面不滚动的情况,比如:先点击了tab1,然后滚动到最低端,这时候,再点击tab1,将没反应。
@@ -692,6 +759,7 @@
 		item2Query.exec()
 		item3Query.exec()
 		item4Query.exec()
+		item5Query.exec()
 	}
 </script>
 

+ 1 - 1
pages/reportHistory/index.vue

@@ -299,7 +299,7 @@
 					var endTimeStatus = "";
 					for (var j = 0; j < listDaywork.value.length; j++) {
 						if (listDaywork.value[j].dayworkId === current.dayworkId && listDaywork.value[j]
-							.processId === current.processId) {
+							.processStepNumber === current.processStepNumber) {
 							listDaywork.value[j].qualifiedNum += current.qualifiedNum;
 							listDaywork.value[j].rejectSum += current.rejectSum;
 							if (listDaywork.value[j].equipmentDetailCode != null && listDaywork.value[j]