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

@ -105,4 +105,8 @@ export const superviseCount = async (data) => {
//生成盘点调整申请 //生成盘点调整申请
export const generateCountadjustRequest = async (id) => { export const generateCountadjustRequest = async (id) => {
return await request.put({ url: `/wms/count-request-main/generateCountadjustRequest?id=` + 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" ref="tableFormRef"
@tableFormChange="tableFormChange" @tableFormChange="tableFormChange"
@handleAddTable="handleAddTable" @handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
/> />
</div> </div>
<template #footer> <template #footer>

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

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

12
src/utils/disposition/defaultButtons.ts

@ -723,6 +723,18 @@ export function mainSuperviseCountBtn(option:any) {
hasPermi: '' 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){ function __defaultBtnOption(option:any,specific:any){
return { return {

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

@ -312,7 +312,11 @@ const butttondata = (row) => {
defaultButtons.mainCountAdjustRequesttBtn({ defaultButtons.mainCountAdjustRequesttBtn({
hide: isShowGenerateMainButton(row, ['2']), hide: isShowGenerateMainButton(row, ['2']),
hasPermi: 'wms:count-request-main:generate' 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) => { .catch((err) => {
console.log(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') { } else if (val == 'edit') {
// //
openForm('update', row) openForm('update', row)

Loading…
Cancel
Save