📄 prints.inc
字号:
<%
Function printsForm()
dim sTemp,sTemp1
dim iEquisysid,iObjecttype,iFormtype,iUrgency,sContent,sResult,iDepartment,sStarttime,sStoptime,sFailuretime
dim sWorker,sConfirmer,sChecker,sRecorder,iRemindmethod,iPlanhours,iRealhours,iLimitdays,iPlanid,sExhaustionname
dim fUnitprice,fTotalprice,iFinished,pWorksheetid
dim sObjectname,sObjecttype,sFormtype,sUrgency,sFinished,sDepartment,sRemindmethod
dim ifFirst:ifFirst=1
printsForm=""
dim rs : set rs = openRS(conn,sSQL)
if rs.EOF then
printsForm="对不起,没有查询到任何工作单记录!"
else
while not rs.EOF
if ifFirst<>1 then
printsForm=printsForm&"<p style=""page-break-after:always""></p>"
end if
pWorksheetid =GetValue(rs,"worksheet_id")
iEquisysid = GetValue(rs,"equi_sys_id")
iObjecttype = GetValue(rs,"object_type")
iFormtype = GetValue(rs,"form_type")
iUrgency = GetValue(rs,"urgency")
sContent =GetValue(rs,"content")
sResult = GetValue(rs,"result")
iDepartment = GetValue(rs,"department")
sStarttime = GetValue(rs,"starttime")
sStoptime = GetValue(rs,"stoptime")
sFailuretime = GetValue(rs,"failuretime")
sWorker = GetValue(rs,"worker")
sConfirmer = GetValue(rs,"confirmer")
sChecker = GetValue(rs,"checker")
sRecorder = GetValue(rs,"recorder")
iRemindmethod = GetValue(rs,"remind_method")
iPlanhours = GetValue(rs,"plan_hours")
iRealhours = GetValue(rs,"real_hours")
iLimitdays = GetValue(rs,"limit_days")
iPlanid = GetValue(rs,"plan_id")
sExhaustionname = GetValue(rs,"exhaustion_name")
fUnitprice = GetValue(rs,"unit_price")
fTotalprice = GetValue(rs,"total_price")
iFinished =GetValue(rs,"finished")
select case iObjecttype
case 0
sObjectname=DLookUp(conn,"select sys_desc from t_sys where sys_id="&ToSQL(iEquisysid,"number"))
case 1
sObjectname=DLookUp(conn,"select name from t_equipment where equi_id="&ToSQL(iEquisysid,"number"))
case else
sObjectname=""
end select
select case iObjecttype
case 0
sObjecttype="系统"
case 1
sObjecttype="设备"
case else
sObjecttype=""
end select
select case iFormtype
case 0
sFormtype="常规"
sTemp= " <td align=center>维保计划号</td>" & _
" <td nowrap>"&iPlanid&"</td>"
sTemp1="<td colspan=2></td>"
case 1
sFormtype="临时"
sTemp= " <td align=center>客户意见号</td>" & _
" <td nowrap>"&DLookUp(conn,"select complaint_id from t_customer_complaints where worksheet_id="&pWorksheetid)&" </td>"
sTemp1="<td colspan=2> </td>"
case else
sFormtype=""
sTemp="<td colspan=2> </td>"
sTemp1="<td colspan=2> </td>"
end select
select case iUrgency
case 0
sUrgency="普通"
case 1
sUrgency="紧急"
case 2
sUrgency="非常紧急"
case else
sUrgency=""
end select
select case iFinished
case 0
sFinished="待办"
case 1
sFinished="已办"
case else
sFinished=""
end select
select case iRemindmethod
case 0
sRemindmethod="不提醒"
case 1
sRemindmethod="提前一天提醒"
case 2
sRemindmethod="提前二天提醒"
case 3
sRemindmethod="提前三天提醒"
case 4
sRemindmethod="提前四天提醒"
case 5
sRemindmethod="提前五天提醒"
case 6
sRemindmethod="提前六天提醒"
case 7
sRemindmethod="提前七天提醒"
case else
sRemindmethod="不提醒"
end select
if iPlanhours="" then
iPlanhours=" 小时"
else
iPlanhours=iPlanhours&" 小时"
end if
if iLimitdays="" then
iLimitdays=" 天"
else
iLimitdays=iLimitdays&" 天"
end if
if iRealhours="" then
iRealhours=" 小时"
else
iRealhours=iRealhours&" 小时"
end if
printsForm=printsForm &_
"<table width=""700"" cellspacing=1 cellpadding=3 align=center bgcolor=""silver"" border=1 background=""images/bgdots.gif"" style=""table-layout:fixed"">" & vbLF & _
" <tr style=""display:none"">" & vbLF & _
" <td width=105></td><td width=150></td>" & vbLF & _
" <td width=95></td><td width=150></td>" & vbLF & _
" <td width=90></td><td width=""*""></td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=""#0040a0"" style=""color:white;font-weight:600"">" & vbLF & _
" <td colspan=6 align=center>工 作 单 信 息</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>对象名(对象号)</td>" & _
" <td nowrap>"&sObjectname&"("&iEquisysid&")"&"</select></td>" & vbLF & _
" <td align=center>对象类型</td>" & _
" <td nowrap>"&sObjecttype&"</select></td>" & vbLF & _
sTemp&_
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>工作单类型</td>" & _
" <td nowrap>"&sFormtype&" </td>"&_
" <td align=center>紧急程度</td>" & _
" <td nowrap>"&sUrgency&" </td>"&_
" <td align=center>负责部门</td>" & _
" <td >"&DLookUp(conn,"select node_desp from t_node where node_id="&ToSQL(iDepartment,"number"))&" </td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=50>" & vbLF & _
" <td align=center>工作单内容</td>" & vbLF & _
" <td valign=center colspan=5 style=""word-wrap:break-word;"">"&FormatStr(sContent)&" </td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>开始时间</td>" & _
" <td nowrap>"&sStarttime&" </td>"&_
" <td align=center>故障时间</td>" & _
" <td nowrap>"&sFailuretime&" </td>" & vbLF & _
" <td align=center>记录人</td>" & _
" <td nowrap>"&sRecorder&" </td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>提醒方式</td>" & _
" <td nowrap>"&sRemindmethod&" </td>"&_
" <td align=center>预设工时</td>" & _
" <td nowrap>"&iPlanhours&" </td>" & vbLF & _
" <td align=center>完成期限</td>" & _
" <td nowrap>"&iLimitdays&" </td>" & vbLF & _
" </tr>"
printsForm=printsForm&_
" <tr bgcolor=white height=50>" & vbLF & _
" <td align=center>完成情况</td>" & vbLF & _
" <td class=tdvalue valign=center colspan=5 style=""word-wrap:break-word;"">"&FormatStr(sResult)&" </td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>耗材名称</td>" & _
" <td nowrap>"&sExhaustionname&" </td>"&_
" <td align=center>耗材单价</td>" & _
" <td nowrap>"&fUnitprice&" </td>" & vbLF & _
" <td align=center>耗材数量</td>" & _
" <td nowrap>"&fTotalprice&" </td>" & vbLF & _
" </tr>"&_
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>完成时间</td>" & _
" <td nowrap>"&sStoptime&" </td>"&_
" <td align=center>实际工时</td>" & _
" <td nowrap>"&iRealhours&"<p align=right></p> </td>" & vbLF & _
sTemp1&_
" </tr>" &_
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>维修人</td>" & _
" <td nowrap>"&sWorker&" </td>"&_
" <td align=center>确认人</td>" & _
" <td nowrap>"&sConfirmer&" </td>" & vbLF & _
" <td align=center>审核人</td>" & _
" <td nowrap>"&sChecker&" </td>" & vbLF & _
" </tr>"
printsForm=printsForm &"</table>"
ifFirst=0
rs.movenext
wend
end if
CloseRS(rs)
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -