From 42853882a59754b918ed6414b990146514b9b189 Mon Sep 17 00:00:00 2001
From: Mr.Zhang <710666463@qq.com>
Date: 星期五, 22 九月 2023 20:34:39 +0800
Subject: [PATCH] 小程序
---
minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue | 80 +++++++++++----------------------------
1 files changed, 23 insertions(+), 57 deletions(-)
diff --git a/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue b/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue
index b30721a..d1fbfa3 100644
--- a/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue
+++ b/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue
@@ -15,7 +15,7 @@
</div>
<template v-if="feedingData && feedingData.length > 0">
- <view class="plr30">
+ <view class="plr30 bg_w">
<view >
<div v-for="(item, index) in feedingData" :key="index" class="bg_list_item_h">
<div class="bg_list_item_num">
@@ -24,11 +24,11 @@
<span> {{ item.materialName || '澧欎綋鐮�' }}{{ item.procedureName ? ` | ${item.procedureName}` : ''
}}</span>
<div class="bg_list_item_num_item_wl_lx">
- <span class="green" v-if="item.qualityType == 0">鍚堟牸 / </span>
- <span class="orange" v-if="item.qualityType == 1">涓嶈壇 / </span>
- <span class="red" v-if="item.qualityType == 2">鎶ュ簾 / </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 ? ` / ${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">
@@ -102,47 +102,13 @@
{{ performance.salaryType == 0 ? '璁′欢' : '璁℃椂' }} |
{{ (performance.salaryPrice / 10 / 10).toFixed(2) }}鍏�/{{ performance.salaryType ==
0 ? '浠�' : '鏃�' }} |
- {{ complianceRate }}%
+ 杈炬爣鐜囷細{{ complianceRate }}%
</div>
</div>
-
- <!-- <div class="bg_list_item_num">
- <div class="bg_list_item_num_item">
- <span>璁′欢鏂瑰紡</span>
- <div class="bg_list_item_num_item_list">
- {{ performance.salaryType == 0 ? '璁′欢' : '璁℃椂' }}
- </div>
- </div>
- </div> -->
- <!-- <div class="bg_list_item_num">
- <div class="bg_list_item_num_item">
- <span>宸ヨ祫鍗曚环</span>
- <div class="bg_list_item_num_item_sr">
- <span class="color1">{{ (performance.salaryPrice / 10 / 10).toFixed(2) }}鍏�/{{ performance.salaryType ==
- 0 ? '浠�' : '鏃�' }}</span>
- </div>
- </div>
- </div>
-
- <div class="bg_list_item_num">
- <div class="bg_list_item_num_item">
- <span>杈炬爣鐜�</span>
- <div class="bg_list_item_num_item_sr">
- <span class="color1">{{ complianceRate }}%</span>
- </div>
- </div>
- </div> -->
</div>
</div>
</div>
<div v-else class="bg_list">
- <!-- <div class="bg_list_item">
- <div class="bg_list_item_top">
- <div class="bg_list_item_top_left">
- <div class="bg_list_item_top_left_x bg_m"></div>
- <span>鐢熶骇鐐规</span>
- </div>
- </div> -->
<template v-if="djData && djData.length > 0">
<div class="details_dj">
<div class="details_dj_list">
@@ -208,7 +174,8 @@
{
name: '鐐规'
}
- ],
+ ],
+ split: ' / ',
workorderId: '',
form: {
time: '',
@@ -264,25 +231,23 @@
})
},
computed: {
- complianceRate() {
+ complianceRate() {
if (!this.performance) return 0;
- if (!this.performance.duration) return 0;
- if (!this.performance.salaryNum || this.performance.salaryTimes) return 0
+ let {duration, salaryNum, salaryTimes, qualifiedNum, unqualifiedNum, salaryUnqualified} = this.performance
+ // 鎶ュ伐鏃堕暱
+ if (!duration) return 0;
+ // 鎶ュ伐鏁伴噺
+ if (!qualifiedNum && !unqualifiedNum) return 0;
+ // 鏍囧噯鏁伴噺銆佹椂闀�
+ if (!salaryNum || !salaryTimes) return 0
- if (!this.performance.qualifiedNum && !this.performance.unqualifiedNum) return 0;
- if (this.performance.salaryUnqualified == 1) { // 鏄惁璁″叆涓嶈壇鍝�
- let a = ((Number(this.performance.qualifiedNum) + Number(this.performance.unqualifiedNum)) / (this.performance
- .duration / 3600)).toFixed(2)
- let b = (this.performance.salaryNum / (this.performance.salaryTimes / 3600)).toFixed(2)
- debugger
+ if (salaryUnqualified == 1) { // 鏄惁璁″叆涓嶈壇鍝�
+ let a = ((Number(qualifiedNum) + Number(unqualifiedNum)) / (duration / 3600)).toFixed(2)
+ let b = (salaryNum / (salaryTimes / 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 = (this.performance.qualifiedNum / (this.performance.duration / 3600)).toFixed(2)
- // let b = (this.arrType[this.form.index].num / (this.arrType[this.form.index].times / 3600)).toFixed(2)
- let b = (this.performance.salaryNum / (this.performance.salaryTimes / 3600)).toFixed(2)
- debugger
+ let a = (qualifiedNum / (duration / 3600)).toFixed(2)
+ let b = (salaryNum / (salaryTimes / 3600)).toFixed(2)
return ((Number(a) / Number(b)) * 100).toFixed(2)
}
}
@@ -506,6 +471,7 @@
getWorkorderRecordListStandard({
workorderId: this.workorderId
}).then(res => {
+ debugger
// console.log(res.data[0]);
if (res.data.length > 0) {
this.produceFrom.qualified = res.data[0].qualifiedNum
@@ -535,7 +501,7 @@
background: #FFFFFF;
display: flex;
align-items: center;
- border-top: 20rpx solid #f7f7f7;
+ // border-top: 20rpx solid #f7f7f7;
.active {
box-sizing: border-box;
color: #305ED5 !important;
--
Gitblit v1.9.3