update 工位关联机台

master
yinq 5 months ago
parent 092337719d
commit 72950899e3

@ -132,6 +132,11 @@ export interface BaseStationInfoForm extends BaseEntity {
*/
remark?: string;
/**
* Id
*/
machineId?: string | number;
productionTimeDays?: number;
productionTimeHours?: number;
productionTimeMinutes?: number;

@ -23,6 +23,16 @@
/>
</el-select>
</el-form-item>
<el-form-item label='机台名称' prop='machineId'>
<el-select v-model="queryParams.machineId" placeholder="请选择机台名称" clearable @keyup.enter='handleQuery' >
<el-option
v-for="item in machineInfoList"
:key="item.machineId"
:label="item.machineName"
:value="item.machineId"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type='primary' icon='Search' @click='handleQuery'>搜索</el-button>
<el-button icon='Refresh' @click='resetQuery'>重置</el-button>
@ -78,6 +88,7 @@
</el-table-column>
<el-table-column label='AGV编号' align='center' prop='agvCode' v-if='columns[7].visible' />
<el-table-column label='IP地址' align='center' prop='ipAddress' v-if='columns[8].visible' />
<el-table-column label='机台名称' align='center' prop='machineName' v-if='columns[16].visible' />
<el-table-column label='激活标识' align='center' prop='activeFlag' v-if='columns[9].visible'>
<template #default='scope'>
<dict-tag :options='active_flag' :value='scope.row.activeFlag' />
@ -143,6 +154,16 @@
/>
</el-select>
</el-form-item>
<el-form-item label='机台名称' prop='machineId'>
<el-select v-model="form.machineId" placeholder="请选择机台名称">
<el-option
v-for="item in machineInfoList"
:key="item.machineId"
:label="item.machineName"
:value="item.machineId"
/>
</el-select>
</el-form-item>
<el-form-item label='单位生产时间' prop='productionTime'>
<el-input-number v-model="form.productionTimeDays" placeholder="请输入天数" :min="0" :max="10000"
:controls="false" :style="{ width: '50px' }"/>
@ -194,6 +215,7 @@ import {
} from '@/api/mes/baseStationInfo';
import { BaseStationInfoVO, BaseStationInfoQuery, BaseStationInfoForm } from '@/api/mes/baseStationInfo/types';
import { getProcessInfoList } from '@/api/mes/baseProcessInfo';
import { getProdBaseMachineInfoList } from '@/api/mes/prodBaseMachineInfo';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { station_type, active_flag } = toRefs<any>(proxy?.useDict('station_type', 'active_flag'));
@ -210,6 +232,7 @@ const total = ref(0);
const queryFormRef = ref<ElFormInstance>();
const baseStationInfoFormRef = ref<ElFormInstance>();
let processInfoList = ref([]);
let machineInfoList = ref([]);
const dialog = reactive<DialogOption>({
visible: false,
@ -222,6 +245,12 @@ const getProcessInfoListSelect = async () => {
processInfoList.value = res.data;
};
/** 查询机台下拉树结构 */
const getProdBaseMachineInfoListSelect = async () => {
let res = await getProdBaseMachineInfoList(null);
machineInfoList.value = res.data;
};
//
const columns = ref<FieldOption[]>([
{ key: 0, label: `主键标识`, visible: false },
@ -239,7 +268,8 @@ const columns = ref<FieldOption[]>([
{ key: 12, label: `创建人`, visible: false },
{ key: 13, label: `创建时间`, visible: false },
{ key: 14, label: `更新人`, visible: false },
{ key: 15, label: `更新时间`, visible: false }
{ key: 15, label: `更新时间`, visible: false },
{ key: 16, label: `机台名称`, visible: true }
]);
const initFormData: BaseStationInfoForm = {
@ -251,6 +281,7 @@ const initFormData: BaseStationInfoForm = {
productionTime: undefined,
agvCode: undefined,
ipAddress: undefined,
machineId: undefined,
activeFlag: '1',
remark: undefined,
productionTimeDays: 0,
@ -408,6 +439,7 @@ const handleExport = () => {
onMounted(() => {
getProcessInfoListSelect();
getProdBaseMachineInfoListSelect();
getList();
});
</script>

Loading…
Cancel
Save