From e8bdfff302459126b01a6c61176efcf4597f2860 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期一, 27 四月 2026 16:55:37 +0800
Subject: [PATCH] 新增岗位人员接口,优化获取叉车工和司磅员的逻辑
---
pages/wareHouse/nuclearScale/createwriteoffform.vue | 26 ++++++++++++++------------
common/http.api.js | 2 ++
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/common/http.api.js b/common/http.api.js
index f241a85..8aa9e01 100644
--- a/common/http.api.js
+++ b/common/http.api.js
@@ -563,6 +563,8 @@
NuclearScaleEntry: {
// 鑾峰彇瀹㈡埛鍚嶇О
selClient: (params = {}) => vm.$u.get('/mes/weighingVerification/selClient'),
+ // 鑾峰彇宀椾綅浜哄憳锛堝徃纾呭憳/鍙夎溅宸ワ級
+ listStaff: (params = {}) => vm.$u.post('/mes/staff/listStaff', 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 8611bad..c82971b 100644
--- a/pages/wareHouse/nuclearScale/createwriteoffform.vue
+++ b/pages/wareHouse/nuclearScale/createwriteoffform.vue
@@ -538,15 +538,16 @@
*/
fetchForkliftOperators() {
this.$u.api
- .dictData({
- dictType: "forklift",
+ .NuclearScaleEntry.listStaff({
+ postNames: ["鍙夎溅宸�"],
})
.then((res) => {
- if (res.code === 0 && res.data.length > 0) {
- res.data.forEach((i) => {
+ const list = res?.data?.records || res?.data || [];
+ if (res.code === 0 && Array.isArray(list) && list.length > 0) {
+ list.forEach((i) => {
const obj = Object.assign({
- label: i.label,
- value: i.label,
+ label: i.staffName,
+ value: i.staffName,
});
this.checkboxList.push(obj);
});
@@ -571,15 +572,16 @@
*/
fetchWeighmen() {
this.$u.api
- .dictData({
- dictType: "weighing",
+ .NuclearScaleEntry.listStaff({
+ postNames: ["鍙哥鍛�"],
})
.then((res) => {
- if (res.code === 0 && res.data.length > 0) {
- res.data.forEach((i) => {
+ const list = res?.data?.records || res?.data || [];
+ if (res.code === 0 && Array.isArray(list) && list.length > 0) {
+ list.forEach((i) => {
const obj = Object.assign({
- label: i.label,
- value: i.label,
+ label: i.staffName,
+ value: i.staffName,
});
this.weighmanList.push(obj);
});
--
Gitblit v1.9.3