private boolean open;
private Integer shoptype; //商户类别,商户树用到
+ private String iconSkin; //自定义图标
public boolean isOpen() {
return open;
public void setShoptype(Integer shoptype) {
this.shoptype = shoptype;
}
+
+ public String getIconSkin() {
+ return iconSkin;
+ }
+
+ public void setIconSkin(String iconSkin) {
+ this.iconSkin = iconSkin;
+ }
}
.ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.add {margin-right:2px; background-position:-144px 0; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.pIcon01_ico_open, .ztree li span.button.pIcon01_ico_close, .ztree li span.button.pIcon01_ico_docu{margin-right:2px; background: url(./img/diy/1_open.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.pIcon02_ico_open, .ztree li span.button.pIcon02_ico_close, .ztree li span.button.pIcon02_ico_docu{margin-right:2px; background: url(./img/diy/3.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
+
.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
</div>
</div>
<div class="layui-form-item">
- <label class="layui-form-label">商户类型</label>
+ <label class="layui-form-label" style="color: red;">商户类型</label>
<div class="layui-input-inline">
<select name="shoptype" id="shoptype" lay-filter="shoptype-filter" lay-verify="required">
<option value="0">商户组</option>
view: {
dblClickExpand: false,
showLine: true,
- showIcon: false,
+ showIcon: true,
selectedMulti: false,
addHoverDom: addHoverDom,
removeHoverDom: removeHoverDom
zTree.updateNode(treeNode); //修改节点
} else {
var ftreeNode = zTree.getNodeByParam("id", '' + result.shop.fshopid, null);
- zTree.addNodes(ftreeNode, {
+ var newNode = {
id: '' + result.shop.shopid,
pId: '' + result.shop.fshopid,
name: '' + result.shop.shopid + '_' + result.shop.shopname,
shoptype: result.shop.shoptype
- }); //新加树节点
+ }
+ if (result.shop.shoptype == 1) {
+ newNode["iconSkin"] = "pIcon02";
+ } else {
+ newNode["iconSkin"] = "pIcon01";
+ }
+ zTree.addNodes(ftreeNode, newNode); //新加树节点
}
layer.msg(result.msg, {icon: 1});
$("#shop-info").hide();
"shopid":"0",
"shopname": "",
"fshopid":treeNode.id,
- "shoptype":"0",
+ "shoptype":"1",
"zipcode":"",
"addr":"",
"contactman":"",