One-time consumption small ticket

Source: Internet
Author: User

Print: One-time consumption, select the radio button, click Print Small ticket.

Page one load, tune a Prepareprint () method, and then determine that the status is 2 is paid, the status is 2 to print. When you wipe it, the status list is added. Script.js inside the state, HTML inside the word # state #.

function Prepareprint () {
$ ("#print_btn"). On ("click", Function () {
var target_id= "";
var chkobjs = document.getelementsbyname ("Resultlist");
for (Var i=0;i<chkobjs.length;i++)
{
if (chkobjs[i].checked)
{
target_id = Chkobjs[i].value;
alert (target_id);
Break
}
}

if (target_id!= "") {
var status=$ ("Input[type= ' Radio '][name=resultlist]:checked"). attr ("code");
alert (status);
if (status== "2") {
var url = "${def:context}/action/project/erpclub/print/ticket/singleticket?pk_value=" +target_id+ "&print_type= Ticket ";
Ajaxcall (url,{
Method: "Get",
Progress:true,
DataType: "Script",
Success:function () {
}
});
}else{
Ccms.dialog.notice ("Please pay first!");
}


}else{
Ccms.dialog.notice ("Please select record and then operate!");
}
});
}

Sql:select
(SELECT tenantry_name from t_tenantry WHERE tenantry_id = ${def:tenantry}) as Vc_head,
(SELECT vc_content from e_cnfg WHERE vc_category = ' Wish ') as Vc_foot,
E_singleitem.vc_code as Bills_code,
E_singleitemdef.vc_name,--article number name
E_singleitem.f_price,--Price
Number of,--E_singleitem.f_amount
E_singleitem.f_money,--Amount
(select String_agg (e_singleitemdef.vc_name | | | ' \ n ' | | E_singleitem.vc_itemcode | | "| | E_singleitem.f_price | | ' * ' | |       e_singleitem.f_amount| | ' ' | | E_singleitem.f_money), ' \ n ') from E_singleitemdef where Vc_code =e_singleitem.vc_itemcode) as Gouwu_xiaopiao,
(select COUNT (1) from E_singleitemdef where Vc_code =e_singleitem.vc_itemcode) as Gouwu_jianshu,
(Case E_singleitem.i_paytype If 1 Then ' cash/bank card payment ' When 2 Then ' debit card pay ' else ' end) as I_paytype,
E_singleitem.f_cash,
E_singleitem.f_card,
E_singleitem.f_check,
E_singleitem.f_other,
E_singleitem.vc_cardcode,
Hr_staff.name as Vc_ouser,
E_singleitem.f_getmoney,
---e_singleitem.vc_cardcode,
--hr_staff.name as Vc_ouser,
----E_singleitem.vc_iuser,
E_singleitem.vc_auser,----payee.
E_singleitem.c_adate,----Payment Time

E_singleitem.vc_iuser,
e_singleitem.vc_itemcode--article number
From E_singleitem
Left join E_singleitemdef on E_singleitemdef.vc_code=e_singleitem.vc_itemcode
Left join Hr_staff on Hr_staff.userlogin=e_singleitem.vc_ouser
--left Join E_finance on E_finance.vc_operationcode=e_singleitem.vc_code
Where E_singleitem.vc_code=${fld:pk_value} and e_singleitem.i_status= 2

One-time consumption small ticket

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.