|
|
|
@ -3,8 +3,8 @@
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<!-- 生产bom树 -->
|
|
|
|
|
<el-col :lg="6" :xs="24" style="" v-loading="treeLoading">
|
|
|
|
|
<el-card shadow="hover">
|
|
|
|
|
<el-input v-model="materialName" placeholder="请输入物料名称" prefix-icon="Search" clearable/>
|
|
|
|
|
<el-card shadow="hover" style="height: 100%;overflow:auto;">
|
|
|
|
|
<el-input v-model="materialName" placeholder="请输入物料名称" prefix-icon="Search" clearable />
|
|
|
|
|
<el-tree
|
|
|
|
|
ref="materialBomTreeRef"
|
|
|
|
|
class="mt-2"
|
|
|
|
@ -34,20 +34,20 @@
|
|
|
|
|
<el-form ref="parentMaterialBomFormRef" label-width="120px" :model="parentForm" :rules="parentRules">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-form-item label='父物料ID' prop='parentId' v-if="false">
|
|
|
|
|
<el-input v-model='parentForm.parentId' placeholder='' style="width:360px"/>
|
|
|
|
|
<el-input v-model='parentForm.parentId' placeholder='' style="width:360px" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label='父物料类型ID' prop='parentMaterialTypeId' v-if="false">
|
|
|
|
|
<el-input v-model='parentForm.parentMaterialTypeId' placeholder='' style="width:360px"/>
|
|
|
|
|
<el-input v-model='parentForm.parentMaterialTypeId' placeholder='' style="width:360px" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label='父物料名称' prop='parentMaterialName'>
|
|
|
|
|
<el-input v-model='parentForm.parentMaterialName' placeholder='请点击检索物料'
|
|
|
|
|
@click='handleMaterialSelect(parentForm,SELECT_MATERIAL_MODEL.PARENT_SELECT)'
|
|
|
|
|
style="width:260px" @change="getList" suffix-icon="Search" readonly
|
|
|
|
|
:disabled="parentMaterialDisabled"/>
|
|
|
|
|
:disabled="parentMaterialDisabled" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="父物料类型名称" prop='parentMaterialTypeName'>
|
|
|
|
|
<el-input v-model='parentForm.parentMaterialTypeName' placeholder='' style="width:260px" readonly/>
|
|
|
|
|
<el-input v-model='parentForm.parentMaterialTypeName' placeholder='' style="width:260px" readonly />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -66,7 +66,7 @@
|
|
|
|
|
<el-form-item label='父物料数量' prop='parentStandardAmount'>
|
|
|
|
|
<el-input-number v-model='parentForm.parentStandardAmount' :precision="2" :step="1"
|
|
|
|
|
placeholder='请输入父物料数量'
|
|
|
|
|
style="width:200px"/>
|
|
|
|
|
style="width:200px" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label='单位' prop='parentUnitId'>
|
|
|
|
@ -105,29 +105,29 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<el-table :data="materialBomList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="50" align="center"/>
|
|
|
|
|
<el-table-column type="index" width="50" align="center" label="序号"/>
|
|
|
|
|
<el-table-column type="selection" width="50" align="center" />
|
|
|
|
|
<el-table-column type="index" width="50" align="center" label="序号" />
|
|
|
|
|
<el-table-column v-if="columns[0].visible" key="materialBomId" label="生产BOM_ID" align="center"
|
|
|
|
|
prop="materialBomId"/>
|
|
|
|
|
prop="materialBomId" />
|
|
|
|
|
<el-table-column v-if="columns[1].visible" key="materialTypeCode" label="子物料类型编号" align="center"
|
|
|
|
|
prop="materialTypeCode" :show-overflow-tooltip="true"/>
|
|
|
|
|
prop="materialTypeCode" :show-overflow-tooltip="true" />
|
|
|
|
|
<el-table-column v-if="columns[2].visible" key="materialTypeName" label="子物料类型名称" align="center"
|
|
|
|
|
prop="materialTypeName" :show-overflow-tooltip="true" w/>
|
|
|
|
|
prop="materialTypeName" :show-overflow-tooltip="true" w />
|
|
|
|
|
<el-table-column v-if="columns[4].visible" key="materialId" label="子物料ID" align="center"
|
|
|
|
|
prop="materialId" :show-overflow-tooltip="true"/>
|
|
|
|
|
prop="materialId" :show-overflow-tooltip="true" />
|
|
|
|
|
<el-table-column v-if="columns[5].visible" key="materialName" label="子物料名称" align="center"
|
|
|
|
|
prop="materialName" :show-overflow-tooltip="true">
|
|
|
|
|
<template #default='scope'>
|
|
|
|
|
<el-input v-model='scope.row.materialName' placeholder='请点击检索物料'
|
|
|
|
|
@click='handleMaterialSelect(scope.row,SELECT_MATERIAL_MODEL.CHILD_SELECT)'
|
|
|
|
|
suffix-icon="Search" readonly/>
|
|
|
|
|
suffix-icon="Search" readonly />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column v-if="columns[6].visible" key="standardAmount" label="子物料数量" align="center"
|
|
|
|
|
prop="standardAmount" :show-overflow-tooltip="true" width="220px">
|
|
|
|
|
<template #default='scope'>
|
|
|
|
|
<el-input-number v-model='scope.row.standardAmount' :precision="2" :step="1"
|
|
|
|
|
placeholder='请输入数量' style="width:180px"/>
|
|
|
|
|
placeholder='请输入数量' style="width:180px" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
@ -190,18 +190,18 @@
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
|
|
<el-form-item label='子物料ID' prop='materialId' v-if="false">
|
|
|
|
|
<el-input v-model='form.materialId' placeholder='' style="width:360px"/>
|
|
|
|
|
<el-input v-model='form.materialId' placeholder='' style="width:360px" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label='子物料名称' prop='materialName'>
|
|
|
|
|
<el-input v-model='form.materialName' placeholder='请点击检索物料'
|
|
|
|
|
@click='handleMaterialSelect(form,SELECT_MATERIAL_MODEL.DIALOG_CHILD_SELECT)'
|
|
|
|
|
style="width:360px"/>
|
|
|
|
|
style="width:360px" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label='子物料数量' prop='standardAmount'>
|
|
|
|
|
<el-input-number v-model='form.standardAmount' :precision="2" :step="1" placeholder='请输入子物料数量'
|
|
|
|
|
style="width:360px"/>
|
|
|
|
|
style="width:360px" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label='子物料单位' prop='unitId'>
|
|
|
|
@ -244,22 +244,22 @@ import {
|
|
|
|
|
listMaterialBomJoinStructure,
|
|
|
|
|
addBatchMaterialBom,
|
|
|
|
|
getUnitInfoList, getMaterialBomVersionList, getParentMaterialBom, deleteMaterialBoms
|
|
|
|
|
} from "@/api/mes/materialBom";
|
|
|
|
|
} from '@/api/mes/materialBom';
|
|
|
|
|
|
|
|
|
|
import {MaterialBomVO, MaterialBomForm, MaterialBomQuery} from '@/api/mes/materialBom/types';
|
|
|
|
|
import {BaseMaterialTypeVO} from '@/api/mes/baseMaterialType/types';
|
|
|
|
|
import { MaterialBomVO, MaterialBomForm, MaterialBomQuery } from '@/api/mes/materialBom/types';
|
|
|
|
|
import { BaseMaterialTypeVO } from '@/api/mes/baseMaterialType/types';
|
|
|
|
|
import MaterialSelect from '@/views/mes/baseMaterialInfo/addMaterial.vue';
|
|
|
|
|
|
|
|
|
|
import {to} from 'await-to-js';
|
|
|
|
|
import {nextTick} from "vue";
|
|
|
|
|
import {MaterialBomVersionVO} from "@/api/mes/materialBomVersion/types";
|
|
|
|
|
import {BaseMeasurementUnitInfoVO} from "@/api/mes/baseMeasurementUnitInfo/types";
|
|
|
|
|
import {BaseStructureBomTreeVO} from "@/api/mes/baseStructureBom/types";
|
|
|
|
|
import { to } from 'await-to-js';
|
|
|
|
|
import { nextTick } from 'vue';
|
|
|
|
|
import { MaterialBomVersionVO } from '@/api/mes/materialBomVersion/types';
|
|
|
|
|
import { BaseMeasurementUnitInfoVO } from '@/api/mes/baseMeasurementUnitInfo/types';
|
|
|
|
|
import { BaseStructureBomTreeVO } from '@/api/mes/baseStructureBom/types';
|
|
|
|
|
|
|
|
|
|
const materialTypeId = ref(0);//此值是传给选择物料信息弹框使用
|
|
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
const {proxy} = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
const materialBomList = ref<MaterialBomVO[]>();
|
|
|
|
|
const saveMaterialBomList = ref<MaterialBomVO[]>([]);
|
|
|
|
|
const treeLoading = ref(false);
|
|
|
|
@ -293,18 +293,18 @@ const SELECT_MATERIAL_MODEL = ref({
|
|
|
|
|
PARENT_SELECT: '1',//父级物料选择
|
|
|
|
|
CHILD_SELECT: '2',//子级物料选择
|
|
|
|
|
DIALOG_CHILD_SELECT: '3'//弹窗子级选择
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 列显隐信息
|
|
|
|
|
const columns = ref<FieldOption[]>([
|
|
|
|
|
{key: 0, label: `生产BOM_ID`, visible: false, children: []},
|
|
|
|
|
{key: 1, label: `子物料类型编号`, visible: true, children: []},
|
|
|
|
|
{key: 2, label: `子物料类型名称`, visible: true, children: []},
|
|
|
|
|
{key: 3, label: `BOM版本`, visible: false, children: []},
|
|
|
|
|
{key: 4, label: `子物料ID`, visible: false, children: []},
|
|
|
|
|
{key: 5, label: `子物料名称`, visible: true, children: []},
|
|
|
|
|
{key: 6, label: `子物料数量`, visible: true, children: []},
|
|
|
|
|
{key: 7, label: `子物料单位`, visible: true, children: []}
|
|
|
|
|
{ key: 0, label: `生产BOM_ID`, visible: false, children: [] },
|
|
|
|
|
{ key: 1, label: `子物料类型编号`, visible: true, children: [] },
|
|
|
|
|
{ key: 2, label: `子物料类型名称`, visible: true, children: [] },
|
|
|
|
|
{ key: 3, label: `BOM版本`, visible: false, children: [] },
|
|
|
|
|
{ key: 4, label: `子物料ID`, visible: false, children: [] },
|
|
|
|
|
{ key: 5, label: `子物料名称`, visible: true, children: [] },
|
|
|
|
|
{ key: 6, label: `子物料数量`, visible: true, children: [] },
|
|
|
|
|
{ key: 7, label: `子物料单位`, visible: true, children: [] }
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const materialBomTreeRef = ref<ElTreeInstance>();
|
|
|
|
@ -340,7 +340,7 @@ const initParentFormData: MaterialBomForm = {
|
|
|
|
|
attachId: undefined,
|
|
|
|
|
activeFlag: '1',
|
|
|
|
|
remark: undefined,
|
|
|
|
|
materialTypeName: undefined,
|
|
|
|
|
materialTypeName: undefined
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const initFormData: MaterialBomForm = {
|
|
|
|
@ -364,12 +364,12 @@ const initFormData: MaterialBomForm = {
|
|
|
|
|
attachId: undefined,
|
|
|
|
|
activeFlag: '1',
|
|
|
|
|
remark: undefined,
|
|
|
|
|
materialTypeName: undefined,
|
|
|
|
|
materialTypeName: undefined
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const data = reactive<PageData<MaterialBomForm, MaterialBomQuery>>({
|
|
|
|
|
form: {...initFormData},
|
|
|
|
|
parentForm: {...initParentFormData},
|
|
|
|
|
form: { ...initFormData },
|
|
|
|
|
parentForm: { ...initParentFormData },
|
|
|
|
|
queryParams: {
|
|
|
|
|
materialBomId: undefined,
|
|
|
|
|
parentId: undefined,
|
|
|
|
@ -382,31 +382,31 @@ const data = reactive<PageData<MaterialBomForm, MaterialBomQuery>>({
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
materialTypeId: [
|
|
|
|
|
{required: true, message: "物料类型不能为空", trigger: "blur"}
|
|
|
|
|
{ required: true, message: '物料类型不能为空', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
materialBomVersion: [
|
|
|
|
|
{required: true, message: "BOM版本不能为空", trigger: "blur"}
|
|
|
|
|
{ required: true, message: 'BOM版本不能为空', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
materialName: [
|
|
|
|
|
{required: true, message: "物料名称不能为空", trigger: "blur"}
|
|
|
|
|
{ required: true, message: '物料名称不能为空', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
standardAmount: [
|
|
|
|
|
{required: true, message: "子物料数量不能为空", trigger: "blur"}
|
|
|
|
|
{ required: true, message: '子物料数量不能为空', trigger: 'blur' }
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
parentRules: {
|
|
|
|
|
parentMaterialName: [
|
|
|
|
|
{required: true, message: "父物料名称不能为空", trigger: "blur"}
|
|
|
|
|
{ required: true, message: '父物料名称不能为空', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
materialBomVersion: [
|
|
|
|
|
{required: true, message: "BOM版本不能为空", trigger: "blur"}
|
|
|
|
|
{ required: true, message: 'BOM版本不能为空', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
parentStandardAmount: [
|
|
|
|
|
{required: true, message: "父物料数量不能为空", trigger: "blur"}
|
|
|
|
|
{ required: true, message: '父物料数量不能为空', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
parentUnitId: [
|
|
|
|
|
{required: true, message: "父物料单位不能为空", trigger: "blur"}
|
|
|
|
|
{ required: true, message: '父物料单位不能为空', trigger: 'blur' }
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -421,9 +421,9 @@ const parentQueryParams = ref({
|
|
|
|
|
materialName: undefined,
|
|
|
|
|
materialBomVersion: undefined,
|
|
|
|
|
params: {}
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const {queryParams, form, rules, parentForm, parentRules} = toRefs(data);
|
|
|
|
|
const { queryParams, form, rules, parentForm, parentRules } = toRefs(data);
|
|
|
|
|
|
|
|
|
|
/** 通过条件过滤节点 */
|
|
|
|
|
const filterNode = (value: string, data: any) => {
|
|
|
|
@ -452,7 +452,7 @@ const getTreeSelect = async () => {
|
|
|
|
|
id: virtualTopNodeId,//materialBomId
|
|
|
|
|
parentId: -1,
|
|
|
|
|
materialId: 0,
|
|
|
|
|
label: "生产BOM",
|
|
|
|
|
label: '生产BOM',
|
|
|
|
|
children: res.data
|
|
|
|
|
};
|
|
|
|
|
materialBomOptions.value.push(initialTree);
|
|
|
|
@ -460,12 +460,12 @@ const getTreeSelect = async () => {
|
|
|
|
|
|
|
|
|
|
// materialBomOptions.value = res.data;
|
|
|
|
|
if (!focusKeyNode.value) {//如果之前没有focus
|
|
|
|
|
focusKeyNode.value = {treeKey: virtualTopNodeId};
|
|
|
|
|
focusKeyNode.value = { treeKey: virtualTopNodeId };
|
|
|
|
|
} else {
|
|
|
|
|
const clickNode = findObjectByTreeKey(materialBomOptions.value, focusKeyNode.value.treeKey)
|
|
|
|
|
const clickNode = findObjectByTreeKey(materialBomOptions.value, focusKeyNode.value.treeKey);
|
|
|
|
|
if (!clickNode) {
|
|
|
|
|
focusKeyNode.value = undefined;
|
|
|
|
|
focusKeyNode.value = {treeKey: virtualTopNodeId};
|
|
|
|
|
focusKeyNode.value = { treeKey: virtualTopNodeId };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if (!allTreeKeys || allTreeKeys.length <= 0) {
|
|
|
|
@ -482,9 +482,9 @@ const getTreeSelect = async () => {
|
|
|
|
|
// const focusKeyNodeIndex = materialBomOptions.value.findIndex((optionItem) => focusKeyNode.value.treeKey === optionItem.treeKey);//有嵌套children的,有可能找不到
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
nextTick(function () {
|
|
|
|
|
nextTick(function() {
|
|
|
|
|
materialBomTreeRef.value?.setCurrentKey(focusKeyNode.value.treeKey, true);
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
treeLoading.value = false;
|
|
|
|
@ -507,12 +507,12 @@ const getList = async () => {
|
|
|
|
|
const resetParentQueryParams = () => {
|
|
|
|
|
parentQueryParams.value.parentId = undefined;//是当前节点的materialId
|
|
|
|
|
parentQueryParams.value.materialBomVersion = undefined;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const resetQueryParams = () => {
|
|
|
|
|
queryParams.value.parentId = undefined;//materialid
|
|
|
|
|
queryParams.value.parentMaterialTypeId = undefined;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 节点单击事件 */
|
|
|
|
|
const handleNodeClick = (data: MaterialBomVO) => {
|
|
|
|
@ -528,7 +528,7 @@ const handleNodeClick = (data: MaterialBomVO) => {
|
|
|
|
|
getParentMaterialBomInfo();
|
|
|
|
|
queryParams.value.parentId = data.materialId;
|
|
|
|
|
queryParams.value.parentMaterialTypeId = data.materialTypeId;
|
|
|
|
|
queryParams.value.materialBomVersion = data.materialBomVersion
|
|
|
|
|
queryParams.value.materialBomVersion = data.materialBomVersion;
|
|
|
|
|
handleQuery();
|
|
|
|
|
} else {
|
|
|
|
|
if (materialBomVersionOptions.value.length > 0) {
|
|
|
|
@ -543,10 +543,10 @@ const handleNodeClick = (data: MaterialBomVO) => {
|
|
|
|
|
const clickDisplay = () => {
|
|
|
|
|
if (queryParams.value.parentId === 0) {
|
|
|
|
|
parentFormDisplay.value = false;
|
|
|
|
|
childTableTitle.value = "顶级物料";
|
|
|
|
|
childTableTitle.value = '顶级物料';
|
|
|
|
|
} else {
|
|
|
|
|
parentFormDisplay.value = true;
|
|
|
|
|
childTableTitle.value = "子级物料";
|
|
|
|
|
childTableTitle.value = '子级物料';
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -588,7 +588,7 @@ const handleDelete = async (row?: MaterialBomVO) => {
|
|
|
|
|
});
|
|
|
|
|
// alert(JSON.stringify(toDeleteMaterialBoms.value))
|
|
|
|
|
if (toDeleteMaterialBoms.value.length > 0) {
|
|
|
|
|
await deleteMaterialBoms(toDeleteMaterialBoms.value)
|
|
|
|
|
await deleteMaterialBoms(toDeleteMaterialBoms.value);
|
|
|
|
|
await getTreeSelect();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -619,7 +619,7 @@ const handleSelectionChange = (selection: MaterialBomVO[]) => {
|
|
|
|
|
|
|
|
|
|
/** 重置操作表单 */
|
|
|
|
|
const reset = () => {
|
|
|
|
|
form.value = {...initFormData};
|
|
|
|
|
form.value = { ...initFormData };
|
|
|
|
|
materialBomFormRef.value?.resetFields();
|
|
|
|
|
};
|
|
|
|
|
/** 取消按钮 */
|
|
|
|
@ -734,7 +734,7 @@ const handleMaterialSelect = (row, selectMode) => {
|
|
|
|
|
} else if (selectMode === SELECT_MATERIAL_MODEL.value.CHILD_SELECT) {//子级选择物料需要传值materialTypeId
|
|
|
|
|
materialTypeId.value = row.materialTypeId;
|
|
|
|
|
} else {
|
|
|
|
|
materialTypeId.value = undefined
|
|
|
|
|
materialTypeId.value = undefined;
|
|
|
|
|
}
|
|
|
|
|
materialOpen.value = true;
|
|
|
|
|
};
|
|
|
|
@ -801,7 +801,7 @@ const submitBatchSaveMaterialBoms = async () => {
|
|
|
|
|
await addBatchMaterialBom(saveMaterialBomList.value);
|
|
|
|
|
proxy?.$modal.msgSuccess('操作成功');
|
|
|
|
|
|
|
|
|
|
focusKeyNode.value.treeKey = parentForm.value.parentId + "-" + parentForm.value.materialBomVersion;
|
|
|
|
|
focusKeyNode.value.treeKey = parentForm.value.parentId + '-' + parentForm.value.materialBomVersion;
|
|
|
|
|
focusKeyNode.value.materialBomVersion = parentForm.value.materialBomVersion;
|
|
|
|
|
focusKeyNode.value.parentUnitId = parentForm.value.parentUnitId;
|
|
|
|
|
focusKeyNode.value.parentStandardAmount = parentForm.value.parentStandardAmount;
|
|
|
|
@ -817,13 +817,13 @@ const submitBatchSaveMaterialBoms = async () => {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 初始化单位数据 */
|
|
|
|
|
const initUnitInfoData = async () => {
|
|
|
|
|
if (unitInfoOptions.value === undefined || unitInfoOptions.value.length <= 0) {
|
|
|
|
|
const {data} = await getUnitInfoList();
|
|
|
|
|
const { data } = await getUnitInfoList();
|
|
|
|
|
// alert(JSON.stringify(data))
|
|
|
|
|
unitInfoOptions.value = data;
|
|
|
|
|
}
|
|
|
|
@ -833,7 +833,7 @@ const initUnitInfoData = async () => {
|
|
|
|
|
const initMaterialBomVersionData = async () => {
|
|
|
|
|
// alert(JSON.stringify(getMaterialBomVersionList))
|
|
|
|
|
if (materialBomVersionOptions.value === undefined || materialBomVersionOptions.value.length <= 0) {
|
|
|
|
|
const {data} = await getMaterialBomVersionList();
|
|
|
|
|
const { data } = await getMaterialBomVersionList();
|
|
|
|
|
materialBomVersionOptions.value = data;
|
|
|
|
|
|
|
|
|
|
if (materialBomVersionOptions.value.length > 0) {
|
|
|
|
@ -862,7 +862,7 @@ const findObjectByTreeKey = (list, targetTreeKey) => {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const getClickNode = (obj) => {
|
|
|
|
|