346 lines
16 KiB
Plaintext
346 lines
16 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="OrderCollect_list.aspx.cs" Inherits="OrderCollect_list" %>
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head runat="server">
|
|
<link href="../Css/index.css" rel="stylesheet" type="text/css" />
|
|
<script src="../Jquery-ui/js/jquery-1.10.2.js" type="text/javascript"></script>
|
|
<link href="../Css/right.css" rel="stylesheet" type="text/css" />
|
|
<script src="../Jquery-ui/js/jquery-ui-1.10.4.custom.js" type="text/javascript"></script>
|
|
<link href="../Jquery-ui/css/pepper-grinder/jquery-ui-1.10.4.custom.css" rel="stylesheet" type="text/css" />
|
|
<script src="../Js/Calendar3.js" type="text/javascript"></script>
|
|
<script src="../Js/ToolTip.js" type="text/javascript"></script>
|
|
<link rel="stylesheet" href="../Css/gh-buttons.css" type="text/css"/>
|
|
<link rel="stylesheet" href="../Css/prettify.css"/>
|
|
<script src="../Js/prettify.js" type="text/javascript"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
setwidth();
|
|
spasefuzhi(OrderCollect_list);
|
|
$("#ycdaochu").click(function () {
|
|
var selectid = "";
|
|
$(".xz").each(function () {
|
|
if ($(this).is(":checked")) {
|
|
selectid += $(this).parent().parent().attr("tag") + ',';
|
|
}
|
|
|
|
})
|
|
$("#selectid").val(selectid);
|
|
})
|
|
$("#drp_zt").change(function () {
|
|
yltj = "";
|
|
var strtj = pxtiaojian();
|
|
var daylength = "";
|
|
daylength = OrderCollect_list.nowdaycount(pxtiaojian(),nowmonth).value;
|
|
if ($("#drop_ziduan").length == 0) {
|
|
$("#gjxnr").html(daylength);
|
|
}
|
|
var nowp = OrderCollect_list.sumitem(" where " +strtj+" 1=1 ").value
|
|
$("#span_sumitem").text(nowp);
|
|
pagecount = $("#span_sumpage").text() - 1;
|
|
$("#drp_pageitem").change();
|
|
bind();
|
|
$("#strwhere").val(strtj);
|
|
})
|
|
|
|
})
|
|
//使用预存款的客户
|
|
var yckh = "";
|
|
//计算付款总金额
|
|
function selectAllQ(checkbox) {
|
|
var wfje = 0;
|
|
var khbh ="";
|
|
var khbhzu = [];
|
|
var ycje = 0;
|
|
var isybd = "0";
|
|
$(".xz:checked").each(function () {
|
|
var lie;
|
|
var liekh;
|
|
var lieyck;
|
|
$("#tr_biaotou").find('td').each(function (i, td) {
|
|
if ($(td).attr("tag") == "wsje") {
|
|
lie = i;
|
|
}
|
|
if ($(td).attr("tag") == "kh_bh") {
|
|
liekh = i;
|
|
}
|
|
if ($(td).attr("tag") == "khyck") {
|
|
lieyck = i;
|
|
}
|
|
});
|
|
wfje = wfje + parseFloat($(this).parent().parent().find("td").eq(lie).text());
|
|
//累计预存款
|
|
ycje = parseFloat($(this).parent().parent().find("td").eq(lieyck).text());
|
|
//判断是否有不同的客户
|
|
khbh = $(this).parent().parent().find("td").eq(liekh).text();
|
|
yckh = khbh;
|
|
$.each(khbhzu, function (i, obj) {
|
|
if (obj != khbh) {
|
|
isybd = "1";
|
|
} else {
|
|
yckh = khbh;
|
|
}
|
|
})
|
|
khbhzu.push(khbh);
|
|
})
|
|
$("#fkje").val("¥" + wfje);
|
|
|
|
//判断客户是否可以使用预存款
|
|
if (isybd == "1") {
|
|
$("#syycje").attr("disabled", "disabled");
|
|
$("#syycje").css("background-color", "#f9f6f6");
|
|
$("#yckje").css("background-color", "#f9f6f6");
|
|
|
|
$("#syycje").val("0");
|
|
$("#z_error").text("选择客户不同,不能使用预存款!");
|
|
}
|
|
else {
|
|
$("#syycje").removeAttr("disabled");
|
|
$("#syycje").css("background-color", "");
|
|
$("#z_error").text("");
|
|
$("#yckje").css("background-color", "");
|
|
$("#syycje").val(ycje);
|
|
}
|
|
|
|
}
|
|
|
|
//调用导出方法
|
|
function wddcfont() {
|
|
$("#<%=ycdaochu.ClientID%>").click();
|
|
}
|
|
//结账付款
|
|
function pd() {
|
|
var ids = "";
|
|
if ($("#fkje").val().replace(/(^\s*)|(\s*$)/g, "") == "") {
|
|
$("#z_error").text("收款金额不能为空!");
|
|
return false;
|
|
} else if ($("#shuilv").val().replace(/(^\s*)|(\s*$)/g, "") == "") {
|
|
$("#z_error").text("税率不能为空!");
|
|
return false;
|
|
} else if ($("#shje").val().replace(/(^\s*)|(\s*$)/g, "") == "") {
|
|
$("#z_error").text("税后金额不能为空!");
|
|
return false;
|
|
}
|
|
else if ($("#fkrq").val().replace(/(^\s*)|(\s*$)/g, "") == "") {
|
|
$("#z_error").text("收款日期不能为空!");
|
|
return false;
|
|
}
|
|
else if ($("#fkr").val().replace(/(^\s*)|(\s*$)/g, "") == "") {
|
|
$("#z_error").text("收款人不能为空!");
|
|
return false;
|
|
}
|
|
if ($("#jsr").val().replace(/(^\s*)|(\s*$)/g, "") == "") {
|
|
$("#z_error").text("经手人不能为空!");
|
|
return false;
|
|
}
|
|
|
|
if (parseFloat($("#syycje").val()) >parseFloat($("#fkje").val().replace(/[^0-9]/ig,""))) {
|
|
if (confirm("使用预付金额大于总收款金额确认收款吗?")) {
|
|
$(".xz:checked").each(function () {
|
|
ids += $(this).parent().parent().attr("tag") + '?' + $(this).parent().parent().attr("name") + ',';
|
|
})
|
|
ids = ids.substring(0, ids.length - 1);
|
|
} else {
|
|
return false;
|
|
}
|
|
} else {
|
|
if (confirm("确认完成收款吗?")) {
|
|
$(".xz:checked").each(function () {
|
|
ids += $(this).parent().parent().attr("tag") + '?' + $(this).parent().parent().attr("name") + ',';
|
|
})
|
|
ids = ids.substring(0, ids.length - 1);
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
$("#cgrkid").val(ids);
|
|
}
|
|
|
|
function sshsr() {
|
|
if ($("#shuilv").val() == "") {
|
|
$("#shuilv").val("0");
|
|
} if ($("#fpje").val() == "") {
|
|
$("#fpje").val("0");
|
|
}
|
|
var syl = parseFloat($("#shuilv").val());
|
|
var shje = parseFloat($("#fpje").val().replace(/[^0-9]/ig, "")) - parseFloat($("#fpje").val().replace(/[^0-9]/ig, "")) / (1 + syl / 100);
|
|
$("#shje").val(parseFloat(shje).toFixed(2));
|
|
}
|
|
function getyck() {
|
|
if (yckh == "") {
|
|
alert("选择使用预存款的客户!");
|
|
} else {
|
|
var ycje = $("#syycje").val();
|
|
var fhjg = OrderCollect_list.getyck(ycje, yckh).value;
|
|
if (fhjg == "no") {
|
|
$("#z_error").text("使用的预存款不能大于客户实际的预存款!");
|
|
$("#syycje").val("");
|
|
}
|
|
}
|
|
}
|
|
|
|
</script>
|
|
<script src="../Js/common.js" type="text/javascript"></script>
|
|
</head>
|
|
<body>
|
|
<form id="form" runat="server">
|
|
<div class="rtbjdiv" >
|
|
<div class="right-top">
|
|
<table width="100%" height="100%">
|
|
<tr>
|
|
<td >
|
|
<div class="right-top-dh" id="div_listdaohang"><h4>订单待收款主页</h4>
|
|
</div>
|
|
</td>
|
|
<td >
|
|
<div class="right-top-an">
|
|
<ul id="ul_gongju" class="ulgongju" >
|
|
<li runat="server" id="sousuo"><a href="#button" class="button icon search" onclick="gjzk('search')" >查询</a> </li>
|
|
<li runat=server id="xiazai" visible=false><a href="#button" id="btn_daochu" onclick="wddcfont()" class="button icon arrowdown">导出</a> </li>
|
|
<li runat=server id="leiset" visible=false><a href="#button" id="li_liepeizhi" class="button icon settings">配置</a></li>
|
|
<li runat=server id="rileget"><a href="#button" class="button icon clock" onclick="gjzk('rili')">月历</a></li>
|
|
<li runat=server id="li1"><a href="#button" class="button icon favorite" onclick="setshoucang()" >收藏</a></li>
|
|
<li><select title="状态" class="drpdownstyle" id="drp_zt"><option value=''>全部</option> <option value='已开票未收款'>已开票未收款</option><option value='未开票未收款'>未开票未收款</option></select> </li>
|
|
</ul>
|
|
</div>
|
|
</td>
|
|
<td >
|
|
<div id="div_page" >
|
|
<table id="tbl_pagebottom" height="20" border="0" cellpadding="0" cellspacing="0" >
|
|
<tr>
|
|
<td>共<span id="span_sumitem"></span>条数据</td>
|
|
<td class="pagestyle" id="td_first" title="首页">
|
|
<img src="../Images_Folder/pagination_icons_01.png" width="16" height="16" alt="">
|
|
</td>
|
|
<td class="pagestyle" id="td_up" title="上一页">
|
|
<img src="../Images_Folder/pagination_icons_02.png" width="16" height="16" alt="">
|
|
</td>
|
|
<td><span>第</span></td>
|
|
<td>
|
|
<span><input id="txt_nowpage" type="text" class="ui-pg-input" value="1"/></span>
|
|
</td>
|
|
<td><span>页/共</span></td>
|
|
|
|
<td><span id="span_sumpage" ></span>页</td>
|
|
<td class="pagestyle" id="td_next" title="下一页">
|
|
<img src="../Images_Folder/pagination_icons_03.png" width="16" height="16" alt="">
|
|
</td>
|
|
<td class="pagestyle" id="td_endpage" title="尾页">
|
|
<img src="../Images_Folder/pagination_icons_04.png" width="16" height="16" alt="">
|
|
</td>
|
|
<td class="pagestyle" id="td_go" title="跳页"><img src="../Images_Folder/ty.png" style="margin-top:5px" width="16" height="16" alt=""></td>
|
|
<td title="显示条数">
|
|
<span>
|
|
<select id="drp_pageitem">
|
|
<option value="20">20</option>
|
|
<option value="30">30</option>
|
|
<option value="40">40</option>
|
|
<option value="50">50</option>
|
|
</select>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<%-- 工具箱--%>
|
|
<div id="Gjx" class="Gjxzhu">
|
|
<table width="100%" height="100%">
|
|
<tr height="80px">
|
|
<td >
|
|
<div id="gjxnr" class="right-gjxnr">
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="ycsjgddiv">
|
|
<table height="100%" width="100%">
|
|
<tr >
|
|
<td class="cgrqtd">
|
|
|
|
<div class="cgfkd">
|
|
<table align="left" width="200" >
|
|
<tr height="35"><td width="20"> </td><td width="60" style=" color:Red">收款金额</td><td><asp:TextBox id="fkje" ForeColor="red" onkeyup="doubleshuru(this)" runat="server" CssClass="xiahuaxian" ></asp:TextBox></td></tr>
|
|
<tr height="35"><td width="20"> </td><td width="60" >抹账金额</td><td><asp:TextBox id="mzje" ForeColor="red" onkeyup="doubleshuru(this)" runat="server" CssClass="xiahuaxian" ></asp:TextBox></td></tr>
|
|
<tr height="35" id="yckje"><td width="20"> </td><td width="60" >使用预存款</td><td><asp:TextBox id="syycje" ForeColor="red" onkeyup="doubleshuru(this);getyck()" runat="server" CssClass="xiahuaxian" Text ="0" ></asp:TextBox></td></tr>
|
|
<tr height="35"><td width="20"> </td><td width="60">收款方式</td><td><asp:dropdownlist id="fkfs" runat="server" CssClass="xiahuaxian"></asp:dropdownlist></td></tr>
|
|
<tr height="35"><td width="20"> </td><td width="60">发票类型</td><td><asp:dropdownlist id="fplx" runat="server" CssClass="xiahuaxian"></asp:dropdownlist></td></tr>
|
|
<tr height="35"><td width="20"> </td><td width="60">发票号</td><td><asp:TextBox id="fph" runat="server" CssClass="xiahuaxian" ></asp:TextBox></td></tr>
|
|
<tr height="35"><td width="20"> </td><td width="60">发票金额</td><td><asp:TextBox id="fpje" runat="server" onkeyup="doubleshuru(this)" CssClass="xiahuaxian" ></asp:TextBox></td></tr>
|
|
<tr height="35"><td width="20"> </td><td width="60" style=" color:Red">税率</td><td><asp:TextBox id="shuilv" runat="server" onkeyup="doubleshuru(this)" CssClass="xiahuaxian" >0</asp:TextBox></td></tr>
|
|
<tr height="35"><td width="20"> </td><td width="60" style=" color:Red">税额</td><td onclick="sshsr()"><asp:TextBox id="shje" runat="server" onkeyup="doubleshuru(this)" CssClass="xiahuaxian" ></asp:TextBox></td></tr>
|
|
<tr height="35"><td width="20"> </td><td width="60" style=" color:Red">收款人</td><td><asp:TextBox id="fkr" runat="server" ReadOnly CssClass="xiahuaxian" ></asp:TextBox></td></tr>
|
|
<tr height="35"><td width="20"> </td><td width="60" style=" color:Red">经手人</td><td><asp:TextBox id="jsr" runat="server" CssClass="xiahuaxian" ></asp:TextBox></td></tr>
|
|
<tr height="35"><td width="20"> </td><td width="60" >收款日期</td><td><asp:TextBox id="fkrq" runat="server" ReadOnly CssClass="xiahuaxian" ></asp:TextBox></td></tr>
|
|
<tr height="35"><td width="20"> </td><td width="60">备注</td><td><asp:TextBox id="bz" runat="server" CssClass="xiahuaxian" ></asp:TextBox></td></tr>
|
|
<tr height="15"><td colspan="3" align="center"><asp:label id="z_error" CssClass="error" runat="server"></asp:label></td></tr>
|
|
<tr> <td colspan="3" align="center"><BUTTON class=" button icon reload" onclick="form.reset();" style=" width:60px;" type="button">撤销</BUTTON>    
|
|
<asp:button id="bt_tj" runat="server" CssClass="button" Width="60" Text="保存" OnClientClick="return pd()" OnClick="btn_fksave"
|
|
></asp:button>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
<td> </td>
|
|
<td>
|
|
<%-- 数据表头--%>
|
|
<div class="shujutou" id="div_title">
|
|
<table border="0" class="tbl_titie" id="biaotou">
|
|
<tr class="tr_titile" id="tr_biaotou">
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<%-- 数据列表--%>
|
|
<div class="shuju" id="t_r_content" onscroll="scrolltow()" >
|
|
<table class="hovertable" id="tbl_list">
|
|
</table>
|
|
</div>
|
|
<%--数据汇总--%>
|
|
<div id="div_huizong" onscroll="listscroll()">
|
|
<table border="0" id="huizong" >
|
|
<tr class="tr_bottom"> </tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<%--列配置--%>
|
|
<div id="dialog-modal" title="列配置" style="overflow:hidden; display:none;" >
|
|
<table style="width:90%">
|
|
<tr style=" font-weight:bold;"> <td style="width:30%">顺序</td> <td style="width:30%">列名</td> <td style="width:35%">显示</td> </tr>
|
|
</table>
|
|
<div style="width:90%;float:left;overflow-x: hidden;overflow-y: scroll;height:125px">
|
|
<table style="width:100%" id="tbl_peizhi">
|
|
</table>
|
|
</div>
|
|
<div class="lpzdiv" >
|
|
<ul>
|
|
<li>
|
|
<img src="../Images_Folder/Button/upbt.png" id="btn_up" />
|
|
</li>
|
|
<li>
|
|
<img src="../Images_Folder/Button/down.png" id="btn_down"/>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<span style=" display:none"> <asp:Button ID="ycdaochu" runat="server" onclick="DownLoad" /></span>
|
|
<asp:HiddenField ID="hiddenid" runat=server />
|
|
<asp:HiddenField ID="Hiddenname" runat=server />
|
|
<input type=hidden id="pagename" value="ddsk" />
|
|
<asp:HiddenField ID="selectid" runat=server />
|
|
<asp:HiddenField ID="showselect" runat=server />
|
|
<asp:HiddenField ID="strwhere" runat=server /><asp:HiddenField ID="jsonwhere" runat=server />
|
|
<asp:HiddenField ID="cgrkid" runat=server />
|
|
<asp:HiddenField ID="hiddenhuizong" runat="server" Value="订单总额,已收金额,未收金额,订货数量,已开发票总额,抹账总额" />
|
|
<script src="../Js/messageshow.js" type="text/javascript"></script>
|
|
</form>
|
|
</body>
|
|
</html>
|