Browse Source

2024-04-10 生产日计划 模版数据,工艺路线bug修复

master_hella_20240701
zhousq 8 months ago
parent
commit
94cc78a241
  1. 40
      src/views/mes/orderDay/components/orderDetail.vue
  2. 28
      src/views/mes/orderDay/components/processSearch.data.ts
  3. 240
      src/views/mes/orderDay/components/schedule.vue
  4. 22
      src/views/mes/orderDay/index.vue
  5. 86
      src/views/mes/orderDay/orderDay.data.ts
  6. 49
      src/views/mes/processroute/components/configDialog.vue
  7. 12
      src/views/mes/processroute/processroute.data.ts

40
src/views/mes/orderDay/components/orderDetail.vue

@ -24,9 +24,9 @@
width="200px" width="200px"
/> />
</ContentWrap> </ContentWrap>
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs v-model="activeName" type="card" @tab-click="handleClick" style="margin-top: 5px;height: min-height:240px;">
<el-tab-pane label="工艺路线信息" name="processRouteInfo"> <el-tab-pane label="工艺信息" name="processInfo">
<div class="mt-20px"> <div class="mt-20px">
<el-space :size="10" spacer="|"> <el-space :size="10" spacer="|">
<span>名称<el-tag v-if="processRouteInfoSchema.processrouteInfo!=null">{{ processRouteInfoSchema.processrouteInfo.processName}} </el-tag></span> <span>名称<el-tag v-if="processRouteInfoSchema.processrouteInfo!=null">{{ processRouteInfoSchema.processrouteInfo.processName}} </el-tag></span>
@ -44,7 +44,6 @@
> >
<el-table-column prop="nodeSort" label="序号" align="center"/> <el-table-column prop="nodeSort" label="序号" align="center"/>
<el-table-column prop="preCode" label="前置工序" align="center"> <el-table-column prop="preCode" label="前置工序" align="center">
<template #default="scope"> <template #default="scope">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-tag <el-tag
@ -88,35 +87,6 @@
<el-table-column prop="version" label="版本" align="center" /> <el-table-column prop="version" label="版本" align="center" />
</el-table> </div </el-table> </div
></el-tab-pane> ></el-tab-pane>
<el-tab-pane label="班组人员信息" name="workTeamInfo"
><div class="mt-20px">
<el-table
ref="tableRoute"
:data="workTeamInfoSchema"
style="width: 100%"
>
<el-table-column prop="id" label="ID" align="center" />
<el-table-column prop="userName" label="人员工号" align="center" />
<el-table-column prop="nickeName" label="显示名称" align="center" />
<el-table-column prop="workGroup" label="所属班组" align="center" />
<el-table-column prop="lineCode" label="所属产线" align="center" />
<el-table-column prop="abliity" label="技能岗位" align="center" />
</el-table> </div
></el-tab-pane>
<el-tab-pane label="设备信息" name="deviceInfo"
><div class="mt-20px">
<el-table
ref="tableRoute"
:data="deviceInfoSchema"
style="width: 100%"
>
<el-table-column prop="productItemCode" label="设备编码" align="center" />
<el-table-column prop="componentItemCode" label="设备名称" align="center" />
<el-table-column prop="componentUom" label="所属车间" align="center" />
<el-table-column prop="componentQty" label="所属产线" align="center"/>
<el-table-column prop="status" label="设备状态" align="center" />
</el-table> </div
></el-tab-pane>
</el-tabs> </el-tabs>
</el-drawer> </el-drawer>
</div> </div>
@ -146,13 +116,11 @@ const detailData = ref(props.allSchemas)
componentUom:'----', componentUom:'----',
componentQty:'----', componentQty:'----',
version:'----'}]) version:'----'}])
const workTeamInfoSchema = ref( [] )
const deviceInfoSchema = ref([])
const processRouteInfoSchema = ref({ const processRouteInfoSchema = ref({
processrouteInfo: { processrouteCode: '', processName: '', routeVersion: '' }, processrouteInfo: { processrouteCode: '', processName: '', routeVersion: '' },
processrouteNodeDetailList: [] processrouteNodeDetailList: []
}) })
const isShowDrawer = ref(false) const isShowDrawer = ref(false)
const detailLoading = ref(false) const detailLoading = ref(false)
const nodeColumns = ref([ const nodeColumns = ref([

28
src/views/mes/orderDay/components/processSearch.data.ts

@ -0,0 +1,28 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
export const ProcessSearch = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '类型',
field: 'type',
dictType: DICT_TYPE.PROCESS_TYPE,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
},
]))

240
src/views/mes/orderDay/components/schedule.vue

@ -17,83 +17,78 @@
width="200px" width="200px"
/> />
</ContentWrap> </ContentWrap>
<div style="height: 480px; overflow-y: auto"> <ContentWrap>
<el-tabs type="border-card" :active-name="activeName"> <el-container>
<el-tab-pane label="调整工艺路线" name="process"> <el-aside width="400px">
<el-container> <el-card>
<el-aside> <template #header>
<el-card style="max-width: 480px"> <div class="card-header">
<template #header> <span>工艺路线</span>
<div class="card-header"> <el-button
<span>原有工序</span> type="text"
</div> icon="el-icon-plus"
@click="opensearchTable"
style="float: right; padding: 3px 0"
>添加工序</el-button>
</div>
</template>
<el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%" @cell-dblclick="userAddNode">
<el-table-column prop="code" label="工序编码" />
<el-table-column prop="name" label="工序名称" />
<el-table-column prop="oper" label="" width="60">
<template #default="scope">
<el-button size="mini" text @click="deleteNode(scope.row)"
>移除</el-button
>
</template> </template>
<el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%"> </el-table-column>
<el-table-column prop="name" label="工序名称"> </el-table>
<template #default="scope"> </el-card>
<el-button size="mini" text @click="userAddNode(scope.row)" style="width: 100%" </el-aside>
>{{ scope.row.name }}[{{ scope.row.code }}]</el-button <el-main style="height: 480px;width: calc(100% - 900px);padding: 0px; margin:0px 20px">
> <div ref="graphContainer" ></div
</template> ></el-main>
</el-table-column> <el-aside width="500px">
<el-table-column prop="code" label="工序编码" width="180" v-if="false" /> <el-tabs v-model="activeName">
</el-table> <el-tab-pane label="人员配置" name="process">
</el-card> <el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%">
</el-aside> <el-table-column prop="name" label="人员">
<el-main><div ref="graphContainer"></div></el-main> <template #default="scope">
<!-- <el-aside <el-button size="mini" text @click="userAddNode(scope.row)" style="width: 100%"
><el-card style="max-width: 480px"> >{{ scope.row.name }}[{{ scope.row.code }}]</el-button
<template #header> >
<div class="card-header">
<span>可选工序</span>
</div>
</template> </template>
<p v-for="o in 4" :key="o" class="text item">{{ 'List item ' + o }}</p> </el-table-column>
<template #footer>Footer content</template> <el-table-column prop="code" label="工序编码" width="180" v-if="false" />
</el-card></el-aside </el-table>
> --> </el-tab-pane>
</el-container> <el-tab-pane label="工作位置配置" name="ddddd">
</el-tab-pane> <el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%">
<el-tab-pane label="调整临时BOM" name="boms"> <el-table-column prop="name" label="工作位置">
<TableForm <template #default="scope">
ref="tableProcess" <el-button size="mini" text @click="userAddNode(scope.row)" style="width: 100%"
:table-data="tableDataProcess" >{{ scope.row.name }}[{{ scope.row.code }}]</el-button
:table-fields="tableColumnsProcess" >
:loading="loading" </template>
@handleAddTable="handleAddTable(tableDataProcess)" </el-table-column>
@handle-delete-table="handleDeleteTable(item, index,tableDataProcess)" <el-table-column prop="code" label="工序编码" width="180" v-if="false" />
/> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs>
<el-tab-pane label="调整可用设备" name="device" </el-aside>
><TableForm
ref="tableProcess" </el-container>
:table-data="tableDataProcess" </ContentWrap>
:table-fields="tableColumnsProcess"
:loading="loading"
@handleAddTable="handleAddTable(tableDataProcess)"
@handle-delete-table="handleDeleteTable(item, index,tableDataProcess)"
/></el-tab-pane>
<el-tab-pane label="调整班组人员" name="worker"
><TableForm
ref="tableProcess"
:table-data="tableDataProcess"
:table-fields="tableColumnsProcess"
:loading="loading"
@handleAddTable="handleAddTable(tableDataProcess)"
@handle-delete-table="handleDeleteTable(item, index,tableDataProcess)"
/></el-tab-pane>
</el-tabs>
</div>
<template #footer> <template #footer>
<el-button @click="dialogVisible = false">发布计划</el-button> <el-button @click="dialogVisible = false">发布计划</el-button>
</template> </template>
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</Dialog> </Dialog>
<!-- <SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" /> --> <!-- <SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" /> -->
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
defineOptions({ name: 'sechledDetail' })
//import { dateFormatter } from '@/utils/formatTime' //import { dateFormatter } from '@/utils/formatTime'
import { import {
start_node, start_node,
@ -102,6 +97,9 @@ import {
getNewNode getNewNode
} from '@/views/mes/processroute/components/graphbase.data' } from '@/views/mes/processroute/components/graphbase.data'
import * as ProcessrouteApi from '@/api/mes/processroute' import * as ProcessrouteApi from '@/api/mes/processroute'
import {ProcessSearch} from './processSearch.data'
import * as ProcessApi from '@/api/wms/process'
import { SearchTable } from '@/components/SearchTable'
import { Graph } from '@antv/x6' import { Graph } from '@antv/x6'
const graphContainer = ref<HTMLElement | null>(null) const graphContainer = ref<HTMLElement | null>(null)
const graph = ref<Graph>() const graph = ref<Graph>()
@ -109,7 +107,7 @@ const message = useMessage() // 消息弹窗
const { t } = useI18n() // const { t } = useI18n() //
const activeName = ref('process') const activeName = ref('process')
const loading = ref(true) const loading = ref(true)
const processData=ref() const processData = ref([])
const props = defineProps({ const props = defineProps({
// //
isSearchFilterButtonHide: { isSearchFilterButtonHide: {
@ -131,54 +129,6 @@ const props = defineProps({
const detailData = ref(props.allSchemas) const detailData = ref(props.allSchemas)
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
const tableDataProcess = ref([
{
type: '',
value: ''
}
])
const tableColumnsProcess = ref([
{
label: '结束时间',
field: 'endTime',
sort: 'custom',
isReadonly: true,
form: {
component: 'TimePicker',
componentProps: {
type: 'time',
dateFormat: 'HH:mm'
}
}
},
{
label: '生产模式',
field: 'taskMode',
width: '80px',
sort: 'custom',
dictType: 'mes_task_mode',
dictClass: 'string',
form: {
component: 'Select',
value: 'ASSIGN'
}
}
])
//
const handleAddTable = (name:any) => {
message.success('添加成功')
let tableFormKeys = {
type: '',
value: ''
}
name.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index,name) => {
console.log(name)
name.splice(index, 1)
}
routeName.value = route.name routeName.value = route.name
routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail' routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail'
@ -279,15 +229,15 @@ const open = async (type: string, row?: any, titleName?: any) => {
dialogVisible.value = true dialogVisible.value = true
detailData.value = row detailData.value = row
dialogWidth.value = props.basicFormWidth + '%' dialogWidth.value = props.basicFormWidth + '%'
//console.log(props.allSchemas) //
//console.log(row) getProcessroute('001')
if (titleName) { if (titleName) {
dialogTitle.value = t('action.' + titleName) dialogTitle.value = t('action.' + titleName)
} else { } else {
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
} }
nextTick(() => { nextTick(() => {
graph.value = createGraph(graphContainer.value as HTMLElement, false, dialogWidth.value-200, 320) graph.value = createGraph(graphContainer.value as HTMLElement, true, 240, 320)
// graph.value.on('node:click', ({ e, x, y, node, view }) => { // graph.value.on('node:click', ({ e, x, y, node, view }) => {
// nodeClick(e, x, y, node, view) // nodeClick(e, x, y, node, view)
// }) // })
@ -318,6 +268,58 @@ const userAddNode = (row) => {
} }
} }
} }
//线
const getProcessroute = async (code: String) => {
let res = await ProcessrouteApi.getProcesInfo(code)
if (res.code == 200) {
processData.value = res.data
}
}
const searchTableRef = ref()
const opensearchTable = (
) => {
console.log("opensearchTable")
const _searchCondition = {}
const _searchTableTitle = "工序查询"
const _searchTableAllSchemas = ProcessSearch.allSchemas
const _searchTablePage = ProcessApi.getProcessPage
searchTableRef.value.open(
_searchTableTitle,
_searchTableAllSchemas,
_searchTablePage,
undefined,
undefined,
true,
undefined,
undefined,
_searchCondition,
false,
true
)
}
//
// val row
const searchTableSuccess = (formField, searchField, val, type, row) => {
//console.log("searchTableSuccess",val)
if(val.length>0){
val.forEach(item=>{
if(processData.value.find(obj=>obj.code==item.code)==undefined){
processData.value.push({code:item.code,name:item.name})}
})
}
//emit('searchTableSuccess', formField, searchField, val, undefined, type, row)
}
const deleteNode=(row)=>{
processData.value.splice(processData.value.indexOf(row),1)
graph.value.removeNode(row.code)
}
defineOptions({ name: 'sechledDetail' })
defineExpose({ open }) // open defineExpose({ open }) // open
</script> </script>
<style lang="scss"> <style lang="scss">

22
src/views/mes/orderDay/index.vue

@ -56,6 +56,7 @@
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
:isSearchFilterButtonHide="true" :isSearchFilterButtonHide="true"
@onChange="valueChange"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -80,6 +81,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import orderDetail from './components/orderDetail.vue' import orderDetail from './components/orderDetail.vue'
import scheduleDetail from './components/schedule.vue' import scheduleDetail from './components/schedule.vue'
import { disabledTimeListsProps } from 'node_modules/element-plus/es/components/time-picker/src/props/shared'
defineOptions({ name: 'MesOrderDay' }) defineOptions({ name: 'MesOrderDay' })
const message = useMessage() // const message = useMessage() //
@ -137,6 +139,20 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
}) })
}
const valueChange=(filed,cur)=>{
if(filed=='noAutoFlag'){
OrderDay.allSchemas.formSchema.forEach(item => {
if (item.field == 'planNoDay') {
item.componentProps.disabled = cur==='ENABLE'?true:false
//console.log("item",OrderDayRules)
OrderDayRules.planNoDay[0].required = cur==='ENABLE'?false:true
//item.componentProps.required = cur==='ENABLE'?false:true
}
})
}
} }
// //
@ -193,13 +209,13 @@ const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row,['1']),hasPermi:'mes:orderDay:update'}), // defaultButtons.mainListEditBtn({ hide: isShowMainButton(row,['1']),hasPermi:'mes:orderDay:update'}), //
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row,['1']),hasPermi:'mes:orderDay:delete'}), // defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row,['1']),hasPermi:'mes:orderDay:delete'}), //
defaultButtons.mainListHandleBtn({label: '发布', defaultButtons.mainListHandleBtn({label: '排产',
name: 'publish', name: 'publish',
hide: isShowMainButton(row,['1']), hide: isShowMainButton(row,['1']),
type: 'warning', type: 'warning',
icon: '', icon: '',
color: '', color: '',
hasPermi: ''}), // hasPermi: 'mes:orderDay:update'}), //
// defaultButtons.mainListHandleBtn({label: '', // defaultButtons.mainListHandleBtn({label: '',
// name: 'publish', // name: 'publish',
// hide: isShowMainButton(row,['2']), // hide: isShowMainButton(row,['2']),
@ -224,7 +240,7 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if(val=='schedule'){ // } else if(val=='publish'){ //
openScheduledDetail( '发布计划', row,row.planNoDay) openScheduledDetail( '发布计划', row,row.planNoDay)
} }
} }

86
src/views/mes/orderDay/orderDay.data.ts

@ -4,13 +4,13 @@ import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as WorkshopApi from '@/api/wms/workshop' import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import { on } from '@/utils/domUtils'
// 表单校验 // 表单校验
export const OrderDayRules = reactive({ export const OrderDayRules = reactive({
planNoDay: [ // planNoDay: [
{ required: true, message: '请输入一个日计划编号', trigger: 'blur' } // { required: false, message: '请输入一个日计划编号', trigger: 'blur' }
], // ],
planNoMonth: [ planNoMonth: [
{ required: true, message: '请输入一个月计划编号', trigger: 'blur' } { required: true, message: '请输入一个月计划编号', trigger: 'blur' }
], ],
@ -38,6 +38,9 @@ export const OrderDayRules = reactive({
taskMode: [ taskMode: [
{ required: true, message: '请选择一个生产方式', trigger: 'blur' } { required: true, message: '请选择一个生产方式', trigger: 'blur' }
], ],
processrouteCode: [
{ required: true, message: '请选择一个工艺路线!', trigger: 'blur' }
],
}) })
export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
@ -53,7 +56,34 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
field: 'planNoDay', field: 'planNoDay',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
required: true, required: false,
form: {
component: 'Input',
componentProps: {
disabled: true
}
},
},
{
label: '',
field: 'noAutoFlag',
sort: 'custom',
isForm: true,
isTable: false,
isDetail:false,
isSearch: false,
width: '60px',
dictType: DICT_TYPE.ITEM_STATUS,
dictClass: 'string',
form: {
component: 'Switch',
value: 'ENABLE',
componentProps: {
inactiveValue: 'DISABLE',
activeValue: 'ENABLE'
}
},
}, },
{ {
label: '月计划单号', label: '月计划单号',
@ -102,7 +132,7 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
key: 'type', key: 'type',
action: 'in', // 查询拼接条件 action: 'in', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 isSearch: true, // 使用自定义拼接条件
value: 'FG,SEMI',//,SEMI] value: 'CCP,BCP',//,SEMI]
isMainValue: false isMainValue: false
}, },
@ -169,7 +199,7 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '临时工艺', label: '允许临时工艺',
field: 'tempProcessroute', field: 'tempProcessroute',
sort: 'custom', sort: 'custom',
width: '80px', width: '80px',
@ -185,32 +215,30 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: 'BOM编码', label: 'BOM版本',
field: 'standardBom', field: 'standardBom',
sort: 'custom', sort: 'custom',
form: { form: {
component:'Select', component: 'InputNumber',
componentProps: { value: 1
options: [{lablel:'bom',value:'bom'}] },
}
}
},
{
label: '替代BOM',
field: 'tempBom',
sort: 'custom',
width: '80px',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
}
}
}, },
// {
// label: '替代BOM',
// field: 'tempBom',
// sort: 'custom',
// width: '80px',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE',
// }
// }
// },
{ {
label: '工单模式', label: '工单模式',
field: 'workMode', field: 'workMode',

49
src/views/mes/processroute/components/configDialog.vue

@ -24,7 +24,7 @@
</div> </div>
</template> </template>
<el-row :gutter="10" style="height: calc(100vh - 300px)"> <el-row :gutter="10" style="height: 65%">
<el-col :span="6"> <el-col :span="6">
<el-input v-model="processListParmas.name" placeholder="工序名称"> <el-input v-model="processListParmas.name" placeholder="工序名称">
<template #append> <template #append>
@ -32,10 +32,10 @@
</template> </template>
</el-input> </el-input>
<el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%"> <el-table :data="processData" ref="tableProcess" style="width: 100%; height: 90%">
<el-table-column prop="name" label="工序名称"> <el-table-column prop="name" label="工序名称">
<template #default="scope"> <template #default="scope">
<el-button size="mini" text @click="userAddNode(scope.row)" style="width: 100%" <el-button size="mini" text @click="userAddNode(scope.row)" style="width: 90%"
>{{ scope.row.name }}[{{ scope.row.code }}]</el-button >{{ scope.row.name }}[{{ scope.row.code }}]</el-button
> >
</template> </template>
@ -43,7 +43,7 @@
<el-table-column prop="code" label="工序编码" width="180" v-if="false" /> <el-table-column prop="code" label="工序编码" width="180" v-if="false" />
</el-table> </el-table>
</el-col> </el-col>
<el-col :span="12"><div ref="graphContainer"></div> <el-col :span="12"><div ref="graphContainer" style="width: 90%; height: 90%"></div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -71,9 +71,11 @@
<el-card class="footer-card"> <el-card class="footer-card">
<template #header> <template #header>
<div class="card-header"> <div class="card-header">
<span>产品信息</span> <span>工艺路线基本信息</span>
</div> </div>
</template> </template>
<p >工艺路线名称<span v-if="productData!=null">{{ productData.name }}</span></p>
<p >工艺路线编码<span v-if="productData!=null">{{ productData.name }}</span></p>
<p >产品名称<span v-if="productData!=null">{{ productData.name }}</span></p> <p >产品名称<span v-if="productData!=null">{{ productData.name }}</span></p>
<p>产品编码<span v-if="productData!=null">{{ productData.code }}</span></p> <p>产品编码<span v-if="productData!=null">{{ productData.code }}</span></p>
<p>产品描述<span v-if="productData!=null">{{ productData.desc1 }}</span></p> <p>产品描述<span v-if="productData!=null">{{ productData.desc1 }}</span></p>
@ -83,20 +85,28 @@
><el-card class="footer-card"> ><el-card class="footer-card">
<template #header> <template #header>
<div class="card-header"> <div class="card-header">
<span>设备信息</span> <span>物料信息</span>
</div> </div>
</template> </template>
<p v-for="item in deviceList" :key="item" class="text item">{{ item.name }}</p> <el-table :data="materialData" ref="tableMaterial" style="width: 100%; height: 80%">
<el-table-column prop="name" label="物料名称"/>
=
<el-table-column prop="code" label="物料编码"/>
<el-table-column prop="desc1" label="是否替代"/>
</el-table>
</el-card></el-col </el-card></el-col
> >
<el-col :span="6" <el-col :span="6"
><el-card class="footer-card"> ><el-card class="footer-card">
<template #header> <template #header>
<div class="card-header"> <div class="card-header">
<span>人员信息</span> <span>模具信息</span>
</div> </div>
</template> </template>
<p v-for="item in workerList" :key="item" class="text item">{{ item.name }}</p> <el-table :data="mouldData" ref="tableMould" style="width: 100%; height: 80%">
<el-table-column prop="name" label="模具名称"/>
<el-table-column prop="code" label="模具编码"/>
</el-table>
</el-card></el-col </el-card></el-col
> >
<el-col :span="6" <el-col :span="6"
@ -106,8 +116,10 @@
<span>工位信息</span> <span>工位信息</span>
</div> </div>
</template> </template>
<p>工位编码{{ workStationData.name }}</p> <el-table :data="workstationData" ref="tableWorkstation" style="width: 100%; height: 80%">
<p>工位名称{{ workStationData.code }}</p> <el-table-column prop="name" label="工位名称"/>
<el-table-column prop="code" label="工位编码"/>
</el-table>
</el-card></el-col </el-card></el-col
> >
</el-row> </el-row>
@ -142,13 +154,9 @@ const tableProcess = ref()
// const workshopCodeOptions = ref([{ code: '', name: '1' }]) // const workshopCodeOptions = ref([{ code: '', name: '1' }])
// const productionLineCodeOptions = ref([{ code: '', name: '线' }]) // const productionLineCodeOptions = ref([{ code: '', name: '线' }])
const productData = ref({ name: '', code: '', desc1: '--' }) // const productData = ref({ name: '', code: '', desc1: '--' }) //
const deviceList = ref([ const materialData=ref()
{ name: '设备', code: '0000' }, const mouldData = ref()
{ name: '设备', code: '0000' } const workstationData = ref() //
]) //
const workerList = ref([{ name: '--' }, { name: '--' }]) //
const workStationData = ref({ name: '工位', code: '' }) //
// //
const annexData = reactive({ const annexData = reactive({
annexList: [] annexList: []
@ -158,6 +166,7 @@ const remarksData = reactive({
remarksList: [], remarksList: [],
data: {} data: {}
}) })
const routeVersion=ref()
// //
const graph = ref<Graph>() const graph = ref<Graph>()
const openDetail = async (rowData: any) => { const openDetail = async (rowData: any) => {
@ -165,6 +174,7 @@ const openDetail = async (rowData: any) => {
titleNameRef.value = rowData.value.processrouteCode titleNameRef.value = rowData.value.processrouteCode
titleValueRef.value = rowData.value.processName titleValueRef.value = rowData.value.processName
processRouteId.value = rowData.value.id processRouteId.value = rowData.value.id
routeVersion.value=rowData.value.routeVersion
remarksData.data = { remarksData.data = {
tableId: rowData.value.id, tableId: rowData.value.id,
tableName: rowData.value.processrouteCode tableName: rowData.value.processrouteCode
@ -173,7 +183,7 @@ const openDetail = async (rowData: any) => {
let graphJson = JSON.parse(rowData.value.graphJson) let graphJson = JSON.parse(rowData.value.graphJson)
isShowDrawer.value = true isShowDrawer.value = true
nextTick(() => { nextTick(() => {
graph.value = createGraph(graphContainer.value as HTMLElement,true,800,600) graph.value = createGraph(graphContainer.value as HTMLElement,true,640,480)
graph.value.on('node:click', ({ e, x, y, node, view }) => { graph.value.on('node:click', ({ e, x, y, node, view }) => {
nodeClick(e, x, y, node, view) nodeClick(e, x, y, node, view)
}) })
@ -300,6 +310,7 @@ const saveResult = async () => {
} }
let gdata = { let gdata = {
processrouteCode: titleNameRef.value, processrouteCode: titleNameRef.value,
routeVersion:routeVersion.value,
graphJson: graph.value.toJSON(), graphJson: graph.value.toJSON(),
processrouteId: processRouteId.value processrouteId: processRouteId.value
} }

12
src/views/mes/processroute/processroute.data.ts

@ -93,12 +93,12 @@ export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '版本号', // label: '版本号',
field: 'routeVersion', // field: 'routeVersion',
sort: 'custom', // sort: 'custom',
isSearch: true, // isSearch: true,
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

Loading…
Cancel
Save