diff --git a/src/views/mes/materialBom/addBom.vue b/src/views/mes/materialBom/addBom.vue new file mode 100644 index 0000000..f51798a --- /dev/null +++ b/src/views/mes/materialBom/addBom.vue @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/mes/planInfo/index.vue b/src/views/mes/planInfo/index.vue index 145d391..572b1f2 100644 --- a/src/views/mes/planInfo/index.vue +++ b/src/views/mes/planInfo/index.vue @@ -164,26 +164,30 @@ - - - + + + - - - - - - + + + + + + - + + + + + @@ -285,6 +289,16 @@ + + + + + + + @@ -293,6 +307,7 @@ import { listPlanInfo, getPlanInfo, delPlanInfo, addPlanInfo, updatePlanInfo } f import { PlanInfoVO, PlanInfoQuery, PlanInfoForm } from '@/api/mes/planInfo/types'; import { getBaseShiftInfoList } from '@/api/mes/baseShiftInfo'; import { getBaseClassTeamInfoList } from '@/api/mes/baseClassTeamInfo'; +import BomSelect from '@/views/mes/materialBom/addBom.vue'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { mes_import_flag, active_flag, mes_plan_status, mes_release_type, mes_finish_flag, mes_model_code } = toRefs(proxy?.useDict('mes_import_flag', 'active_flag', 'mes_plan_status', 'mes_release_type', 'mes_finish_flag', 'mes_model_code')); @@ -317,6 +332,9 @@ const dialog = reactive({ const shiftList = ref([]); const classTeamList = ref([]); +const materialOpen = ref(false); +const bomSelectRef = ref>(); + /*获取班次下拉框*/ const getShiftSelect = async () => { let res = await getBaseShiftInfoList(null); @@ -555,6 +573,24 @@ const handleExport = () => { }, `planInfo_${new Date().getTime()}.xlsx`) } +/** 新增按钮操作 */ +const handleMaterialAdd = () => { + materialOpen.value = true; + bomSelectRef.value.open(); +} + +/** 提交物料信息按钮 */ +const submitMaterialForm = () => { + console.log("bomSelectRef.value",bomSelectRef.value); + let selectedRow = bomSelectRef.value.selectedRow; + console.log(selectedRow,form.value); + form.value.materialName = selectedRow.materialName + // this.$set(form, "materialId", selectedRow.materialId); + // this.$set(form, "materialName", selectedRow.materialName); + // this.$set(form, "erpMaterialId", selectedRow.erpId); + materialOpen.value = false; +} + onMounted(() => { getShiftSelect(); getClassTeamSelect();