✨ feat(mes): 更新检验单完成接口及权限管理
parent
fa38b554ea
commit
32ad593fae
|
|
@ -67,8 +67,8 @@ export const QcIpqcApi = {
|
|||
},
|
||||
|
||||
// 完成过程检验单
|
||||
completeIpqc: async (id: number) => {
|
||||
return await request.put({ url: `/mes/qc/ipqc/complete?id=` + id })
|
||||
finishIpqc: async (id: number) => {
|
||||
return await request.put({ url: `/mes/qc/ipqc/finish?id=` + id })
|
||||
},
|
||||
|
||||
// 删除过程检验单
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ export const QcIqcApi = {
|
|||
},
|
||||
|
||||
// 完成来料检验单
|
||||
completeIqc: async (id: number) => {
|
||||
return await request.put({ url: `/mes/qc/iqc/complete?id=` + id })
|
||||
finishIqc: async (id: number) => {
|
||||
return await request.put({ url: `/mes/qc/iqc/finish?id=` + id })
|
||||
},
|
||||
|
||||
// 删除来料检验单
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ export const QcOqcApi = {
|
|||
},
|
||||
|
||||
// 完成出货检验单
|
||||
completeOqc: async (id: number) => {
|
||||
return await request.put({ url: `/mes/qc/oqc/complete?id=` + id })
|
||||
finishOqc: async (id: number) => {
|
||||
return await request.put({ url: `/mes/qc/oqc/finish?id=` + id })
|
||||
},
|
||||
|
||||
// 删除出货检验单
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@ export const QcRqcApi = {
|
|||
},
|
||||
|
||||
// 完成退货检验单
|
||||
completeRqc: async (id: number) => {
|
||||
return await request.put({ url: `/mes/qc/rqc/complete?id=` + id })
|
||||
finishRqc: async (id: number) => {
|
||||
return await request.put({ url: `/mes/qc/rqc/finish?id=` + id })
|
||||
},
|
||||
|
||||
// 删除退货检验单
|
||||
|
|
|
|||
|
|
@ -142,8 +142,8 @@
|
|||
<el-button
|
||||
link
|
||||
type="success"
|
||||
@click="handleComplete(scope.row.id)"
|
||||
v-hasPermi="['mes:qc-ipqc:update']"
|
||||
@click="handleFinish(scope.row.id)"
|
||||
v-hasPermi="['mes:qc-ipqc:finish']"
|
||||
v-if="scope.row.status === MesQcStatusEnum.DRAFT"
|
||||
>
|
||||
完成
|
||||
|
|
@ -234,10 +234,10 @@ const openForm = (type: string, id?: number) => {
|
|||
}
|
||||
|
||||
/** 完成操作 */
|
||||
const handleComplete = async (id: number) => {
|
||||
const handleFinish = async (id: number) => {
|
||||
try {
|
||||
await message.confirm('是否完成过程检验单编制?【完成后将不能更改】')
|
||||
await QcIpqcApi.completeIpqc(id)
|
||||
await QcIpqcApi.finishIpqc(id)
|
||||
message.success('完成成功')
|
||||
await getList()
|
||||
} catch {}
|
||||
|
|
|
|||
|
|
@ -143,8 +143,8 @@
|
|||
<el-button
|
||||
link
|
||||
type="success"
|
||||
@click="handleComplete(scope.row.id)"
|
||||
v-hasPermi="['mes:qc-oqc:update']"
|
||||
@click="handleFinish(scope.row.id)"
|
||||
v-hasPermi="['mes:qc-oqc:finish']"
|
||||
v-if="scope.row.status === MesQcStatusEnum.DRAFT"
|
||||
>
|
||||
完成
|
||||
|
|
@ -237,10 +237,10 @@ const openForm = (type: string, id?: number) => {
|
|||
}
|
||||
|
||||
/** 完成操作 */
|
||||
const handleComplete = async (id: number) => {
|
||||
const handleFinish = async (id: number) => {
|
||||
try {
|
||||
await message.confirm('是否完成出货检验单编制?【完成后将不能更改】')
|
||||
await QcOqcApi.completeOqc(id)
|
||||
await QcOqcApi.finishOqc(id)
|
||||
message.success('完成成功')
|
||||
await getList()
|
||||
} catch {}
|
||||
|
|
|
|||
|
|
@ -149,8 +149,8 @@
|
|||
<el-button
|
||||
link
|
||||
type="success"
|
||||
@click="handleComplete(scope.row.id)"
|
||||
v-hasPermi="['mes:qc-rqc:update']"
|
||||
@click="handleFinish(scope.row.id)"
|
||||
v-hasPermi="['mes:qc-rqc:finish']"
|
||||
v-if="scope.row.status === MesQcStatusEnum.DRAFT"
|
||||
>
|
||||
完成
|
||||
|
|
@ -242,10 +242,10 @@ const openForm = (type: string, id?: number) => {
|
|||
}
|
||||
|
||||
/** 完成操作 */
|
||||
const handleComplete = async (id: number) => {
|
||||
const handleFinish = async (id: number) => {
|
||||
try {
|
||||
await message.confirm('是否完成退货检验单编制?【完成后将不能更改】')
|
||||
await QcRqcApi.completeRqc(id)
|
||||
await QcRqcApi.finishRqc(id)
|
||||
message.success('完成成功')
|
||||
await getList()
|
||||
} catch {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue