rails_trade 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +20 -165
- data/README.md +8 -1
- data/app/apis/trade/apple_pay_api.rb +33 -0
- data/app/controllers/trade/admin/advances_controller.rb +58 -0
- data/app/controllers/trade/admin/base_controller.rb +3 -4
- data/app/controllers/trade/admin/card_advances_controller.rb +60 -0
- data/app/controllers/trade/admin/card_logs_controller.rb +44 -0
- data/app/controllers/trade/admin/card_payments_controller.rb +60 -0
- data/app/controllers/trade/admin/card_prepayments_controller.rb +58 -0
- data/app/controllers/trade/admin/card_promotes_controller.rb +63 -0
- data/app/controllers/trade/admin/card_templates_controller.rb +69 -0
- data/app/controllers/trade/admin/cards_controller.rb +66 -0
- data/app/controllers/trade/admin/carts_controller.rb +74 -0
- data/app/controllers/trade/admin/cash_givens_controller.rb +55 -0
- data/app/controllers/trade/admin/cash_logs_controller.rb +45 -0
- data/app/controllers/trade/admin/cashes_controller.rb +41 -0
- data/app/controllers/trade/admin/order_payments_controller.rb +42 -40
- data/app/controllers/trade/admin/orders_controller.rb +73 -83
- data/app/controllers/trade/admin/payment_methods_controller.rb +71 -84
- data/app/controllers/trade/admin/payment_orders_controller.rb +45 -42
- data/app/controllers/trade/admin/payment_references_controller.rb +45 -39
- data/app/controllers/trade/admin/payment_strategies_controller.rb +43 -40
- data/app/controllers/trade/admin/payments_controller.rb +68 -74
- data/app/controllers/trade/admin/payouts_controller.rb +67 -0
- data/app/controllers/trade/admin/promote_carts_controller.rb +54 -0
- data/app/controllers/trade/admin/promote_charges_controller.rb +55 -53
- data/app/controllers/trade/admin/promote_goods_controller.rb +51 -46
- data/app/controllers/trade/admin/promotes_controller.rb +3 -67
- data/app/controllers/trade/admin/refunds_controller.rb +51 -40
- data/app/controllers/trade/admin/trade_items_controller.rb +103 -98
- data/app/controllers/trade/admin/trade_promotes_controller.rb +36 -54
- data/app/controllers/trade/admin/users_controller.rb +30 -0
- data/app/controllers/trade/advances_controller.rb +50 -0
- data/app/controllers/trade/base_controller.rb +4 -0
- data/app/controllers/trade/card_templates_controller.rb +61 -0
- data/app/controllers/trade/controller/application.rb +35 -0
- data/app/controllers/trade/controller/promote.rb +68 -0
- data/app/controllers/trade/my/advances_controller.rb +66 -0
- data/app/controllers/trade/my/base_controller.rb +3 -3
- data/app/controllers/trade/my/card_logs_controller.rb +15 -0
- data/app/controllers/trade/my/cards_controller.rb +78 -0
- data/app/controllers/trade/my/carts_controller.rb +50 -29
- data/app/controllers/trade/my/cash_logs_controller.rb +10 -0
- data/app/controllers/trade/my/orders_controller.rb +145 -81
- data/app/controllers/trade/my/payment_methods_controller.rb +40 -57
- data/app/controllers/trade/my/payments_controller.rb +56 -0
- data/app/controllers/trade/my/payouts_controller.rb +33 -0
- data/app/controllers/trade/my/trade_items_controller.rb +54 -44
- data/app/controllers/trade/panel/base_controller.rb +4 -0
- data/app/controllers/trade/panel/exchange_rates_controller.rb +53 -0
- data/app/controllers/trade/payments_controller.rb +53 -51
- data/app/models/payment/trade/alipay_payment.rb +5 -0
- data/app/models/payment/trade/apple_payment.rb +5 -0
- data/app/models/payment/trade/bank_payment.rb +5 -0
- data/app/models/payment/trade/card_payment.rb +5 -0
- data/app/models/payment/trade/hand_payment.rb +5 -0
- data/app/models/payment/trade/paypal_payment.rb +5 -0
- data/app/models/payment/trade/stripe_payment.rb +5 -0
- data/app/models/payment/trade/wxpay_payment.rb +5 -0
- data/app/models/payment_method/trade/alipay_method.rb +4 -0
- data/app/models/payment_method/trade/bank_method.rb +4 -0
- data/app/models/payment_method/trade/stripe_method.rb +5 -0
- data/app/models/payout/trade/wxpay_payout.rb +5 -0
- data/app/models/promote_charge/trade/discount_promote_charge.rb +5 -0
- data/app/models/promote_charge/trade/final_promote_charge.rb +5 -0
- data/app/models/promote_charge/trade/minus_promote_charge.rb +5 -0
- data/app/models/promote_charge/trade/plus_promote_charge.rb +5 -0
- data/app/models/refund/trade/alipay_refund.rb +5 -0
- data/app/models/refund/trade/bank_refund.rb +5 -0
- data/app/models/refund/trade/card_refund.rb +5 -0
- data/app/models/refund/trade/hand_refund.rb +5 -0
- data/app/models/refund/trade/paypal_refund.rb +5 -0
- data/app/models/refund/trade/stripe_refund.rb +5 -0
- data/app/models/refund/trade/wxpay_refund.rb +5 -0
- data/app/models/trade/advance.rb +6 -0
- data/app/models/trade/application_record.rb +5 -0
- data/app/models/trade/card.rb +6 -0
- data/app/models/trade/card_advance.rb +5 -0
- data/app/models/trade/card_log.rb +5 -0
- data/app/models/trade/card_prepayment.rb +5 -0
- data/app/models/trade/card_promote.rb +5 -0
- data/app/models/trade/card_template.rb +5 -0
- data/app/models/trade/cart.rb +7 -0
- data/app/models/trade/cash.rb +6 -0
- data/app/models/trade/cash_given.rb +5 -0
- data/app/models/trade/cash_log.rb +5 -0
- data/app/models/trade/exchange_rate.rb +5 -0
- data/app/models/trade/ext/payable.rb +50 -0
- data/app/models/trade/ext/user.rb +38 -0
- data/app/models/trade/model/advance.rb +43 -0
- data/app/models/trade/model/agency.rb +10 -0
- data/app/models/trade/model/amount.rb +41 -0
- data/app/models/trade/model/card.rb +64 -0
- data/app/models/trade/model/card_advance.rb +52 -0
- data/app/models/trade/model/card_log.rb +17 -0
- data/app/models/trade/model/card_prepayment.rb +31 -0
- data/app/models/trade/model/card_promote.rb +14 -0
- data/app/models/trade/model/card_template.rb +31 -0
- data/app/models/trade/model/cart.rb +60 -0
- data/app/models/trade/model/cash.rb +32 -0
- data/app/models/trade/model/cash_given.rb +40 -0
- data/app/models/trade/model/cash_log.rb +26 -0
- data/app/models/trade/model/compute.rb +33 -0
- data/app/models/trade/model/exchange_rate.rb +44 -0
- data/app/models/trade/model/good.rb +66 -0
- data/app/models/trade/model/member.rb +25 -0
- data/app/models/trade/model/order.rb +127 -0
- data/app/models/trade/model/payment/alipay_payment.rb +17 -0
- data/app/models/trade/model/payment/apple_payment.rb +9 -0
- data/app/models/trade/model/payment/bank_payment.rb +19 -0
- data/app/models/trade/model/payment/card_payment.rb +72 -0
- data/app/models/trade/model/payment/hand_payment.rb +10 -0
- data/app/models/trade/model/payment/paypal_payment.rb +10 -0
- data/app/models/trade/model/payment/stripe_payment.rb +11 -0
- data/app/models/trade/model/payment/wxpay_payment.rb +15 -0
- data/app/models/trade/model/payment.rb +131 -0
- data/app/models/trade/model/payment_method/stripe_method.rb +59 -0
- data/app/models/trade/model/payment_method.rb +67 -0
- data/app/models/trade/model/payment_order.rb +108 -0
- data/app/models/trade/model/payment_reference.rb +21 -0
- data/app/models/trade/model/payment_strategy.rb +22 -0
- data/app/models/trade/model/payout/wxpay_payout.rb +31 -0
- data/app/models/trade/model/payout.rb +71 -0
- data/app/models/trade/model/plan_attender.rb +33 -0
- data/app/models/trade/model/profile.rb +10 -0
- data/app/models/trade/model/promote.rb +59 -0
- data/app/models/trade/model/promote_cart.rb +30 -0
- data/app/models/trade/model/promote_charge/discount_promote_charge.rb +19 -0
- data/app/models/trade/model/promote_charge/final_promote_charge.rb +11 -0
- data/app/models/trade/model/promote_charge/minus_promote_charge.rb +20 -0
- data/app/models/trade/model/promote_charge/plus_promote_charge.rb +9 -0
- data/app/models/trade/model/promote_charge.rb +86 -0
- data/app/models/trade/model/promote_extra.rb +16 -0
- data/app/models/trade/model/promote_good.rb +28 -0
- data/app/models/trade/model/refund/alipay_refund.rb +29 -0
- data/app/models/trade/model/refund/bank_refund.rb +4 -0
- data/app/models/trade/model/refund/card_refund.rb +45 -0
- data/app/models/trade/model/refund/hand_refund.rb +9 -0
- data/app/models/trade/model/refund/paypal_refund.rb +27 -0
- data/app/models/trade/model/refund/stripe_refund.rb +20 -0
- data/app/models/trade/model/refund/wxpay_refund.rb +74 -0
- data/app/models/trade/model/refund.rb +70 -0
- data/app/models/trade/model/sell.rb +24 -0
- data/app/models/trade/model/trade_item.rb +214 -0
- data/app/models/trade/model/trade_promote.rb +69 -0
- data/app/models/trade/order.rb +8 -0
- data/app/models/trade/ordering/payment.rb +112 -0
- data/app/models/trade/ordering/refund.rb +36 -0
- data/app/models/trade/payment.rb +6 -0
- data/app/models/trade/payment_method.rb +5 -0
- data/app/models/trade/payment_order.rb +5 -0
- data/app/models/trade/payment_reference.rb +5 -0
- data/app/models/trade/payment_strategy.rb +5 -0
- data/app/models/trade/payment_type/alipay.rb +35 -0
- data/app/models/trade/payment_type/apple_pay.rb +20 -0
- data/app/models/trade/payment_type/paypal.rb +84 -0
- data/app/models/trade/payment_type/stripe.rb +57 -0
- data/app/models/trade/payment_type/svf_card.rb +24 -0
- data/app/models/trade/payment_type/wxpay.rb +104 -0
- data/app/models/trade/payout.rb +5 -0
- data/app/models/trade/promote.rb +6 -0
- data/app/models/trade/promote_cart.rb +5 -0
- data/app/models/trade/promote_charge.rb +5 -0
- data/app/models/trade/promote_extra.rb +5 -0
- data/app/models/trade/promote_good.rb +5 -0
- data/app/models/trade/refund.rb +5 -0
- data/app/models/trade/trade_item.rb +5 -0
- data/app/models/trade/trade_promote.rb +5 -0
- data/app/models/trade.rb +11 -0
- data/app/views/admin/_trade_nav.html.erb +35 -0
- data/app/views/my/_trade_nav.html.erb +4 -9
- data/app/views/panel/_trade_nav.html.erb +10 -0
- data/app/views/trade/admin/advances/_breadcrumb.html.erb +7 -0
- data/app/views/trade/admin/advances/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/advances/_form.html.erb +4 -0
- data/app/views/trade/admin/advances/_index_tbody.html.erb +3 -0
- data/app/views/trade/admin/advances/_index_thead.html.erb +4 -0
- data/app/views/trade/admin/advances/_new_form.html.erb +4 -0
- data/app/views/trade/admin/advances/index.html.erb +5 -0
- data/app/views/trade/admin/advances/show.html.erb +30 -0
- data/app/views/trade/admin/base/_nav.html.erb +4 -0
- data/app/views/trade/admin/card_advances/_breadcrumb.html.erb +7 -0
- data/app/views/trade/admin/card_advances/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/card_advances/_form.html.erb +3 -0
- data/app/views/trade/admin/card_advances/_index_tbody.html.erb +5 -0
- data/app/views/trade/admin/card_advances/_index_thead.html.erb +6 -0
- data/app/views/trade/admin/card_advances/_new_form.html.erb +4 -0
- data/app/views/trade/admin/card_advances/_show_table.html.erb +20 -0
- data/app/views/trade/admin/card_advances/index.html.erb +5 -0
- data/app/views/trade/admin/card_logs/_breadcrumb.html.erb +7 -0
- data/app/views/trade/admin/card_logs/_card_log.json.jbuilder +11 -0
- data/app/views/trade/admin/card_logs/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/card_logs/_filter_form.html.erb +8 -0
- data/app/views/trade/admin/card_logs/_form.html.erb +3 -0
- data/app/views/trade/admin/card_logs/_index_tbody.html.erb +8 -0
- data/app/views/trade/admin/card_logs/_index_thead.html.erb +9 -0
- data/app/views/trade/admin/card_logs/_index_tr.html.erb +10 -0
- data/app/views/trade/admin/card_logs/_new_form.html.erb +4 -0
- data/app/views/trade/admin/card_logs/_show.json.jbuilder +1 -0
- data/app/views/trade/admin/card_logs/_show_table.html.erb +24 -0
- data/app/views/trade/admin/card_logs/index.html.erb +5 -0
- data/app/views/trade/admin/card_logs/index.json.jbuilder +1 -0
- data/app/views/trade/admin/card_payments/_breadcrumb.html.erb +7 -0
- data/app/views/trade/admin/{orders/_search_form.html.erb → card_payments/_button.html.erb} +0 -0
- data/app/views/trade/admin/card_payments/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/card_payments/_filter_form.html.erb +9 -0
- data/app/views/trade/admin/card_payments/_form.html.erb +2 -0
- data/app/views/trade/admin/card_payments/_index_tbody.html.erb +3 -0
- data/app/views/trade/admin/card_payments/_index_thead.html.erb +4 -0
- data/app/views/trade/admin/card_payments/_new_form.html.erb +4 -0
- data/app/views/trade/admin/card_payments/_show_table.html.erb +12 -0
- data/app/views/trade/admin/card_payments/index.html.erb +5 -0
- data/app/views/trade/admin/card_prepayments/_breadcrumb.html.erb +6 -0
- data/app/views/trade/admin/card_prepayments/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/card_prepayments/_filter_form.html.erb +9 -0
- data/app/views/trade/admin/card_prepayments/_form.html.erb +3 -0
- data/app/views/trade/admin/card_prepayments/_index_tbody.html.erb +3 -0
- data/app/views/trade/admin/card_prepayments/_index_thead.html.erb +4 -0
- data/app/views/trade/admin/card_prepayments/_new_form.html.erb +4 -0
- data/app/views/trade/admin/card_prepayments/_show_table.html.erb +16 -0
- data/app/views/trade/admin/card_prepayments/index.html.erb +5 -0
- data/app/views/trade/admin/card_promotes/_breadcrumb.html.erb +6 -0
- data/app/views/trade/admin/card_promotes/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/card_promotes/_filter_form.html.erb +9 -0
- data/app/views/trade/admin/card_promotes/_form.html.erb +4 -0
- data/app/views/trade/admin/card_promotes/_index_tbody.html.erb +5 -0
- data/app/views/trade/admin/card_promotes/_index_thead.html.erb +6 -0
- data/app/views/trade/admin/card_promotes/_new_form.html.erb +4 -0
- data/app/views/trade/admin/card_promotes/_show_table.html.erb +12 -0
- data/app/views/trade/admin/card_promotes/index.html.erb +5 -0
- data/app/views/trade/admin/card_templates/_advance_options.html.erb +1 -0
- data/app/views/trade/admin/card_templates/_card_template.json.jbuilder +7 -0
- data/app/views/trade/admin/card_templates/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/card_templates/_filter_form.html.erb +9 -0
- data/app/views/trade/admin/card_templates/_form.html.erb +11 -0
- data/app/views/trade/admin/card_templates/_index_tbody.html.erb +14 -0
- data/app/views/trade/admin/card_templates/_index_thead.html.erb +10 -0
- data/app/views/trade/admin/card_templates/_index_tr.html.erb +25 -0
- data/app/views/trade/admin/card_templates/_item_form.html.erb +15 -0
- data/app/views/trade/admin/card_templates/_new_form.html.erb +4 -0
- data/app/views/trade/admin/card_templates/_show.json.jbuilder +1 -0
- data/app/views/trade/admin/card_templates/_show_table.html.erb +12 -0
- data/app/views/trade/admin/card_templates/advance_options.js.erb +3 -0
- data/app/views/trade/admin/card_templates/index.html.erb +5 -0
- data/app/views/trade/admin/card_templates/index.json.jbuilder +1 -0
- data/app/views/trade/admin/cards/_breadcrumb.html.erb +6 -0
- data/app/views/trade/admin/cards/_button.html.erb +3 -0
- data/app/views/trade/admin/cards/_card.json.jbuilder +10 -0
- data/app/views/trade/admin/cards/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/cards/_filter_form.html.erb +10 -0
- data/app/views/trade/admin/cards/_filter_table.html.erb +11 -0
- data/app/views/trade/admin/cards/_form.html.erb +4 -0
- data/app/views/trade/admin/cards/_index_tbody.html.erb +25 -0
- data/app/views/trade/admin/cards/_index_thead.html.erb +14 -0
- data/app/views/trade/admin/cards/_index_tr.html.erb +19 -0
- data/app/views/trade/admin/cards/_new_form.html.erb +5 -0
- data/app/views/trade/admin/cards/_show.json.jbuilder +1 -0
- data/app/views/trade/admin/cards/_show_table.html.erb +20 -0
- data/app/views/trade/admin/cards/index.html.erb +5 -0
- data/app/views/trade/admin/cards/index.json.jbuilder +1 -0
- data/app/views/trade/admin/{promote_buyers/show.html.erb → carts/_button.html.erb} +0 -0
- data/app/views/trade/admin/{cart_item_serves → carts}/_check.html.erb +0 -0
- data/app/views/trade/admin/{cart_item_serves → carts}/_index.html.erb +1 -3
- data/app/views/trade/admin/carts/_index_tbody.html.erb +6 -0
- data/app/views/trade/admin/carts/_index_thead.html.erb +7 -0
- data/app/views/trade/admin/{cart_item_serves → carts}/_new.html.erb +1 -1
- data/app/views/trade/admin/{cart_item_serves → carts}/_serve.html.erb +2 -2
- data/app/views/trade/admin/{cart_item_serves → carts}/_single.html.erb +0 -0
- data/app/views/trade/admin/{cart_item_serves → carts}/_single_table.html.erb +0 -0
- data/app/views/trade/admin/{cart_item_serves → carts}/_total.html.erb +0 -0
- data/app/views/trade/admin/{cart_item_serves → carts}/_total_table.html.erb +0 -0
- data/app/views/trade/admin/carts/index.html.erb +5 -0
- data/app/views/trade/admin/cash_givens/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/cash_givens/_filter_form.html.erb +5 -0
- data/app/views/trade/admin/cash_givens/_form.html.erb +4 -0
- data/app/views/trade/admin/cash_givens/_index_tbody.html.erb +17 -0
- data/app/views/trade/admin/cash_givens/_index_thead.html.erb +4 -0
- data/app/views/trade/admin/cash_givens/_new_form.html.erb +4 -0
- data/app/views/trade/admin/cash_givens/_show_table.html.erb +12 -0
- data/app/views/trade/admin/cash_givens/index.html.erb +5 -0
- data/app/views/trade/admin/cash_logs/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/cash_logs/_filter_form.html.erb +8 -0
- data/app/views/trade/admin/cash_logs/_form.html.erb +2 -0
- data/app/views/trade/admin/cash_logs/_index_tbody.html.erb +25 -0
- data/app/views/trade/admin/cash_logs/_index_thead.html.erb +11 -0
- data/app/views/trade/admin/cash_logs/_new_form.html.erb +4 -0
- data/app/views/trade/admin/cash_logs/_show_table.html.erb +20 -0
- data/app/views/trade/admin/cash_logs/index.html.erb +5 -0
- data/app/views/trade/admin/cashes/_button.html.erb +0 -0
- data/app/views/trade/admin/cashes/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/cashes/_filter_form.html.erb +5 -0
- data/app/views/trade/admin/cashes/_form.html.erb +3 -0
- data/app/views/trade/admin/cashes/_index_tbody.html.erb +18 -0
- data/app/views/trade/admin/cashes/_index_thead.html.erb +12 -0
- data/app/views/trade/admin/cashes/_new_form.html.erb +4 -0
- data/app/views/trade/admin/cashes/_show_tbody.html.erb +20 -0
- data/app/views/trade/admin/cashes/index.html.erb +5 -0
- data/app/views/trade/admin/goods/_form.html.erb +1 -1
- data/app/views/trade/admin/goods/_item.html.erb +1 -1
- data/app/views/trade/admin/goods/_new.html.erb +1 -1
- data/app/views/trade/admin/order_payments/_index_tbody.html.erb +6 -0
- data/app/views/trade/admin/order_payments/_index_thead.html.erb +6 -0
- data/app/views/trade/admin/order_payments/_index_tr.html.erb +4 -0
- data/app/views/trade/admin/order_payments/_new_form.html.erb +30 -0
- data/app/views/trade/admin/order_payments/_payment_orders.html.erb +2 -2
- data/app/views/trade/admin/order_payments/index.html.erb +12 -0
- data/app/views/trade/admin/orders/_addresses.html.erb +3 -3
- data/app/views/trade/admin/orders/_breadcrumb.html.erb +5 -0
- data/app/views/trade/admin/orders/_button.html.erb +0 -0
- data/app/views/trade/admin/orders/_edit_form.html.erb +3 -0
- data/app/views/trade/admin/orders/_filter_form.html.erb +9 -0
- data/app/views/trade/admin/orders/_filter_table.html.erb +20 -0
- data/app/views/trade/admin/orders/_index_tbody.html.erb +16 -0
- data/app/views/trade/admin/orders/_index_thead.html.erb +8 -0
- data/app/views/trade/admin/orders/_index_tr.html.erb +10 -0
- data/app/views/trade/admin/orders/_invoice_addresses.html.erb +3 -3
- data/app/views/trade/admin/orders/_show/_breadcrumb.html.erb +6 -0
- data/app/views/trade/admin/orders/index.html.erb +2 -49
- data/app/views/trade/admin/orders/new.html.erb +1 -1
- data/app/{assets/javascripts/controllers → views}/trade/admin/orders/new.js +0 -0
- data/app/views/trade/admin/orders/payments.html.erb +6 -6
- data/app/views/trade/admin/orders/refund.turbo_stream.erb +3 -0
- data/app/views/trade/admin/orders/show.html.erb +12 -20
- data/app/views/trade/admin/payment_methods/_breadcrumb.html.erb +10 -0
- data/app/views/trade/admin/payment_methods/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/payment_methods/_filter_form.html.erb +12 -0
- data/app/views/trade/admin/payment_methods/_filter_table.html.erb +9 -0
- data/app/views/trade/admin/payment_methods/_form.html.erb +1 -2
- data/app/views/trade/admin/payment_methods/_index_tbody.html.erb +17 -0
- data/app/views/trade/admin/payment_methods/_index_thead.html.erb +7 -0
- data/app/views/trade/admin/payment_methods/_index_tr.html.erb +10 -0
- data/app/views/trade/admin/payment_methods/_new_form.html.erb +4 -0
- data/app/views/trade/admin/payment_methods/_unverified/_index_tbody.html.erb +37 -0
- data/app/views/trade/admin/payment_methods/index.html.erb +4 -25
- data/app/views/trade/admin/payment_methods/mine.html.erb +3 -3
- data/app/views/trade/admin/payment_methods/unverified.html.erb +4 -57
- data/app/views/trade/admin/payment_orders/_index.html.erb +5 -7
- data/app/views/trade/admin/payment_orders/_new.html.erb +5 -8
- data/app/views/trade/admin/payment_orders/_orders.html.erb +1 -3
- data/app/views/trade/admin/payment_orders/cancel.js.erb +2 -2
- data/app/views/trade/admin/payment_orders/create.js.erb +2 -2
- data/app/views/trade/admin/payment_orders/new.turbo_stream.erb +2 -0
- data/app/views/trade/admin/payment_orders/update.js.erb +2 -2
- data/app/views/trade/admin/payment_orders/update_fail.js.erb +2 -2
- data/app/views/trade/admin/payment_strategies/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/payment_strategies/_form.html.erb +2 -5
- data/app/views/trade/admin/payment_strategies/_index_tbody.html.erb +12 -0
- data/app/views/trade/admin/payment_strategies/_index_thead.html.erb +3 -0
- data/app/views/trade/admin/payment_strategies/_new_form.html.erb +4 -0
- data/app/views/trade/admin/payment_strategies/index.html.erb +4 -36
- data/app/views/trade/admin/payments/_breadcrumb.html.erb +5 -0
- data/app/views/trade/admin/payments/_button.html.erb +2 -0
- data/app/views/trade/admin/payments/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/payments/_filter_form.html.erb +13 -0
- data/app/views/trade/admin/payments/_filter_table.html.erb +29 -0
- data/app/views/trade/admin/payments/_form.html.erb +2 -3
- data/app/views/trade/admin/payments/_index_tbody.html.erb +24 -0
- data/app/views/trade/admin/payments/_index_thead.html.erb +15 -0
- data/app/views/trade/admin/payments/_index_tr.html.erb +17 -0
- data/app/views/trade/admin/payments/_new_form.html.erb +4 -0
- data/app/views/trade/admin/payments/dashboard.html.erb +0 -3
- data/app/views/trade/admin/payments/index.html.erb +2 -37
- data/app/views/trade/admin/payouts/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/payouts/_filter_form.html.erb +10 -0
- data/app/views/trade/admin/payouts/_form.html.erb +4 -0
- data/app/views/trade/admin/payouts/_index_tbody.html.erb +12 -0
- data/app/views/trade/admin/payouts/_index_thead.html.erb +11 -0
- data/app/views/trade/admin/payouts/_index_tr.html.erb +9 -0
- data/app/views/trade/admin/payouts/_new_form.html.erb +4 -0
- data/app/views/trade/admin/payouts/_show_table.html.erb +32 -0
- data/app/views/trade/admin/payouts/index.html.erb +5 -0
- data/app/views/trade/admin/promote_carts/_breadcrumb.html.erb +10 -0
- data/app/views/trade/admin/promote_carts/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/promote_carts/_filter_form.html.erb +9 -0
- data/app/views/trade/admin/promote_carts/_form.html.erb +9 -0
- data/app/views/trade/admin/promote_carts/_index_tbody.html.erb +3 -0
- data/app/views/trade/admin/promote_carts/_index_thead.html.erb +4 -0
- data/app/views/trade/admin/promote_carts/_index_tr.html.erb +10 -0
- data/app/views/trade/admin/promote_carts/_new_form.html.erb +4 -0
- data/app/views/trade/admin/{promote_buyers → promote_carts}/_promote_buyer.json.jbuilder +0 -0
- data/app/{assets/javascripts/controllers/trade/admin/promote_buyers → views/trade/admin/promote_carts}/edit.js +0 -0
- data/app/views/trade/admin/promote_carts/index.html.erb +5 -0
- data/app/views/trade/admin/{promote_buyers → promote_carts}/index.json.jbuilder +0 -0
- data/app/{assets/javascripts/controllers/trade/admin/promote_buyers → views/trade/admin/promote_carts}/new.js +0 -0
- data/app/views/trade/admin/promote_carts/show.json.jbuilder +1 -0
- data/app/views/trade/admin/promote_charges/_base_price_form.html.erb +1 -1
- data/app/views/trade/admin/promote_charges/_breadcrumb.html.erb +7 -0
- data/app/views/trade/admin/promote_charges/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/promote_charges/_filter_form.html.erb +13 -0
- data/app/views/trade/admin/promote_charges/_form.html.erb +5 -7
- data/app/views/trade/admin/promote_charges/_index_tbody.html.erb +17 -0
- data/app/views/trade/admin/promote_charges/_index_thead.html.erb +12 -0
- data/app/views/trade/admin/promote_charges/_index_tr.html.erb +13 -0
- data/app/views/trade/admin/promote_charges/_new_form.html.erb +4 -0
- data/app/views/trade/admin/promote_charges/index.html.erb +2 -62
- data/app/views/trade/admin/promote_goods/_breadcrumb.html.erb +9 -0
- data/app/views/trade/admin/promote_goods/_button.html.erb +3 -0
- data/app/views/trade/admin/promote_goods/_filter_form.html.erb +10 -0
- data/app/views/trade/admin/promote_goods/_form.html.erb +7 -8
- data/app/views/trade/admin/promote_goods/_index_tbody.html.erb +10 -0
- data/app/views/trade/admin/promote_goods/_index_thead.html.erb +5 -0
- data/app/views/trade/admin/promote_goods/_index_tr.html.erb +16 -0
- data/app/views/trade/admin/promote_goods/_new_form.html.erb +4 -0
- data/app/views/trade/admin/promote_goods/goods.js.erb +1 -1
- data/app/views/trade/admin/promote_goods/index.html.erb +2 -58
- data/app/views/trade/admin/promotes/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/promotes/_filter_table.html.erb +11 -0
- data/app/views/trade/admin/promotes/_form.html.erb +3 -8
- data/app/views/trade/admin/promotes/_index_tbody.html.erb +18 -0
- data/app/views/trade/admin/promotes/_index_thead.html.erb +12 -0
- data/app/views/trade/admin/promotes/_index_tr.html.erb +22 -0
- data/app/views/trade/admin/promotes/_new_form.html.erb +4 -0
- data/app/views/trade/admin/promotes/_new_promote_charge.html.erb +1 -1
- data/app/views/trade/admin/promotes/_show_table.html.erb +4 -0
- data/app/views/trade/admin/promotes/index.html.erb +4 -78
- data/app/views/trade/admin/refunds/_breadcrumb.html.erb +6 -0
- data/app/views/trade/admin/refunds/_filter_form.html.erb +13 -0
- data/app/views/trade/admin/refunds/_index_tbody.html.erb +25 -0
- data/app/views/trade/admin/refunds/_index_thead.html.erb +12 -0
- data/app/views/trade/admin/refunds/_index_tr.html.erb +3 -0
- data/app/views/trade/admin/refunds/_logs_form.html.erb +33 -0
- data/app/views/trade/admin/refunds/_new.html.erb +8 -18
- data/app/views/trade/admin/refunds/confirm.turbo_stream.erb +3 -0
- data/app/views/trade/admin/refunds/deny.turbo_stream.erb +3 -0
- data/app/views/trade/admin/refunds/index.html.erb +4 -52
- data/app/views/trade/admin/refunds/logs.turbo_stream.erb +1 -0
- data/app/views/trade/admin/trade_items/_filter.html.erb +5 -5
- data/app/views/trade/admin/trade_items/_good_price.html.erb +5 -5
- data/app/views/trade/admin/trade_items/_order_price.html.erb +8 -8
- data/app/views/trade/admin/trade_items/_retail_price.html.erb +3 -3
- data/app/views/trade/admin/trade_items/_show/_breadcrumb.html.erb +7 -0
- data/app/views/trade/admin/trade_items/_single_price.html.erb +10 -10
- data/app/{assets/javascripts/controllers/trade/admin/cart_items → views/trade/admin/trade_items}/create.js +0 -0
- data/app/views/trade/admin/trade_items/index.html.erb +31 -42
- data/app/{assets/javascripts/controllers/trade/admin/cart_items → views/trade/admin/trade_items}/index.js +0 -0
- data/app/views/trade/admin/trade_items/only.html.erb +2 -2
- data/app/{assets/javascripts/controllers/trade/admin/cart_items → views/trade/admin/trade_items}/only.js +0 -0
- data/app/views/trade/admin/trade_items/show.html.erb +0 -0
- data/app/views/trade/admin/trade_promotes/_edit_form.html.erb +4 -0
- data/app/views/trade/admin/trade_promotes/{_filter.html.erb → _filter_form.html.erb} +2 -2
- data/app/views/trade/admin/trade_promotes/_form.html.erb +3 -6
- data/app/views/trade/admin/trade_promotes/_index_tbody.html.erb +2 -0
- data/app/views/trade/admin/trade_promotes/_index_thead.html.erb +3 -0
- data/app/views/trade/admin/trade_promotes/_new_form.html.erb +4 -0
- data/app/views/trade/admin/trade_promotes/_show_table.html.erb +8 -20
- data/app/views/trade/admin/trade_promotes/index.html.erb +3 -36
- data/app/views/trade/admin/{buyers → users}/index.html.erb +4 -4
- data/app/views/trade/admin/{buyers → users}/orders.html.erb +6 -6
- data/app/views/trade/admin/{buyers → users}/overdue.html.erb +2 -2
- data/app/views/trade/advances/index.html.erb +15 -0
- data/app/views/trade/card_templates/_card_template.json.jbuilder +9 -0
- data/app/views/trade/card_templates/_filter_form.html.erb +8 -0
- data/app/views/trade/card_templates/_show_table.html.erb +16 -0
- data/app/views/trade/card_templates/index.html.erb +16 -0
- data/app/views/trade/card_templates/index.json.jbuilder +1 -0
- data/app/views/trade/card_templates/show.json.jbuilder +1 -0
- data/app/views/trade/goods/_search.html.erb +3 -3
- data/app/views/trade/goods/taxon/_breadcrumb.html.erb +2 -2
- data/app/views/trade/my/advances/index.json.jbuilder +11 -0
- data/app/views/trade/my/advances/order.json.jbuilder +14 -0
- data/app/views/trade/my/card_logs/_wallet_log.json.jbuilder +1 -0
- data/app/views/trade/my/card_logs/index.html.erb +15 -0
- data/app/views/trade/my/card_logs/index.json.jbuilder +5 -0
- data/app/views/trade/my/cards/index.html.erb +45 -0
- data/app/views/trade/my/cards/new.html.erb +0 -0
- data/app/views/trade/my/cards/token.html.erb +11 -0
- data/app/views/trade/my/{trade_items → carts}/_additions.html.erb +0 -2
- data/app/views/trade/my/carts/_addresses/_index_table.html.erb +14 -0
- data/app/views/trade/my/carts/_addresses/_index_tbody.html.erb +5 -0
- data/app/views/trade/my/carts/_addresses/_index_tr.html.erb +13 -0
- data/app/views/trade/my/carts/_filter_form.html.erb +9 -0
- data/app/views/trade/my/carts/_form.html.erb +1 -1
- data/app/views/trade/my/carts/_show/_address.html.erb +18 -0
- data/app/views/trade/my/carts/_show/_tab_bar.html.erb +22 -0
- data/app/views/trade/my/carts/_show_table.html.erb +16 -28
- data/app/views/trade/my/carts/_show_thead.html.erb +6 -0
- data/app/views/trade/my/carts/_total_price.html.erb +44 -0
- data/app/views/trade/my/carts/_trade_item.html.erb +52 -0
- data/app/views/trade/my/carts/add.html.erb +23 -0
- data/app/views/trade/my/carts/add.turbo_stream.erb +3 -0
- data/app/views/trade/my/carts/addresses.html.erb +5 -0
- data/app/views/trade/my/carts/destroy.turbo_stream.erb +3 -0
- data/app/views/trade/my/carts/show.html+phone.erb +45 -25
- data/app/views/trade/my/carts/show.html.erb +25 -0
- data/app/views/trade/my/carts/update.turbo_stream.erb +9 -0
- data/app/views/trade/my/cash_logs/_cash_log.json.jbuilder +1 -0
- data/app/views/trade/my/cash_logs/index.json.jbuilder +4 -0
- data/app/views/trade/my/orders/_date_form.html.erb +2 -2
- data/app/views/trade/my/orders/_edit_form.html.erb +4 -0
- data/app/views/trade/my/orders/_edit_payment_type.html.erb +3 -12
- data/app/views/trade/my/orders/_form.html.erb +1 -4
- data/app/views/trade/my/orders/_payment_types/_show_table.html.erb +35 -0
- data/app/views/trade/my/orders/_show/_breadcrumb.html.erb +6 -0
- data/app/views/trade/my/orders/_success.html.erb +9 -0
- data/app/views/trade/my/orders/alipay_pay.json.jbuilder +1 -0
- data/app/views/trade/my/orders/create.turbo_stream.erb +3 -0
- data/app/views/trade/my/orders/edit_payment_type.html.erb +3 -0
- data/app/views/trade/my/orders/index.html+phone.erb +14 -11
- data/app/views/trade/my/orders/index.html.erb +15 -15
- data/app/views/trade/my/orders/new.html.erb +25 -36
- data/app/views/trade/my/orders/payment_types.html+phone.erb +51 -0
- data/app/views/trade/my/orders/payment_types.html.erb +5 -0
- data/app/views/trade/my/orders/refresh.turbo_stream.erb +3 -0
- data/app/views/trade/my/orders/show.html+phone.erb +2 -2
- data/app/views/trade/my/orders/show.html.erb +54 -97
- data/app/views/trade/my/orders/success.html.erb +2 -9
- data/app/views/trade/my/orders/wxpay_pay.html.erb +13 -0
- data/app/views/trade/my/orders/wxpay_pay_err.html.erb +5 -0
- data/app/views/trade/my/orders/wxpay_pc_pay.html.erb +24 -0
- data/app/views/trade/my/payment_methods/_button.html.erb +3 -0
- data/app/views/trade/my/payment_methods/_edit_form.html.erb +4 -0
- data/app/views/trade/my/payment_methods/{_item.html.erb → _index_tbody.html.erb} +3 -4
- data/app/views/trade/my/payment_methods/_index_thead.html.erb +4 -0
- data/app/views/trade/my/payment_methods/_new_form.html.erb +4 -0
- data/app/views/trade/my/payment_methods/index.html.erb +5 -1
- data/app/views/trade/my/payments/_edit_form.html.erb +4 -0
- data/app/views/trade/my/payments/_filter_form.html.erb +9 -0
- data/app/views/trade/my/payments/_form.html.erb +2 -0
- data/app/views/trade/my/payments/_index_tbody.html.erb +1 -0
- data/app/views/trade/my/payments/_index_thead.html.erb +2 -0
- data/app/views/trade/my/payments/_new_form.html.erb +4 -0
- data/app/views/trade/my/payments/_show_table.html.erb +4 -0
- data/app/views/trade/my/payments/create.turbo_stream.erb +3 -0
- data/app/views/trade/my/payments/destroy.turbo_stream.erb +3 -0
- data/app/views/trade/my/payments/index.html.erb +5 -0
- data/app/views/trade/my/payouts/_payout.json.jbuilder +11 -0
- data/app/views/trade/my/payouts/index.json.jbuilder +3 -0
- data/app/views/trade/my/payouts/list.json.jbuilder +2 -0
- data/app/views/trade/my/payouts/show.json.jbuilder +1 -0
- data/app/views/trade/my/shared/_cash.json.jbuilder +6 -0
- data/app/views/trade/my/trade_items/_show/_breadcrumb.html.erb +7 -0
- data/app/views/trade/my/trade_items/promote.html.erb +12 -0
- data/app/views/trade/my/trade_items/show.html.erb +0 -0
- data/app/views/trade/my/trade_items/toggle.turbo_stream.erb +3 -0
- data/app/views/trade/panel/exchange_rates/_edit_form.html.erb +4 -0
- data/app/views/trade/panel/exchange_rates/_filter_form.html.erb +9 -0
- data/app/views/trade/panel/exchange_rates/_form.html.erb +4 -0
- data/app/views/trade/panel/exchange_rates/_index_tbody.html.erb +3 -0
- data/app/views/trade/panel/exchange_rates/_index_thead.html.erb +4 -0
- data/app/views/trade/panel/exchange_rates/_new_form.html.erb +4 -0
- data/app/views/trade/panel/exchange_rates/_show_table.html.erb +12 -0
- data/app/views/trade/panel/exchange_rates/index.html.erb +5 -0
- data/config/locales/en.attributes.yml +35 -0
- data/config/locales/en.controller.yml +73 -0
- data/config/locales/en.yml +28 -44
- data/config/locales/zh.attributes.yml +78 -16
- data/config/locales/zh.controller.yml +53 -1
- data/config/locales/zh.enum.yml +44 -18
- data/config/locales/zh.help.yml +7 -7
- data/config/locales/zh.yml +24 -0
- data/config/routes.rb +164 -89
- data/lib/rails_trade/config.rb +0 -2
- data/lib/rails_trade/engine.rb +2 -1
- data/lib/rails_trade.rb +2 -10
- metadata +465 -322
- data/app/assets/javascripts/controllers/trade/admin/payment_methods/edit.js +0 -1
- data/app/assets/javascripts/controllers/trade/admin/payment_methods/new.js +0 -1
- data/app/assets/javascripts/controllers/trade/admin/payments/edit.js +0 -1
- data/app/assets/javascripts/controllers/trade/admin/payments/new.js +0 -1
- data/app/assets/javascripts/controllers/trade/admin/promote_charges/edit.js +0 -1
- data/app/assets/javascripts/controllers/trade/admin/promote_charges/new.js +0 -7
- data/app/assets/javascripts/controllers/trade/admin/promote_goods/edit.js +0 -1
- data/app/assets/javascripts/controllers/trade/admin/promote_goods/new.js +0 -17
- data/app/assets/javascripts/controllers/trade/admin/promotes/edit.js +0 -2
- data/app/assets/javascripts/controllers/trade/admin/promotes/new.js +0 -5
- data/app/assets/javascripts/controllers/trade/admin/refunds/index.js +0 -1
- data/app/assets/javascripts/controllers/trade/admin/refunds/new.js +0 -1
- data/app/assets/javascripts/controllers/trade/my/carts/show-phone-ready.js +0 -1
- data/app/assets/javascripts/controllers/trade/my/carts/show-ready.js +0 -28
- data/app/assets/javascripts/controllers/trade/my/orders/wait-phone.js +0 -8
- data/app/assets/javascripts/controllers/trade/my/trade_items/create.js +0 -2
- data/app/assets/stylesheets/controllers/trade/admin/promote_charges/index.css +0 -4
- data/app/assets/stylesheets/controllers/trade/admin/promotes/index.css +0 -4
- data/app/assets/stylesheets/controllers/trade/my/carts/show-phone.css +0 -1
- data/app/assets/stylesheets/controllers/trade/payments/wxpay_result.css +0 -57
- data/app/channels/paid_channel.rb +0 -7
- data/app/controllers/concerns/controller_order_types.rb +0 -89
- data/app/controllers/rails_trade/my_cart.rb +0 -16
- data/app/controllers/trade/admin/buyers_controller.rb +0 -37
- data/app/controllers/trade/admin/cart_serves_controller.rb +0 -66
- data/app/controllers/trade/admin/goods_controller.rb +0 -96
- data/app/controllers/trade/admin/produces_controller.rb +0 -66
- data/app/controllers/trade/admin/promote_buyers_controller.rb +0 -57
- data/app/controllers/trade/buyers_controller.rb +0 -8
- data/app/controllers/trade/my/order_items_controller.rb +0 -49
- data/app/models/cart.rb +0 -4
- data/app/models/order.rb +0 -4
- data/app/models/payment/alipay_payment.rb +0 -3
- data/app/models/payment/apple_payment.rb +0 -3
- data/app/models/payment/bank_payment.rb +0 -3
- data/app/models/payment/hand_payment.rb +0 -3
- data/app/models/payment/paypal_payment.rb +0 -3
- data/app/models/payment/stripe_payment.rb +0 -3
- data/app/models/payment/wxpay_payment.rb +0 -3
- data/app/models/payment.rb +0 -4
- data/app/models/payment_method/alipay_method.rb +0 -7
- data/app/models/payment_method/bank_method.rb +0 -7
- data/app/models/payment_method/stripe_method.rb +0 -3
- data/app/models/payment_method.rb +0 -3
- data/app/models/payment_order.rb +0 -3
- data/app/models/payment_reference.rb +0 -3
- data/app/models/payment_strategy.rb +0 -3
- data/app/models/payment_type.rb +0 -3
- data/app/models/promote.rb +0 -3
- data/app/models/promote_buyer.rb +0 -3
- data/app/models/promote_charge/cash_promote_charge.rb +0 -3
- data/app/models/promote_charge/discount_promote_charge.rb +0 -3
- data/app/models/promote_charge/final_promote_charge.rb +0 -3
- data/app/models/promote_charge/minus_promote_charge.rb +0 -3
- data/app/models/promote_charge/plus_promote_charge.rb +0 -3
- data/app/models/promote_charge.rb +0 -3
- data/app/models/promote_extra.rb +0 -3
- data/app/models/promote_good.rb +0 -3
- data/app/models/rails_trade/amount.rb +0 -44
- data/app/models/rails_trade/buyer.rb +0 -35
- data/app/models/rails_trade/cart.rb +0 -64
- data/app/models/rails_trade/good.rb +0 -71
- data/app/models/rails_trade/order.rb +0 -98
- data/app/models/rails_trade/ordering/payment.rb +0 -113
- data/app/models/rails_trade/ordering/refund.rb +0 -34
- data/app/models/rails_trade/payment/alipay_payment.rb +0 -15
- data/app/models/rails_trade/payment/apple_payment.rb +0 -7
- data/app/models/rails_trade/payment/bank_payment.rb +0 -13
- data/app/models/rails_trade/payment/hand_payment.rb +0 -8
- data/app/models/rails_trade/payment/paypal_payment.rb +0 -8
- data/app/models/rails_trade/payment/stripe_payment.rb +0 -9
- data/app/models/rails_trade/payment/wxpay_payment.rb +0 -13
- data/app/models/rails_trade/payment.rb +0 -134
- data/app/models/rails_trade/payment_method/stripe_method.rb +0 -60
- data/app/models/rails_trade/payment_method.rb +0 -67
- data/app/models/rails_trade/payment_order.rb +0 -108
- data/app/models/rails_trade/payment_reference.rb +0 -18
- data/app/models/rails_trade/payment_strategy.rb +0 -19
- data/app/models/rails_trade/payment_type/alipay.rb +0 -28
- data/app/models/rails_trade/payment_type/apple_pay.rb +0 -18
- data/app/models/rails_trade/payment_type/paypal.rb +0 -82
- data/app/models/rails_trade/payment_type/stripe.rb +0 -55
- data/app/models/rails_trade/payment_type/wxpay.rb +0 -55
- data/app/models/rails_trade/promote.rb +0 -78
- data/app/models/rails_trade/promote_buyer.rb +0 -27
- data/app/models/rails_trade/promote_charge/cash_promote_charge.rb +0 -12
- data/app/models/rails_trade/promote_charge/discount_promote_charge.rb +0 -17
- data/app/models/rails_trade/promote_charge/final_promote_charge.rb +0 -12
- data/app/models/rails_trade/promote_charge/minus_promote_charge.rb +0 -11
- data/app/models/rails_trade/promote_charge/plus_promote_charge.rb +0 -7
- data/app/models/rails_trade/promote_charge.rb +0 -84
- data/app/models/rails_trade/promote_extra.rb +0 -13
- data/app/models/rails_trade/promote_good.rb +0 -22
- data/app/models/rails_trade/refund/alipay_refund.rb +0 -33
- data/app/models/rails_trade/refund/bank_refund.rb +0 -5
- data/app/models/rails_trade/refund/hand_refund.rb +0 -5
- data/app/models/rails_trade/refund/paypal_refund.rb +0 -32
- data/app/models/rails_trade/refund/stripe_refund.rb +0 -26
- data/app/models/rails_trade/refund/wxpay_refund.rb +0 -48
- data/app/models/rails_trade/refund.rb +0 -74
- data/app/models/rails_trade/sell.rb +0 -24
- data/app/models/rails_trade/trade_item.rb +0 -153
- data/app/models/rails_trade/trade_promote.rb +0 -92
- data/app/models/rails_trade/user.rb +0 -9
- data/app/models/refund/alipay_refund.rb +0 -3
- data/app/models/refund/bank_refund.rb +0 -3
- data/app/models/refund/hand_refund.rb +0 -3
- data/app/models/refund/paypal_refund.rb +0 -3
- data/app/models/refund/stripe_refund.rb +0 -3
- data/app/models/refund/wxpay_refund.rb +0 -3
- data/app/models/refund.rb +0 -3
- data/app/models/trade_item.rb +0 -3
- data/app/models/trade_promote.rb +0 -3
- data/app/views/application/_trade_nav.html.erb +0 -16
- data/app/views/trade/admin/buyers/_form.html.erb +0 -17
- data/app/views/trade/admin/buyers/_menu.html.erb +0 -5
- data/app/views/trade/admin/buyers/_search_form.html.erb +0 -11
- data/app/views/trade/admin/buyers/edit.html.erb +0 -6
- data/app/views/trade/admin/buyers/new.html.erb +0 -5
- data/app/views/trade/admin/buyers/show.html.erb +0 -4
- data/app/views/trade/admin/cart_item_serves/add.js.erb +0 -47
- data/app/views/trade/admin/cart_item_serves/create.js.erb +0 -3
- data/app/views/trade/admin/cart_item_serves/destroy.js.erb +0 -50
- data/app/views/trade/admin/cart_item_serves/index.js.erb +0 -50
- data/app/views/trade/admin/cart_item_serves/new.js.erb +0 -5
- data/app/views/trade/admin/cart_item_serves/single.js.erb +0 -55
- data/app/views/trade/admin/cart_item_serves/total.js.erb +0 -55
- data/app/views/trade/admin/order_payments/_index.html.erb +0 -44
- data/app/views/trade/admin/order_payments/_new.html.erb +0 -44
- data/app/views/trade/admin/order_payments/create.js.erb +0 -2
- data/app/views/trade/admin/order_payments/destroy.js.erb +0 -2
- data/app/views/trade/admin/order_payments/index.js.erb +0 -8
- data/app/views/trade/admin/order_payments/new.js.erb +0 -8
- data/app/views/trade/admin/orders/_filter.html.erb +0 -26
- data/app/views/trade/admin/orders/_form.html.erb +0 -4
- data/app/views/trade/admin/orders/refresh.js.erb +0 -7
- data/app/views/trade/admin/payment_methods/_edit.html.erb +0 -6
- data/app/views/trade/admin/payment_methods/_filter.html.erb +0 -18
- data/app/views/trade/admin/payment_methods/_index_layout.html.erb +0 -12
- data/app/views/trade/admin/payment_methods/_new.html.erb +0 -13
- data/app/views/trade/admin/payment_methods/_payment_method.html.erb +0 -24
- data/app/views/trade/admin/payment_methods/create.js.erb +0 -2
- data/app/views/trade/admin/payment_methods/destroy.js.erb +0 -1
- data/app/views/trade/admin/payment_methods/edit.html.erb +0 -15
- data/app/views/trade/admin/payment_methods/edit.js.erb +0 -8
- data/app/views/trade/admin/payment_methods/new.html.erb +0 -15
- data/app/views/trade/admin/payment_methods/new.js.erb +0 -7
- data/app/views/trade/admin/payment_methods/update.js.erb +0 -2
- data/app/views/trade/admin/payment_orders/new.js.erb +0 -6
- data/app/views/trade/admin/payment_strategies/edit.html.erb +0 -13
- data/app/views/trade/admin/payment_strategies/new.html.erb +0 -13
- data/app/views/trade/admin/payments/_edit.html.erb +0 -12
- data/app/views/trade/admin/payments/_filter.html.erb +0 -40
- data/app/views/trade/admin/payments/_item.html.erb +0 -41
- data/app/views/trade/admin/payments/_new.html.erb +0 -12
- data/app/views/trade/admin/payments/edit.html.erb +0 -13
- data/app/views/trade/admin/payments/edit.js.erb +0 -3
- data/app/views/trade/admin/payments/new.html.erb +0 -13
- data/app/views/trade/admin/payments/new.js.erb +0 -3
- data/app/views/trade/admin/payments/show.html.erb +0 -4
- data/app/views/trade/admin/promote_buyers/_filter.html.erb +0 -7
- data/app/views/trade/admin/promote_buyers/_form.html.erb +0 -17
- data/app/views/trade/admin/promote_buyers/edit.html.erb +0 -14
- data/app/views/trade/admin/promote_buyers/edit.js.erb +0 -3
- data/app/views/trade/admin/promote_buyers/index.html.erb +0 -52
- data/app/views/trade/admin/promote_buyers/new.html.erb +0 -13
- data/app/views/trade/admin/promote_buyers/new.js.erb +0 -3
- data/app/views/trade/admin/promote_buyers/show.json.jbuilder +0 -1
- data/app/views/trade/admin/promote_charges/_edit.html.erb +0 -13
- data/app/views/trade/admin/promote_charges/_filter.html.erb +0 -11
- data/app/views/trade/admin/promote_charges/_new.html.erb +0 -13
- data/app/views/trade/admin/promote_goods/_filter.html.erb +0 -8
- data/app/views/trade/admin/promotes/_edit.html.erb +0 -12
- data/app/views/trade/admin/promotes/_filter.html.erb +0 -9
- data/app/views/trade/admin/promotes/_new.html.erb +0 -12
- data/app/views/trade/admin/promotes/create.js.erb +0 -2
- data/app/views/trade/admin/refunds/_filter.html.erb +0 -11
- data/app/views/trade/admin/refunds/_form.html.erb +0 -17
- data/app/views/trade/admin/refunds/_logs_table.html.erb +0 -33
- data/app/views/trade/admin/refunds/edit.html.erb +0 -6
- data/app/views/trade/admin/refunds/logs.js.erb +0 -8
- data/app/views/trade/admin/refunds/new.html.erb +0 -5
- data/app/views/trade/admin/refunds/new.js.erb +0 -8
- data/app/views/trade/admin/refunds/show.html.erb +0 -4
- data/app/views/trade/admin/trade_items/destroy.js.erb +0 -1
- data/app/views/trade/admin/trade_items/update.js.erb +0 -11
- data/app/views/trade/admin/trade_promotes/edit.html.erb +0 -9
- data/app/views/trade/admin/trade_promotes/edit.js.erb +0 -3
- data/app/views/trade/admin/trade_promotes/new.html.erb +0 -9
- data/app/views/trade/admin/trade_promotes/new.js.erb +0 -3
- data/app/views/trade/admin/trade_promotes/show.html.erb +0 -7
- data/app/views/trade/admin/trade_promotes/show.js.erb +0 -3
- data/app/views/trade/admin/trade_promotes/update.js.erb +0 -1
- data/app/views/trade/buyers/_show.html.erb +0 -7
- data/app/views/trade/buyers/show.js.erb +0 -1
- data/app/views/trade/my/carts/_filter.html.erb +0 -7
- data/app/views/trade/my/carts/edit.html.erb +0 -9
- data/app/views/trade/my/carts/edit.js.erb +0 -3
- data/app/views/trade/my/carts/index.html.erb +0 -47
- data/app/views/trade/my/carts/new.html.erb +0 -9
- data/app/views/trade/my/carts/new.js.erb +0 -3
- data/app/views/trade/my/order_items/_form.html.erb +0 -17
- data/app/views/trade/my/order_items/edit.html.erb +0 -6
- data/app/views/trade/my/order_items/index.html.erb +0 -25
- data/app/views/trade/my/order_items/new.html.erb +0 -5
- data/app/views/trade/my/order_items/show.html.erb +0 -8
- data/app/views/trade/my/orders/_edit.html.erb +0 -10
- data/app/views/trade/my/orders/destroy.js.erb +0 -1
- data/app/views/trade/my/orders/edit.js.erb +0 -4
- data/app/views/trade/my/orders/edit_payment_type.js.erb +0 -4
- data/app/views/trade/my/orders/refresh.js.erb +0 -7
- data/app/views/trade/my/orders/update.js.erb +0 -3
- data/app/views/trade/my/orders/wxpay_pay.js.erb +0 -16
- data/app/views/trade/my/orders/wxpay_pay_err.js.erb +0 -5
- data/app/views/trade/my/payment_methods/_edit.html.erb +0 -13
- data/app/views/trade/my/payment_methods/_index.html.erb +0 -25
- data/app/views/trade/my/payment_methods/_new.html.erb +0 -13
- data/app/views/trade/my/payment_methods/create.js.erb +0 -3
- data/app/views/trade/my/payment_methods/destroy.js.erb +0 -1
- data/app/views/trade/my/payment_methods/edit.js.erb +0 -8
- data/app/views/trade/my/payment_methods/index.js.erb +0 -1
- data/app/views/trade/my/payment_methods/new.js.erb +0 -8
- data/app/views/trade/my/payment_methods/show.html.erb +0 -4
- data/app/views/trade/my/payment_methods/update.js.erb +0 -2
- data/app/views/trade/my/trade_items/_cart_item.js.erb +0 -2
- data/app/views/trade/my/trade_items/_single_price.html.erb +0 -6
- data/app/views/trade/my/trade_items/_total_price.html.erb +0 -8
- data/app/views/trade/my/trade_items/_trade_items.html.erb +0 -68
- data/app/views/trade/my/trade_items/create.html.erb +0 -1
- data/app/views/trade/my/trade_items/destroy.js.erb +0 -1
- data/app/views/trade/my/trade_items/update.js.erb +0 -1
- data/app/views/trade/my/users/_form.html.erb +0 -17
- data/app/views/trade/my/users/edit.html.erb +0 -44
- data/app/views/trade/my/users/show.html.erb +0 -18
- data/lib/rails_trade/apple_pay.rb +0 -32
- data/lib/rails_trade/version.rb +0 -3
@@ -0,0 +1,6 @@
|
|
1
|
+
<th><%= check_box_tag :all %></th>
|
2
|
+
<th><%= Trade::TradeItem.human_attribute_name(:good_name) %></th>
|
3
|
+
<th><%= Trade::TradeItem.human_attribute_name(:single_price) %></th>
|
4
|
+
<th><%= Trade::TradeItem.human_attribute_name(:number) %></th>
|
5
|
+
<th><%= Trade::TradeItem.human_attribute_name(:amount) %></th>
|
6
|
+
<th></th>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<tbody>
|
2
|
+
<tr>
|
3
|
+
<td></td>
|
4
|
+
<td><%= Trade::Cart.human_attribute_name(:retail_price) %></td>
|
5
|
+
<td colspan="2"></td>
|
6
|
+
<td><%= current_cart.retail_price %></td>
|
7
|
+
<td></td>
|
8
|
+
</tr>
|
9
|
+
<tr class="has-text-danger">
|
10
|
+
<td></td>
|
11
|
+
<td><%= Trade::Cart.human_attribute_name(:discount_price) %></td>
|
12
|
+
<td colspan="2"></td>
|
13
|
+
<td><%= current_cart.discount_price %></td>
|
14
|
+
<td></td>
|
15
|
+
</tr>
|
16
|
+
<tr>
|
17
|
+
<td></td>
|
18
|
+
<td><%= Trade::Cart.human_attribute_name(:bulk_price) %></td>
|
19
|
+
<td colspan="2"></td>
|
20
|
+
<td><%= current_cart.bulk_price %></td>
|
21
|
+
<td></td>
|
22
|
+
</tr>
|
23
|
+
<tr class="has-text-danger">
|
24
|
+
<td></td>
|
25
|
+
<td><%= Trade::Cart.human_attribute_name(:overall_reduced_amount) %></td>
|
26
|
+
<td colspan="2"></td>
|
27
|
+
<td><%= current_cart.overall_reduced_amount %></td>
|
28
|
+
<td></td>
|
29
|
+
</tr>
|
30
|
+
<tr>
|
31
|
+
<td></td>
|
32
|
+
<td><%= Trade::Cart.human_attribute_name(:overall_additional_amount) %></td>
|
33
|
+
<td colspan="2"></td>
|
34
|
+
<td><%= current_cart.overall_additional_amount %></td>
|
35
|
+
<td></td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td></td>
|
39
|
+
<td><%= Trade::Cart.human_attribute_name(:amount) %></td>
|
40
|
+
<td colspan="2"></td>
|
41
|
+
<td><%= current_cart.amount %></td>
|
42
|
+
<td></td>
|
43
|
+
</tr>
|
44
|
+
</tbody>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<tr class="<%= 'active' if trade_item.checked? %>" id="trade_item_<%= trade_item.id %>">
|
2
|
+
<td>
|
3
|
+
<%= form_with theme: nil, model: trade_item, url: { controller: 'trade_items', action: 'toggle', id: trade_item.id }, data: { controller: 'input' } do |f| %>
|
4
|
+
<%= f.check_box :status, value: trade_item.checked? ? 'checked' : 'init', checked: trade_item.checked?, data: { action: 'click->input#form' }, id: nil %>
|
5
|
+
<% end %>
|
6
|
+
</td>
|
7
|
+
<td>
|
8
|
+
<%= trade_item.good&.name %>
|
9
|
+
<p style="color: grey;"><%= trade_item.good_type_i18n %></p>
|
10
|
+
</td>
|
11
|
+
<td>
|
12
|
+
<p><%= trade_item.retail_price %></p>
|
13
|
+
<p><%= trade_item.weight_str %></p>
|
14
|
+
</td>
|
15
|
+
<td>
|
16
|
+
<div class="field has-addons">
|
17
|
+
<div class="control">
|
18
|
+
<%= button_to({ controller: 'trade_items', action: 'update', id: trade_item.id }, method: :patch, params: { '[trade_item]number': trade_item.number - 1 }, class: 'button') do %>
|
19
|
+
<i class="fas fa-minus"></i>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
22
|
+
<div class="control">
|
23
|
+
<%= form_with theme: nil, model: trade_item, url: { controller: 'trade_items', action: 'update', id: trade_item.id }, data: { controller: 'input' } do |f| %>
|
24
|
+
<%= f.number_field :number, step: 1, data: { action: 'input#form' }, class: 'input', id: nil %>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
27
|
+
<div class="control">
|
28
|
+
<%= button_to({ controller: 'trade_items', action: 'update', id: trade_item.id }, method: :patch, params: { '[trade_item]number': trade_item.number + 1 }, class: 'button is-link') do %>
|
29
|
+
<i class="fas fa-plus"></i>
|
30
|
+
<% end %>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
</td>
|
34
|
+
<td>
|
35
|
+
<% if trade_item.amount != trade_item.wholesale_price %>
|
36
|
+
<div>
|
37
|
+
<del class="has-text-grey"><%= trade_item.wholesale_price %></del>
|
38
|
+
<% if trade_item.reduced_amount < 0 %>
|
39
|
+
<span class="is-inline-block" data-controller="hover" data-hover-url-value="<%= promote_my_trade_item_url(trade_item) %>">
|
40
|
+
<span class="has-text-danger" data-action="mouseenter->hover#show mouseleave->hover#hide"><%= trade_item.reduced_amount %></span>
|
41
|
+
</span>
|
42
|
+
<% end %>
|
43
|
+
</div>
|
44
|
+
<% end %>
|
45
|
+
<p>
|
46
|
+
<strong><%= trade_item.amount %></strong>
|
47
|
+
</p>
|
48
|
+
</td>
|
49
|
+
<td>
|
50
|
+
<%= button_to t('.destroy'), { controller: 'trade_items', action: 'destroy', id: trade_item.id }, method: :delete %>
|
51
|
+
</td>
|
52
|
+
</tr>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<table class="table is-fullwidth">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<%= render 'show_thead' %>
|
5
|
+
</tr>
|
6
|
+
</thead>
|
7
|
+
<tbody>
|
8
|
+
<%= render partial: 'trade_item', collection: @trade_items, as: :trade_item %>
|
9
|
+
</tbody>
|
10
|
+
<%= render 'total_price' %>
|
11
|
+
<tfoot>
|
12
|
+
<tr>
|
13
|
+
<th colspan="5"></th>
|
14
|
+
<th>
|
15
|
+
<% if @checked_ids.present? %>
|
16
|
+
<%= link_to '去结算', { controller: 'orders', action: 'new' }, class: 'button is-primary', id: 'new_order' %>
|
17
|
+
<% else %>
|
18
|
+
<button class="button is-primary" disabled>去结算</button>
|
19
|
+
<% end %>
|
20
|
+
</th>
|
21
|
+
</tr>
|
22
|
+
</tfoot>
|
23
|
+
</table>
|
@@ -1,46 +1,66 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_for(:wechat_js) do %>
|
2
|
+
<%# wechat_config_js debug: false, apis: ['openAddress'] if defined?(:wechat_config_js) -%>
|
3
|
+
<% end %>
|
2
4
|
|
3
5
|
<div class="weui-panel weui-panel_access">
|
4
6
|
<div class="weui-panel__hd"><%= t('.title') %></div>
|
5
7
|
<div class="weui-panel__bd">
|
8
|
+
<%= link_to({ controller: 'profiled/my/addresses', return_to: url_for(controller: 'trade/my/carts', action: 'show') }, class: 'weui-cell weui-cell_access') do %>
|
9
|
+
<div class="weui-cell__bd">
|
10
|
+
<% if current_cart.address %>
|
11
|
+
<p><%= current_cart.address.contact %></p>
|
12
|
+
<p><%= current_cart.address.detail %></p>
|
13
|
+
<% else %>
|
14
|
+
<p>选择地址</p>
|
15
|
+
<% end %>
|
16
|
+
</div>
|
17
|
+
<div class="weui-cell__ft"></div>
|
18
|
+
<% end %>
|
6
19
|
<% @trade_items.each do |trade_item| %>
|
7
|
-
<div class="weui-media-box weui-media-box_appmsg" data-controller="swipe" data-action="touchmove->swipe#
|
20
|
+
<div class="weui-media-box weui-media-box_appmsg" data-controller="swipe" data-action="touchmove->swipe#move:passive touchstart->swipe#start:passive touchend->swipe#end:passive">
|
21
|
+
<%= form_with theme: nil, model: trade_item, url: { controller: 'trade_items', action: 'toggle', id: trade_item.id }, data: { controller: 'input' } do |f| %>
|
22
|
+
<label class="weui-cells_checkbox">
|
23
|
+
<%= f.check_box :status, value: trade_item.checked? ? 'checked' : 'init', checked: trade_item.checked?, data: { action: 'change->input#form' }, class: 'weui-check', id: nil %>
|
24
|
+
<i class="weui-icon-checked"></i>
|
25
|
+
</label>
|
26
|
+
<% end %>
|
8
27
|
<div class="weui-media-box__hd">
|
9
|
-
<%= image_tag trade_item.good.
|
28
|
+
<%= image_tag trade_item.good.logo, class: 'weui-media-box__thumb' if trade_item.good.logo.attached? %>
|
10
29
|
</div>
|
11
30
|
<div class="weui-media-box__bd">
|
12
31
|
<h4 class="weui-media-box__title"><%= trade_item.good.name %></h4>
|
13
32
|
<p class="weui-media-box__desc">
|
33
|
+
<% if trade_item.good.respond_to?(:parts) %>
|
14
34
|
<% trade_item.good.parts.each do |part| %>
|
15
35
|
<span><%= part.name %></span>
|
16
36
|
<% end %>
|
37
|
+
<% end %>
|
17
38
|
</p>
|
18
|
-
<
|
19
|
-
<
|
20
|
-
<
|
21
|
-
|
22
|
-
|
39
|
+
<div class="weui-media-box__info is-flex is-justify-content-space-between">
|
40
|
+
<div class="is-flex is-align-items-center">
|
41
|
+
<div class="weui-media-box__info__meta">
|
42
|
+
<span><%= trade_item.good.price %></span>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
<div class="is-flex is-align-items-center">
|
46
|
+
<%= button_to({ controller: 'trade_items', action: 'update', id: trade_item.id }, method: :patch, params: { '[trade_item]number': trade_item.number - 1 }, class: 'mr-1') do %>
|
47
|
+
<i class="fas fa-minus fa-lg"></i>
|
48
|
+
<% end if trade_item.number > 1 %>
|
49
|
+
<%= form_with(theme: nil, scope: 'trade_item', url: { controller: 'trade_items', action: 'update', id: trade_item.id }, method: :patch, data: { controller: 'input' }) do |f| %>
|
50
|
+
<%= f.number_field :number, value: trade_item.number, data: { action: 'change->input#form' }, class: 'has-background-light has-text-centered', style: 'width: 30px' %>
|
51
|
+
<% end %>
|
52
|
+
<%= button_to({ controller: 'trade_items', action: 'update', id: trade_item.id }, method: :patch, params: { '[trade_item]number': trade_item.number + 1 }, class: 'ml-1') do %>
|
53
|
+
<i class="fas fa-plus fa-lg"></i>
|
54
|
+
<% end %>
|
55
|
+
</div>
|
56
|
+
</div>
|
23
57
|
</div>
|
24
|
-
<div class="weui-media-box__ft" data-target="
|
25
|
-
<%=
|
26
|
-
<i class="fas fa-
|
27
|
-
<% end %>
|
28
|
-
<div class="weui-btn weui-btn_mini weui-btn_warn" data-target="cart.number"><%= trade_item.number %></div>
|
29
|
-
<% if trade_item.number <= 1 %>
|
30
|
-
<%= link_to my_trade_item_path(trade_item), method: :delete, data: { confirm: t('.confirm') }, remote: true, class: 'weui-btn weui-btn_mini weui-btn_default' do %>
|
31
|
-
<i class="fas fa-trash"></i>
|
32
|
-
<% end %>
|
33
|
-
<% else %>
|
34
|
-
<%= link_to my_trade_item_path(trade_item), method: :patch, data: { params: "[trade_item]number=#{trade_item.number - 1}" }, remote: true, class: 'weui-btn weui-btn_mini weui-btn_default' do %>
|
35
|
-
<i class="fas fa-minus"></i>
|
36
|
-
<% end %>
|
58
|
+
<div class="weui-media-box__ft" data-swipe-target="open" style="width: 0">
|
59
|
+
<%= button_to({ controller: 'trade_items', action: 'destroy', id: trade_item.id }, method: :delete, data: { confirm: t('.confirm') }, form: { class: 'weui-btn weui-btn_mini weui-btn_default' }) do %>
|
60
|
+
<i class="fas fa-trash"></i>
|
37
61
|
<% end %>
|
38
62
|
</div>
|
39
63
|
</div>
|
40
64
|
<% end %>
|
41
65
|
</div>
|
42
66
|
</div>
|
43
|
-
|
44
|
-
<div class="weui-btn-area">
|
45
|
-
<%= submit_tag t('helpers.submit.next'), form: 'add_cart', class: 'weui-btn weui-btn_primary' %>
|
46
|
-
</div>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%= render 'address' %>
|
2
|
+
<table class="table is-fullwidth">
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<%= render 'show_thead' %>
|
6
|
+
</tr>
|
7
|
+
</thead>
|
8
|
+
<tbody>
|
9
|
+
<%= render partial: 'trade_item', collection: @trade_items, as: :trade_item %>
|
10
|
+
</tbody>
|
11
|
+
<%= render 'total_price' %>
|
12
|
+
<tfoot>
|
13
|
+
<tr>
|
14
|
+
<th colspan="5"></th>
|
15
|
+
<th>
|
16
|
+
<% if @checked_ids.present? %>
|
17
|
+
<%= link_to '结算', { controller: 'orders', action: 'new' }, class: 'button is-primary', id: 'new_order' %>
|
18
|
+
<% else %>
|
19
|
+
<button class="button is-primary" disabled>结算</button>
|
20
|
+
<% end %>
|
21
|
+
</th>
|
22
|
+
</tr>
|
23
|
+
</tfoot>
|
24
|
+
</table>
|
25
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= turbo_stream.append 'body' do %>
|
2
|
+
<% if request.headers['Turbo-Frame'] == 'modal' && request.headers['Redirect'].present? %>
|
3
|
+
<div data-controller="visit" data-visit-frame-value="modal" data-visit-url-value="<%= request.headers['Redirect'] %>"></div>
|
4
|
+
<% elsif params.dig('cart', 'address_id') %>
|
5
|
+
<div data-controller="visit" data-visit-frame-value="modal" data-visit-reload-value="true" data-visit-url-value="<%= url_for(action: 'addresses') %>"></div>
|
6
|
+
<% else %>
|
7
|
+
<div data-controller="visit"></div>
|
8
|
+
<% end %>
|
9
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
json.extract! cash_log, :id, :title, :tag_str, :amount, :created_at
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= form_for [:my, @order], :url => date_my_order_path(@order), :html => { :class => 'form-horizontal' } do |f| %>
|
2
|
-
<%= render
|
2
|
+
<%= render 'error_messages', target: @order %>
|
3
3
|
|
4
4
|
<div class="form-group">
|
5
5
|
<%= f.label :order_on, '预约日期:', :class => 'col-sm-2 control-label' %>
|
@@ -20,4 +20,4 @@
|
|
20
20
|
<%= f.submit :class => "btn btn-primary" %>
|
21
21
|
</div>
|
22
22
|
</div>
|
23
|
-
<% end %>
|
23
|
+
<% end %>
|
@@ -1,12 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%= t('.title') %>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<div class="content">
|
8
|
-
<% ['alipay', 'wxpay'].each do |payment_type| %>
|
9
|
-
<%= link_to payment_type, "/my/orders/#{@order.id}/#{payment_type}_pay", remote: payment_type == 'wxpay' %>
|
10
|
-
<% end %>
|
11
|
-
</div>
|
12
|
-
</div>
|
1
|
+
<% ['alipay', 'wxpay_pc'].each do |payment_type| %>
|
2
|
+
<%= link_to payment_type, "/my/orders/#{@order.id}/#{payment_type}_pay", data: { turbo_frame: '_top' } %>
|
3
|
+
<% end %>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<% current_user.cards.each do |card| %>
|
2
|
+
<tr>
|
3
|
+
<td class="has-text-right"><%= card.card_template.name %></td>
|
4
|
+
<td>(可用: <%= card.amount %>)</td>
|
5
|
+
<td data-controller="input">
|
6
|
+
<%= form_with theme: nil, model: Trade::Payment.new, scope: 'payment', url: { controller: 'payments', action: 'create' }, id: "card_#{card.id}" do |f| %>
|
7
|
+
<%= f.hidden_field :type, value: 'Trade::CardPayment' %>
|
8
|
+
<%= f.hidden_field :card_id, value: card.id %>
|
9
|
+
<%= f.fields :payment_orders, model: f.object.payment_orders.build do |ef| %>
|
10
|
+
<%= ef.hidden_field :order_id, value: @order.id %>
|
11
|
+
<%= ef.hidden_field :state, value: 'confirmed' %>
|
12
|
+
<%= ef.hidden_field :check_amount, value: @order.amount < card.amount ? @order.amount : card.amount %>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
15
|
+
<% if @order.payments.pluck(:card_id).include?(card.id) %>
|
16
|
+
<%= form_with theme: nil, url: { controller: 'payments', action: 'destroy', id: @order.payments.find_by(card_id: card.id).id }, method: :delete, data: { controller: 'input' } do |f| %>
|
17
|
+
<%= f.check_box 'xx', checked: true, class: 'weui-check', data: { action: 'input#form' } %>
|
18
|
+
<% end %>
|
19
|
+
<% else %>
|
20
|
+
<%= check_box_tag 'xx', 'x', false, class: 'weui-check', form: "card_#{card.id}", data: { action: 'input#form' } %>
|
21
|
+
<% end %>
|
22
|
+
</td>
|
23
|
+
</tr>
|
24
|
+
<% end %>
|
25
|
+
<tr>
|
26
|
+
<td class="has-text-right">待支付</td>
|
27
|
+
<td><%= @order.remaining_amount.to_money %></td>
|
28
|
+
<td></td>
|
29
|
+
</tr>
|
30
|
+
<tr>
|
31
|
+
<td></td>
|
32
|
+
<td colspan="2">
|
33
|
+
<button class="button is-danger is-large">立即支付</button>
|
34
|
+
</td>
|
35
|
+
</tr>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<div class="hero-body container">
|
2
|
+
<div class="tile is-parent">
|
3
|
+
<div>
|
4
|
+
<p class="title"><%= t('.title') %></p>
|
5
|
+
<p><%= t('.tip') %></p>
|
6
|
+
<%= link_to t('trade.my.orders.index.title'), { controller: 'trade/my/orders', action: 'index' } %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
json.result @order.alipay_prepay
|
@@ -2,33 +2,36 @@
|
|
2
2
|
<%= wechat_config_js debug: false, apis: ['chooseWXPay'] -%>
|
3
3
|
<% end %>
|
4
4
|
|
5
|
+
<% if @orders.blank? %>
|
6
|
+
<p class="has-text-centered">暂无订单</p>
|
7
|
+
<% end %>
|
5
8
|
<div class="weui-panel weui-panel_access">
|
6
9
|
<% @orders.each do |order| %>
|
7
10
|
<div class="weui-panel__hd"><%= order.payment_status_i18n %></div>
|
8
11
|
<div class="weui-panel__bd">
|
9
12
|
<% order.trade_items.each do |trade_item| %>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
<a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg">
|
14
|
+
<div class="weui-media-box__hd">
|
15
|
+
<%= image_tag trade_item.good.logo, class: 'weui-media-box__thumb' if trade_item.good.logo.attached? %>
|
16
|
+
</div>
|
17
|
+
<div class="weui-media-box__bd">
|
18
|
+
<h4 class="weui-media-box__title"><%= trade_item.good.name %></h4>
|
19
|
+
<p class="weui-media-box__desc"><%= trade_item.amount %></p>
|
20
|
+
</div>
|
21
|
+
</a>
|
19
22
|
<% end %>
|
20
23
|
<div class="weui-media-box weui-media-box_text">
|
21
24
|
<ul class="weui-media-box__info">
|
22
25
|
<li class="weui-media-box__info__meta"><%= order.amount %></li>
|
23
26
|
<li class="weui-media-box__info__meta"></li>
|
24
27
|
<li class="weui-media-box__info__meta weui-media-box__info__meta_extra">
|
25
|
-
<%= link_to '
|
28
|
+
<%= link_to '支付', { action: 'payment_types', id: order.id } %>
|
26
29
|
</li>
|
27
30
|
</ul>
|
28
31
|
</div>
|
29
32
|
</div>
|
30
33
|
<div class="weui-panel__ft">
|
31
|
-
<%= link_to
|
34
|
+
<%= link_to({ action: 'show', id: order }, class: 'weui-cell weui-cell_access weui-cell_link') do %>
|
32
35
|
<div class="weui-cell__bd">更多</div>
|
33
36
|
<span class="weui-cell__ft"></span>
|
34
37
|
<% end %>
|