master
cmj 6 hours ago
parent dea08c9ea2
commit 451fa24445

@ -31457,11 +31457,11 @@ where c.SKU1=@SKU";
string tsql = @"
if @id>0
begin
Update [HT_CustomFee] set [customname]=@customname,[htdate]=@htdate,[htcode]=@htcode,[yjprice]=@yjprice,[rmbprice]=@rmbprice,[usdprice]=@usdprice,[njprice]=@njprice,[hyprice]=@hyprice,[hlrate]=@hlrate,[llrate]=@llrate,[totalrmbprice]=@totalrmbprice,[totalusdprice]=@totalusdprice,[yfprice]=@yfprice,[lxprice]=@lxprice,[inname]=@inname,[indate]=@indate,[state]=@state where id=@id
Update [HT_CustomFee] set [customname]=@customname,[htdate]=@htdate,[htcode]=@htcode,[yjprice]=@yjprice,[rmbprice]=@rmbprice,[usdprice]=@usdprice,[njprice]=@njprice,[hyprice]=@hyprice,[hlrate]=@hlrate,[llrate]=@llrate,[totalrmbprice]=@totalrmbprice,[totalusdprice]=@totalusdprice,[yfprice]=@yfprice,[lxprice]=@lxprice,[inname]=@inname,[indate]=@indate,[state]=@state,jxdate=@jxdate,feetype=@feetype,hyrmbprice=@hyrmbprice,njrmbprice=@njrmbprice,yjrate=@yjrate,yjrmbprice=@yjrmbprice where id=@id
end
else
begin
INSERT INTO [HT_CustomFee]([customname],[htdate],[htcode],[yjprice],[rmbprice],[usdprice],[njprice],[hyprice],[hlrate],[llrate],[totalrmbprice],[totalusdprice],[yfprice],[lxprice],[inname],[indate],[state])values(@customname,@htdate,@htcode,@yjprice,@rmbprice,@usdprice,@njprice,@hyprice,@hlrate,@llrate,@totalrmbprice,@totalusdprice,@yfprice,@lxprice,@inname,@indate,@state)
INSERT INTO [HT_CustomFee]([customname],[htdate],[htcode],[yjprice],[rmbprice],[usdprice],[njprice],[hyprice],[hlrate],[llrate],[totalrmbprice],[totalusdprice],[yfprice],[lxprice],[inname],[indate],[state],jxdate,feetype,yjrate,njrmbprice,hyrmbprice,yjrmbprice)values(@customname,@htdate,@htcode,@yjprice,@rmbprice,@usdprice,@njprice,@hyprice,@hlrate,@llrate,@totalrmbprice,@totalusdprice,@yfprice,@lxprice,@inname,@indate,@state,@jxdate,@feetype,@yjrate,@njrmbprice,@hyrmbprice,@yjrmbprice)
set @id=SCOPE_IDENTITY()
end
select @id";
@ -31484,6 +31484,12 @@ select @id";
db.AddInParameter(cmd, "@lxprice", DbType.Decimal, Model.lxprice);
db.AddInParameter(cmd, "@inname", DbType.String, Model.inname);
db.AddInParameter(cmd, "@indate", DbType.DateTime, Model.indate);
db.AddInParameter(cmd, "@jxdate", DbType.DateTime, Model.jxdate);
db.AddInParameter(cmd, "@feetype", DbType.Int32, Model.feetype);
db.AddInParameter(cmd, "@yjrate", DbType.Decimal, Model.yjrate);
db.AddInParameter(cmd, "@njrmbprice", DbType.Decimal, Model.njrmbprice);
db.AddInParameter(cmd, "@hyrmbprice", DbType.Decimal, Model.hyrmbprice);
db.AddInParameter(cmd, "@yjrmbprice", DbType.Decimal, Model.yjrmbprice);
db.AddInParameter(cmd, "@state", DbType.Int32, Model.state);
int a = Convert.ToInt32(db.ExecuteScalar(cmd));
return a;
@ -31538,7 +31544,7 @@ select @id";
public static List<HT_CustomFee> GetListCustomFee(string where, int PageIndex, int PageSize, string Sort, out int RowCount)
{
QueryService2 ser = new QueryService2();
ser.Tsql = "select id=cast(a.id as int),a.customname,a.htdate,a.htcode,a.yjprice,a.rmbprice,a.usdprice,a.njprice,a.hyprice,a.hlrate,a.llrate,a.totalrmbprice,a.totalusdprice,a.yfprice,a.lxprice,a.inname,a.indate,a.state from HT_CustomFee a";
ser.Tsql = "select id=cast(a.id as int),a.customname,a.htdate,a.htcode,a.yjprice,a.rmbprice,a.usdprice,a.njprice,a.hyprice,a.hlrate,a.llrate,a.totalrmbprice,a.totalusdprice,yfprice=isnull(a.yfprice,0),a.lxprice,a.inname,a.indate,a.state,a.jxdate,a.feetype,zfprice=case when a.feetype=1 then a.rmbprice else a.usdprice end,a.yjrate,a.njrmbprice,a.hyrmbprice,a.yjrmbprice,days=DATEDIFF(day,jxdate,getdate()) from HT_CustomFee a";
ser.Tsql += " " + ser.Filter(where);
ser.PageIndex = PageIndex;
ser.PageSize = PageSize;

@ -29,6 +29,7 @@
<script type="text/javascript">
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
var datagrid2 = new nblf.ui.DataGrid("DataGrid2");
var WindowLoadModel = new WindowLoad();
var Model = null;
$(document).ready(function () {
@ -45,9 +46,26 @@
TableAveColWidth("MainTable");
CreateDataGrid();
CreateDataGrid2();
ReadData();
$("#cmdAdd").click(function () {
$("#a_zhprice").html("");
num = 0;
$("#a_njprice").html("");
num2 = 0;
$("#a_hyprice").html("");
num3 = 0;
Model = new Object();
Model.id = 0;
ClearControlValue("MainTable"); //清空内容
$("#txtyjrate").val("3");
$("#txtllrate").val("0.005");
//var CurrentDate = new Date();
//$("#txtInDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
ShowFancybox("MainTable");
});
$("#cmdAdd2").click(function () {
Model = new Object();
Model.id = 0;
ClearControlValue("MainTable"); //清空内容
@ -55,7 +73,6 @@
//$("#txtInDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
ShowFancybox("MainTable");
});
$("#cmdGet").click(function () {
ReadData();
});
@ -67,8 +84,8 @@
$("#cmdBack").click(function () {
$.fancybox.close();
});
zhprice();
zhprice2();
$("#DataGrid1 [CommandName]").live("click", function () {
var CommandName = $(this).attr("CommandName");
var index = $(this).parentsUntil("tr").parent().attr("index");
@ -80,19 +97,232 @@
//if (Model.State == 2) { $("#tr1").show(); }
//else { $("#tr1").hide(); }
CreateGetModel("MainTable", Model);
if (Model.feetype == 1) {
$("#a_zhprice").html("美金$" + Model.usdprice);
num = Model.usdprice;
$("#a_njprice").html("美金$" + Model.njprice);
num2 = Model.njprice;
$("#a_hyprice").html("美金$" + Model.hyprice);
num3 = Model.hyprice;
}
if (Model.feetype == 2) {
$("#a_zhprice").html("人民币$" + Model.rmbprice);
num = Model.rmbprice;
$("#a_njprice").html("人民币$" + Model.njrmbprice);
num2 = Model.njrmbprice;
$("#a_hyprice").html("人民币$" + Model.hyrmbprice);
num3 = Model.hyrmbprice;
}
ShowFancybox("MainTable");
}
if (CommandName == "cmdDetail") {
// CreateGetModel("MainTable", Model);
ShowFancybox("MainTable2");
}
if (CommandName == "cmdFee") {
if (Model.state == 1) {
alert("该合同已经结清,不能付款");
return;
}
// CreateGetModel("MainTable", Model);listfeetype2 txthlrate2
$("#txtjsbprice").val(Model.lxprice);
$("#listfeetype2").val(Model.feetype);
$("#txthlrate2").val(Model.hlrate);
$("#txtfeejsprice").val("");
$("#a_bz").html(Model.feeflag);
ShowFancybox("MainTable3");
}
if (CommandName == "cmdDel") {
Delete(Model.id);
}
});
});
var num = 0;
var num2 = 0;
var num3 = 0;
function zhprice() {
// txthlrate listfeetype txtzfprice a_zhprice
$("#txthlrate,#txtzfprice,#txtnjprice,#txthyprice").keyup(function () {
num = 0;
$("#a_zhprice").html("");
num2 = 0;
$("#a_njprice").html("");
num3 = 0;
$("#a_hyprice").html("");
var hl = parseFloat($("#txthlrate").val());
var bz = $("#listfeetype").val();
var zf = parseFloat($("#txtzfprice").val());
var nj = parseFloat($("#txtnjprice").val());
var hy = parseFloat($("#txthyprice").val());
if (hl > 0 && zf > 0 && bz == 1) {
num = parseFloat(zf / hl);
num = num.toFixed(2);
$("#a_zhprice").html("美金$" + num);
}
if (hl > 0 && zf > 0 && bz == 2) {
num = parseFloat(zf*hl);
num = num.toFixed(2);
$("#a_zhprice").html("人民币¥" + num);
}
if (hl > 0 && nj > 0 && bz == 1) {
num2 = parseFloat(nj / hl);
num2 = num2.toFixed(2);
$("#a_njprice").html("美金$" + num2);
}
if (hl > 0 && nj > 0 && bz == 2) {
num2 = parseFloat(nj * hl);
num2 = num2.toFixed(2);
$("#a_njprice").html("人民币¥" + num2);
}
if (hl > 0 && hy > 0 && bz == 1) {
num3 = parseFloat(hy / hl);
num3 = num3.toFixed(2);
$("#a_hyprice").html("美金$" + num3);
}
if (hl > 0 && hy > 0 && bz == 2) {
num3 = parseFloat(hy * hl);
num3 = num3.toFixed(2);
$("#a_hyprice").html("人民币¥" + num3);
}
});
$("#listfeetype").change(function () {
num = 0;
$("#a_zhprice").html("");
var hl = parseFloat($("#txthlrate").val());
var bz = $("#listfeetype").val();
var zf = parseFloat($("#txtzfprice").val());
var nj = parseFloat($("#txtnjprice").val());
var hy = parseFloat($("#txthyprice").val());
if (hl > 0 && zf > 0 && bz == 1) {
num = parseFloat(zf / hl);
num = num.toFixed(2);
$("#a_zhprice").html("美金$" + num);
}
if (hl > 0 && zf > 0 && bz == 2) {
num = parseFloat(zf * hl);
num = num.toFixed(2);
$("#a_zhprice").html("人民币¥" + num);
}
if (hl > 0 && nj > 0 && bz == 1) {
num2 = parseFloat(nj / hl);
num2 = num2.toFixed(2);
$("#a_njprice").html("美金$" + num2);
}
if (hl > 0 && nj > 0 && bz == 2) {
num2 = parseFloat(nj * hl);
num2 = num2.toFixed(2);
$("#a_njprice").html("人民币¥" + num2);
}
if (hl > 0 && hy > 0 && bz == 1) {
num3 = parseFloat(hy / hl);
num3 = num3.toFixed(2);
$("#a_hyprice").html("美金$" + num3);
}
if (hl > 0 && hy > 0 && bz == 2) {
num3 = parseFloat(hy * hl);
num3 = num3.toFixed(2);
$("#a_hyprice").html("人民币¥" + num3);
}
});
}
var num4 = 0;
function zhprice2() {
// txthlrate listfeetype txtzfprice a_zhprice
$("#txthlrate2,#txtfeejsprice").keyup(function () {
num4 = 0;
$("#a_feejsprice").html("");
var hl = parseFloat($("#txthlrate2").val());
var bz = $("#listfeetype2").val();
var zf = parseFloat($("#txtfeejsprice").val());
if (hl > 0 && zf > 0 && bz == 1) {
num4 = parseFloat(zf / hl);
num4 = num4.toFixed(2);
$("#a_feejsprice").html("美金$" + num4);
}
if (hl > 0 && zf > 0 && bz == 2) {
num4 = parseFloat(zf * hl);
num4 = num4.toFixed(2);
$("#a_feejsprice").html("人民币¥" + num4);
}
});
$("#listfeetype2").change(function () {
num4 = 0;
$("#a_feejsprice").html("");
var hl = parseFloat($("#txthlrate2").val());
var bz = $("#listfeetype2").val();
var zf = parseFloat($("#txtfeejsprice").val());
if (hl > 0 && zf > 0 && bz == 1) {
num4 = parseFloat(zf / hl);
num4 = num4.toFixed(2);
$("#a_feejsprice").html("美金$" + num4);
}
if (hl > 0 && zf > 0 && bz == 2) {
num4 = parseFloat(zf * hl);
num4 = num4.toFixed(2);
$("#a_feejsprice").html("人民币¥" + num4);
}
});
}
//#region 初始化DataGrid
function CreateDataGrid() {
col = new nblf.ui.DataGridColumn();
col = new nblf.ui.DataGridColumn();
col.HeaderText = "客户";
col.CellTemplate ="<span>{Bind customname}</span>";
Array.add(datagrid1.Columns, col);
@ -103,33 +333,41 @@
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "htcode";
col.HeaderText = "合同编号 ";
col.CellTemplate ="<span>{Bind htcode}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "佣金";
col.CellTemplate ="<span>{Bind yjprice}</span>";
col.HeaderText = "币种";
col.CellTemplate = "<span>{Bind feetype}</span>";
col.CellFormatter = function (value) {
switch (value) {
case 1: return "<span>人民币</span>";
case 2: return "<span>美金</span>";
default: return "";
}
};
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "rmbprice";
col.CellTemplate ="<span>{Bind rmbprice}</span>";
col.HeaderText = "金额";
col.CellTemplate ="<span>${Bind usdprice}【¥{Bind usdprice}】</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "usdprice";
col.CellTemplate ="<span>{Bind usdprice}</span>";
col.HeaderText = "佣金";
col.CellTemplate = "<span>${Bind yjprice}【¥{Bind yjrmbprice}】</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "内际金额";
col.CellTemplate ="<span>{Bind njprice}</span>";
col.CellTemplate ="<span>${Bind njprice}【¥{Bind njrmbprice}】</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "海运费";
col.CellTemplate ="<span>{Bind hyprice}</span>";
col.CellTemplate ="<span>${Bind hyprice}【¥{Bind hyrmbprice}】</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
@ -139,50 +377,75 @@
col = new nblf.ui.DataGridColumn();
col.HeaderText = "利率";
col.CellTemplate ="<span>{Bind llrate}</span>";
col.CellTemplate ="<span>{Bind llrate}/天</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "totalrmbprice";
col.CellTemplate ="<span>{Bind totalrmbprice}</span>";
col.HeaderText = "计息日期";
col.CellTemplate = "<span>{Bind jxdate,yyyy-MM-dd}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "totalusdprice";
col.CellTemplate ="<span>{Bind totalusdprice}</span>";
col.HeaderText = "计息天数";
col.CellTemplate = "<span>{Bind days}</span>";
Array.add(datagrid1.Columns, col);
//col = new nblf.ui.DataGridColumn();
//col.HeaderText = "totalrmbprice";
//col.CellTemplate ="<span>{Bind totalrmbprice}</span>";
//Array.add(datagrid1.Columns, col);
//col = new nblf.ui.DataGridColumn();
//col.HeaderText = "totalusdprice";
//col.CellTemplate ="<span>{Bind totalusdprice}</span>";
//Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "已付多少";
col.CellTemplate ="<span>{Bind yfprice}</span>";
col.HeaderText = "欠费金额";
col.CellTemplate = "<span>{Bind feeflag}{Bind lxprice}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "累计利息多少";
col.CellTemplate ="<span>{Bind lxprice}</span>";
col.HeaderText = "已支付";
col.CellTemplate = "<span>{Bind feeflag}{Bind yfprice}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "inname";
col.CellTemplate ="<span>{Bind inname}</span>";
col.HeaderText = "剩余未支付";
col.CellTemplate = "<span>{Bind feeflag}{Bind leftprice}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "indate";
col.HeaderText = "创建时间";
col.CellTemplate ="<span>{Bind indate,yyyy-MM-dd}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "0 未结清 1已结清 ";
col.CellTemplate ="<span>{Bind state}</span>";
col.HeaderText = "创建人";
col.CellTemplate = "<span>{Bind inname}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "状态";
col.CellTemplate = "<span>{Bind state}</span>";
col.CellFormatter = function (value) {
switch (value) {
case 0: return "<span>未结清</span>";
case 1: return "<span style='color:green;'>已结清</span>";
default: return "";
}
};
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "付款明细";
col.Width = "160px";
col.CellTemplate = "<span CommandName='cmdDetail' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>付款明细</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作";
col.Width = "160px";
col.CellTemplate = "<span CommandName='cmdEdit' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>编辑</span>&nbsp;&nbsp;<span CommandName='cmdDel' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>删除</span>";
col.CellTemplate = "<span CommandName='cmdEdit' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>编辑</span>&nbsp;<span CommandName='cmdFee' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>付款</span>&nbsp;<span CommandName='cmdDel' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>删除</span>";
Array.add(datagrid1.Columns, col);
//datagrid1.SetPageSize(20);
@ -196,6 +459,66 @@
}
//#endregion
//#region 初始化DataGrid
function CreateDataGrid2() {
col = new nblf.ui.DataGridColumn();
col.HeaderText = "支付日期";
col.CellTemplate = "<span>{Bind feedate,yyyy-MM-dd}</span>";
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "feermbprice";
col.CellTemplate = "<span>{Bind feermbprice}</span>";
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "feeusdprice";
col.CellTemplate = "<span>{Bind feeusdprice}</span>";
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "结算汇率";
col.CellTemplate = "<span>{Bind hlrate}</span>";
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "1人民币结算 2美金结算";
col.CellTemplate = "<span>{Bind feetype}</span>";
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "结算时欠费金额";
col.CellTemplate = "<span>{Bind jsbprice}</span>";
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "结算时产生的总利息";
col.CellTemplate = "<span>{Bind jslxprice}</span>";
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作";
col.Width = "160px";
col.CellTemplate = "<span CommandName='cmdEdit' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>编辑</span>&nbsp;&nbsp;<span CommandName='cmdDel' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>删除</span>";
Array.add(datagrid2.Columns, col);
//datagrid1.SetPageSize(20);
datagrid2.IsFixHeader = false;
datagrid2.ShowIndexColumn = false;
datagrid2.AllowPaging = true;
datagrid2.Width = "100%";
datagrid2.SelectMode = nblf.ui.SelectMode.None;
datagrid2.Init();
datagrid2.add_PageIndexChanged(function () { ReadData(); });
}
//#endregion
//#region 读取数据
function ReadData() {
var param = new Object();
@ -236,6 +559,23 @@
if (error != "") { alert(error); return; }
var param = new Object();
param.Model = Model;
if (Model.feetype == 1) {
Model.rmbprice = $("#txtzfprice").val();
Model.usdprice = num;
Model.njrmbprice = $("#txtnjprice").val();
Model.njprice = num2;
Model.rmbprice = $("#txthyprice").val();
Model.hydprice = num3;
}
else if (Model.feetype == 2) {
Model.usdprice = $("#txtzfprice").val();
Model.rmbprice = num;
Model.njprice = $("#txtnjprice").val();
Model.njrmbprice = num2;
Model.hyprice = $("#txthyprice").val();
Model.hyrmbprice = num3;
}
WindowLoadModel.Show();
$.ajax({
url: "SysManageServiceNew.asmx/Save_CustomFee",
@ -248,6 +588,54 @@
}
});
}
function SaveFeeDetail() {
var param = new Object();
if ($("#txtfeedate").val() == "") {
alert("付款日期没填"); return;
}
if ($("#txthlrate2").val() == "") {
alert("汇率没填"); return;
}
if ($("#txtjsbprice").val() == "") {
alert("付款金额没填"); return;
}
var dmd = new Object();
dmd.feeid = Model.id;
dmd.jsbprice = $("#txtjsbprice").val();
dmd.feetype = $("#listfeetype2").val();
dmd.hlrate = $("#txthlrate2").val();
dmd.feedate = $("#txtfeedate").val();
param.Model = dmd;
if (dmd.feetype == 1) {
dmd.feermbprice = $("#txtfeejsprice").val();
dmd.feeusdprice = num4;
}
else if (Model.feetype == 2) {
dmd.feeusdprice = $("#txtfeejsprice").val();
dmd.feermbprice = num4;
}
WindowLoadModel.Show();
$.ajax({
url: "SysManageServiceNew.asmx/Save_CustomFeeDetail",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
ReadData();
alert("保存成功");
$.fancybox.close();
}
});
}
//#endregion
//#region 显示弹出窗体
function ShowFancybox(id) {
@ -287,12 +675,11 @@
<td><input id='txt_customname' type='text' style='width: 99%' where="a.customname like '%@value%'"/></td>
<td class="f1" >合同日期</td>
<td><input id="txt_StartDate" type="text" style="width: 100px; " onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" where="a.htdate>='@value'" />-<input id="txt_StopDate" type="text" style="width: 100px; " onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" where="a.htdate<= '@value 23:59:59'" /></td>
<td class="f1" >inname</td>
<td><input id='txt_inname' type='text' style='width: 99%' where="a.inname like '%@value%'"/></td>
<td class="f1" >0 未结清 1已结清 </td>
<td><select id='list_state' style="width: 99%;" where="state=@value" binding="BindComboBox2" url="XXX.asmx/XXX" modelid="Id" modelname="Name" TopName="全部" ></select></td>
<td class="f1" >状态</td>
<td><select id='list_state' style="width: 99%;" where="state=@value"><option value="">全部</option><option value="0">未结清</option><option value="1">已结清</option></select></td> <td><input id="cmdGet" type="button" value = "查询" /></td>
</tr>
<td><input id="cmdGet" type="button" value = "查询" /></td>
<tr>
<td colspan="9">
@ -307,80 +694,65 @@
</table>
<div style="display: none;">
<div id="MainTable" title="编辑" style="width: 400px; height: auto;">
<div id="MainTable" title="编辑" style="width:700px; height: auto;">
<table class="tableAll" style="width: 100%;">
<colgroup>
<col style="width: 80px;" />
<col style="width: 120px;" />
<col />
<col style="width: 120px;" />
<col />
</colgroup>
<tr>
<td class="f1" >客户</td>
<td><input id='txtcustomname' type='text' style='width: 99%' columnname="customname" columndesc="客户" columnrequired="false" validtype="" /></td>
</tr>
<tr>
<td class="f1" >合同日期</td>
<td><input id='txthtdate' type='text' style='width: 99%' onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" columnname="htdate" columndesc="合同日期" columnrequired="false" validtype="" columnformat="yyyy-MM-dd" /></td>
</tr>
<tr>
<td class="f1" >htcode</td>
<td><input id='txthtcode' type='text' style='width: 99%' columnname="htcode" columndesc="htcode" columnrequired="false" validtype="" /></td>
<td class="f1" ><font color="red">*</font>客户</td>
<td><input id='txtcustomname' type='text' style='width: 99%' columnname="customname" columndesc="客户" columnrequired="true" validtype="" /></td> <td class="f1" ><font color="red">*</font>合同编号</td>
<td><input id='txthtcode' type='text' style='width: 99%' columnname="htcode" columndesc="合同编号" columnrequired="true" validtype="" /></td>
</tr>
<tr>
<td class="f1" >佣金</td>
<td><input id='txtyjprice' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="yjprice" columndesc="佣金" columnrequired="false" /></td>
</tr>
<tr>
<td class="f1" >rmbprice</td>
<td><input id='txtrmbprice' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="rmbprice" columndesc="rmbprice" columnrequired="false" /></td>
</tr>
<tr>
<td class="f1" >usdprice</td>
<td><input id='txtusdprice' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="usdprice" columndesc="usdprice" columnrequired="false" /></td>
</tr>
<tr>
<td class="f1" >内际金额</td>
<td><input id='txtnjprice' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="njprice" columndesc="内际金额" columnrequired="false" /></td>
</tr>
<tr>
<td class="f1" >海运费</td>
<td><input id='txthyprice' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="hyprice" columndesc="海运费" columnrequired="false" /></td>
</tr>
<tr>
<td class="f1" >汇率</td>
<td><input id='txthlrate' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="hlrate" columndesc="汇率" columnrequired="false" /></td>
</tr>
<tr>
<td class="f1" >利率</td>
<td><input id='txtllrate' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="llrate" columndesc="利率" columnrequired="false" /></td>
</tr>
<tr>
<td class="f1" >totalrmbprice</td>
<td><input id='txttotalrmbprice' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="totalrmbprice" columndesc="totalrmbprice" columnrequired="false" /></td>
<td class="f1" ><font color="red">*</font>合同日期</td>
<td><input id='txthtdate' type='text' style='width: 99%' onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" columnname="htdate" columndesc="合同日期" columnrequired="true" validtype="" columnformat="yyyy-MM-dd" /></td>
<td class="f1" ><font color="red">*</font>佣金比例</td>
<td><input id='txtyjrate' type='text' style='width: 90%' precision="2" min="0" max="99999" columnname="yjrate" columndesc="佣金比例" columnrequired="true" value="3"/>%</td>
</tr>
<tr>
<td class="f1" >totalusdprice</td>
<td><input id='txttotalusdprice' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="totalusdprice" columndesc="totalusdprice" columnrequired="false" /></td>
<td class="f1" ><font color="red">*</font>利率</td>
<td><input id='txtllrate' type='text' style='width: 90%' precision="2" min="0" max="99999" columnname="llrate" columndesc="利率" columnrequired="true" value="0.005" />/天</td>
<td class="f1" ><font color="red">*</font>汇率</td>
<td><input id='txthlrate' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="hlrate" columndesc="美金汇率" columnrequired="true" /></td>
</tr>
<tr>
<td class="f1" >已付多少</td>
<td><input id='txtyfprice' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="yfprice" columndesc="已付多少" columnrequired="false" /></td>
<tr>
<td class="f1">开始记息日期</td>
<td><input id='txtjxdate' type='text' style='width: 99%' onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" columnname="jxdate" columndesc="开始计息日期" columnrequired="false" validtype="" columnformat="yyyy-MM-dd" /></td>
<td colspan="2"><font color="red">不填就按合同日期开始计算</font></td>
</tr>
<tr>
<td class="f1" >累计利息多少</td>
<td><input id='txtlxprice' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="lxprice" columndesc="累计利息多少" columnrequired="false" /></td>
<td class="f1" ><font color="red">*</font>币种</td>
<td><select id='listfeetype' style="width: 99%;" columnname="feetype" columndesc="结算币种" columnrequired="false">
<option value="1">人民币</option>
<option value="2">美金</option>
</select></td><td class="f1" ><font color="red">*</font>金额</td>
<td><input id='txtzfprice' type='text' style='width: 50%' precision="2" min="0" max="99999" columnname="zfprice" columndesc="金额" columnrequired="true" /><a id="a_zhprice" style="color:red"></a></td>
</tr>
<tr>
<td class="f1" >inname</td>
<td><input id='txtinname' type='text' style='width: 99%' columnname="inname" columndesc="inname" columnrequired="false" validtype="" /></td>
</tr>
<tr>
<td class="f1" >indate</td>
<td><input id='txtindate' type='text' style='width: 99%' onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" columnname="indate" columndesc="indate" columnrequired="false" validtype="" columnformat="yyyy-MM-dd" /></td>
<td class="f1" ><font color="red">*</font>内际金额</td>
<td><input id='txtnjprice' type='text' style='width: 50%' precision="2" min="0" max="99999" columnname="njprice" columndesc="内际金额" columnrequired="true" value="0" /><a id="a_njprice" style="color:red"></a></td> <td class="f1" ><font color="red">*</font>海运费</td>
<td><input id='txthyprice' type='text' style='width: 50%' precision="2" min="0" max="99999" columnname="hyprice" columndesc="海运费" columnrequired="true" value="0"/><a id="a_hyprice" style="color:red"></a></td>
</tr>
<tr>
<td class="f1" >0 未结清 1已结清 </td>
<td><select id='liststate' style="width: 99%;" columnname="state" columndesc="0 未结清 1已结清 " columnrequired="false" binding="BindComboBox2" url="XXX.asmx/XXX" modelid="Id" modelname="Name" TopName=""></select></td>
</tr>
<tr>
<td colspan="4" align="center">
@ -389,6 +761,56 @@
</td>
</tr>
</table>
</div>
<div id="MainTable2" title="编辑" style="width:800px; height: auto;">
<table class="tableAll" style="width: 100%;">
<tr>
<td colspan="4">
<div id="DataGrid2" class="DataGridStyle"></div>
</td>
</tr>
</table>
</div>
<div id="MainTable3" title="编辑" style="width:800px; height: auto;">
<table class="tableAll" style="width: 100%;">
<tr>
<td class="f1" ><font color="red">*</font>欠费金额</td>
<td><input id='txtjsbprice' type='text' style='width: 90%' precision="2" min="0" max="99999" columnname="jsbprice" columndesc="欠费金额" columnrequired="true" /><a id="a_bz"></a></td>
<td class="f1" ><font color="red">*</font>结算币种</td>
<td><select id='listfeetype2' style="width: 99%;" columnname="feetype" columndesc="结算币种" columnrequired="true">
<option value="1">人民币结算</option>
<option value="2">美金结算</option>
</select></td>
</tr>
<tr>
<td class="f1" ><font color="red">*</font>支付日期</td>
<td><input id='txtfeedate' type='text' style='width: 99%' onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" columnname="feedate" columndesc="支付日期" columnrequired="true" validtype="" columnformat="yyyy-MM-dd" /></td> <td class="f1" >结算汇率</td>
<td><input id='txthlrate2' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="hlrate" columndesc="结算汇率" columnrequired="true" /></td>
</tr>
<tr>
<td class="f1" ><font color="red">*</font>结算金额</td>
<td><input id='txtfeejsprice' type='text' style='width: 50%' precision="2" min="0" max="99999" columnname="feejsprice" columndesc="结算金额" columnrequired="true" /><a id="a_feejsprice" style="color:red"></a></td> <td class="f1" ><font color="red">*</font>结算状态</td>
<td><select id='liststate' style="width: 99%;" columnname="feetype" columndesc="结算状态" columnrequired="true">
<option value="0">未结清</option>
<option value="1">已结清</option>
</select></td>
</tr>
<tr>
<td colspan="4" align="center">
<input id="cmdSave2" type="button" value="保存" onclick="SaveFeeDetail()" />
</td>
</tr>
</table>
</div>
</div>

@ -11443,6 +11443,8 @@ namespace TradeManageNew
/// id
/// </summary>
public Int32? id { get; set; }
public Int32? feetype { get; set; }
/// <summary>
/// 客户
/// </summary>
@ -11467,6 +11469,7 @@ namespace TradeManageNew
/// usdprice
/// </summary>
public Decimal? usdprice { get; set; }
public Decimal? zfprice { get; set; }
/// <summary>
/// 内际金额
/// </summary>
@ -11495,10 +11498,19 @@ namespace TradeManageNew
/// 已付多少
/// </summary>
public Decimal? yfprice { get; set; }
public Decimal? leftprice { get; set; }
public String feeflag { get; set; }
/// <summary>
/// 累计利息多少
///应付金额
/// </summary>
public Decimal? lxprice { get; set; }
public Decimal? njrmbprice { get; set; }
public Decimal? hyrmbprice { get; set; }
public Decimal? yjrmbprice { get; set; }
public Decimal? yjrate { get; set; }
/// <summary>
/// inname
/// </summary>
@ -11507,6 +11519,9 @@ namespace TradeManageNew
/// indate
/// </summary>
public DateTime? indate { get; set; }
public DateTime? jxdate { get; set; }
public Int32? days { get; set; }
/// <summary>
/// 0 未结清 1已结清
/// </summary>
@ -11527,6 +11542,8 @@ namespace TradeManageNew
/// 支付日期
/// </summary>
public DateTime? feedate { get; set; }
/// <summary>
/// feermbprice
/// </summary>

@ -18120,6 +18120,26 @@ where a.storeid in (6,9,11) and a.OrderGoodsId=0 and a.KCNum>0 " + tj + " gr
public int Save_CustomFee(HT_CustomFee Model)
{
PagesNew.Login(this.Session);
Model.indate = DateTime.Now;
Model.inname = Session["Name"].ToString();
if (Model.jxdate == null)
Model.jxdate = Model.htdate;
Model.state = 0;
Model.lxprice = Model.rmbprice;
Model.yjprice = Model.usdprice * Model.yjrate;
Model.yjrmbprice = Model.rmbprice * Model.yjrate;
Model.yfprice = 0;
if (Model.feetype == 1)
{
Model.lxprice = Model.rmbprice + Model.yjrmbprice + Model.njrmbprice + Model.hyrmbprice;
}
if (Model.feetype == 2)
{
Model.lxprice = Model.usdprice + Model.yjprice + Model.njprice + Model.hyprice;
}
return DataNew.Save_CustomFee(Model);
}
#endregion
@ -18160,6 +18180,24 @@ where a.storeid in (6,9,11) and a.OrderGoodsId=0 and a.KCNum>0 " + tj + " gr
int RowCount = 0;
resultModel.DataSource = DataNew.GetListCustomFee(where, PageIndex, PageSize, "", out RowCount);
resultModel.RowCount = RowCount;
if (resultModel.DataSource != null)
{
foreach (var md in resultModel.DataSource)
{
if (md.state == 0)
{
md.lxprice = md.lxprice * +md.llrate * md.days;
md.leftprice = md.lxprice - md.yfprice;
}
else
{
md.leftprice = 0;
}
md.feeflag = "¥";
if (md.feetype == 2)
md.feeflag = "$";
}
}
return resultModel;
}
#endregion

Loading…
Cancel
Save