Browse Source

HL-5257计划外入库撤销

hella_online_20240803
zhaoyiran 3 weeks ago
parent
commit
b9a16dc63e
  1. 5
      src/api/wms/unplannedreceiptRecordMain/index.ts
  2. 20
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/index.vue
  3. 10
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts

5
src/api/wms/unplannedreceiptRecordMain/index.ts

@ -69,3 +69,8 @@ export const exportUnplannedreceiptRecordMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/unplannedreceipt-record-main/get-import-template' }) return request.download({ url: '/wms/unplannedreceipt-record-main/get-import-template' })
} }
// 撤销
export const revoke = async (id: number) => {
return await request.get({ url: `/wms/unplannedreceipt-record-main/revoke?id=` + id })
}

20
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/index.vue

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

10
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts

@ -467,6 +467,16 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>(
} }
} }
}, },
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 120,
fixed: 'right'
},
}
])) ]))
//表单校验 //表单校验

Loading…
Cancel
Save