⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 select.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
📖 第 1 页 / 共 3 页
字号:
elseif  theName="poreceive" or theName="receivesheet" then  
    session("SelectName")="采购收货单"  
    %> 
          <option value=poreceiveno <%if request("find")="poreceiveno" then Response.Write "selected"%>>采购收货单号</option>
          <option value=pono <%if request("find")="pono" then Response.Write "selected"%>>采购单号</option>
          <option value=Account <%if request("find")="Account" then Response.Write "selected"%>>客户</option>
          <option value=totalamount <%if request("find")="totalamount" then Response.Write "selected"%>>金额</option>
          <option value=Status <%if request("find")="Status" then Response.Write "selected"%>>状态</option>
          <option value=poDate <%if request("find")="poDate" then Response.Write "selected"%>>采购日期</option>
	<%
elseif  theName="payment" then  
    session("SelectName")="应收帐"  
    %> 
          <option value=siccode <%if request("find")="siccode" then Response.Write "selected"%>>客户代码</option>
          <option value=account <%if request("find")="account" then Response.Write "selected"%>>客户名称</option>
          <option value=paymentno <%if request("find")="paymentno" then Response.Write "selected"%>>应收编号</option>
          <option value=ordernum <%if request("find")="ordernum" then Response.Write "selected"%>>合同号</option>
          <option value=deliveryamount <%if request("find")="deliveryamount" then Response.Write "selected"%>>应收金额</option>
          <option value=collectionamount <%if request("find")="collectionamount" then Response.Write "selected"%>>开票金额</option>
          <option value=username <%if request("find")="username" then Response.Write "selected"%>>销售员</option>
	<%
elseif  theName="popayment" then  
    session("SelectName")="应付帐"  
    %> 
          <option value=siccode <%if request("find")="siccode" then Response.Write "selected"%>>客户代码</option>
          <option value=account <%if request("find")="account" then Response.Write "selected"%>>客户名称</option>
          <option value=paymentno <%if request("find")="paymentno" then Response.Write "selected"%>>应付编号</option>
          <option value=ordernum <%if request("find")="pono" then Response.Write "selected"%>>采购号</option>
          <option value=deliveryamount <%if request("find")="amount" then Response.Write "selected"%>>应付金额</option>
          <option value=collectionamount <%if request("find")="collectionamount" then Response.Write "selected"%>>发票金额</option>
          <option value=username <%if request("find")="username" then Response.Write "selected"%>>采购员</option>
	<%
end if
    %>
  </select>
  <input type="Text" name="StartWith" size="16" value="<%=request("StartWith")%>">
  <input type="Submit" name="Submit" value="搜索">
  <input type="Hidden" name="theForm" value="<%=theForm%>"> <input type="Hidden" name="theName" class=black value="<%=theName%>">&nbsp;&nbsp;&nbsp;</td>                           
    <tr bgcolor="#FFFFFF"> 
      <td height="25"><strong><font size="2" class="title">选择<%=session("SelectName")%></font></strong></td>
    </tr>
    <tr > 
      <td height="16" background="images/title.gif">&nbsp;</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height=4></td>
    </tr>
</table>

<table width="100%" bgcolor=cdcdcd cellspacing=1>
	<tr bgcolor=f1f1f1>
      <%
		if  instr(theName,"owner")>0 or instr(theName,"user")>0 then
			if theName="bowner" then
      %>
      <td align="center" nowrap><input type="checkbox" name="chkall" value="on" onClick="CheckAll(this.form)" style="font-size: 9pt; color: #000000"></td>
      <td align="center" nowrap>用户</td>
      <td align="center" nowrap>登录名</td>
      <td align="center" nowrap>职务</td>    
      <td align="center" nowrap>区域</td> 
      <td align="center" nowrap>电话</td>
      <%
			else
		%>
      <td align="center" nowrap>用户</td>
      <td align="center" nowrap>登录名</td>
      <td align="center" nowrap>职务</td>    
      <td align="center" nowrap>区域</td> 
      <td align="center" nowrap>电话</td>	
		<%
			end if
      
		elseif  instr(theName,"account")>0 then
      %>
      <td align="center" nowrap>客户</td>
      <td align="center" nowrap>客户代码</td>
      <td align="center" nowrap>行业</td>    
      <td align="center" nowrap>客户类型</td> 
      <td align="center" nowrap>电话</td>
      <%
		elseif  theName="Manufacturer" or  theName="Supplier"  then
      %>
      <td align="center" nowrap>制造商</td>
      <td align="center" nowrap>制造商代码</td>
      <td align="center" nowrap>行业</td>    
      <td align="center" nowrap>客户类型</td> 
      <td align="center" nowrap>电话</td>
      <%
		elseif  theName="contact" then
      %>
		<td align=center height=20>名称</td>
		<td align=center>部门</td>
		<td align=center>职务</td>
		<td align=center>电话</td>
		<td align=center>客户</td>
      <%
		elseif  theName="PO" or theName="CPO" then
      %>
      	<td align=center height=20>采购单号</td>
		<td align=center>供应商</td>
		<td align=center>金额</td>
		<td align=center>状态</td>
		<td align=center>采购日期</td>
		<td align=center>采购员</td>
      <%
		elseif  instr(theName,"sendlocation")>0 then
      %>
      	<td align=center height=20>货位</td>
		<td align=center>仓库</td>
		<td align=center>货号</td>
		<td align=center>型号</td>
		<td align=center>在库量</td>
		<td align=center>非净货位</td>
      <%
		elseif  instr(theName,"location")>0 then
      %>
      	<td align=center height=20>货位</td>
		<td align=center>仓库</td>
		<td align=center>货位类型</td>
		<td align=center>非净货位</td>
      <%
		elseif  theName="order" then
      %>
		<td align=center height=20>合同号</td>
		<td align=center>客户</td>
		<td align=center>金额</td>
		<td align=center>状态</td>
		<td align=center>签订日期</td>
		<td align=center>销售员</td>
      <%
		elseif  theName="delivery" then
      %>
		<td align=center height=20>发货单号</td>
		<td align=center>客户</td>
		<td align=center>金额</td>
		<td align=center>状态</td>
		<td align=center>销售员</td>       <%
		elseif  theName="deal" then
      %>
		<td align=center height=20>销售机会</td>
		<td align=center>主题</td>
		<td align=center>客户</td>
		<td align=center>金额</td>
		<td align=center>状态</td>
		<td align=center>开始日期</td>
		<td align=center>销售员</td>
       <%
		elseif  theName="expense" then
      %>
		<td align=center height=20>费用编号</td>
		<td align=center>费用名称</td>
		<td align=center>费用金额</td>
		<td align=center>状态</td>
		<td align=center>用户</td>
       <%
		elseif  instr(theName,"quote")>0 then
      %>
	<td width="12%" height=15 align=center>报价单号</td>
      <td width="20%" height="15" align=center>客户</td>
      <td width="8%" height="15" align=center>金额</td>
      <td width="8%" height="15" align=center>状态</td>
      <td width="8%" height="15" align=center>报价日期</td>
      <td width="12%" height="15" align=center>报价人</td>
   <%
		elseif  theName="poreceive" or theName="receivesheet" then
      %>
      <td height=15 align=center bgcolor="efefef">采购收货单号</td>
      <td align=center bgcolor="efefef">供应商</td>
      <td height="15" align=center bgcolor="efefef">金额</td>
      <td height="15" align=center bgcolor="efefef">状态</td>
      <td height="15" align=center bgcolor="efefef">采购日期</td>
      <td height="15" align=center bgcolor="efefef">采购员</td>
      <%
   		elseif  theName="payment" then
      %>
      <td height=15 align=center bgcolor="efefef">应收编号</td>
      <td align=center bgcolor="efefef">客户</td>
      <td height="15" align=center bgcolor="efefef">合同号</td>
      <td height="15" align=center bgcolor="efefef">应收金额</td>
      <td height="15" align=center bgcolor="efefef">开票金额</td>
      <td height="15" align=center bgcolor="efefef">销售员</td>
      <%
   		elseif  theName="popayment" then
      %>
      <td height=15 align=center bgcolor="efefef">应付编号</td>
      <td align=center bgcolor="efefef">客户</td>
      <td height="15" align=center bgcolor="efefef">采购号</td>
      <td height="15" align=center bgcolor="efefef">应付金额</td>
      <td height="15" align=center bgcolor="efefef">发票金额</td>
      <td height="15" align=center bgcolor="efefef">采购员</td>
	  <%
		end if
      %>
    </tr>
    <%
	submit = Request.Form("theName")
	submit = trim(submit)

'if submit <>"" then
	dim sql

	Find = Request.Form("Find")
	StartWith = Request.Form("StartWith")
	'strwhere=" where 1=1"
	if Find <>"" then
		strwhere=strwhere&" and " & Find & " like N'%" + trim(StartWith) + "%'"
	end if
	
	if instr(theName,"owner")>0 or theName="user" then
		sql = "select * from v_usertable  where 1=1"&strwhere
	elseif instr(theName,"account")>0 then
		if objcheck.CheckUserFunction2("payment","edit") or  objcheck.CheckUserFunction2("Service","edit") or  objcheck.CheckUserFunction2("delivery","edit") then
			sql = "select top 50 * from v_account where disable=0 "&strwhere&" order by lastmoddate desc"
		else
			sql = "select top 50 * from v_account where disable=0 and (ownerid='"&session("loginid")&"' or ownerid in(select userid from v_userreportto_all where reportto='"&session("loginid")&"') or accountid in(select accountid from accountshare where shareto='"&session("loginid")&"'))"&strwhere&" order by lastmoddate desc"
		end if
	elseif theName="Manufacturer" or  theName="Supplier"  then
		sql = "select top 50 * from v_account where disable=0 and (accounttypeid in(select id from userdefine where definetypeprotery like '%供应商%'))"&strwhere
 	elseif theName="contact" then
		sql = "select top 50 * from v_contact where disable=0 and (owner='"&session("loginid")&"' or owner in(select userid from v_userreportto_all where reportto='"&session("loginid")&"') or accountid in(select accountid from accountshare where shareto='"&session("loginid")&"'))"&strwhere
 	elseif theName="PO" then
		if objcheck.CheckUserFunction2("delivery","edit") then
			sql = "select top 50 * from v_po where (status='已审核' or status='部分收货') "&strwhere&" order by podate desc"
 		else
 			sql = "select top 50 * from v_po where (status='已审核' or status='部分收货') and (owner='"&session("loginid")&"' or owner in(select userid from v_userreportto_all where reportto='"&session("loginid")&"'))"&strwhere&" order by podate desc"
 		end if
  	elseif theName="CPO" then
		if objcheck.CheckUserFunction2("delivery","edit") then
			sql = "select top 50 * from v_po where (status='已审核' or status='部分收货' or status='收货完成') "&strwhere&" order by podate desc"
 		else
 			sql = "select top 50 * from v_po where (status='已审核' or status='部分收货' or status='收货完成') and (owner='"&session("loginid")&"' or owner in(select userid from v_userreportto_all where reportto='"&session("loginid")&"'))"&strwhere&" order by podate desc"
 		end if
 	elseif instr(theName,"sendlocation")>0 then

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -