Commit 7570616f authored by 李苏's avatar 李苏 💬

根节点新增

parent f33e9c07
......@@ -39,6 +39,9 @@
<script>
$(function () {
/*js初始化*/
var opentype="add";
var $add=$(".toolbar-add")
var $edit=$(".toolbar-edit")
var $div=$('#bomBom');
var $datagrid=$div.find(".toolbar-table");
var $edtBomid=$div.find('input[name="bomid"]');
......@@ -182,14 +185,14 @@ $(function () {
})
}
},
messager:function () {
messager:function (e) {
var selectedRow=$datagrid.treegrid("getSelected");
if(!selectedRow){
gas.showWarning("请选择一条数据!");
return true
}
console.log(selectedRow)
if(selectedRow.bomid=="root"){
if(selectedRow.bomid=="root"&&opentype=="edit"){
gas.showWarning("无法操作根节点!");
return true
}else{
......@@ -205,6 +208,12 @@ $(function () {
}
}
};
$edit.click(function(){
opentype="edit"
})
$add.click(function(){
opentype="add"
})
$div.Holder(options);
Auxiliary.box($edtBomid,{code:'WLID',callback:function (res) {
$edtBomid.textbox("setValue",res.id);
......
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