Commit 08074efd authored by 覃振观's avatar 覃振观 👶

23-12-15: 下班前提交

parent 5dfc4510
...@@ -46,7 +46,9 @@ function faceGrid(elId, data) { ...@@ -46,7 +46,9 @@ function faceGrid(elId, data) {
type: 'text', type: 'text',
required: true required: true
}}, }},
{ display: "油墨覆盖率(%)", name: "coverageRate", width: 120, minWidth: 60, type: "string", align: "left", editor: { type: 'text', required: true } } { display: "油墨覆盖率(%)", name: "coverageRate", width: 120, minWidth: 60, type: "string", align: "left", editor: { type: 'text', required: true } },
{ name: "colorId", hide: true },
{ name: "colorId" }
], ],
toolbar: toolbarOptions, toolbar: toolbarOptions,
dataType: "local", dataType: "local",
...@@ -58,7 +60,9 @@ function faceGrid(elId, data) { ...@@ -58,7 +60,9 @@ function faceGrid(elId, data) {
height: 150, height: 150,
onAfterEdit: function(editParm) { onAfterEdit: function(editParm) {
// 后备方案: 表格遍历完成时 // 后备方案: 表格遍历完成时
debugger; },
onBeforeEdit : function(editParm) {
console.log('original run onBeforeEdit()');
}, },
onDblClickRow : function(data, rowindex, rowobj) { onDblClickRow : function(data, rowindex, rowobj) {
...@@ -107,16 +111,19 @@ function loadDataTest() { ...@@ -107,16 +111,19 @@ function loadDataTest() {
$('#submitForm').formSet(showData); $('#submitForm').formSet(showData);
var fronData = {}; var fronData = {};
fronData.Rows = data.rawData.fronColors; fronData.Rows = data.rawData.fronColors;
faceGrid("#frontFaceGrid", fronData); faceGrid("#fronColorsGrid", fronData);
fronData.Rows = data.backColors; fronData.Rows = data.backColors;
faceGrid("#backFaceGrid", fronData); faceGrid("#backColorsGrid", fronData);
inputEventListener(); inputEventListener();
}); });
} }
// 数据映射配置 // 数据映射配置
// alias 必须唯一.这里不再要求所有对象的属性名唯一 { property : alias } // Form: 映射数据格式为elementName(alias): { objName: property }
// 未设 alias 情况同 { property : property } // alias必须唯一.这里不再要求所有对象的属性名唯一 { property : alias }
// Form 映射数据格式为: elementName(alias): { objName: property } // 未设 alias 情况同 { property : property }
// Grid: 需要监听 Grid Data 时,必须设置 唯一 id 列。
// 匹配规则 elementId.indexOf( dataMapping.ArrayKey )
// 即当前页面 ‘fronColorsGrid’.indexOf('fronColors')
var dataMapping = { var dataMapping = {
Product: [ Product: [
"productId" "productId"
...@@ -136,9 +143,11 @@ var dataMapping = { ...@@ -136,9 +143,11 @@ var dataMapping = {
"rowNum" "rowNum"
, "modulus" , "modulus"
], ],
fronColors: [ fronColors: {
[ "productFaceColorId", "coverageRate" ] id: "productFaceColorId",
] columns: [ "productFaceColorId", "coverageRate" ]
}
} }
......
...@@ -87,11 +87,11 @@ ...@@ -87,11 +87,11 @@
<div id="layout" style="height: 280px; display: contents;"> <div id="layout" style="height: 280px; display: contents;">
<div position="left" title="正面颜色" > <div position="left" title="正面颜色" >
<div id="frontFaceGrid" style="margin: 2px;"></div> <div id="fronColorsGrid" style="margin: 2px;"></div>
</div> </div>
<div position="right" title="反面颜色"> <div position="right" title="反面颜色">
<div id="backFaceGrid" style="margin: 2px;"></div> <div id="backColorsGrid" style="margin: 2px;"></div>
</div> </div>
</div> </div>
......
...@@ -113,6 +113,7 @@ public class ProductApplicationImpl implements ProductApplication { ...@@ -113,6 +113,7 @@ public class ProductApplicationImpl implements ProductApplication {
} else { } else {
ProductFaceColor fc = new ProductFaceColor(); ProductFaceColor fc = new ProductFaceColor();
fc.setProductFaceColorId(111L); fc.setProductFaceColorId(111L);
fc.setColorId(1L);
ArrayList<ProductFaceColor> fronColors = new ArrayList<>(); ArrayList<ProductFaceColor> fronColors = new ArrayList<>();
fronColors.add(fc); fronColors.add(fc);
assemble.put("fronColors", fronColors); assemble.put("fronColors", fronColors);
......
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