Browse Source

器具管理

master_hella_20240701
chenfang 6 months ago
parent
commit
0ca82cafb1
  1. 12
      src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue
  2. 90
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
  3. 24
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts

12
src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue

@ -84,7 +84,7 @@
import download from '@/utils/download' import download from '@/utils/download'
import { ContainerMainRequest,ContainerMainRequestRules,ContainerDetailRequest,ContainerDetailRequestRules } from './containerMainRequest.data' import { ContainerMainRequest,ContainerMainRequestRules,ContainerDetailRequest,ContainerDetailRequestRules } from './containerMainRequest.data'
import * as ContainerMainRequestApi from '@/api/wms/containerMainRequest' import * as ContainerMainRequestApi from '@/api/wms/containerMainRequest'
import * as ContainerDetailRequestApi from '@/api/wms/ContainerDetailRequest' import * as ContainerDetailRequestApi from '@/api/wms/containerDetailRequest'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -115,7 +115,7 @@ const { tableObject, tableMethods } = useTable({
type:'SCRAP' type:'SCRAP'
} }
// toLocationCode.value = "SCRAP_CONTAIN" // toLocationCode.value = "SCRAP_CONTAIN"
businessType.value = 'ScrapContainerMenageRequest' businessType.value = 'ScrapContainerManage'
importFileName.value = '器具报废申请' importFileName.value = '器具报废申请'
} else if ( routeName.value == 'returnContainerMain') { } else if ( routeName.value == 'returnContainerMain') {
tableObject.params = { tableObject.params = {
@ -123,7 +123,7 @@ const { tableObject, tableMethods } = useTable({
} }
// fromLocationCode.value = null // fromLocationCode.value = null
// toLocationCode.value = "NULL_CONTAIN" // toLocationCode.value = "NULL_CONTAIN"
businessType.value = 'ReturnContainerMenageRequest' businessType.value = 'ReturnContainerManage'
importFileName.value = '器具返回申请' importFileName.value = '器具返回申请'
} else if ( routeName.value == 'moveContainerMainRequest') { } else if ( routeName.value == 'moveContainerMainRequest') {
tableObject.params = { tableObject.params = {
@ -131,10 +131,10 @@ const { tableObject, tableMethods } = useTable({
} }
// fromLocationCode.value = null // fromLocationCode.value = null
// toLocationCode.value = null // toLocationCode.value = null
businessType.value = 'MoveContainerMenageRequest' businessType.value = 'MoveContainerManage'
importFileName.value = '器具转移申请' importFileName.value = '器具转移申请'
} else if ( routeName.value == 'deliverContainerMainRequest') { } else if ( routeName.value == 'deliverContainerMainRequest') {
tableObject.params = { tableObject.params = {InitialContainerManage
type: 'DELIVER', type: 'DELIVER',
} }
// fromLocationCode.value = null // fromLocationCode.value = null
@ -142,7 +142,7 @@ const { tableObject, tableMethods } = useTable({
businessType.value = 'DeliverContainerMainRequest' businessType.value = 'DeliverContainerMainRequest'
importFileName.value = '器具发运申请' importFileName.value = '器具发运申请'
} else if( routeName.value == 'containerMainRequest'){ } else if( routeName.value == 'containerMainRequest'){
businessType.value = 'ContainerMenageRequest' businessType.value = 'ContainerManage'
importFileName.value = '器具管理申请' importFileName.value = '器具管理申请'
} }

90
src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue

@ -34,7 +34,7 @@
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -113,7 +113,7 @@ const { tableObject, tableMethods } = useTable({
tableObject.params = { tableObject.params = {
type:'INITIAL' type:'INITIAL'
} }
businessType.value = 'InitialContainerManageRequest' businessType.value = 'InitialContainerManage'
importFileName.value = '器具初始化申请' importFileName.value = '器具初始化申请'
} }
@ -195,6 +195,15 @@ const updataTableColumns = (val) => {
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:container-main-request:create'}), // defaultButtons.defaultAddBtn({hasPermi:'wms:container-main-request:create'}), //
@ -247,15 +256,75 @@ const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['ma
] ]
} }
// // -
// const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:container-main-request:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:container-main-request:delete'}), //
// ]
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'mainClose') { //
await message.confirm('确认要关闭吗?')
tableObject.loading = true
ContainerMainRequestApi.close(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainReAdd') { //
await message.confirm('确认要重新添加吗?')
tableObject.loading = true
ContainerMainRequestApi.reAdd(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainSubmit') { //
await message.confirm('确认要提交审批吗?')
tableObject.loading = true
ContainerMainRequestApi.submit(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainTurnDown') { //
await message.confirm('确认要驳回吗?')
tableObject.loading = true
ContainerMainRequestApi.refused(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainApprove') { //
await message.confirm('确认要审批通过吗?')
tableObject.loading = true
ContainerMainRequestApi.agree(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainHandle') { //
await message.confirm('确认要 处理吗?')
tableObject.loading = true
ContainerMainRequestApi.handle(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
@ -303,6 +372,9 @@ const submitForm = async (formType,data) => {
}) })
try { try {
if (formType === 'create') { if (formType === 'create') {
data.businessType = businessType.value
console.log(data.businessType,999);
await ContainerMainRequestApi.createContainerMainRequest(data) await ContainerMainRequestApi.createContainerMainRequest(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {

24
src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts

@ -257,7 +257,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action', field: 'action',
isForm: false, isForm: false,
table: { table: {
width: 150, width: 200,
fixed: 'right' fixed: 'right'
} }
} }
@ -352,6 +352,26 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '到库存状态',
field: 'toInventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
type: 'Select'
},
form: {
componentProps: {
disabled: true
}
}
},
{ {
label: '到数量', label: '到数量',
field: 'toQty', field: 'toQty',
@ -438,7 +458,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action', field: 'action',
isForm: false, isForm: false,
table: { table: {
width: 150, width: 200,
fixed: 'right' fixed: 'right'
} }
} }

Loading…
Cancel
Save