|
@@ -34,6 +34,7 @@
|
|
|
<script setup>
|
|
|
import { ref, getCurrentInstance } from "vue";
|
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
|
+import { getBomVersion } from "@/api/craft/process/index";
|
|
|
import { tableConfig } from "./configs/tableConfig";
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -48,11 +49,36 @@ const props = defineProps({
|
|
|
});
|
|
|
|
|
|
const isShowTable = ref(false);
|
|
|
-
|
|
|
-const startSelect = (param) => {
|
|
|
+const startSelect = async (param, comObj) => {
|
|
|
if (param) {
|
|
|
commonConfig.value.params = param;
|
|
|
}
|
|
|
+ if (comObj && comObj.tableName == "wuliaocaiji") {
|
|
|
+ //说明时物料采集的添加框 进行物料采集的下拉框数据获取
|
|
|
+ let bomParam = {
|
|
|
+ materialCode: param.materialCode,
|
|
|
+ };
|
|
|
+ await getBomVersion(bomParam).then((res) => {
|
|
|
+ let resListMap = [];
|
|
|
+ res?.data.forEach((versions) => {
|
|
|
+ resListMap.push({
|
|
|
+ label: versions.bomVersion,
|
|
|
+ value: versions.bomVersion,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ option?.value?.column?.forEach((col) => {
|
|
|
+ if (col.label == "物料版本") {
|
|
|
+ col.dicData = resListMap;
|
|
|
+ if (resListMap.length > 0) {
|
|
|
+ commonConfig.value.params.bomVersion = resListMap[0].value;
|
|
|
+ col.value = resListMap[0].value;
|
|
|
+ console.log("col", col);
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
dataList();
|
|
|
isShowTable.value = true;
|
|
|
};
|