...
|
...
|
@@ -11,7 +11,7 @@ var g = new common.grid({ |
|
|
usepagesize:true,
|
|
|
parms: function () {
|
|
|
return {
|
|
|
standardId:reqParams.standardId,
|
|
|
standardId :reqParams.standardId,
|
|
|
standardName : reqParams.standardName
|
|
|
};
|
|
|
},
|
...
|
...
|
@@ -61,15 +61,11 @@ $('tbody').on('click', '.del-standardVal', function() { |
|
|
修改
|
|
|
**/
|
|
|
$(document).on('click', '.edit-class-btn', function () {
|
|
|
var item = g.rows[$(this).data("index")];
|
|
|
|
|
|
var item = g.rows[$(this).data("index")];
|
|
|
|
|
|
var standardVal = {
|
|
|
id: item.id,
|
|
|
|
|
|
parameterValue: item.parameterValue,
|
|
|
orderBy: item.orderBy,
|
|
|
sortName: sortName,
|
|
|
id: item.id,
|
|
|
parameterValue: item.parameterValue
|
|
|
};
|
|
|
common.dialog.confirm("修改参数",
|
|
|
common.util.__template2($("#edit-template").html(),standardVal)
|
...
|
...
|
@@ -79,18 +75,13 @@ $(document).on('click', '.edit-class-btn', function () { |
|
|
data: (function () {
|
|
|
var input = $('#parameterValue').val();
|
|
|
if (input === '' || $.trim(input) === ''){
|
|
|
return "参数名称不能为空";
|
|
|
}
|
|
|
var orderBy = $('#orderBy').val();
|
|
|
if (orderBy < 0)
|
|
|
{
|
|
|
return "排序不能为负数";
|
|
|
return "参数值不能为空";
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
id: item.id,
|
|
|
parameterValue: $("#parameterValue").val(),
|
|
|
orderBy: $("#orderBy").val(),
|
|
|
sortId: $("#sortId").val()
|
|
|
parameterValue: $("#parameterValue").val(),
|
|
|
standardId: $("#standardId").val()
|
|
|
};
|
|
|
})()
|
|
|
}, function () {
|
...
|
...
|
@@ -103,15 +94,11 @@ $(document).on('click', '.edit-class-btn', function () { |
|
|
**/
|
|
|
$(document).on('click', '#add-btn', function () {
|
|
|
var item = g.rows[$(this).data("index")];
|
|
|
var sortName=appendAllSortName(getAllSortName());
|
|
|
|
|
|
var smallSortId = tabTree.selected[2] ? tabTree.selected[2].id : "";
|
|
|
|
|
|
var standardVal = {
|
|
|
sortId: smallSortId,
|
|
|
parameterValue: common.util.__input("parameterValue"),
|
|
|
orderBy: common.util.__input("orderBy"),
|
|
|
sortName: sortName,
|
|
|
id: item.id,
|
|
|
parameterValue: common.util.__input("parameterValue")
|
|
|
};
|
|
|
common.dialog.confirm("新增参数类别",
|
|
|
common.util.__template2($("#edit-template").html(),standardVal),
|
...
|
...
|
@@ -119,27 +106,17 @@ $(document).on('click', '#add-btn', function () { |
|
|
common.util.__ajax({
|
|
|
url: '/erpproduct/standardVal/add',
|
|
|
data: (function () {
|
|
|
|
|
|
if(smallSortId === 'undefined' || smallSortId <= 0 || smallSortId === null){
|
|
|
//common.util.__tip("请选择分类", "warning");
|
|
|
return "请选择分类";
|
|
|
}
|
|
|
|
|
|
var parameterValue = $('#parameterValue').val();
|
|
|
if (parameterValue === '' || $.trim(parameterValue) === '')
|
|
|
{
|
|
|
//common.util.__tip("参数类别名称不能为空", "warning");
|
|
|
return "参数类别名称不能为空";
|
|
|
}
|
|
|
var orderBy = $('#orderBy').val();
|
|
|
if (orderBy < 0)
|
|
|
{
|
|
|
//common.util.__tip("排序不能为负数", "warning");
|
|
|
return "排序不能为负数";
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
sortId: smallSortId,
|
|
|
parameterValue: $("#parameterValue").val(),
|
|
|
orderBy: $("#orderBy").val()
|
|
|
standardId: reqParams.standardId,
|
|
|
parameterValue: $("#parameterValue").val()
|
|
|
};
|
|
|
})()
|
|
|
}, function () {
|
...
|
...
|
@@ -151,7 +128,7 @@ $(document).on('click', '#add-btn', function () { |
|
|
ajax: 'queryStortType',
|
|
|
hash: true,
|
|
|
params:function(){
|
|
|
return {sortId: smallSortId};
|
|
|
return {standardId : reqParams.standardId};
|
|
|
}
|
|
|
});
|
|
|
});
|
...
|
...
|
@@ -162,8 +139,8 @@ var GetRequestParams = function() { |
|
|
if (url.indexOf("?") != -1) {
|
|
|
var str = url.substr(1);
|
|
|
strs = str.split("&");
|
|
|
for(var i = 0; i < strs.length; i ++) {
|
|
|
theRequest[strs[i].split("=")[0]] =unescape(strs[i].split("=")[1]);
|
|
|
for(var i = 0; i < strs.length; i ++) {
|
|
|
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
|
|
|
}
|
|
|
}
|
|
|
return theRequest;
|
...
|
...
|
|