Browse Source

制品维修与报废

master
zhaoxuebing 11 months ago
parent
commit
1dbdcddb44
  1. 10
      src/api/wms/containerMain/index.ts
  2. 4
      src/views/wms/inventoryManage/containerinit/containerRepair/containerRepairRecordMain.data.ts
  3. 10
      src/views/wms/inventoryManage/containerinit/containerinitadd/containerMain.data.ts
  4. 46
      src/views/wms/inventoryManage/containerinit/containerinitadd/index.vue

10
src/api/wms/containerMain/index.ts

@ -49,3 +49,13 @@ export const exportContainerMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/container-main/get-import-template' }) return request.download({ url: '/wms/container-main/get-import-template' })
} }
// 器具维修
export const repairSubmitContainerRequestMain = async (id) => {
return await request.put({ url: `/wms/container-main/repair?id=` + id })
}
// 器具报废
export const scrapSubmitContainerRequestMain = async (id) => {
return await request.put({ url: `/wms/container-main/scrap?id=` + id })
}

4
src/views/wms/inventoryManage/containerinit/containerRepair/containerRepairRecordMain.data.ts

@ -65,7 +65,9 @@ export const ContainerRepairRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '单据号', label: '单据号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 150
}
}, },
{ {
label: '器具号', label: '器具号',

10
src/views/wms/inventoryManage/containerinit/containerinitadd/containerMain.data.ts

@ -133,6 +133,16 @@ export const ContainerMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 300,
fixed: 'right'
},
}
])) ]))

46
src/views/wms/inventoryManage/containerinit/containerinitadd/index.vue

@ -144,8 +144,26 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:containerMain:update'}), // defaultButtons.mainListEditBtn({hasPermi:'wms:container-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:containerMain:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'wms:container-main:delete'}), //
{
label: '维修',
name: 'repair',
hide: false,
type: 'primary',
color: '',
link: true, //
hasPermi: ''
},
{
label: '报废',
name: 'scrap',
hide: false,
type: 'danger',
color: '',
link: true, //
hasPermi: ''
}
] ]
// - // -
@ -154,7 +172,31 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if(val == 'repair'){ //
repairSubmit(row.id)
} else if(val == 'scrap'){ //
scrapSubmit(row.id)
}
} }
/** 维修按钮操作 */
const repairSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await ContainerMainApi.repairSubmitContainerRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}
/** 报废按钮操作 */
const scrapSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await ContainerMainApi.scrapSubmitContainerRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
} catch {}
} }
/** 添加/修改操作 */ /** 添加/修改操作 */

Loading…
Cancel
Save