guoyujia il y a 10 mois
Parent
commit
c4860944cb
2 fichiers modifiés avec 86 ajouts et 6 suppressions
  1. 42 0
      pages.json
  2. 44 6
      pages/dashboard/index.vue

+ 42 - 0
pages.json

@@ -271,6 +271,36 @@
 				"navigationBarTitleText": "咨询"
 			}
 		},
+		{
+			"path": "pages/deliveryInspection/index",
+			"style": {
+				"navigationBarTitleText": "交检"
+			}
+		},
+		{
+			"path": "pages/deliveryInspection/scan",
+			"style": {
+				"navigationBarTitleText": "交检"
+			}
+		},
+		{
+			"path": "pages/deliveryInspection/form",
+			"style": {
+				"navigationBarTitleText": "交检"
+			}
+		},
+		{
+			"path": "pages/deliveryInspection/options",
+			"style": {
+				"navigationBarTitleText": "检查项"
+			}
+		},
+		{
+			"path": "pages/deliveryInspection/consultation",
+			"style": {
+				"navigationBarTitleText": "咨询"
+			}
+		},
 		{
 			"path": "pages/takeStock/index",
 			"style": {
@@ -282,6 +312,18 @@
 			"style": {
 				"navigationBarTitleText": "盘点明细"
 			}
+		},
+		{
+			"path": "pages/deliveryExamine/index",
+			"style": {
+				"navigationBarTitleText": "交检审核"
+			}
+		},
+		{
+			"path": "pages/deliveryExamine/form",
+			"style": {
+				"navigationBarTitleText": "交检审核"
+			}
 		}
 	],
 	"globalStyle": {

+ 44 - 6
pages/dashboard/index.vue

@@ -30,7 +30,7 @@
 		<view v-if="showQuick" class="business-btn uni-row" @click="handleFastToProductionPlan">
 			<text class="label">快速报工</text>
 		</view>
-		<view class="business-btn uni-row"  @click="handleToTakeStock">
+		<view class="business-btn uni-row" v-if="showTakeStock"  @click="handleToTakeStock">
 			<text class="label">盘点</text>
 		</view>
 		<view class="business-btn uni-row" v-if="showOther && !showSizing" @click="handleToProductionPlan">
@@ -54,21 +54,24 @@
 		<view class="business-btn uni-row" v-if="showOutsourcedInspector" @click="handleToOutsourcedInspection">
 			<text class="label">外协检查</text>
 		</view>
-		<view class="business-btn uni-row" v-if="showInspector" @click="handleToDeleveryInspection">
+		<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">
 			<text class="label">首件检</text>
-		</view>
+		</view> -->
 		<view class="business-btn uni-row" v-if="showOnSiteInspector" @click="handleToOnSiteInspection">
 			<text class="label">巡检</text>
 		</view>
-		<view class="business-btn uni-row" v-if="showInspector" @click="handleToInstrumentInspection">
+<!-- 		<view class="business-btn uni-row" v-if="showInspector" @click="handleToInstrumentInspection">
 			<text class="label">仪器室</text>
 		</view>
 		<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">
+			<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>
@@ -128,10 +131,13 @@
 	const showOther = ref(false)
 	const showInspector = ref(false);
 	const showOnSiteInspector = ref(false)
+	const showAdjust = ref(false)
 	const showQuick = ref(false)
 	const showSizing = ref(false)
+	const showTakeStock = ref(false)
 	const showInnerTurnover = ref(false)
 	const showOutsourcedInspector = ref(false)
+	const showDeliveryInspection = ref(false)
 	const showOutSourceList = ref(false)
 	const showChangeTurnover = ref(false)
 
@@ -156,11 +162,30 @@
 			showTurn.value = false;
 			showOther.value = true;
 		}
+		//盘点状态
+		if(store.userInfo.takeStock) {
+			showTakeStock.value = true
+		}else{
+			showTakeStock.value = false
+		}
+		//巡检
 		if(store.userInfo.roles.some(item =>item.roleKey == 'patrolInspection')) {
 			showOnSiteInspector.value = true
 		}else{
 			showOnSiteInspector.value = false
 		}
+		//交检
+		if(store.userInfo.roles.some(item =>item.roleKey == 'deliveryInspection')) {
+			showDeliveryInspection.value = true
+		}else{
+			showDeliveryInspection.value = false
+		}
+		//交检审核
+		if(store.userInfo.roles.some(item =>item.roleKey == 'adjuster')) {
+			showAdjust.value = true
+		}else{
+			showAdjust.value = false
+		}
 		if (store.userInfo.permissions.some(item => item === 'business:outsource:checkBox') || store.userInfo
 			.permissions.some(item => item === "*:*:*")) {
 			showOutSourceList.value = true;
@@ -305,6 +330,19 @@
 			})
 		}
 	}
+	//交检审核
+	function handleToAdjust() {
+		if (curSelectedDeptId.value) {
+			uni.navigateTo({
+				url: '/pages/deliveryExamine/index'
+			})
+		} else {
+			uni.showToast({
+				icon: "none",
+				title: "请选择工段"
+			})
+		}
+	}
 
 	// 分选
 	function handleToSorting() {
@@ -369,10 +407,10 @@
 		}
 	}
    //交检
-	function handleToDeleveryInspection() {
+	function handleToDeliveryInspection() {
 		if (curSelectedDeptId.value) {
 			uni.navigateTo({
-				url: '/pages/switchDept/index'
+				url: '/pages/deliveryInspection/index'
 			})
 		} else {
 			uni.showToast({