📄 mlistview.asp
字号:
Rs("totalmoney") = AmountALL_
nowpayment_ = GetText("nowpayment","P","number",1,10,0) '已经支付
Rs("inpayment") = nowpayment_
nopayment_ = GetText("nopayment","P","number",1,10,0)
Rs("nopayment") = AmountALL_ - nowpayment_
Rs("uaid") = Seuid_inc '最后更新者id
Rs("selectaid") = GetText("aid","P","number",1,10,0)
Rs.update
RsStockmid = SelectZD("select stockmid from stockm Order by stockmid desc",0)
else
Response.end
end if
Rs.Close
Call SaleAdd(Lena , RsStockmid)
Public Sub SaleAdd(Lena , RsStockmid)
if RsStockmid = 0 then Exit Sub
stockList = c01.splitList(Lena,",",0)
UboundCount_ = Ubound(Split(stockList,","))
for i_add = 0 to UboundCount_
stockid_ = isNumber(tempSplit(stockid,",",i_add,0),"int",0)
Code_ = tempSplit(Code,",",i_add,""):if Code_ = "" then Code_ = " "
cName_ = tempSplit(cName,",",i_add,""):if cName_ = "" then cName_ = " "
inHow_ = isNumber(tempSplit(inHow,",",i_add,0),"int",0)
inPrice_ = isNumber(tempSplit(inPrice,",",i_add,0),"int",0)
outPrice_ = isNumber(tempSplit(outPrice,",",i_add,0),"dec",0)
guarantyTime_ = tempSplit(guarantyTime,",",i_add,""):if guarantyTime_ = "" then guarantyTime_ = " "
cRemark_ = tempSplit(cRemark,",",i_add,""):if cRemark_ = "" then cRemark_ = " "
mTypeSelect_ = isNumber(tempSplit(mTypeSelect,",",i_add,0),"dec",0)
if mTypeSelect_ = 0 or stockid_ = 0 then
Response.Write "行[" & i_add & "]没有更新.因为该行没有选择好商品类别或该记录不存在!<br/>"
else
Rs.Open("select * from stock where stockid =" & stockid_ & " and isstockid = " & RsStockmid & ""),Conn,1,3
if not Rs.eof then
Rs("isstockid") = RsStockmid
Rs("Code") = Code_
Rs("cName") = cName_
Rs("supplierid") = supplierid
Rs("inHow") = inHow_
Rs("inPrice") = inPrice_
Rs("outPrice") = outPrice_
Rs("guarantyTime") = guarantyTime_
Rs("cRemark") = cRemark_
Rs("mtypeid") = mTypeSelect_
Rs("total") = inHow_ * inPrice_
Rs("thisDate") = thisDate
Rs("auid") = Seuid_inc'最后更新aid
Rs("disabled") = 1
Rs.update
else
end if
end if
Rs.Close
next
End Sub
Public Function tempSplit(vin,sgin,isStep,LasttempSplit)
if vin = "" or isnull(vin) then
exit function
end if
vinSplit = Split(Replace(vin," ",""),sgin)
SplitCount = UBound(Split(vin,sgin))
if isStep > SplitCount then
tempSplit = LasttempSplit
exit function
end if
tempSplit = htmlencode(vinSplit(isStep),"Y")
End Function
Response.Write viewinfo("divLoca","正在更新信息.请稍候…","")
Response.Write viewinfo("LocaTimeself","",SELVAR("FN","mListview.asp") & "?stockmid=" & stockmid)
else
Response.Write viewinfo("divLoca","保存不成功.因为没有正确选择商家或商品类别…<div class='LinkA' style = 'padding:5px;'><a href='javascript:history.back(-1);'>点击这里返回</a></div>","")
end if
end if
%>
<table border = '0' cellspacing = '0' cellpadding = '1' borderColorLight='#848284' borderColorDark='#eeeeee' style = 'width:100%;height:auto; background-color:buttonface; border-left: 0px solid buttonhighlight; border-right: 0px solid buttonshadow;color: #FF9900;border-top: 0px solid buttonhighlight; border-bottom: 1px solid buttonshadow;padding: 1px ;'/>
<tr>
<form method='post' action="<%=SELVAR("FN","outview.asp")%>" name = 'form' id = 'form' >
<input type = 'hidden' name = 'Options' value = 'update' />
<input type = 'hidden' name = 'stockmid' value = '<%=stockmid%>'/>
<td style = 'width:auto;'> </td>
<td style = 'width:10px;'></td>
<td style = 'width:35px; height:33px;'><div class = 'bar' style = 'width:35px; height:33px;' id = 'salePic'></div></td>
<td style = 'width:10px;'></td>
<td style = 'width:35px; height:33px;'><div class = 'bar' style = 'width:35px; height:33px;'> <a href = "javascript:form.reset();" ><img src="../images/reset00.gif" width="35" height="33" border="0" alt="取消"></a></div></td>
<td style = 'width:10px;'></td>
<td style = 'width:35px; height:33px;'><div class = 'bar' style = 'width:35px; height:33px;'><a href = "javascript:location.reload();" /><img src="../images/reload00.gif" width="35" height="33" border="0" alt="刷新"></div></td>
<td style = 'width:10px;'></td>
</tr>
</table>
<div style = 'width:100%;text-align:left;background-color:buttonface; border-left: 0px solid buttonhighlight; border-right: 0px solid buttonshadow;color: #FF9900;border-top: 1px solid buttonhighlight; border-bottom: 1px solid buttonshadow;padding: 1px ;'>
<table style = 'width:auto;' cellspacing = '0' cellpadding = '1' border ='0' class = 'tempA'>
<tr>
<td> </td>
<td> 销售日期 </td>
<td style = 'width:80px;'><input type = 'text' name="thisDate" onfocus="setday(this)" size="9" maxlength="10" readonly value = '<%=thisDate_%>'/></td>
<td> 发票号码 </td>
<td style = 'width:80px;'><input type = 'text' name = 'plNum' style = 'width:100%' value = '<%=c01.HtmlF(plNum_)%>'/></td>
<td> 销售号码 </td>
<td style = 'width:90px;'><input type = 'text' name = 'saleNum' style = 'width:100%' value = '<%=c01.HtmlF(stockNum_)%>' readonly/></td>
<td style = 'text-align:right;width:60px;'> 客户代码 </td>
<td style = 'width:80px;'><input type = 'text' name = 'supplierCode' style = 'width:70%;border-right-style:none;' value = '<%=c01.HtmlF(USCode)%>'/><input type = 'button' value = '…' style = 'border-left-style:none;' onclick = "javascript:Opensupplier();"/></td>
<td style = 'text-align:right;width:60px;'> 名称 </td>
<td style = 'width:110px;'><input type = 'text' name = 'supplierName' style = 'width:100%' class='tempB' value = '<%=c01.HtmlF(USFullName)%>' readonly/></td><input type = 'hidden' name = 'supplierid' readonly value = '<%=USuid%>'/>
<td style = 'text-align:right;width:60px;'> 联系 </td>
<td style = 'width:120px;'><input type = 'text' name = 'Linkman' style = 'width:100%' class='tempB' value = '<%=c01.HtmlF(USLinkman) & " " & c01.HtmlF(USLinkPhone)%>' readonly/></td>
</tr>
</table>
</div>
<table style = 'height:auto;width:100%; border-left: 0px solid buttonhighlight; border-right: 0px solid buttonshadow;border-top: 1px solid buttonhighlight; border-bottom: 0px solid buttonshadow;' cellspacing = '2' cellpadding = '0'>
<tr>
<td style = 'border-top:#848284 solid 1px;border-left:#848284 solid 1px; border-bottom:#ffffff solid 1px;border-right:#ffffff solid 1px;'>
<div style = 'width:100%;height:480px; left:0px; top:0px;z-index:1; overflow-y: auto;overflow-x:hidden;text-align:left;background-color:#ffffff; border-left: 1px solid #000000; border-right: 1px solid buttonface;border-top: 1px solid #000000; border-bottom: 1px solid buttonface;padding: 0px;'>
<table cellpadding='0' cellspacing='0' style = 'width:auto;background-color:buttonface;border-top-style:none;border-left-style:none;table-layout:fixed; word-break:break-all;' borderColorLight='#424142' borderColorDark='#eeeeee' border = '1' class = 'tempG'>
<tr style = 'text-align:center;background-color:buttonface;'>
<td style ='height:20px;width:20px;'> </td>
<td style ='width:40px;'>序号</td>
<td style ='width:60px;'>代码</td>
<td style ='width:auto;'>名称</td>
<td style ='width:70px;'>进价</td>
<td style ='width:70px;'>销价</td>
<td style ='width:50px;'>进货数</td>
<td style ='width:50px;'>单位</td>
<td style ='width:100px;'>类别</td>
<td style ='width:50px;'>已销售</td>
<td style ='width:50px;'>现库存</td>
<td style ='width:50px;'>返修</td>
<td style = 'width:80px;text-align:center;'>小计</td>
</tr>
<%
SQL = "select * from stock where isstockid = " & stockmid_ & ""
Rs.Open(SQL),Conn,1,1
if not Rs.eof then
tCount = Rs.RecordCount
for i_t = 1 to tCount
if Rs.eof then exit for
sid = Rs("stockid")'
supplierid = isNumber(Rs("supplierid"),"int",0)'相应供应商id
mtypeid = isNumber(Rs("mtypeid"),"int",0)'所属商品类别id
Rmtypeid = mtypeid
Code = Rs("Code") & ""'代码
cName = Rs("cName") & ""'中文名
eName = Rs("eName")'英文名
eRemark = Rs("eRemark")'英文备注
cRemark = Rs("cRemark")'中文备注
typeCode = Rs("typeCode")'型号条码
Quality = Rs("Quality") '性质
inprice = Rs("inprice")'参考进货价
outprice = Rs("outprice")'参考预出售价
inhow = Rs("inhow")'数量
unit = Rs("unit")'单位
total = Rs("total")'总价格
inpayment = Rs("inpayment")'已支付给供应商
intotime = Rs("intotime")'进货时间
updatetime = Rs("updatetime")'最后修改时间
guarantyTime = Rs("guarantyTime")'保修期
guarantyRemark = Rs("guarantyRemark")'保修期备注
stockMax = Rs("stockMax")'库存上限
stockMin = Rs("stockMin")'库存下限
thisDate = Rs("thisDate")'
aid = Rs("aid")'
auid = Rs("auid")'
disabled = isNumber(Rs("disabled"),"int",0)'
serviceCount = SelectZD("select Count(proserviceid) from ProductsService where stockid = " & sid & "",0)
outHow = Rs("outhowed") 'SelectZD("select Sum(outHow) from salelist where stockid = " & sid & "",0)
AmountALL = AmountALL + (inhow*inprice)
%>
<tr style = 'background-color:#ffffff;cursor: default;text-align:center;' >
<td style = 'text-align:center;background-color:buttonface;height:18px;'>×</td>
<input type = 'hidden' name = 'lena'/>
<input type = 'hidden' name = 'stockid' value = '<%=sid%>'/>
<td style = 'text-align:center;'><input type = 'hidden' style = 'border-style:none;' value = '<%=sid%>'/><%=sid%></td>
<td style ='padding:0px;'><input type="text" name="Code" style = 'border-style:none;width:48px;'value = '<%=c01.HtmlF(Code)%>'></td>
<td><input type = 'text' name = 'cName' class = 'tempE' style ='text-align:left;' value = '<%=c01.HtmlF(cName)%>'/></td>
<td><input type = 'text' name = 'inPrice' class = 'tempE' onkeyup = 'ChangePrice();' value = '<%=inPrice%>'/></td>
<td><input type = 'text' name = 'outPrice' class = 'tempE' value = '<%=outPrice%>'/></td>
<td><input type = 'text' name = 'inHow' class = 'tempE' onkeyup = 'ChangePrice();' value='<%=inHow%>'/></td>
<td><input type = 'text' name = 'unit' class = 'tempE' value = '<%=c01.HtmlF(unit)%>'/></td>
<%SQL = "Select * from mtype where mTypeSelect = 0 Order by mtypeArray desc , mtypeid desc"%>
<td><%=mtypeSub(SQL,Rmtypeid,"auto;margin-left:-5px;margin-right:-2px;margin-top:-2px;margin-bottom:-2px;","mTypeSelect",mTypeALL)%></td>
<td><input type = 'text' name = 'unit' class = 'tempE' value = '<%=c01.HtmlF(unit)%>' /></td>
<td><input type = 'text' name = 'guarantyTime' class = 'tempE' value='<%=c01.HtmlF(guarantyTime)%>'/></td>
<td><input type = 'text' name = 'cRemark' class = 'tempE' value='<%=c01.HtmlF(cRemark)%>'/></td>
<td><input type = 'text' name = 'Amount' class = 'tempE' readOnly = 'true' value = '<%=total%>'/>
</td>
</tr>
<%
Rs.movenext
next
%>
<script type = 'text/javascript'>
<!--
salePic.innerHTML = " <a href = \"javascript:form.submit();\" onclick =\"javascript:return newSupplier();\"><img src=\"../images/save00.gif\" width=\"35\" height=\"33\" border=\"0\" alt=\"保存\"></a>"
//-->
</script>
<%
else
%>
<script type = 'text/javascript'>
<!--
salePic.innerHTML = " <img src=\"../images/save00.gif\" width=\"35\" height=\"33\" border=\"0\" alt=\"无记录保存\">"
//-->
</script>
<%
end if
Rs.Close
%>
</table>
</div></td>
</tr>
</table>
<table style = 'height:auto;width:100%;' cellspacing = '0' cellpadding = '2' borderColorLight='buttonshadow' borderColorDark='#eeeeee' border = '1'>
<tr>
<td>
<table style = 'width:auto;' cellspacing = '0' cellpadding = '2'>
<tr>
<td style = 'width:48px;'>总金额</td>
<td style = 'width:120px;'><input type = 'text' style = 'width:100%;' name = 'AmountALL' value = '<%=AmountALL%>' readOnly = 'true'/></td>
<td style = 'width:60px;text-align:center;'>已付商家</td>
<td style = 'width:120px;'><input type = 'text' style = 'width:100%;' name = 'nowpayment' onkeyup = 'ChangePrice();' value = '<%=inpayment_%>'/></td>
<td style = 'width:50px;text-align:center;'>未支付</td>
<td style = 'width:100px;'><input type = 'text' style = 'width:100%;' name = 'nopayment' value = '<%=nopayment_%>' readOnly = 'true'/></td>
<td> 后来支付:<span style = 'color:blue;'>¥<%=formatNumber(elsePayment_,2)%></span></td>
<td> 该单实际欠款:<span style = 'color:blue;'>¥<%=formatNumber(AmountALL-inpayment_-elsePayment_,2)%></span></td>
</tr>
</table>
<%
SQL = "select * from admins where aid = " & selectaid_ & ""
c01.Admininfo
%>
<table style = 'width:auto;' cellspacing = '0' cellpadding = '2'>
<tr>
<td style = 'width:48px;'>操作员</td>
<td style = 'width:128px;'><input type = 'text' style = 'width:80%;border-right-style:none;' name = 'Loginid' value = '<%=ATrueName%>' readonly/><input type = 'button' style = 'border-left-style:none;' value = '…' onclick = "javascript:adminList();"/></td>
<td style = 'width:300px;text-align:center;'><input type = 'text' style = 'width:100%;' name = 'TrueName_Phone' class = 'tempB' value = '<%=ATrueName & " " & APhone %>' readonly/>
<input type = 'hidden' name = 'aid' value ='<%=AAid%>' readonly/>
</td>
<td style =' width:20px;'> </td>
<td>录入者:<%=SelectZD("select TrueName from admins where aid = " & intoaid_ & "","未知")%></td>
<td style =' width:20px;'> </td>
<td>详细录入时间:<%=intotime_%></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
</div>
</body>
</html>
<%
ConnClose()
Set c01 = nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -