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

凭证打印-全部传输类型的传SQL方法

liguoquan
2023年10月25日 11:50 本文热度 288
:凭证打印-全部传输类型的传SQL方法

1. 首先将sql赋给excel_sql_to

    excel_sql_to=sql

2. 添加保存sql的文本框和提交的表单

<form method="post" name="print_to">

<%if excel_sql_to&"CS"<>"CS" then excel_sql_to=DSConvert(Lcase(excel_sql_to),1) '半角转全角%>

<textarea name="excel_sql_to" id="excel_sql_to" style="width:0;height:0;border:none;" ><%=excel_sql_to%></textarea>

</form>

补充说明:用到DSConvert()函数需要先引入下面这个文件

<!--#include file="../mrp/function/sql_replace.asp"-->

3. 添加打印的按钮

 <input type="button" name="buttonprint" id="buttonprint" class="button_60px" value="打印" style="padding-left:5px;" onmouseout="this.style.backgroundPosition='0 0';" onmouseover="this.style.backgroundPosition='0 -21px';" onclick="javascript:printvoucher();">

4. 添加对应的JS的函数功能

function printvoucher(){

if (document.getElementById('excel_sql_to').value+'CS'=='CS'){alert('请先点击查询,得到结果后再打印!');return false;}

window.print_to.target="_blank"; window.print_to.action="sales_order_voucher_add_checkinfo.asp"//修改成具体打印界面的名称

window.print_to.submit();

}

5. 在打印界面接收SQL语句,把sql还原回来。

excel_sql=request("excel_sql_to")

if excel_sql&"CS"<>"CS" then excel_sql=DSConvert(Lcase(excel_sql),0)

6. 改造打印界面的表头表尾与中间明细

第一种

order_time=rs("order_time")

order_type_i=rs("order_type")

order_id=rs("order_id")

voucher_code=rs("voucher_code")

product_code=rs("product_code")

product_name=rs("product_name")

unit_price=rs("unit_price")

batch_no=rs("batch_no")

warehouse_subject_code=rs("warehouse_subject_code")

client_name=rs("client_name")

client_code=rs("client_code")

all_cost_price=rs("all_cost_price")

all_quantity=rs("all_quantity")

sub_sample_order=rs("sub_sample_order")

invoice_no=rs("invoice_no")

第二种

order_type_i=rs("order_type")

order_id=rs("order_id")

voucher_code=rs("voucher_code")

product_code=rs("product_code")

product_name=rs("product_name")

client_product_code=rs("client_product_code")

unit_price=rs("unit_price")

batch_no=rs("batch_no")

warehouse_subject_code=rs("warehouse_subject_code")

client_name=rs("client_name")

all_cost_price=rs("all_cost_price")

all_quantity=rs("all_quantity")

sub_sample_order=rs("sub_sample_order")




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