无货上报lms优化与输送线指令初始化

This commit is contained in:
张江玮
2023-02-02 17:15:49 +08:00
parent 677125f92d
commit 921f57acb2
8 changed files with 77 additions and 15 deletions

View File

@@ -70,4 +70,12 @@ export function reload() {
})
}
export default { add, edit, del, finish, cancel, forceCancel, queryUnFinish, queryByTaskId, reload }
export function init(instruction_id) {
return request({
url: 'api/instruction/init/' + instruction_id,
method: 'post',
data: instruction_id
})
}
export default { add, edit, del, finish, cancel, forceCancel, queryUnFinish, queryByTaskId, reload, init }

View File

@@ -180,6 +180,7 @@
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'a')">完成</el-dropdown-item>
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'b')">取消</el-dropdown-item>
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'c')">强制取消</el-dropdown-item>
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'d')">初始化</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
@@ -320,6 +321,14 @@ export default {
console.log(err.response.data.message)
})
},
init(index, row) {
crudInstruction.init(row.instruction_id).then(res => {
this.crud.toQuery()
this.crud.notify('初始化成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(err => {
console.log(err.response.data.message)
})
},
reload() {
crudInstruction.reload().then(res => {
this.crud.toQuery()
@@ -346,6 +355,9 @@ export default {
case 'c':// 强制取消
this.forceCancel(command.index, command.row)
break
case 'd':// 初始化
this.init(command.index, command.row)
break
}
}