diff --git a/src/api/wms/balance/index.ts b/src/api/wms/balance/index.ts index 58dc31c42..432b14a1a 100644 --- a/src/api/wms/balance/index.ts +++ b/src/api/wms/balance/index.ts @@ -82,6 +82,18 @@ export const getBalancePageByBusinessType = async (params) => { } } + +// 备件出库查询库存余额列表 +export const getBalancePageSpare = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/balance/seniorSpareItems', data }) + } else { + return await request.get({ url: `/wms/balance/pageSpareItem`, params }) + } +} + // 查询库存余额详情 export const getBalance = async (id: number) => { return await request.get({ url: `/wms/balance/get?id=` + id }) diff --git a/src/api/wms/unplannedissueRequestMain/index.ts b/src/api/wms/unplannedissueRequestMain/index.ts index 62738b340..be6d7eb07 100644 --- a/src/api/wms/unplannedissueRequestMain/index.ts +++ b/src/api/wms/unplannedissueRequestMain/index.ts @@ -27,12 +27,39 @@ export const getUnplannedissueRequestMainPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} + const dataTypeCondition = { + 'column':'dataType', + 'action':'==', + 'value':'1' + } + data.filters.push(dataTypeCondition) return await request.post({ url: '/wms/unplannedissue-request-main/senior', data }) } else { + params.dataType='1' return await request.get({ url: `/wms/unplannedissue-request-main/page`, params }) } } + +// 查询计划外出库申请主列表 +export const getUnplannedissueRequestMainPageSpare = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + const dataTypeCondition = { + 'column':'dataType', + 'action':'==', + 'value':'2' + } + data.filters.push(dataTypeCondition) + return await request.post({ url: '/wms/unplannedissue-request-main/senior', data }) + } else { + params.dataType='2' + return await request.get({ url: `/wms/unplannedissue-request-main/page`, params }) + } +} + + // 查询计划外出库申请主详情 export const getUnplannedissueRequestMain = async (id: number) => { return await request.get({ url: `/wms/unplannedissue-request-main/get?id=` + id }) diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue index 94eb8a380..21e0599a3 100644 --- a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue @@ -142,7 +142,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { const Echo = [] const { tableObject, tableMethods } = useTable({ - getListApi: UnplannedissueRequestMainApi.getUnplannedissueRequestMainPage // 分页接口 + getListApi: UnplannedissueRequestMainApi.getUnplannedissueRequestMainPageSpare // 分页接口 }) // 获得表格的各种操作 @@ -387,6 +387,7 @@ const submitForm = async (formType, data) => { formRef.value.formLoading = false return } + data.dataType='2' await UnplannedissueRequestMainApi.createUnplannedissueRequestMain(data) message.success(t('common.createSuccess')) } else { diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts index 2c0d3080f..bcea142f4 100644 --- a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts @@ -433,7 +433,7 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive searchField: 'packingNumber', searchTitle: '库存余额信息', searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.getBalancePage + searchPage: BalanceApi.getBalancePageSpare }, form: { // labelMessage: '信息提示说明!!!', @@ -443,7 +443,7 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive searchField: 'packingNumber', searchTitle: '库存余额信息', searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.getBalancePage + searchPage: BalanceApi.getBalancePageSpare } } }, @@ -512,25 +512,11 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive }, }, { - label: '原因', + label: '领用原因', field: 'reason', - dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON, - dictClass: 'string', - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return cellValue - }, table: { width: 150 }, - form: { - componentProps: { - filterable: true - } - }, - tableForm: { - type: 'Select', - filterable: true - } }, { label: '项目代码', @@ -641,10 +627,6 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive //表单校验 export const UnplannedissueRequestDetailRules = reactive({ - packingNumber: [ - { required: true, message: '请选择包装号', trigger: 'change' }, - { max: 50, message: '不得超过50个字符', trigger: 'blur' } - ], batch: [ { required: true, message: '请输入批次', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' } diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue index fcefc2809..bb9351405 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue @@ -86,7 +86,6 @@ import { UnplannedissueRequestMain,UnplannedissueRequestMainRules,Unplannedissue import * as UnplannedissueRequestMainApi from '@/api/wms/unplannedissueRequestMain' import * as UnplannedissueRequestDetailApi from '@/api/wms/unplannedissueRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' -import * as TransferissueRequestMainApi from "@/api/wms/transferissueRequestMain"; // 计划外出库申请 defineOptions({ name: 'UnplannedissueRequestMain' }) @@ -388,6 +387,7 @@ const submitForm = async (formType, data) => { formRef.value.formLoading = false return } + data.dataType='1' await UnplannedissueRequestMainApi.createUnplannedissueRequestMain(data) message.success(t('common.createSuccess')) } else {