diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 017820e1b..3d0c9f2e5 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -555,10 +555,12 @@ const opensearchTable = ( formRef.value.formModel[searchCondition[i].value] == '' || formRef.value.formModel[searchCondition[i].value] == undefined ) { - message.warning( - searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!' - ) - return + if(!searchCondition[i].isOptional){ // 添加参数可选可空的判断 + message.warning( + searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!' + ) + return + } } } if(formRef.value.formModel[searchCondition[i].value]){ diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue index f242cd0cf..c28670512 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue @@ -139,9 +139,10 @@ const { tableObject, tableMethods } = useTable({ getListApi: InventorymoveJobDetailApi.getInventorymoveJobDetailPage // 分页接口 }) const importFileName = ref() + // 判断 路由名称 进行条件过滤 /** - * OktoholdJobMain 合格转隔离 + * OktoholdJobMain 合格转隔离 物料隔离 */ if ( routeName.value == 'OktoholdJobMain') { tableObject.params = { @@ -213,7 +214,7 @@ const importFileName = ref() // toInventoryStatus.value = "HOLD" businessType.value = 'ScrapToHold' importFileName.value = '报废转隔离任务' -} else { +} else {//InventorymoveJobMain console.log(146 , fromInventoryStatus.value) tableObject.params = { businessType :'Move' @@ -225,10 +226,12 @@ const importFileName = ref() // 获得表格的各种操作 const { getList, setSearchParams } = tableMethods - // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultExportBtn({hasPermi:'wms:inventorymove-job-main:export'}), // 导出 + + + + defaultButtons.defaultExportBtn({hasPermi:`wms:inventorymove-${routeName.value}-job-main:export`}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue index 5cd8e4be7..a3d8860bb 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue @@ -193,8 +193,8 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultExportBtn({hasPermi:'wms:inventorymove-record-main:export'}), // 导出 - defaultButtons.defaultImportBtn({hide:recordImport.value}), // 导入 + defaultButtons.defaultExportBtn({hasPermi:`wms:${routeName.value}:export`}), // 导出 + defaultButtons.defaultImportBtn({hide:recordImport.value,hasPermi:`wms:${routeName.value}:import`}), // 导入 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue index e9a747cf1..0e1f26bf6 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue @@ -100,7 +100,7 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' const { loadStart, loadDone } = usePageLoading() -// 库存转移记录主 +// 库存转移记录(新)InventorymoveRecordMainNew defineOptions({ name: 'InventorymoveRecordMainNew' }) const message = useMessage() // 消息弹窗 @@ -111,7 +111,6 @@ const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name const tableColumns = ref([...InventorymoveRecordMainNew.allSchemas.tableColumns,...InventorymoveRecordDetailNew.allSchemas.tableMainColumns]) - console.log(99 , routeName.value) const fromInventoryStatus = ref() const toInventoryStatus = ref() @@ -137,8 +136,8 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ defaultButtons.defaultAddBtn(null), // 新增 - defaultButtons.defaultExportBtn({hasPermi:'wms:inventorymove-record-main:export'}), // 导出 - // defaultButtons.defaultImportBtn({hasPermi:'wms:inventorymove-record-main:import'}), // 导入 + defaultButtons.defaultExportBtn({hasPermi:`wms:${routeName.value}:export`}), // 导出 + // defaultButtons.defaultImportBtn({hasPermi:`wms:${routeName.value}:import`}), // 导入 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -463,11 +462,8 @@ const searchList = (model)=>{ /** 初始化 **/ onMounted(async () => { getList() - if(routeName.value == "InventorymoveRecordMain"){ - importTemplateData.templateUrl = await InventorymoveRecordMainApi.importTemplate() - }else { - importTemplateData.templateUrl = await InventorymoveRecordMainApi.importTemplateExceptMove() - } + // 库存转移记录(新)InventorymoveRecordMainNew + importTemplateData.templateUrl = await InventorymoveRecordMainApi.importTemplateExceptMove() }) ./inventorymoveRecordRequestMain.data diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/index.vue index 953950d79..317389888 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/index.vue @@ -74,7 +74,8 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' const { loadStart, loadDone } = usePageLoading() -// 库存转移记录主 +// 物料隔离记录 InventorymoveRecordMainOKHOLD +// 仅有物料隔离记录在使用的 defineOptions({ name: 'InventorymoveRecordMainOKHOLD' }) const message = useMessage() // 消息弹窗 @@ -113,8 +114,8 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultExportBtn({hasPermi:'wms:inventorymove-record-main:export'}), // 导出 - //defaultButtons.defaultImportBtn({hasPermi:'wms:inventorymove-record-main:import'}), // 导入 + defaultButtons.defaultExportBtn({hasPermi:`wms:${routeName.value}:export`}), // 导出 + //defaultButtons.defaultImportBtn({hasPermi:`wms:${routeName.value}:import`}), // 导入 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -300,10 +301,7 @@ const searchList = (model)=>{ /** 初始化 **/ onMounted(async () => { getList() - if(routeName.value == "InventorymoveRecordMain"){ - importTemplateData.templateUrl = await InventorymoveRecordMainApi.importTemplate() - }else { - importTemplateData.templateUrl = await InventorymoveRecordMainApi.importTemplateExceptMove() - } + // 物料隔离记录 InventorymoveRecordMainOKHOLD + importTemplateData.templateUrl = await InventorymoveRecordMainApi.importTemplateExceptMove() }) diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue index 9b168764f..544171c9a 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue @@ -117,18 +117,7 @@ const { tableObject, tableMethods } = useTable({ /** * OktoholdRequestMain 合格转隔离 */ -if ( routeName.value == 'OktoholdRequestMain') { - tableObject.params = { - // fromInventoryStatus: 'OK', - // toInventoryStatus:'HOLD', - businessType :'OkToHold' - } - fromInventoryStatus.value = 'OK' - toInventoryStatus.value = "HOLD" - businessType.value = 'OkToHold' - importFileName.value = '物料转隔离申请' -} -else if ( routeName.value == 'NoktoholdRequestMain') { +if ( routeName.value == 'NoktoholdRequestMain') { tableObject.params = { // fromInventoryStatus: 'NOK', // toInventoryStatus:'HOLD', @@ -377,9 +366,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => newRow['fromLocationCode'] = item['locationCode'] newRow['uom'] = item['uom'] newRow['qty'] = item['qty'] - if(routeName.value == 'OktoholdRequestMain'){ - newRow['toInventoryStatus'] = "HOLD" - }else if(routeName.value == 'NoktoholdRequestMain'){ + if(routeName.value == 'NoktoholdRequestMain'){ newRow['toInventoryStatus'] = "HOLD" }else if ( routeName.value == 'HoldtookRequestMain') { newRow['toInventoryStatus'] = "OK" @@ -431,9 +418,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { setV['fromInventoryStatus'] = val[0]['inventoryStatus'] setV['fromLocationCode'] = val[0]['locationCode'] setV['uom'] = val[0]['uom'] - if(routeName.value == 'OktoholdRequestMain'){ - setV['toInventoryStatus'] = "HOLD" - }else if(routeName.value == 'NoktoholdRequestMain'){ + if(routeName.value == 'NoktoholdRequestMain'){ setV['toInventoryStatus'] = "HOLD" }else if ( routeName.value == 'HoldtookRequestMain') { setV['toInventoryStatus'] = "OK" @@ -458,9 +443,9 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:inventorymove-request-main:create'}), // 新增 - defaultButtons.defaultImportBtn({hasPermi:'wms:inventorymove-request-main:import'}), // 导入 - defaultButtons.defaultExportBtn({hasPermi:'wms:inventorymove-request-main:export'}), // 导出 + defaultButtons.defaultAddBtn({hasPermi:`wms:${routeName.value}:create`}), // 新增 + defaultButtons.defaultImportBtn({hasPermi:`wms:${routeName.value}:import`}), // 导入 + defaultButtons.defaultExportBtn({hasPermi:`wms:${routeName.value}:export`}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -512,14 +497,14 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:inventorymove-request-main:close'}), // 关闭 - defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:inventorymove-request-main:reAdd'}), //重新添加 - defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:submit'}), // 提交审批 - defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:refused'}), // 驳回 - defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:agree'}), // 审批通过 - defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:inventorymove-request-main:handle'}), // 处理 - defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:update'}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventorymove-request-main:delete'}), // 删除 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:`wms:${routeName.value}:close`}), // 关闭 + defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:`wms:${routeName.value}:reAdd`}), //重新添加 + defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:`wms:${routeName.value}:submit`}), // 提交审批 + defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:`wms:${routeName.value}:refused`}), // 驳回 + defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:`wms:${routeName.value}:agree`}), // 审批通过 + defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:`wms:${routeName.value}:handle`}), // 处理 + defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:`wms:${routeName.value}:update`}), // 编辑 + // defaultButtons.mainListDeleteBtn({hasPermi:`wms:${routeName.value}:delete`}), // 删除 ] } @@ -672,10 +657,7 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - if(routeName.value == 'OktoholdRequestMain'){ - const data = await InventorymoveRequestMainApi.exportOkToHoldRequestMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - }else if ( routeName.value == 'HoldtookRequestMain') { + if ( routeName.value == 'HoldtookRequestMain') { const data = await InventorymoveRequestMainApi.exportHoldToOkRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'HoldtoscrapRequestMain') { diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/index.vue index fc2c1d1bc..dab484058 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/index.vue @@ -92,7 +92,8 @@ import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' import {importTemplateHoldOk} from "@/api/wms/inventorymoveRequestMain"; const { loadStart, loadDone } = usePageLoading() -// 库存转移申请 +// 隔离转线边申请HoldtoWipRequestMain +// 只有隔离转线边申请在使用的 defineOptions({ name: 'InventorymoveRequestMain' }) const message = useMessage() // 消息弹窗 @@ -305,23 +306,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => newRow['fromLocationCode'] = item['locationCode'] newRow['uom'] = item['uom'] newRow['qty'] = item['qty'] - if(routeName.value == 'OktoholdRequestMain'){ - newRow['toInventoryStatus'] = "HOLD" - }else if(routeName.value == 'NoktoholdRequestMain'){ - newRow['toInventoryStatus'] = "HOLD" - }else if ( routeName.value == 'HoldtookRequestMain') { - newRow['toInventoryStatus'] = "OK" - }else if ( routeName.value == 'HoldtoWipRequestMain') { - newRow['toInventoryStatus'] = "OK" - }else if ( routeName.value == 'HoldtoscrapRequestMain') { - newRow['toInventoryStatus'] = "SCRAP" - }else if ( routeName.value == 'OktoscrapRequestMain') { - newRow['toInventoryStatus'] = "SCRAP" - }else if ( routeName.value == 'ScraptoholdRequestMain') { - newRow['toInventoryStatus'] = "HOLD" - }else{ - newRow['toInventoryStatus'] = item['inventoryStatus'] - } + + newRow['toInventoryStatus'] = "OK" //HoldtoWipRequestMain 隔离转线边 tableData.value.push(newRow) }) } else { @@ -362,23 +348,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { setV['fromInventoryStatus'] = val[0]['inventoryStatus'] setV['fromLocationCode'] = val[0]['locationCode'] setV['uom'] = val[0]['uom'] - if(routeName.value == 'OktoholdRequestMain'){ - setV['toInventoryStatus'] = "HOLD" - }else if(routeName.value == 'NoktoholdRequestMain'){ - setV['toInventoryStatus'] = "HOLD" - }else if ( routeName.value == 'HoldtookRequestMain') { - setV['toInventoryStatus'] = "OK" - }else if ( routeName.value == 'HoldtoWipRequestMain') { - setV['toInventoryStatus'] = "OK" - }else if ( routeName.value == 'HoldtoscrapRequestMain') { - setV['toInventoryStatus'] = "SCRAP" - }else if ( routeName.value == 'OktoscrapRequestMain') { - setV['toInventoryStatus'] = "SCRAP" - }else if ( routeName.value == 'ScraptoholdRequestMain') { - setV['toInventoryStatus'] = "HOLD" - }else{ - setV['toInventoryStatus'] = val[0]['inventoryStatus'] - } + setV['toInventoryStatus'] = "OK" // HoldtoWipRequestMain 隔离转线边 } else { setV[formField] = val[0][searchField] } @@ -391,9 +361,9 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:inventorymove-request-main:create'}), // 新增 - //defaultButtons.defaultImportBtn({hasPermi:'wms:inventorymove-request-main:import'}), // 导入 - defaultButtons.defaultExportBtn({hasPermi:'wms:inventorymove-request-main:export'}), // 导出 + defaultButtons.defaultAddBtn({hasPermi:`wms:${routeName.value}:create`}), // 新增 + //defaultButtons.defaultImportBtn({hasPermi:'wms:${routeName.value}:import'}), // 导入 + defaultButtons.defaultExportBtn({hasPermi:`wms:${routeName.value}:export`}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -445,14 +415,14 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:inventorymove-request-main:close'}), // 关闭 - defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:inventorymove-request-main:reAdd'}), //重新添加 - defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:submit'}), // 提交审批 - defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:refused'}), // 驳回 - defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:agree'}), // 审批通过 - defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:inventorymove-request-main:handle'}), // 处理 - defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:update'}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventorymove-request-main:delete'}), // 删除 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:`wms:${routeName.value}:close`}), // 关闭 + defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:`wms:${routeName.value}:reAdd`}), //重新添加 + defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:`wms:${routeName.value}:submit`}), // 提交审批 + defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:`wms:${routeName.value}:refused`}), // 驳回 + defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:`wms:${routeName.value}:agree`}), // 审批通过 + defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:`wms:${routeName.value}:handle`}), // 处理 + defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:`wms:${routeName.value}:update`}), // 编辑 + // defaultButtons.mainListDeleteBtn({hasPermi:`wms:${routeName.value}:delete`}), // 删除 ] } @@ -734,16 +704,8 @@ const searchList = (model)=>{ /** 初始化 **/ onMounted(async () => { getList() - //库存移动 - if(routeName.value == "InventorymoveRequestMain"){ - importTemplateData.templateUrl = await InventorymoveRequestMainApi.importTemplate() - } - //隔离转合格 - else if(routeName.value == "HoldtookRequestMain"){ - importTemplateData.templateUrl = await InventorymoveRequestMainApi.importTemplateHoldOk() - } - else { - importTemplateData.templateUrl = await InventorymoveRequestMainApi.importTemplateExceptMove() - } + // HoldtoWipRequestMain 隔离转线边 + importTemplateData.templateUrl = await InventorymoveRequestMainApi.importTemplateExceptMove() + }) diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/index.vue index f52cd62b5..1b8afde8d 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/index.vue @@ -93,6 +93,7 @@ import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' const { loadStart, loadDone } = usePageLoading() // 库存转移申请 +// 只有库存转移申请在使用的 defineOptions({ name: 'InventorymoveRequestMain' }) const message = useMessage() // 消息弹窗 @@ -112,75 +113,9 @@ const importFileName = ref() const { tableObject, tableMethods } = useTable({ getListApi: InventorymoveRequestDetailApi.getInventorymoveRequestDetailPage // 分页接口 }) - -// 判断 路由名称 进行条件过滤 -/** - * OktoholdRequestMain 合格转隔离 - */ -if ( routeName.value == 'OktoholdRequestMain') { - tableObject.params = { - // fromInventoryStatus: 'OK', - // toInventoryStatus:'HOLD', - businessType :'OkToHold' - } - fromInventoryStatus.value = 'OK' - toInventoryStatus.value = "HOLD" - businessType.value = 'OkToHold' - importFileName.value = '物料转隔离申请' -} -else if ( routeName.value == 'NoktoholdRequestMain') { - tableObject.params = { - // fromInventoryStatus: 'NOK', - // toInventoryStatus:'HOLD', - businessType :'NokToHold' - } - fromInventoryStatus.value = 'NOK' - toInventoryStatus.value = "HOLD" - businessType.value = 'NokToHold' - importFileName.value = '不合格转隔离申请' -} -else if ( routeName.value == 'HoldtookRequestMain') { - tableObject.params = { - // fromInventoryStatus: 'HOLD', - // toInventoryStatus:'OK', - businessType :'HoldToOk' - } - fromInventoryStatus.value = 'HOLD' - toInventoryStatus.value = "OK" - businessType.value = 'HoldToOk' - importFileName.value = '隔离转合格申请' -} else if ( routeName.value == 'HoldtoscrapRequestMain') { - tableObject.params = { - // fromInventoryStatus: 'HOLD', - // toInventoryStatus:'SCRAP', - businessType:'HoldToScrap' - } - fromInventoryStatus.value = 'HOLD' - toInventoryStatus.value = "SCRAP" - businessType.value = 'HoldToScrap' - importFileName.value = '隔离转报废申请' -} else if ( routeName.value == 'OktoscrapRequestMain') { - tableObject.params = { - // fromInventoryStatus: 'OK', - // toInventoryStatus:'SCRAP', - businessType :'OkToScrap' - } - fromInventoryStatus.value = 'OK' - toInventoryStatus.value = "SCRAP" - businessType.value = 'OkToScrap' - importFileName.value = '合格转报废申请' -} -else if ( routeName.value == 'ScraptoholdRequestMain') { - tableObject.params = { - // fromInventoryStatus: 'SCRAP', - // toInventoryStatus:'HOLD', - businessType :'ScrapToHold' - } - fromInventoryStatus.value = 'SCRAP' - toInventoryStatus.value = "HOLD" - businessType.value = 'ScrapToHold' - importFileName.value = '报废转隔离申请' -} else { +// 库存移动申请 InventorymoveRequestMain +// 仅有库存移动申请在使用 +if ( routeName.value == 'InventorymoveRequestMain') { tableObject.params = { businessType :'Move' } @@ -389,26 +324,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => newRow['fromLocationCode'] = item['locationCode'] newRow['uom'] = item['uom'] newRow['qty'] = item['qty'] - if(routeName.value == 'OktoholdRequestMain'){ - newRow['toInventoryStatus'] = "HOLD" - }else if(routeName.value == 'NoktoholdRequestMain'){ - newRow['toInventoryStatus'] = "HOLD" - }else if ( routeName.value == 'HoldtookRequestMain') { - newRow['toInventoryStatus'] = "OK" - }else if ( routeName.value == 'HoldtoscrapRequestMain') { - newRow['toInventoryStatus'] = "SCRAP" - }else if ( routeName.value == 'OktoscrapRequestMain') { - newRow['toInventoryStatus'] = "SCRAP" - }else if ( routeName.value == 'ScraptoholdRequestMain') { - newRow['toInventoryStatus'] = "HOLD" - }else{ - newRow['toInventoryStatus'] = item['inventoryStatus'] - } + newRow['toInventoryStatus'] = item['inventoryStatus']//库存移动申请 tableData.value.push(newRow) }) - if(routeName.value == 'OktoholdRequestMain'){ - getDefaultToLocationCode() - } } else { row[formField] = val[0][searchField] } @@ -446,21 +364,8 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { setV['fromInventoryStatus'] = val[0]['inventoryStatus'] setV['fromLocationCode'] = val[0]['locationCode'] setV['uom'] = val[0]['uom'] - if(routeName.value == 'OktoholdRequestMain'){ - setV['toInventoryStatus'] = "HOLD" - }else if(routeName.value == 'NoktoholdRequestMain'){ - setV['toInventoryStatus'] = "HOLD" - }else if ( routeName.value == 'HoldtookRequestMain') { - setV['toInventoryStatus'] = "OK" - }else if ( routeName.value == 'HoldtoscrapRequestMain') { - setV['toInventoryStatus'] = "SCRAP" - }else if ( routeName.value == 'OktoscrapRequestMain') { - setV['toInventoryStatus'] = "SCRAP" - }else if ( routeName.value == 'ScraptoholdRequestMain') { - setV['toInventoryStatus'] = "HOLD" - }else{ - setV['toInventoryStatus'] = val[0]['inventoryStatus'] - } + setV['toInventoryStatus'] = val[0]['inventoryStatus'] //库存移动申请InventorymoveRequestMain + } else { setV[formField] = val[0][searchField] } @@ -473,9 +378,9 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:inventorymove-request-main:create'}), // 新增 - defaultButtons.defaultImportBtn({hasPermi:'wms:inventorymove-request-main:import'}), // 导入 - defaultButtons.defaultExportBtn({hasPermi:'wms:inventorymove-request-main:export'}), // 导出 + defaultButtons.defaultAddBtn({hasPermi:`wms:${routeName.value}::create`}), // 新增 + defaultButtons.defaultImportBtn({hasPermi:`wms:${routeName.value}:import`}), // 导入 + defaultButtons.defaultExportBtn({hasPermi:`wms:${routeName.value}:export`}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -527,14 +432,14 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:inventorymove-request-main:close'}), // 关闭 - defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:inventorymove-request-main:reAdd'}), //重新添加 - defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:submit'}), // 提交审批 - defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:refused'}), // 驳回 - defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:agree'}), // 审批通过 - defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:inventorymove-request-main:handle'}), // 处理 - defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:update'}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventorymove-request-main:delete'}), // 删除 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:`wms:${routeName.value}:close`}), // 关闭 + defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:`wms:${routeName.value}:reAdd`}), //重新添加 + defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:`wms:${routeName.value}:submit`}), // 提交审批 + defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:`wms:${routeName.value}:refused`}), // 驳回 + defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:`wms:${routeName.value}:agree`}), // 审批通过 + defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:`wms:${routeName.value}:handle`}), // 处理 + defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:`wms:${routeName.value}:update`}), // 编辑 + // defaultButtons.mainListDeleteBtn({hasPermi:`wms:${routeName.value}:delete`}), // 删除 ] } @@ -677,27 +582,9 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - if(routeName.value == 'OktoholdRequestMain'){ - const data = await InventorymoveRequestMainApi.exportOkToHoldRequestMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - }else if ( routeName.value == 'HoldtookRequestMain') { - const data = await InventorymoveRequestMainApi.exportHoldToOkRequestMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - }else if ( routeName.value == 'HoldtoscrapRequestMain') { - const data = await InventorymoveRequestMainApi.exportHoldToScrapRequestMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - }else if ( routeName.value == 'OktoscrapRequestMain') { - const data = await InventorymoveRequestMainApi.exportOkToScrapRequestMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - } - // else if ( routeName.value == 'ScraptoholdRequestMain') { - // const data = await InventorymoveRequestMainApi.exportScrapToHoldRequestMain(tableObject.params) - // download.excel(data, '报废转隔离申请主.xlsx') - // } - else{ - const data = await InventorymoveRequestMainApi.exportInventorymoveRequestMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - } + // 库存移动申请InventorymoveRequestMain + const data = await InventorymoveRequestMainApi.exportInventorymoveRequestMain(tableObject.params) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { loadDone() @@ -834,10 +721,9 @@ const searchList = (model)=>{ /** 初始化 **/ onMounted(async () => { getList() + // 库存移动申请InventorymoveRequestMain if(routeName.value == "InventorymoveRequestMain"){ importTemplateData.templateUrl = await InventorymoveRequestMainApi.importTemplate() - }else { - importTemplateData.templateUrl = await InventorymoveRequestMainApi.importTemplateExceptMove() } }) diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue index a3cfa121a..ec29d03b2 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue @@ -95,7 +95,7 @@ import { formatDate } from '@/utils/formatTime' import dayjs from 'dayjs' import { usePageLoading } from '@/hooks/web/usePageLoading' const { loadStart, loadDone } = usePageLoading() -// 物料隔离申请 +// 物料隔离申请OktoholdRequestMain // 只有物料隔离申请在使用的 defineOptions({ name: 'InventorymoveRequestMain' }) @@ -117,6 +117,7 @@ const { tableObject, tableMethods } = useTable({ getListApi: InventorymoveRequestDetailApi.getInventorymoveRequestDetailPage // 分页接口 }) + if ( routeName.value == 'OktoholdRequestMain') { tableObject.params = { // fromInventoryStatus: 'OK', @@ -128,65 +129,6 @@ if ( routeName.value == 'OktoholdRequestMain') { businessType.value = 'OkToHold' importFileName.value = '物料转隔离申请' } -else if ( routeName.value == 'NoktoholdRequestMain') { - tableObject.params = { - // fromInventoryStatus: 'NOK', - // toInventoryStatus:'HOLD', - businessType :'NokToHold' - } - fromInventoryStatus.value = 'NOK' - toInventoryStatus.value = "HOLD" - businessType.value = 'NokToHold' - importFileName.value = '不合格转隔离申请' -} -else if ( routeName.value == 'HoldtookRequestMain') { - tableObject.params = { - // fromInventoryStatus: 'HOLD', - // toInventoryStatus:'OK', - businessType :'HoldToOk' - } - fromInventoryStatus.value = 'HOLD' - toInventoryStatus.value = "OK" - businessType.value = 'HoldToOk' - importFileName.value = '隔离转合格申请' -} else if ( routeName.value == 'HoldtoscrapRequestMain') { - tableObject.params = { - // fromInventoryStatus: 'HOLD', - // toInventoryStatus:'SCRAP', - businessType:'HoldToScrap' - } - fromInventoryStatus.value = 'HOLD' - toInventoryStatus.value = "SCRAP" - businessType.value = 'HoldToScrap' - importFileName.value = '隔离转报废申请' -} else if ( routeName.value == 'OktoscrapRequestMain') { - tableObject.params = { - // fromInventoryStatus: 'OK', - // toInventoryStatus:'SCRAP', - businessType :'OkToScrap' - } - fromInventoryStatus.value = 'OK' - toInventoryStatus.value = "SCRAP" - businessType.value = 'OkToScrap' - importFileName.value = '合格转报废申请' -} -else if ( routeName.value == 'ScraptoholdRequestMain') { - tableObject.params = { - // fromInventoryStatus: 'SCRAP', - // toInventoryStatus:'HOLD', - businessType :'ScrapToHold' - } - fromInventoryStatus.value = 'SCRAP' - toInventoryStatus.value = "HOLD" - businessType.value = 'ScrapToHold' - importFileName.value = '报废转隔离申请' -} else { - tableObject.params = { - businessType :'Move' - } - businessType.value = 'Move' - importFileName.value = '库存移动申请' -} InventorymoveRequestMain.allSchemas.tableFormColumns.map(item =>{ if(item.field == 'fromWarehouseCode') { @@ -451,9 +393,9 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:inventorymove-request-main:create'}), // 新增 - defaultButtons.defaultImportBtn({hasPermi:'wms:inventorymove-request-main:import'}), // 导入 - defaultButtons.defaultExportBtn({hasPermi:'wms:inventorymove-request-main:export'}), // 导出 + defaultButtons.defaultAddBtn({hasPermi:`wms:${routeName.value}:create`}), // 新增 + defaultButtons.defaultImportBtn({hasPermi:`wms:${routeName.value}:import`}), // 导入 + defaultButtons.defaultExportBtn({hasPermi:`wms:${routeName.value}:export`}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -505,14 +447,14 @@ const butttondata = (row,$index) => { return [] } return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:inventorymove-request-main:close'}), // 关闭 - defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:inventorymove-request-main:reAdd'}), //重新添加 - defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:submit'}), // 提交审批 - defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:refused'}), // 驳回 - defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:agree'}), // 审批通过 - defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:inventorymove-request-main:handle'}), // 处理 - defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:update'}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventorymove-request-main:delete'}), // 删除 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:`wms:${routeName.value}:close`}), // 关闭 + defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:`wms:${routeName.value}:reAdd`}), //重新添加 + defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:`wms:${routeName.value}:submit`}), // 提交审批 + defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:`wms:${routeName.value}:refused`}), // 驳回 + defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:`wms:${routeName.value}:agree`}), // 审批通过 + defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:`wms:${routeName.value}:handle`}), // 处理 + defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:`wms:${routeName.value}:update`}), // 编辑 + // defaultButtons.mainListDeleteBtn({hasPermi:`wms:${routeName.value}:delete`}), // 删除 ] }