mao 1 year ago
parent
commit
68b3c62cb5

+ 6 - 3
components/dialog-end-work/dialog-end-work.vue

@@ -120,7 +120,7 @@
 				}
 				if (specialDeptProcessList.value.includes(workInfo.value.processId)) {
 					for (let i = 0; i < response.rows.length; i++) {
-						lotPreSumReject.value += response.rows[i].rejectNum;
+						lotPreSumReject.value += response.rows[i].rejectSum;
 						lotPreSumQualifiedNum.value += response.rows[i].qualifiedNum;
 					}
 					workInfo.value.qualifiedNum = store.dayworkInfo.processQualifiedNum > 0 ? store.dayworkInfo
@@ -328,8 +328,11 @@
 			wasteInfo.value.push({
 				rejectNum: store.dayworkInfo.processQualifiedNum > 0 ? store.dayworkInfo
 					.processQualifiedNum - lotPreSumQualifiedNum.value - lotPreSumReject.value - workInfo.value
-					.qualifiedNum : store.dayworkInfo.oneLotQuantity - lotPreSumQualifiedNum.value -
-					lotPreSumReject.value - workInfo.value.qualifiedNum,
+					.qualifiedNum > 0 ? store.dayworkInfo
+					.processQualifiedNum - lotPreSumQualifiedNum.value - lotPreSumReject.value - workInfo.value
+					.qualifiedNum : 1 : store.dayworkInfo.oneLotQuantity - lotPreSumQualifiedNum.value -
+					lotPreSumReject.value - workInfo.value.qualifiedNum > 0 ? store.dayworkInfo.oneLotQuantity - lotPreSumQualifiedNum.value -
+					lotPreSumReject.value - workInfo.value.qualifiedNum : 1,
 				reason: ''
 			})
 		}

+ 2 - 1
components/dialog-selectInviteUser/dialog-selectInviteUser.vue

@@ -202,12 +202,13 @@
 <style lang="scss">
 	.dialog-body {
 		.userList {
-			border: 1rpx solid #1684fc;
+			// border: 1rpx solid #1684fc;
 			border-radius: 8rpx;
 			max-height: 300rpx;
 			overflow: auto;
 			width: 100%;
 			margin-top: 16rpx;
+			// padding: 16rpx;
 
 			.showUser {
 				justify-content: flex-start;

+ 6 - 5
components/dialog-selectProduction/dialog-selectProduction.vue

@@ -30,7 +30,7 @@
 	const baseDialog = ref(null)
 	const selectedProcess = ref(0)
 	const processList = ref([])
-	const curProcessId = ref(0)
+	const curProcessId = ref('')
 	const carrierList = ref([])
 
 	function open() {
@@ -93,7 +93,7 @@
 	function reset() {
 		selectedProcess.value = 0;
 		processList.value = [];
-		curProcessId.value = 0;
+		curProcessId.value = '';
 		carrierList.value = [];
 	}
 
@@ -123,13 +123,14 @@
 				baseDialog.value.open();
 			})
 		}else {
-			for (let i = 1; i < store.planDetails.processSequence.length; i++) {
+			let processIds = []
+			for (let i = 0; i < store.planDetails.processSequence.length; i++) {
+				processIds.push(store.planDetails.processSequence[i].id)
 				if (store.planDetails.processSequence[i].id == selectedProcess.value) {
-					curProcessId.value = store.planDetails.processSequence[i - 1].id;
-					console.log(curProcessId.value)
 					break;
 				}
 			}
+			curProcessId.value = processIds.join(',')
 			getAvailableCarrierList({
 				planDetailId: store.planDetails.id,
 				deptId: store.curDeptDetails.deptId,

+ 6 - 2
components/dialog-turnoverApplication/dialog-turnoverApplication.vue

@@ -26,7 +26,7 @@
 			<view class="turnArea uni-row" v-if="curDayworkItem.turnoverType == '2'">
 				<view v-for="(item,index) in turnoverArea" class="btn">
 					<view :class="{ 'middle-btn': true, 'active': handleTurnoverDoor(item) }"
-						@click="selectTurnoverDoor(item)"><text class="label">{{item.dictLabel}}</text></view>
+						@click="selectTurnoverDoorOutside(item)"><text class="label">{{item.dictLabel}}</text></view>
 				</view>
 			</view>
 		</view>
@@ -155,7 +155,11 @@
 			selection.value.splice(index, 1);
 		} else {
 			selection.value.push(item);
-		}
+		} 
+	}
+	
+	function selectTurnoverDoorOutside(item){
+		selection.value[0] = item;
 	}
 
 	function handleTurnoverDoor(item) {

+ 1 - 1
pages.json

@@ -17,7 +17,7 @@
 		{
 			"path": "pages/equipmentList/index",
 			"style": {
-				"navigationBarTitleText": "绑定载具"
+				"navigationBarTitleText": "绑定设备"
 			}
 		},
 		{

+ 1 - 7
pages/addNewBatch/index.vue

@@ -314,13 +314,7 @@
 				// });
 				if (ret.resp_result) {
 					checkLotCode(ret.resp_result);
-				} else {
-					uni.showToast({
-						icon: "none",
-						title: "条形码可能损坏,请重新扫码或手动修正批次号",
-						duration: 2000
-					})
-				}
+				} 
 			}
 		);
 	}

+ 13 - 5
pages/batchReporting/index.vue

@@ -116,7 +116,8 @@
 	import {
 		onLoad,
 		onReady,
-		onUnload
+		onUnload,
+		onShow
 	} from '@dcloudio/uni-app'
 	import {
 		getDayWorkList,
@@ -156,18 +157,22 @@
 		}
 		console.log(bottomStatus.value)
 
-		init(store.planDetails.id);
+		//init(store.planDetails.id);
 		uni.$on('batchReporting-addBatch', () => {
 			init(store.planDetails.id);
 		})
-		uni.$on('dayworkItemUpdate', reflush)
+		// uni.$on('dayworkItemUpdate', reflush)
 		uni.$on('bathReportingReflush', reflush)
 	})
 
 	onUnload(() => {
-		uni.$off('dayworkItemUpdate', reflush);
+		// uni.$off('dayworkItemUpdate', reflush);
 		uni.$off('bathReportingReflush', reflush);
 	})
+	
+	onShow(() => {
+		reflush();
+	})
 
 	function reflush() {
 		init(store.planDetails.id);
@@ -259,13 +264,16 @@
 				}).then(response => {
 					if (response.code == 200) {
 						console.log(response)
-						if (response.data[0].productionPlanDetailId == store.planDetails.id) {
+						console.log(response.data[0].productionPlanDetailId)
+						console.log(store.planDetails.id)
+						if (!response.data[0].productionPlanDetailId == store.planDetails.id) {
 							uni.showToast({
 								icon: 'none',
 								title: '该批次不在此计划单内',
 								duration: 2000
 							})
 						} else {
+							console.log(response.data)
 							lotDialog.value.open(response.data);
 						}
 					}

+ 9 - 3
pages/handlingList/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class='container uni-column'>
 		<view class='nav uni-row'>
-			<text :class='pendingClass' @click='selectPending'>周转</text>
+			<text :class='pendingClass' @click='selectPending'>周转</text>
 			<text :class='turnoverClass' @click='selectTurnover'>周转中</text>
 			<!-- <image class='img' src="../../static/screen.png"></image> -->
 		</view>
@@ -10,7 +10,7 @@
 			<view class="scroll-container" >
 				<view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
 					<text>暂无待周转批次</text>
-				</view>
+				</view>	
 				<view v-else v-for="(item, index) in listData" :key="index"
 					:class="{'list-item':true,'selected':isSelected(item)}">
 					<!-- @click="handleSelection(item)" -->
@@ -197,7 +197,7 @@
 	}
 
 	function reflush() {
-		turnoverContentTitle.value = 0;
+		// turnoverContentTitle.value = 0;
 		lotList.value = [];
 		init();
 	}
@@ -221,6 +221,12 @@
 		if (selection.value.length > 0) {
 			let msg = '是否确认送达?';
 			confirm.value.open(msg);
+		}else{
+			uni.showToast({
+				icon: 'none',
+				title: '请选择后再点击确认送达按钮',
+				duration: 2000
+			})
 		}
 	}
 

+ 10 - 6
pages/productionPlan/index.vue

@@ -12,7 +12,7 @@
 		<view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
 			<text>暂无生产计划</text>
 		</view>
-		<view v-else style="overflow: auto;">
+		<view v-else style="height: calc(100% - 100rpx); overflow: auto;">
 			<view  v-for="(item, index) in listData" :key="index" @click="handleToBatchReporting(item)" class="list-item">
 				<view class="title-container uni-row">
 					<view class="title uni-row">
@@ -56,7 +56,8 @@
 		onReady,
 		onLoad,
 		onUnload,
-		onPullDownRefresh
+		onPullDownRefresh,
+		onShow
 	} from '@dcloudio/uni-app'
 	import {
 		getToken
@@ -80,12 +81,16 @@
 		}
 		init(initReqParam.value);
 		// dayworkItem数据更改后刷新数据
-		uni.$on('dayworkItemUpdate', reflush);
+		// uni.$on('dayworkItemUpdate', reflush);
+	})
+	
+	onShow(() => {
+		reflush();
 	})
 
 	onUnload(() => {
 		console.log(store.curDeptDetails)
-		uni.$off('dayworkItemUpdate', reflush)
+		// uni.$off('dayworkItemUpdate', reflush)
 	})
 
 	/**	
@@ -179,8 +184,7 @@
 
 	.uni-column {
 		background-color: rgba(245, 245, 245, 1);
-		height: 100%;
-		overflow: auto;
+		height: calc(100% - 40rpx);
 	}
 
 	.list-item {