Merge branch 'release/4.7' of http://git.yoho.cn/fe/YOHOBUYPC into release/4.7
Showing
19 changed files
with
48 additions
and
533 deletions
@@ -359,10 +359,8 @@ class CartData | @@ -359,10 +359,8 @@ class CartData | ||
359 | * @param string $cartType 购物车类型 | 359 | * @param string $cartType 购物车类型 |
360 | * @param int $deliveryTime 寄送时间ID | 360 | * @param int $deliveryTime 寄送时间ID |
361 | * @param int $deliveryWay 寄送方式ID | 361 | * @param int $deliveryWay 寄送方式ID |
362 | - * @param int $invoiceType 发票类型 1:纸质,2:电子 | ||
363 | - * @param string $invoiceTitle 发票抬头 | ||
364 | - * @param int $invoiceContent 发票内容 | ||
365 | - * @param string $receiverMobile 发票接收人电话 | 362 | + * @param string $invoiceTitle 发票说明 |
363 | + * @param int $invoiceId 发票类型ID | ||
366 | * @param int $paymentId 支付方式ID | 364 | * @param int $paymentId 支付方式ID |
367 | * @param int $paymentType 支付类型ID | 365 | * @param int $paymentType 支付类型ID |
368 | * @param string $remark 留言 | 366 | * @param string $remark 留言 |
@@ -376,7 +374,7 @@ class CartData | @@ -376,7 +374,7 @@ class CartData | ||
376 | * @param int $redEnvelopes 红包 | 374 | * @param int $redEnvelopes 红包 |
377 | * @return array 接口返回的数据 | 375 | * @return array 接口返回的数据 |
378 | */ | 376 | */ |
379 | - public static function orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceType, $invoiceTitle, $invoiceContent, $receiverMobile, | 377 | + public static function orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId, |
380 | $paymentId, $paymentType, $remark,$couponCode,$promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $unionKey,$userAgent, $redEnvelopes) | 378 | $paymentId, $paymentType, $remark,$couponCode,$promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $unionKey,$userAgent, $redEnvelopes) |
381 | { | 379 | { |
382 | $param = Yohobuy::param(); | 380 | $param = Yohobuy::param(); |
@@ -389,18 +387,11 @@ class CartData | @@ -389,18 +387,11 @@ class CartData | ||
389 | $param['delivery_time'] = $deliveryTime; | 387 | $param['delivery_time'] = $deliveryTime; |
390 | $param['delivery_way'] = $deliveryWay; | 388 | $param['delivery_way'] = $deliveryWay; |
391 | $param['uid'] = $uid; | 389 | $param['uid'] = $uid; |
392 | - | ||
393 | - if (!empty($invoiceType)) { | ||
394 | - $param['invoices_type'] = $invoiceType; | ||
395 | - } | ||
396 | if (!empty($invoiceTitle)) { | 390 | if (!empty($invoiceTitle)) { |
397 | $param['invoices_title'] = $invoiceTitle; | 391 | $param['invoices_title'] = $invoiceTitle; |
398 | } | 392 | } |
399 | - if (!empty($invoiceContent)) { | ||
400 | - $param['invoice_content'] = $invoiceContent; | ||
401 | - } | ||
402 | - if (!empty($receiverMobile)) { | ||
403 | - $param['receiverMobile'] = $receiverMobile; | 393 | + if (!empty($invoiceId)) { |
394 | + $param['invoices_type_id'] = $invoiceId; | ||
404 | } | 395 | } |
405 | if (!empty($redEnvelopes)) { | 396 | if (!empty($redEnvelopes)) { |
406 | $param['use_red_envelopes'] = $redEnvelopes; | 397 | $param['use_red_envelopes'] = $redEnvelopes; |
@@ -429,6 +420,7 @@ class CartData | @@ -429,6 +420,7 @@ class CartData | ||
429 | } | 420 | } |
430 | $param['remark'] = $remark; | 421 | $param['remark'] = $remark; |
431 | $param['client_secret'] = Sign::getSign($param); | 422 | $param['client_secret'] = Sign::getSign($param); |
423 | + | ||
432 | return Yohobuy::get(Yohobuy::API_URL, $param, false, false, 10, $userAgent); | 424 | return Yohobuy::get(Yohobuy::API_URL, $param, false, false, 10, $userAgent); |
433 | } | 425 | } |
434 | 426 |
@@ -278,28 +278,24 @@ | @@ -278,28 +278,24 @@ | ||
278 | </tbody> | 278 | </tbody> |
279 | </table> | 279 | </table> |
280 | <!--YOHO--> | 280 | <!--YOHO--> |
281 | - | ||
282 | - <div class="section-play"> | ||
283 | - <div class="section-head">发票信息</div> | ||
284 | - <div class="play-pan"> | ||
285 | - <input class="invoice mes" name="invoice" type="radio" id="" autocomplete="off"/>发票开具 | ||
286 | - <div class="invoice-content hide"> | ||
287 | - <div class="invoice-type mes">电子发票</div> | ||
288 | - <div class="invoice-partment mes">个人</div> | ||
289 | - <div class="invoice-kind mes">服装</div> | ||
290 | - <button class="revise mes">修改 | ||
291 | - </div> | ||
292 | - <div class='invoice-upload hide'> | ||
293 | - <div class="invoice-upload-type"></div> | ||
294 | - <div class="invoice-upload-content"></div> | ||
295 | - <div class="invoice-upload-mobile"></div> | ||
296 | - <div class="invoice-upload-title"></div> | ||
297 | - </div> | ||
298 | - </div> | ||
299 | - </div> | ||
300 | - | ||
301 | <div class="play-content clearfix"> | 281 | <div class="play-content clearfix"> |
302 | <div class="play-left"> | 282 | <div class="play-left"> |
283 | + <dl class="play-piao-pan pan"> | ||
284 | + <dt>索要发票</dt> | ||
285 | + <dd> | ||
286 | + <div class="play-pan"> | ||
287 | + <ul> | ||
288 | + <li><label>发票抬头 :</label><input type="text" class="textbox" id="piaodesc" /></li> | ||
289 | + <li><label>发票类型 :</label> <select class="dropdown" id="piaotype"> | ||
290 | + <option value="0">请选择</option> | ||
291 | + {{#each piaoTypes}} | ||
292 | + <option value="{{id}}">{{name}}</option> | ||
293 | + {{/each}} | ||
294 | + </select> </li> | ||
295 | + </ul> | ||
296 | + </div> | ||
297 | + </dd> | ||
298 | + </dl> | ||
303 | <dl class="play-remark-pan pan"> | 299 | <dl class="play-remark-pan pan"> |
304 | <dt>添加备注信息</dt> | 300 | <dt>添加备注信息</dt> |
305 | <dd> | 301 | <dd> |
@@ -395,69 +391,6 @@ | @@ -395,69 +391,6 @@ | ||
395 | </div> | 391 | </div> |
396 | </div> | 392 | </div> |
397 | </div> | 393 | </div> |
398 | - | ||
399 | - <div class="receipt-info hide"> | ||
400 | - <div class="receipt-mask"> | ||
401 | - </div> | ||
402 | - | ||
403 | - <div class="receipt-info-container"> | ||
404 | - <div class="receipt-title">发票信息 | ||
405 | - </div> | ||
406 | - | ||
407 | - <div class="receipt-type receipt-margin"> | ||
408 | - <span class="e-receipt receipt-type-selected">电子发票</span> | ||
409 | - <span class="paper-receipt">纸质发票</span> | ||
410 | - </div> | ||
411 | - | ||
412 | - <div class="receipt-container receipt-margin"> | ||
413 | - <div class="e-receipt-desc"> | ||
414 | - <a href="{{invoiceUrl}}"></a> | ||
415 | - </div> | ||
416 | - | ||
417 | - <div class="invoice-list invoice-title invoice-title-personal-hight"> | ||
418 | - <span class="invoice-star">*</span> | ||
419 | - <span class="invoice-list-type">发票抬头</span> | ||
420 | - <div class="invoice-line first-line"> | ||
421 | - <input checked="true" type="radio" value="1" name="title" /> | ||
422 | - <label>个人</label> | ||
423 | - <input type="radio" value="2" name="title" /> | ||
424 | - <label>单位</label> | ||
425 | - </div> | ||
426 | - <div class="invoice-line second-line input-line hide"> | ||
427 | - <input id="input-organization-name" type="text" placeholder="请填写单位名称" maxlength="30"/> | ||
428 | - <i class="enpty-input iconfont hide"> 请填写发票抬头</i> | ||
429 | - </div> | ||
430 | - </div> | ||
431 | - | ||
432 | - <div class="invoice-list invoice-content"> | ||
433 | - <span class="invoice-star">*</span> | ||
434 | - <span class="invoice-list-type">发票内容</span> | ||
435 | - <div class="invoice-line first-line"> | ||
436 | - {{# piaoTypes}} | ||
437 | - <div class="blind"> | ||
438 | - <input {{#if @first}}checked="true"{{/if}} type="radio" value="{{name}}" name="content" data-receiptID="{{id}}"/> | ||
439 | - <label>{{name}}</label> | ||
440 | - </div> | ||
441 | - {{/ piaoTypes}} | ||
442 | - </div> | ||
443 | - </div> | ||
444 | - | ||
445 | - <div class="invoice-list invoice-phone"> | ||
446 | - <span class="invoice-star">*</span> | ||
447 | - <span class="invoice-list-type">收票人手机</span> | ||
448 | - <div class="invoice-line first-line input-line"> | ||
449 | - <input id="input-mobile" value="{{receiverMobile}}" type="text" maxlength="11"/> | ||
450 | - <i class="enpty-input iconfont hide"> 请填写手机号码</i> | ||
451 | - </div> | ||
452 | - </div> | ||
453 | - </div> | ||
454 | - | ||
455 | - <div class="receipt-footer"> | ||
456 | - <div class="save-receipt highlight curser-button">保存发票信息</div> | ||
457 | - <div class="cancel-receipt normal curser-button">取消</div> | ||
458 | - </div> | ||
459 | - </div> | ||
460 | - </div> | ||
461 | {{/ orderEnsure}} | 394 | {{/ orderEnsure}} |
462 | <div class="loading"><span></span>请稍后...</div> | 395 | <div class="loading"><span></span>请稍后...</div> |
463 | 396 |
@@ -97,25 +97,6 @@ | @@ -97,25 +97,6 @@ | ||
97 | </div> | 97 | </div> |
98 | {{/ orderInfo}} | 98 | {{/ orderInfo}} |
99 | 99 | ||
100 | - <div class="pay-mode"> | ||
101 | - <p class="sub-title"> | ||
102 | - <span class="icon"></span> | ||
103 | - 发票信息 | ||
104 | - </p> | ||
105 | - <div class="content"> | ||
106 | - {{#if invoiceMode}} | ||
107 | - <div class="invoice-type"><p>发票类型:{{invoiceType}}</p> | ||
108 | - {{#if pdfUrl}}<a class="invoice-button" href="{{pdfUrl}}">电子发票下载</a> | ||
109 | - {{/if}} | ||
110 | - </div> | ||
111 | - <p>发票抬头:{{title}}</p> | ||
112 | - <p>发票内容:{{contentValue}}</p> | ||
113 | - {{^}} | ||
114 | - <p>暂不需要发票 | ||
115 | - {{/if}} | ||
116 | - </div> | ||
117 | - </div> | ||
118 | - | ||
119 | <div class="order-remark"> | 100 | <div class="order-remark"> |
120 | <p class="sub-title"> | 101 | <p class="sub-title"> |
121 | <span class="icon"></span> | 102 | <span class="icon"></span> |
1 | Stack trace: | 1 | Stack trace: |
2 | Frame Function Args | 2 | Frame Function Args |
3 | -0000022A1F8 0018007208E (0018026056D, 00180215E46, 0000022A1F8, 000002290F0) | ||
4 | -0000022A1F8 00180046DF2 (0000022A158, 00000000000, 00000000000, 001005E6E6C) | ||
5 | -0000022A1F8 00180046E32 (00180260629, 0000022A0A8, 0000022A1F8, 00000000000) | ||
6 | -0000022A1F8 001800BDE7F (00000000000, 00000000000, 00000000000, 00000000000) | ||
7 | -0000022A1F8 001800BE09F (0000022A220, 00000000000, 00000000000, 00000000000) | ||
8 | -0000022A2A0 001800BF35A (0000022A220, 00000000000, 00000000000, 00000000000) | 3 | +00000226128 0018007208E (0018026056D, 00180215E46, 00000226128, 00000225020) |
4 | +00000226128 00180046DF2 (00000226088, 00000000000, 00000000000, 001005E6E6C) | ||
5 | +00000226128 00180046E32 (00180260629, 00000225FD8, 00000226128, 00000000000) | ||
6 | +00000226128 001800BDE7F (00000000000, 00000000000, 00000000000, 00000000000) | ||
7 | +00000226128 001800BE09F (00000226150, 00000000000, 00000000000, 00000000000) | ||
8 | +000002261D0 001800BF35A (00000226150, 00000000000, 00000000000, 00000000000) | ||
9 | End of stack trace | 9 | End of stack trace |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
@@ -26,8 +26,7 @@ var $addressManage = $('.address-manage'), | @@ -26,8 +26,7 @@ var $addressManage = $('.address-manage'), | ||
26 | $useNewAddress = $('.use-new-address'), | 26 | $useNewAddress = $('.use-new-address'), |
27 | $existAddressList = $('.exist-address-list'), | 27 | $existAddressList = $('.exist-address-list'), |
28 | $loading = $('.loading'), | 28 | $loading = $('.loading'), |
29 | - $orderEditMain = $('#order-edit-main'), | ||
30 | - $invoiceCheck = $('.invoice'); | 29 | + $orderEditMain = $('#order-edit-main'); |
31 | 30 | ||
32 | var cartType = $addressManage.attr('cart-type'); | 31 | var cartType = $addressManage.attr('cart-type'); |
33 | 32 | ||
@@ -762,10 +761,8 @@ $('.to-play input.submit').click(function() { | @@ -762,10 +761,8 @@ $('.to-play input.submit').click(function() { | ||
762 | var addressId = $('.exist-address-list input[name="address"]:checked').closest('li').attr('data-id'), | 761 | var addressId = $('.exist-address-list input[name="address"]:checked').closest('li').attr('data-id'), |
763 | deliveryTimeId = $('.pay-time-modify input[name="pay-time-radio"]:checked').val(), | 762 | deliveryTimeId = $('.pay-time-modify input[name="pay-time-radio"]:checked').val(), |
764 | deliveryWayId = $('.select-express input[name="carriagegroup"]:checked').val(), | 763 | deliveryWayId = $('.select-express input[name="carriagegroup"]:checked').val(), |
765 | - invoiceType, | ||
766 | - invoiceContent, | ||
767 | - receiverMobile, | ||
768 | - invoiceTitle, | 764 | + invoiceTitle = $('#piaodesc').val(), |
765 | + invoiceId = $('#piaotype').val(), | ||
769 | paymentType = $('.pay-time-modify input[name="pay-type"]:checked').val(), | 766 | paymentType = $('.pay-time-modify input[name="pay-type"]:checked').val(), |
770 | paymentId = $('.pay-time-modify input[name="pay-type"]:checked').data('pay'), | 767 | paymentId = $('.pay-time-modify input[name="pay-type"]:checked').data('pay'), |
771 | remark = $('#notedesc').val(), | 768 | remark = $('#notedesc').val(), |
@@ -777,13 +774,6 @@ $('.to-play input.submit').click(function() { | @@ -777,13 +774,6 @@ $('.to-play input.submit').click(function() { | ||
777 | codeVal = $juangroupInput.val(), | 774 | codeVal = $juangroupInput.val(), |
778 | juanCode = !!codeVal ? codeVal : $juangroupInput.closest('li').find('#juancode').val(); | 775 | juanCode = !!codeVal ? codeVal : $juangroupInput.closest('li').find('#juancode').val(); |
779 | 776 | ||
780 | - if ($invoiceCheck.hasClass('active')) { | ||
781 | - invoiceType = $('.invoice-upload-type').html(); | ||
782 | - invoiceContent = $('.invoice-upload-content').html(); | ||
783 | - receiverMobile = $('.invoice-upload-mobile').html(); | ||
784 | - invoiceTitle = $('.invoice-upload-title').html(); | ||
785 | - } | ||
786 | - | ||
787 | $loading.show(); | 777 | $loading.show(); |
788 | 778 | ||
789 | if (!!$this.attr('disabled')) { | 779 | if (!!$this.attr('disabled')) { |
@@ -801,10 +791,8 @@ $('.to-play input.submit').click(function() { | @@ -801,10 +791,8 @@ $('.to-play input.submit').click(function() { | ||
801 | cartType: cartType, | 791 | cartType: cartType, |
802 | deliveryTimeId: deliveryTimeId, | 792 | deliveryTimeId: deliveryTimeId, |
803 | deliveryWayId: deliveryWayId, | 793 | deliveryWayId: deliveryWayId, |
804 | - invoiceType: invoiceType, | ||
805 | - invoiceContent: invoiceContent, | ||
806 | - receiverMobile: receiverMobile, | ||
807 | invoiceTitle: invoiceTitle, | 794 | invoiceTitle: invoiceTitle, |
795 | + invoiceId: invoiceId, | ||
808 | paymentId: paymentId, | 796 | paymentId: paymentId, |
809 | paymentType: paymentType, | 797 | paymentType: paymentType, |
810 | remark: remark, | 798 | remark: remark, |
@@ -3,19 +3,9 @@ | @@ -3,19 +3,9 @@ | ||
3 | * @time: 2015/12/21 | 3 | * @time: 2015/12/21 |
4 | */ | 4 | */ |
5 | 5 | ||
6 | -var $ = require('yoho.jquery'), | ||
7 | - $invoiceCheck = $('.invoice'), | ||
8 | - $receiptInfo = $('.receipt-info'), | ||
9 | - $receiptInfoSaveBtn = $('.receipt-info .save-receipt'), | ||
10 | - $receiptInfoCancelBtn = $('.receipt-info .cancel-receipt'), | ||
11 | - $eReceiptBtn = $('.receipt-type .e-receipt'), | ||
12 | - $paperReceiptBtn = $('.receipt-type .paper-receipt'); | 6 | +var $ = require('yoho.jquery'); |
13 | 7 | ||
14 | - | ||
15 | -var address = require('./address'), | ||
16 | - receiptTitle = "个人", | ||
17 | - receiptMobile = $('#input-mobile').val(), | ||
18 | - receiptMobileStar; | 8 | +var address = require('./address'); |
19 | 9 | ||
20 | var dialog = require('../common/dialog'); | 10 | var dialog = require('../common/dialog'); |
21 | 11 | ||
@@ -862,148 +852,3 @@ $('.bag').find('ul').each(function() { | @@ -862,148 +852,3 @@ $('.bag').find('ul').each(function() { | ||
862 | $next.hide(); | 852 | $next.hide(); |
863 | } | 853 | } |
864 | }); | 854 | }); |
865 | - | ||
866 | -$invoiceCheck.click(function(){ | ||
867 | - | ||
868 | - if ($invoiceCheck.hasClass('active')) { | ||
869 | - $invoiceCheck.removeAttr('checked'); | ||
870 | - $invoiceCheck.removeClass('active'); | ||
871 | - } | ||
872 | - | ||
873 | - if ($invoiceCheck.attr('checked')) { | ||
874 | - $invoiceCheck.addClass('active'); | ||
875 | - if ($('.invoice-content').hasClass('hide')) { | ||
876 | - $receiptInfo.removeClass('hide'); | ||
877 | - } | ||
878 | - } | ||
879 | -}); | ||
880 | - | ||
881 | -//电子发票 | ||
882 | - | ||
883 | -(function receiptMobileToStarString(numb) { | ||
884 | - receiptMobileStar = numb.substr(0, 3) + '****' + numb.substr(7); | ||
885 | - $('#input-mobile').val(receiptMobileStar); | ||
886 | -}(receiptMobile)); | ||
887 | - | ||
888 | -function saveReceiptInfo() { | ||
889 | - var passInfoVerify = true, | ||
890 | - receiptType, | ||
891 | - receiptContent, | ||
892 | - verifymobile, | ||
893 | - receiptTypeID, | ||
894 | - invoiceTypeInt, | ||
895 | - finalReceiptMobile; | ||
896 | - | ||
897 | - if ($eReceiptBtn.hasClass('receipt-type-selected')) { | ||
898 | - receiptType = "电子发票"; | ||
899 | - invoiceTypeInt = '2'; | ||
900 | - } else { | ||
901 | - receiptType = "纸质发票"; | ||
902 | - invoiceTypeInt = '1'; | ||
903 | - } | ||
904 | - | ||
905 | - if (receiptTitle === "单位") { | ||
906 | - $('.input-line').each(function(){ | ||
907 | - if ($(this).find('input').val() === '') { | ||
908 | - $(this).find('.enpty-input').removeClass('hide'); | ||
909 | - passInfoVerify = false; | ||
910 | - }; | ||
911 | - }) | ||
912 | - }; | ||
913 | - | ||
914 | - finalReceiptMobile = $('#input-mobile').val(); | ||
915 | - if (finalReceiptMobile === receiptMobileStar) { | ||
916 | - finalReceiptMobile = receiptMobile; | ||
917 | - } else { | ||
918 | - verifymobile = /[0-9]{11}/; | ||
919 | - if (!verifymobile.test(finalReceiptMobile)) { | ||
920 | - $('.invoice-phone .enpty-input').removeClass('hide'); | ||
921 | - if (finalReceiptMobile.length === 0) { | ||
922 | - $('.invoice-phone .enpty-input').html(' 请填写手机号码'); | ||
923 | - } else { | ||
924 | - $('.invoice-phone .enpty-input').html(' 手机号码不正确'); | ||
925 | - } | ||
926 | - passInfoVerify = false; | ||
927 | - } | ||
928 | - } | ||
929 | - | ||
930 | - if (!passInfoVerify) { | ||
931 | - return; | ||
932 | - } else { | ||
933 | - $('.invoice-title .enpty-input').addClass('hide'); | ||
934 | - $('.invoice-phone .enpty-input').addClass('hide'); | ||
935 | - if (receiptTitle === "单位") { | ||
936 | - receiptTitle = $('#input-organization-name').val(); | ||
937 | - } | ||
938 | - } | ||
939 | - | ||
940 | - receiptContent = $('input[name="content"]:checked').val(); | ||
941 | - receiptTypeID = $('input[name="content"]:checked').data('receiptid'); | ||
942 | - | ||
943 | - $('.invoice-type').html(receiptType); | ||
944 | - $('.invoice-partment').html(receiptTitle); | ||
945 | - $('.invoice-kind').html(receiptContent); | ||
946 | - | ||
947 | - $('.invoice-upload-type').html(invoiceTypeInt); | ||
948 | - $('.invoice-upload-content').html(receiptTypeID); | ||
949 | - $('.invoice-upload-mobile').html(finalReceiptMobile); | ||
950 | - $('.invoice-upload-title').html(receiptTitle); | ||
951 | - | ||
952 | - $receiptInfo.addClass('hide'); | ||
953 | - $('.invoice-content').removeClass('hide'); | ||
954 | -} | ||
955 | -$receiptInfoSaveBtn.click(function(){ | ||
956 | - saveReceiptInfo(); | ||
957 | -}); | ||
958 | - | ||
959 | -$receiptInfoCancelBtn.click(function(){ | ||
960 | - $receiptInfo.addClass('hide'); | ||
961 | - | ||
962 | - if ($('.invoice-content').hasClass('hide')) { | ||
963 | - $invoiceCheck.removeAttr('checked'); | ||
964 | - $invoiceCheck.removeClass('active'); | ||
965 | - } else { | ||
966 | - | ||
967 | - } | ||
968 | -}); | ||
969 | - | ||
970 | -$('.revise').click(function(){ | ||
971 | - $receiptInfo.removeClass('hide'); | ||
972 | -}); | ||
973 | - | ||
974 | -$eReceiptBtn.click(function(){ | ||
975 | - $eReceiptBtn.addClass('receipt-type-selected'); | ||
976 | - $paperReceiptBtn.removeClass('receipt-type-selected'); | ||
977 | - $('.e-receipt-desc').removeClass('hide'); | ||
978 | -}); | ||
979 | - | ||
980 | -$paperReceiptBtn.click(function(){ | ||
981 | - $paperReceiptBtn.addClass('receipt-type-selected'); | ||
982 | - $eReceiptBtn.removeClass('receipt-type-selected'); | ||
983 | - $('.e-receipt-desc').addClass('hide'); | ||
984 | -}); | ||
985 | - | ||
986 | -$('.invoice-title').change(function(){ | ||
987 | - var selectType = $('input[name="title"]:checked').val(); | ||
988 | - if (selectType === "1") { | ||
989 | - receiptTitle = "个人"; | ||
990 | - $('.invoice-title').addClass('invoice-title-personal-hight'); | ||
991 | - $('.invoice-title .input-line').addClass('hide'); | ||
992 | - } else { | ||
993 | - receiptTitle = "单位"; | ||
994 | - $('.invoice-title').removeClass('invoice-title-personal-hight'); | ||
995 | - $('.invoice-title .input-line').removeClass('hide'); | ||
996 | - } | ||
997 | -}) | ||
998 | - | ||
999 | -$('#input-organization-name').bind('input propertychange', function() { | ||
1000 | - if ($(this).val().length >= 1) { | ||
1001 | - $('.invoice-title .enpty-input').addClass('hide'); | ||
1002 | - } | ||
1003 | -}); | ||
1004 | - | ||
1005 | -$('#input-mobile').bind('input propertychange', function() { | ||
1006 | - if ($(this).val().length >= 1) { | ||
1007 | - $('.invoice-phone .enpty-input').addClass('hide'); | ||
1008 | - } | ||
1009 | -}); |
@@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
6 | } | 6 | } |
7 | 7 | ||
8 | .status { | 8 | .status { |
9 | + margin: 10px 0; | ||
9 | padding: 10px; | 10 | padding: 10px; |
10 | background: #efefef; | 11 | background: #efefef; |
11 | border-bottom: 1px solid #e6e6e6; | 12 | border-bottom: 1px solid #e6e6e6; |
@@ -143,22 +144,6 @@ | @@ -143,22 +144,6 @@ | ||
143 | .trace-order th { | 144 | .trace-order th { |
144 | line-height: 18px; | 145 | line-height: 18px; |
145 | } | 146 | } |
146 | - | ||
147 | - .invoice-type { | ||
148 | - display: inline-block; | ||
149 | - p { | ||
150 | - display: inline-block; | ||
151 | - } | ||
152 | - } | ||
153 | - | ||
154 | - .invoice-button { | ||
155 | - display: inline-block; | ||
156 | - margin-left: 20px; | ||
157 | - color: #d93549; | ||
158 | - border:1px solid #444444; | ||
159 | - padding: 5px; | ||
160 | - } | ||
161 | - | ||
162 | .differentOrder{ | 147 | .differentOrder{ |
163 | position: relative; | 148 | position: relative; |
164 | width: 100%; | 149 | width: 100%; |
@@ -603,189 +603,6 @@ | @@ -603,189 +603,6 @@ | ||
603 | } | 603 | } |
604 | } | 604 | } |
605 | } | 605 | } |
606 | - | ||
607 | - .receipt-info { | ||
608 | - position: fixed; | ||
609 | - top: 0; | ||
610 | - left: 0; | ||
611 | - width: 100%; | ||
612 | - height: 100%!important; | ||
613 | - | ||
614 | - .receipt-mask { | ||
615 | - | ||
616 | - width: 100%; | ||
617 | - height: 100%; | ||
618 | - overflow: hidden; | ||
619 | - background-color: #000; | ||
620 | - opacity: 0.4; | ||
621 | - z-index: 1000; | ||
622 | - } | ||
623 | - | ||
624 | - .receipt-info-container { | ||
625 | - position: fixed; | ||
626 | - top: 5%; | ||
627 | - left: 0; | ||
628 | - right: 0; | ||
629 | - width: 700px; | ||
630 | - height: auto; | ||
631 | - margin-left: auto; | ||
632 | - margin-right: auto; | ||
633 | - background-color: #fff; | ||
634 | - border: 3px solid #444; | ||
635 | - } | ||
636 | - | ||
637 | - .receipt-title { | ||
638 | - margin: 42px 55px 0; | ||
639 | - text-align: left; | ||
640 | - font-size: 16px; | ||
641 | - padding-bottom: 20px; | ||
642 | - border-bottom: 3px solid #888; | ||
643 | - } | ||
644 | - | ||
645 | - .receipt-type { | ||
646 | - margin: 17px 0; | ||
647 | - | ||
648 | - span { | ||
649 | - margin-right: 17px; | ||
650 | - padding: 5px 15px; | ||
651 | - font-size: 14px; | ||
652 | - border: 1px solid #e0e0e0; | ||
653 | - color: #505050; | ||
654 | - } | ||
655 | - | ||
656 | - .receipt-type-selected { | ||
657 | - border: 1px solid #d0021b; | ||
658 | - color: #d0021b; | ||
659 | - } | ||
660 | - } | ||
661 | - | ||
662 | - .e-receipt-desc { | ||
663 | - position: relative; | ||
664 | - background: url(/order/invoice-desc.png); | ||
665 | - width: 100%; | ||
666 | - height: 108px; | ||
667 | - | ||
668 | - a { | ||
669 | - position: absolute; | ||
670 | - left: 0; | ||
671 | - bottom: 0; | ||
672 | - width: 150px; | ||
673 | - height: 40px; | ||
674 | - } | ||
675 | - } | ||
676 | - .receipt-margin { | ||
677 | - margin-left: 55px; | ||
678 | - margin-right: 55px; | ||
679 | - } | ||
680 | - | ||
681 | - .invoice-list { | ||
682 | - position: relative; | ||
683 | - margin-top: 17px; | ||
684 | - height: 90px; | ||
685 | - | ||
686 | - .invoice-star { | ||
687 | - position: absolute; | ||
688 | - top: 0; | ||
689 | - left: 0; | ||
690 | - margin-top: 5px; | ||
691 | - width: 12px; | ||
692 | - height: 20px; | ||
693 | - line-height: 20px; | ||
694 | - font-size: 20px; | ||
695 | - color: #d0021b; | ||
696 | - text-align: center; | ||
697 | - } | ||
698 | - .invoice-list-type { | ||
699 | - position: absolute; | ||
700 | - top: 0; | ||
701 | - left: 15px; | ||
702 | - width: 80px; | ||
703 | - height: 20px; | ||
704 | - line-height: 20px; | ||
705 | - font-size: 14px | ||
706 | - } | ||
707 | - | ||
708 | - .invoice-line { | ||
709 | - position: absolute; | ||
710 | - left: 120px; | ||
711 | - width: 500px; | ||
712 | - height: 30px; | ||
713 | - } | ||
714 | - | ||
715 | - .first-line { | ||
716 | - top: 0; | ||
717 | - } | ||
718 | - | ||
719 | - .second-line { | ||
720 | - top: 30px; | ||
721 | - } | ||
722 | - | ||
723 | - .input-line { | ||
724 | - height: 40px; | ||
725 | - | ||
726 | - input { | ||
727 | - width: 200px; | ||
728 | - height: 30px; | ||
729 | - font-size: 14px; | ||
730 | - } | ||
731 | - } | ||
732 | - | ||
733 | - .invoice-line label { | ||
734 | - width: 90px; | ||
735 | - display: inline-block; | ||
736 | - } | ||
737 | - | ||
738 | - .invoice-line i { | ||
739 | - margin-left: 20px; | ||
740 | - } | ||
741 | - } | ||
742 | - | ||
743 | - .invoice-title-personal-hight { | ||
744 | - height: 30px; | ||
745 | - } | ||
746 | - | ||
747 | - .invoice-phone { | ||
748 | - height: 40px; | ||
749 | - } | ||
750 | - | ||
751 | - .invoice-title_group{ | ||
752 | - height: 90px; | ||
753 | - } | ||
754 | - | ||
755 | - .blind { | ||
756 | - display: inline-block; | ||
757 | - margin-top: 5px; | ||
758 | - margin-bottom: 5px; | ||
759 | - } | ||
760 | - | ||
761 | - .receipt-footer { | ||
762 | - margin-left: 160px; | ||
763 | - | ||
764 | - div { | ||
765 | - display: inline-block; | ||
766 | - width: 140px; | ||
767 | - height: 40px; | ||
768 | - line-height: 40px; | ||
769 | - text-align: center; | ||
770 | - margin: 30px 20px 35px 20px; | ||
771 | - } | ||
772 | - | ||
773 | - .highlight { | ||
774 | - border: 1px solid #3a3a3a; | ||
775 | - background: #3a3a3a; | ||
776 | - color: #fff; | ||
777 | - | ||
778 | - } | ||
779 | - .normal { | ||
780 | - border: 1px solid #b0b0b0; | ||
781 | - background: #fff; | ||
782 | - color: #444; | ||
783 | - } | ||
784 | - } | ||
785 | - .enpty-input { | ||
786 | - color: #d3132a; | ||
787 | - } | ||
788 | - } | ||
789 | } | 606 | } |
790 | .freebie-tag{ | 607 | .freebie-tag{ |
791 | background:#9c3; | 608 | background:#9c3; |
@@ -225,16 +225,6 @@ class OrderModel | @@ -225,16 +225,6 @@ class OrderModel | ||
225 | } | 225 | } |
226 | $detail['orderBalance'][] = array('promotion' => '实际应支付', 'account' => $orderDetail['amount']); | 226 | $detail['orderBalance'][] = array('promotion' => '实际应支付', 'account' => $orderDetail['amount']); |
227 | } | 227 | } |
228 | - //发票 | ||
229 | - if (isset($orderDetail['invoice']) && $orderDetail['invoice']) { | ||
230 | - $detail['invoiceMode'] = true; | ||
231 | - $detail['invoiceType'] = $orderDetail['invoice']['type']; | ||
232 | - $detail['pdfUrl'] = $orderDetail['invoice']['pdfUrl']; | ||
233 | - $detail['title'] = $orderDetail['invoice']['title']; | ||
234 | - $detail['contentValue'] = $orderDetail['invoice']['contentValue']; | ||
235 | - $detail['showInvoice'] = $orderDetail['invoice']['showInvoice']; | ||
236 | - } | ||
237 | - | ||
238 | $detail['yoho_give_coin'] = $orderDetail['yoho_give_coin']; | 228 | $detail['yoho_give_coin'] = $orderDetail['yoho_give_coin']; |
239 | $detail['yohoCoinUrl'] = Helpers::url('/help', array('category_id' => 87)); //什么是yoho币介绍 | 229 | $detail['yohoCoinUrl'] = Helpers::url('/help', array('category_id' => 87)); //什么是yoho币介绍 |
240 | $detail['remark'] = $orderDetail['remark']; | 230 | $detail['remark'] = $orderDetail['remark']; |
@@ -579,9 +579,6 @@ class CartModel | @@ -579,9 +579,6 @@ class CartModel | ||
579 | do { | 579 | do { |
580 | /* 调接口订单确认接口 */ | 580 | /* 调接口订单确认接口 */ |
581 | $pay = CartData::cartPay($uid, $cartType); | 581 | $pay = CartData::cartPay($uid, $cartType); |
582 | - //获取用户手机号码用于发票接收人 | ||
583 | - $userInfo = UserData::getUserInfo($uid); | ||
584 | - | ||
585 | if (!$pay || empty($pay['data']['goods_list'])) { | 582 | if (!$pay || empty($pay['data']['goods_list'])) { |
586 | break; | 583 | break; |
587 | } | 584 | } |
@@ -698,16 +695,14 @@ class CartModel | @@ -698,16 +695,14 @@ class CartModel | ||
698 | } | 695 | } |
699 | } | 696 | } |
700 | 697 | ||
701 | - /* 发票内容 */ | ||
702 | - if (!empty($pay['data']['invoices']['invoiceContentList'])) { | ||
703 | - foreach ($pay['data']['invoices']['invoiceContentList'] as $value) { | ||
704 | - $result['piaoTypes'][$value['invoices_type_id']]['id'] = $value['invoices_type_id']; | ||
705 | - $result['piaoTypes'][$value['invoices_type_id']]['name'] = $value['invoices_type_name']; | 698 | + /* 发票类型 */ |
699 | + if (!empty($pay['data']['invoices']['invoices_type_list'])) { | ||
700 | + $build = array(); | ||
701 | + foreach ($pay['data']['invoices']['invoices_type_list'] as $value) { | ||
702 | + $build['id'] = $value['invoices_type_id']; | ||
703 | + $build['name'] = $value['invoices_type_name']; | ||
704 | + $result['piaoTypes'][] = $build; | ||
706 | } | 705 | } |
707 | - ksort($result['piaoTypes']); | ||
708 | - $result['piaoTypes'] = array_values($result['piaoTypes']); | ||
709 | - $result['receiverMobile'] = isset($userInfo['data']['mobile']) && $userInfo['data']['mobile'] ? $userInfo['data']['mobile'] : ''; | ||
710 | - $result['invoiceUrl'] = 'http://www.yohobuy.com/help?category_id=99'; | ||
711 | } | 706 | } |
712 | 707 | ||
713 | /* 需购买的商品 */ | 708 | /* 需购买的商品 */ |
@@ -900,7 +895,7 @@ class CartModel | @@ -900,7 +895,7 @@ class CartModel | ||
900 | * @param int $redEnvelopes 红包 | 895 | * @param int $redEnvelopes 红包 |
901 | * @return array 接口返回的数据 | 896 | * @return array 接口返回的数据 |
902 | */ | 897 | */ |
903 | - public static function orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceType, $invoiceTitle, $invoiceContent, $receiverMobile, $paymentId, $paymentType, $remark, $couponCode,$promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes) | 898 | + public static function orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode,$promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes) |
904 | { | 899 | { |
905 | $result = array('code' => 400, 'message' => self::ERROR_400_MESSAGE); | 900 | $result = array('code' => 400, 'message' => self::ERROR_400_MESSAGE); |
906 | 901 | ||
@@ -941,7 +936,7 @@ class CartModel | @@ -941,7 +936,7 @@ class CartModel | ||
941 | $userAgent = isset($unionInfo['client_id']) ? 'YOHO!Buy/3.8.2.259(Model/PC;Channel/' . $unionInfo['client_id'] . ';uid/' . $uid . ')' : null; | 936 | $userAgent = isset($unionInfo['client_id']) ? 'YOHO!Buy/3.8.2.259(Model/PC;Channel/' . $unionInfo['client_id'] . ';uid/' . $uid . ')' : null; |
942 | } | 937 | } |
943 | 938 | ||
944 | - $orderSubRes = CartData::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceType, $invoiceTitle, $invoiceContent, $receiverMobile, $paymentId, $paymentType, $remark, $couponCode,$promotionCode,$yohoCoin, $isPreContact, $isPrintPrice,$unionKey,$userAgent, $redEnvelopes); | 939 | + $orderSubRes = CartData::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode,$promotionCode,$yohoCoin, $isPreContact, $isPrintPrice,$unionKey,$userAgent, $redEnvelopes); |
945 | if ($orderSubRes && isset($orderSubRes['code'])) { | 940 | if ($orderSubRes && isset($orderSubRes['code'])) { |
946 | $result = $orderSubRes; | 941 | $result = $orderSubRes; |
947 | } | 942 | } |
@@ -439,11 +439,8 @@ class IndexController extends WebAction | @@ -439,11 +439,8 @@ class IndexController extends WebAction | ||
439 | $cartType = $this->post('cartType', 'ordinary'); // 默认普通购物车 | 439 | $cartType = $this->post('cartType', 'ordinary'); // 默认普通购物车 |
440 | $deliveryTimeId = $this->post('deliveryTimeId', 1); // 默认只工作日配送 | 440 | $deliveryTimeId = $this->post('deliveryTimeId', 1); // 默认只工作日配送 |
441 | $deliveryWayId = $this->post('deliveryWayId', 1); // 默认普通快递 | 441 | $deliveryWayId = $this->post('deliveryWayId', 1); // 默认普通快递 |
442 | - $invoiceType = $this->post('invoiceType', null); // 发票类型:纸质 1 ,电子 2 | ||
443 | - $invoiceTitle = $this->post('invoiceTitle', '个人'); // 发票抬头 | ||
444 | - $invoiceContent = $this->post('invoiceContent', null); // 发票内容 | ||
445 | - $receiverMobile = $this->post('receiverMobile', null); // 接收人电话 | ||
446 | - | 442 | + $invoiceTitle = $this->post('invoiceTitle', null); // 发票抬头 |
443 | + $invoiceId = $this->post('invoiceId', null); // 发票类型 | ||
447 | $paymentId = $this->post('paymentId', 15); // 支付ID | 444 | $paymentId = $this->post('paymentId', 15); // 支付ID |
448 | $paymentType = $this->post('paymentType', 1); // 默认在线支付 | 445 | $paymentType = $this->post('paymentType', 1); // 默认在线支付 |
449 | $remark = $this->post('remark', ''); // 备注信息 | 446 | $remark = $this->post('remark', ''); // 备注信息 |
@@ -453,8 +450,9 @@ class IndexController extends WebAction | @@ -453,8 +450,9 @@ class IndexController extends WebAction | ||
453 | $isPreContact = $this->post('isPreContact', false); // 送货前是否联系 | 450 | $isPreContact = $this->post('isPreContact', false); // 送货前是否联系 |
454 | $isPrintPrice = $this->post('isPrintPrice', true); // 是否打印价格 | 451 | $isPrintPrice = $this->post('isPrintPrice', true); // 是否打印价格 |
455 | $redEnvelopes = $this->post('redEnvelopes', null); | 452 | $redEnvelopes = $this->post('redEnvelopes', null); |
453 | + | ||
456 | // 调用下单接口 | 454 | // 调用下单接口 |
457 | - $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceType, $invoiceTitle, $invoiceContent, $receiverMobile, | 455 | + $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId, |
458 | $paymentId, $paymentType, $remark, $couponCode, $promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes); | 456 | $paymentId, $paymentType, $remark, $couponCode, $promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes); |
459 | // 判断是否下单成功 | 457 | // 判断是否下单成功 |
460 | if (empty($result['data']['order_code'])) { | 458 | if (empty($result['data']['order_code'])) { |
@@ -112,12 +112,6 @@ class OrdersController extends WebAction | @@ -112,12 +112,6 @@ class OrdersController extends WebAction | ||
112 | 'orderBalance' => isset($detail['orderBalance']) ? $detail['orderBalance'] : array(), | 112 | 'orderBalance' => isset($detail['orderBalance']) ? $detail['orderBalance'] : array(), |
113 | 'operation' => $detail['operation'], | 113 | 'operation' => $detail['operation'], |
114 | 'totalYoho' => $detail['yoho_give_coin'], | 114 | 'totalYoho' => $detail['yoho_give_coin'], |
115 | - //发票信息 | ||
116 | - 'invoiceMode' => $detail['invoiceMode'], | ||
117 | - 'invoiceType' => $detail['invoiceType'] === 2 ? '电子发票' : '纸质发票', | ||
118 | - 'pdfUrl' => $detail['showInvoice'] && $detail['pdfUrl'] ? $detail['pdfUrl'] : '', | ||
119 | - 'title' => $detail['title'], | ||
120 | - 'contentValue' => $detail['contentValue'] ? $detail['contentValue'] : '个人', | ||
121 | ); | 115 | ); |
122 | if (isset($detail['noramlPayMode'])) { | 116 | if (isset($detail['noramlPayMode'])) { |
123 | $data['orderInfo'] = $detail['orderInfo']; | 117 | $data['orderInfo'] = $detail['orderInfo']; |
-
Please register or login to post a comment