|
|
@ -32,7 +32,7 @@ |
|
|
|
style="width: 190px" |
|
|
|
@change="crud.toQuery" |
|
|
|
> |
|
|
|
<el-option v-for="item in materialList" :key="item.id" :label="item.label" :value="item.value" /> |
|
|
|
<el-option v-for="item in materialList" :key="item.id" :label="item.label" :value="item.value"/> |
|
|
|
</el-select> |
|
|
|
<el-select |
|
|
|
v-model="query.status" |
|
|
@ -44,7 +44,7 @@ |
|
|
|
style="width: 190px" |
|
|
|
@change="crud.toQuery" |
|
|
|
> |
|
|
|
<el-option v-for="item in dict.task_status" :key="item.id" :label="item.label" :value="item.value" /> |
|
|
|
<el-option v-for="item in dict.task_status" :key="item.id" :label="item.label" :value="item.value"/> |
|
|
|
</el-select> |
|
|
|
<el-input |
|
|
|
v-model="query.point_code" |
|
|
@ -90,10 +90,12 @@ |
|
|
|
</el-button> |
|
|
|
</crudOperation> |
|
|
|
<!--表单组件--> |
|
|
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> |
|
|
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" |
|
|
|
:title="crud.status.title" width="500px" |
|
|
|
> |
|
|
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> |
|
|
|
<el-form-item v-if="false" label="任务标识" prop="task_id"> |
|
|
|
<el-input v-model="form.task_id" style="width: 370px;" /> |
|
|
|
<el-input v-model="form.task_id" style="width: 370px;"/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="物料类型"> |
|
|
|
<el-select |
|
|
@ -234,13 +236,13 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="优先级"> |
|
|
|
<el-input v-model="form.priority" style="width: 370px;" /> |
|
|
|
<el-input v-model="form.priority" style="width: 370px;"/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="载具号"> |
|
|
|
<el-input v-model="form.vehicle_code" style="width: 370px;" /> |
|
|
|
<el-input v-model="form.vehicle_code" style="width: 370px;"/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="描述信息" prop="description"> |
|
|
|
<el-input v-model="form.remark" style="width: 380px;" rows="5" type="textarea" /> |
|
|
|
<el-input v-model="form.remark" style="width: 380px;" rows="5" type="textarea"/> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
@ -249,17 +251,24 @@ |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<!--表格渲染--> |
|
|
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> |
|
|
|
<el-table-column type="selection" width="25" /> |
|
|
|
<el-table-column v-if="false" prop="task_id" label="任务标识" /> |
|
|
|
<el-table-column prop="task_code" label="任务号" /> |
|
|
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" |
|
|
|
@selection-change="crud.selectionChangeHandler" |
|
|
|
> |
|
|
|
<el-table-column type="selection" width="25"/> |
|
|
|
<el-table-column v-if="false" prop="task_id" label="任务标识"/> |
|
|
|
<el-table-column prop="task_code" label="任务号"/> |
|
|
|
<el-table-column prop="task_type_name" label="任务类型"/> |
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
<!-- <span v-if="scope.row.task_type==='0' ">普通任务</span>--> |
|
|
|
<!-- <span v-if="scope.row.task_type==='1' ">特殊任务</span>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<el-table-column prop="vehicle_code" label="载具号" /> |
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
<!-- <span v-if="scope.row.task_type==='0' ">普通任务</span>--> |
|
|
|
<!-- <span v-if="scope.row.task_type==='1' ">特殊任务</span>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<el-table-column prop="vehicle_code" label="载具号"/> |
|
|
|
<el-table-column prop="vehicle_type" label="托盘类型"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ dict.label.vehicle_type[scope.row.vehicle_type] }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="task_status" label="任务状态"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.task_status==='0' ">就绪</span> |
|
|
@ -268,28 +277,30 @@ |
|
|
|
<span v-if="scope.row.task_status==='4' ">暂停</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="priority" label="任务优先级" /> |
|
|
|
<el-table-column prop="start_point_code" label="起点" /> |
|
|
|
<el-table-column prop="start_parent_code" label="父起点点位" width="100" /> |
|
|
|
<el-table-column prop="next_point_code" label="终点" /> |
|
|
|
<el-table-column prop="next_parent_code" label="父终点点位" width="100" /> |
|
|
|
<el-table-column prop="priority" label="任务优先级"/> |
|
|
|
<el-table-column prop="start_point_code" label="起点"/> |
|
|
|
<el-table-column prop="start_parent_code" label="父起点点位" width="100"/> |
|
|
|
<el-table-column prop="next_point_code" label="终点"/> |
|
|
|
<el-table-column prop="next_parent_code" label="父终点点位" width="100"/> |
|
|
|
<el-table-column prop="compound_task" label="复合任务"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.compound_task==='0' ">否</span> |
|
|
|
<span v-if="scope.row.compound_task==='1' ">是</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="compound_task_data" width="200" label="复合路线" /> |
|
|
|
<el-table-column prop="matarial" label="物料" /> |
|
|
|
<el-table-column prop="quantity" label="数量" /> |
|
|
|
<el-table-column prop="remark" label="备注" /> |
|
|
|
<el-table-column prop="create_by" label="创建者" /> |
|
|
|
<el-table-column prop="create_time" label="创建时间" width="135" /> |
|
|
|
<el-table-column v-permission="['admin','task:edit','task:del']" fixed="left" label="操作" width="150px" align="center"> |
|
|
|
<el-table-column prop="compound_task_data" width="200" label="复合路线"/> |
|
|
|
<el-table-column prop="matarial" label="物料"/> |
|
|
|
<el-table-column prop="quantity" label="数量"/> |
|
|
|
<el-table-column prop="remark" label="备注"/> |
|
|
|
<el-table-column prop="create_by" label="创建者"/> |
|
|
|
<el-table-column prop="create_time" label="创建时间" width="135"/> |
|
|
|
<el-table-column v-permission="['admin','task:edit','task:del']" fixed="left" label="操作" width="150px" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-dropdown trigger="click" @command="handleCommand"> |
|
|
|
<span class="el-dropdown-link"> |
|
|
|
<i class="el-icon-menu" /> |
|
|
|
<i class="el-icon-menu"/> |
|
|
|
</span> |
|
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
|
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'a')">完成</el-dropdown-item> |
|
|
@ -301,7 +312,7 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<!--分页组件--> |
|
|
|
<pagination /> |
|
|
|
<pagination/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -338,10 +349,10 @@ const defaultForm = { |
|
|
|
export default { |
|
|
|
name: 'Task', |
|
|
|
components: { pagination, crudOperation }, |
|
|
|
dicts: ['task_status', 'task_type'], |
|
|
|
dicts: ['task_status', 'task_type', 'vehicle_type'], |
|
|
|
mixins: [presenter(), header(), form(defaultForm), crud()], |
|
|
|
cruds() { |
|
|
|
return CRUD({ title: '任务', url: 'api/task', idField: 'task_id', sort: 'task_id,desc', crudMethod: { ...crudTask }}) |
|
|
|
return CRUD({ title: '任务', url: 'api/task', idField: 'task_id', sort: 'task_id,desc', crudMethod: { ...crudTask } }) |
|
|
|
}, |
|
|
|
data() { |
|
|
|
const checkFromY = (rule, value, callback) => { |
|
|
@ -624,6 +635,7 @@ export default { |
|
|
|
cursor: pointer; |
|
|
|
color: #409EFF; |
|
|
|
} |
|
|
|
|
|
|
|
.el-icon-arrow-down { |
|
|
|
font-size: 12px; |
|
|
|
} |
|
|
|