Browse Source

关闭翻包任务

hella_online_20240829
wangyufei 4 months ago
parent
commit
9ae975ac0d
  1. 4
      src/api/wms/packageoverJobMain/index.ts
  2. 38
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/index.vue
  3. 18
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts

4
src/api/wms/packageoverJobMain/index.ts

@ -69,6 +69,10 @@ export const updatePackageoverJobMain = async (data: PackageoverJobMainVO) => {
export const deletePackageoverJobMain = async (id: number) => {
return await request.delete({ url: `/wms/packageover-job-main/delete?id=` + id })
}
// 关闭翻包任务主
export const closePackageoverJobMain = async (id: number) => {
return await request.put({ url: `/wms/packageover-job-main/close?id=` + id })
}
// 导出翻包任务主 Excel
export const exportPackageoverJobMain = async (params) => {

38
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/index.vue

@ -33,9 +33,9 @@
<span>{{ row.number }}</span>
</el-button>
</template>
<!-- <template #action="{ row,$index }">
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template> -->
</template>
</Table>
</ContentWrap>
@ -138,16 +138,34 @@ const buttonBaseClick = (val, item) => {
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:packageover-job-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:packageover-job-main:delete'}), //
]
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [
// defaultButtons.mainListEditBtn({hasPermi:'wms:packageover-job-main:update'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:packageover-job-main:close'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:packageover-job-main:delete'}), //
]
}
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'mainClose') { //
//
await message.confirm('确认要关闭吗?')
await PackageoverJobMainApi.closePackageoverJobMain(row.masterId)
//
await getList()
}else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.masterId)

18
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts

@ -523,15 +523,15 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isTable: false
},
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验

Loading…
Cancel
Save