Browse Source

盘点子表删除bug,盘点解冻按钮

master
zhang_li 11 months ago
parent
commit
6fae7af59f
  1. 4
      src/api/wms/countRequestMain/index.ts
  2. 1
      src/components/BasicForm/src/BasicForm.vue
  3. 4
      src/components/TableFormCountPlan/src/TableFormCountPlan.vue
  4. 12
      src/utils/disposition/defaultButtons.ts
  5. 17
      src/views/wms/countManage/count/countRequestMain/index.vue

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

@ -106,3 +106,7 @@ export const superviseCount = async (data) => {
export const generateCountadjustRequest = async (id) => {
return await request.put({ url: `/wms/count-request-main/generateCountadjustRequest?id=` + id })
}
//解冻
export const thaw = async (id) => {
return await request.put({ url: `/wms/count-request-main/thaw?id=` + id })
}

1
src/components/BasicForm/src/BasicForm.vue

@ -90,6 +90,7 @@
ref="tableFormRef"
@tableFormChange="tableFormChange"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
/>
</div>
<template #footer>

4
src/components/TableFormCountPlan/src/TableFormCountPlan.vue

@ -168,6 +168,10 @@ const tableFormChange = (field, val, row) => {
const handleAddTable = () => {
emit('handleAddTable')
}
//
const handleDeleteTable = (row, index) => {
emit('handleDeleteTable', row, index)
}
// setup
defineExpose({
TableBaseComponents_Ref,

12
src/utils/disposition/defaultButtons.ts

@ -723,6 +723,18 @@ export function mainSuperviseCountBtn(option:any) {
hasPermi: ''
})
}
// 主列表-解冻
export function mainThawRequesttBtn(option:any) {
return __defaultBtnOption(option,{
label: '解冻',
name: 'mainThaw',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 默认按钮规则
function __defaultBtnOption(option:any,specific:any){
return {

17
src/views/wms/countManage/count/countRequestMain/index.vue

@ -312,7 +312,11 @@ const butttondata = (row) => {
defaultButtons.mainCountAdjustRequesttBtn({
hide: isShowGenerateMainButton(row, ['2']),
hasPermi: 'wms:count-request-main:generate'
}) //
}), //
defaultButtons.mainThawRequesttBtn({
hide: isShowGenerateMainButton(row, ['3']),
hasPermi: 'wms:count-request-main:thaw'
}) //
]
}
@ -419,6 +423,17 @@ const buttonTableClick = async (val, row) => {
.catch((err) => {
console.log(err)
})
} else if (val == 'mainThaw') {
//
await message.confirm('确认要解冻吗?')
CountRequestMainApi.thaw(row.id)
.then(() => {
message.success(t('解冻成功'))
getList()
})
.catch((err) => {
console.log(err)
})
} else if (val == 'edit') {
//
openForm('update', row)

Loading…
Cancel
Save