You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
405 lines
14 KiB
Plaintext
405 lines
14 KiB
Plaintext
2 months ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DD_OrderAuth.aspx.cs" Inherits="TradeManageNew.DingDan.DD_OrderAuth" %>
|
||
|
|
||
|
<!DOCTYPE html>
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="referrer" content="no-referrer"/>
|
||
|
<title>申请SKU</title>
|
||
|
<link rel="stylesheet" type="text/css" href="../css2/icon.css"/>
|
||
|
<link rel="stylesheet" type="text/css" href="../css2/DataGrid.css" />
|
||
|
<link href="../css2/gray/easyui.css" rel="stylesheet" type="text/css" />
|
||
|
<link rel="stylesheet" href="../font-awesome/css/font-awesome.min.css" />
|
||
|
<link href="../css2/New.css?a=1" rel="stylesheet" type="text/css" />
|
||
|
<link rel="stylesheet" type="text/css" href="../themes/uploadify.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox/jquery.fancybox-1.3.4.css" />
|
||
|
<script src="../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/jquery.min.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/DataGrid.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/DataPager.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/Global2.js?t=1" type="text/javascript"></script>
|
||
|
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/My97DatePicker/WdatePicker.js?t=1"></script>
|
||
|
<link href="../Scripts/fancybox/jquery.fancybox-1.3.4.css" rel="stylesheet" />
|
||
|
<script src="../Scripts/fancybox/jquery.fancybox-1.3.4.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/MaskedTextBox.js?t=1" type="text/javascript"></script>
|
||
|
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
|
||
|
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
var name = "<%=Session["Name"]%>";
|
||
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
||
|
var UserId = "<%=Session["UserId"]%>";
|
||
|
var WindowLoadModel = new WindowLoad();
|
||
|
var Model = null;
|
||
|
$(document).ready(function () {
|
||
|
WindowLoadModel.ApplicationPath = "../";
|
||
|
WindowLoadModel.Load();
|
||
|
ajaxInit(WindowLoadModel);
|
||
|
newId = 0;
|
||
|
|
||
|
//设置下拉框的查询
|
||
|
GetYYUser();
|
||
|
$('.your-select-class').select2({
|
||
|
dropdownParent: $('#MainTable'), // 确保这是模态窗口的正确容器
|
||
|
maximumHeight: 50,
|
||
|
});
|
||
|
|
||
|
CreateDataGrid();
|
||
|
ReadData(true);
|
||
|
//查询
|
||
|
$("#btn_sch").bind("click", function () {
|
||
|
ReadData(true);
|
||
|
});
|
||
|
//查询
|
||
|
$("#btn_save").bind("click", function () {
|
||
|
ShowEdit(-1);
|
||
|
});
|
||
|
//选择管理人员
|
||
|
$('#select_GroupLeader').change(function () {
|
||
|
GetYYUser2($(this).val());
|
||
|
//查看本人管理员名下的被管理者
|
||
|
GetPersonList($(this).val());
|
||
|
|
||
|
});
|
||
|
//保存
|
||
|
$("#cmdSave").bind("click", function () {
|
||
|
StartSave();
|
||
|
});
|
||
|
//返回
|
||
|
$("#cmdBack").bind("click", function () {
|
||
|
$.fancybox.close();
|
||
|
});
|
||
|
//行操作
|
||
|
$("#DataGrid1 [CommandName]").live("click", function () {
|
||
|
var CommandName = $(this).attr("CommandName");
|
||
|
var index = $(this).parentsUntil("tr").parent().attr("index");
|
||
|
Model = datagrid1.Get_Model(index);
|
||
|
debugger
|
||
|
if (CommandName == "cmdEdit") {
|
||
|
//CreateGetModel("MainTable", Model);
|
||
|
ShowEdit(Model.GroupLeaderId);
|
||
|
}
|
||
|
if (CommandName == "cmdDelete") {
|
||
|
//CreateGetModel("MainTable", Model);
|
||
|
Delete(Model.GroupLeaderId);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
});
|
||
|
//保存
|
||
|
//#region 保存
|
||
|
function StartSave() {
|
||
|
//确保填写的有值
|
||
|
if ($("#select_GroupLeader").val() == "" || $("#select_GroupLeader").val() == 0) {
|
||
|
alert("请选择管理人员");
|
||
|
return;
|
||
|
}
|
||
|
//确保填写的有值
|
||
|
if ($("#select_Person").val() == [] || $("#select_Person").val() == null) {
|
||
|
alert("请选择被管理人员");
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
//开始传值
|
||
|
var param = new Object();
|
||
|
param.GroupLeaderId = $("#select_GroupLeader").val();
|
||
|
param.UserIdList = $("#select_Person").val();
|
||
|
|
||
|
$.ajax({
|
||
|
url: "../SysManageServiceNew.asmx/Save_DDOrderAuth",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
success: function (data) {
|
||
|
if (data.d != "") {
|
||
|
alert(`保存失败,原因${data.d}`);
|
||
|
} else {
|
||
|
alert("保存成功");
|
||
|
$.fancybox.close();
|
||
|
ReadData();
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
//#endregion
|
||
|
//查询本人的管理运营人员
|
||
|
//#region 查询本人的管理运营人员
|
||
|
function GetPersonList(sUserId) {
|
||
|
if (sUserId != -1) {
|
||
|
var param = new Object();
|
||
|
param.userID = -1;
|
||
|
param.isGroupLeader = false;
|
||
|
param.groupLeaderId = sUserId;
|
||
|
$.ajax({
|
||
|
url: "../SysManageServiceNew.asmx/GetList_DDOrderAuth",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
success: function (data) {
|
||
|
debugger
|
||
|
if (data.d != null && data.d.length > 0) {
|
||
|
$('#select_Person').val(data.d.map(t => t.UserId)).trigger('change');
|
||
|
} else {
|
||
|
$('#select_Person').val();
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
} else {
|
||
|
$('#select_Person').val();
|
||
|
}
|
||
|
|
||
|
}
|
||
|
//#endregion
|
||
|
//#region 展示编辑页面
|
||
|
function ShowEdit(userid) {
|
||
|
$.fancybox({
|
||
|
'scrolling': 'no',
|
||
|
'autoScale': false,
|
||
|
'transitionIn': 'elastic',
|
||
|
'transitionOut': 'elastic',
|
||
|
'href': '#MainTable',
|
||
|
'onStart': function () {
|
||
|
if (userid != -1) {
|
||
|
$('#select_GroupLeader').val(userid).trigger('change');
|
||
|
} else {
|
||
|
$('#select_GroupLeader').val(0).trigger('change');;
|
||
|
$('#select_Person').val([]).trigger('change');
|
||
|
}
|
||
|
|
||
|
//$('#select_goodslist').val(GoodsId).trigger('change');
|
||
|
}
|
||
|
}, 0);
|
||
|
}
|
||
|
//#endregion
|
||
|
|
||
|
// 查询
|
||
|
//#region 查询
|
||
|
var YYUserList = [];
|
||
|
function GetYYUser() {
|
||
|
var param = new Object();
|
||
|
param.selectUserId = -1;
|
||
|
$.ajax({
|
||
|
url: "../SysManageServiceNew.asmx/GetUserList",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
|
||
|
var html = new Sys.StringBuilder();
|
||
|
html.append("<option value='-1'>选择</option>");
|
||
|
$(data.d).each(function () {
|
||
|
html.append("<option value='" + this.ID + "'>" + this.Name + "</option>");
|
||
|
});
|
||
|
$('#select_GroupLeader').html(html.toString());
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function GetYYUser2(sUserId) {
|
||
|
var param = new Object();
|
||
|
param.selectUserId = sUserId;
|
||
|
$.ajax({
|
||
|
url: "../SysManageServiceNew.asmx/GetUserList",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
|
||
|
var html = new Sys.StringBuilder();
|
||
|
html.append("<option value='-1'>选择</option>");
|
||
|
$(data.d).each(function () {
|
||
|
html.append("<option value='" + this.ID + "'>" + this.Name + "</option>");
|
||
|
});
|
||
|
$('#select_Person').html(html.toString());
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
//#endregion
|
||
|
// 编辑
|
||
|
//#region 编辑
|
||
|
function Delete(GroupLeaderId) {
|
||
|
|
||
|
var param = new Object();
|
||
|
//param.Id = newId;
|
||
|
param.GroupLeaderId = GroupLeaderId;
|
||
|
|
||
|
$.ajax({
|
||
|
url: "../SysManageServiceNew.asmx/Delete_DDOrderAuthByGroupLeaderId",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
if (data.d == "") {
|
||
|
alert("删除成功");
|
||
|
$.fancybox.close();
|
||
|
ReadData(false);
|
||
|
} else {
|
||
|
alert(data.d);
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
//#endregion
|
||
|
// 查询
|
||
|
//#region 查询
|
||
|
function ReadData(isAllYYUser) {
|
||
|
var param = new Object();
|
||
|
param.selectUserId = -1;
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "../SysManageServiceNew.asmx/GetList_DDOrderAuthShow",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
datagrid1.Set_RowCount(data.d.length);
|
||
|
datagrid1.DataBind(data.d);
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
//#endregion
|
||
|
|
||
|
|
||
|
// DataGrid
|
||
|
//#region 初始化DataGrid
|
||
|
function CreateDataGrid() {
|
||
|
datagrid1.Columns = [];
|
||
|
var col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "管理人员";
|
||
|
col.CellTemplate = "<span>{Bind GroupLeaderName}</span>"
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "被管理人员";
|
||
|
col.Width = "180px";
|
||
|
col.Align = "left";
|
||
|
col.CellTemplate = "<span>{Bind UserNameList}</span>"
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
|
||
|
var col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "操作";
|
||
|
col.CellTemplate = "<a>{Bind Status}</a>";
|
||
|
col.CellFormatter = function (value) {
|
||
|
var optionStr = "<input CommandName='cmdEdit' class='btnClass dgbtnEdit' type='button' value='修改'> ";
|
||
|
optionStr += "<input CommandName='cmdDelete' class='btnClass dgbtnEdit' type='button' value='删除'> ";
|
||
|
return optionStr;
|
||
|
};
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
|
||
|
datagrid1.SortExpression = "";
|
||
|
datagrid1.ViewSortDirection = "";
|
||
|
datagrid1.ShowIndexColumn = false;
|
||
|
datagrid1.AllowPaging = true;
|
||
|
datagrid1.Width = "100%";
|
||
|
datagrid1.IsFixHeader = true;
|
||
|
|
||
|
datagrid1.SelectMode = nblf.ui.SelectMode.CheckBox;
|
||
|
datagrid1.Init();
|
||
|
datagrid1.Sorting(function () {
|
||
|
ReadData(false);
|
||
|
});
|
||
|
datagrid1.add_PageIndexChanged(function () { ReadData(false); });
|
||
|
|
||
|
}
|
||
|
//#endregion
|
||
|
|
||
|
</script>
|
||
|
|
||
|
<style>
|
||
|
.td_f1 {
|
||
|
font-size: 11pt;
|
||
|
text-align: center;
|
||
|
}
|
||
|
.auto-style1 {
|
||
|
height: 34px;
|
||
|
}
|
||
|
.DataGridRowStyle:first-child img {
|
||
|
display: none;
|
||
|
}
|
||
|
.DataGridRowStyle:first-child #hwys{
|
||
|
display: none;
|
||
|
}
|
||
|
.DataGridRowStyle:first-child #yySave{
|
||
|
display: none;
|
||
|
}
|
||
|
.DataGridRowStyle:first-child #ApplyPrice{
|
||
|
display: none;
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
|
||
|
</head>
|
||
|
|
||
|
<body class="headbody">
|
||
|
|
||
|
<table class="tableAll" style="width: 100%;">
|
||
|
<tr>
|
||
|
|
||
|
<td width="100%" valign="top">
|
||
|
<table id="tb1" class="tableAll" style="width: 100%;">
|
||
|
|
||
|
<tr>
|
||
|
<td colspan="5">
|
||
|
<input id="btn_save" class="layui-btnblue" type ="button" value="添加" />
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top" colspan="7" class="auto-style1">
|
||
|
<div id="DataGrid1" class="DataGridStyle" ></div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
|
||
|
<div style="display: none;">
|
||
|
<div id="MainTable" title="编辑" style="width: 350px; height: 400px;">
|
||
|
<table class="tableAll" style="width: 100%;">
|
||
|
<tr>
|
||
|
<td class="f1" style="width: 80px;">选择管理人员</td>
|
||
|
<td align="left"><select id='select_GroupLeader' class="your-select-class"></select></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="f1" style="width: 80px;">选择被管理人员</td>
|
||
|
<td align="left"><select id='select_Person' class="your-select-class" multiple="multiple"></select></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td colspan="4" align="center">
|
||
|
<input id="cmdSave" type="button" value="保存" />
|
||
|
<input id="cmdBack" type="button" value="返回" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|