ezhizao_zx 9 月之前
父节点
当前提交
322581d5c9
共有 2 个文件被更改,包括 83 次插入58 次删除
  1. 2 2
      pages/auxiliaryDaywork/index.vue
  2. 81 56
      pages/dashboard/index.vue

+ 2 - 2
pages/auxiliaryDaywork/index.vue

@@ -274,10 +274,10 @@
 			daywork: item
 		}
 		uni.navigateTo({
-			url: "/pages/changeInspectionBox/index",
+			url: "/pages/changeBox/index",
 			success: function(res) {
 				// 通过eventChannel向被打开页面传送数据
-				res.eventChannel.emit('outsourceFromOpenerPage', {
+				res.eventChannel.emit('acceptDataFromOpenerPage', {
 					data: openItem
 				})
 			}

+ 81 - 56
pages/dashboard/index.vue

@@ -42,22 +42,25 @@
 		<view class="business-btn uni-row" v-if="showSizing" @click="handleToSorting">
 			<text class="label">分选报工</text>
 		</view>
+		<view class="business-btn uni-row" v-if="showAuxiliary" @click="handleToAuxiliary">
+			<text class="label">辅助工序报工</text>
+		</view>
 		<view class="business-btn uni-row" @click="handleToGetLotInfo">
 			<text class="label">扫码查询批次信息</text>
 		</view>
-<!-- 		<view class="business-btn uni-row" v-if="showInspector" @click="handleToProcessInspection">
+		<!-- 		<view class="business-btn uni-row" v-if="showInspector" @click="handleToProcessInspection">
 			<text class="label">序检</text>
 		</view> -->
-		<view class="business-btn uni-row"  @click="handleToInspectionDetails">
+		<view class="business-btn uni-row" @click="handleToInspectionDetails">
 			<text class="label">检查列表</text>
 		</view>
 		<view class="business-btn uni-row" v-if="showOutsourcedInspector" @click="handleToOutsourcedInspection">
 			<text class="label">外协检查</text>
 		</view>
-<!-- 		<view class="business-btn uni-row" v-if="showDeliveryInspection" @click="handleToDeliveryInspection">
+		<!-- 		<view class="business-btn uni-row" v-if="showDeliveryInspection" @click="handleToDeliveryInspection">
 			<text class="label">交检</text>
 		</view> -->
-<!-- 		<view class="business-btn uni-row" v-if="showInspector" @click="handleToFirstInspection">
+		<!-- 		<view class="business-btn uni-row" v-if="showInspector" @click="handleToFirstInspection">
 			<text class="label">首件检</text>
 		</view> -->
 		<view class="business-btn uni-row" v-if="showOnSiteInspector" @click="handleToOnSiteInspection">
@@ -66,10 +69,10 @@
 		<view class="business-btn uni-row" v-if="showInstrumentRoomInspection" @click="handleToInstrumentInspection">
 			<text class="label">仪器室</text>
 		</view>
-<!-- 		<view class="business-btn uni-row" v-if="showInspector" @click="handleToFactoryInspection">
+		<!-- 		<view class="business-btn uni-row" v-if="showInspector" @click="handleToFactoryInspection">
 			<text class="label">出厂检</text>
 		</view> -->
-<!-- 		<view class="business-btn uni-row" v-if="showAdjust" @click="handleToAdjust">
+		<!-- 		<view class="business-btn uni-row" v-if="showAdjust" @click="handleToAdjust">
 			<text class="label">交检审核</text>
 		</view> -->
 		<!-- v-hasRoles="['porter']" 可通过v-Roles自定义指令进行显隐 -->
@@ -90,7 +93,8 @@
 		</view>
 	</view>
 	<dialog-confirm ref="confirm" @submit="logout"></dialog-confirm>
-	<dialog-inspectionChamber ref="inspectionChanberRef" @handleSelectInspectionChamber='handleSelectInspectionChamber'></dialog-inspectionChamber>
+	<dialog-inspectionChamber ref="inspectionChanberRef"
+		@handleSelectInspectionChamber='handleSelectInspectionChamber'></dialog-inspectionChamber>
 </template>
 
 <script setup>
@@ -144,6 +148,7 @@
 	const showDeliveryInspection = ref(false)
 	const showOutSourceList = ref(false)
 	const showChangeTurnover = ref(false)
+	const showAuxiliary = ref(false)
 
 	onLoad(() => {
 		console.log(store.userInfo)
@@ -167,15 +172,15 @@
 			showOther.value = true;
 		}
 		//盘点状态
-		if(store.userInfo.takeStock) {
+		if (store.userInfo.takeStock) {
 			showTakeStock.value = true
-		}else{
+		} else {
 			showTakeStock.value = false
 		}
 		//巡检
-		if(store.userInfo.roles.some(item =>item.roleKey == 'patrolInspection')) {
+		if (store.userInfo.roles.some(item => item.roleKey == 'patrolInspection')) {
 			showOnSiteInspector.value = true
-		}else{
+		} else {
 			showOnSiteInspector.value = false
 		}
 		//交检
@@ -185,9 +190,9 @@
 			showDeliveryInspection.value = false
 		}
 		//仪器室
-		if(store.userInfo.roles.some(item =>item.roleKey == 'instrumentRoomInspection')) {
+		if (store.userInfo.roles.some(item => item.roleKey == 'instrumentRoomInspection')) {
 			showInstrumentRoomInspection.value = true
-		}else{
+		} else {
 			showInstrumentRoomInspection.value = false
 		}
 		//交检审核
@@ -214,6 +219,7 @@
 			showOutsourcedInspector.value = true
 			// showOther.value = true;
 		}
+		showAuxiliary.value = true
 		init();
 	})
 
@@ -291,12 +297,14 @@
 			url: '/pages/reportHistory/index'
 		})
 	}
+
 	function handleToGetLotInfo() {
 		uni.navigateTo({
 			url: '/pages/queryLotInfo/index'
 		})
 	}
-	function handleInnerTurnover(){
+
+	function handleInnerTurnover() {
 		uni.navigateTo({
 			url: '/pages/innerTurnover/index'
 		})
@@ -370,7 +378,7 @@
 
 	//检查列表
 	function handleToInspectionDetails() {
-	  const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
 		if (mpaasScanModule) {
 			// 调用插件的 mpaasScan 方法
 			mpaasScanModule.mpaasScan({
@@ -398,14 +406,14 @@
 					}).then(response => {
 						if (response.code == 200) {
 							uni.navigateTo({
-										url: "/pages/processInspectionReceive/form",
-										success: (res) => {
-											// 通过eventChannel向被打开页面传送数据
-											res.eventChannel.emit("inspecionCarrierCode", {
-												carrierCode: vehicleObj.carrierCode
-											})
-										}
+								url: "/pages/processInspectionReceive/form",
+								success: (res) => {
+									// 通过eventChannel向被打开页面传送数据
+									res.eventChannel.emit("inspecionCarrierCode", {
+										carrierCode: vehicleObj.carrierCode
 									})
+								}
+							})
 						} else {
 							uni.showToast({
 								icon: 'none',
@@ -418,27 +426,27 @@
 			);
 		} else {
 			// 测试时用
-		checkCarrier({
-			carrierCode: "300088",
-		}).then(response => {
-			if (response.code == 200) {
-				uni.navigateTo({
-							url: "/pages/processInspectionReceive/form",
-							success: (res) => {
-								// 通过eventChannel向被打开页面传送数据
-								res.eventChannel.emit("inspecionCarrierCode", {
-									carrierCode: "300088"
-								})
-							}
-						})
-			} else {
-				uni.showToast({
-					icon: 'none',
-					title: response.msg,
-					duration: 2000
-				})
-			}
-		})
+			checkCarrier({
+				carrierCode: "300088",
+			}).then(response => {
+				if (response.code == 200) {
+					uni.navigateTo({
+						url: "/pages/processInspectionReceive/form",
+						success: (res) => {
+							// 通过eventChannel向被打开页面传送数据
+							res.eventChannel.emit("inspecionCarrierCode", {
+								carrierCode: "300088"
+							})
+						}
+					})
+				} else {
+					uni.showToast({
+						icon: 'none',
+						title: response.msg,
+						duration: 2000
+					})
+				}
+			})
 		}
 	}
 
@@ -485,7 +493,7 @@
 			})
 		}
 	}
-   //交检
+	//交检
 	function handleToDeliveryInspection() {
 		if (curSelectedDeptId.value) {
 			uni.navigateTo({
@@ -535,22 +543,23 @@
 				title: "请选择工段"
 			})
 		}
-		
+
 	}
+
 	function handleSelectInspectionChamber(data) {
 		uni.navigateTo({
-					url: "/pages/instrumentRoomInspection/index",
-					success: (res) => {
-						// 通过eventChannel向被打开页面传送数据
-						res.eventChannel.emit("inspectionChamberInfo", {
-							data: data
-						})
-					}
+			url: "/pages/instrumentRoomInspection/index",
+			success: (res) => {
+				// 通过eventChannel向被打开页面传送数据
+				res.eventChannel.emit("inspectionChamberInfo", {
+					data: data
 				})
+			}
+		})
 	}
 	//出厂检
 	function handleToFactoryInspection() {
-		
+
 	}
 
 	function logout() {
@@ -593,12 +602,28 @@
 	}
 	//查询当前工段当前操作者是否能看见内部周转按钮
 	function handleSelectInnerTurnover() {
-		listInnerTurnover({deptId:store.curDeptDetails.deptId,userId:store.userInfo.userId}).then(res =>{
-			if(res.code == 200){
-				showInnerTurnover.value = res.rows.length>0?true:false
+		listInnerTurnover({
+			deptId: store.curDeptDetails.deptId,
+			userId: store.userInfo.userId
+		}).then(res => {
+			if (res.code == 200) {
+				showInnerTurnover.value = res.rows.length > 0 ? true : false
 			}
 		})
 	}
+
+	function handleToAuxiliary() {
+		if (curSelectedDeptId.value) {
+			uni.navigateTo({
+				url: '/pages/auxiliaryDaywork/index'
+			})
+		} else {
+			uni.showToast({
+				icon: "none",
+				title: "请选择工段"
+			})
+		}
+	}
 </script>
 
 <style lang="scss">