Browse Source

制品维修与报废

master
zhaoxuebing 11 months ago
parent
commit
1dbdcddb44
  1. 12
      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

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

@ -48,4 +48,14 @@ export const exportContainerMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
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: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150
}
},
{
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 = [
defaultButtons.mainListEditBtn({hasPermi:'wms:containerMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:containerMain:delete'}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:container-main:update'}), //
// 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,9 +172,33 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
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 {}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {

Loading…
Cancel
Save