Browse Source

HL-5257报废出库撤销

hella_online_20240829
zhaoyiran 3 months ago
parent
commit
07db916b1c
  1. 7
      src/api/wms/scrapRecordMain/index.ts
  2. 16
      src/views/wms/inventoryjobManage/scrap/scrapRecordMain/index.vue
  3. 10
      src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts

7
src/api/wms/scrapRecordMain/index.ts

@ -68,4 +68,9 @@ export const exportScrapRecordMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/scrap-record-main/get-import-template' })
}
}
// 撤销
export const revoke = async (id: number) => {
return await request.get({ url: `/wms/scrap-record-main/revoke?id=` + id })
}

16
src/views/wms/inventoryjobManage/scrap/scrapRecordMain/index.vue

@ -128,17 +128,31 @@ const buttonBaseClick = (val, item) => {
}
}
const isShowRevokeButton = (row,val) => {
if (val.indexOf(row.revokeFlag) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return []
return [
defaultButtons.backoutBtn({hide:isShowRevokeButton(row,['FALSE'])}) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'backout') { //
await ScrapRecordMainApi.revoke(row.masterId)
buttonBaseClick('refresh',null)
}
}
//
const { wsCache } = useCache()

10
src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts

@ -477,6 +477,16 @@ export const ScrapRecordMain = useCrudSchemas(
activeValue: 'TRUE'
}
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 120,
fixed: 'right'
},
}
])
)

Loading…
Cancel
Save