|
@ -81,7 +81,7 @@ |
|
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
|
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
|
|
<crudOperation :permission="permission" /> |
|
|
<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-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu" :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 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-form-item label="载具编码"> |
|
|
<el-input v-model="form.vehicle_code" style="width: 240px;" /> |
|
|
<el-input v-model="form.vehicle_code" style="width: 240px;" /> |
|
@ -227,6 +227,37 @@ |
|
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> |
|
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
<el-dialog |
|
|
|
|
|
title="创建任务" |
|
|
|
|
|
:visible.sync="dialogVisible" |
|
|
|
|
|
width="350px" |
|
|
|
|
|
:style="{ 'max-height': '80vh', overflowY: 'auto' }" |
|
|
|
|
|
@close="resetForm" |
|
|
|
|
|
> |
|
|
|
|
|
<el-form ref="taskForm" :model="newTask" width="200px"> |
|
|
|
|
|
<el-form-item label="目的地" :rules="[{ required: true, message: '请输入目的地', trigger: 'blur' }]"> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="newTask.point_code2" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
placeholder="点位状态" |
|
|
|
|
|
class="filter-item" |
|
|
|
|
|
style="width: 240px;" |
|
|
|
|
|
clearable |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in pointList" |
|
|
|
|
|
:key="item.point_code" |
|
|
|
|
|
:label="item.point_name" |
|
|
|
|
|
:value="item.point_code" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button> |
|
|
|
|
|
<el-button type="primary" @click="submitTask">确 定</el-button> |
|
|
|
|
|
</span> |
|
|
|
|
|
</el-dialog> |
|
|
<!--表格渲染--> |
|
|
<!--表格渲染--> |
|
|
<el-table |
|
|
<el-table |
|
|
ref="table" |
|
|
ref="table" |
|
@ -245,26 +276,9 @@ |
|
|
> |
|
|
> |
|
|
<el-table-column type="selection" width="55" /> |
|
|
<el-table-column type="selection" width="55" /> |
|
|
<el-table-column v-if="false" prop="group_id" label="组盘编码" :min-width="flexWidth('group_id',crud.data,'组盘编码')" /> |
|
|
<el-table-column v-if="false" prop="group_id" label="组盘编码" :min-width="flexWidth('group_id',crud.data,'组盘编码')" /> |
|
|
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" /> |
|
|
<el-table-column prop="vehicle_code" label="载具编码" width="100" /> |
|
|
<!-- <el-table-column prop="child_vehicle_code" label="子载具编码" :min-width="flexWidth('child_vehicle_code',crud.data,'子载具编码')"/>--> |
|
|
|
|
|
<!-- <el-table-column prop="source_vehicle_code" label="来源载具" :min-width="flexWidth('source_vehicle_code',crud.data,'来源载具')" /> --> |
|
|
|
|
|
<el-table-column prop="region_name" label="下道工序" :min-width="flexWidth('region_name',crud.data,'下道工序')" /> |
|
|
<el-table-column prop="region_name" label="下道工序" :min-width="flexWidth('region_name',crud.data,'下道工序')" /> |
|
|
<!-- <el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'点位编码')" /> --> |
|
|
|
|
|
<!-- <el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')" /> --> |
|
|
|
|
|
<!-- <el-table-column prop="is_full" label="是否满托" :min-width="flexWidth('is_full',crud.data,'是否满托')"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ scope.row.is_full?'是':'否' }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> --> |
|
|
|
|
|
<!-- <el-table-column prop="pcsn" label="批次" :min-width="flexWidth('pcsn',crud.data,'批次')" /> --> |
|
|
|
|
|
<el-table-column prop="order_code" label="工单编码" :min-width="flexWidth('order_code',crud.data,'工单编码')" /> |
|
|
<el-table-column prop="order_code" label="工单编码" :min-width="flexWidth('order_code',crud.data,'工单编码')" /> |
|
|
<!-- <el-table-column prop="instorage_time" label="入库时间" :min-width="flexWidth('instorage_time',crud.data,'入库时间')" /> --> |
|
|
|
|
|
<!-- <el-table-column prop="group_bind_material_status" label="绑定状态" :min-width="flexWidth('group_bind_material_status',crud.data,'入库时间')"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ dict.label.group_bind_material_status[scope.row.group_bind_material_status] }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="standing_time" label="静置时间(分钟)" :min-width="flexWidth('standing_time',crud.data,'静置时间(分钟)')" /> --> |
|
|
|
|
|
<el-table-column v-if="false" prop="material_name" label="物料名称" show-overflow-tooltip :min-width="flexWidth('material_name',crud.data,'物料数量')" /> |
|
|
<el-table-column v-if="false" prop="material_name" label="物料名称" show-overflow-tooltip :min-width="flexWidth('material_name',crud.data,'物料数量')" /> |
|
|
<el-table-column prop="material_id" label="物料编码" show-overflow-tooltip :min-width="flexWidth('material_id',crud.data,'物料编码')" /> |
|
|
<el-table-column prop="material_id" label="物料编码" show-overflow-tooltip :min-width="flexWidth('material_id',crud.data,'物料编码')" /> |
|
|
<el-table-column prop="material_qty" label="物料数量" show-overflow-tooltip :min-width="flexWidth('material_qty',crud.data,'物料数量')" /> |
|
|
<el-table-column prop="material_qty" label="物料数量" show-overflow-tooltip :min-width="flexWidth('material_qty',crud.data,'物料数量')" /> |
|
@ -272,31 +286,27 @@ |
|
|
<el-table-column prop="due_date" label="交期时间" show-overflow-tooltip :min-width="flexWidth('due_date',crud.data,'交期时间')" /> |
|
|
<el-table-column prop="due_date" label="交期时间" show-overflow-tooltip :min-width="flexWidth('due_date',crud.data,'交期时间')" /> |
|
|
<el-table-column v-if="false" prop="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'物料规格')" /> |
|
|
<el-table-column v-if="false" prop="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'物料规格')" /> |
|
|
<el-table-column prop="theLocation" label="存放点位" :min-width="flexWidth('theLocation',crud.data,'存放点位')" /> |
|
|
<el-table-column prop="theLocation" label="存放点位" :min-width="flexWidth('theLocation',crud.data,'存放点位')" /> |
|
|
<!-- <el-table-column prop="material_qty" label="物料数量" :min-width="flexWidth('material_qty',crud.data,'物料数量')" /> |
|
|
|
|
|
<el-table-column prop="material_weight" label="物料重量" :min-width="flexWidth('material_weight',crud.data,'物料重量')" /> |
|
|
|
|
|
<el-table-column prop="group_number" label="组盘次数" :min-width="flexWidth('group_number',crud.data,'组盘次数')" /> |
|
|
|
|
|
<el-table-column prop="task_code" label="任务编码" :min-width="flexWidth('task_code',crud.data,'任务编码')" /> --> |
|
|
|
|
|
<!-- <el-table-column prop="workshop_code" label="车间编码" :min-width="flexWidth('workshop_code',crud.data,'车间编码')"/>--> |
|
|
|
|
|
<!-- <el-table-column prop="group_status" label="组盘状态" :min-width="flexWidth('group_status',crud.data,'组盘状态')"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ dict.label.group_status[scope.row.group_status] }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> --> |
|
|
|
|
|
<!-- <el-table-column prop="is_first_flow_task" label="是否首个流程任务" :min-width="flexWidth('is_first_flow_task',crud.data,'是否首个流程任务')"/>--> |
|
|
|
|
|
<!-- <el-table-column prop="flow_code" label="流程编码" :min-width="flexWidth('flow_code',crud.data,'流程编码')"/>--> |
|
|
|
|
|
<!-- <el-table-column prop="flow_num" label="流程顺序" :min-width="flexWidth('flow_num',crud.data,'流程顺序')"/>--> |
|
|
|
|
|
<!-- <el-table-column prop="move_way" label="移动途径" :min-width="flexWidth('move_way',crud.data,'移动途径')" /> --> |
|
|
|
|
|
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" /> |
|
|
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" /> |
|
|
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',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 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 v-if="false" prop="update_name" label="修改人" :min-width="flexWidth('update_name',crud.data,'修改人')" /> |
|
|
<el-table-column v-if="false" prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" /> |
|
|
<el-table-column v-if="false" prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" /> |
|
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right"> |
|
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right"> |
|
|
<template slot-scope="scope"> |
|
|
<!-- <template slot-scope="scope"> |
|
|
<udOperation |
|
|
<udOperation |
|
|
:data="scope.row" |
|
|
:data="scope.row" |
|
|
:permission="permission" |
|
|
:permission="permission" |
|
|
/> |
|
|
/> |
|
|
|
|
|
</template> --> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-button |
|
|
|
|
|
v-if="!!scope.row.has_work && scope.row.theLocation != null" |
|
|
|
|
|
type="text" |
|
|
|
|
|
icon="el-icon-plus" |
|
|
|
|
|
@click="createTask(scope.row)" |
|
|
|
|
|
> |
|
|
|
|
|
创建任务 |
|
|
|
|
|
</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
@ -313,7 +323,6 @@ import crudSchBaseVehiclematerialgroup from './schBaseVehiclematerialgroup' |
|
|
import CRUD, { crud, form, header, presenter } from '@crud/crud' |
|
|
import CRUD, { crud, form, header, presenter } from '@crud/crud' |
|
|
import rrOperation from '@crud/RR.operation' |
|
|
import rrOperation from '@crud/RR.operation' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
import udOperation from '@crud/UD.operation' |
|
|
|
|
|
import pagination from '@crud/Pagination' |
|
|
import pagination from '@crud/Pagination' |
|
|
import crudMdBaseWorkShop from '@/views/wms/basedata/workshop/mdBaseWorkshop' |
|
|
import crudMdBaseWorkShop from '@/views/wms/basedata/workshop/mdBaseWorkshop' |
|
|
import MaterialDialog from '@/views/wms/sch/group/MaterialDialog.vue' |
|
|
import MaterialDialog from '@/views/wms/sch/group/MaterialDialog.vue' |
|
@ -356,7 +365,7 @@ const defaultForm = { |
|
|
export default { |
|
|
export default { |
|
|
name: 'VehicleMaterialGroup', |
|
|
name: 'VehicleMaterialGroup', |
|
|
dicts: ['group_status', 'group_bind_material_status'], |
|
|
dicts: ['group_status', 'group_bind_material_status'], |
|
|
components: { WorkOrderDialog, MaterialDialog, pagination, crudOperation, rrOperation, udOperation }, |
|
|
components: { WorkOrderDialog, MaterialDialog, pagination, crudOperation, rrOperation }, |
|
|
mixins: [presenter(), header(), form(defaultForm), crud()], |
|
|
mixins: [presenter(), header(), form(defaultForm), crud()], |
|
|
cruds() { |
|
|
cruds() { |
|
|
return CRUD({ |
|
|
return CRUD({ |
|
@ -388,7 +397,13 @@ export default { |
|
|
regionList: [], |
|
|
regionList: [], |
|
|
choose: '物料', |
|
|
choose: '物料', |
|
|
materialDialog: false, |
|
|
materialDialog: false, |
|
|
workOrderDialog: false |
|
|
workOrderDialog: false, |
|
|
|
|
|
dialogVisible: false, |
|
|
|
|
|
newTask: { |
|
|
|
|
|
point_code2: '', |
|
|
|
|
|
vehicle_code: '', |
|
|
|
|
|
point_code1: '' |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
@ -452,6 +467,33 @@ export default { |
|
|
resolve(res) |
|
|
resolve(res) |
|
|
}) |
|
|
}) |
|
|
}, 100) |
|
|
}, 100) |
|
|
|
|
|
}, |
|
|
|
|
|
createTask(tree) { |
|
|
|
|
|
this.newTask.vehicle_code = tree.vehicle_code |
|
|
|
|
|
this.dialogVisible = true // 打开对话框 |
|
|
|
|
|
}, |
|
|
|
|
|
resetForm() { |
|
|
|
|
|
// 在对话框关闭时重置表单 |
|
|
|
|
|
this.newTask.point_code2 = '' |
|
|
|
|
|
}, |
|
|
|
|
|
cleanFrom() { |
|
|
|
|
|
// 在对话框关闭时重置表单 |
|
|
|
|
|
this.newTask.point_code2 = '' |
|
|
|
|
|
this.dialogVisible = false |
|
|
|
|
|
}, |
|
|
|
|
|
submitTask() { |
|
|
|
|
|
this.$refs.taskForm.validate((valid) => { |
|
|
|
|
|
if (valid) { |
|
|
|
|
|
crudSchBaseVehiclematerialgroup.createTask(this.newTask).then(res => { |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
this.dialogVisible = false // 只在成功后关闭对话框 |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error('任务创建失败:', error) |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
console.error('表单验证失败') |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|