1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
<?php $dir = "."; include_once($dir."/_common.php"); include('./include/header.php');
if($eid==''){ alert('e천년경영 로그인 후에 이용가능합니다.',"index.php"); exit; }
if($sdate==''){ $sdate = date("Y-m-",time())."01"; } if($edate==''){ $edate = date("Y-m-d",time()); }
$qstr = $_SERVER['QUERY_STRING'];
/*$sql = "select a.code, a.comp_name from customers a where 1=1 and (a.biztype = 0 or a.biztype = 2) order by comp_name"; $result = mysql_query($sql,$connect_e1000y);
while($cus_info=mysql_fetch_array($result)){
$comp_array[] = $cus_info; }*/ ?> <!--<div id="contents" style="background:#999"><img src="http://placehold.it/960x150" alt="롤링배너"></div>--> <div id="contents" style="height:2px;border-bottom:1px solid #eee;background:#2f6ba9"> <span class="screen_out">header 하단 선</span> </div>
<div id="wrap" class='container_wrap'> <div id="sub-title"> <h2>매입원장</h2> <div class="sub-location"> <a href="./index.php" class="home"><span class="screen_out">홈</span></a> <span class="location-gt"></span> <a>매입원장</a> <span class="location-gt"></span> <a>매입원장 리스트</a> </div> </div> <form name='buy_ledger_search_form' method='get'> <input type='hidden' name='search_form_name' id='search_form_name' value='buy_ledger_search_form'> <!-- 거래처 검색에서 리턴폼 명칭 정의--> <input type='hidden' name='biztype' size='' value='<?php echo $biztype;?>'> <input type='hidden' name='lmode' size='' value='<?php echo $lmode;?>'> <div id="sub-contents-area"> <div class="sub-btn-area"> <div class="sub-btn"> <a class="blue-btn" id='xls_down'>엑셀</a> <a class="gray-btn" id='print_down'>인쇄</a> </div> </div> <div class="sub-btn-area"> <div class="sub-btn sub-btn-search"> 기간 : <input type='text' name='sdate' id='sdate' value='<?php echo $sdate;?>' class='width_80'> ~ <input type='text' name='edate' id='edate' value='<?php echo $edate;?>' class='width_80'> 거래처검색 : <input type='text' name='stc' value='<?php echo $stc;?>' class='input_readonly width_60'> <input type='text' name='stc_search' value='<?php echo $stc_search;?>' class='cust_search_class width_80'> <img src='./images/glass.png' class='customer-sel-btn glass_class'> 상품검색 : <input type='text' id='stx' name='stx' size='' value='<?php echo $stx;?>' class="input_readonly width_60"> <input type='text' name='stx_search' value='<?php echo $stx_search;?>' class='prod_search_class width_80'> <img src='./images/glass.png' class='product-sel-btn glass_class'> <a href="#" class="black-btn" id='search_btn_press'>검색</a> </div> </div> </div> </form>
<div class="item_tab"> <div class="item_tab_navi"> <a value='0' <?php if($lmode=='detail'){?>class='on'<?php }?>><span>상세</span></a> <a value='1' <?php if($lmode=='product'){?>class='on'<?php }?>><span>상품별 집계</span></a> <a value='2' <?php if($lmode=='day' || $lmode==''){?>class='on'<?php }?>><span>일 집계</span></a> <a value='3' <?php if($lmode=='month'){?>class='on'<?php }?>><span>월 집계</span></a> </div> </div>
<?php if($lmode=='detail'){ include "buy_ledger.inc.detail.php"; } else if($lmode=='product'){ include "buy_ledger.inc.product.php"; } else if($lmode=='day' || $lmode==''){ include "buy_ledger.inc.day.php"; } else if($lmode=='month'){ include "buy_ledger.inc.month.php"; } ?>
</div><!--//wrap-->
<script> var qstr = '<?php echo $qstr;?>'; $(function(){ $(".item_tab_navi a").click(function(){ //네비게이션 탭 처리 v = $(this).attr("value"); if(v==0){ document.location.href="?lmode=detail"; } else if(v==1){ document.location.href="?lmode=product"; } else if(v==2){ document.location.href="?lmode=day"; } else if(v==3){ document.location.href="?lmode=month"; } });
$("#xls_down").click(function(){ // 엑셀다운로드 document.buy_ledger_search_form.action='buy_ledger_list_xls_down.php'; document.buy_ledger_search_form.target = '_blank'; document.buy_ledger_search_form.submit(); document.buy_ledger_search_form.action='?'; document.buy_ledger_search_form.target = ''; });
$("#print_down").click(function(){ // 인쇄 var form_data = $("form[name='buy_ledger_search_form']").serialize(); url = 'buy_ledger_list_print.php?'+form_data; window.open(url,'print_form',"width=1024, height=768, scrollbars=yes"); });
$("#search_btn_press").click(function(){ // 검색버튼 누를때 document.buy_ledger_search_form.action='?'; document.buy_ledger_search_form.target = ''; document.buy_ledger_search_form.submit(); });
$(".customer_change_class").change(function(){ $("#search_btn_press").click(); });
$(".click_edit").css("cursor","pointer").click(function(){ // 매입/입금에 따라서 해당링크로 이동함 var $tr_obj = $(this).closest("tr"); var midx = $tr_obj.find("input[name='midx']").val(); var midx_url = $tr_obj.find("input[name='midx_url']").val(); if(midx!='' && midx_url!=''){ document.location.href=midx_url+midx; } });
$(".customer-sel-btn").click(function(){ // 거래처 ? 검색일경우 customer_search('',1); });
$(".cust_search_class").keypress(function(){ // 거래처명란에서 엔터로 검색일경우 if(event.keyCode==13){ var v_cn = $(".cust_search_class").val() customer_search(encodeURI(v_cn),1); } }).change(function(){ $("input[name='stc']").val(""); });
$(".product-sel-btn").click(function(){ // 상품 ? 검색일경우 product_search('',1); });
$(".prod_search_class").keypress(function(){ // 상품검색란에서 엔터로 검색일경우 if(event.keyCode==13){ var v_cn = $(".prod_search_class").val() product_search(encodeURI(v_cn),1); } }).change(function(){ $("input[name='stx']").val(""); }); });
function customer_search(v_cn,v_page){ var sti_val = $("form[name='customer_search_form'] select[name='sti'] option:selected").val(); if(sti_val==undefined){ sti_val = "comp_name"; } $.get("customer_list.inc.php?biztype=0&modetype=ledger&sti="+sti_val+"&stx="+v_cn+"&page="+v_page,function(rtn){ $("#modal_member_box").html(rtn).dialog({ resizable: true, height:780, width:1100, modal: true, title: "거래처 [검색]", buttons: { 닫기: function() { $( this ).dialog( "close" ); } } }); }); }
function product_search(v_cn,v_page){ // 상품 검색
var sti_val = $("form[name='product_search_form'] select[name='sti'] option:selected").val(); if(sti_val==undefined){ sti_val = "a.name"; } $.get("product_list.inc.php?biztype=0&modetype=ledger&sti="+sti_val+"&stx="+v_cn+"&page="+v_page,function(rtn){ $("#modal_member_box").html(rtn).dialog({ resizable: true, height:820, width:1150, modal: true, title: "상품 [검색]", buttons: { 닫기: function() { $( this ).dialog( "close" ); } } }); }); }
</script> <?php include('./include/footer.php'); ?> <div id="modal_member_box" title="1차모달" style="display:none;width:100%; height:100%; padding-top:3px;padding-left:3px;background-color:#FFFFFF;position:relative;"></div> <div id="modal_member_box2" title="2차모달" style="display:none;width:100%; height:100%; padding-top:3px;padding-left:3px;background-color:#FFFFFF;position:relative;"></div>
|