add:强制完成添加
This commit is contained in:
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -411,14 +411,14 @@
|
||||
<el-table-column type="selection" width="50" />
|
||||
<el-table-column v-if="false" prop="task_id" label="任务标识" :min-width="flexWidth('task_id',crud.data,'任务标识')" />
|
||||
<el-table-column prop="task_code" label="任务号" :min-width="flexWidth('task_code',crud.data,'任务号')" />
|
||||
<el-table-column prop="task_type" label="任务类型" width="120px" >
|
||||
<el-table-column prop="task_type" label="任务类型" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.task_type[scope.row.task_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="link_num" label="关联编号" />-->
|
||||
<el-table-column prop="vehicle_code" label="载具号" :min-width="flexWidth('vehicle_code',crud.data,'载具号')" />
|
||||
<el-table-column prop="task_status" label="任务状态" :min-width="flexWidth('task_status',crud.data,'任务状态')" >
|
||||
<el-table-column prop="task_status" label="任务状态" :min-width="flexWidth('task_status',crud.data,'任务状态')">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.task_status[scope.row.task_status] }}
|
||||
</template>
|
||||
@@ -429,12 +429,12 @@
|
||||
<el-table-column prop="start_point_code2" label="取货点2" :min-width="flexWidth('start_point_code2',crud.data,'取货点2')" />
|
||||
<el-table-column prop="next_point_code2" label="放货点2" :min-width="flexWidth('next_point_code2',crud.data,'放货点2')" />
|
||||
<el-table-column prop="put_point_code" label="中转点" :min-width="flexWidth('put_point_code',crud.data,'中转点')" />
|
||||
<el-table-column prop="agv_system_type" label="AGV系统类型" width="120px" >
|
||||
<el-table-column prop="agv_system_type" label="AGV系统类型" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.agv_system_type[scope.row.agv_system_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="storage_task_type" label="立库任务类型" :min-width="flexWidth('storage_task_type',crud.data,'立库任务类型')" >
|
||||
<el-table-column prop="storage_task_type" label="立库任务类型" :min-width="flexWidth('storage_task_type',crud.data,'立库任务类型')">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.storage_task_type[scope.row.storage_task_type] }}
|
||||
</template>
|
||||
@@ -497,6 +497,13 @@
|
||||
>
|
||||
创建指令
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-finished"
|
||||
@click="handleCommand({ index: scope.$index, row: scope.row, command: 'd' })"
|
||||
>
|
||||
强制完成
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -638,6 +645,10 @@ export default {
|
||||
device_code: null,
|
||||
qty: null
|
||||
},
|
||||
taskStatus: {
|
||||
task_status: '',
|
||||
task_id: null
|
||||
},
|
||||
rules: {
|
||||
start_height: [
|
||||
{ required: true, message: '起点高度不能为空', trigger: 'change' }
|
||||
@@ -708,7 +719,9 @@ export default {
|
||||
console.log(this.form.paperArray)
|
||||
},
|
||||
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 => {
|
||||
@@ -751,7 +764,7 @@ export default {
|
||||
console.log(command.command)
|
||||
switch (command.command) {
|
||||
case 'a':// 完成
|
||||
this.finish(command.index, command.row)
|
||||
this.finish('3', command.row)
|
||||
break
|
||||
case 'b':// 取消
|
||||
this.cancel(command.index, command.row)
|
||||
@@ -759,6 +772,9 @@ export default {
|
||||
case 'c':// 创建指令
|
||||
this.createInst(command.index, command.row)
|
||||
break
|
||||
case 'd':// 完成
|
||||
this.finish('4', command.row)
|
||||
break
|
||||
}
|
||||
},
|
||||
showStartStorage(val) {
|
||||
|
||||
Reference in New Issue
Block a user