rev:代码优化

This commit is contained in:
2025-02-27 10:43:17 +08:00
parent e64d4f3389
commit fa98960659
21 changed files with 392 additions and 99 deletions

View File

@@ -120,6 +120,8 @@
<!-- />-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="create_name" label="创建人" />
<el-table-column prop="create_time" label="创建时间" />
<el-table-column prop="update_optname" label="修改人" />
<el-table-column prop="update_time" label="修改时间" width="135" />
<el-table-column

View File

@@ -72,7 +72,7 @@
type="primary"
icon="el-icon-circle-close"
:disabled="crud.selections.length === 0"
@click="changeUsed(crud.selections, false)"
@click="changeUsed(crud.selections, true)"
>
禁用
</el-button>

View File

@@ -267,7 +267,6 @@
<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="vehicle_code" label="载具号" />
<el-table-column prop="task_status" label="任务状态">
<template slot-scope="scope">
<span v-if="scope.row.task_status==='0' ">就绪</span>
@@ -280,22 +279,24 @@
<!-- <el-table-column prop="start_parent_code" label="父起点点位" min-width="100" show-overflow-tooltip />-->
<el-table-column prop="next_point_code" label="终点" min-width="100" show-overflow-tooltip />
<!-- <el-table-column prop="next_parent_code" label="父终点点位" min-width="100" show-overflow-tooltip />-->
<el-table-column prop="start_point_code2" label="起点2" min-width="100" show-overflow-tooltip />
<el-table-column prop="next_point_code2" label="终点2" min-width="100" show-overflow-tooltip />
<el-table-column prop="put_device_code" label="放货位" min-width="100" show-overflow-tooltip />
<!-- <el-table-column prop="start_point_code2" label="起点2" min-width="100" show-overflow-tooltip />-->
<!-- <el-table-column prop="next_point_code2" label="终点2" min-width="100" show-overflow-tooltip />-->
<!-- <el-table-column prop="put_device_code" label="放货位" min-width="100" show-overflow-tooltip />-->
<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="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_by" label="创建" />
<el-table-column prop="create_time" label="创建时间" width="135" />
<el-table-column prop="update_by" label="更新人" width="135" />
<el-table-column prop="update_time" label="更新时间" width="135" />
<el-table-column v-permission="['admin','task:edit','task:del']" fixed="left" label="操作" width="80px" align="center">
<template slot-scope="scope">
<el-dropdown trigger="click" @command="handleCommand">
@@ -428,6 +429,10 @@ export default {
to_y: null,
to_z: null
},
taskStatus: {
task_status: '',
task_id: null
},
rules: {
start_point_code: [
{ required: true, message: '起点不能为空', trigger: 'change' }
@@ -474,7 +479,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 => {

View File

@@ -85,7 +85,7 @@
<el-table-column prop="seq_no" label="序号" :min-width="flexWidth('seq_no',crud.data,'序号')" />
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
<el-table-column prop="next_device_code" label="点编号" :min-width="flexWidth('next_device_code',crud.data,'终点编号')" />
<el-table-column prop="next_device_code" label="点编号" :min-width="flexWidth('next_device_code',crud.data,'终点编号')" />
<el-table-column prop="require_num" label="配料桶数" :min-width="flexWidth('require_num',crud.data,'配料桶数')" />
<el-table-column prop="remain_num" label="剩余桶数" :min-width="flexWidth('remain_num',crud.data,'剩余桶数')" />
<el-table-column prop="qty" label="物料重量" :min-width="flexWidth('qty',crud.data,'物料重量')" />

View File

@@ -19,6 +19,15 @@
<el-form-item :label="$t('SysParam.table.name')" prop="name">
<el-input v-model="form.name" style="width: 370px;" />
</el-form-item>
<el-form-item label="中文标题" prop="zh_name">
<el-input v-model="form.zh_name" style="width: 370px;" />
</el-form-item>
<el-form-item label="英文标题" prop="en_name">
<el-input v-model="form.en_name" style="width: 370px;" />
</el-form-item>
<el-form-item label="印尼标题" prop="in_name">
<el-input v-model="form.in_name" style="width: 370px;" />
</el-form-item>
<el-form-item :label="$t('SysParam.table.values')" prop="value">
<el-input v-model="form.value" style="width: 370px;" />
</el-form-item>
@@ -72,6 +81,9 @@ const defaultForm = {
id: null,
code: null,
name: null,
zh_name: null,
in_name: null,
en_name: null,
value: null,
remark: null,
is_active: true
@@ -81,7 +93,7 @@ export default {
components: { pagination, crudOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({ title: 'menu.table_title.SystemParam', url: 'api/param', idField: 'id', sort: 'id,desc', crudMethod: { ...crudParam },
return CRUD({ title: '系統参数', url: 'api/param', idField: 'id', sort: 'id,desc', crudMethod: { ...crudParam },
optShow: {
add: true,
edit: true,