📄 mlistadd.asp
字号:
end if
next
if intoAdd > 0 then
SQL = "select * from stockm where (stockmid is null)"
Rs.Open(SQL),Conn,1,3
Rs.Addnew
Rs("plNum") = htmlencode(GetText("plNum","P","Str",1,110,"none"),"Y")'发票号
Rs("stockNum") = stockNum'进货号
Rs("supplierid") = GetText("supplierid","P","number",1,10,0)'商家id
Rs("thisDate") = thisDate
Rs("intotime") = now '提交时间
AmountALL_ = GetText("AmountALL","P","number",1,10,0) '该单总价格
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("intoaid") = 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)
Rs.Close
Call SaleAdd(Lena , RsStockmid)
Public Sub SaleAdd(Lena , RsStockmid)
if RsStockmid = 0 then Exit Sub
Rs.Open("select * from stock where (stockid is null)"),Conn,1,3
stockList = c01.splitList(Lena,",",0)
UboundCount_ = Ubound(Split(stockList,","))
for i_add = 0 to UboundCount_
Code_ = tempSplit(Code,",",i_add,""):if Code_ = "" then Code_ = " "
cName_ = tempSplit(cName,",",i_add,""):if cName_ = "" then cName_ = " "
model_ = tempSplit(model,",",i_add,""):if model_ = "" then model_ = " "
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 then
Response.Write "行[" & i_add & "]没有录入.因为该行没有选择好商品类别!<br/>"
else
Rs.Addnew
Rs("isstockid") = RsStockmid
Rs("Code") = Code_
Rs("cName") = cName_
Rs("model") = model_
Rs("stockNum") = stockNum
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("aid") = Seuid_inc
Rs("disabled") = 1
Rs.update
end if
next
Rs.Close
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","mlistAdd.asp"))
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 = '2' borderColorLight='#848284' borderColorDark='#eeeeee' style = 'width:100%;height:auto; border-left: 1px solid buttonhighlight; border-right: 1px solid buttonshadow;color: #FF9900;border-top: 0px solid buttonhighlight; border-bottom: 1px solid buttonshadow;padding: 1px ;'/>
<tr>
<form method='post' action="<%=SELVAR("FN","out.asp")%>" name = 'form' >
<input type = 'hidden' name = 'Options' value = 'Add' />
<td style = 'width:10px;'></td>
<td style = 'width:55px; height:53px;'><div class = 'bar' style = 'width:55px; height:53px;' /><a href = "<%=HOME_PATH%>admin/adminlist.asp" target = '_top'><img src="../images/admin00.gif" width="55" height="53" border="0" alt="管理员列表"></a></div></td>
<td style = 'width:10px;'></td>
<td style = 'width:55px; height:53px;'><div class = 'bar' style = 'width:55px; height:53px;' /><a href = "<%=HOME_PATH%>supplier/supplierlist.asp" target= '_top'><img src="../images/kc00.gif" width="55" height="53" border="0" alt="客商列表"></a></div></td>
<td style = 'width:10px;'></td>
<td style = 'width:55px; height:53px;'><div class = 'bar' style = 'width:55px; height:53px;' /><a href = "<%=HOME_PATH%>merchandise/mlist.asp" target= '_top'><img src="../images/stock00.gif" width="55" height="53" border="0" alt="库存商品"></a></div></td>
<td style = 'width:10px;'></td>
<td style = 'width:55px; height:53px;'><div class = 'bar' style = 'width:55px; height:53px;' /><a href = "<%=HOME_PATH%>sale/out.asp" target= '_top'><img src="../images/outPro00.gif" width="55" height="53" border="0" alt="出售商品"></a></div></td>
<td style = 'width:10px;'></td>
<td style = 'width:55px; height:53px;'><div class = 'bar' style = 'width:55px; height:53px;' /><a href = "<%=HOME_PATH%>sale/outhistory.asp" target= '_top'><img src="../images/outHistory00.gif" width="55" height="53" border="0" alt="销售历史"></a></div></td>
<td style = 'width:10px;'></td>
<td style = 'width:55px; height:53px;'><div class = 'bar' style = 'width:55px; height:53px;' /><a href = "<%=HOME_PATH%>usertype/ALLtype.asp" target= '_top'><img src="../images/class00.gif" width="55" height="53" border="0" alt="类别管理"></a></div></td>
<td style = 'width:10px;'></td>
<td style = 'width:55px; height:53px;'><div class = 'bar' style = 'width:55px; height:53px;' /><a href = "<%=HOME_PATH%>ProductsService/ProService.asp" target= '_top'><img src="../images/proservice00.gif" width="55" height="53" border="0" alt="商品维修"></a></div></td>
<td style = 'width:10px;'></td>
<td style = 'width:55px; height:53px;'><div class = 'bar' style = 'width:55px; height:53px;' /><a href = "javascript:WindowOpen('<%=HOME_PATH%>copyData/data.asp','data',730,320,'Y');"><img src="../images/data00.gif" width="55" height="53" border="0" alt="数据管理"></a></div></td>
<td style = 'width:auto;'> </td>
<td style = 'width:10px;'></td>
<td style = 'width:35px; height:auto;' valign='bottom'><div class = 'bar' style = 'width:35px; height:33px;'> <a href = "javascript:form.submit();" onclick ="onclick_();return newSupplier();"><img src="../images/save00.gif" width="35" height="33" border="0" alt="保存"></a></div></td>
<td style = 'width:10px;'></td>
<td style = 'width:35px; height:auto;' valign='bottom'><div class = 'bar' style = 'width:35px; height:33px;' onclick = "javascript:document.all.tableid.addnew();onclick_();" /><img src="../images/add00.gif" width="35" height="33" border="0" alt="增加"></div></td>
<td style = 'width:10px;'></td>
<td style = 'width:35px; height:auto;' valign='bottom'><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>
<td style = 'width:35px; height:auto;' valign='bottom'><div class = 'bar' style = 'width:35px; height:33px;'><a href = "javascript:SDD('<%=HOME_PATH%>Logout.asp','Logout',400,150,'');" /><img src="../images/exit00.gif" width="35" height="33" border="0" alt="退出"></div></td>
<td style = 'width:10px;'></td>
</tr>
</table>
<div style = 'width:100%;text-align:left; border-left: 1px solid buttonhighlight; border-right: 1px 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 = '<%=indexDate%>'/></td>
<td> 发票号码 </td>
<td style = 'width:80px;'><input type = 'text' name = 'plNum' style = 'width:100%'/></td>
<td> 进货号码 </td>
<td style = 'width:90px;'><input type = 'text' name = 'saleNum' style = 'width:100%' value = '<%=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;' readOnly ='true'/><input type = 'button' value = '…' style = 'border-left-style:none;' onclick = "javascript:Opensupplier();"/></td>
<td style = 'text-align:right;width:60px;'> 名称 </td>
<td style = 'width:120px;'><input type = 'text' name = 'supplierName' style = 'width:100%' class='tempB' readOnly ='true'/></td><input type = 'hidden' name = 'supplierid' readonly/>
<td style = 'text-align:right;width:60px;'> 联系 </td>
<td style = 'width:150px;'><input type = 'text' name = 'Linkman' style = 'width:100%' class='tempB' readOnly ='true'/></td>
</tr>
</table>
</div>
<table style = 'height:auto;width:100%; border-left: 1px solid buttonhighlight; border-right: 1px 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:420px; 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 class="tLine" id='tableid' cellpadding='0' cellspacing='0' style = 'width:auto;border-top-style:none;border-left-style:none;' borderColorLight='#424142' borderColorDark='#eeeeee' border = '1'>
<tr style = 'padding-left:3px;'>
<td style = 'width:15px;text-align:left;height:20px;padding:0px;'><span style='font-family:webdings;'>8</span></td>
<td style = 'width:15px;'> </td>
<td style = 'width:80px;'>商品代码</td>
<td style = 'width:100px;'>商品名称</td>
<td style = 'width:80px;'>型号</td>
<td style = 'width:50px;'>进价</td>
<td style = 'width:60px;'>销价</td>
<td style = 'width:50px;'>数量</td>
<td style = 'width:50px;'>单位</td>
<td style = 'width:80px;'>所属类</td>
<td style = 'width:50px;'>保修期</td>
<td style = 'width:200px;'>商品描述</td>
<td style = 'width:60px;'>小计</td>
</tr>
<tr>
<td style = 'text-align:left;'>×</td>
<td>
<input type = 'hidden' value = '0' name = 'lena' id = 'lena' style = 'border-style:none;text-align:center;width:100%;'/>
<input type = 'text' value = '0' name = 'len' style = 'border-style:none;text-align:center;width:100%;' readOnly = 'true'/></td>
<td style ='padding:0px;'><input type="text" name="Code" style = 'border-style:none;width:48px;'></td>
<td><input type = 'text' name = 'cName' class = 'tempE'/></td>
<td><input type = 'text' name = 'model' class = 'tempE' /></td>
<td><input type = 'text' name = 'inPrice' class = 'tempE' onkeyup = 'ChangePrice();'/></td>
<td><input type = 'text' name = 'outPrice' class = 'tempE' /></td>
<td><input type = 'text' name = 'inHow' class = 'tempE' onkeyup = 'ChangePrice();'/></td>
<td><input type = 'text' name = 'unit' class = 'tempE' /></td>
<%SQL = "Select * from mtype where mTypeSelect = 0 Order by mtypeArray desc , mtypeid desc"%>
<td><%=mtypeSub(SQL,Rmtypeid,"auto;margin:-1;","mTypeSelect",mTypeALL)%></td>
<td><input type = 'text' name = 'guarantyTime' class = 'tempE'/></td>
<td><input type = 'text' name = 'cRemark' class = 'tempE'/></td>
<td><input type = 'text' name = 'Amount' class = 'tempE' readOnly = 'true'/>
</td>
</tr>
</table>
</div></td>
</tr>
</table>
<table style = 'height:auto;width:100%;' cellspacing = '0' cellpadding = '2'>
<tr>
<td>
<input type = 'button' value = ' 添加行 ' onclick="javascript:document.all.tableid.addnew();onclick_();"/>
</td>
</tr>
</table>
<table style = 'height:auto;width:100%;' cellspacing = '0' cellpadding = '2' borderColorLight='#848284' borderColorDark='#eeeeee' border = '1'>
<tr>
<td style = 'border-left-style:none;border-right-style:none;'>
<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'/></td>
<td style = 'width:60px;text-align:center;'>已付商家</td>
<td style = 'width:120px;'><input type = 'text' style = 'width:100%;' name = 'nowpayment' onkeyup = 'ChangePrice();'/></td>
<td style = 'width:50px;text-align:center;'>尚欠款</td>
<td style = 'width:100px;'><input type = 'text' style = 'width:100%;' name = 'nopayment'/></td>
</tr>
</table>
<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 = '<%=SeTrueName_inc%>'/><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 = '<%=SeTrueName_inc%>'/>
<input type = 'hidden' name = 'aid'/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
<%ConnClose():Set c01 = Nothing%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -