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.
276 lines
9.4 KiB
Plaintext
276 lines
9.4 KiB
Plaintext
1 month ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JC_MoneyListForTM.aspx.cs" Inherits="TradeManage.SysManage.JC_MoneyListForTM" %>
|
||
|
|
||
|
<!DOCTYPE html>
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<title>仓库设置</title>
|
||
|
<link rel="stylesheet" type="text/css" href="../themes/default/easyui.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="../themes/default/textbox.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="../themes/icon.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="../themes/New.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="../themes/DataGrid.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/DateBox.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/Global.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/jquery.url.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
|
||
|
|
||
|
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox/jquery.fancybox-1.3.4.css"
|
||
|
media="screen" />
|
||
|
<script type="text/javascript" src="../Scripts/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
|
||
|
<script type="text/javascript" src="../Scripts/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
|
||
|
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
||
|
|
||
|
var WindowLoadModel = new WindowLoad();
|
||
|
var PlatId = 1;
|
||
|
$(document).ready(function () {
|
||
|
WindowLoadModel.ApplicationPath = "../";
|
||
|
WindowLoadModel.ControlID = "WindowLoad";
|
||
|
WindowLoadModel.Isbgiframe = true;
|
||
|
WindowLoadModel.Load();
|
||
|
ajaxInit(WindowLoadModel);
|
||
|
|
||
|
GetBasePlat();
|
||
|
|
||
|
CreateDataGrid();
|
||
|
$("input[no]").live("click",function () {
|
||
|
PlatId = $("input[no]:checked").attr("no");
|
||
|
ReadData();
|
||
|
});
|
||
|
ReadData();
|
||
|
|
||
|
});
|
||
|
|
||
|
function GetBasePlat() {
|
||
|
|
||
|
|
||
|
var param = new Object();
|
||
|
param.CompanyID = 0;
|
||
|
param.KeyName = "ptlx";
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "../UserService.asmx/GetPlatBaseCode",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
|
||
|
if (data.d != null) {
|
||
|
$(data.d).each(function () {
|
||
|
if (this.SortNo==1)
|
||
|
$("#div1").append("<input no='"+this.SortNo+"' type='radio' name='m' checked='checked'/>"+this.Name);
|
||
|
else
|
||
|
$("#div1").append("<input no='" + this.SortNo + "' type='radio' name='m' />" + this.Name);
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
//#region 初始化DataGrid
|
||
|
function CreateDataGrid() {
|
||
|
|
||
|
var col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "货币名称";
|
||
|
col.CellTemplate = "<input type='text' style='width:100px' class='editTextbox'ColName='MName' value='{Bind MName}'/>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "货币代码";
|
||
|
col.CellTemplate = "<input type='text' style='width:100px' class='editTextbox' ColName='MCode' value='{Bind MCode}'/>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "货币符号";
|
||
|
col.CellTemplate = "<input type='text' style='width:100px' class='editTextbox' ColName='MLabel' value='{Bind MLabel}'/>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "当前汇率";
|
||
|
col.CellTemplate = "<input type='text' style='width:100px' min='0' max='10000000' precision='6' class='editTextbox' ColName='MRate' value='{Bind MRate}'/>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "操作";
|
||
|
col.Width = "80px";
|
||
|
col.CellTemplate = "<input onclick='DelCol(this)' class='btnClass btnClassDel' type='button' value='删除'></input>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
datagrid1.SetPageSize(50);
|
||
|
datagrid1.SetPageIndex(1);
|
||
|
datagrid1.IsFixHeader = false;
|
||
|
datagrid1.ShowIndexColumn = false;
|
||
|
datagrid1.AllowPaging = false;
|
||
|
datagrid1.Width = "100%";
|
||
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
||
|
datagrid1.Init();
|
||
|
|
||
|
|
||
|
}
|
||
|
function DelCol(obj) {
|
||
|
if (window.confirm('确定要删除吗?') == false) return;
|
||
|
var rowindex = $(obj).parent().parent().attr("index");
|
||
|
var param = new Object();
|
||
|
var model = datagrid1.Get_Model(rowindex);
|
||
|
param.Id = model.Id;
|
||
|
|
||
|
$.ajax({
|
||
|
url: "SysManageService.asmx/DeleteMoney",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
alert("删除成功");
|
||
|
|
||
|
datagrid1.Del_Row(rowindex);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
//#endregion
|
||
|
//#region 读取数据
|
||
|
function ReadData() {
|
||
|
var param = new Object();
|
||
|
param.PlatId = PlatId;
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "SysManageService.asmx/GetMoneyListForTM",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
|
||
|
datagrid1.DataBind(data.d);
|
||
|
$("#DataGrid1 input[precision]").MaskedTextBox();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function AddMoney()
|
||
|
{
|
||
|
|
||
|
datagrid1.UpdateDataSource();
|
||
|
var md = new Object();
|
||
|
md.Id = 0;
|
||
|
md.MName = "";
|
||
|
md.MCode = "";
|
||
|
md.MRate = "";
|
||
|
md.MLabel = "";
|
||
|
Array.add(datagrid1.DataSource, md);
|
||
|
datagrid1.DataBind(datagrid1.DataSource);
|
||
|
$("#DataGrid1 input[precision]").MaskedTextBox();
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
function save() {
|
||
|
|
||
|
datagrid1.UpdateDataSource();
|
||
|
var error = "";
|
||
|
$(datagrid1.DataSource).each(function (i) {
|
||
|
if (this.MName == "")
|
||
|
{
|
||
|
error+="第" + (i + 1).toString() + "行货币名称没填; ";
|
||
|
|
||
|
}
|
||
|
if (this.MCode == "") {
|
||
|
error += "第" + (i + 1).toString() + "行货币名代码没填; ";
|
||
|
|
||
|
}
|
||
|
if (this.MRate == "") {
|
||
|
error += "第" + (i + 1).toString() + "行货币汇率没填; ";
|
||
|
|
||
|
}
|
||
|
});
|
||
|
if (error != "")
|
||
|
{
|
||
|
alert(error);
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
|
||
|
var param = new Object();
|
||
|
|
||
|
param.PlatId = PlatId;
|
||
|
param.list = datagrid1.DataSource;
|
||
|
$.ajax({
|
||
|
url: "SysManageService.asmx/SaveMoneyForTM",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
|
||
|
alert("保存成功");
|
||
|
|
||
|
ReadData();
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
</script>
|
||
|
|
||
|
|
||
|
|
||
|
</head>
|
||
|
<body class="headbody">
|
||
|
<div class="title_ico">
|
||
|
货币设置
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<table id="tb1" class="tableAll" style="width:100%;" >
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td>
|
||
|
<input id="btn_add" class="btnClass btnClassAdd" type="button" value="新增货币" onclick="AddMoney();"/>
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td>
|
||
|
平台:<div id="div1"></div></td>
|
||
|
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top">
|
||
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td align="center">
|
||
|
<input id="cmdSave" type="button" value="保 存" class="btnClass btnClassSave" onclick="save();" />
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|