<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoicingShouruqueren.aspx.cs" Inherits="CY.WebForm.Pages.financial.InvoicingShouruqueren" %>
|
|
<!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">
|
<title>订单收款</title>
|
<uc:CMSHead ID="CMSHead1" runat="server" />
|
<link href="../../Styles/ParticularWQJ.css" rel="stylesheet" type="text/css" />
|
<script type="text/javascript">
|
var accountsTypes = false;
|
var accounts = false;
|
|
var keyDownHook = new KeyBehaviorHook('keydown');
|
keyDownHook.Regist(window.Keys.S, "ClickElement('btnSubmit')", window.WithKey.Ctrl); //Ctrl+s 保存
|
keyDownHook.Regist(window.Keys.Enter, "ClickElement('btnSubmit')", window.WithKey.Ctrl); //Ctrl+Enter 保存
|
keyDownHook.Regist(window.Keys.R, "ClickElement('btnReset')", window.WithKey.Ctrl); //Ctrl+R 重置(Reset)
|
keyDownHook.Regist(window.Keys.Q, "ClickElement('btnQuit')", window.WithKey.Ctrl); //Ctrl+Q 退出(Quit)
|
|
function jisuanheji() {
|
|
var cks = $("input[name='ckId']:checked");
|
|
if (cks.length == 0) { $("#NoMoney").text("0"); return; } else { }
|
|
var unPayedMoney = 0;
|
|
|
cks.each(
|
function () {
|
var ckVal = $(this).val();
|
|
var ckValJson = eval('(' + ckVal + ')');
|
|
unPayedMoney += (parseFloat(ckValJson.fukuanmoney) - parseFloat(ckValJson.hexiaomoney)) ;
|
|
|
|
}
|
);
|
|
$("#NoMoney").text(unPayedMoney);
|
|
}
|
|
$(function () {
|
|
$('.hand').click(function () {
|
jisuanheji();
|
});
|
|
|
keyDownHook.Binding();
|
if ('1' == document.getElementById('txtResult').value) {
|
CloseOpenWindow(true)
|
return;
|
} else;
|
//document.getElementById('txtReceiveDate').value = new Date().ToString("yyyy-MM-dd HH:mm");
|
// document.getElementById('txtReceiveMoney').value = document.getElementById('txtUnPayedMoney').value;
|
//document.getElementById('txtReceiveMoney').focus();
|
//d accountsTypes = '<%=Request.RequestContext.RouteData.DataTokens["accountsTypes"] %>';
|
//d accounts = '<%=Request.RequestContext.RouteData.DataTokens["accounts"] %>';
|
|
|
//try {
|
|
// accountsTypes = eval(accountsTypes);
|
// accounts = eval(accounts)[0];
|
//} catch (e) {
|
// accountsTypes = 'object' == typeof (accountsTypes) ? accountsTypes : [];
|
// accounts = [];
|
//}
|
|
//LoadAccountType();
|
});
|
|
function QuannbuCheckedChanging(sel) {
|
if (sel.value == "0") {
|
$("#txtReceiveMoney").prop('readonly', true);
|
$("#txtReceiveMoney").val($("#hidReceiveMoney").val());
|
$("#test_table").hide();
|
} else if (sel.value == "1")
|
{
|
$("#txtReceiveMoney").prop('readonly', false);
|
|
$("#test_table").show();
|
}
|
}
|
function CheckStaff() {
|
|
|
|
var ids = '';
|
var cks = $("input[name='ckId']:checked");
|
if (cks.length == 0) {
|
alertMsg('没有选中任何项!');
|
return false;
|
}
|
else {
|
}
|
|
|
|
|
|
|
cks.each(
|
function () {
|
var ckVal = $(this).val();
|
|
var ckValJson = eval('(' + ckVal + ')');
|
|
ids = ids + ',' + ckValJson.id;
|
|
|
}
|
);
|
|
|
$("#ids").val(ids);
|
return true;
|
|
}
|
|
function CheckedChanging(sel, name) {
|
|
var td_toaccount = document.getElementById('td_toaccount');
|
td_toaccount.parentNode.style.display = td_toaccount.style.display = name ? '' : 'none';
|
|
if (!name) { return; }
|
var currentAccounts = accounts[name];
|
var selAccounts = document.getElementById('selAccounts');
|
selAccounts.options.length = 0;
|
var i = -1;
|
while (++i < currentAccounts.length) {
|
var optionItem = document.createElement('option');
|
optionItem.value = currentAccounts[i].Keyid;
|
optionItem.innerHTML = currentAccounts[i].AccountName + '-' + currentAccounts[i].UserName;
|
selAccounts.appendChild(optionItem);
|
}
|
};
|
|
function LoadAccountType() {
|
var td_receiveWay = document.getElementById('td_receiveWay');
|
td_receiveWay.parentNode.style.display = td_receiveWay.style.display = '<%=Request["isprepareway"] %>';
|
if (td_receiveWay.style.display) { return; } else;
|
var thtml = '';
|
var i = -1;
|
while (++i < accountsTypes.length) {
|
thtml += ("<input type='radio' name='rdoReceiveWay' id='rdoReceiveWay" + accountsTypes[i].Keyid + "' value='"
|
+ accountsTypes[i].Keyid + "' onclick=\"CheckedChanging(this,'" + accountsTypes[i].Name + "')\" /><label for='rdoReceiveWay" + accountsTypes[i].Keyid + "'>" + accountsTypes[i].Name + "</label>  ");
|
}
|
document.getElementById('spn_receiveWay').innerHTML = thtml;
|
|
}
|
/*
|
验证输入价格
|
*/
|
function ValidateInputPrice(txt) {
|
if (!ValidateDecimal(txt)) return; else;
|
try {
|
var inputPrice = parseFloat(txt.value);
|
var unPayed = parseFloat(document.getElementById('hidReceiveMoney').value);
|
txt.value = isNaN(inputPrice) || isNaN(unPayed) ? 0 : txt.value;
|
if (inputPrice > unPayed) { alertMsg(' 本次收款金额大于订单未付款!<br/>为了您的账务正确性请重新复查!'); }
|
|
} catch (e) {
|
|
}
|
|
}
|
</script>
|
</head>
|
<body style='margin: 0; padding: 0;'>
|
<form id="form1" runat="server" onsubmit="if(false)return false;">
|
<input type="hidden" id='txtResult' value='<%=Request.RequestContext.RouteData.DataTokens["IsWin"] %>'>
|
<table class="table2" width="100%">
|
|
<tr>
|
<td colspan='3' class='col_third'>
|
客户名称:
|
<input id='txtBuyerName' runat="server" style='width: 220px;' readonly="readonly" />
|
</td>
|
</tr>
|
<tr>
|
<td colspan='3' class='col_third'>
|
发票号:
|
<input id='txtFapiaohao' runat="server" style='width: 220px;' readonly="readonly" />
|
</td>
|
</tr>
|
<tr>
|
<td colspan='3' class='col_third'>
|
应收款:
|
<input id='txtSumMoney' runat="server" style='width: 120px;' onblur='ValidateInputPrice(this)' readonly="readonly" />
|
<input type="hidden" runat="server" id='hidReceiveMoney' />
|
</td>
|
</tr>
|
<tr>
|
<td colspan='3' class='col_third'>
|
收款金额:
|
<input id='txtReceiveMoney' runat="server" maxlength='16' style='width: 120px;' onblur='ValidateInputPrice(this)' />
|
</td>
|
</tr>
|
|
|
|
|
|
<tr>
|
<td class="contentLeft" colspan='3'>
|
     <%--<input type="button" value="确认收款" runat="server" id='btnSubmit' />--%>
|
|
<asp:Button ID="btn_Submit" Text="确认收入" runat="server" OnClick="btn_Submit_form" OnClientClick="if(CheckStaff())return true;else return false; " />
|
<input type="hidden" id="ids" runat="server" />
|
</td>
|
</tr>
|
</table>
|
|
<table class="tableStyle" useclick="false" usecheckbox="true" sortmode="false" id="test_table" >
|
<thead>
|
<tr>
|
<th width="25">
|
</th>
|
<th width="25">
|
编号
|
</th>
|
<th style="text-align: center;" >
|
客户名称
|
</th>
|
|
<th style="text-align: center;"width="70">
|
收款日期
|
</th>
|
|
<th width="60">
|
金额
|
</th>
|
<th width="60">
|
已确认
|
</th>
|
<th width="60">
|
未确认
|
</th>
|
|
|
</tr>
|
</thead>
|
<tbody>
|
<asp:repeater id="rptData" runat="server">
|
<itemtemplate>
|
<tr>
|
<td>
|
<input type="checkbox" name='ckId' value_keyid="<%#Eval("Keyid")%>" value="{
|
id:<%#Eval("Keyid")%>,
|
buyerId:'<%#Eval("BuyerId")%>',
|
|
fukuanmoney:<%#Eval("Fukuanmoney")%>,
|
querenstatus:<%#Eval("Querenstatus")%>,
|
|
hexiaomoney:<%#Eval("Hexiaomoney")%>,
|
|
}" id='ckBox<%#Container.ItemIndex%>' class='ckBox' onclick="jisuanheji();" />
|
</td>
|
<td class="ItemIndex">
|
<%#Container.ItemIndex +1 /*(UCPager1.PageSize *( UCPager1.PageIndex-1)+1)*/%>
|
</td>
|
<td style="text-align: center;">
|
|
<%#Eval("BuyerName")%>
|
|
</td>
|
<td style="text-align: center;">
|
|
|
<%#Eval("CreateTime", "{0:yyyy-MM-dd}")%>
|
|
</td>
|
|
|
<td class="SumPrice">
|
<%#Eval("FukuanMoney", "{0:F}")%>
|
</td>
|
|
<td class="PayedMoney">
|
<%#Eval("Hexiaomoney", "{0:F}")%>
|
</td>
|
<td class="UnPayedMoney">
|
<%#Eval("WeiHexiaomoney","{0:F}")%>
|
</td>
|
|
</tr>
|
</itemtemplate>
|
</asp:repeater>
|
</tbody>
|
|
<tr class="StatisticsMoney">
|
<td colspan="6" class="ali03" style="text-align:left;">
|
选中合计:
|
</td>
|
|
<td class="ali01" >
|
<span id="NoMoney" runat="server" ></span>
|
</td>
|
|
</tr>
|
</table>
|
</form>
|
</body>
|
</html>
|