📄 stocknum_right.asp
字号:
<%@language="vbscript" codepage="936"%>
<%response.buffer = true%>
<%Public HOME_PATH:HOME_PATH = "../"%>
<!--#include file="../db.asp"-->
<!--#include file="../inc/function.asp"-->
<%Public title:title = "库存列表"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title><%=title%></title><%
if isLogin = false then
Response.Write viewinfo("Logingo","","")
Response.end
end if
%><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<link href="<%=HOME_PATH%>css/style.css" rel="stylesheet" type="text/css">
<script type = 'text/javascript' src = '<%=HOME_PATH%>js/layer00.js'></script>
<script type = 'text/javascript' src = '<%=HOME_PATH%>js/dateselect.js'></script>
<style type = 'text/css'>
.tempA td {border-top:solid 0px #fff;border-left:solid 0px #fff;border-right:solid 1px #d6d3ce;border-bottom:solid 1px #d6d3ce;}
.clicked { color:#ffffff;border-left:solid 0px #fff;border-right:solid 0px #d6d3ce;border-top:solid 0px #ffffff;}
.clickedtab td{ color:#ffffff;border-top:solid 0px #fff;border-left:solid 0px #fff;border-right:solid 1px #d6d3ce;border-bottom:solid 1px #d6d3ce;}
</style>
<script language="JavaScript">
<!--
function clicked_(s) {
var td_len = td_.length;
if (td_len == undefined) {
td_.className = 'clicked';
form.box_.checked = true;
}else{
for(i_ = 0 ; i_<td_len;i_++) {
if(s!=i_) {
td_[i_].className = '';
form.box_[i_].checked = false;
}else{
td_[i_].className = 'clicked';
form.box_[i_].checked = true;
}
}
}
boxfalse('m');
}
function boxfalse(s) {
var bLen = eval('form.box'+s+'_.length') ;
if (bLen == undefined) {
eval('td'+s+'_.className = \'\'') ;
eval('form.box'+s+'_.checked = false ');
}else{
for(i_b = 0; i_b<bLen ; i_b++) {
eval('td'+s+'_[i_b].className = \'\'');
eval('form.box'+s+'_[i_b].checked = false') ;
}
}
}
function clickedm_(s) {
var tdm_len = tdm_.length;
if (tdm_len == undefined) {
tdm_.className = 'clicked';
form.boxm_.checked = true;
}else{
for(i_ = 0 ; i_<tdm_len;i_++) {
if(s!=i_) {
tdm_[i_].className = '';
form.boxm_[i_].checked = false;
}else{
tdm_[i_].className = 'clicked';
form.boxm_[i_].checked = true;
}
}
}
boxfalse('');
}
function checked_(s) {
var selLen = form.selAnnounce.length ;
if (selLen==undefined) {
if(form.selAnnounce.checked == true) {
selid_.className = 'clicked' ;
}else{
selid_.className = '' ;
}
}else{
if(form.selAnnounce[s].checked == true) {
selid_[s].className = 'clicked';
}else{
selid_[s].className = '';
}
}
}
function checkedm(s) {
var mLen = form.selAnnouncem.length ;
if (mLen==undefined) {
if(form.selAnnouncem.checked == true) {
selidm_.className = 'clicked' ;
tab0.className = 'clickedtab' ;
}else{
selidm_.className = '' ;
tab0.className = 'tempA' ;
}
}else{
if(form.selAnnouncem[s].checked == true) {
selidm_[s].className = 'clicked';
var tab_ = eval('tab'+s) ;
tab_.className = 'clickedtab' ;
}else{
selidm_[s].className = '';
var tab_ = eval('tab'+s)
tab_.className = 'tempA' ;
}
}
}
//-->
</script>
<!--onClick="this.value=check(this.form.del_producr)-->
</head>
<body style = 'margin:0px;'>
<div style = 'text-align:center;'>
<%
Call DateSearch(DateStar,DateEnd,DateSQL,"ALL",Dateinfo)
Rsupplierid = GetText("selsupplierid","G","number",1,10,0)
if not Rsupplierid = 0 then
SupplierSQL = " and supplierid = " & Rsupplierid & ""
else
SupplierSQL = ""
end if
%>
<table border = '1' cellspacing = '0' cellpadding = '1' borderColorLight='#000000' borderColorDark='#eeeeee' style = 'width:100%;border-bottom:0px solid;border-right:0px solid;border-top:0px solid;border-left:0px solid;'/>
<form method='post' action="<%=SELVAR("FN","?")%>" name = 'formSearch'>
<input type = 'hidden' name = 'Searched' value = 'Y'/>
<tr>
<td style = 'text-align:left;'>
<table border = '0' >
<tr>
<td>
搜索:</td>
<td>
<%SQL = "select * from supplier where utypeid in(select utypeid from usertype where uTypeSelect in(select utypeid from usertype where identifyCode = 1 )) Order by uid desc"%>
经销商:</td>
<td><%=SearchSupplier(Rs,SQL,Rsupplierid,"selsupplierid","width:auto;")%></td>
<td> 日期选择:
从
<input type = 'text' name="DateStar" onfocus="setday(this)" size="10" maxlength="10" readonly value = '<%=DateStar%>' style = 'border:1px solid #000;line-height:17px;height:20px;text-align:center;'/>
到
<input type = 'text' name="DateEnd" onfocus="setday(this)" size="10" maxlength="10" readonly value = '<%=DateEnd%>' style = 'border:1px solid #000;line-height:17px;height:20px;text-align:center;' /></td>
<td><input type="button" value = '搜索' style = 'border:1px solid #000;line-height:17px;height:20px;' onclick="javascript:formSearch.submit();"/>
</td>
<td> <%=Dateinfo%> 记录</td>
</tr>
</table></td>
</tr>
</form>
</table>
<table border = '1' cellspacing = '0' cellpadding = '1' borderColorLight='#000000' borderColorDark='#eeeeee' style = 'width:100%;border-bottom:0px solid;border-right:0px solid;border-top:0px solid;border-left:0px solid;' class = 'LinkA'/>
<form method='post' action="<%=SELvar("FN","?")%>" name = 'form'>
<input type = 'hidden' name = 'Options'/>
<input type = 'hidden' name = 'Execute'/>
<input type = 'hidden' name = 'movetosupplierid'/>
<input type = 'hidden' name = 'movetomtypeid'/>
<tr style = 'text-align:left;'>
<td style = 'width:40px;height:20px;text-align:center;'>序号</td>
<td style = 'width:100px;'>进货编号</td>
<td style = 'width:150px;'>所属商家</td>
<td style = 'width:40px;'>子记录</td>
<td style = 'width:70px;'>总金额</td>
<td style = 'width:70px;'>已支付</td>
<td style = 'width:70px;'>未支付</td>
<td style = 'width:50px;'>日期</td>
<td style = 'width:auto;'>备注</td>
<td style = 'width:50px;text-align:center;'>支付</td>
<td style = 'width:34px;text-align:center;'><input name = '' type = 'button' style = 'border-style:none;' onClick="this.value=sel(this.form.selAnnouncem,'反选','全选',selidm_,'clicked');" value = '全选' onfocus="this.blur();"/></td>
</tr>
<tr>
<td style ='height:1px;line-height:1px;background-color:#adaaad;border-style:none;' colspan = '11'></td>
</tr>
<%
SQL = "select * from stockm where 1 = 1 " & DateSQL & SupplierSQL & " Order by thisDate Desc , stockmid desc"
'Response.Write SQL
Rs.Open(SQL),Conn,1,3
LinkFile = SELVAR("FN","adminlist_right.asp")
LUrl = "DateStar=" & DateStar & "&DateEnd=" & DateEnd & "&selsupplierid=" & Rsupplierid
dim uCount , KCJZinprice , KCJZoutprice , PCount
KCJZinprice = 0
KCJZoutprice = 0
thisPageSize = 20
PCount = 5 '当前页的前面和后面显示页数
if not Rs.eof then
PageWrite = PaginatinoGoogle(Rs,noteTotal,thisPageSize,LinkFile,LUrl,LArr)
for oRs_i = 1 to thisPageSize
if Rs.eof then exit for
stockmid_ = Rs("stockmid")
stockNum_ = Rs("stockNum")
plNum_ = Rs("plNum")
supplierid_ = Rs("supplierid")
totalmoney_ = Rs("totalmoney")
inpayment_ = Rs("inpayment")
nopayment_ = Rs("nopayment")
intotime_ = Rs("intotime")
updatetime_ = Rs("updatetime")
thisDate_ = Rs("thisDate")
intoaid_ = Rs("intoaid")
uaid_ = Rs("uaid")
selectaid_ = Rs("selectaid")
Remark_ = Rs("Remark")
totalmoneyCount_ = totalmoneyCount_ + totalmoney_ '进货总额
inpaymentCount = inpaymentCount+inpayment_'进货时支付
elsePayment_ = isNumber(SelectZD("select Sum(paymoney) from payment where paymenttoid = " & stockmid_ & " and supplierid = " & supplierid_ & "",0),"dec",0)'后来支付
elsePayment_Count = elsePayment_Count+elsePayment_'后来支付总额
nowinPayment_ = inpayment_+elsePayment_'单个记录已支付
nowNoPayment_ = (totalmoney_-nowinPayment_)'单个记录未支付
%>
<tr style = 'text-align:left;background-color:#ffffff' ondblclick = "javascript:WindowOpen('<%=HOME_PATH%>merchandise/mListview.asp?stockmid=<%=stockmid_%>','mListview',screen.availWidth-50,screen.availHeight-100,'');" onclick = "javascript:clickedm_(<%=oRs_i-1%>);" id = 'tab<%=oRs_i-1%>' class = 'tempA'>
<td style = 'text-align:center;height:18px;' ><%=stockmid_%></td>
<td id = 'tdm_'><%=stockNum_%><input type = 'hidden' name = 'boxm_' value = '<%=stockmid_%>'/><input type = 'hidden' name = 'box_' value = '<%=stockmid_%>'/><span id = 'td_'></span></td>
<td><a href="javascript:SDD('<%=HOME_PATH%>supplier/supplierview.asp?uid=<%=supplierid_%>','supplierview',778,480,'');"><%SFullName = SelectZD("select FullName from supplier where uid = " & supplierid_ & "","未知"):Response.Write SFullName%></a></td>
<td style = 'text-align:center;'><%=SelectZD("select Count(stockid) from stock where isstockid=" & stockmid_ & "",0)%></td>
<td>¥<%=FormatNumber(totalmoney_,2)%></td>
<td><a href = "javascript:SDD('<%=HOME_PATH%>merchandise/paymentoutedList.asp?paymenttoid=<%=stockmid_
%>','paymentedto',600,350,'');">¥<%=FormatNumber(nowinPayment_,2)%></a></td>
<td <%=v1v2(nowNoPayment_,0,""," style = 'background-color:red;color:#ffffff;' ")%>>¥<%=FormatNumber(nowNoPayment_,2)%></td>
<td><%=thisDate_%></td>
<td style = 'text-align:left;'><%=Remark_%><input type = 'checkbox' style = 'visibility:hidden;border-style:none;widht:0px;height:0px;' name = 'selAnnounce' value = ''/></td>
<td style = 'text-align:left;'><a href="javascript:SDD('paymentout.asp?paymenttoid=<%=stockmid_%>&uid=<%=supplierid_%>','paymentin',380,380,'');">点击支付</a></td>
<td style = 'text-align:center;' id = 'selidm_'><input type = 'checkbox' style = 'border-style:none;widht:15px;height:15px;' name = 'selAnnouncem' onClick = "javascript:checkedm(<%=oRs_i-1%>);" onfocus="this.blur();" value = '<%=stockmid_%>'/></td>
</tr>
<%
Rs.movenext
next
Response.Write"<tr><td style = 'text-align:center;' colspan = '11'>" & PageWrite & "</td></tr>"
incfinancePayment = isNumber(SelectZD("select Sum(fMoney) from incfinance where 1 = 1 " & SupplierSQL & DateSQL & " and inorout = 0 ",0),"dec",0)'财务表支付总额
AboutincfinancePayment = isNumber(SelectZD("select Sum(fMoney) from incfinance where 1 = 1 " & SupplierSQL & DateSQL & " and inorout = 0 and supplierid > 0 ",0),"dec",0)'与相关的支付
AboutincfinanceNoPayment = isNumber(SelectZD("select Sum(fMoney) from incfinance where 1 = 1 " & SupplierSQL & DateSQL & " and inorout = 0 and supplierid > 0 and paymentid <=0 ",0),"dec",0)'与相关但不在payment表中的支付
nowPaymentCount = (elsePayment_Count+inpaymentCount+AboutincfinanceNoPayment)'总的支付
nowNoPaymentCount = totalmoneyCount_ - nowPaymentCount'实际欠款
%>
<tr>
<td style = 'text-align:left;padding:5px;line-height:18px;' colspan = '11'>
<fieldset style = 'width:100%;line-height:16px;text-align:left;'><legend>相关信息</legend>
·日期选择:<%=Dateinfo%><br/>
·商家全称:<%=v1v2(Rsupplierid,0,"全部",SFullName)%><br/>
·进货总额:¥<%=FormatNumber(totalmoneyCount_,2)%><br/>
·进货支付:¥<%=FormatNumber(inpaymentCount,2)%><br/>
·后来支付:<span style = 'color:red;'>¥<%=FormatNumber(elsePayment_Count,2)%></span>
(后来支付包含相关的财务表与支付表共同的支付记录.财务表支付总记录:¥<%=FormatNumber(incfinancePayment,2)%>.其中与以上相关支付记录总额为:¥<span style = 'color:red;'><%=FormatNumber(AboutincfinancePayment,2)%></span>)<br/>
·总的支付:¥<%=FormatNumber(nowPaymentCount,2)%><br/>
·实际欠款:¥<%=FormatNumber(nowNoPaymentCount,2)%><br/><%=abc%>
</fieldset>
<br/>
</td>
</tr>
<%
else
%>
<tr style = 'background-color:#ffffff;' class = 'tempA'>
<input type = 'hidden' name = 'selAnnouncem' value = ''/>
<input type = 'hidden' name = 'boxm_' value = ''/>
<input type = 'hidden' name = 'selAnnounce' value = ''/>
<input type = 'hidden' name = 'box_' value = ''/>
<td> </td>
<td> <span id = 'selidm_'></span></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> <input type = 'checkbox' style = 'border-style:none;widht:15px;height:15px;visibility:hidden;' name = 'selAnnouncem' onClick = "javascript:checkedm(<%=oRs_i-1%>);" onfocus="this.blur();" value = '<%=stockmid_%>'/></td>
</tr>
<%
end if
Rs.Close
%>
</table>
</form>
<%
Options = trim(Request.Form("Options"))
if Options = "delTruem" then
Set c01 = new CL01
ExecuteList = c01.splitList(trim(Request.Form("Execute")),",",0)
SQLService = "delete from ProductsService where stockid in(select stockid from stock where isstockid in (" & ExecuteList & "))" '先删除返修表中的相关记录
SQLStock = "delete from stock where isstockid in(" & ExecuteList & ")"'删除库存表记录
SQLStockm ="delete from stockm where stockmid in(" & ExecuteList & ")"'删除主表中的记录
SQLstockPayment = "delete from payment where paymenttoid in(" & ExecuteList & ") and inorout = 0 "
SQLincfinance = "delete from incfinance where paymentid in(select paymentid from payment where paymenttoid in(" & ExecuteList & ")) and inorout = 0"
Conn.Execute(SQLincfinance)'删除财务表相关记录
Conn.Execute(SQLstockPayment)'删除相关支付
Conn.Execute(SQLService)
Conn.Execute(SQLStock)
Conn.Execute(SQLStockm)
Response.Write viewinfo("divLoca","正在执行删除(主记录)操作.请稍候…","")
Response.Write viewinfo("LocaTimeself","",SELVAR("FN","mlist_right.asp"))
end if
if trim(Request.Form("Searched")) = "Y" then Response.Redirect(LinkFile & "?" & LUrl)
Set c01 = Nothing
ConnClose()
'Response.Write endtime*1000
%>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -