📄 proserviceadd.asp
字号:
var admin_ = null ;
function adminList() {
admin_ = window.showModalDialog('<%=HOME_PATH%>admin/selectadminlist.asp','','dialogWidth:750px;dialogHeight:400px;scroll:yes;help:no;status:no;center:yes;edge:raised;');
if (admin_!=null) {
document.form.aid.value = admin_[0];
document.form.Loginid.value = admin_[1];
document.form.TrueName_Phone.value = admin_[2];
}
}
function submitthis() {
for(i = 0 ; i<form.selservice.length ; i++) {
if (form.selservice[i].checked) {
selValue = form.selservice[i].value
}
}
if(selValue == '1') {
if(document.form.mTypeid.value=='') {
alert('请选择返修商品! ');return false ;
}
}else{
if(document.form.mTypeSelect.value == '') {
alert('送修商品请选好商品种类的小类! ');
form.mTypeSelect.focus();return false;
}
}
return true ;
}
//-->typeCode
</script>
<base target="_self">
</head>
<body style = 'border-style:none;margin:0px;background-color:buttonface;'>
<div style = 'text-align:center;'>
<form method='post' action="<%=THF%>" name = 'form' language = "javascript" onload = "javascript:form.selservice.checked=true ;">
<fieldset style = 'width:398px;padding:8px;' class = 'temp'><legend>商品维修 - 请选择 送修<input type = 'radio' name = 'selservice' value = '0' onclick = "javascript:this.blur();proservice(0);"/> 返修<input type = 'radio' name ='selservice' value = '1' onclick = "javascript:this.blur();proservice(1);" checked/><span id = 'selsalelist' > <input type = 'button' value = '请点击这里选择返修商品' style = 'border:1px double #848284;width:150px;color:#414241;line-height:15px;' onclick = "javascript:this.blur();proservicesel();"/></span></legend>
<table border = '0' style = 'width:100%;' cellspacing = '0' cellpadding = '2' >
<input name = 'Options' type = 'hidden' value = 'Add'/>
<input name = 'stockid' type = 'hidden'/>
<input name = 'salelistid' type = 'hidden'/>
<input name = 'sale_supplierid' type = 'hidden'/>
<tr>
<td style = 'text-align:right;width:60px;height:28px;' id = 'saleName'><span style = "color:blue;">购买者</span></td>
<td style = 'text-align:left;width:auto;'><input type = 'text' name = 'sale_Name' style = 'width:100%;' class = 'tempA' readOnly = 'true'/></td>
</tr>
<tr>
<td style = 'text-align:right;width:60px;height:28px;'>代码</td>
<td style = 'text-align:left;width:auto;'><input type = 'text' name = 'Code' style = 'width:110px;' class = 'tempA' readOnly = 'true'/> 维修日期 <input type= 'serviceDate' style = 'width:130px;' onfocus="setday(this);" maxlength = '10' class = 'tempA' value = '<%=indexDate%>'/></td>
</tr>
<tr>
<td style = 'text-align:right;'>名称</td>
<td style = 'text-align:left;width:auto;'><input type = 'text' name = 'cName' style = 'width:100%;' class = 'tempA' readOnly = 'true'/></td>
</tr>
<tr>
<td style = 'text-align:right;'>英文名称</td>
<td style = 'text-align:left;width:auto;'><input type = 'text' name = 'eName' style = 'width:100%;' class = 'tempA' readOnly = 'true'/></td>
</tr>
<tr>
<td style = 'text-align:right;height:45px;'>英文描述</td>
<td style = 'text-align:left;width:auto;'><textarea name="eRemark" style = 'width:100%;height:40px;overflow-x:hidden;overflow-y:auto;' class = 'tempA' readOnly = 'true'></textarea></td>
</tr>
<tr>
<td style = 'text-align:right;'>型号条码</td>
<td style = 'text-align:left;width:auto;'><input type = 'text' name = 'typeCode' style = 'width:100%;' class = 'tempA' readOnly = 'true'/></td>
</tr>
<tr>
<%SQL = "Select * from mtype where mTypeSelect = 0 Order by mtypeArray desc , mtypeid desc"%>
<td style = 'text-align:right;'>商品种类</td>
<td style = 'text-align:left;width:auto;'>
<span id = 'proclass'><input type = 'text' style = 'width:100px;' name = 'mTypeSelect_' class = 'tempA' readOnly = 'true'/></span>
<span id = 'proclasssel' style = 'display:none;'><%=mtypeSub(SQL,Rmtypeid,"auto","mTypeSelect",mTypeALL)%></span></td>
<input type = 'hidden' name = 'mTypeid'/>
</tr>
<tr>
<td style = 'text-align:right;'>所属商家</td>
<td style = 'text-align:left;width:auto;'>
<input type = 'text' name = 'supplierCode_Name_Linkman' style = 'width:100%;' class = 'tempA' readonly/>
<td style = 'width:auto;'><input type = 'hidden' name = 'supplierid' value = 'abc' readonly/></td>
</tr>
<tr>
<td style = 'text-align:right;'>进 价</td>
<td style = 'text-align:left;width:auto;'>
<table style = 'width:100%;' cellspacing = '0' cellpadding = '0'>
<tr>
<td style = 'width:120px;'><input type = 'text' name = 'inprice' style = 'width:100%;' class = 'tempA' readOnly = 'true'/></td>
<td style = 'width:65px; text-align:right;'>销 价 </td>
<td style = 'width:120px;' ><input type = 'text' name = 'outprice' style = 'width:100%;' class = 'tempA' readOnly = 'true'/></td>
</tr>
</table></td>
</tr>
<tr>
<td style = 'text-align:right;'>单 位</td>
<td style = 'text-align:left;width:auto;'>
<table style = 'width:100%;' cellspacing = '0' cellpadding = '0'>
<tr>
<td style = 'width:120px;'><input type = 'text' name = 'unit' style = 'width:50px;'class = 'tempA' readOnly = 'true'/> 数量 <input type = 'text' style = 'width:30px;' name = 'outHow' class = 'tempA' readOnly = 'true'/></td>
<td style = 'width:65px; text-align:right;'>保修期 </td>
<td style = 'width:120px;'><input type = 'text' name = 'guarantyTime' style = 'width:100%;' class = 'tempA' readOnly = 'true'/></td>
</tr>
</table></td>
</tr>
<tr>
<td style = 'text-align:right;'>保修描述</td>
<td style = 'text-align:left;width:auto;'><input type = 'text' style = 'width:100%;' name = 'guarantyRemark' class = 'tempA' readOnly = 'true'/></td>
</tr>
<tr>
<td style = 'text-align:right;'>中文描述</td>
<td style = 'text-align:left;width:auto;height:45px;'><textarea name="cRemark" style = 'width:100%;height:40px;overflow-x:hidden;overflow-y:auto;' class = 'tempA' readOnly = 'true'></textarea></td>
</tr>
<tr>
<td style = 'text-align:right;'>维修金额</td>
<td style = 'text-align:left;width:auto;'><input type = 'text' style = 'width:100px;' name = 'servicemoney'/></td>
</tr>
<tr>
<td style = 'text-align:right;'>维修描述</td>
<td style = 'text-align:left;width:auto;height:45px;'><textarea name="serviceRemark" style = 'width:100%;height:40px;overflow-x:hidden;overflow-y:auto;'></textarea></td>
</tr>
<tr>
<td style = 'text-align:right;'>维修人</td>
<td style = 'text-align:left;width:auto;'><input type = 'text' style = 'width:60px;' name = 'Loginid' readOnly = 'true' style = 'border-right-style:none;'/><input type = 'button' value = '…' style = 'border-left-style:none;' onclick = "javascript:adminList();"/><input type = 'hidden' name ='aid'/><input type = 'text' name = 'TrueName_Phone' style = 'width:180px;border-style:none;border-bottom:solid 1px #000000;background-color:transparent;' value = '<%=SeTrueName_inc%>'/></td>
</tr>
<tr>
<td style = 'text-align:center;' colspan = '2'><input type="submit" value = ' 提交 ' onclick = "javascript:return submitthis();"/></td>
</tr>
</form>
</table></fieldset>
<%
Options = trim(Request.Form("Options"))
if Options = "Add" then
selservice = GetText("selservice","P","number",1,10,0)'
mtypeid_ = GetText(v1v2(selservice,0,"mTypeSelect","mtypeid"),"P","number",1,10,0)'
mtypeid_ = SelectZD("select mtypeid from mtype where mtypeid = " & mtypeid_ & "",0)
if mtypeid_ = 0 then
Response.Write viewinfo("alertBack","错误的商品子类别!","")
Response.end
end if
supplierid_ = GetText("supplierid","P","number",1,10,0)'
supplierid_ = SelectZD("select uid from supplier where uid = " & supplierid_ & "",0)
if supplierid_ = 0 and selservice = 1 then
Response.Write viewinfo("alertBack","请选好所属商家!","")
Response.end
end if
serviceDate_ = trim(Request.Form("serviceDate"))
if not isDate(serviceDate_) then serviceDate_ = indexDate
SQL = "select * from ProductsService where (proserviceid is null)"
Rs.Open(SQL),Conn,1,3
Rs.addnew
Rs("stockid") = GetText("stockid","P","number",1,10,0) '相关的库存产品id(0为送修商品)
Rs("salelistid") = GetText("salelistid","P","number",1,10,0)'相关的销售id(返修) - 0 为送修改
Rs("Code") = htmlencode(GetText("Code","P","Str",1,110,"none"),"Y")'代码
Rs("serviceDate") = serviceDate_'维修日期(搜索)
Rs("mTypeid") = mtypeid_
Rs("cName") = htmlencode(GetText("cName","P","Str",1,250,"none"),"Y")'中文名
Rs("eName") = htmlencode(GetText("eName","P","Str",1,250,"none"),"Y")'英文名
Rs("eRemark") = htmlencode(GetText("eRemark","P","Str",1,10000,"none"),"Y")'英文备注
Rs("cRemark") = htmlencode(GetText("cRemark","P","Str",1,250,"none"),"Y")'中文备注
Rs("typeCode") = htmlencode(GetText("typeCode","P","Str",1,250,"none"),"Y")'型号条码
Rs("unit") = htmlencode(GetText("unit","P","Str",1,100,"none"),"Y")'单位-
inprice_ = GetText("inprice","P","number",1,10,0)'参考进货价
Rs("inprice") = inprice_
outprice_ = GetText("outprice","P","number",1,10,0)'参考预出售价
Rs("outprice") = outprice_
Rs("outhow") = GetText("outhow","P","number",1,10,0)
Rs("intotime") = now '录入时间
Rs("guarantyTime") = htmlencode(GetText("guarantyTime","P","Str",1,250,"none"),"Y")'保修期
Rs("guarantyRemark") = htmlencode(GetText("guarantyTime","P","Str",1,250,"none"),"Y")'保修期备注
Rs("supplierid") = GetText("supplierid","P","number",1,10,0)'商家id
Rs("supplierCode_Name_Linkman") = htmlencode(GetText("supplierCode_Name_Linkman","P","Str",1,250,"none"),"Y")'商家名
Rs("sale_supplierid") = GetText("sale_supplierid","P","number",1,10,0)'购买者id
Rs("sale_Name") = htmlencode(GetText("sale_Name","P","Str",1,100,"none"),"Y")
Rs("servicemoney") = GetText("servicemoney","P","number",1,10,0)
Rs("aid") = Seuid_inc'录入者id
Rs("serviceaid") = GetText("aid","P","number",1,10,0)
Response.Write viewinfo("alertClose","添加成功!","")
Rs.update
Rs.Close
end if
ConnClose()
%>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -