Commit 682c4f95 authored by wanghang's avatar wanghang

Merge remote-tracking branch 'origin/dev' into dev

parents 5841f10a c4e33132
...@@ -473,7 +473,7 @@ function listeningGrid(elId, options) { ...@@ -473,7 +473,7 @@ function listeningGrid(elId, options) {
} }
/** /**
* 监听 input 管理页面显示的 Data。 * 监听 input 管理页面显示的 Data。需要在控件初始化完成后调用
*/ */
function inputEventListener() { function inputEventListener() {
const inputElements = document.querySelectorAll('input'); const inputElements = document.querySelectorAll('input');
......
...@@ -5,7 +5,6 @@ $(document).ready(function() { ...@@ -5,7 +5,6 @@ $(document).ready(function() {
loadCodeRuleListGrid(); loadCodeRuleListGrid();
}); });
function initializateUI() { function initializateUI() {
//UICtrl.layout("#layout", {leftWidth: 3});
UICtrl.layout("#layout",{leftWidth: 50}); UICtrl.layout("#layout",{leftWidth: 50});
} }
......
...@@ -17,6 +17,13 @@ ...@@ -17,6 +17,13 @@
<x:script src='/biz/topsun/product/product.js'/> <x:script src='/biz/topsun/product/product.js'/>
</head> </head>
<body> <body>
<div position="center" title="产品管理">
<div id="productListGrid" style="margin: 2px;"></div>
</div>
</body>
</html>
<%-- <div position="top">--%> <%-- <div position="top">--%>
<%-- <form class="hg-form" method="post" action="" id="submitForm">--%> <%-- <form class="hg-form" method="post" action="" id="submitForm">--%>
<%-- <div class="hg-form-cols">--%> <%-- <div class="hg-form-cols">--%>
...@@ -38,9 +45,3 @@ ...@@ -38,9 +45,3 @@
<%-- <div class="clearfix"></div>--%> <%-- <div class="clearfix"></div>--%>
<%-- </form>--%> <%-- </form>--%>
<%-- </div>--%> <%-- </div>--%>
<div position="center" title="产品管理">
<div id="productListGrid" style="margin: 2px;"></div>
</div>
</body>
</html>
$(document).ready(function() { $(document).ready(function() {
loadDataTest(); loadData();
initializeUI(); initializeUI();
initializeToobarContainer(); initializeToobarContainer();
initializeTab(); initializeTab();
...@@ -126,16 +126,17 @@ function initializeToobarContainer(){ ...@@ -126,16 +126,17 @@ function initializeToobarContainer(){
$('#toolBar').data('dropup',true).removeClass('job-button-fixed-top').addClass('job-button-fixed-bottom'); $('#toolBar').data('dropup',true).removeClass('job-button-fixed-top').addClass('job-button-fixed-bottom');
} }
function loadDataTest() { function loadData() {
console.log("loadData") console.log("loadData")
var params = new URLSearchParams(document.location.search); var params = new URLSearchParams(document.location.search);
Public.ajax(web_app.name + "/product/loadProductDetail.ajax", { Public.ajax(web_app.name + "/product/loadProductDetail.ajax", {
data: params.get("data") data: params.get("data")
}, function (data) { }, function (data) {
var showData = buildMapping(dataMapping, data.rawData); let showData = buildMapping(dataMapping, data.rawData);
$('#submitForm').formSet(showData); $('#submitForm').formSet(showData);
var fronData = {};
if(window.dataSet.isInsert) { if(window.dataSet.isInsert) {
// Grid 使用 Local 模式,data 不能为 undefined
data.rawData = {}; data.rawData = {};
data.rawData.fronColors = {}; data.rawData.fronColors = {};
data.rawData.backColors = {}; data.rawData.backColors = {};
...@@ -144,11 +145,11 @@ function loadDataTest() { ...@@ -144,11 +145,11 @@ function loadDataTest() {
faceGrid("#fronColorsGrid", data.rawData.fronColors); faceGrid("#fronColorsGrid", data.rawData.fronColors);
faceGrid("#backColorsGrid", data.rawData.backColors); faceGrid("#backColorsGrid", data.rawData.backColors);
processedGrid('#processedGrid', data.rawData.processed); processedGrid('#processedGrid', data.rawData.processed);
debugger;
productLossGrid('#productLossGrid', data.rawData.productLoss); productLossGrid('#productLossGrid', data.rawData.productLoss);
inputEventListener(); inputEventListener();
}); });
} }
// 数据映射配置 // 数据映射配置
// Form: 映射数据格式为elementName(alias): { objName: property } // Form: 映射数据格式为elementName(alias): { objName: property }
// alias必须唯一.这里不再要求所有对象的属性名唯一 { property : alias } // alias必须唯一.这里不再要求所有对象的属性名唯一 { property : alias }
......
...@@ -213,8 +213,8 @@ public class ProductApplicationImpl extends BaseApplication implements ProductAp ...@@ -213,8 +213,8 @@ public class ProductApplicationImpl extends BaseApplication implements ProductAp
entityManager.flush(); entityManager.flush();
String str = null; // String str = null;
str.length(); // str.length();
HashMap<String, Object> map = new HashMap<>(5); HashMap<String, Object> map = new HashMap<>(5);
map.put("save", "ok"); map.put("save", "ok");
......
...@@ -60,12 +60,6 @@ public class ProductController extends CommonController { ...@@ -60,12 +60,6 @@ public class ProductController extends CommonController {
} }
public String forwardProduct() { public String forwardProduct() {
// 通过此方法可以查看系统配置的 字典 的数据结构
DictUtil.getDictionaryList("technologyType");
Map<String, Object> map4 = new HashMap<>(10);
map4.put("六六六", "666");
map4.put("七七七", "777");
map4.put("八八八", "888");
return forward("product"); return forward("product");
} }
...@@ -132,3 +126,10 @@ public class ProductController extends CommonController { ...@@ -132,3 +126,10 @@ public class ProductController extends CommonController {
} }
} }
//// 通过此方法可以查看系统配置的 字典 的数据结构
// DictUtil.getDictionaryList("technologyType");
// Map<String, Object> map4 = new HashMap<>(10);
// map4.put("六六六", "666");
// map4.put("七七七", "777");
// map4.put("八八八", "888");
\ No newline at end of file
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