...
|
...
|
@@ -50,12 +50,12 @@ var g = new common.grid({ |
|
|
render: function(items) {
|
|
|
var HtmArr = [];
|
|
|
HtmArr.push('<a data-index="'+ items.__index+ '" href="JavaScript:;" class="btn btn-info btn-xs edit-class-btn">编辑</a>');
|
|
|
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-danger btn-xs del-standard">删除</a>');
|
|
|
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-danger btn-xs del-standardSort">删除</a>');
|
|
|
return HtmArr.join('');
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
g.init("/erpproduct/prodcutparm/list");
|
|
|
g.init("/erpproduct/standardSort/list");
|
|
|
|
|
|
//筛选
|
|
|
$("#filter-btn").click(function () {
|
...
|
...
|
@@ -63,11 +63,11 @@ $("#filter-btn").click(function () { |
|
|
});
|
|
|
|
|
|
//删除
|
|
|
$('tbody').on('click', '.del-standard', function() {
|
|
|
$('tbody').on('click', '.del-standardSort', function() {
|
|
|
var item=g.rows[$(this).data("index")];
|
|
|
common.dialog.confirm("温馨提示", "你确定要删除吗?", function () {
|
|
|
common.util.__ajax({
|
|
|
url:'/erpproduct/standard/del',
|
|
|
url:'/erpproduct/standardSort/del',
|
|
|
data:{id:item.id}
|
|
|
},function(){
|
|
|
g.reload();
|
...
|
...
|
@@ -108,21 +108,25 @@ $(document).on('click', '.edit-class-btn', function () { |
|
|
if(tabTree.selected[2]){
|
|
|
sortName=sortName+tabTree.selected[2].sortName;
|
|
|
}
|
|
|
var standardSort = {
|
|
|
id: item.id,
|
|
|
sortId: item.sortId,
|
|
|
standardName: item.standardSortName,
|
|
|
orderBy: item.orderBy
|
|
|
};
|
|
|
common.dialog.confirm("修改参数",
|
|
|
common.util.__template($("#template").html(),
|
|
|
{id: item.id, standardName: item.standardName,
|
|
|
orderBy:item.orderBy, stortTypeName:sortName,stortTypeId:item.standardSort.standardSortName})
|
|
|
common.util.__template($("#template").html(),standardSort)
|
|
|
, function () {
|
|
|
common.util.__ajax({
|
|
|
url: '/erpproduct/standard/update',
|
|
|
url: '/erpproduct/standardSort/update',
|
|
|
data: (function () {
|
|
|
var input = $('#standardName').val();
|
|
|
var input = $('#standardSortName').val();
|
|
|
if (input === '' || $.trim(input) === '')return "参数名称不能为空";
|
|
|
return {
|
|
|
id: item.id,
|
|
|
standardName: $("#standardName").val(),
|
|
|
standardSortName: $("#standardSortName").val(),
|
|
|
orderBy: $("#orderBy").val(),
|
|
|
standardSortId:$("#stortTypeId").val()
|
|
|
sortId: $("#sortId").val()
|
|
|
};
|
|
|
})()
|
|
|
}, function () {
|
...
|
...
|
|