Browse Source

外协报工-测试

wangxin 1 year ago
parent
commit
a2af2672e9
2 changed files with 40 additions and 4 deletions
  1. 21 3
      pages.json
  2. 19 1
      pages/dashboard/index.vue

+ 21 - 3
pages.json

@@ -135,15 +135,33 @@
 			}
 		},
 		{
-			"path": "pages/processInspection/options",
+			"path": "pages/outsourcedInspection/index",
+			"style": {
+				"navigationBarTitleText": "外协检查"
+			}
+		},
+		{
+			"path": "pages/outsourcedInspection/form",
+			"style": {
+				"navigationBarTitleText": "外协检查"
+			}
+		},
+		{
+			"path": "pages/outsourcedInspection/scan",
+			"style": {
+				"navigationBarTitleText": "外协检查"
+			}
+		},
+		{
+			"path": "pages/outsourcedInspection/options",
 			"style": {
 				"navigationBarTitleText": "检查项选择"
 			}
 		},
 		{
-			"path": "pages/processInspection/consultation",
+			"path": "pages/outsourcedInspection/consultation",
 			"style": {
-				"navigationBarTitleText": "序检"
+				"navigationBarTitleText": "外协检查"
 			}
 		}
 	],

+ 19 - 1
pages/dashboard/index.vue

@@ -39,6 +39,9 @@
 		<view class="business-btn uni-row" v-if="showInspector" @click="handleToProcessInspection">
 			<text class="label">序检</text>
 		</view>
+		<view class="business-btn uni-row" v-if="showOutsourcedInspector" @click="handleToOutsourcedInspection">
+			<text class="label">外协检查</text>
+		</view>
 		<!-- v-hasRoles="['porter']" 可通过v-Roles自定义指令进行显隐 -->
 		<view class="business-btn uni-row" v-if="showTurn" @click="handleToHandlingList">
 			<text class="label">周转</text>
@@ -88,6 +91,7 @@
 	const showInspector = ref(false);
 	const showQuick = ref(false)
 	const showSizing = ref(false)
+	const showOutsourcedInspector = ref(false)
 
 	onLoad(() => {
 		userInfo.value = store.userInfo || {
@@ -103,11 +107,16 @@
 			showOther.value = false;
 		} else if (store.userInfo.roles.some(item => item.roleId == 128)) {
 			showInspector.value = true
-			showOther.value = true;
+
 		} else {
 			showTurn.value = false;
 			showOther.value = true;
 		}
+
+		if (store.userInfo.roles.some(item => item.roleId == 129)) {
+			showOutsourcedInspector.value = true
+			// showOther.value = true;
+		}
 		init();
 	})
 
@@ -226,6 +235,15 @@
 		}
 	}
 
+
+
+	// 外协检查
+	function handleToOutsourcedInspection() {
+		uni.navigateTo({
+			url: '/pages/outsourcedInspection/index'
+		})
+	}
+
 	// 工序检查
 	function handleToProcessInspection() {
 		uni.navigateTo({