From 7670b46439a73e425be42a0fcf79930f2a9a1ea4 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期一, 20 十月 2025 13:58:23 +0800
Subject: [PATCH] 界面优化
---
components/WorkOrder.vue | 75 +++++++++++++++++++++----------------
1 files changed, 43 insertions(+), 32 deletions(-)
diff --git a/components/WorkOrder.vue b/components/WorkOrder.vue
index e0948d0..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="todayOnlineTime-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;
}
@@ -396,33 +407,33 @@
title: title
});
},
- getSJByOrder() {
- this.$post({
- url: "/MesQaItemsDetect02/FindSJByOrderNo",
- data: {
- orderNo: this.orderNo
- }
- }).then(res => {
- let sjList = res.data.tbBillList;
- if (Array.isArray(sjList) && sjList.length > 0) {
- let latest = sjList[0];
- this.lastInitialCheck = latest.fcheckDate;
- this.initialConclusion = latest.fcheckResu;
- 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.fcheckBy; // 棣栨浜哄憳锛堝伐鍙�-濮撳悕锛�
- this.initialCount = sjList.xjCount ?? 1;
- } else {
- this.lastInitialCheck = '';
- this.initialConclusion = '';
- this.initialInspector = '';
- this.initialCount = 0;
- }
- })
- },
+ getSJByOrder() {
+ this.$post({
+ url: "/MesQaItemsDetect02/FindSJByOrderNo",
+ data: {
+ orderNo: this.orderNo
+ }
+ }).then(res => {
+ let sjList = res.data.tbBillList;
+ if (Array.isArray(sjList) && sjList.length > 0) {
+ let latest = sjList[0];
+ this.lastInitialCheck = latest.fcheckDate;
+ this.initialConclusion = latest.fcheckResu;
+ 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.fcheckBy; // 棣栨浜哄憳锛堝伐鍙�-濮撳悕锛�
+ this.initialCount = sjList.xjCount ?? 1;
+ } else {
+ this.lastInitialCheck = '';
+ this.initialConclusion = '';
+ this.initialInspector = '';
+ this.initialCount = 0;
+ }
+ })
+ },
getXJByOrder() {
this.$post({
url: "/MesQaItemsDetect02/FindXJByOrderNo",
--
Gitblit v1.9.3