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

23-12-16: 下班前提交

parent 08074efd
......@@ -26,19 +26,25 @@ function initializeUI() {
});
}
function deleteHandler(){
DataUtil.del({
gridManager:gridManager,idFieldName:'id',
onSuccess:function(){
}
});
}
function faceGrid(elId, data) {
var toolbarOptions = UICtrl.getDefaultToolbarOptions({
addHandler: function(){
UICtrl.addGridRow(gridManager);
},
updateHandler: function(){
updateHandler();
},
aaHandler: { id: 'ccAA', text: 'Hello', img: 'fa-music', className: 'btn-gray',
click: function () {
alert('hello~!');
}
}
deleteHandler: () => {
gridManager.deleteSelectedRow();
},
});
var gridManager = listeningGrid(elId, {
columns: [
......@@ -46,9 +52,7 @@ function faceGrid(elId, data) {
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" }
{ display: "油墨覆盖率(%)", name: "coverageRate", width: 120, minWidth: 60, type: "string", align: "left", editor: { type: 'text', required: true } }
],
toolbar: toolbarOptions,
dataType: "local",
......@@ -107,13 +111,10 @@ function loadDataTest() {
data: params.get("data")
}, function (data) {
var showData = mapping(dataMapping, data.rawData);
debugger;
$('#submitForm').formSet(showData);
var fronData = {};
fronData.Rows = data.rawData.fronColors;
faceGrid("#fronColorsGrid", fronData);
fronData.Rows = data.backColors;
faceGrid("#backColorsGrid", fronData);
faceGrid("#fronColorsGrid", data.rawData.fronColors);
faceGrid("#backColorsGrid", data.rawData.backColors);
inputEventListener();
});
}
......@@ -122,8 +123,6 @@ function loadDataTest() {
// alias必须唯一.这里不再要求所有对象的属性名唯一 { property : alias }
// 未设 alias 情况同 { property : property }
// Grid: 需要监听 Grid Data 时,必须设置 唯一 id 列。
// 匹配规则 elementId.indexOf( dataMapping.ArrayKey )
// 即当前页面 ‘fronColorsGrid’.indexOf('fronColors')
var dataMapping = {
Product: [
"productId"
......
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