|
@@ -88,6 +88,7 @@ import {
|
|
addBatch,
|
|
addBatch,
|
|
addEsopBatch,
|
|
addEsopBatch,
|
|
addCheckBatch,
|
|
addCheckBatch,
|
|
|
|
+ addFuliao,
|
|
} from "@/api/craft/process/index";
|
|
} from "@/api/craft/process/index";
|
|
import SingleUpload from "@/components/Upload/SingleUpload.vue";
|
|
import SingleUpload from "@/components/Upload/SingleUpload.vue";
|
|
|
|
|
|
@@ -226,6 +227,18 @@ const startCreat = () => {
|
|
reserveSelection: true,
|
|
reserveSelection: true,
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
+ } else if (props.tableType === "fuliaoCJ") {
|
|
|
|
+ commonTableType.value = "FULIAO_CAIJI";
|
|
|
|
+
|
|
|
|
+ nextTick(() => {
|
|
|
|
+ commonTableRef.value?.startSelect({
|
|
|
|
+ accessoriesProperty: "2", //默认直接查所有的部件辅料)
|
|
|
|
+ });
|
|
|
|
+ commonTableRef.value?.mergeOption({
|
|
|
|
+ selection: true,
|
|
|
|
+ reserveSelection: true,
|
|
|
|
+ });
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
crudRef.value && crudRef.value.rowAdd();
|
|
crudRef.value && crudRef.value.rowAdd();
|
|
}
|
|
}
|
|
@@ -257,6 +270,7 @@ const esopList = ref([]);
|
|
const checkItem = ref({});
|
|
const checkItem = ref({});
|
|
const checkList = ref([]);
|
|
const checkList = ref([]);
|
|
const onSelectedFinish = (itemValue) => {
|
|
const onSelectedFinish = (itemValue) => {
|
|
|
|
+ console.log(itemValue);
|
|
if (Object.keys(itemValue).length == 0) {
|
|
if (Object.keys(itemValue).length == 0) {
|
|
ElMessage.error("请选择数据,数据不能为空!");
|
|
ElMessage.error("请选择数据,数据不能为空!");
|
|
}
|
|
}
|
|
@@ -357,6 +371,36 @@ const onSelectedFinish = (itemValue) => {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ } else if (props.tableType === "fuliaoCJ") {
|
|
|
|
+ itemValue?.forEach((item, index) => {
|
|
|
|
+ const recordItem = ref({});
|
|
|
|
+ recordItem.value.itemName = item.materialName;
|
|
|
|
+ recordItem.value.itemCode = item.materialCode;
|
|
|
|
+ recordItem.value.itemModel = item.spec;
|
|
|
|
+ recordItem.value.recordVersion = item.bomVersion;
|
|
|
|
+ recordItem.value.num = item.materialNumber;
|
|
|
|
+ recordItem.value.traceType = "S";
|
|
|
|
+ recordItem.value.operationId = route.params.id;
|
|
|
|
+ recordItem.value.unit = item.unit;
|
|
|
|
+ recordItem.value.isTrace = 1;
|
|
|
|
+ itemRecordList.value.push(recordItem.value);
|
|
|
|
+ });
|
|
|
|
+ itemRecord.value.operationId = route.params.id;
|
|
|
|
+ itemRecord.value.itemList = Array.from(itemRecordList.value);
|
|
|
|
+ addFuliao(itemRecord.value).then((data) => {
|
|
|
|
+ if (data.code == "200") {
|
|
|
|
+ dataList();
|
|
|
|
+ ElMessage({
|
|
|
|
+ message: data.msg,
|
|
|
|
+ type: "success",
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ ElMessage({
|
|
|
|
+ message: data.msg,
|
|
|
|
+ type: "error",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|