Response.ContentType = "application/vnd.ms-excel"


<%
Response.ContentType = "application/vnd.ms-excel"
dim pj(6),aa(6),bb(6),cc(6),dd(6),ee(6),ff(6),gg(6),hh(6),ii(6),jj(6),kk(6),lll(6)

function chanshow(sssss)
if trim(sssss)="1900/1/1" or trim(sssss)="" then
changeshow=""
else
if instr(sssss,"/")>1 then
'response.Write sssss&"
"
mydate=split(sssss,"/")
myyyyy=mydate(0)
mymmmm=mydate(1)
mydddd=mydate(2)
if len(mymmmm)=1 then mymmmm="0"&mymmmm
if len(mydddd)=1 then mydddd="0"&mydddd
chanshow=mydddd&"/"&mymmmm&"/"&myyyyy
'response.write chanshow&"
"
else
chanshow=sssss
end if
end if
end function

public ll
public a()
dim b(6)
dim an(8)
od=trim(request("od"))
if od="" then
od="id"
end if
mod_no=trim(Request("mod_no"))
fittings_no=trim(Request("fittings_no"))
fittings_sort=trim(Request("fittings_sort"))
zt=trim(Request("zt"))
gtyear=request("gtyear")
gtmonth=request("gtmonth")
gtrtime=trim(gtyear)&"/"&trim(gtmonth)

shuru_bm=trim(Request("shuru_bm"))
if request("yq_riqi")=""  or request("yq_riqi2")="" then
yq_riqi_day=trim(Request("yq_riqi_day"))
yq_riqi_day2=trim(Request("yq_riqi_day2"))
yq_riqi_month=trim(Request("yq_riqi_month"))
yq_riqi_month2=trim(Request("yq_riqi_month2"))
yq_riqi_year=trim(Request("yq_riqi_year"))
yq_riqi_year2=trim(Request("yq_riqi_year2"))
yq_riqi=yq_riqi_year&"/"&yq_riqi_month&"/"&yq_riqi_day
yq_riqi2=yq_riqi_year2&"/"&yq_riqi_month2&"/"&yq_riqi_day2
else
yq_riqi=request("yq_riqi")
yq_riqi2=request("yq_riqi2")
end if

if request("yq_riqim")=""  or request("yq_riqi2m")="" then
yq_riqi_daym=trim(Request("yq_riqi_daym"))
yq_riqi_day2m=trim(Request("yq_riqi_day2m"))
yq_riqi_monthm=trim(Request("yq_riqi_monthm"))
yq_riqi_month2m=trim(Request("yq_riqi_month2m"))
yq_riqi_yearm=trim(Request("yq_riqi_yearm"))
yq_riqi_year2m=trim(Request("yq_riqi_year2m"))
yq_riqim=yq_riqi_yearm&"/"&yq_riqi_monthm&"/"&yq_riqi_daym
yq_riqi2m=yq_riqi_year2m&"/"&yq_riqi_month2m&"/"&yq_riqi_day2m
else
yq_riqim=request("yq_riqim")
yq_riqi2m=request("yq_riqi2m")
end if

if request("f_riqi")=""  or request("f_riqi2")="" then
f_riqi_day=trim(Request("f_riqi_day"))
f_riqi_day2=trim(Request("f_riqi_day2"))
f_riqi_month=trim(Request("f_riqi_month"))
f_riqi_month2=trim(Request("f_riqi_month2"))
f_riqi_year=trim(Request("f_riqi_year"))
f_riqi_year2=trim(Request("f_riqi_year2"))
f_riqi=f_riqi_year&"/"&f_riqi_month&"/"&f_riqi_day
f_riqi2=f_riqi_year2&"/"&f_riqi_month2&"/"&f_riqi_day2
else
f_riqi=request("f_riqi")
f_riqi2=request("f_riqi2")
end if

if request("wc_riqi")=""  or request("wc_riqi2")="" then
wc_riqi_day=trim(Request("wc_riqi_day"))
wc_riqi_day2=trim(Request("wc_riqi_day2"))
wc_riqi_month=trim(Request("wc_riqi_month"))
wc_riqi_month2=trim(Request("wc_riqi_month2"))
wc_riqi_year=trim(Request("wc_riqi_year"))
wc_riqi_year2=trim(Request("wc_riqi_year2"))
wc_riqi=wc_riqi_year&"/"&wc_riqi_month&"/"&wc_riqi_day
wc_riqi2=wc_riqi_year2&"/"&wc_riqi_month2&"/"&wc_riqi_day2
else
wc_riqi=request("wc_riqi")
wc_riqi2=request("wc_riqi2")
end if

bd_no=trim(Request("bd_no"))
finished= trim(Request("finished"))
client_name=trim(Request("client_name"))

if  f_riqi="" or len(f_riqi)=2  then
f_riqi="1900/1/1"
end if
if  f_riqi2="" or len(f_riqi2)=2 then
f_riqi2="3000/1/1"
end if
if  yq_riqi="" or len(yq_riqi)=2 then
yq_riqi="1900/1/1"
end if
if yq_riqi2=""  or len(yq_riqi2)=2 then
yq_riqi2="3000/1/1"
end if
if  wc_riqi="" or len(wc_riqi)=2 then
wc_riqi="1900/1/1"
end if
if wc_riqi2=""  or len(wc_riqi2)=2 then
wc_riqi2="3000/1/1"
end if
wc_riqi=cdate(wc_riqi)
wc_riqi2=cdate(wc_riqi2)
yq_riqi=cdate(yq_riqi)
yq_riq2=cdate(yq_riqi2)
f_riqi=cdate(f_riqi)
f_riqi2=cdate(f_riqi2)
%>



搜 索 結 果



<%


sql="select max(fittings_sort)  ,mod_no,max(id) from info where"
if finished = 0 then
sql=sql+" isnull(rc_riqi,1) = 1    and  "
end if
if finished = 1 then
sql=sql+" isnull(rc_riqi,1) <> 1    and  "
end if
sql=sql+" shuru_bm  like '%"&shuru_bm&"%'    and  "
sql=sql+" fittings_sort like '%"&fittings_sort&"%'    and  "
sql=sql+" zt like '%"&zt&"%'    and  "
sql=sql+" mod_no like '%"&mod_no&"%'    and  "
sql=sql+" fittings_no like '%"&fittings_no&"%' "
if  request("yq_riqi_day")<>"" then
sql=sql+"   and  yq_riqi between '"&yq_riqi&"' and '"&yq_riqi2&"' "
end if
if  request("yq_riqi_daym")<>"" then
sql=sql+"   and  yq_riqi2 between '"&yq_riqim&"' and '"&yq_riqi2m&"' "
end if
if  request("wc_riqi_day")<>"" then
sql=sql+"   and  wc_riqi between '"&wc_riqi&"' and '"&wc_riqi2&"' "
end if
if request("gtcheck")=1 then
sql=sql+" and  gt_time like '%"&trim(gtrtime)&"%' "
end if
sql=sql+"  and  bd_no like '%"&bd_no&"%'   and  "
sql=sql+" client_name like '%"&client_name&"%' "
if  request("f_riqi_day")<>"" then
sql=sql+"  and  f_riqi between '"&f_riqi&"' and '"&f_riqi2&"' "
end if
sql_n=sql
if od="mod_no" then
sql=sql+"group by mod_no order by max("&od&") "
else
sql=sql+"group by mod_no order by max("&od&") desc"
end if

set rs=server.createobject("adodb.recordset")
rs.open sql,cn,3,3
if rs.eof then
response.write "沒有記錄<<返回"
response.end
end if
do while not rs.eof
mod_no_temp=rs("mod_no")
%>

<%
set rszz=server.CreateObject("adodb.recordset")
sql="select * from jindu where mod_no='"&mod_no_temp&"' order by id"
rszz.Open sql,cn,1,1
'response.Write sql
'response.Write rszz.recordcount
'response.End()
if Cint(rszz.recordcount)<1 then
for jjj=1 to 5
pj(jjj)=""
aa(jjj)=""
bb(jjj)=""
cc(jjj)=""
dd(jjj)=""
ee(jjj)=""
ff(jjj)=""
gg(jjj)=""
hh(jjj)=""
ii(jjj)=""
jj(jjj)=""
kk(jjj)=""
lll(jjj)=""
next

else
inttemp=Cint(rszz.recordcount)
if inttemp>5 then inttemp=5
rszz.movefirst

for jjj=1 to inttemp
pj(jjj)=chanshow(rszz("pj"))
aa(jjj)=chanshow(rszz("aa"))
bb(jjj)=chanshow(rszz("bb"))
cc(jjj)=chanshow(rszz("cc"))
dd(jjj)=chanshow(rszz("dd"))
ee(jjj)=chanshow(rszz("ee"))
ff(jjj)=chanshow(rszz("ff"))
gg(jjj)=chanshow(rszz("gg"))
hh(jjj)=chanshow(rszz("hh"))
ii(jjj)=chanshow(rszz("ii"))
jj(jjj)=chanshow(rszz("jj"))
kk(jjj)=chanshow(rszz("kk"))
lll(jjj)=chanshow(rszz("ll"))
rszz.movenext
next

end if
'response.write mod_no_temp
%>


 


   
 
 
   
   
   
   
   
   
   
   
   
   
   
   
   
 
 
  <%for i=1 to 5%>
 
   
   
   
   
   
   
   
   
   
   
   
   
   
 
 
  <%next%>

   
   
   
   
   
   
   
   
   
   
   
   
   
 

<%

rszz.close
set rszz=nothing
rs.movenext
loop
%>

<%=replace(mod_no_temp,".","")%>
 <%if instr(mod_no_temp,"...")>0 then
 response.Write "(改圖已完成)"
 elseif instr(mod_no_temp,".")>0 then
 response.write "(改圖)"
 else
 response.write " "
 end if
  %>
配件編號備料及測試剪模CNC雕刻手工雕試模CNC鑼切打彎模羅切打彎繞線車件鑄件
<%=pj(i)%> <%=aa(i)%> <%=bb(i)%> <%=cc(i)%> <%=dd(i)%> <%=ee(i)%> <%=ff(i)%> <%=gg(i)%> <%=hh(i)%> <%=ii(i)%> <%=jj(i)%> <%=kk(i)%> <%=lll(i)%> 
             

 

你可能感兴趣的:(Response.ContentType = "application/vnd.ms-excel")