|
|
@ -122,7 +122,7 @@
|
|
|
|
<el-table-column label='计划编号' align='center' prop='planCode' v-if='columns[5].visible' width='120'/>
|
|
|
|
<el-table-column label='计划编号' align='center' prop='planCode' v-if='columns[5].visible' width='120'/>
|
|
|
|
<el-table-column label='派工单号' align='center' prop='dispatchCode' v-if='columns[6].visible'/>
|
|
|
|
<el-table-column label='派工单号' align='center' prop='dispatchCode' v-if='columns[6].visible'/>
|
|
|
|
<el-table-column label='物料名称' align='center' prop='materialName' v-if='columns[7].visible' width='160'/>
|
|
|
|
<el-table-column label='物料名称' align='center' prop='materialName' v-if='columns[7].visible' width='160'/>
|
|
|
|
<el-table-column label='物料BOM' align='center' prop='materialBomName' v-if='columns[8].visible' width='160' />
|
|
|
|
<el-table-column label='BOM版本' align='center' prop='materialBomVersion' v-if='columns[8].visible' width='160'/>
|
|
|
|
<el-table-column label='工序名称' align='center' prop='processName' v-if='columns[9].visible'/>
|
|
|
|
<el-table-column label='工序名称' align='center' prop='processName' v-if='columns[9].visible'/>
|
|
|
|
<el-table-column label='顺序' align='center' prop='processOrder' v-if='columns[10].visible'/>
|
|
|
|
<el-table-column label='顺序' align='center' prop='processOrder' v-if='columns[10].visible'/>
|
|
|
|
<el-table-column label='上一工序ID' align='center' prop='lastProcessId' v-if='columns[11].visible'
|
|
|
|
<el-table-column label='上一工序ID' align='center' prop='lastProcessId' v-if='columns[11].visible'
|
|
|
@ -231,15 +231,26 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label='物料BOM' prop='materialBoMName'>
|
|
|
|
<!-- <el-form-item label="归属部门" prop="deptId">-->
|
|
|
|
<el-input v-model='form.materialBoMName' placeholder='请点击检索物料BOM' @click='handleMaterialBomAdd'
|
|
|
|
<!-- <el-tree-select-->
|
|
|
|
readonly>
|
|
|
|
<!-- v-model="form.materialBomVersion"-->
|
|
|
|
<template #append>
|
|
|
|
<!-- :data="materialBomVersionOptions"-->
|
|
|
|
<el-icon class='el-input__icon'>
|
|
|
|
<!-- :props="{ value: 'id', label: 'label', children: 'children' }"-->
|
|
|
|
<search />
|
|
|
|
<!-- value-key="id"-->
|
|
|
|
</el-icon>
|
|
|
|
<!-- placeholder="请选择归属部门"-->
|
|
|
|
</template>
|
|
|
|
<!-- check-strictly-->
|
|
|
|
</el-input>
|
|
|
|
<!-- @change="handleMaterialBomChange"-->
|
|
|
|
|
|
|
|
<!-- />-->
|
|
|
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
<el-form-item label='BOM版本' prop='materialBomVersion'>
|
|
|
|
|
|
|
|
<el-select v-model='form.materialBomVersion' placeholder='请选择BOM版本'>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for='item in materialBomVersionOptions'
|
|
|
|
|
|
|
|
:key='`${item.bomVersionDesc} - ${item.bomVersionDesc}`'
|
|
|
|
|
|
|
|
:label='`${item.bomVersionDesc} - ${item.bomVersionDesc}`'
|
|
|
|
|
|
|
|
:value='item.materialBomVersion'
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label='工序名称' prop='processId'>
|
|
|
|
<el-form-item label='工序名称' prop='processId'>
|
|
|
|
<el-select v-model='form.processId' placeholder='请选择工序'>
|
|
|
|
<el-select v-model='form.processId' placeholder='请选择工序'>
|
|
|
@ -396,11 +407,13 @@
|
|
|
|
<span style='font-weight:700; padding: 0 4px'>
|
|
|
|
<span style='font-weight:700; padding: 0 4px'>
|
|
|
|
机台编号
|
|
|
|
机台编号
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<el-input v-model='machineQueryParams.machineCode' placeholder='请输入机台编号' clearable style='width: 120px;' />
|
|
|
|
<el-input v-model='machineQueryParams.machineCode' placeholder='请输入机台编号' clearable
|
|
|
|
|
|
|
|
style='width: 120px;'/>
|
|
|
|
<span style='font-weight:700; padding: 0 4px'>
|
|
|
|
<span style='font-weight:700; padding: 0 4px'>
|
|
|
|
机台名称
|
|
|
|
机台名称
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<el-input v-model='machineQueryParams.machineName' placeholder='请输入机台名称' clearable style='width: 120px;' />
|
|
|
|
<el-input v-model='machineQueryParams.machineName' placeholder='请输入机台名称' clearable
|
|
|
|
|
|
|
|
style='width: 120px;'/>
|
|
|
|
<el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button type='primary' icon='Search' @click='handleMachineQuery'>搜索</el-button>
|
|
|
|
<el-button type='primary' icon='Search' @click='handleMachineQuery'>搜索</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -425,15 +438,15 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label='物料BOM' prop='materialBoMName'>
|
|
|
|
<el-form-item label='BOM版本' prop='materialBomVersion'>
|
|
|
|
<el-input v-model='form.materialBoMName' placeholder='请点击检索物料BOM' @click='handleMaterialBomAdd'
|
|
|
|
<el-select v-model='form.materialBomVersion' placeholder='请选择BOM版本'>
|
|
|
|
readonly>
|
|
|
|
<el-option
|
|
|
|
<template #append>
|
|
|
|
v-for='item in materialBomVersionOptions'
|
|
|
|
<el-icon class='el-input__icon'>
|
|
|
|
:key='item.materialBomVersion'
|
|
|
|
<search />
|
|
|
|
:label='`${item.materialBomVersion} - ${item.bomVersionDesc}`'
|
|
|
|
</el-icon>
|
|
|
|
:value='item.materialBomVersion'
|
|
|
|
</template>
|
|
|
|
/>
|
|
|
|
</el-input>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label='工序名称' prop='processId'>
|
|
|
|
<el-form-item label='工序名称' prop='processId'>
|
|
|
|
<el-select v-model='form.processId' placeholder='请先选择工序,再选择机台' @change="getMachine">
|
|
|
|
<el-select v-model='form.processId' placeholder='请先选择工序,再选择机台' @change="getMachine">
|
|
|
@ -512,11 +525,13 @@
|
|
|
|
<span style='font-weight:700; padding: 0 4px'>
|
|
|
|
<span style='font-weight:700; padding: 0 4px'>
|
|
|
|
机台编号
|
|
|
|
机台编号
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<el-input v-model='machineQueryParams.machineCode' placeholder='请输入机台编号' clearable style='width: 120px;' />
|
|
|
|
<el-input v-model='machineQueryParams.machineCode' placeholder='请输入机台编号' clearable
|
|
|
|
|
|
|
|
style='width: 120px;'/>
|
|
|
|
<span style='font-weight:700; padding: 0 4px'>
|
|
|
|
<span style='font-weight:700; padding: 0 4px'>
|
|
|
|
机台名称
|
|
|
|
机台名称
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<el-input v-model='machineQueryParams.machineName' placeholder='请输入机台名称' clearable style='width: 120px;' />
|
|
|
|
<el-input v-model='machineQueryParams.machineName' placeholder='请输入机台名称' clearable
|
|
|
|
|
|
|
|
style='width: 120px;'/>
|
|
|
|
<el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button type='primary' icon='Search' @click='handleMachineQuery'>搜索</el-button>
|
|
|
|
<el-button type='primary' icon='Search' @click='handleMachineQuery'>搜索</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -541,15 +556,15 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label='物料BOM' prop='materialBoMName'>
|
|
|
|
<el-form-item label='BOM版本' prop='materialBomVersion'>
|
|
|
|
<el-input v-model='form.materialBoMName' placeholder='请点击检索物料BOM' @click='handleMaterialBomAdd'
|
|
|
|
<el-select v-model='form.materialBomVersion' placeholder='请选择BOM版本'>
|
|
|
|
readonly>
|
|
|
|
<el-option
|
|
|
|
<template #append>
|
|
|
|
v-for='item in materialBomVersionOptions'
|
|
|
|
<el-icon class='el-input__icon'>
|
|
|
|
:key='item.materialBomVersion'
|
|
|
|
<search />
|
|
|
|
:label='`${item.materialBomVersion} - ${item.bomVersionDesc}`'
|
|
|
|
</el-icon>
|
|
|
|
:value='item.materialBomVersion'
|
|
|
|
</template>
|
|
|
|
/>
|
|
|
|
</el-input>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label='计划时间' prop='planBeginTime'>
|
|
|
|
<el-form-item label='计划时间' prop='planBeginTime'>
|
|
|
|
<el-date-picker clearable
|
|
|
|
<el-date-picker clearable
|
|
|
@ -618,11 +633,13 @@
|
|
|
|
<span style='font-weight:700; padding: 0 4px'>
|
|
|
|
<span style='font-weight:700; padding: 0 4px'>
|
|
|
|
机台编号
|
|
|
|
机台编号
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<el-input v-model='machineQueryParams.machineCode' placeholder='请输入机台编号' clearable style='width: 120px;' />
|
|
|
|
<el-input v-model='machineQueryParams.machineCode' placeholder='请输入机台编号' clearable
|
|
|
|
|
|
|
|
style='width: 120px;'/>
|
|
|
|
<span style='font-weight:700; padding: 0 4px'>
|
|
|
|
<span style='font-weight:700; padding: 0 4px'>
|
|
|
|
机台名称
|
|
|
|
机台名称
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<el-input v-model='machineQueryParams.machineName' placeholder='请输入机台名称' clearable style='width: 120px;' />
|
|
|
|
<el-input v-model='machineQueryParams.machineName' placeholder='请输入机台名称' clearable
|
|
|
|
|
|
|
|
style='width: 120px;'/>
|
|
|
|
<el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button type='primary' icon='Search' @click='handleMachineQuery'>搜索</el-button>
|
|
|
|
<el-button type='primary' icon='Search' @click='handleMachineQuery'>搜索</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -690,29 +707,27 @@
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-row :gutter='10' class='mb8'>
|
|
|
|
<el-row :gutter='10' class='mb8'>
|
|
|
|
<el-col :span='12'>
|
|
|
|
<el-col :span='12'>
|
|
|
|
<el-form-item label='左模BOM' prop='materialBoMNameL'>
|
|
|
|
<el-form-item label='BOM版本' prop='materialBomVersionL'>
|
|
|
|
<el-input v-model='form.materialBoMNameL' placeholder='请点击检索物料BOM'
|
|
|
|
<el-select v-model='form.materialBomVersionL' placeholder='请选择BOM版本'>
|
|
|
|
@click='handleMaterialBomAdd("L")'
|
|
|
|
<el-option
|
|
|
|
readonly>
|
|
|
|
v-for='item in materialBomVersionLOptions'
|
|
|
|
<template #append>
|
|
|
|
:key='item.materialBomVersion'
|
|
|
|
<el-icon class='el-input__icon'>
|
|
|
|
:label='`${item.materialBomVersion} - ${item.bomVersionDesc}`'
|
|
|
|
<search />
|
|
|
|
:value='item.materialBomVersion'
|
|
|
|
</el-icon>
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
</el-select>
|
|
|
|
</el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span='12'>
|
|
|
|
<el-col :span='12'>
|
|
|
|
<el-form-item label='右模BOM' prop='materialBoMNameR'>
|
|
|
|
<el-form-item label='BOM版本' prop='materialBomVersionR'>
|
|
|
|
<el-input v-model='form.materialBoMNameR' placeholder='请点击检索物料BOM'
|
|
|
|
<el-select v-model='form.materialBomVersionR' placeholder='请选择BOM版本'>
|
|
|
|
@click='handleMaterialBomAdd("R")'
|
|
|
|
<el-option
|
|
|
|
readonly>
|
|
|
|
v-for='item in materialBomVersionROptions'
|
|
|
|
<template #append>
|
|
|
|
:key='item.materialBomVersion'
|
|
|
|
<el-icon class='el-input__icon'>
|
|
|
|
:label='`${item.materialBomVersion} - ${item.bomVersionDesc}`'
|
|
|
|
<search />
|
|
|
|
:value='item.materialBomVersion'
|
|
|
|
</el-icon>
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
</el-select>
|
|
|
|
</el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
@ -792,7 +807,9 @@ import {
|
|
|
|
delPlanInfo,
|
|
|
|
delPlanInfo,
|
|
|
|
addPlanInfo,
|
|
|
|
addPlanInfo,
|
|
|
|
updatePlanInfo,
|
|
|
|
updatePlanInfo,
|
|
|
|
orderAddProductPlanList, issuePlanInfo
|
|
|
|
orderAddProductPlanList, issuePlanInfo,
|
|
|
|
|
|
|
|
materialBomTreeSelect,
|
|
|
|
|
|
|
|
materialBomVersionSelect
|
|
|
|
} from '@/api/mes/planInfo';
|
|
|
|
} from '@/api/mes/planInfo';
|
|
|
|
import {PlanInfoVO, PlanInfoQuery, PlanInfoForm} from '@/api/mes/planInfo/types';
|
|
|
|
import {PlanInfoVO, PlanInfoQuery, PlanInfoForm} from '@/api/mes/planInfo/types';
|
|
|
|
import {getBaseShiftInfoList} from '@/api/mes/baseShiftInfo';
|
|
|
|
import {getBaseShiftInfoList} from '@/api/mes/baseShiftInfo';
|
|
|
@ -803,6 +820,8 @@ import { getProcessInfoList } from '@/api/mes/baseProcessInfo';
|
|
|
|
import {getStationInfoList} from '@/api/mes/baseStationInfo';
|
|
|
|
import {getStationInfoList} from '@/api/mes/baseStationInfo';
|
|
|
|
import {getProdBaseMachineInfoList} from '@/api/mes/prodBaseMachineInfo';
|
|
|
|
import {getProdBaseMachineInfoList} from '@/api/mes/prodBaseMachineInfo';
|
|
|
|
import {ProdBaseMachineInfoVO} from '@/api/mes/prodBaseMachineInfo/types';
|
|
|
|
import {ProdBaseMachineInfoVO} from '@/api/mes/prodBaseMachineInfo/types';
|
|
|
|
|
|
|
|
import {MaterialBomVO} from "@/api/mes/materialBom/types";
|
|
|
|
|
|
|
|
import {optionselect} from "@/api/system/post";
|
|
|
|
|
|
|
|
|
|
|
|
const {proxy} = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
const {proxy} = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
const {
|
|
|
|
const {
|
|
|
@ -856,6 +875,12 @@ const materialOpen = ref(false);
|
|
|
|
const materialSelectRef = ref();
|
|
|
|
const materialSelectRef = ref();
|
|
|
|
const materialIdForm = ref();
|
|
|
|
const materialIdForm = ref();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const materialBomVersionOptions = ref<MaterialBomVO[]>([]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const materialBomVersionLOptions = ref<MaterialBomVO[]>([]);
|
|
|
|
|
|
|
|
const materialBomVersionROptions = ref<MaterialBomVO[]>([]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const workshopId = ref();
|
|
|
|
const workshopId = ref();
|
|
|
|
|
|
|
|
|
|
|
|
const prodBaseMachineInfoList = ref<ProdBaseMachineInfoVO[]>([]);
|
|
|
|
const prodBaseMachineInfoList = ref<ProdBaseMachineInfoVO[]>([]);
|
|
|
@ -903,7 +928,7 @@ const columns = ref<FieldOption[]>([
|
|
|
|
{key: 5, label: `计划编号`, visible: true},
|
|
|
|
{key: 5, label: `计划编号`, visible: true},
|
|
|
|
{key: 6, label: `派工单号`, visible: false},
|
|
|
|
{key: 6, label: `派工单号`, visible: false},
|
|
|
|
{key: 7, label: `物料名称`, visible: true},
|
|
|
|
{key: 7, label: `物料名称`, visible: true},
|
|
|
|
{ key: 8, label: `物料BOM`, visible: true },
|
|
|
|
{key: 8, label: `BOM版本`, visible: true},
|
|
|
|
{key: 9, label: `工序名称`, visible: true},
|
|
|
|
{key: 9, label: `工序名称`, visible: true},
|
|
|
|
{key: 10, label: `顺序`, visible: false},
|
|
|
|
{key: 10, label: `顺序`, visible: false},
|
|
|
|
{key: 11, label: `上一工序ID`, visible: false},
|
|
|
|
{key: 11, label: `上一工序ID`, visible: false},
|
|
|
@ -1178,7 +1203,7 @@ const batchesAddAssemblyData = () => {
|
|
|
|
let data = {...formData};
|
|
|
|
let data = {...formData};
|
|
|
|
data.modelCode = formData.workshopId === '4' ? 'L' : null;
|
|
|
|
data.modelCode = formData.workshopId === '4' ? 'L' : null;
|
|
|
|
data.materialId = formData.workshopId === '4' ? formData.materialIdL : formData.materialId;
|
|
|
|
data.materialId = formData.workshopId === '4' ? formData.materialIdL : formData.materialId;
|
|
|
|
data.materialBomId = formData.workshopId === '4' ? formData.materialBomIdL : formData.materialBomId;
|
|
|
|
data.materialBomVersion = formData.workshopId === '4' ? formData.materialBomVersionL : formData.materialBomVersion;
|
|
|
|
data.shiftId = '1';
|
|
|
|
data.shiftId = '1';
|
|
|
|
data.planAmount = formData.planAmount1;
|
|
|
|
data.planAmount = formData.planAmount1;
|
|
|
|
list.push(data);
|
|
|
|
list.push(data);
|
|
|
@ -1189,7 +1214,7 @@ const batchesAddAssemblyData = () => {
|
|
|
|
data.shiftId = '2';
|
|
|
|
data.shiftId = '2';
|
|
|
|
data.planAmount = formData.planAmount2;
|
|
|
|
data.planAmount = formData.planAmount2;
|
|
|
|
data.materialId = formData.workshopId === '4' ? formData.materialIdL : formData.materialId;
|
|
|
|
data.materialId = formData.workshopId === '4' ? formData.materialIdL : formData.materialId;
|
|
|
|
data.materialBomId = formData.workshopId === '4' ? formData.materialBomIdL : formData.materialBomId;
|
|
|
|
data.materialBomVersion = formData.workshopId === '4' ? formData.materialBomVersionL : formData.materialBomVersion;
|
|
|
|
list.push(data);
|
|
|
|
list.push(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (formData.planAmount3 > 0) {
|
|
|
|
if (formData.planAmount3 > 0) {
|
|
|
@ -1198,7 +1223,7 @@ const batchesAddAssemblyData = () => {
|
|
|
|
data.shiftId = '3';
|
|
|
|
data.shiftId = '3';
|
|
|
|
data.planAmount = formData.planAmount3;
|
|
|
|
data.planAmount = formData.planAmount3;
|
|
|
|
data.materialId = formData.workshopId === '4' ? formData.materialIdL : formData.materialId;
|
|
|
|
data.materialId = formData.workshopId === '4' ? formData.materialIdL : formData.materialId;
|
|
|
|
data.materialBomId = formData.workshopId === '4' ? formData.materialBomIdL : formData.materialBomId;
|
|
|
|
data.materialBomVersion = formData.workshopId === '4' ? formData.materialBomVersionL : formData.materialBomVersion;
|
|
|
|
list.push(data);
|
|
|
|
list.push(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (formData.planAmount4 > 0) {
|
|
|
|
if (formData.planAmount4 > 0) {
|
|
|
@ -1207,7 +1232,7 @@ const batchesAddAssemblyData = () => {
|
|
|
|
data.shiftId = '1';
|
|
|
|
data.shiftId = '1';
|
|
|
|
data.planAmount = formData.planAmount4;
|
|
|
|
data.planAmount = formData.planAmount4;
|
|
|
|
data.materialId = formData.workshopId === '4' ? formData.materialIdR : formData.materialId;
|
|
|
|
data.materialId = formData.workshopId === '4' ? formData.materialIdR : formData.materialId;
|
|
|
|
data.materialBomId = formData.workshopId === '4' ? formData.materialBomIdR : formData.materialBomId;
|
|
|
|
data.materialBomVersion = formData.workshopId === '4' ? formData.materialBomVersionR : formData.materialBomVersion;
|
|
|
|
list.push(data);
|
|
|
|
list.push(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (formData.planAmount5 > 0) {
|
|
|
|
if (formData.planAmount5 > 0) {
|
|
|
@ -1216,8 +1241,7 @@ const batchesAddAssemblyData = () => {
|
|
|
|
data.shiftId = '2';
|
|
|
|
data.shiftId = '2';
|
|
|
|
data.planAmount = formData.planAmount5;
|
|
|
|
data.planAmount = formData.planAmount5;
|
|
|
|
data.materialId = formData.workshopId === '4' ? formData.materialIdR : formData.materialId;
|
|
|
|
data.materialId = formData.workshopId === '4' ? formData.materialIdR : formData.materialId;
|
|
|
|
data.materialBomId = formData.workshopId === '4' ? formData.materialBomIdR : formData.materialBomId;
|
|
|
|
data.materialBomVersion = formData.workshopId === '4' ? formData.materialBomVersionR : formData.materialBomVersion; list.push(data);
|
|
|
|
list.push(data);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (formData.planAmount6 > 0) {
|
|
|
|
if (formData.planAmount6 > 0) {
|
|
|
|
let data = {...formData};
|
|
|
|
let data = {...formData};
|
|
|
@ -1225,8 +1249,7 @@ const batchesAddAssemblyData = () => {
|
|
|
|
data.shiftId = '3';
|
|
|
|
data.shiftId = '3';
|
|
|
|
data.planAmount = formData.planAmount6;
|
|
|
|
data.planAmount = formData.planAmount6;
|
|
|
|
data.materialId = formData.workshopId === '4' ? formData.materialIdR : formData.materialId;
|
|
|
|
data.materialId = formData.workshopId === '4' ? formData.materialIdR : formData.materialId;
|
|
|
|
data.materialBomId = formData.workshopId === '4' ? formData.materialBomIdR : formData.materialBomId;
|
|
|
|
data.materialBomVersion = formData.workshopId === '4' ? formData.materialBomVersionR : formData.materialBomVersion; list.push(data);
|
|
|
|
list.push(data);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return list;
|
|
|
|
return list;
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -1269,12 +1292,15 @@ const submitMaterialForm = () => {
|
|
|
|
if (modelCodeRef.value === 'L') {
|
|
|
|
if (modelCodeRef.value === 'L') {
|
|
|
|
form.value.materialIdL = selectedRow.materialId;
|
|
|
|
form.value.materialIdL = selectedRow.materialId;
|
|
|
|
form.value.materialNameL = selectedRow.materialName;
|
|
|
|
form.value.materialNameL = selectedRow.materialName;
|
|
|
|
|
|
|
|
getMaterialBomVersionSelect('L')
|
|
|
|
} else if (modelCodeRef.value === 'R') {
|
|
|
|
} else if (modelCodeRef.value === 'R') {
|
|
|
|
form.value.materialIdR = selectedRow.materialId;
|
|
|
|
form.value.materialIdR = selectedRow.materialId;
|
|
|
|
form.value.materialNameR = selectedRow.materialName;
|
|
|
|
form.value.materialNameR = selectedRow.materialName;
|
|
|
|
|
|
|
|
getMaterialBomVersionSelect('R')
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
form.value.materialId = selectedRow.materialId;
|
|
|
|
form.value.materialId = selectedRow.materialId;
|
|
|
|
form.value.materialName = selectedRow.materialName;
|
|
|
|
form.value.materialName = selectedRow.materialName;
|
|
|
|
|
|
|
|
getMaterialBomVersionSelect('')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
materialIdForm.value = selectedRow.materialId;
|
|
|
|
materialIdForm.value = selectedRow.materialId;
|
|
|
|
materialOpen.value = false;
|
|
|
|
materialOpen.value = false;
|
|
|
@ -1319,6 +1345,49 @@ const getMachine = async () => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 查询物料bom版本下拉列表 */
|
|
|
|
|
|
|
|
const getMaterialBomVersionSelect = async (type: string) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (type === 'L') {//硫化计划左模物料
|
|
|
|
|
|
|
|
materialBomVersionLOptions.value = [];
|
|
|
|
|
|
|
|
if (form.value.materialIdL && form.value.materialIdL !== '') {
|
|
|
|
|
|
|
|
const query = {params:{parentId: form.value.materialIdL}};
|
|
|
|
|
|
|
|
const res = await materialBomVersionSelect(query);
|
|
|
|
|
|
|
|
materialBomVersionLOptions.value = res.data;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (type === 'R') {//硫化计划右模物料
|
|
|
|
|
|
|
|
materialBomVersionROptions.value = [];
|
|
|
|
|
|
|
|
if (form.value.materialIdR && form.value.materialIdR !== '') {
|
|
|
|
|
|
|
|
const query = {params:{parentId: form.value.materialIdR}};
|
|
|
|
|
|
|
|
const res = await materialBomVersionSelect(query);
|
|
|
|
|
|
|
|
materialBomVersionROptions.value = res.data;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {//半制品计划或成型计划
|
|
|
|
|
|
|
|
materialBomVersionOptions.value = [];
|
|
|
|
|
|
|
|
if (form.value.materialId && form.value.materialId !== '') {
|
|
|
|
|
|
|
|
const query = {params:{parentId: form.value.materialId}};
|
|
|
|
|
|
|
|
const res = await materialBomVersionSelect(query);
|
|
|
|
|
|
|
|
materialBomVersionOptions.value = res.data;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 查询物料bom下拉树结构 */
|
|
|
|
|
|
|
|
const getTreeSelect = async () => {
|
|
|
|
|
|
|
|
const res = await materialBomTreeSelect();
|
|
|
|
|
|
|
|
materialBomVersionOptions.value = res.data;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function handleMaterialBomChange(value: number | string) {
|
|
|
|
|
|
|
|
const response = await optionselect(value);
|
|
|
|
|
|
|
|
postOptions.value = response.data;
|
|
|
|
|
|
|
|
form.value.postIds = [];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
getWorkshopId();
|
|
|
|
getWorkshopId();
|
|
|
|
getShiftSelect();
|
|
|
|
getShiftSelect();
|
|
|
|