From 24a60698d12ccb23d132ba4c91d9eb7a4a303ca9 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期二, 14 十月 2025 15:50:24 +0800
Subject: [PATCH] 主界面优化
---
components/WorkOrder.vue | 78 +++++++++++++--------------------------
1 files changed, 26 insertions(+), 52 deletions(-)
diff --git a/components/WorkOrder.vue b/components/WorkOrder.vue
index 9330ee4..f96ad3b 100644
--- a/components/WorkOrder.vue
+++ b/components/WorkOrder.vue
@@ -19,7 +19,7 @@
<input class="inp" type="text" v-model="order.daa001" disabled="true" />
</view>
<view class="form-item">
- <label>鍒�鍏峰悕绉�:</label><!--鍒�鍏峰悕绉�???-->
+ <label>鍒�鍏峰悕绉�:</label>
<input class="inp" type="text" v-model="order.moldId" disabled="true" />
</view>
<view class="form-item">
@@ -53,12 +53,12 @@
</view>
<view class="form-row3">
<view class="form-item">
- <label>浜у搧缂栫爜:</label><!--浜у搧缂栫爜???-->
- <input class="inp" type="text" v-model="order.daa004" disabled="true" />
+ <label>浜у搧缂栫爜:</label>
+ <input class="inp" type="text" v-model="order.daa002" disabled="true" />
</view>
<view class="form-item">
- <label>浜у搧瑙勬牸:</label><!--寮�宸ユ暟閲囷細寮�宸ユ椂鐨勭疮璁$敓浜ф暟???-->
- <input class="inp" type="text" v-model="order.daa004" disabled="true" />
+ <label>浜у搧瑙勬牸:</label>
+ <input class="inp" type="text" v-model="order.daa005" disabled="true" />
</view>
<view class="form-item">
<label>鎶ュ伐鏁伴噺:</label>
@@ -180,13 +180,9 @@
};
},
created() {
-
this.fetchData(true);
-
this.sumbit();
-
this.init();
-
},
mounted() {
this.fetchData(false); // Initial fetch
@@ -196,7 +192,6 @@
clearInterval(this.timer); // Clear the timer on component destruction
},
methods: {
-
init() {
this.$post({
url: "/MesOrderSta/init",
@@ -236,25 +231,18 @@
});
},
-
onDaa003Change(event) {
-
let orde = this.lineList[this.DAA003List.indexOf(event)];
-
this.orderId = orde.id;
this.orderNo = orde.daa001;
-
//鍒囨崲涓烘柊鐨刬d
uni.setStorageSync('machine', this.machineNo);
uni.setStorageSync('orderId', this.orderId);
uni.setStorageSync('orderNo', this.orderNo);
-
this.fetchData(false);
-
this.sumbit();
},
sumbit() {
-
this.$post({
url: "/MesOrderSta/FindByOrderNo",
data: {
@@ -263,23 +251,17 @@
}
}).then(res => {
let statusForm = res.data.tbBillList;
-
this.startTime = res.data.tbBillList.startTime;
this.endTime = res.data.tbBillList.endTime;
-
this.productionDuration = "0m";
-
if (this.startTime) {
-
let date1 = new Date(this.startTime);
let date2 = new Date();
if (this.endTime) {
date2 = new Date(this.endTime);
}
-
// 璁$畻涓や釜鏃ユ湡涔嬮棿鐨勫樊寮傦紙浠ユ绉掍负鍗曚綅锛�
let differenceInMilliseconds = date2 - date1;
-
this.productionDuration = (differenceInMilliseconds / 60000).toFixed(2);
}
@@ -330,11 +312,9 @@
if (!this.orderId && !this.orderNo) {
return;
}
-
this.getOrderById();
this.getSJByOrder();
this.getXJByOrder();
-
if (flag) {
this.$post({
url: "/Womdaa/GetWomdaasByShow",
@@ -361,44 +341,39 @@
orderNo: this.orderNo
}
}).then(res => {
-
if (res.data.tbBillList == null) {
this.$showMessage("宸ュ崟涓嶅瓨鍦ㄦ垨鑰呮湭寮�宸ワ紝璇锋鏌�");
- // 淇濊瘉order涓哄璞★紝閬垮厤妯℃澘鎶ラ敊
- this.order = {
- daa001: '',
- moldId: '',
- daa008: '',
- daa004: '',
- daa003: '',
- daa011: '',
- daa018: '',
- machineNo: '',
- engineeringNo: '',
- todayOutput: 0,
- todayRunTime: '',
- todayFaultNum: 0,
- jdl: '',
- };
+ // 淇濊瘉order涓哄璞★紝閬垮厤妯℃澘鎶ラ敊
+ this.order = {
+ daa001: '',
+ moldId: '',
+ daa008: '',
+ daa004: '',
+ daa003: '',
+ daa002: '',
+ daa005: '',
+ daa011: '',
+ daa018: '',
+ machineNo: '',
+ engineeringNo: '',
+ todayOutput: 0,
+ todayRunTime: '',
+ todayFaultNum: 0,
+ jdl: '',
+ };
return;
}
-
this.order = res.data.tbBillList;
-
uni.setStorageSync('engineeringNo', this.order.engineeringNo);
-
this.orderStatus = this.order.daa018;
this.collectedAmount = this.order.todayOutput;
-
if (!this.order.todayOutput) {
this.collectedAmount = 0;
}
-
this.todayRunTime = this.order.todayRunTime;
if (!this.order.todayRunTime) {
this.todayRunTime = "0";
}
-
//this.productionDuration = (this.order.todayOnlineTime / 3600).toFixed(2) + "h";
this.todayFaultNum = this.order.todayFaultNum;
this.utilizationRate = this.order.jdl + '%';
@@ -467,9 +442,9 @@
margin-bottom: 20px;
}
- .refresh-btn:hover {
- background-color: #00A2E9;
- }
+ .refresh-btn:hover {
+ background-color: #00A2E9;
+ }
.form-row {
display: flex;
@@ -561,7 +536,6 @@
margin-top: -13px;
line-height: 48px;
align-content: flex-start;
-
}
.form-row3 {
--
Gitblit v1.9.3