From ea87c908fb6cdfc3e227a584a53e6730efb8262a Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 26 十月 2023 13:41:12 +0800
Subject: [PATCH] 小程序代码
---
minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue | 127 +++++++++++++++++------------------------
1 files changed, 53 insertions(+), 74 deletions(-)
diff --git a/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue b/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue
index 31082f7..5b49724 100644
--- a/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue
+++ b/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue
@@ -1,6 +1,10 @@
<template>
<view>
<workOrderInfo :orederMessage="info" />
+ <!-- <view class="bg_cate">
+ <view @click="clickIten(index)" :class="typeView == index ? 'bg_cate_item active' : 'bg_cate_item'"
+ v-for="(item, index) in cate" :key="index">{{ item.name }}</view>
+ </view> -->
<div class="bg_list">
<div class="bg_list_item">
<div class="bg_list_item_top">
@@ -109,49 +113,6 @@
</div>
</template>
</div>
- <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>
- <div class="bg_list_item_h">
- <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">{{ (performance.salary / 10 / 10).toFixed(2) }}鍏�</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>
</view>
@@ -191,6 +152,13 @@
data() {
return {
workorderId: '',
+ cate: [{
+ name: '鐢熶骇'
+ },
+ {
+ name: '鐐规'
+ }
+ ],
form: {
time: '',
efective: [],
@@ -218,24 +186,17 @@
qualified: '', // 鍚堟牸
undesirableId: '',
undesirable: 5 // 涓嶈壇
- },
- pages: {
- capacity: 10,
- page: 1,
- total: 0
},
djData: [],
cateList: [],
- finished: true,
- performance: {}
+ finished: true,
};
},
onLoad(obj) {
this.workorderId = obj.id
this.queryByIds()
this.getOrocessRecords()
- this.getData()
- this.pageDJs()
+ this.getData()
this.getOrocessRecordCC()
uni.$on('spotAdd', () => {
if (this.typeView == 1) {
@@ -245,23 +206,43 @@
})
},
computed: {
+ expectedSalary() {
+ if (this.arrType.length === 0) return 0;
+ // 鎸変欢璁$畻
+ 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
+ } else {
+ return (Number(this.produceFrom.qualified) * (this.arrType[this.form.index].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
+ }
+ },
complianceRate() {
- if (!this.performance) return 0;
- if (!this.performance.duration) 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
+ if (this.arrType.length === 0) return 0;
+ if (!this.produceFrom.qualified && !this.produceFrom.undesirable) return 0;
+ if (!this.form.duration) return 0;
+ if (!this.arrType[this.form.index].num) return 0;
+ // 鎸変欢璁$畻
+ // if (infoBox.value.type == 0) {
+ if (this.arrType[this.form.index].unqualified == 1) { // 鏄惁璁″叆涓嶈壇鍝�
+ let a = ((Number(this.produceFrom.qualified) + Number(this.produceFrom.undesirable)) / (this.form
.duration / 3600)).toFixed(2)
- let b = (this.performance.salaryNum / (this.performance.salaryTimes / 3600)).toFixed(2)
+ let b = (this.arrType[this.form.index].num / (this.arrType[form.index].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 = (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)
+ } else {
+ let a = (this.produceFrom.qualified / (this.form.duration / 3600)).toFixed(2)
+ let b = (this.arrType[this.form.index].num / (this.arrType[this.form.index].times / 3600)).toFixed(2)
return ((Number(a) / Number(b)) * 100).toFixed(2)
+ // return Number(from.qualified) * infoBox.value.salary;
}
}
},
@@ -287,7 +268,7 @@
this.pageDJs()
}
},
- getLists() {
+ getLists() {
if (!this.finished) {
return
}
@@ -362,7 +343,7 @@
url: `/pages_inspect/pages/InspectionRecords/InspectionRecords?id=${this.workorderId}`
})
},
- pageDJs() {
+ pageDJs() {
pageDJ({
capacity: this.pages.capacity,
page: this.pages.page,
@@ -446,7 +427,7 @@
},
queryByIds() {
queryById(this.workorderId)
- .then(res => {
+ .then(res => {
this.info = res.data
queryList({
deleted: 0,
@@ -483,13 +464,10 @@
getOrocessRecordCC() {
getWorkorderRecordListStandard({
workorderId: this.workorderId
- }).then(res => {
- console.log(res.data[0]);
- debugger
+ }).then(res => {
if (res.data.length > 0) {
this.produceFrom.qualified = res.data[0].qualifiedNum
this.produceFrom.undesirable = res.data[0].unqualifiedNum
- this.performance = res.data[0]
}
})
},
@@ -534,13 +512,13 @@
width: 100%;
display: flex;
flex-direction: column;
- // margin-top: 30rpx;
+ margin-top: 30rpx;
.bg_list_item {
display: flex;
flex-direction: column;
// margin-bottom: 40rpx;
- // border-bottom: 40rpx #f7f7f7 solid;
+ border-bottom: 40rpx #f7f7f7 solid;
.kong {
text-align: center;
@@ -557,8 +535,9 @@
display: flex;
align-items: center;
justify-content: space-between;
- padding: 30rpx;
- background-color: #f7f7f7;
+ padding-left: 30rpx;
+ padding-right: 30rpx;
+ margin-bottom: 30rpx;
.bg_list_item_top_left {
display: flex;
--
Gitblit v1.9.3