LOGO OA教程 ERP教程 模切知识交流 PMS教程 CRM教程 开发文档 其他文档  
 
网站管理员

点晴ERP-标签页面添加直接打印的功能,无需预览

liguoquan
2023年11月24日 17:18 本文热度 365
:点晴ERP-标签页面添加直接打印的功能,无需预览



添加直接打印的功能,无需预览。(每个页面的保存参数名都不一样,添加时对应命名,以下例子参考)

1.添加保存个人设置是否直接打印的代码

' 查询个人显示选项设置

M_100208=""

set rs_personal=server.createobject("adodb.recordset")

sql_personal="select M_value from all_personal_value where info_code='M100208' and username='"& oabusyusername &"'"

rs_personal.open sql_personal,conn,1,1

if rs_personal.eof or rs_personal.bof then

pay_transport_fee_company_sort=0

conn.execute ("insert INTO all_personal_value (info_code,username,M_value) VALUES ('M100208','"& oabusyusername &"',',')")

else

M_100208=rs_personal("M_value")

end if

rs_personal.close

set rs_personal=nothing

if instr(M_100208,",fq_直接打印,")>0 then show_to_print=1

2. 添加勾选框,判断是否直接打印

直接打印<INPUT name="show_to_print" id="show_to_print" type="checkbox" style="width:16px;height:16px;" value="1" <%if show_to_print=1 then response.write(" checked")%> onclick="if(this.checked==true){save_value('fq_直接打印','1')}else{save_value('fq_直接打印','0')}">

//添加svae_value()函数

function save_value(f_prename,f_value){

document.getElementById('hidden_iframe').src='iframe_save_show_value.asp?f_prename='+ f_prename +'&f_value='+ f_value;

}

//添加保存参数iframe

<iframe width="200" height="200" src="" id="hidden_iframe" name="hidden_iframe" style="display:none;" border="1"></iframe>

3,通过JS判断是否直接打印。

function prn1_preview() {

<%call get_js_submit(page_site,sub_code,0)%>

createOneFormPage();

if(document.getElementById('show_to_print').checked){

    var selectElement = document.getElementById('printerList');

    var index = selectElement.selectedIndex;

    var val = selectElement.options[index].value;

    LODOP.SET_PRINTER_INDEX(val);

LODOP.PRINT();

}

else {

LODOP.PREVIEW();

}

 

};


该文章在 2023/12/1 14:57:32 编辑过
关键字查询
相关文章
正在查询...
点晴ERP是一款针对中小制造业的专业生产管理软件系统,系统成熟度和易用性得到了国内大量中小企业的青睐。
点晴PMS码头管理系统主要针对港口码头集装箱与散货日常运作、调度、堆场、车队、财务费用、相关报表等业务管理,结合码头的业务特点,围绕调度、堆场作业而开发的。集技术的先进性、管理的有效性于一体,是物流码头及其他港口类企业的高效ERP管理信息系统。
点晴WMS仓储管理系统提供了货物产品管理,销售管理,采购管理,仓储管理,仓库管理,保质期管理,货位管理,库位管理,生产管理,WMS管理系统,标签打印,条形码,二维码管理,批号管理软件。
点晴免费OA是一款软件和通用服务都免费,不限功能、不限时间、不限用户的免费OA协同办公管理系统。
Copyright 2010-2024 ClickSun All Rights Reserved