From 6b269612b1d4255e6754275a385dcfd42af073be Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 06 五月 2026 10:14:10 +0800
Subject: [PATCH] 更新岗位人员接口,调整获取叉车工和司磅员的逻辑,统一展示姓名字段
---
pages/wareHouse/nuclearScale/createwriteoffform.vue | 35 +++++++++++++++++++++++++++--------
common/http.api.js | 4 ++--
2 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/common/http.api.js b/common/http.api.js
index 8aa9e01..3967008 100644
--- a/common/http.api.js
+++ b/common/http.api.js
@@ -563,8 +563,8 @@
NuclearScaleEntry: {
// 鑾峰彇瀹㈡埛鍚嶇О
selClient: (params = {}) => vm.$u.get('/mes/weighingVerification/selClient'),
- // 鑾峰彇宀椾綅浜哄憳锛堝徃纾呭憳/鍙夎溅宸ワ級
- listStaff: (params = {}) => vm.$u.post('/mes/staff/listStaff', params),
+ // 鑾峰彇宀椾綅浜哄憳锛堝徃纾呭憳/鍙夎溅宸ワ級PDA锛氭寜閮ㄩ棬銆佸矖浣�
+ listStaff: (params = {}) => vm.$u.get('/mes/post-sort/pda/list', params),
// 鍒涘缓鏍哥鍗曟彁浜�
createMain: (params = {}) => vm.$u.post('/mes/weighingVerification/createMain', params),
// 鏍哥鍗曞彿
diff --git a/pages/wareHouse/nuclearScale/createwriteoffform.vue b/pages/wareHouse/nuclearScale/createwriteoffform.vue
index c82971b..b221017 100644
--- a/pages/wareHouse/nuclearScale/createwriteoffform.vue
+++ b/pages/wareHouse/nuclearScale/createwriteoffform.vue
@@ -533,21 +533,37 @@
});
},
+ /** 鏂版帴鍙d汉鍛樿閲屽鍚嶅彲鑳藉瓧娈典笉鍚岋紝缁熶竴鍙栧睍绀哄悕 */
+ staffRowDisplayName(row) {
+ if (!row || typeof row !== "object") return "";
+ return (
+ row.staffName ||
+ row.name ||
+ row.userName ||
+ row.nickName ||
+ row.realName ||
+ ""
+ );
+ },
+
/**
- * 鑾峰彇鍙夎溅宸ュ垪琛�
+ * 鑾峰彇鍙夎溅宸ュ垪琛紙鍙戣揣閮ㄩ棬锛�
*/
fetchForkliftOperators() {
this.$u.api
.NuclearScaleEntry.listStaff({
- postNames: ["鍙夎溅宸�"],
+ department: "鍙戣揣",
+ post: "鍙夎溅宸�",
})
.then((res) => {
const list = res?.data?.records || res?.data || [];
if (res.code === 0 && Array.isArray(list) && list.length > 0) {
list.forEach((i) => {
+ const name = this.staffRowDisplayName(i);
+ if (!name) return;
const obj = Object.assign({
- label: i.staffName,
- value: i.staffName,
+ label: name,
+ value: name,
});
this.checkboxList.push(obj);
});
@@ -568,20 +584,23 @@
},
/**
- * 鑾峰彇鍙哥鍛樺垪琛�
+ * 鑾峰彇鍙哥鍛樺垪琛紙鍙戣揣閮ㄩ棬锛�
*/
fetchWeighmen() {
this.$u.api
.NuclearScaleEntry.listStaff({
- postNames: ["鍙哥鍛�"],
+ department: "鍙戣揣",
+ post: "鍙哥鍛�",
})
.then((res) => {
const list = res?.data?.records || res?.data || [];
if (res.code === 0 && Array.isArray(list) && list.length > 0) {
list.forEach((i) => {
+ const name = this.staffRowDisplayName(i);
+ if (!name) return;
const obj = Object.assign({
- label: i.staffName,
- value: i.staffName,
+ label: name,
+ value: name,
});
this.weighmanList.push(obj);
});
--
Gitblit v1.9.3