|
@@ -76,7 +76,7 @@ const props = defineProps({
|
|
|
});
|
|
|
|
|
|
const route = useRoute();
|
|
|
-const tableConfig = getTableConfig(route.params.id);
|
|
|
+const tableConfig = getTableConfig(route.fullPath.split("/")[4]);
|
|
|
|
|
|
// 传入一个url,后面不带/
|
|
|
const { url, form, data, option, search, page, toDeleteIds, Methords, Utils } =
|
|
@@ -97,13 +97,13 @@ const startCreat = () => {
|
|
|
bomVersion.value = data.value[0].recordVersion;
|
|
|
}
|
|
|
|
|
|
- if (!route.query.prodtCode) {
|
|
|
+ if (!route.fullPath.split("/")[5]) {
|
|
|
ElMessage.error("物料编号读取错误");
|
|
|
return;
|
|
|
}
|
|
|
//根据物料编码和版本号获取对应的物料BOM
|
|
|
let bomParam = {
|
|
|
- materialCode: route.query.prodtCode,
|
|
|
+ materialCode: route.fullPath.split("/")[5],
|
|
|
};
|
|
|
getBomVersion(bomParam).then((res) => {
|
|
|
let resListMap = [];
|
|
@@ -116,7 +116,7 @@ const startCreat = () => {
|
|
|
});
|
|
|
//查询参数
|
|
|
let configParam = {};
|
|
|
- configParam.materialCode = route.query.prodtCode;
|
|
|
+ configParam.materialCode = route.fullPath.split("/")[5];
|
|
|
if (bomVersion.value) {
|
|
|
configParam.bomVersion = bomVersion.value;
|
|
|
}
|
|
@@ -143,7 +143,7 @@ const startCreat = () => {
|
|
|
commonTableType.value = "ESOP";
|
|
|
nextTick(() => {
|
|
|
commonTableRef.value?.startSelect({
|
|
|
- materialCode: route.query.prodtCode,
|
|
|
+ materialCode: route.fullPath.split("/")[5],
|
|
|
enable: 1,
|
|
|
});
|
|
|
});
|
|
@@ -207,8 +207,8 @@ const getSOAPpdf = (itemValue) => {
|
|
|
};
|
|
|
|
|
|
onMounted(() => {
|
|
|
- routeId.value = route.query.routeId;
|
|
|
- search.value.operationId = route.params.id;
|
|
|
+ routeId.value = route.fullPath.split("/")[4];
|
|
|
+ search.value.operationId = route.fullPath.split("/")[4];
|
|
|
url.value = tableConfig[props.tableType].url;
|
|
|
option.value = Object.assign(option.value, {
|
|
|
addBtn: false,
|
|
@@ -219,7 +219,7 @@ onMounted(() => {
|
|
|
});
|
|
|
dataList();
|
|
|
getRouteMaxVersion(
|
|
|
- route.query.routeId ? route.query.routeId : routeId.value
|
|
|
+ route.fullPath.split("/")[4] ? route.fullPath.split("/")[4] : routeId.value
|
|
|
).then(({ data }) => {
|
|
|
if (data) {
|
|
|
bomVersion.value = data;
|
|
@@ -230,7 +230,7 @@ onMounted(() => {
|
|
|
watch(
|
|
|
() => props.tableType,
|
|
|
() => {
|
|
|
- routeId.value = route.query.routeId;
|
|
|
+ routeId.value = route.fullPath.split("/")[4];
|
|
|
url.value = tableConfig[props.tableType].url;
|
|
|
option.value = Object.assign(option.value, {
|
|
|
addBtn: false,
|
|
@@ -241,7 +241,9 @@ watch(
|
|
|
});
|
|
|
dataList();
|
|
|
getRouteMaxVersion(
|
|
|
- route.query.routeId ? route.query.routeId : routeId.value
|
|
|
+ route.fullPath.split("/")[4]
|
|
|
+ ? route.fullPath.split("/")[4]
|
|
|
+ : routeId.value
|
|
|
).then(({ data }) => {
|
|
|
if (data) {
|
|
|
bomVersion.value = data;
|