Browse Source

制品上架/回收 库存余额根据业务类型的入库库存状态赋值

master_hella_20240701
chenfang 7 months ago
parent
commit
a35a603ebd
  1. 20
      src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts
  2. 37
      src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts

20
src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts

@ -1,6 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as getBusinessTypeApi from '@/api/wms/businesstype/index'
import * as BalanceApi from '@/api/wms/balance' import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
@ -14,8 +15,15 @@ const queryParams = {
pageSize:10, pageSize:10,
pageNo:1, pageNo:1,
code:'ProductPutawayRequest' code:'ProductPutawayRequest'
}
const businessTypeQueryParams = {
pageSize:10,
pageNo:1,
code:'ProductPutaway'
} }
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const businessTypeValue = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams)
const businessTypeData =businessTypeValue?.list[0]||{}
const requestsettingData =data?.list[0]||{} const requestsettingData =data?.list[0]||{}
// 获取当前操作人的部门 // 获取当前操作人的部门
@ -454,7 +462,11 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法 searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法
searchCondition: [{
key: 'businessType',
value: businessTypeData.code,
}]
}, },
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
@ -464,7 +476,11 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法 searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法
searchCondition: [{
key: 'businessType',
value: businessTypeData.code,
}]
} }
} }
}, },

37
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 * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' 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({ export const ProductredressRequestMainRules = reactive({
autoCommit: [required], autoCommit: [required],
@ -316,13 +323,14 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法  searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法
searchCondition:[         searchCondition: [{
{           key: 'businessType',
key: 'inventoryStatus',           value: businessTypeData.code,
value: 'OK', action: '==', // 查询拼接条件
isMainValue: false isSearch: true, // 使用自定义拼接条件
},{ isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
        },{
key: 'packingNumber', // 查询列表中字段 key: 'packingNumber', // 查询列表中字段
value: '', // 指查询具体值 value: '', // 指查询具体值
action: 'isNotStr', // 查询拼接条件 action: 'isNotStr', // 查询拼接条件
@ -338,12 +346,13 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法 searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法
searchCondition:[ searchCondition: [{
{ key: 'businessType',
key: 'inventoryStatus', value: businessTypeData.code,
value: 'OK', action: '==', // 查询拼接条件
isMainValue: false isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
},{ },{
key: 'packingNumber', // 查询列表中字段 key: 'packingNumber', // 查询列表中字段
value: '', // 指查询具体值 value: '', // 指查询具体值

Loading…
Cancel
Save