Commit a0cab296 authored by 覃振观's avatar 覃振观 👶

页面修改 2222

parent 7edede15
...@@ -54,6 +54,10 @@ function mapping(dataMapping, rawData) { ...@@ -54,6 +54,10 @@ function mapping(dataMapping, rawData) {
return; return;
} }
let listMap = {}, ids = [], rowId = ''; //tryForEach 变量作用域注意 let listMap = {}, ids = [], rowId = ''; //tryForEach 变量作用域注意
if(!entityData instanceof Array) {
console.error("映射配置的是 Grid, 传入数据类型是 Form。 请检查: " + beanName);
return;
}
entityData.forEach(rowData => { entityData.forEach(rowData => {
rowId = rowData[propertyNames.id]; rowId = rowData[propertyNames.id];
rowData['rowIndex'] = rowId; rowData['rowIndex'] = rowId;
......
...@@ -162,7 +162,7 @@ var dataMapping = { ...@@ -162,7 +162,7 @@ var dataMapping = {
"modulus" , "columnNum", "rowNum", "contactNum", "columnDoubleBlade", "rowDoubleBlade" "modulus" , "columnNum", "rowNum", "contactNum", "columnDoubleBlade", "rowDoubleBlade"
, "dispatchMultiple", "sheetLength", "sheetWidth", "productSheetConf" , "dispatchMultiple", "sheetLength", "sheetWidth", "productSheetConf"
], ],
frontFace: { frontFaces: {
id: "productFaceId", id: "productFaceId",
columns: [ "productFaceId", "productImage" ] columns: [ "productFaceId", "productImage" ]
}, },
...@@ -211,7 +211,7 @@ function faceGrid(elId, data) { ...@@ -211,7 +211,7 @@ function faceGrid(elId, data) {
checkbox: true, checkbox: true,
usePager: false, usePager: false,
width: "98%", width: "98%",
height: "100%", height: "98%",
onBeforeEdit : function(editParm, gg) { onBeforeEdit : function(editParm, gg) {
console.log('original run onBeforeEdit()'); console.log('original run onBeforeEdit()');
}, },
......
...@@ -105,11 +105,12 @@ public class ProductApplicationImpl implements ProductApplication { ...@@ -105,11 +105,12 @@ public class ProductApplicationImpl implements ProductApplication {
// --------------------------------- 版面查询 --------------------------------- // --------------------------------- 版面查询 ---------------------------------
if(productDetail != null) { if(productDetail != null) {
ArrayList<ProductFace> frontFaces = new ArrayList<>();
if(productDetail.getBackProductFaceId() != null) { if(productDetail.getBackProductFaceId() != null) {
ProductFace frontFace = faceRepository.findByProductFaceId(productDetail.getBackProductFaceId()); ProductFace frontFace = faceRepository.findByProductFaceId(productDetail.getBackProductFaceId());
ArrayList <ProductFaceColor> fronColors = ArrayList <ProductFaceColor> fronColors =
(ArrayList<ProductFaceColor>) faceColorRepository.findByProductFaceId(productDetail.getBackProductFaceId()); (ArrayList<ProductFaceColor>) faceColorRepository.findByProductFaceId(productDetail.getBackProductFaceId());
assemble.put("frontFace", frontFace); frontFaces.add(frontFace);
assemble.put("fronColors", fronColors == null ? new ArrayList<>() : fronColors); assemble.put("fronColors", fronColors == null ? new ArrayList<>() : fronColors);
} else { } else {
ProductFaceColor fc = new ProductFaceColor(); ProductFaceColor fc = new ProductFaceColor();
...@@ -123,7 +124,7 @@ public class ProductApplicationImpl implements ProductApplication { ...@@ -123,7 +124,7 @@ public class ProductApplicationImpl implements ProductApplication {
ProductFace backFace = faceRepository.findByProductFaceId(productDetail.getBackProductFaceId()); ProductFace backFace = faceRepository.findByProductFaceId(productDetail.getBackProductFaceId());
ArrayList <ProductFaceColor> backColors = ArrayList <ProductFaceColor> backColors =
(ArrayList<ProductFaceColor>) faceColorRepository.findByProductFaceId(productDetail.getBackProductFaceId()); (ArrayList<ProductFaceColor>) faceColorRepository.findByProductFaceId(productDetail.getBackProductFaceId());
assemble.put("backFace", backFace); frontFaces.add(backFace);
assemble.put("backColors", backColors == null ? new ArrayList<>() : backColors); assemble.put("backColors", backColors == null ? new ArrayList<>() : backColors);
} else { } else {
ProductFaceColor fc = new ProductFaceColor(); ProductFaceColor fc = new ProductFaceColor();
...@@ -133,6 +134,7 @@ public class ProductApplicationImpl implements ProductApplication { ...@@ -133,6 +134,7 @@ public class ProductApplicationImpl implements ProductApplication {
fronColors.add(fc); fronColors.add(fc);
assemble.put("backColors", fronColors); assemble.put("backColors", fronColors);
} }
assemble.put("frontFaces", frontFaces);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment