单据明细打印
This commit is contained in:
@@ -7,12 +7,17 @@
|
|||||||
var payTypeTitle = "";//收入 支出
|
var payTypeTitle = "";//收入 支出
|
||||||
var itemType = true; //隐藏当前列
|
var itemType = true; //隐藏当前列
|
||||||
var moneyType = true; //隐藏当前列
|
var moneyType = true; //隐藏当前列
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
initSystemData_account(); //获取账户信息
|
initSystemData_account(); //获取账户信息
|
||||||
initMProperty(); //初始化商品属性
|
initMProperty(); //初始化商品属性
|
||||||
initOutItemList(); //初始化支出项目
|
initOutItemList(); //初始化支出项目
|
||||||
initialize();//初始化系统基础信息
|
initialize();//初始化系统基础信息
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//获取账户信息
|
//获取账户信息
|
||||||
function initSystemData_account(){
|
function initSystemData_account(){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@@ -95,38 +100,47 @@
|
|||||||
if(listSubType == "采购入库") {
|
if(listSubType == "采购入库") {
|
||||||
billType = "material";
|
billType = "material";
|
||||||
$("#bill .purchase_in").show();
|
$("#bill .purchase_in").show();
|
||||||
|
tableString = $(".purchase_in").html();
|
||||||
}
|
}
|
||||||
else if(listSubType == "采购退货出库") {
|
else if(listSubType == "采购退货出库") {
|
||||||
billType = "material";
|
billType = "material";
|
||||||
$("#bill .purchase_back").show();
|
$("#bill .purchase_back").show();
|
||||||
|
tableString = $(".purchase_back").html();
|
||||||
}
|
}
|
||||||
else if(listSubType == "销售出库") {
|
else if(listSubType == "销售出库") {
|
||||||
billType = "material";
|
billType = "material";
|
||||||
$("#bill .sale_out").show();
|
$("#bill .sale_out").show();
|
||||||
|
tableString = $(".sale_out").html();
|
||||||
}
|
}
|
||||||
else if(listSubType == "销售退货入库") {
|
else if(listSubType == "销售退货入库") {
|
||||||
billType = "material";
|
billType = "material";
|
||||||
$("#bill .sale_back").show();
|
$("#bill .sale_back").show();
|
||||||
|
tableString = $(".sale_back").html();
|
||||||
}
|
}
|
||||||
else if(listSubType == "零售出库") {
|
else if(listSubType == "零售出库") {
|
||||||
billType = "material";
|
billType = "material";
|
||||||
$("#bill .retail_out").show();
|
$("#bill .retail_out").show();
|
||||||
|
tableString = $(".retail_out").html();
|
||||||
}
|
}
|
||||||
else if(listSubType == "零售退货入库") {
|
else if(listSubType == "零售退货入库") {
|
||||||
billType = "material";
|
billType = "material";
|
||||||
$("#bill .retail_back").show();
|
$("#bill .retail_back").show();
|
||||||
|
tableString = $(".retail_back").html();
|
||||||
}
|
}
|
||||||
else if(listSubType == "其它入库") {
|
else if(listSubType == "其它入库") {
|
||||||
billType = "material";
|
billType = "material";
|
||||||
$("#bill .other_in").show();
|
$("#bill .other_in").show();
|
||||||
|
tableString = $(".other_in").html();
|
||||||
}
|
}
|
||||||
else if(listSubType == "其它出库") {
|
else if(listSubType == "其它出库") {
|
||||||
billType = "material";
|
billType = "material";
|
||||||
$("#bill .other_out").show();
|
$("#bill .other_out").show();
|
||||||
|
tableString = $(".other_out").html();
|
||||||
}
|
}
|
||||||
else if(listSubType == "调拨出库") {
|
else if(listSubType == "调拨出库") {
|
||||||
billType = "material";
|
billType = "material";
|
||||||
$("#bill .allocation_out").show();
|
$("#bill .allocation_out").show();
|
||||||
|
tableString = $(".allocation_out").html();
|
||||||
}
|
}
|
||||||
else if(listSubType == "收入") {
|
else if(listSubType == "收入") {
|
||||||
billType = "account";
|
billType = "account";
|
||||||
@@ -134,6 +148,7 @@
|
|||||||
itemType = false; //显示当前列
|
itemType = false; //显示当前列
|
||||||
moneyType = true; //隐藏当前列
|
moneyType = true; //隐藏当前列
|
||||||
$("#bill .item_in").show();
|
$("#bill .item_in").show();
|
||||||
|
tableString = $(".item_in").html();
|
||||||
}
|
}
|
||||||
else if(listSubType == "支出") {
|
else if(listSubType == "支出") {
|
||||||
billType = "account";
|
billType = "account";
|
||||||
@@ -141,6 +156,7 @@
|
|||||||
itemType = false; //显示当前列
|
itemType = false; //显示当前列
|
||||||
moneyType = true; //隐藏当前列
|
moneyType = true; //隐藏当前列
|
||||||
$("#bill .item_out").show();
|
$("#bill .item_out").show();
|
||||||
|
tableString = $(".item_out").html();
|
||||||
}
|
}
|
||||||
else if(listSubType == "收款") {
|
else if(listSubType == "收款") {
|
||||||
billType = "account";
|
billType = "account";
|
||||||
@@ -148,6 +164,7 @@
|
|||||||
itemType = true; //隐藏当前列
|
itemType = true; //隐藏当前列
|
||||||
moneyType = false; //显示当前列
|
moneyType = false; //显示当前列
|
||||||
$("#bill .money_in").show();
|
$("#bill .money_in").show();
|
||||||
|
tableString = $(".money_in").html();
|
||||||
}
|
}
|
||||||
else if(listSubType == "付款") {
|
else if(listSubType == "付款") {
|
||||||
billType = "account";
|
billType = "account";
|
||||||
@@ -155,6 +172,7 @@
|
|||||||
itemType = true; //隐藏当前列
|
itemType = true; //隐藏当前列
|
||||||
moneyType = false; //显示当前列
|
moneyType = false; //显示当前列
|
||||||
$("#bill .money_out").show();
|
$("#bill .money_out").show();
|
||||||
|
tableString = $(".money_out").html();
|
||||||
}
|
}
|
||||||
else if(listSubType == "转账") {
|
else if(listSubType == "转账") {
|
||||||
billType = "account";
|
billType = "account";
|
||||||
@@ -162,6 +180,7 @@
|
|||||||
itemType = true; //隐藏当前列
|
itemType = true; //隐藏当前列
|
||||||
moneyType = false; //显示当前列
|
moneyType = false; //显示当前列
|
||||||
$("#bill .giro").show();
|
$("#bill .giro").show();
|
||||||
|
tableString = $(".giro").html();
|
||||||
}
|
}
|
||||||
else if(listSubType == "收预付款") {
|
else if(listSubType == "收预付款") {
|
||||||
billType = "account";
|
billType = "account";
|
||||||
@@ -169,8 +188,12 @@
|
|||||||
itemType = true; //隐藏当前列
|
itemType = true; //隐藏当前列
|
||||||
moneyType = false; //显示当前列
|
moneyType = false; //显示当前列
|
||||||
$("#bill .advance_in").show();
|
$("#bill .advance_in").show();
|
||||||
|
tableString = $(".advance_in").html();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//如果是进货、销售
|
//如果是进货、销售
|
||||||
if(billType == "material"){
|
if(billType == "material"){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@@ -317,6 +340,57 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//打印table
|
||||||
|
$("#print_bill_detail").off("click").on("click",function(){
|
||||||
|
var tableString = "";//打印table
|
||||||
|
if(listSubType == "采购入库") {
|
||||||
|
tableString = $(".purchase_in").html();
|
||||||
|
}
|
||||||
|
else if(listSubType == "采购退货出库") {
|
||||||
|
tableString = $(".purchase_back").html();
|
||||||
|
}
|
||||||
|
else if(listSubType == "销售出库") {
|
||||||
|
tableString = $(".sale_out").html();
|
||||||
|
}
|
||||||
|
else if(listSubType == "销售退货入库") {
|
||||||
|
tableString = $(".sale_back").html();
|
||||||
|
}
|
||||||
|
else if(listSubType == "零售出库") {
|
||||||
|
tableString = $(".retail_out").html();
|
||||||
|
}
|
||||||
|
else if(listSubType == "零售退货入库") {
|
||||||
|
tableString = $(".retail_back").html();
|
||||||
|
}
|
||||||
|
else if(listSubType == "其它入库") {
|
||||||
|
tableString = $(".other_in").html();
|
||||||
|
}
|
||||||
|
else if(listSubType == "其它出库") {
|
||||||
|
tableString = $(".other_out").html();
|
||||||
|
}
|
||||||
|
else if(listSubType == "调拨出库") {
|
||||||
|
tableString = $(".allocation_out").html();
|
||||||
|
}
|
||||||
|
else if(listSubType == "收入") {
|
||||||
|
tableString = $(".item_in").html();
|
||||||
|
}
|
||||||
|
else if(listSubType == "支出") {
|
||||||
|
tableString = $(".item_out").html();
|
||||||
|
}
|
||||||
|
else if(listSubType == "收款") {
|
||||||
|
tableString = $(".money_in").html();
|
||||||
|
}
|
||||||
|
else if(listSubType == "付款") {
|
||||||
|
tableString = $(".money_out").html();
|
||||||
|
}
|
||||||
|
else if(listSubType == "转账") {
|
||||||
|
tableString = $(".giro").html();
|
||||||
|
}
|
||||||
|
else if(listSubType == "收预付款") {
|
||||||
|
tableString = $(".advance_in").html();
|
||||||
|
}
|
||||||
|
localStorage.setItem("tableString",tableString);
|
||||||
|
window.open("../../js/print/print_form.html","location:No;status:No;help:No;dialogWidth:800px;dialogHeight:600px;scroll:auto;");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//初始化表格数据-商品列表-查看状态
|
//初始化表格数据-商品列表-查看状态
|
||||||
@@ -459,3 +533,6 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function print(){
|
||||||
|
alert(listSubType);
|
||||||
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
<script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
|
<script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
|
||||||
<script src="/js/common/common.js"></script>
|
<script src="/js/common/common.js"></script>
|
||||||
<script src="/js/pages/materials/bill_detail.js"></script>
|
<script src="/js/pages/materials/bill_detail.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="bill" class="easyui-panel" style="padding:10px;height:500px;" title="单据明细" iconCls="icon-list"
|
<div id="bill" class="easyui-panel" style="padding:10px;height:500px;" title="单据明细" iconCls="icon-list"
|
||||||
@@ -24,7 +25,7 @@
|
|||||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:60px;height:50px;">会员卡号:</td>
|
<td style="width:80px;height:50px;">会员卡号:</td>
|
||||||
<td style="padding:5px;width:200px;">
|
<td style="padding:5px;width:200px;">
|
||||||
<span class="OrganIdShow"></span>
|
<span class="OrganIdShow"></span>
|
||||||
</td>
|
</td>
|
||||||
@@ -93,7 +94,7 @@
|
|||||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:60px;height:50px;">会员卡号:</td>
|
<td style="width:80px;height:50px;">会员卡号:</td>
|
||||||
<td style="padding:5px;width:200px;">
|
<td style="padding:5px;width:200px;">
|
||||||
<span class="OrganIdShow"></span>
|
<span class="OrganIdShow"></span>
|
||||||
</td>
|
</td>
|
||||||
@@ -304,7 +305,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<!--销售出库-->
|
<!--销售出库-->
|
||||||
<div class="sale_out" style="width:1100px;padding:10px 20px;top:20px"
|
<div class="sale_out" style="width:1100px;padding:10px 20px;top:20px" id="depotHeadDlgShow"
|
||||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -379,6 +380,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--销售退货-->
|
<!--销售退货-->
|
||||||
<div class="sale_back" style="width:1100px;padding:10px 20px;top:20px"
|
<div class="sale_back" style="width:1100px;padding:10px 20px;top:20px"
|
||||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||||
@@ -823,5 +825,8 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="dlg-buttons-show">
|
||||||
|
<a href="javascript:void(0)" id="print_bill_detail" class="easyui-linkbutton" iconCls="icon-ok">打印</a>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user