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

23-12-15: 下班前提交

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