diff --git a/src/views/materia/all.vue b/src/views/materia/all.vue
index f83ccbd..bfb6d18 100644
--- a/src/views/materia/all.vue
+++ b/src/views/materia/all.vue
@@ -46,7 +46,7 @@
进行中
已完成
-
+
视图
@@ -70,7 +70,6 @@
watch
} from "vue";
import {
- getBasicList,
getPageList
} from "/src/api/api/common";
import AddMateria from '../materia/components/AddMateria.vue';
diff --git a/src/views/materia/components/EditView.vue b/src/views/materia/components/EditView.vue
index 21b56c8..76715f6 100644
--- a/src/views/materia/components/EditView.vue
+++ b/src/views/materia/components/EditView.vue
@@ -322,13 +322,13 @@ export default {
let info = _data.infos.find(s => s.FDataID == item.FMaterialID) || null;
- if (info != null) {
- col7.forEach((col) => {
- item[col.key] = info[col.key] || item[col.key] || "";
- });
- }
- item.FTypeID1 = (item.FTypeID1 == 0 || item.FTypeID1 == -1) ? "" : item.FTypeID1;
- item.FTypeID2 = (item.FTypeID2 == 0 || item.FTypeID2 == -1) ? "" : item.FTypeID2;
+ // if (info != null) {
+ // col7.forEach((col) => {
+ // item[col.key] = info[col.key] || item[col.key] || "";
+ // });
+ // }
+ // item.FTypeID1 = (item.FTypeID1 == 0 || item.FTypeID1 == -1) ? 0 : item.FTypeID1;
+ // item.FTypeID2 = (item.FTypeID2 == 0 || item.FTypeID2 == -1) ? 0 : item.FTypeID2;
});
@@ -543,18 +543,27 @@ export default {
return false;
}
- // let keys = Object.keys(this.materialInfoList.Data[0])
- // dataObj["TFS_MaterialInfo"] = {};
+ let keys = Object.keys(this.materialInfoList.Data[0])
+ dataObj["TFS_MaterialInfo"] = {};
+
+ // 根据row设置MaterialInfo的值
+ keys.forEach(key => {
+ if (key in row && key != "FID") {
+ dataObj["TFS_MaterialInfo"][key] = row[key]
+ }
+ })
- // // 根据row设置MaterialInfo的值
- // keys.forEach(key => {
- // if (key in row && key != "FID") {
- // dataObj["TFS_MaterialInfo"][key] = row[key]
- // }
- // })
+ dataObj["TFS_MaterialInfo"].FMaterialID = row["FMaterialID"]
+ dataObj["TFS_MaterialInfo"].FType2 = row["FTypeID2"];
- // dataObj["TFS_MaterialInfo"].FMaterialID = row["FMaterialID"]
- // dataObj["TFS_MaterialInfo"].FType2 = row["FTypeID2"];
+ dataObj["TFS_Material"] = {};
+ dataObj["TFS_Material"].FMaterialID = row["FMaterialID"]
+ dataObj["TFS_Material"].FCode = row["FBaseMaterialCode"]
+ dataObj["TFS_Material"].FType = row["FMRP1ProductType"];
+
+ dataObj["TFS_ViewMaterial"] = {};
+ dataObj["TFS_ViewMaterial"].FMaterialID = row["FMaterialID"]
+ dataObj["TFS_ViewMaterial"].FBaseMaterialCode = row["FBaseMaterialCode"]
for (let col of this.editColumn) {
let valTemp = row[col.key];
@@ -566,6 +575,7 @@ export default {
if (col.table == "TFS_ViewMaterial") {
dataObj[col.table].FMRP1ProductType = row["FMRP1ProductType"];
dataObj[col.table].FTypeID2 = row["FTypeID2"];
+ dataObj[col.table].FBaseMaterialCode = row["FBaseMaterialCode"]
}
if (col.table == "TFS_MaterialInfo") {
@@ -573,12 +583,14 @@ export default {
dataObj[col.table].FTypeID1 = row["FTypeID1"];
dataObj[col.table].FTypeID2 = row["FTypeID2"];
dataObj[col.table].FType2 = row["FTypeID2"];
+ dataObj[col.table].FBaseMaterialCode = row["FBaseMaterialCode"]
}
if (col.table == "TFS_Material") {
dataObj[col.table].FTypeID1 = row["FTypeID1"];
dataObj[col.table].FTypeID2 = row["FTypeID2"];
dataObj[col.table].FType = row["FMRP1ProductType"];
+ dataObj[col.table].FCode = row["FBaseMaterialCode"]
}
}
dataObj[col.table][col.key] = valTemp;
@@ -593,17 +605,21 @@ export default {
if (!dataObj["TFS_ViewMaterial"]) {
dataObj["TFS_ViewMaterial"] = {};
- dataObj["TFS_ViewMaterial"].FMaterialID = row["FMaterialID"];
- dataObj["TFS_ViewMaterial"].FMRP1ProductType = row["FMRP1ProductType"];
- dataObj["TFS_ViewMaterial"].FTypeID2 = row["FTypeID2"];
}
+ dataObj["TFS_ViewMaterial"].FMaterialID = row["FMaterialID"];
+ dataObj["TFS_ViewMaterial"].FMRP1ProductType = row["FMRP1ProductType"];
+ dataObj["TFS_ViewMaterial"].FTypeID2 = row["FTypeID2"];
+ dataObj["TFS_ViewMaterial"].FBaseMaterialCode = row["FBaseMaterialCode"]
+
for (let key in dataObj) {
if (!updateObj[key]) updateObj[key] = [];
updateObj[key].push(dataObj[key]);
}
});
+ updateObj.FTaskType = this.dataInfoObj.FType
+
if (!allTypeSelected) {
return false;
}