feat: 工单强制报工

This commit is contained in:
2023-11-03 18:12:13 +08:00
parent 41666a22ca
commit 43e9f732fc
9 changed files with 142 additions and 37 deletions

View File

@@ -82,6 +82,17 @@
>
同步
</el-button>
<el-button
slot="right"
class="filter-item"
type="danger"
icon="el-icon-position"
size="mini"
:disabled="!(crud.selections[0]) || crud.selections[1]"
@click="forceFinish(crud.selections[0])"
>
强制完工
</el-button>
</crudOperation>
<!--表单组件-->
<el-dialog
@@ -654,7 +665,7 @@ export default {
submits(row) {
this.fullscreenLoading = true
crudPdmBdWorkorder.submits(row).then(res => {
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.notify('报工完成', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
}).catch(() => {
this.fullscreenLoading = false
@@ -672,6 +683,17 @@ export default {
}).finally(() => {
this.fullscreenLoading = false
})
},
forceFinish(row) {
this.fullscreenLoading = true
crudPdmBdWorkorder.forceFinish(row).then(res => {
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
}).catch(() => {
this.fullscreenLoading = false
}).finally(() => {
this.fullscreenLoading = false
})
}
}
}

View File

@@ -32,6 +32,13 @@ export function submits(param) {
data: param
})
}
export function forceFinish(param) {
return request({
url: 'api/pdmBdWorkorder/forceFinish',
method: 'post',
data: param
})
}
export function orderSynchronize(data) {
return request({
@@ -55,4 +62,4 @@ export function getCuster() {
})
}
export default { add, edit, del, submits, orderSynchronize, queryMaterials, getCuster }
export default { add, edit, del, submits, forceFinish, orderSynchronize, queryMaterials, getCuster }