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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
|
<?php $sub_menu = "400100"; include("./_common.php"); include("./auth_check.php"); // 관리자 권한 체크 include($j3_adm_path."/shop_header.php");
$oinfo = order_info_get($idx); //_pr($oinfo);
?> <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>
<div class='cust_modal1'> <h4>상품정보</h4> <div class="cust-list-area"> <table class="order-sheet2 table-top-border"> <caption class="screen_out">상품정보<caption> <colgroup> <col style="width:30px;" > <col style="width:80px;"><!--<col style="width:80px;">--><col <col style="190px"> <!--<col style="width:80px;">--><col style="190px"> <col style="width:120px;"><col style="width:80px;"><col style="width:150px;"> <col style="width:90px;"> <col style="width:90px;"> </colgroup>
<thead> <tr> <th scope="col" ><!--<input type='checkbox' name='ck_all' class='check_all_class'>--></th> <th scope="col">이미지</th><!--<th scope="col">상품코드</th>--><th scope="col">상품명</th> <!--<th scope="col">옵션코드</th>--><th scope="col">옵션명</th> <th scope="col">매출단가</th><th scope="col">수량<!--(취소)--></th><th scope="col">합계금액</th> <th scope="col">관리</th> <th scope="col">납품수량</th> </tr> </thead> <tbody class='change_check_class' style='border-top:0px; !important;'> <?php $list_array = $oinfo['row']; for($i=0;$i<count($list_array);$i++){ $info = $list_array[$i]; ?> <tr> <td class="tcenter item_info"> <!--<input type='checkbox' name='code_idx[]' value='<?php echo $i;?>' class='code_idx_class'>--> <input type='hidden' name='midx[]' value='<?php echo $info['midx'];?>'> <input type='hidden' name='seq[]' value='<?php echo $info['seq'];?>'> <input type='hidden' name='pcode[]' value='<?php echo $info['pcode'];?>'> </td> <td class="tcenter <?php echo $click_edit;?> padd_5px"> <img src='<?php echo $thumb_file = get_it_thumbnail($info['sc_pcode'],$info['pic1'],50,50);?>' width=50> <input type='hidden' name='thumb_file[]' value='<?php echo $thumb_file;?>'> </td> <!--<td class="tcenter "><?php echo $info['sc_pcode'];?></td>--> <td class="linetxt "><?php echo $info['pname'];?></td> <!--<td class="tcenter "><?php if($info['opt_mode']!=''){ echo $info['opt_pcode']; }?></td>--> <td class="linetxt "><?php if($info['opt_mode']!=''){ echo $info['opt_name']; }?></td> <td class="cost "><?php echo number_format($info['tot_amt']/$info['qty']);?></td> <td class="cost "> <?php echo number_format($info['qty']); ?> <?php /*if($info['cancel_qty']>0){ echo "<span class='red'>(-".number_format($info['cancel_qty']).")</span>"; }*/ ?> </td> <td class="cost "><?php echo number_format($info['tot_amt']); ?></td> <td class="linetxt"> <?php if($oinfo['ordstate']==0 && $oinfo['deposit']==0){?> <input type='button' value='변경' class='padd_5px item_cancel_class'> <div class='screen_out cancel_box'> <form name='change_form'> <input type='hidden' name='omode' value='item_change'> <?php echo $info['pname'];?> <?php if($info['opt_mode']!=''){ echo "/".$info['opt_name']; }?><br><br> <input type='checkbox' name='c_ck' value='1'> 수량변경 : <input type='text' name='cancel_qty' value='<?php echo $info['qty'];?>' size=10> <!--<select name='cancel_qty'> <?php for($s=1;$s<=($info['qty']-$info['out_tot_qty']);$s++){ echo "<option value='{$s}'>{$s}</option>"; }?> </select> 개--> </form> </div> <input type='button' value='삭제' class='padd_5px item_del_class'> <div class='screen_out del_box'> <form name='delete_form'> <input type='hidden' name='omode' value='item_delete'> <?php echo $info['pname'];?> <?php if($info['opt_mode']!=''){ echo "/".$info['opt_name']; }?><br><br> <input type='checkbox' name='c_ck' value='1'> 상품삭제 확인 </form> </div> <?php } ?> </td> <td class="cost "><?php echo number_format($info['out_tot_qty']); ?></td> </tr> <?php } ?> </tbody> </table> </div> </div> <span class='help_info'>납품수량은 천년3에서 완납(매출)처리한 수량입니다. 수량이 있는지 확인후에 주문상태 변경하시기 바랍니다.<br>관리(수량변경/삭제)는 미입금상태만 가능합니다.</span>
<div id="sub-contents-area" style='padding:10px 0px 20px 10px; '> <div class="sub-btn-area"> <div class="sub-btn"> 주문상태 변경 : <a class="lignt-blue-btn order_state_change" value='00'>미입금</a> <a class="lignt-blue-btn order_state_change" value='01'>입금</a> <a class="blue-btn order_state_change" value='1'>배송준비중</a> <a class="gray-btn order_state_change" value='2'>배송중</a> <a class="black-btn order_state_change" value='3'>배송완료</a> <a class="black-btn order_state_change" value='9'>취소</a> <?php if($oinfo['pay_type']!='무통장' && $oinfo['deposit']=='1'){ ?> <input type='checkbox' name='pg_cancel' value='1'> 취소변경시 PG(카드 등)취소 <?php }?> </div> </div> </div>
<form name='order_pay_form' id='order_pay_form' method='post' action='ajax.order_process.php' enctype="multipart/form-data" onsubmit='return false;'> <input type='hidden' name='qstr' value=''> <input type='hidden' name='midx' value='<?php echo $oinfo['midx'];?>'> <input type='hidden' name='omode' value=''> <div class='cust_modal2'> <h4>주문 결제 내역</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">주문 결제 내역</caption> <colgroup> <col style="width:100px;"><col style="width:395px;"> <col style="width:100px;"><col style="width:395px;"> </colgroup>
<tbody> <tr> <th>주문번호</th> <td class='font-weight-bold'><?php echo $oinfo['od_id'];?></td> <th>주문일자</th> <td class='font-weight-bold'><?php echo substr($info['data_created'],0,19);?></td> </tr> <tr> <th>결제방법</th> <td colspan=1> <?php if($oinfo['deposit']=='0'){?> <select name='pay_type'> <?php foreach($pay_type_list as $key=>$val){ if($val==$oinfo['pay_type']){ $selected = "selected"; } else { $selected = ""; } echo "<option value='{$val}' {$selected}>{$val}</option>"; } ?> </select> <?php } else {?> <?php echo $oinfo['pay_type'];?> <?php }?> <?php if($oinfo['pay_type']=='무통장'){ echo $oinfo['s_app_info']; }?> </td> <th>주문상태</th> <td colspan=1 class='font-weight-bold'> <?php echo $oinfo['od_state'];?> </td> </tr> <tr> <th>결제할금액</th> <td><?php echo number_format($oinfo['tot_pay_price']);?> 원</td> <th>미입금액</th> <td class='font-weight-bold'><?php echo number_format($oinfo['tot_pay_price']-$oinfo['deposit_price']);?> 원</td> </tr> <tr> <th>입금금액</th> <td> <input type='text' name='deposit_price' class='number_class font-weight-bold' value='<?php echo number_format($oinfo['deposit_price']);?>'> 원 <input type='checkbox' name='df_deposit_price' id='df_deposit_price' value='<?php echo $oinfo['wdeposit_price'];?>'> 결제금액 입력 </td> <th>입금일시</th> <td > <input type='text' name='deposit_time' value='<?php echo $oinfo['deposit_time'];?>'> <input type='checkbox' name='df_deposit_time' id='df_deposit_time' value='<?php echo date("Y-m-d H:i:s",time());?>'> 현재시각 설정 </td> </tr> <tr> <th>할인금액</th> <td ><?php echo number_format($oinfo['dc_price']);?> 원</td> <th>포인트사용금액</th> <td ><?php echo number_format($oinfo['use_point']);?> 원</td> </tr> <tr> <th>적립포인트</th> <td><?php echo number_format($oinfo['save_point']);?> pt</td> <th>입금처리</th> <td > <input type='checkbox' name='deposit' value='1'> 주문상태 입금으로 처리함 <input type='checkbox' name='s_mail' value='Y'> 입금안내 메일 <input type='checkbox' name='s_sms' value='Y'> 입금안내 SMS </td> </tr> </table> </div> </form>
<div id="sub-contents-area" style='padding-left:500px;padding-top:20px;'> <div class="sub-btn-area"> <div class="sub-btn"> <a class="lignt-blue-btn" id='btn_pay_save'>결제정보 수정</a> <a class="gray-btn btn_cancel_save" id=''>목록</a> </div> </div> </div>
<form name='order_deli_form' id='order_deli_form' method='post' action='ajax.order_process.php' enctype="multipart/form-data" onsubmit='return false;'> <input type='hidden' name='qstr' value=''> <input type='hidden' name='midx' value='<?php echo $oinfo['midx'];?>'> <input type='hidden' name='omode' value=''>
<div class='cust_modal2'> <h4>주문자 배송 정보</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">주문자 배송 정보</caption> <colgroup> <col style="width:100px;"><col style="width:395px;"> <col style="width:100px;"><col style="width:395px;"> </colgroup>
<tbody> <tr> <th>주문자명</th> <td colspan=1><?php echo $oinfo['s_name'];?></td> <th>배송자명</th> <td colspan=1><input type='text' name='consignee_name' value='<?php echo $oinfo['consignee_name'];?>'></td> </tr> <tr> <th><?php if($app_id=='mjflower'){ echo "배송희망일"; } else {?>주문 전화번호<?php }?></th> <td colspan=1><?php echo $oinfo['s_telno'];?></td> <th>배송 전화번호</th> <td colspan=1><input type='text' name='consignee_telno' value='<?php echo $oinfo['consignee_telno'];?>'></td> </tr> <tr> <th>주문 핸드폰</th> <td colspan=1><?php echo $oinfo['s_hpno'];?></td> <th>배송 핸드폰</th> <td colspan=1><input type='text' name='consignee_hpno' value='<?php echo $oinfo['consignee_hpno'];?>'></td> </tr> <tr> <th>주문 주소</th> <td colspan=1> 우편번호 : <?php echo $oinfo['s_zipcode'];?><br> <?php echo $oinfo['s_addr_m']." ".$oinfo['s_addr_d'];?> </td> <th>배송 주소</th> <td colspan=1> 우편번호 : <input type='text' name='consignee_zipcode' class='width_60' value='<?php echo $oinfo['consignee_zipcode'];?>'><br> <input type='text' name='consignee_addr_m' class='width_400' value='<?php echo $oinfo['consignee_addr_m'];?>'><br> <input type='text' name='consignee_addr_d' class='width_400' value='<?php echo $oinfo['consignee_addr_d'];?>'> </td> </tr> <tr> <th><?php if($app_id=='mjflower'){ echo "배송위치(메모)"; } else {?>주문 이메일<?php }?></th> <td colspan=1><?php echo $oinfo['s_email'];?></td> <th>배송 메모</th> <td colspan=1><input type='text' name='transport_msg' class='width_400' value='<?php echo $oinfo['transport_msg'];?>'></td> </tr> <tr> <th>배송회사</th> <td colspan=1> <input type='text' name='deli_company' class='width_120' value='<?php echo $oinfo['deli_company'];?>'> <input type='checkbox' name='df_deli_company' id='df_deli_company' value='<?php echo $configshop['deli_company'];?>'> 기본배송사로 설정 </td> <th>운송장번호</th> <td colspan=1> <input type='text' name='tracking_number' class='width_200' value='<?php echo $oinfo['tracking_number'];?>'> <input type='checkbox' name='ch_ordstate' id='ordstate' value='2'> 주문상태 배송중으로 변경 <br> <input type='checkbox' name='s_mail' value='Y'> 배송안내 메일 <input type='checkbox' name='s_sms' value='Y'> 배송안내 SMS </td> </tr> <tr> <th>관리자 메모</th> <td colspan=3> <input type='text' name='remarks' class='width_500' value='<?php echo $oinfo['remarks'];?>'> 100자 까지 </td> </tr> </table> </div>
</form>
<div id="sub-contents-area" style='padding-left:500px;padding-top:20px;'> <div class="sub-btn-area"> <div class="sub-btn"> <a class="lignt-blue-btn" id='btn_order_save'>배송정보 수정</a> <a class="gray-btn btn_cancel_save" id=''>목록</a> </div> </div> </div> <div class='cust_modal2'> <h4>기타 정보</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">기타 정보</caption> <colgroup> <col style="width:100px;"><col style="width:890px;"> </colgroup>
<tbody> <tr> <th>주문 히스토리 정보</th> <td colspan=3> <?php echo nl2br($oinfo['s_order_his']); ?> </td> </tr> </table> </div>
<div id="sub-contents-area" style='padding-left:550px;padding-top:20px;'> <div class="sub-btn-area"> <div class="sub-btn"> <a class="gray-btn btn_delete_save" id=''>주문삭제</a> </div> </div> </div> </div> <!-- wrap end--> <script> function form_save(){ // 배송정보 수정 $form_obj = $("#order_deli_form"); if(confirm('수정하시겠습니까?')){ $form_obj.find("input[name='omode']").val("deli_edit"); form_data = $form_obj.serialize(); $.ajax({type:"post", url:"ajax.order_process.php", data:form_data, async:false, dataType : "xml", success:function(xml){ var v_mode = $(xml).find("mode").text(); var v_mode_ok = $(xml).find("mode_ok").text(); var v_msg = $(xml).find("msg").text(); var v_qa_cnt = $(xml).find("qa_cnt").text(); if(v_mode_ok=='Y'){ document.location.reload(); } else { alert(v_msg); } }, error:function(rtn,status,error){ alert(error); } }); } }
function form_pay_save(){ // 결제정보 수정 $form_obj = $("#order_pay_form"); if($("input[name='deposit']").is(":checked")){ $tit = "저장하시면 입금상태로 설정됩니다. "; } else { $tit = ""; } if(confirm($tit+'수정하시겠습니까? ')){ $form_obj.find("input[name='omode']").val("pay_edit"); form_data = $form_obj.serialize(); $.ajax({type:"post", url:"ajax.order_process.php", data:form_data, async:false, dataType : "xml", success:function(xml){ var v_mode = $(xml).find("mode").text(); var v_mode_ok = $(xml).find("mode_ok").text(); var v_msg = $(xml).find("msg").text(); var v_qa_cnt = $(xml).find("qa_cnt").text(); if(v_mode_ok=='Y'){ document.location.reload(); } else { alert(v_msg); } }, error:function(rtn,status,error){ alert(error); } }); } }
function item_change_qty($tr_obj){ // 개별상품 수량 변경 처리 $modal = $("#modal_member_box2"); $c_ck = $modal.find("input[name='c_ck']"); if($c_ck.is(":checked")==false){ alert("상품수량변경 체크하시기 바랍니다."); return; } if(confirm('정말로 해당 상품을 수량변경 처리하시겠습니까?')){ $v1 = $tr_obj.find(".item_info").html(); $modal.find("form[name='change_form']").append($v1); form_data = $modal.find("form[name='change_form']").serialize(); $.ajax({type:"post", url:"ajax.order_process.php", data:form_data, async:false, dataType : "xml", success:function(xml){ var v_mode = $(xml).find("mode").text(); var v_mode_ok = $(xml).find("mode_ok").text(); var v_msg = $(xml).find("msg").text(); var v_qa_cnt = $(xml).find("qa_cnt").text(); if(v_mode_ok=='Y'){ document.location.reload(); } else { alert(v_msg); } }, error:function(rtn,status,error){ alert(error); } }); } }
function item_delete($tr_obj){ // 개별상품 삭제 처리 $modal = $("#modal_member_box2"); $c_ck = $modal.find("input[name='c_ck']"); if($c_ck.is(":checked")==false){ alert("상품삭제 체크하시기 바랍니다."); return; } if(confirm('정말로 해당 상품을 삭제 처리하시겠습니까? 복구 불가능합니다.')){ $v1 = $tr_obj.find(".item_info").html(); $modal.find("form[name='delete_form']").append($v1); form_data = $modal.find("form[name='delete_form']").serialize(); $.ajax({type:"post", url:"ajax.order_process.php", data:form_data, async:false, dataType : "xml", success:function(xml){ var v_mode = $(xml).find("mode").text(); var v_mode_ok = $(xml).find("mode_ok").text(); var v_msg = $(xml).find("msg").text(); var v_qa_cnt = $(xml).find("qa_cnt").text(); if(v_mode_ok=='Y'){ document.location.reload(); } else { alert(v_msg); } }, error:function(rtn,status,error){ alert(error); } }); } }
$(function(){ $(".check_all_class").click(function(){ if($(this).is(":checked")==true){ $(".code_idx_class").prop("checked",true); } else { $(".code_idx_class").prop("checked",false); } }); $("#btn_order_save").click(function(){ // 배송정보 저장시 form_save(); });
$(".btn_cancel_save").click(function(){ // 목록 버튼 document.location.href='./order.php?<?php echo $_COOKIE['qstr'];?>'; });
$("#df_deli_company").click(function(){ // 기본배송사 설정 $v = $(this).val(); $("input[name='deli_company']").val($v); });
$("#btn_pay_save").click(function(){ form_pay_save(); });
$("#df_deposit_price").click(function(){ // 결제금액 입력 $v = $(this).val(); $("input[name='deposit_price']").val($v); });
$("#df_deposit_time").click(function(){ // 입금일시 설정 $v = $(this).val(); $("input[name='deposit_time']").val($v); });
$(".order_state_change").click(function(){ // 주문상태 변경 $tit = $(this).html(); $pg_cancel = $("input[name='pg_cancel']").is(":checked"); if(confirm('정말로 '+$tit+"처리하시겠습니까?")){ $v = $(this).attr('value'); form_data = "midx=<?php echo $idx;?>&omode=state_change&ch_ordstate="+$v+"&pg_cancel="+$pg_cancel; $.ajax({type:"post", url:"ajax.order_process.php", data:form_data, async:false, dataType : "xml", success:function(xml){ var v_mode = $(xml).find("mode").text(); var v_mode_ok = $(xml).find("mode_ok").text(); var v_msg = $(xml).find("msg").text(); var v_qa_cnt = $(xml).find("qa_cnt").text(); if(v_mode_ok=='Y'){ document.location.reload(); } else { alert(v_msg); } }, error:function(rtn,status,error){ alert(error); } }); } });
$(".btn_delete_save").click(function(){ // 주문 강제 삭제 if(confirm('정말로 해당 주문을 삭제하시겠습니까? 복구가 불가능합니다.')){ form_data = "code_idx[]=0&codes[]=<?php echo $idx;?>&omode=ord_delete&single_del=Y"; $.ajax({type:"post", url:"ajax.order_process.php", data:form_data, async:false, dataType : "xml", success:function(xml){ var v_mode = $(xml).find("mode").text(); var v_mode_ok = $(xml).find("mode_ok").text(); var v_msg = $(xml).find("msg").text(); var v_qa_cnt = $(xml).find("qa_cnt").text(); if(v_mode_ok=='Y'){ document.location.href='./order.php?<?php echo $_COOKIE['qstr'];?>'; } else { alert(v_msg); } }, error:function(rtn,status,error){ alert(error); } }); } });
$(".item_cancel_class").click(function(){ $tr_obj = $(this).closest("tr"); $v = $($tr_obj).find(".cancel_box").html(); $("#modal_member_box2").html($v).dialog({ resizable: true, height:180, width:300, modal: true, title:"상품 [수량변경]", buttons: { 수량변경: function() { item_change_qty($tr_obj); }, 닫기: function() { $( this ).dialog( "close" ); } } }); }); $(".item_del_class").click(function(){ $tr_obj = $(this).closest("tr"); $v = $($tr_obj).find(".del_box").html(); $("#modal_member_box2").html($v).dialog({ resizable: true, height:180, width:300, modal: true, title:"상품 [삭제]", buttons: { 상품삭제: function() { item_delete($tr_obj); }, 닫기: function() { $( this ).dialog( "close" ); } } }); }); })
</script> <?php //_pr($_COOKIE['qstr']); include($j3_adm_path."/shop_footer.php"); ?> <div id="modal_member_box2" title="거래처수정" style="display:none;width:100%; height:100%; padding-top:3px;padding-left:3px;background-color:#FFFFFF;position:relative;"></div>
|