Browse Source

HL-5257制品子件报废撤销

hella_online_20240803
zhaoyiran 2 months ago
parent
commit
427cec80c1
  1. 5
      src/api/wms/productscrapRecordMain/index.ts
  2. 20
      src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue
  3. 10
      src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts

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

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

20
src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue

@ -238,17 +238,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 ProductscrapRecordMainApi.revoke(row.requestNumber, row.number)
buttonBaseClick('refresh',null)
}
} }
// //
const { wsCache } = useCache() const { wsCache } = useCache()

10
src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts

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

Loading…
Cancel
Save