From 349bcef9a96391d22522a3409adf5a89e7e70a95 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 24 十月 2023 08:46:11 +0800
Subject: [PATCH] Merge branch 'dev' of http://139.186.142.91:10010/r/productDev/dmMes into dev

---
 minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue |   97 +++++++++++++++++-------------------------------
 1 files changed, 34 insertions(+), 63 deletions(-)

diff --git a/minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue b/minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue
index 972c805..bd72004 100644
--- a/minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue
+++ b/minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue
@@ -1,6 +1,6 @@
 <template>
 	<page-meta :page-style="(badShow||statistics) ?'overflow: hidden;': ''"/>
-	<view>
+	<view class="content">
 		<view class="tips-label">褰撳墠浠诲姟闇�瑕佽川妫�锛涗骇鍑哄悗锛岃鑰愬績绛夊緟璐ㄦ鍛樻楠岋紝骞舵牴鎹楠岀粨鏋滆皟鏁翠骇鍑烘暟鎹悗鍐嶆姤宸ャ��</view>
 		<workOrderInfo :orederMessage="info" />
 		<!-- <u-tabs :list="tab" lineColor="#305ED5" :activeStyle="{color:'#305ED5'}" lineWidth="50%" :itemStyle="{width: '50%', boxSizing: 'border-box', height: '88rpx'}" @click="click"></u-tabs> -->
@@ -22,7 +22,7 @@
 						<!-- <img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt="" /> -->
 						<!-- <img src="@/static/gongdan_ic_shoudong@2x.ong" alt="" /> -->
 						<image src="../../static/gongdan_ic_shoudong@2x.png" class="img28" mode=""></image>
-						<span class="cm">鎵嬪姩褰曞叆</span>
+						<span class="cm">鎵嬪姩鎶曟枡</span>
 					</div>
 				</div>
 
@@ -38,11 +38,11 @@
 											<span> {{ item.materialName || '澧欎綋鐮�' }}{{ item.procedureName ? `&nbsp;|&nbsp;${item.procedureName}` : ''
 							            }}</span>
 											<div class="bg_list_item_num_item_wl_lx">
-												<span class="green" v-if="item.qualityType == 0">鍚堟牸&nbsp;/&nbsp;</span>
-												<span class="orange" v-if="item.qualityType == 1">涓嶈壇&nbsp;/&nbsp;</span>
-												<span class="red" v-if="item.qualityType == 2">鎶ュ簾&nbsp;/&nbsp;</span>
+												<span class="green" v-if="item.qualityType == 0">鍚堟牸<text class="c6" decode>{{split}}</text></span>
+												<span class="orange" v-if="item.qualityType == 1">涓嶈壇<text class="c6" decode>{{split}}</text></span>
+												<span class="red" v-if="item.qualityType == 2">鎶ュ簾<text class="c6" decode>{{split}}</text></span>
 												<span>{{ item.locationName }}</span>
-												<span>{{ item.batch ? `&nbsp;/&nbsp;${item.batch}` : '' }}</span>
+												<span v-if="item.batch"><text class="c6" decode>{{split}}</text>{{ item.batch }}</span>
 											</div>
 										</div>
 										<div class="bg_list_item_num_item_sr">
@@ -305,7 +305,8 @@
 					{
 						name: '鐐规'
 					}
-				],
+				],
+				split: '&nbsp;/&nbsp;',
 				form: {
 					time: '',
 					defective: [],
@@ -366,42 +367,45 @@
 			})
 		},
 		computed: {
-			expectedSalary() {
-				if (this.arrType.length === 0) return 0;
+			expectedSalary() {
+				let { qualified, undesirable } = this.produceFrom
+				if (this.arrType.length === 0) return 0;
+				let temp = this.arrType[this.form.index]
 				// 鎸変欢璁$畻
-				if (this.arrType[this.form.index].type == 0) {
-					if (!this.produceFrom.qualified) return 0
-					if (this.arrType[this.form.index].unqualified == 1) { // 鏄惁璁″叆涓嶈壇鍝�
-						let total = Number(this.produceFrom.qualified) + Number(this.produceFrom.undesirable)
-						return (total * (this.arrType[this.form.index].salary / 100)).toFixed(2) || 0
+				if (temp.type == 0) {
+					if (!qualified) return 0
+					if (temp.unqualified == 1) { // 鏄惁璁″叆涓嶈壇鍝�
+						let total = Number(qualified) + Number(undesirable)
+						return (total * (temp.salary / 100)).toFixed(2) || 0
 					} else {
-						return (Number(this.produceFrom.qualified) * (this.arrType[this.form.index].salary / 100)).toFixed(
+						return (Number(qualified) * (temp.salary / 100)).toFixed(
 							2) || 0
 					}
 				} else {
 					if (!this.form.duration) return 0;
 					let h = (this.form.duration / 60 / 60).toFixed(2)
-					return (Number(h) * (this.arrType[this.form.index].salary / 10 / 10)).toFixed(2) || 0
+					return (Number(h) * (temp.salary / 10 / 10)).toFixed(2) || 0
 				}
 			},
 			complianceRate() {
 				let { index, duration } = this.form
 				let { qualified, undesirable } = this.produceFrom
-				if (this.arrType.length === 0) return 0;
-				if (!qualified && !undesirable) return 0;
+				if (this.arrType.length === 0) return 0;
+				let temp = this.arrType[index]
+				if (!qualified && !undesirable) return 0;
 				if (!duration) return 0;
-				if (!this.arrType[index].num) return 0;
+				if (!temp.num || !temp.times) return 0;
 				// 鎸変欢璁$畻
 				// if (infoBox.value.type == 0) {
-				if (this.arrType[index].unqualified == 1) { // 鏄惁璁″叆涓嶈壇鍝�
-					let a = ((Number(qualified) + Number(undesirable)) / (duration / 3600)).toFixed(2)
-					let b = (this.arrType[index].num / (this.arrType[index].times / 3600)).toFixed(2)
+				if (temp.unqualified == 1) { // 鏄惁璁″叆涓嶈壇鍝�
+					let a = ((Number(qualified) + Number(undesirable)) / (Number(duration) / 3600)).toFixed(2)
+					let b = (temp.num / (temp.times / 3600)).toFixed(2)
 					return ((Number(a) / Number(b)) * 100).toFixed(2)
 					// let total = (Number(from.qualified) + Number(from.undesirable)) / ((from.duration * 60 * 60) * infoBox.value.num / )
 					// return total * infoBox.value.salary;
 				} else {
-					let a = (qualified / (duration / 3600)).toFixed(2)
-					let b = (this.arrType[index].num / (this.arrType[index].times / 3600)).toFixed(2)
+					let a = (Number(qualified) / (Number(duration) / 3600)).toFixed(2)
+					let b = (temp.num / (temp.times / 3600)).toFixed(2)
 					return ((Number(a) / Number(b)) * 100).toFixed(2)
 					// return Number(from.qualified) * infoBox.value.salary;
 				}
@@ -653,8 +657,6 @@
 						})
 						this.isSubmit = Number(this.produceFrom.qualified) + Number(this.produceFrom.undesirable) <= this
 							.info.planNum;
-						console.log(this.isSubmit);
-						debugger
 					}
 					
 				} else {
@@ -779,36 +781,6 @@
 					}
 				})
 			},
-			// => {
-			//   // if (!from.duration || from.duration <= 0) {
-			//   //     return Toast('鎶ュ伐鏃堕暱涓嶈兘涓虹┖')
-			//   // }
-			//   let createUnqualifiedDTOList = from.defective.map(item => {
-			//     return {
-			//       categoryId: item.id,
-			//       unQualifiedNum: item.num
-			//     }
-			//   })
-			//   let createWorkorderRecordDTO = {
-			//     workorderId: route.query.id,
-			//     duration: from.duration ? from.duration : 0,
-			//     qualifiedNum: produceFrom.qualified ? produceFrom.qualified : 0,
-			//     unQualifiedNum: produceFrom.undesirable ? produceFrom.undesirable : 0
-			//   }
-			//   // id: route.query.id
-			//   comfirmDoneStandard({
-			//     createUnqualifiedDTOList,
-			//     createWorkorderRecordDTO
-			//   }).then(res => {
-			//     if (res.code === 200) {
-			//       Toast.success({ message: '鎶ュ伐鎴愬姛', forbidClick: true, duration: 2000 })
-			//       setTimeout(() => {
-			//         router.go(-2)
-			//       }, 2000)
-			//     }
-			//   })
-			// }
-
 			jumpdj() {
 				uni.navigateTo({
 					url: `/pages_adjust/pages/spotCheck/spotCheck?id=${this.workorderId}`
@@ -1068,7 +1040,7 @@
 					background: white;
 					display: flex;
 					justify-content: center;
-					align-items: center;
+					align-items: center;
 					border-bottom: 1rpx solid #E5E5E5;
 					.kong {
 						text-align: center;
@@ -1076,7 +1048,6 @@
 						padding: 30rpx 0;
 						background: #ffffff;
 					}
-
 					.bg_list_item_num_item {
 						width: 100%;
 						height: 100%;
@@ -1086,11 +1057,7 @@
 						padding: 15rpx 0;
 						box-sizing: border-box;
 						justify-content: space-between;
-						border-bottom: 1rpx solid #E5E5E5;
-
-						&:last-child {
-							border: none;
-						}
+						
 
 						.bg_list_item_num_item_list {
 							display: flex;
@@ -1604,5 +1571,9 @@
 			font-weight: 500;
 			color: #FFFFFF;
 		}
+	}
+	.content {
+		height: 100vh;
+		background-color: #f7f7f7;
 	}
 </style>

--
Gitblit v1.9.3