fix: 强制完成

This commit is contained in:
2024-04-08 17:11:20 +08:00
parent 7ddf8e7af5
commit 8611b43a98
12 changed files with 80 additions and 22 deletions

View File

@@ -24,11 +24,11 @@ export function edit(data) {
})
}
export function finish(task_id) {
export function finish(data) {
return request({
url: 'api/task/finish/' + task_id,
url: 'api/task/finish',
method: 'post',
data: task_id
data: data
})
}

View File

@@ -35,6 +35,7 @@ export default {
'Ready': 'Ready',
'In_progress': 'In Progress',
'Completed': 'Completed',
'Forced_Completed': 'Forced Completed',
'Pickup_point': 'Pickup Point',
'Delivery_point': 'Delivery Point',
'Remark': 'Remark',

View File

@@ -35,6 +35,7 @@ export default {
'Ready': 'Siap',
'In_progress': 'Sedang Berlangsung',
'Completed': 'Selesai',
'Forced_Completed': 'Penyelesaian wajib',
'Pickup_point': 'Titik Pengambilan',
'Delivery_point': 'Titik Pengiriman',
'Remark': 'Catatan',

View File

@@ -35,6 +35,7 @@ export default {
'Ready': '就绪',
'In_progress': '执行中',
'Completed': '完成',
'Forced_Completed': '强制完成',
'Pickup_point': '取货点',
'Delivery_point': '放货点',
'Remark': '备注',

View File

@@ -559,6 +559,15 @@
{{ $t('task.select.Create_command') }}
</el-button>
</el-dropdown-item>
<el-dropdown-item>
<el-button
type="text"
icon="el-icon-finished"
@click="handleCommand(scope.$index, scope.row,'d')"
>
{{ $t('task.select.Forced_Completed') }}
</el-button>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
@@ -695,6 +704,10 @@ export default {
agv_system_type: '',
interactionJson: null
},
taskStatus: {
task_status: '',
task_id: null
},
extension: [{
name: '',
value: ''
@@ -790,7 +803,9 @@ export default {
return true
},
finish(index, row) {
crudTask.finish(row.task_id).then(res => {
this.taskStatus.task_id = row.task_id
this.taskStatus.task_status = index
crudTask.finish(this.taskStatus).then(res => {
this.crud.toQuery()
this.crud.notify('完成成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(err => {
@@ -831,7 +846,7 @@ export default {
handleCommand(index, row, command) {
switch (command) {
case 'a':// 完成
this.finish(index, row)
this.finish('3', row)
break
case 'b':// 取消
this.cancel(index, row)
@@ -839,6 +854,9 @@ export default {
case 'c':// 创建指令
this.createInst(index, row)
break
case 'd':// 完成
this.finish('4', row)
break
}
},
showStartStorage(val) {