Sfoglia il codice sorgente

Merge branch 'master' of http://120.46.159.163:7400/ezhizao/ezhizao_dms_app

ezhizao_zx 1 anno fa
parent
commit
15a4eae36a

+ 4 - 2
components/dialog-end-work/dialog-end-work.vue

@@ -134,7 +134,8 @@
 					workInfo.value.qualifiedNum = store.dayworkInfo.processQualifiedNum > 0 ?
 						Math.max(0, store.dayworkInfo.processQualifiedNum - lotPreSumQualifiedNum.value -
 							lotPreSumReject.value) :
-						Math.max(0, store.dayworkInfo.productionQuantity - lotPreSumQualifiedNum.value - lotPreSumReject
+						Math.max(0, store.dayworkInfo.productionQuantity - lotPreSumQualifiedNum.value -
+							lotPreSumReject
 							.value);
 					// temp.value = workInfo.value.qualifiedNum;
 				} else {
@@ -267,6 +268,7 @@
 		workInfo.value.prodNum = number
 		console.log("合格量", (parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value))
 		let percent = (((parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value) / number) * 100).toFixed(2);
+		percent = Math.ceil(percent * 100) / 100;
 		console.log("percent", lotPreSumQualifiedNum.value);
 		let num = 103;
 		// 填入数大于剩余量情况
@@ -274,7 +276,6 @@
 			// 判断当前是否为首序
 			if (isFirstOrder.value) {
 				percent = ((parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value - number) / number) * 100;
-				percent = Math.ceil(percent * 100) / 100;
 				uni.showModal({
 					title: '提示',
 
@@ -335,6 +336,7 @@
 					}
 				})
 			} else {
+				percent = Math.ceil(percent * 100) / 100;
 				if (percent > num) {
 					uni.showToast({
 						icon: 'none',

+ 1 - 2
pages/batchReporting/index.vue

@@ -20,7 +20,7 @@
 			<switch class="switch" @change="switchChange" color="rgba(255,85,85,1)" />
 			<text>否</text> -->
 		</view>
-		<view class="scroll-container">
+		<view class="scroll-container" style="padding-bottom:  150rpx">
 			<view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
 				<text>暂无批次</text>
 			</view>
@@ -343,7 +343,6 @@
 			listData.value = tempList.value.filter(item => {
 				return item.isWasteRecycling == 1 || item.isAmend == 1;
 			});
-			console.log("批次信息", listData.value)
 			normalStatus.value = false
 		} else {
 			listData.value = tempList.value.filter(item => {

+ 13 - 6
pages/dashboard/index.vue

@@ -15,10 +15,12 @@
 		</view>
 		<view class="user-info uni-column" style="margin: 0 20rpx 20rpx 20rpx;width: 94%;">
 			<uni-section title="当前厂别" type="square">
-				<uni-data-select v-model="curSelectedTenantId" :localdata="tenantList" :clear="false" @change="handleTenantChange"></uni-data-select>
+				<uni-data-select v-model="curSelectedTenantId" :localdata="tenantList" :clear="false"
+					@change="handleTenantChange"></uni-data-select>
 			</uni-section>
 			<uni-section title="当前工段" type="square">
-				<uni-data-select v-model="curSelectedDeptId" :localdata="userDeptsByTenantId" :clear="false" @change="handleDeptChange"></uni-data-select>
+				<uni-data-select v-model="curSelectedDeptId" :localdata="userDeptsByTenantId" :clear="false"
+					@change="handleDeptChange"></uni-data-select>
 			</uni-section>
 		</view>
 		<!-- <view class="business-btn uni-row" v-if="showOther" @click="handleRecerptSfprod"><text class="label">半成品接收</text></view> -->
@@ -34,7 +36,7 @@
 		<view class="business-btn uni-row" v-if="showSizing" @click="handleToSorting">
 			<text class="label">分选报工</text>
 		</view>
-		<view class="business-btn uni-row" v-if="showOther" @click="handleToProcessInspection">
+		<view class="business-btn uni-row" v-if="showInspector" @click="handleToProcessInspection">
 			<text class="label">序检</text>
 		</view>
 		<!-- v-hasRoles="['porter']" 可通过v-Roles自定义指令进行显隐 -->
@@ -83,10 +85,12 @@
 	const confirm = ref(null) // 确认组件
 	const showTurn = ref(false)
 	const showOther = ref(false)
+	const showInspector = ref(false);
 	const showQuick = ref(false)
 	const showSizing = ref(false)
 
 	onLoad(() => {
+		console.log("gabwlhjkdb lakjwhdnkj;lawnbd;kjlawbjd", store);
 		userInfo.value = store.userInfo || {
 			nickName: ""
 		};
@@ -97,6 +101,9 @@
 		} else if (store.userInfo.roles.some(item => item.roleId == 124) && store.userInfo.roles.length == 1) {
 			showTurn.value = true;
 			showOther.value = false;
+		} else if (store.userInfo.roles.some(item => item.roleId == 128) && store.userInfo.roles.length == 1) {
+			showInspector.value = true
+			showOther.value = true;
 		} else {
 			showTurn.value = false;
 			showOther.value = true;
@@ -204,7 +211,7 @@
 			})
 		}
 	}
-	
+
 	// 分选
 	function handleToSorting() {
 		if (curSelectedDeptId.value) {
@@ -218,7 +225,7 @@
 			})
 		}
 	}
-	
+
 	// 工序检查
 	function handleToProcessInspection() {
 		uni.navigateTo({
@@ -264,7 +271,7 @@
 		let curDept = userDeptList.value.find(item => item.deptId === curSelectedDeptId.value)
 		store.curDeptDetails = curDept
 		if (curDept.deptName === '分选') {
-			showSizing.value = true			
+			showSizing.value = true
 		} else {
 			showSizing.value = false
 		}

+ 15 - 3
pages/processInspection/form.vue

@@ -261,15 +261,27 @@
 
 
 	function save() {
+
+		let pages = getCurrentPages();
 		processInspecion.value.dayworkItemConsults = consultations.value;
 		processInspecion.value.dayworkItemRejects = unfitInfos.value;
 		processInspecion.value.user = store.userInfo;
 
 		saveProcessInspecion(processInspecion.value).then(res => {
 			if (res.code == 200) {
-				uni.navigateTo({
-					url: '/pages/processInspection/index'
-				})
+				let index = 0;
+
+				for (let i = 0; i < pages.length; i++) {
+
+					if (pages[i].$page.fullPath == "/pages/processInspection/index") {
+
+						index = pages.length - i - 1;
+					}
+				}
+				console.log("index", index);
+				uni.navigateBack({
+					delta: index
+				});
 			} else {
 				uni.showToast({
 					icon: 'none',

+ 2 - 2
pages/processInspection/index.vue

@@ -5,7 +5,7 @@
 			<view class="btn uni-row" @click="getList">搜索</view>
 			<!-- <uni-icons type="scan" size="24" /> -->
 		</view>
-		<view class="scan-btn uni-row" @click.stop="handleAddProcessInspection">新增序检</view>
+		<view class="scan-btn uni-row" style="min-height: 80rpx;" @click.stop="handleAddProcessInspection">新增序检</view>
 		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
 			@click="handleSelection(item)">
 			<view class="lot-code uni-row">
@@ -18,7 +18,7 @@
 					<view class="label">序检箱号:</view>
 					<view class="value">{{ item.carrierCode }}</view>
 					<view class="label">检察员:</view>
-					<view class="value">{{ item.userName }}</view>
+					<view class="value">{{ item.nickName }}</view>
 				</view>
 				<view class="info-row uni-row">
 					<view class="label">检查数量:</view>