From d8435e7101ed0c6b174d306fb16205765dcb91d9 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Fri, 6 Mar 2026 09:53:09 +0800
Subject: [PATCH] =?UTF-8?q?2026-03-05=201=E3=80=81=E4=BB=93=E5=BA=93?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=BB=B4=E6=8A=A4=E9=A1=B5=E9=9D=A2=EF=BC=8C?=
=?UTF-8?q?=E9=9D=9E=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86=E5=91=98=E7=9C=8B?=
=?UTF-8?q?=E4=B8=8D=E5=88=B0=E6=9D=83=E9=99=90=E5=88=97=E8=A1=A8=202?=
=?UTF-8?q?=E3=80=81=E5=9B=BD=E6=88=98=E9=87=87=E9=9B=86=E5=86=8D=E5=8A=A0?=
=?UTF-8?q?=E4=B8=80=E4=B8=AA=E2=80=9C=E7=94=9F=E4=BA=A7=E8=AE=A2=E5=8D=95?=
=?UTF-8?q?=E5=8F=B7=E2=80=9D=EF=BC=8C=E5=A1=AB=E5=86=99=E7=94=9F=E4=BA=A7?=
=?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=8F=B7=E4=B9=9F=E8=83=BD=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/warehouse/warehouse.js | 4 ++--
src/views/modules/warehouse/warehouse.vue | 21 ++++++++-----------
.../modules/yieldReport/produce_order.vue | 21 +++++++++++--------
3 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/src/api/warehouse/warehouse.js b/src/api/warehouse/warehouse.js
index d29fbd5..1679054 100644
--- a/src/api/warehouse/warehouse.js
+++ b/src/api/warehouse/warehouse.js
@@ -26,8 +26,8 @@ export const saveWarehouseStorageConfig = data => createAPI(`warehouse/saveWareh
export const deleteWarehouseStorageConfig = data => createAPI(`warehouse/deleteWarehouseStorageConfig`,'POST',data)
// ==================== 权限授权 ====================
-// 获取用户列表
-export const getUserList = data => createAPI(`sys/user/list`,'get',data)
+// 获取可选用户列表(不受 sys:user:list 权限限制)
+export const getUserList = data => createAPI(`warehouse/getAvailableUserList`,'POST',data)
// 获取已授权用户列表
export const getAccessWarehouseList = data => createAPI(`warehouse/getAccessWarehouseList`,'POST',data)
diff --git a/src/views/modules/warehouse/warehouse.vue b/src/views/modules/warehouse/warehouse.vue
index 1c53905..e5f1929 100644
--- a/src/views/modules/warehouse/warehouse.vue
+++ b/src/views/modules/warehouse/warehouse.vue
@@ -1500,17 +1500,14 @@ import {
// 加载权限授权列表
async loadAccessAuthLists() {
try {
- // 加载可选用户(从sys_user表)
- const {data: availableData} = await getUserList({
- page: 1,
- limit: 10000
- });
-
- // 加载已授权用户(从AccessWarehouse表)
- const {data: selectedData} = await getAccessWarehouseList({
- site: this.currentWarehouse.site,
- warehouseId: this.currentWarehouse.wareHouseId
- });
+ // 并行加载可选用户和已授权用户
+ const [{ data: availableData }, { data: selectedData }] = await Promise.all([
+ getUserList({ site: this.currentWarehouse.site }),
+ getAccessWarehouseList({
+ site: this.currentWarehouse.site,
+ warehouseId: this.currentWarehouse.wareHouseId
+ })
+ ]);
if (selectedData && selectedData.code === 0) {
this.selectedUserList = selectedData.list || [];
@@ -1519,7 +1516,7 @@ import {
// 过滤掉已授权的用户
if (availableData && availableData.code === 0) {
const selectedUserIds = this.selectedUserList.map(item => item.userid);
- this.availableUserListAll = (availableData.page.list || []).filter(item =>
+ this.availableUserListAll = (availableData.list || []).filter(item =>
!selectedUserIds.includes(item.username)
);
this.availableUserList = this.availableUserListAll;
diff --git a/src/views/modules/yieldReport/produce_order.vue b/src/views/modules/yieldReport/produce_order.vue
index 76c9522..4fd5613 100644
--- a/src/views/modules/yieldReport/produce_order.vue
+++ b/src/views/modules/yieldReport/produce_order.vue
@@ -43,7 +43,7 @@
-
+
@@ -1808,11 +1808,12 @@ export default {
/* 查询派工单 */
getProduceScheduleList() {
- // 校验:派工单号和机台必须填一个
+ // 校验:派工单号、机台、生产订单号必须填一个
const hasResourceId = this.searchData.resourceId && this.searchData.resourceId.trim() !== ''
const hasSeqNo = this.searchData.seqNo && this.searchData.seqNo.trim() !== ''
- if (!hasResourceId && !hasSeqNo) {
- this.$message.warning('派工单号和机台必须填一个!')
+ const hasOrderNo = this.searchData.orderNo && this.searchData.orderNo.trim() !== ''
+ if (!hasResourceId && !hasSeqNo && !hasOrderNo) {
+ this.$message.warning('派工单号、机台、生产订单号必须填一个!')
return
}
// 开始真的查询;
@@ -2231,11 +2232,12 @@ export default {
//导出excel
async createExportData() {
- // 校验:派工单号和机台必须填一个
+ // 校验:派工单号、机台、生产订单号必须填一个
const hasResourceId = this.searchData.resourceId && this.searchData.resourceId.trim() !== ''
const hasSeqNo = this.searchData.seqNo && this.searchData.seqNo.trim() !== ''
- if (!hasResourceId && !hasSeqNo) {
- this.$message.warning('派工单号和机台必须填一个!')
+ const hasOrderNo = this.searchData.orderNo && this.searchData.orderNo.trim() !== ''
+ if (!hasResourceId && !hasSeqNo && !hasOrderNo) {
+ this.$message.warning('派工单号、机台、生产订单号必须填一个!')
return []
}
// 开始真的查询;
@@ -2279,10 +2281,11 @@ export default {
}
// 等待getResourceByUser执行完成后,再查询生产排程列表
- // 只有当机台编号或派工单号有值时才查询
+ // 只有当机台编号、派工单号或生产订单号有值时才查询
const hasResourceId = this.searchData.resourceId && this.searchData.resourceId.trim() !== ''
const hasSeqNo = this.searchData.seqNo && this.searchData.seqNo.trim() !== ''
- if (hasResourceId || hasSeqNo) {
+ const hasOrderNo = this.searchData.orderNo && this.searchData.orderNo.trim() !== ''
+ if (hasResourceId || hasSeqNo || hasOrderNo) {
this.searchData.searchFlag = true;
getProduceScheduleList(this.searchData).then(({data}) => {
// 设置查询数据