Browse Source

HL-6140WMS各菜单权限排查并解除依赖关系----隔离合格一套

hella_online_20241011
yufei_wang 2 months ago
parent
commit
594e6d892c
  1. 10
      src/components/BasicForm/src/BasicForm.vue
  2. 11
      src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue
  3. 4
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue
  4. 14
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue
  5. 14
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/index.vue
  6. 48
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  7. 76
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/index.vue
  8. 158
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/index.vue
  9. 84
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue

10
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]){

11
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), //

4
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), //

14
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()
})
</script>
./inventorymoveRecordRequestMain.data

14
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()
})
</script>

48
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') {

76
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()
})
</script>

158
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()
}
})
</script>

84
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`}), //
]
}

Loading…
Cancel
Save