From ca2200ba53b236e8902b706c444375408c782f07 Mon Sep 17 00:00:00 2001
From: Mr.Zhang <710666463@qq.com>
Date: 星期一, 18 九月 2023 15:58:45 +0800
Subject: [PATCH] 09-18 小程序
---
minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue | 206 ++++++++++++++++++++++++++++----------------------
1 files changed, 115 insertions(+), 91 deletions(-)
diff --git a/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue b/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue
index 31082f7..b30721a 100644
--- a/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue
+++ b/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue
@@ -1,7 +1,11 @@
<template>
- <view>
- <workOrderInfo :orederMessage="info" />
- <div class="bg_list">
+ <view class="content">
+ <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 v-if="typeView==0" class="bg_list">
<div class="bg_list_item">
<div class="bg_list_item_top">
<div class="bg_list_item_top_left">
@@ -11,9 +15,9 @@
</div>
<template v-if="feedingData && feedingData.length > 0">
- <view>
- <view v-for="(item, index) in feedingData" :key="index">
- <div class="bg_list_item_h">
+ <view class="plr30">
+ <view >
+ <div v-for="(item, index) in feedingData" :key="index" class="bg_list_item_h">
<div class="bg_list_item_num">
<div class="bg_list_item_num_item">
<div class="bg_list_item_num_item_wl">
@@ -30,7 +34,7 @@
<div class="bg_list_item_num_item_sr">
<view class="cY">
<view class="mr10">{{ item.num }}</view>
- <span v-if="info.umodel">{{ info.umodel.name }}</span>
+ <span>{{ item.unitName }}</span>
</view>
</div>
@@ -59,7 +63,7 @@
</div>
</div>
<div class="bg_list_item_h">
- <div class="bg_list_item_num">
+ <div class="bg_list_item_num plr30">
<div class="bg_list_item_num_item">
<span>鑹搧鏁皗{ info.umodel ? `(${info.umodel.name})` : '' }}</span>
<div class="bg_list_item_num_item_sr">
@@ -70,7 +74,7 @@
</div>
</div>
<div class="bg_list_item_h">
- <div class="bg_list_item_num">
+ <div class="bg_list_item_num plr30">
<div class="bg_list_item_num_item">
<span>涓嶈壇鏁皗{ info.umodel ? `(${info.umodel.name})` : '' }}</span>
<div class="bg_list_item_num_item_sr">
@@ -85,21 +89,72 @@
<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>
+ <span>宸ヨ祫缁╂晥</span>
</div>
</div>
+ <div class="bg_list_item_h mb40 ">
+ <div class="bg_list_item_num plr30" style="display: block;">
+ <div class="bX ptb15">
+ <div class="f30 c2">棰勮宸ヨ祫</div>
+ <div class="f28" style="color:#4275FC">{{ (performance.salary / 10 / 10).toFixed(2) }}鍏�</div>
+ </div>
+ <div class="f24 c6">
+ {{ performance.salaryType == 0 ? '璁′欢' : '璁℃椂' }} |
+ {{ (performance.salaryPrice / 10 / 10).toFixed(2) }}鍏�/{{ performance.salaryType ==
+ 0 ? '浠�' : '鏃�' }} |
+ {{ 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">
- <scroll-view scroll-y="true" refresher-enabled="true" @scrolltolower="getLists">
- <view v-for="(item, index) in djData" :key="index">
- <div class="details_dj_list_item">
- <span>{{ item.attrName }}锛歿{ item.val }}</span>
- <span>{{ item.userName }} {{ item.createTime }}</span>
- </div>
- </view>
- </scroll-view>
+ <view v-for="(item, index) in djData" :key="index">
+ <div class="details_dj_list_item">
+ <span>{{ item.attrName }}锛歿{ item.val }}</span>
+ <span>{{ item.userName }} {{ item.createTime }}</span>
+ </div>
+ </view>
+ <!-- <scroll-view scroll-y="true" refresher-enabled="true" @scrolltolower="getLists">
+
+ </scroll-view> -->
</div>
</div>
</template>
@@ -109,50 +164,7 @@
</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>
+ </div>
</view>
</template>
@@ -189,7 +201,14 @@
workOrderInfo
},
data() {
- return {
+ return {
+ cate: [{
+ name: '鐢熶骇'
+ },
+ {
+ name: '鐐规'
+ }
+ ],
workorderId: '',
form: {
time: '',
@@ -248,19 +267,22 @@
complianceRate() {
if (!this.performance) return 0;
if (!this.performance.duration) return 0;
+ if (!this.performance.salaryNum || this.performance.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)
+ let b = (this.performance.salaryNum / (this.performance.salaryTimes / 3600)).toFixed(2)
+ debugger
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)
+ let b = (this.performance.salaryNum / (this.performance.salaryTimes / 3600)).toFixed(2)
+ debugger
return ((Number(a) / Number(b)) * 100).toFixed(2)
}
}
@@ -484,8 +506,7 @@
getWorkorderRecordListStandard({
workorderId: this.workorderId
}).then(res => {
- console.log(res.data[0]);
- debugger
+ // console.log(res.data[0]);
if (res.data.length > 0) {
this.produceFrom.qualified = res.data[0].qualifiedNum
this.produceFrom.undesirable = res.data[0].unqualifiedNum
@@ -503,14 +524,18 @@
}
</script>
-<style lang="scss" scoped>
+<style lang="scss" scoped>
+ .content {
+ height: 100vh;
+ background-color: #f7f7f7;
+ }
.bg_cate {
width: 100%;
height: 88rpx;
background: #FFFFFF;
display: flex;
align-items: center;
-
+ border-top: 20rpx solid #f7f7f7;
.active {
box-sizing: border-box;
color: #305ED5 !important;
@@ -542,16 +567,7 @@
// margin-bottom: 40rpx;
// border-bottom: 40rpx #f7f7f7 solid;
- .kong {
- text-align: center;
- padding: 30rpx 0;
- background: #ffffff;
- font-size: 25rpx;
-
- span {
- color: #474747;
- }
- }
+
.bg_list_item_top {
display: flex;
@@ -621,23 +637,21 @@
.bg_list_item_h {
width: 100%;
- padding: 0 30rpx;
box-sizing: border-box;
background: white;
-
+ border-bottom: 1rpx solid #E5E5E5;
+ padding: 15rpx 0;
+ &:last-child {
+ border: none !important;
+ }
.bg_list_item_num {
width: 100%;
min-height: 98rpx;
- background: white;
+ background: white;
+ box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
- border-bottom: 1rpx solid #E5E5E5;
-
- &:last-child {
- border: none !important;
- }
-
.kong {
text-align: center;
font-size: 25rpx;
@@ -651,10 +665,10 @@
display: flex;
align-items: center;
// height: 118rpx;
- padding: 15rpx 0;
+ // padding: 15rpx 0;
box-sizing: border-box;
justify-content: space-between;
- border-bottom: 1rpx solid #E5E5E5;
+ // border-bottom: 3rpx solid #111;
&:last-child {
border: none;
@@ -1054,5 +1068,15 @@
}
}
}
+ }
+ .kong {
+ text-align: center;
+ padding: 30rpx 0;
+ // background: #ffffff;
+ font-size: 25rpx;
+
+ span {
+ color: #474747;
+ }
}
</style>
--
Gitblit v1.9.3