This repository has been archived on 2026-06-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
EDT/admin/client_winqx.htm
wsh5485 7e47ce238b chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
2025-06-15 13:04:37 +08:00

218 lines
6.1 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>区域经理权限-e订通后台</title>
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css">
<link rel="stylesheet" href="index.css">
<style>
table.mytable {
font-family: verdana,arial,sans-serif;
font-size:11px;
color:#333333;
border-width: 1px;
border-color: #e2e2e2;
border-collapse: collapse;
}
table.mytable th {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #e2e2e2;
background-color: #f2f2f2;
}
table.mytable td {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #e2e2e2;
background-color: #ffffff;
}
</style>
<!-- ztree -->
<link rel="stylesheet" href="js/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script src="js/autocomplete/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/ztree/js/jquery.ztree.core-3.2.js"></script>
<script type="text/javascript" src="js/ztree/js/jquery.ztree.excheck-3.2.js"></script>
<!-- /ztree -->
<script src="layuiadmin/layui/layui.js"></script>
<script src="js/function.js"></script>
</head>
<body>
<form class="layui-form">
<input type="hidden" id="id" name="id" value=0>
<input type="hidden" name="str_path" value="" id="str_path">
<input type="hidden" name="str_path_real" value="" id="str_path_real">
<div style="padding:10px;">
<div class="layui-row">
<div class="layui-form-item">
<label class="layui-form-label">区域经理</label>
<div class="layui-input-block" style="height:38px;line-height:38px;" id="div_title"></div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<label class="layui-form-label">数据权限</label>
<div class="layui-input-block">
<ul id="ztree" class="ztree"></ul>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<label class="layui-form-label">操作权限</label>
<div class="layui-input-block">
<table>
<tr>
<td>允许确认:</td>
<td>
<input type="radio" name="qyjl_confirm" value="y" title="是">
<input type="radio" name="qyjl_confirm" value="n" title="否">
</td>
</tr>
<tr>
<td>订货权限:</td>
<td>
<input type="radio" name="qyjl_order" value="y" title="多店订货">
<input type="radio" name="qyjl_order" value="b" title="备货">
<input type="radio" name="qyjl_order" value="n" title="不订货">
</td>
</tr>
<tr>
<td>允许管理客户:</td>
<td>
<input type="radio" name="qyjl_mod_dp" value="y" title="是">
<input type="radio" name="qyjl_mod_dp" value="n" title="否">
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">&nbsp;</label>
<div class="layui-input-inline" style="width:200px"><button id="form1_submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="form1_submit" style="font-weight:bold;width:200px;"> 保 存 </button></div>
</div>
</div>
</form>
<script>
var obj1=$.fn.zTree;
layui.use(['form', 'layer'], function(){
var form = layui.form
,layer = layui.layer
,$ = layui.jquery;
//取得url传递参数
var cid=get_url_param("id");
$.ajax(
{
url:"./?_m=client&_a=getzNodes&id="+cid,
contentType: "application/json",
method: 'POST',
success: function (res) {
var res=$.parseJSON(res);
$("#div_title").html(res.title);
//console.log(res.data);
var zNodes =res.data;
var setting = {
check: {
enable: true,
nocheckInherit: true
},
data: {
simpleData: {
enable: true
}
}
};
obj1.init($("#ztree"), setting, zNodes);
$("input[name='qyjl_confirm']").each(function(index, element) {
            if($(this).val()==res.qyjl_confirm){
$(this).prop("checked",true);
}       
});
$("input[name='qyjl_order']").each(function(index, element) {
            if($(this).val()==res.qyjl_order){
$(this).prop("checked",true);
}       
});
$("input[name='qyjl_mod_dp']").each(function(index, element) {
            if($(this).val()==res.qyjl_mod_dp){
$(this).prop("checked",true);
}       
});
$("#id").attr("value", cid);
$("#str_path").html(res.str_path_real);
$("#str_path_real").html(res.str_path_real);
form.render();
},
error: function () {
layui.layer.msg("与服务器通信失败!");
}
});
//提交
form.on("submit(form1_submit)",function(data){
//弹出loading
var index = layer.msg('数据提交中,请稍候',{icon: 16,time:false,shade:0.8});
var zTree2 = obj1.getZTreeObj("ztree");
var nodes2 = zTree2.getCheckedNodes(true);
var str2=str_real2="";
for (var i = 0; i < nodes2.length; i++) {
if(nodes2[i].getCheckStatus().half || nodes2[i].getCheckStatus().checked)
str2+=nodes2[i].abspath+",";
if(nodes2[i].getCheckStatus().checked)
str_real2+=nodes2[i].abspath+",";
}
if(str2)
str2=str2.substring(0,str2.length-1);
if(str_real2)
str_real2=str_real2.substring(0,str_real2.length-1);
var rdo1=$('input[name="qyjl_confirm"]:checked').val();
var rdo2=$('input[name="qyjl_order"]:checked').val();
var rdo3=$('input[name="qyjl_mod_dp"]:checked').val();
//提交
var url="./?_m=client&_a=save_set_priv_2";
var post_data=data.field;
//alert(JSON.stringify(post_data));
$.ajax({
url:url,
contentType: "application/json",
method: 'GET',
data:{"id":$("#id").val(),"str_path":str2,"str_path_real":str_real2,"qyjl_confirm":rdo1,"qyjl_order":rdo2,"qyjl_mod_dp":rdo3},
success: function (res) {
//alert(res);//调试模式
//layer.close(index);//调试模式
var json_data=$.parseJSON(res);
if(json_data.code==1){
layer.close(index);
layer.msg("保存成功!");
parent.layer.closeAll("iframe");
}else{
layer.close(index);
//保存失败
layer.msg("保存失败!("+json_data.msg+")");
}
}
})
return false;
})
});
</script>
</body>
</html>