From a35a603ebd230c082dbdaf5c1a9d2131c458239e Mon Sep 17 00:00:00 2001 From: chenfang Date: Tue, 30 Apr 2024 11:51:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E5=93=81=E4=B8=8A=E6=9E=B6/=E5=9B=9E?= =?UTF-8?q?=E6=94=B6=20=E5=BA=93=E5=AD=98=E4=BD=99=E9=A2=9D=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E4=B8=9A=E5=8A=A1=E7=B1=BB=E5=9E=8B=E7=9A=84=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=BA=93=E5=AD=98=E7=8A=B6=E6=80=81=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productputawayRequestMain.data.ts | 20 +++++++++- .../productredressRequestMain.data.ts | 37 ++++++++++++------- 2 files changed, 41 insertions(+), 16 deletions(-) diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts b/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts index 66cd24c8b..0638e6352 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts @@ -1,6 +1,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as getBusinessTypeApi from '@/api/wms/businesstype/index' import * as BalanceApi from '@/api/wms/balance' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' @@ -14,8 +15,15 @@ const queryParams = { pageSize:10, pageNo:1, code:'ProductPutawayRequest' +} +const businessTypeQueryParams = { + pageSize:10, + pageNo:1, + code:'ProductPutaway' } const data = await getRequestsettingApi.getRequestsettingPage(queryParams) + const businessTypeValue = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams) + const businessTypeData =businessTypeValue?.list[0]||{} const requestsettingData =data?.list[0]||{} // 获取当前操作人的部门 @@ -454,7 +462,11 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '库存余额信息', // 查询弹窗标题 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 - searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法 + searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'businessType', + value: businessTypeData.code, + }] }, form: { // labelMessage: '信息提示说明!!!', @@ -464,7 +476,11 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '库存余额信息', // 查询弹窗标题 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 - searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法 + searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'businessType', + value: businessTypeData.code, + }] } } }, diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts index 5b447e22d..dcc05b9a8 100644 --- a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts @@ -3,7 +3,14 @@ import { dateFormatter } from '@/utils/formatTime' import * as BalanceApi from '@/api/wms/balance' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' - +import * as getBusinessTypeApi from '@/api/wms/businesstype/index' +const businessTypeQueryParams = { + pageSize:10, + pageNo:1, + code:'Productredress' +} +const businessTypeValue = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams) +const businessTypeData =businessTypeValue?.list[0]||{} // 表单校验 export const ProductredressRequestMainRules = reactive({ autoCommit: [required], @@ -316,13 +323,14 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '库存余额信息', // 查询弹窗标题 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 - searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法 - searchCondition:[ - { - key: 'inventoryStatus', - value: 'OK', - isMainValue: false - },{ +  searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法 +        searchCondition: [{ +          key: 'businessType', +          value: businessTypeData.code, + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 +        },{ key: 'packingNumber', // 查询列表中字段 value: '', // 指查询具体值 action: 'isNotStr', // 查询拼接条件 @@ -338,12 +346,13 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '库存余额信息', // 查询弹窗标题 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 - searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法 - searchCondition:[ - { - key: 'inventoryStatus', - value: 'OK', - isMainValue: false + searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'businessType', + value: businessTypeData.code, + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 },{ key: 'packingNumber', // 查询列表中字段 value: '', // 指查询具体值