Browse Source

opt:优化 任务创建模式 相关显示和设置

master
zds 3 months ago
parent
commit
00b1a9500b
  1. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java
  2. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java
  3. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/workorder/service/impl/WorkorderServiceImpl.java
  4. 168
      lms/nladmin-ui/src/views/wms/sch/task/index.vue

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java

@ -125,7 +125,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
param.put("user_id",currentUserId);
param.put("person_name",nickName);
}
param.put("create_mode","3");
if(ObjectUtil.isEmpty(param.getString("create_mode"))){
param.put("create_mode","3");
}
try {
result = this.apply(param);
} catch (Exception e) {

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java

@ -79,7 +79,7 @@ public abstract class AbstractTask {
AcsTaskDto taskDto = new AcsTaskDto();
taskDto.setTask_id(task.getTask_id());
taskDto.setTask_code(task.getTask_code());
//taskDto.setPriority("1");
taskDto.setRoute_plan_code("normal");
taskDto.setStart_device_code(task.getPoint_code1());
taskDto.setNext_device_code(task.getPoint_code2());

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/workorder/service/impl/WorkorderServiceImpl.java

@ -162,6 +162,7 @@ public class WorkorderServiceImpl extends ServiceImpl<WorkorderMapper, Workorder
JSONObject param = new JSONObject();
param.put("start_point", schBasePoint.getPoint_code());
param.put("next_point", nexSchBasePoint.getPoint_code());
param.put("create_mode","1");
param.put("request_medthod_code", "POINTTask");
param.put("request_medthod_name", "点对点任务");
param.put("vehicle_code",schBasePoint.getVehicle_code());
@ -209,6 +210,7 @@ public class WorkorderServiceImpl extends ServiceImpl<WorkorderMapper, Workorder
//设置出库任务参数
param.put("start_point",point_code);
param.put("mode",mode);
param.put("create_mode","1");
param.put("vehicle_code",vehicle_code);
param.put("vehicle_code2", vehicle_code2);
param.put("workorder_code", workorder.getMoname());

168
lms/nladmin-ui/src/views/wms/sch/task/index.vue

@ -73,93 +73,8 @@
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="800px">
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="115px" label-suffix=":">
<el-form-item label="任务编码">
<el-input v-model="form.task_code" style="width: 240px;" />
</el-form-item>
<el-form-item label="任务分类">
<el-input v-model="form.task_class_id" style="width: 240px;" />
</el-form-item>
<el-form-item label="任务状态">
<el-input v-model="form.task_status" style="width: 240px;" />
</el-form-item>
<el-form-item label="配置编码">
<el-input v-model="form.config_code" style="width: 240px;" />
</el-form-item>
<el-form-item label="点位1">
<el-input v-model="form.point_code1" style="width: 240px;" />
</el-form-item>
<el-form-item label="点位2">
<el-input v-model="form.point_code2" style="width: 240px;" />
</el-form-item>
<el-form-item label="点位3">
<el-input v-model="form.point_code3" style="width: 240px;" />
</el-form-item>
<el-form-item label="点位4">
<el-input v-model="form.point_code4" style="width: 240px;" />
</el-form-item>
<el-form-item label="载具类型">
<el-input v-model="form.vehicle_type" style="width: 240px;" />
</el-form-item>
<el-form-item label="载具数量">
<el-input v-model="form.vehicle_qty" style="width: 240px;" />
</el-form-item>
<el-form-item label="母托盘编码">
<el-input v-model="form.vehicle_code" style="width: 240px;" />
</el-form-item>
<!-- <el-form-item label="优先级">-->
<!-- <el-input v-model="form.priority" style="width: 240px;" />-->
<!-- </el-form-item>-->
<el-form-item v-if="false" label="处理类">
<el-input v-model="form.handle_class" style="width: 240px;" />
</el-form-item>
<el-form-item label="处理状态">
<el-input v-model="form.handle_status" style="width: 240px;" />
</el-form-item>
<el-form-item label="车号">
<el-input v-model="form.car_no" style="width: 240px;" />
</el-form-item>
<el-form-item label="任务组标识">
<el-input v-model="form.task_group_id" style="width: 240px;" />
</el-form-item>
<el-form-item label="任务组顺序号">
<el-input v-model="form.task_group_seq" style="width: 240px;" />
</el-form-item>
<el-form-item label="任务完成类型">
<el-input v-model="form.finished_type" style="width: 240px;" />
</el-form-item>
<el-form-item label="生成方式">
<el-input v-model="form.create_mode" style="width: 240px;" />
</el-form-item>
<el-form-item label="链路标识">
<el-input v-model="form.acs_trace_id" style="width: 240px;" />
</el-form-item>
<el-form-item v-if="false" label="生成任务的请求参数">
<el-input v-model="form.request_param" style="width: 240px;" />
</el-form-item>
<el-form-item label="下发任务的请求参数">
<el-input v-model="form.response_param" style="width: 240px;" />
</el-form-item>
<el-form-item label="车间编码">
<el-input v-model="form.workshop_code" style="width: 240px;" />
</el-form-item>
<el-form-item label="额外组盘信息">
<el-input v-model="form.ext_group_data" style="width: 240px;" />
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form.remark" style="width: 240px;" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
</el-dialog>
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" />
<el-table-column prop="task_code" label="任务编码" :min-width="flexWidth('task_code',crud.data,'任务编码')" />
<el-table-column prop="vehicle_code" label="载具编码1" :min-width="flexWidth('vehicle_code',crud.data,'载具编码1')">
<template slot-scope="scope">
@ -171,48 +86,20 @@
{{ scope.row.vehicle_code2 ? scope.row.vehicle_code2 : '-' }}
</template>
</el-table-column>
<!-- <el-table-column prop="task_class_id" label="任务分类" :min-width="flexWidth('task_class_id',crud.data,'任务分类')" />-->
<el-table-column prop="task_status" label="任务状态" :min-width="flexWidth('task_status',crud.data,'任务状态')">
<template slot-scope="scope">
{{ getStatusName(scope.row.task_status) }}
</template>
</el-table-column>
<el-table-column prop="remark" label="提示信息" :min-width="flexWidth('remark',crud.data,'提示信息')" />
<el-table-column prop="config_code" label="配置编码" :min-width="flexWidth('config_code',crud.data,'配置编码')" />
<el-table-column prop="config_code" label="任务配置编码" :min-width="flexWidth('config_code',crud.data,'任务配置编码')" />
<el-table-column prop="point_code1" label="起点1" :min-width="flexWidth('point_code1',crud.data,'点位1')" />
<el-table-column prop="point_code2" label="终点1" :min-width="flexWidth('point_code2',crud.data,'点位2')" />
<el-table-column prop="point_code3" label="起点2" :min-width="flexWidth('point_code3',crud.data,'点位3')" />
<el-table-column prop="point_code4" label="终点2" :min-width="flexWidth('point_code4',crud.data,'点位4')" />
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型', 20)">
<template slot-scope="scope">
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
</template>
</el-table-column>
<el-table-column prop="vehicle_qty" label="载具数量" :min-width="flexWidth('vehicle_qty',crud.data,'载具数量')" />
<el-table-column v-if="false" prop="priority" label="优先级" :min-width="flexWidth('priority',crud.data,'优先级')" />
<el-table-column v-if="false" prop="handle_class" label="处理类" :min-width="flexWidth('handle_class',crud.data,'处理类')" />
<el-table-column v-if="false" prop="handle_status" label="处理状态" :min-width="flexWidth('handle_status',crud.data,'处理状态')" />
<el-table-column prop="car_no" label="车号" :min-width="flexWidth('car_no',crud.data,'车号')" />
<el-table-column v-if="false" prop="task_group_id" label="任务组标识" :min-width="flexWidth('task_group_id',crud.data,'任务组标识')" />
<el-table-column v-if="false" prop="task_group_seq" label="任务组顺序号" :min-width="flexWidth('task_group_seq',crud.data,'任务组顺序号')" />
<el-table-column v-if="false" prop="finished_type" label="任务完成类型" :min-width="flexWidth('finished_type',crud.data,'任务完成类型')">
<template slot-scope="scope">
{{ dict.label.finished_type[scope.row.finished_type]?dict.label.finished_type[scope.row.finished_type]:'未完成' }}
</template>
</el-table-column>
<el-table-column v-if="false" prop="create_mode" label="生成方式" :min-width="flexWidth('create_mode',crud.data,'生成方式')">
<template slot-scope="scope">
{{ dict.label.create_mode[scope.row.create_mode] }}
</template>
</el-table-column>
<el-table-column v-if="false" prop="acs_trace_id" label="链路标识" :min-width="flexWidth('acs_trace_id',crud.data,'链路标识')" />
<el-table-column v-if="false" prop="request_param" label="生成任务的请求参数" :min-width="flexWidth('request_param',crud.data,'生成任务的请求参数')" />
<el-table-column v-if="false" prop="response_param" label="下发任务的请求参数" :min-width="flexWidth('response_param',crud.data,'下发任务的请求参数')" />
<el-table-column v-if="false" prop="workshop_code" label="车间编码" :min-width="flexWidth('workshop_code',crud.data,'车间编码')" />
<el-table-column v-if="false" prop="ext_group_data" label="额外组盘信息" :min-width="flexWidth('ext_group_data',crud.data,'额外组盘信息')" />
<el-table-column prop="priority" label="优先级" :min-width="flexWidth('priority',crud.data,'优先级')" />
<el-table-column prop="create_mode" label="任务生成方式" :formatter="format_create_mode" :min-width="flexWidth('create_mode',crud.data,'任务生成方式')" />
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
<el-table-column v-if="false" prop="update_name" label="修改人" :min-width="flexWidth('update_name',crud.data,'修改人')" />
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
<el-table-column v-permission="[]" label="操作" width="160px" align="center" fixed="right">
<template slot-scope="scope">
@ -233,12 +120,6 @@
:disabled="scope.row.task_status==='5' || scope.row.task_status==='6'"
@click="doOperate(scope.row, 'b')"
>取消</el-button>
<!-- <el-button
type="text"
icon="el-icon-upload"
:disabled="scope.row.task_status!=='5' && scope.row.task_status!=='6'"
@click="doOperate(scope.row, 'e')"
>MES反馈</el-button> -->
</template>
</el-table-column>
</el-table>
@ -250,47 +131,17 @@
<script>
import crudSchBaseTask from './schBaseTask'
import CRUD, { crud, form, header, presenter } from '@crud/crud'
import CRUD, { crud, header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
const defaultForm = {
task_id: null,
task_code: null,
task_class_id: null,
task_status: null,
config_code: null,
point_code1: null,
point_code2: null,
point_code3: null,
point_code4: null,
vehicle_type: null,
vehicle_qty: null,
vehicle_code: null,
vehicle_code2: null,
priority: null,
handle_class: null,
handle_status: null,
car_no: null,
task_group_id: null,
task_group_seq: null,
finished_type: null,
create_mode: null,
acs_trace_id: null,
request_param: null,
response_param: null,
workshop_code: null,
ext_group_data: null,
remark: null,
is_delete: false
}
export default {
name: 'Task',
dicts: ['vehicle_type', 'create_mode', 'finished_type'],
dicts: ['create_mode'],
components: { pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
mixins: [presenter(), header(), crud()],
cruds() {
return CRUD({
title: '任务管理',
@ -303,8 +154,7 @@ export default {
del: false,
download: false,
reset: true
},
crudMethod: { ...crudSchBaseTask }
}
})
},
data() {
@ -324,8 +174,8 @@ export default {
[CRUD.HOOK.beforeRefresh]() {
return true
},
hand(value) {
this.crud.toQuery()
format_create_mode(row, column) {
return this.dict.label.create_mode[row.create_mode]
},
handTaskStatus(value) {
this.crud.query.more_task_status = null

Loading…
Cancel
Save