mao 1 rok pred
rodič
commit
8df19c871c

+ 23 - 7
components/dialog-end-work/dialog-end-work.vue

@@ -108,7 +108,7 @@
 		Promise.all([getSpecialDeptProcessList(), getDayWorkItemList({
 				dayworkId: store.dayworkInfo.id,
 				status: 2
-			})],)
+			})], )
 			.then(([res, response]) => {
 				console.log(response.rows)
 				if (res.code == 200 && response.code == 200) {
@@ -124,8 +124,10 @@
 						lotPreSumQualifiedNum.value += response.rows[i].qualifiedNum;
 					}
 					workInfo.value.qualifiedNum = store.dayworkInfo.processQualifiedNum > 0 ? store.dayworkInfo
-						.processQualifiedNum - lotPreSumQualifiedNum.value - lotPreSumReject.value : 
-						store.dayworkInfo.oneLotQuantity - lotPreSumQualifiedNum.value - lotPreSumReject.value;
+						.processQualifiedNum - lotPreSumQualifiedNum.value - lotPreSumReject.value > 0 ? store
+						.dayworkInfo.processQualifiedNum - lotPreSumQualifiedNum.value - lotPreSumReject.value : 0 :
+						store.dayworkInfo.oneLotQuantity - lotPreSumQualifiedNum.value - lotPreSumReject.value > 0 ?
+						store.dayworkInfo.oneLotQuantity - lotPreSumQualifiedNum.value - lotPreSumReject.value : 0;
 					// temp.value = workInfo.value.qualifiedNum;
 					console.log(store.dayworkInfo)
 				} else {
@@ -241,7 +243,8 @@
 			} else {
 				uni.showToast({
 					icon: "none",
-					title: "请先扫码确认载具"
+					title: "请先扫码确认载具",
+					duration: 2000
 				})
 				return;
 			}
@@ -249,16 +252,19 @@
 			handleSave();
 		}
 	}
-
+	
 	function handleSave() {
 		console.log(workInfo.value.qualifiedNum)
 		if (workInfo.value.qualifiedNum === null || workInfo.value.qualifiedNum === '') {
 			uni.showToast({
 				icon: "error",
 				title: "请输入合格数",
+				duration: 2000
 			})
 			return;
 		}
+		let rejectSum = 0
+		console.log(rejectSum);
 		for (let i = 0; i < wasteInfo.value.length; i++) {
 			if ((!wasteInfo.value[i].rejectNum && wasteInfo.value[i].reason) ||
 				(wasteInfo.value[i].rejectNum && !wasteInfo.value[i].reason) ||
@@ -270,6 +276,15 @@
 				})
 				return;
 			}
+			rejectSum += wasteInfo.value[i].rejectNum;
+		}
+		if(rejectSum < 0 || rejectSum > Math.floor(workInfo.value.prodNum * 1.03)){
+			uni.showToast({
+				icon: 'none',
+				title: '合格数不能小于0或大于投入数的百分之1.03',
+				duration: 2000
+			})
+			return;
 		}
 		close();
 		if (workInfo.value.status != '3') {
@@ -312,8 +327,9 @@
 		} else {
 			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,
+					.processQualifiedNum - lotPreSumQualifiedNum.value - lotPreSumReject.value - workInfo.value
+					.qualifiedNum : store.dayworkInfo.oneLotQuantity - lotPreSumQualifiedNum.value -
+					lotPreSumReject.value - workInfo.value.qualifiedNum,
 				reason: ''
 			})
 		}

+ 18 - 17
components/dialog-lot/dialog-lot.vue

@@ -10,7 +10,7 @@
 		<view :class="{'list-container':true, 'selected':isSelected(item)}" @click="handleSelection(item,index)"
 			v-for="(item, index) in form" :key="item.id">
 			<view class="list-title"><text class="label">批次号:{{item.lotCode}}</text></view>
-			<view class="list-container-item uni-row">
+			<view class="list-container-item uni-row" style="border-top: 1px solid #e1e1e1;border-radius: 8rpx 8rpx 0 0;">
 				<text class="label">产品描述</text>
 				<text class="label value">{{item['productDescription']}}</text>
 			</view>
@@ -18,11 +18,11 @@
 				<text class="label">关联箱号</text>
 				<text class="label value">{{item['carrierName']}}</text>
 			</view>
-			<view class="list-container-item uni-row" style="border-bottom: 1px solid #999999;">
+			<view class="list-container-item uni-row">
 				<text class="label">投产数量</text>
 				<text class="label value">{{item['prodNum']}}</text>
 			</view>
-			<view class="list-container-item uni-row">
+			<view class="list-container-item uni-row" style="border-radius: 0 0 8rpx 8rpx;">
 				<text class="label">上道工序</text>
 				<text class="label value">{{item['process'].processAlias}}</text>
 			</view>
@@ -76,13 +76,12 @@
 		}).then(res => { 
 			if (res.code == 200) {
 				//过滤工序列表将上道序及之前的工序去掉, 然后过滤出工序交集
-				let curProcessSequence = [];
-				console.log(store.planDetails.processSequence)
-				console.log(store.planDetails.processSequence[0])
+				let curProcessSequence = [...store.planDetails.processSequence];
+				console.log(curProcessSequence)
 				console.log(form.value[0])
-				for (let i = 0; i < store.planDetails.processSequence.length; i++) {
-					if (store.planDetails.processSequence[i].id == form.value[0].processId) {
-						curProcessSequence = store.planDetails.processSequence.unshift(i + 1);
+				for (let i = 0; i < curProcessSequence.length; i++) {
+					if (curProcessSequence[i].id == form.value[0].processId) {
+						curProcessSequence.splice(0,i + 1);
 						console.log(curProcessSequence)
 						break;
 					}
@@ -142,14 +141,15 @@
 
 <style lang="scss">
 	.selected {
-		border: 2px solid #1684fc;
+		border: 3rpx solid #1684fc;
+		border-radius: 8rpx;
 	}
 
 	.dialog-body {
 		overflow: auto;
 
 		.list-title {
-			margin: 20rpx 0 20rpx 0;
+			margin: 10rpx 0 20rpx 0;
 
 			.label {
 				font-size: 32rpx;
@@ -163,18 +163,19 @@
 		}
 
 		.list-container {
-			width: 100%;
+			width: 96%;
 			display: flex;
 			align-items: flex-start;
-			// padding: 0 4rpx;
-			margin: 10rpx 0;
-			border-radius: 6rpx;
+			margin: 10rpx auto;
+			padding: 2%;
+			border-radius: 8rpx;
 			overflow: auto;
 
 			.list-container-item {
 				width: 100%;
-				border: 1px solid #999999;
-				border-bottom: none;
+				border-bottom: 1px solid #e1e1e1;
+				border-left: 1px solid #e1e1e1;
+				border-right: 1px solid #e1e1e1;
 				padding: 12rpx 8rpx;
 				box-sizing: border-box;
 

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "德迈仕数字生产管理平台",
     "appid" : "__UNI__B065984",
     "description" : "",
-    "versionName" : "1.0.14",
-    "versionCode" : 113,
+    "versionName" : "1.0.15",
+    "versionCode" : 114,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 0 - 3
pages/addNewBatch/index.vue

@@ -56,8 +56,6 @@
 					<uni-data-select id="incomingInfo" class="uni-input data-select" v-model="basicInfo"
 						:localdata="furnaceNumberInfoList" :clear="false"
 						@change="handleFurnaceNumberChange"></uni-data-select>
-					<!-- <input id="HeatNo" class="uni-input" v-model="basicInfo.heatNo" placeholder="请填写" /> -->
-					<!-- <text id="HeatNo" class="uni-input">{{basicInfo.heatNo}}</text> -->
 				</view>
 				<!-- <view class='segment' style="width: 90%;margin: 20rpx auto;"></view> -->
 				<view class="uni-row info">
@@ -115,7 +113,6 @@
 					<text id="SecondTechnicalRequirement"
 						class="material uni-input">{{ basicInfo.SecondTechnicalRequirement ? basicInfo.SecondTechnicalRequirement : '-' }}</text>
 				</view>
-				<!-- <view class='segment' style="width: 90%;margin: 20rpx auto;"></view> -->
 			</view>
 		</view>
 		<view class='bottom uni-row'>

+ 10 - 2
pages/batchReporting/index.vue

@@ -259,10 +259,18 @@
 				}).then(response => {
 					if (response.code == 200) {
 						console.log(response)
-						lotDialog.value.open(response.data);
+						if (response.data[0].productionPlanDetailId == store.planDetails.id) {
+							uni.showToast({
+								icon: 'none',
+								title: '该批次不在此计划单内',
+								duration: 2000
+							})
+						} else {
+							lotDialog.value.open(response.data);
+						}
 					}
 				})
-			}
+			} 
 		});
 	}
 

+ 25 - 20
pages/handlingList/index.vue

@@ -1,22 +1,23 @@
 <template>
 	<view class='container uni-column'>
 		<view class='nav uni-row'>
-			<text :class='pendingClass' @click='selectPending'>{{pendingTitle}}</text>
-			<text :class='turnoverClass' @click='selectTurnover'>{{turnoverTitle}}</text>
+			<text :class='pendingClass' @click='selectPending'>带周转</text>
+			<text :class='turnoverClass' @click='selectTurnover'>周转中</text>
 			<!-- <image class='img' src="../../static/screen.png"></image> -->
 		</view>
 		<!-- 待周转页面 -->
 		<view class="padding-container" v-if='pendingShow'>
-			<view class="scroll-container" scroll-y>
+			<view class="scroll-container" >
 				<view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
 					<text>暂无待周转批次</text>
 				</view>
-				<view v-else v-for="(item, index) in listData" :key="index" 
-					:class="{'list-item':true,'selected':isSelected(item)}">  
+				<view v-else v-for="(item, index) in listData" :key="index"
+					:class="{'list-item':true,'selected':isSelected(item)}">
 					<!-- @click="handleSelection(item)" -->
-					<view class="title-container uni-row"> 
+					<view class="title-container uni-row">
 						<view class="title uni-row">
-							<text class="label" style="max-width: 200rpx; overflow: auto;">{{ item['turnoverArea'] }}</text>
+							<text class="label" style="max-width: 180rpx;height: 32rpx;overflow: hidden;text-overflow: ellipsis;
+							white-space: nowrap;">{{ item['turnoverArea'] }}</text>
 							<text class="label code">{{ item['preDeptName'] }}</text>
 							<text class="label code" style="margin-left: 16rpx;">→</text>
 							<text class="label code" style="margin-left: 16rpx;">{{ item['deptName'] }}</text>
@@ -56,7 +57,7 @@
 		</view>
 		<!-- 周转中页面 -->
 		<view class='turnover-container' v-if='turnoverShow'>
-			<view class="scroll-container" scroll-y>
+			<view class="scroll-container" >
 				<view v-if="lotList.length == 0" style="color: #999;margin: 50% auto;">
 					<text>暂无周转中批次</text>
 				</view>
@@ -72,12 +73,13 @@
 					<view :class="{'list-container':true,'selected':isSelected(item)}" v-for="(item,index) in lotList"
 						@click="handleSelection(item)" :key='index'>
 						<view class="turnover-title uni-row">
-							<view class="uni-row" style="align-items: center;"> 
+							<view class="uni-row" style="align-items: center;">
 								<view><text class='title-color'>{{ item[0]['totalCarrier'] }}箱</text></view>
-								<view><text class="second-info">{{item[0].preDeptName + '→' + item[0].deptName }}</text></view>
-							</view> 
+								<view><text class="second-info">{{item[0].preDeptName + '→' + item[0].deptName }}</text>
+								</view>
+							</view>
 						</view>
-						<view v-for="(lot,index) in item" :key="index" style="margin-bottom: 10rpx;"> 
+						<view v-for="(lot,index) in item" :key="index" style="margin-bottom: 10rpx;">
 							<view class="list-container-item product-description uni-row">
 								<text class="label left-value">产品描述</text>
 								<text class="label right-value">{{lot['productDescription']}}</text>
@@ -117,7 +119,8 @@
 	// import pending from './pending';
 	// import turnover from './turnover';
 	import {
-		getDayWorkItemList,getItemList
+		getDayWorkItemList,
+		getItemList
 	} from '@/api/business/dayWorkItem.js'
 	import {
 		updateDayWorkItem,
@@ -128,8 +131,6 @@
 	} from '@/api/dict/dict.js'
 
 
-	const pendingTitle = ref('待周转')
-	const turnoverTitle = ref('周转中')
 	const sum = ref(0)
 	const pendingClass = ref({
 		selecter: true
@@ -251,19 +252,19 @@
 	function isSelected(item) {
 		//单选
 		return selection.value == item;
-		
+
 		//多选
 		// return selection.value.includes(item);
 	}
 
 	function handleSelection(item) {
 		// 单选
-		if(selection.value == item){
+		if (selection.value == item) {
 			selection.value = []
-		}else{
+		} else {
 			selection.value = item;
 		}
-		
+
 		// 多选
 		// const buttonIndex = selection.value.findIndex(selectedItem => selectedItem === item);
 		// if (buttonIndex > -1) {
@@ -372,7 +373,9 @@
 	}
 
 	.padding-container {
-		.scroll-container {
+		.scroll-container { 
+			max-height: 90%;
+			overflow: auto;
 			.list-item {
 				background-color: #fff;
 				padding: 0 24rpx;
@@ -434,6 +437,8 @@
 	/* 周转中样式 */
 	.turnover-container {
 		.scroll-container {
+			height: 90%;
+			overflow: scroll;
 			.item-container {
 				// height: 90%;
 				// padding: 8rpx 0 32rpx 0;

+ 7 - 8
pages/reportingForWork/index.vue

@@ -195,15 +195,14 @@
 	}
 
 	function HandleSeleteInviteUser(data) {
-		if (data.some(item => item.status == 0)) {
-			uni.showToast({
-				icon: 'none',
-				title: '请报工选择工序后再邀请协作者'
-			})
-		} else {
+		// if (data.some(item => item.status == 0)) {
+		// 	uni.showToast({
+		// 		icon: 'none',
+		// 		title: '请报工选择工序后再邀请协作者'
+		// 	})
+		// } else {
 			inviteUser.value.open(data)
-		}
-
+		// }
 	}
 
 	function HandleChangevehicle() {