From 8ef070c84a703c4a8b838bf9320d68d00a7d6dca Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 28 五月 2026 11:15:32 +0800
Subject: [PATCH] 设备巡检去掉高度限制
---
src/views/productionManagement/workOrder/index.vue | 126 +++++++++++++++++++++++++----------------
1 files changed, 77 insertions(+), 49 deletions(-)
diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index 7fcdab2..88564ea 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -192,6 +192,7 @@
step="1"
placeholder="璇疯緭鍏ユ湰娆$敓浜ф暟閲�"
style="width: 100%"
+ :class="{ 'over-limit': reportForm.quantity > reportForm.planQuantity }"
@input="handleQuantityInput"
/>
</el-form-item>
@@ -218,6 +219,18 @@
step="1"
placeholder="璇疯緭鍏ユ姤搴熸暟閲�"
@input="handleScrapQtyInput"
+ />
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="12">
+ <el-form-item label="鍔犳斁鏁�" prop="addQty">
+ <el-input
+ v-model.number="reportForm.addQty"
+ type="number"
+ min="0"
+ step="1"
+ placeholder="璇疯緭鍏ュ姞鏀炬暟"
/>
</el-form-item>
</el-col>
@@ -263,24 +276,24 @@
<!-- </el-form-item>-->
<!-- </el-col>-->
- <el-col :span="12">
- <el-form-item label="瀹℃牳浜�" prop="auditUserId">
- <el-select
- v-model="reportForm.auditUserId"
- placeholder="璇烽�夋嫨瀹℃牳浜�"
- clearable
- filterable
- @change="handleReviewerIdChange"
- >
- <el-option
- v-for="user in userOptions"
- :key="user.userId"
- :label="user.nickName"
- :value="user.userId"
- />
- </el-select>
- </el-form-item>
- </el-col>
+<!-- <el-col :span="12">-->
+<!-- <el-form-item label="瀹℃牳浜�" prop="auditUserId">-->
+<!-- <el-select-->
+<!-- v-model="reportForm.auditUserId"-->
+<!-- placeholder="璇烽�夋嫨瀹℃牳浜�"-->
+<!-- clearable-->
+<!-- filterable-->
+<!-- @change="handleReviewerIdChange"-->
+<!-- >-->
+<!-- <el-option-->
+<!-- v-for="user in userOptions"-->
+<!-- :key="user.userId"-->
+<!-- :label="user.nickName"-->
+<!-- :value="user.userId"-->
+<!-- />-->
+<!-- </el-select>-->
+<!-- </el-form-item>-->
+<!-- </el-col>-->
</el-row>
</el-form>
@@ -936,8 +949,9 @@
}
proxy.$modal.msgSuccess("鎺掍骇宸蹭繚瀛�");
+ scheduleDialogVisible.value = false;
resetCreateScheduleRows();
- getList();
+ await getList();
} catch (error) {
console.error("淇濆瓨鎺掍骇澶辫触", error);
ElMessage.error("淇濆瓨鎺掍骇澶辫触锛岃閲嶈瘯");
@@ -961,20 +975,27 @@
label: "鐢熶骇璁㈠崟鍙�",
prop: "productOrderNpsNo",
width: "140",
+ formatData: val => (val && val.length > 4 ? val.slice(0, -4) : val || ""),
},
{
- label: "浜у搧鍚嶇О",
- prop: "productName",
- width: "140",
+ label: "鎴愬搧鍚嶇О",
+ prop: "finalProductModel",
+ minWidth: 200,
+ overHidden: false
},
- {
- label: "瑙勬牸",
- prop: "model",
- },
- {
- label: "鍗曚綅",
- prop: "unit",
- },
+ // {
+ // label: "鍔犲伐鍝佸悕绉�",
+ // prop: "productName",
+ // width: "140",
+ // },
+ // {
+ // label: "鍔犲伐鍝佽鏍�",
+ // prop: "model",
+ // },
+ // {
+ // label: "鍔犲伐鍝佸崟浣�",
+ // prop: "unit",
+ // },
{
label: "宸ュ簭鍚嶇О",
prop: "processName",
@@ -1046,9 +1067,9 @@
clickFun: row => {
showReportDialog(row);
},
- // 鐢ㄦ埛褰撳墠id
+ // // 鐢ㄦ埛褰撳墠id
disabled: row => row.completeQuantity >= row.planQuantity ||
- !isCurrentUserInUserIds(row)
+ !isCurrentUserInUserIds(row) || row.hasUnreportedMachine
},
{
name: "鐢熶骇鎺掍骇",
@@ -1113,6 +1134,7 @@
planQuantity: 0,
quantity: null,
scrapQty: null,
+ addQty: 0,
startTime: "",
endTime: "",
userName: "",
@@ -1124,7 +1146,10 @@
teamList: [],
deviceId: null,
});
-
+function removeLastFour(str) {
+ if (!str) return ''; // 绌哄�间繚鎶�
+ return str.toString().slice(0, -4); // 鏍稿績锛氭埅鍙� 0 鍒� 鍊掓暟绗�4浣�
+}
// 鏈鐢熶骇鏁伴噺楠岃瘉瑙勫垯
const validateQuantity = (rule, value, callback) => {
if (value === null || value === undefined || value === "") {
@@ -1196,7 +1221,7 @@
await Promise.all(updates);
ElMessage.success("瀹℃牳鎴愬姛");
auditDialogVisible.value = false;
- getList();
+ await getList();
} finally {
auditLoading.value = false;
}
@@ -1217,7 +1242,7 @@
scrapQty: [{validator: validateScrapQty, trigger: "blur"}],
startTime: [{required: true, message: "璇烽�夋嫨寮�濮嬫椂闂�", trigger: "change"}],
endTime: [{required: true, message: "璇烽�夋嫨缁撴潫鏃堕棿", trigger: "change"}],
- auditUserId: [{required: true, message: "璇烽�夋嫨瀹℃牳浜�", trigger: "change"}],
+ // auditUserId: [{required: true, message: "璇烽�夋嫨瀹℃牳浜�", trigger: "change"}],
teamList: [{required: true, message: "璇烽�夋嫨鐝粍", trigger: "change"}],
deviceId: [{required: true, message: "璇烽�夋嫨璁惧", trigger: "change"}],
};
@@ -1230,12 +1255,6 @@
}
const num = Number(value);
if (isNaN(num)) {
- return;
- }
- // 濡傛灉瓒呰繃寰呯敓浜ф暟閲�
- if (num > reportForm.planQuantity) {
- proxy.$modal.msgWarning("鏈鐢熶骇鏁伴噺涓嶈兘澶т簬寰呯敓浜ф暟閲�");
- reportForm.quantity = reportForm.planQuantity;
return;
}
// 濡傛灉灏忎簬1锛屾竻闄�
@@ -1314,7 +1333,7 @@
/** 鎼滅储鎸夐挳鎿嶄綔 */
const handleQuery = () => {
page.current = 1;
- getList();
+ getList();
};
const pagination = obj => {
page.current = obj.page;
@@ -1445,6 +1464,7 @@
reportForm.replenishQty = 0;
reportForm.teamList = [];
reportForm.scrapQty = 0;
+ reportForm.addQty = 0;
reportForm.userIds = row.userIds || [];
const ids = (row.userIds || "")
@@ -1453,7 +1473,7 @@
.filter(Boolean);
reportForm.userIdsList = userTeamOptions.value
- .filter(item => ids.includes(String(item.userId)))
+ // .filter(item => ids.includes(String(item.userId)))
.map(item => ({
userId: item.userId,
nickName: item.nickName
@@ -1524,12 +1544,12 @@
return;
}
- if (quantity > reportForm.planQuantity) {
- ElMessageBox.alert("鏈鐢熶骇鏁伴噺涓嶈兘瓒呰繃寰呯敓浜ф暟閲�", "鎻愮ず", {
- confirmButtonText: "纭畾",
- });
- return;
- }
+ // if (quantity > reportForm.planQuantity) {
+ // ElMessageBox.alert("鏈鐢熶骇鏁伴噺涓嶈兘瓒呰繃寰呯敓浜ф暟閲�", "鎻愮ず", {
+ // confirmButtonText: "纭畾",
+ // });
+ // return;
+ // }
const submitData = {
...reportForm,
@@ -1790,4 +1810,12 @@
height: 140px !important;
}
}
+.el-table .cell {
+ white-space: normal !important;
+ word-break: break-all;
+}
+
+.over-limit .el-input__inner {
+ color: #f56c6c !important;
+}
</style>
--
Gitblit v1.9.3