From 083874dd1224587ae25d3bf87bd0aa02e324a491 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期一, 20 十月 2025 13:35:07 +0800
Subject: [PATCH] 表格修改
---
components/WorkOrder.vue | 40 ++++++++++++++++++++++++++--------------
1 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/components/WorkOrder.vue b/components/WorkOrder.vue
index 0d841b9..bd2864a 100644
--- a/components/WorkOrder.vue
+++ b/components/WorkOrder.vue
@@ -77,12 +77,13 @@
<view class="section card">
<view class="form-row">
<view class="form-item">
- <label style="color: red;">鏃ュ仠鏈烘鏁�(鏃堕暱瓒�5鍒嗛挓):</label>
- <input class="inp" style="width: 40%;" type="number" v-model="todayFaultNum" disabled="true" />
+ <label style="color: red;">鏃ュ仠鏈烘鏁�(鏃堕暱瓒�3鍒嗛挓):</label>
+ <input class="inp" style="width: 40%;" type="number" v-model="order.todayDowntimeCount" disabled="true" />
</view>
<view class="form-item">
<label>鏃ュ仠鏈烘椂闀�(mi):</label>
- <input class="inp" type="text" v-model="todayRunTime" disabled="true" />
+ <!-- 杩欓噷鐢ㄨ绠楀睘鎬э紝涓嶈兘鐢╲-model琛ㄨ揪寮� -->
+ <input class="inp" type="text" :value="downtimeDuration" disabled="true" />
</view>
<view class="form-item">
<label>璁惧绋煎姩鐜�:</label>
@@ -181,6 +182,15 @@
DAA003List: [],
lineList: [],
};
+ },
+ computed: {
+ // 鏃ュ仠鏈烘椂闀� = todayOnlineTime - todayRunTime
+ downtimeDuration() {
+ // 鍙杘rder瀵硅薄涓殑todayOnlineTime鍜宼odayRunTime锛岄兘涓哄垎閽�
+ const online = Number(this.order.todayOnlineTime) || 0;
+ const run = Number(this.order.todayRunTime) || 0;
+ return online - run;
+ }
},
created() {
this.fetchData(true);
@@ -363,8 +373,9 @@
cutterName, //鍒�鍏峰悕绉�
cutterModel, //鍒�鍏疯鏍�
jdl: '',
- startCjNum: 0, // 鏂板鍏滃簳瀛楁 淇濈暀鍏跺畠娉ㄩ噴
- currentCjNum: 0 // 鏂板鍏滃簳瀛楁
+ startCjNum: 0, // 寮�宸ユ暟閲�
+ currentCjNum: 0, // 褰撳墠鏁伴噰
+ todayDowntimeCount //浠婃棩鍋滄満娆℃暟
};
return;
}
@@ -386,11 +397,12 @@
//this.productionDuration = (this.order.todayOnlineTime / 3600).toFixed(2) + "h";
this.todayFaultNum = this.order.todayFaultNum;
this.utilizationRate = this.order.jdl + '%';
- let title = this.machineNo + '鍙锋満鍙� 宸ュ崟鍙�' + this.order.daa001 + ',褰撳墠鏁伴噰' + this.order.currentCjNum;
+ let title = this.machineNo + '鍙锋満鍙� 宸ュ崟鍙�' + this.order.daa001 + ',褰撳墠鏁伴噰' + this.order.currentCjNum; // 鏍囬涓娇鐢� currentCjNum
this.setTitle(title);
})
},
setTitle(title) {
+ // 淇敼椤甸潰鏍囬鐨勬柟娉曪紝uni-app涓彲浠ラ�氳繃api鐩存帴璁剧疆褰撳墠椤甸潰鐨勬爣棰�
uni.setNavigationBarTitle({
title: title
});
@@ -407,13 +419,13 @@
let latest = sjList[0];
this.lastInitialCheck = latest.fcheckDate;
this.initialConclusion = latest.fcheckResu;
- this.initialInspector = latest.checkUser;
- this.initialCount = sjList.length;
+ this.initialInspector = latest.fcheckBy; // 棣栨浜哄憳锛堝伐鍙�-濮撳悕锛�
+ this.initialCount = latest.xjCount ?? sjList.length; // 浼樺厛鐢▁jCount瀛楁
} else if (sjList) {
this.lastInitialCheck = sjList.fcheckDate;
this.initialConclusion = sjList.fcheckResu;
- this.initialInspector = sjList.checkUser;
- this.initialCount = 1;
+ this.initialInspector = sjList.fcheckBy; // 棣栨浜哄憳锛堝伐鍙�-濮撳悕锛�
+ this.initialCount = sjList.xjCount ?? 1;
} else {
this.lastInitialCheck = '';
this.initialConclusion = '';
@@ -434,13 +446,13 @@
let latest = xjList[0];
this.lastPatrolCheck = latest.fcheckDate;
this.patrolConclusion = latest.fcheckResu;
- this.patrolInspector = latest.checkUser;
- this.patrolCount = xjList.length;
+ this.patrolInspector = latest.fcheckBy; // 宸℃浜哄憳锛堝伐鍙�-濮撳悕锛�
+ this.patrolCount = latest.xjCount ?? xjList.length;
} else if (xjList) {
this.lastPatrolCheck = xjList.fcheckDate;
this.patrolConclusion = xjList.fcheckResu;
- this.patrolInspector = xjList.checkUser;
- this.patrolCount = 1;
+ this.patrolInspector = xjList.fcheckBy; // 宸℃浜哄憳锛堝伐鍙�-濮撳悕锛�
+ this.patrolCount = xjList.xjCount ?? 1;
} else {
this.lastPatrolCheck = '';
this.patrolConclusion = '';
--
Gitblit v1.9.3