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
@@ -1,36 +1,36 @@
|
|
1
|
-
<table class="
|
1
|
+
<table class="table is-hoverable is-fullwidth">
|
2
2
|
<thead>
|
3
3
|
<tr>
|
4
|
-
<th><%= Order.human_attribute_name(:uuid) %></th>
|
5
|
-
<th><%= Order.human_attribute_name(:amount) %></th>
|
6
|
-
<th><%= Order.human_attribute_name(:payment_status) %></th>
|
7
|
-
<th>Pay</th>
|
4
|
+
<th><%= Trade::Order.human_attribute_name(:uuid) %></th>
|
5
|
+
<th><%= Trade::Order.human_attribute_name(:amount) %></th>
|
6
|
+
<th><%= Trade::Order.human_attribute_name(:payment_status) %></th>
|
8
7
|
<th></th>
|
9
8
|
</tr>
|
10
9
|
</thead>
|
11
|
-
|
10
|
+
<tbody>
|
12
11
|
<% @orders.each do |order| %>
|
13
12
|
<tr>
|
14
|
-
<td
|
13
|
+
<td>
|
14
|
+
<%= link_to order.uuid, { action: 'show', id: order.id } %>
|
15
|
+
</td>
|
15
16
|
<td>
|
16
17
|
<%= order.amount %>
|
17
18
|
</td>
|
18
|
-
<td><%= order.payment_status_i18n %></td>
|
19
19
|
<td>
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
<span><%= order.payment_status_i18n %></span>
|
21
|
+
<%= link_to({ action: 'payment_types', id: order.id }, class: 'button is-small') do %>
|
22
|
+
<span>支付</span>
|
23
|
+
<% end if order.can_pay? %>
|
23
24
|
</td>
|
24
25
|
<td>
|
25
|
-
|
26
|
-
|
27
|
-
<% end %>
|
28
|
-
<%= link_to edit_my_order_path(order), remote: true, data: { tooltip: t('.edit') }, class: 'ui mini circular icon button' do %>
|
26
|
+
<span><%= order.note %></span>
|
27
|
+
<%= link_to({ action: 'edit', id: order.id }, data: { turbo_frame: 'modal' }, aria: { label: t('.edit') }) do %>
|
29
28
|
<i class="fas fa-pencil-alt"></i>
|
30
29
|
<% end %>
|
31
30
|
</td>
|
32
31
|
</tr>
|
33
32
|
<% end %>
|
33
|
+
</tbody>
|
34
34
|
</table>
|
35
35
|
|
36
36
|
<%= paginate @orders %>
|
@@ -1,41 +1,30 @@
|
|
1
|
-
<
|
2
|
-
</div>
|
3
|
-
|
4
|
-
|
5
|
-
<table class="ui table">
|
1
|
+
<table class="table is-fullwidth">
|
6
2
|
<thead>
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<th></th>
|
16
|
-
</tr>
|
3
|
+
<tr>
|
4
|
+
<th>
|
5
|
+
<%= form_with model: @order, url: { action: 'create' }, id: 'new_order' do %><% end %>
|
6
|
+
</th>
|
7
|
+
<th><%= Trade::TradeItem.human_attribute_name(:good_name) %></th>
|
8
|
+
<th><%= Trade::TradeItem.human_attribute_name(:number) %></th>
|
9
|
+
<th><%= Trade::TradeItem.human_attribute_name(:amount) %></th>
|
10
|
+
</tr>
|
17
11
|
</thead>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
<td><%= order_item.quantity %></td>
|
27
|
-
<td></td>
|
28
|
-
</tr>
|
29
|
-
<% end %>
|
12
|
+
<tbody>
|
13
|
+
<% current_cart.trade_items.checked.each do |trade_item| %>
|
14
|
+
<tr>
|
15
|
+
<td></td>
|
16
|
+
<td><%= trade_item.good_name %></td>
|
17
|
+
<td><%= trade_item.number %></td>
|
18
|
+
<td><%= trade_item.amount %></td>
|
19
|
+
</tr>
|
30
20
|
<% end %>
|
31
|
-
|
21
|
+
</tbody>
|
32
22
|
<tfoot>
|
33
|
-
|
34
|
-
|
35
|
-
<
|
36
|
-
<%= submit_tag '
|
37
|
-
</
|
38
|
-
</
|
39
|
-
</tr>
|
23
|
+
<tr>
|
24
|
+
<th colspan="3"></th>
|
25
|
+
<th>
|
26
|
+
<%= submit_tag t('.confirm'), class: 'button is-primary', form: 'new_order' %>
|
27
|
+
</th>
|
28
|
+
</tr>
|
40
29
|
</tfoot>
|
41
|
-
</table>
|
30
|
+
</table>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<div class="weui-panel">
|
2
|
+
<div class="weui-panel__hd">
|
3
|
+
待支付:<%= @order.remaining_amount.to_money %>
|
4
|
+
</div>
|
5
|
+
<div class="weui-panel__bd">
|
6
|
+
<div class="weui-media-box weui-media-box_small-appmsg">
|
7
|
+
<div class="weui-cells weui-cells_checkbox">
|
8
|
+
<% current_user.cards.each do |card| %>
|
9
|
+
<label class="weui-cell weui-cell_active">
|
10
|
+
<span class="weui-cell__bd">
|
11
|
+
<%= card.card_template.name %>
|
12
|
+
(可用: <%= card.amount %>)
|
13
|
+
</span>
|
14
|
+
<span class="weui-cell__ft" data-controller="input">
|
15
|
+
<%= form_with theme: nil, model: Trade::Payment.new, scope: 'payment', url: { controller: 'payments', action: 'create' }, id: "card_#{card.id}" do |f| %>
|
16
|
+
<%= f.hidden_field :type, value: 'Trade::CardPayment' %>
|
17
|
+
<%= f.hidden_field :card_id, value: card.id %>
|
18
|
+
<%= f.fields :payment_orders, model: f.object.payment_orders.build do |ef| %>
|
19
|
+
<%= ef.hidden_field :order_id, value: @order.id %>
|
20
|
+
<%= ef.hidden_field :state, value: 'confirmed' %>
|
21
|
+
<%= ef.hidden_field :check_amount, value: @order.amount < card.amount ? @order.amount : card.amount %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<% if @order.payments.pluck(:card_id).include?(card.id) %>
|
25
|
+
<%= 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| %>
|
26
|
+
<%= f.check_box 'xx', checked: true, class: 'weui-check', data: { action: 'input#form' } %>
|
27
|
+
<span class="weui-icon-checked"></span>
|
28
|
+
<% end %>
|
29
|
+
<% else %>
|
30
|
+
<%= check_box_tag 'xx', 'x', false, class: 'weui-check', form: "card_#{card.id}", data: { action: 'input#form' } %>
|
31
|
+
<span class="weui-icon-checked"></span>
|
32
|
+
<% end %>
|
33
|
+
</span>
|
34
|
+
</label>
|
35
|
+
<% end %>
|
36
|
+
</div>
|
37
|
+
<div class="weui-cells">
|
38
|
+
<%= link_to({ action: 'wxpay_pay' }, class: 'weui-cell weui-cell_active weui-cell_access') do %>
|
39
|
+
<div class="weui-cell__hd"></div>
|
40
|
+
<div class="weui-cell__bd weui-cell_primary">微信支付</div>
|
41
|
+
<div class="weui-cell__ft"></div>
|
42
|
+
<% end unless @order.all_paid? %>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
<div class="hero">
|
48
|
+
<div class="hero-body">
|
49
|
+
<%= link_to '订单列表', { action: 'index' } %>
|
50
|
+
</div>
|
51
|
+
</div>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<div class="
|
2
|
-
|
1
|
+
<div class="box">
|
2
|
+
<%= @order.uuid %>
|
3
3
|
</div>
|
@@ -1,103 +1,60 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
<
|
4
|
-
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
<td><%=
|
30
|
-
<td><%= order_item.additional_amount %></td>
|
31
|
-
<td><%= order_item.reduced_amount %></td>
|
32
|
-
<td><%= order_item.amount %></td>
|
33
|
-
<td><%= order_item.number %></td>
|
34
|
-
</tr>
|
35
|
-
<% order_item.order_serves.each do |order_serve| %>
|
36
|
-
<tr class="warning">
|
37
|
-
<td><%= order_serve.serve.name %></td>
|
38
|
-
<td></td>
|
39
|
-
<td></td>
|
40
|
-
<td><%= order_serve.amount %></td>
|
41
|
-
<td></td>
|
42
|
-
<td></td>
|
43
|
-
<td></td>
|
44
|
-
</tr>
|
45
|
-
<% end %>
|
46
|
-
<% order_item.order_promotes.each do |order_promote| %>
|
47
|
-
<tr class="warning">
|
48
|
-
<td><%= order_promote.promote.name %></td>
|
49
|
-
<td></td>
|
50
|
-
<td></td>
|
51
|
-
<td></td>
|
52
|
-
<td><span style="color: red;"><%= order_promote.amount %></span></td>
|
53
|
-
<td></td>
|
54
|
-
<td></td>
|
55
|
-
<td></td>
|
56
|
-
</tr>
|
57
|
-
<% end %>
|
58
|
-
<% end %>
|
59
|
-
<% @order.pure_order_serves.each do |order_serve| %>
|
60
|
-
<tr>
|
61
|
-
<td><%= order_serve.serve.name %></td>
|
62
|
-
<td></td>
|
63
|
-
<td></td>
|
64
|
-
<td></td>
|
65
|
-
<td></td>
|
66
|
-
<td><%= order_serve.amount %></td>
|
67
|
-
<td></td>
|
68
|
-
<td></td>
|
69
|
-
</tr>
|
70
|
-
<% end %>
|
71
|
-
<% @order.pure_order_promotes.each do |order_promote| %>
|
72
|
-
<tr>
|
73
|
-
<td><%= order_promote.promote.name %></td>
|
74
|
-
<td></td>
|
75
|
-
<td></td>
|
76
|
-
<td></td>
|
77
|
-
<td></td>
|
78
|
-
<td><%= order_promote.amount %></td>
|
79
|
-
<td></td>
|
80
|
-
<td></td>
|
81
|
-
</tr>
|
82
|
-
<% end %>
|
83
|
-
<tr>
|
84
|
-
<td>总价</td>
|
85
|
-
<td></td>
|
1
|
+
<table class="table is-fullwidth">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th>商品</th>
|
5
|
+
<th></th>
|
6
|
+
<th>Pure Price</th>
|
7
|
+
<th>Serve Sum</th>
|
8
|
+
<th>Promote Sum</th>
|
9
|
+
<th></th>
|
10
|
+
<th>数量</th>
|
11
|
+
</tr>
|
12
|
+
</thead>
|
13
|
+
<% @order.trade_items.each do |trade_item| %>
|
14
|
+
<tr>
|
15
|
+
<td>
|
16
|
+
<%= trade_item.good_name %>
|
17
|
+
<span><%= trade_item.single_price %></span>
|
18
|
+
<%# link_to trade_item.good&.name, controller: '/' + trade_item.good_type.underscore.pluralize, action: 'show', id: trade_item.good_id %>
|
19
|
+
</td>
|
20
|
+
<td><%= link_to '订单流程', { controller: 'trade_items', action: 'show', id: trade_item.id } %></td>
|
21
|
+
<td><%= trade_item.original_amount %></td>
|
22
|
+
<td><%= trade_item.additional_amount %></td>
|
23
|
+
<td><%= trade_item.reduced_amount %></td>
|
24
|
+
<td><%= trade_item.amount %></td>
|
25
|
+
<td><%= trade_item.number %></td>
|
26
|
+
</tr>
|
27
|
+
<% trade_item.trade_promotes.each do |trade_promote| %>
|
28
|
+
<tr class="warning">
|
29
|
+
<td><%= trade_promote.promote.name %></td>
|
86
30
|
<td></td>
|
87
31
|
<td></td>
|
32
|
+
<td><%= trade_promote.amount %></td>
|
88
33
|
<td></td>
|
89
|
-
<td><%= @order.subtotal %>(<%= @order.amount %>)</td>
|
90
34
|
<td></td>
|
91
35
|
<td></td>
|
92
36
|
</tr>
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
37
|
+
<% end %>
|
38
|
+
<% end %>
|
39
|
+
<% @order.trade_promotes.each do |trade_promote| %>
|
40
|
+
<tr>
|
41
|
+
<td><%= trade_promote.promote.name %></td>
|
42
|
+
<td></td>
|
43
|
+
<td></td>
|
44
|
+
<td></td>
|
45
|
+
<td></td>
|
46
|
+
<td><%= trade_promote.amount %></td>
|
47
|
+
<td></td>
|
48
|
+
<td></td>
|
49
|
+
</tr>
|
50
|
+
<% end %>
|
51
|
+
<tr>
|
52
|
+
<td>总价</td>
|
53
|
+
<td></td>
|
54
|
+
<td></td>
|
55
|
+
<td></td>
|
56
|
+
<td></td>
|
57
|
+
<td><%= @order.item_amount %>(<%= @order.amount %>)</td>
|
58
|
+
<td></td>
|
59
|
+
</tr>
|
60
|
+
</table>
|
@@ -1,10 +1,3 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
<div class="settlement">
|
4
|
-
<%= image_tag "face2.jpg"%>
|
5
|
-
<p class="title">Your payment is successful!</p>
|
6
|
-
<p>We will ship out your order and update you with dispatch detail</p>
|
7
|
-
<%= link_to 'My Order list', show_orders_my_personal_center_path, class: 'ui green button mr_w_15 settlement_btn2' %>
|
8
|
-
<%= link_to 'Back Home', root_path, class: 'ui yellow button mr_w_15' %>
|
9
|
-
</div>
|
1
|
+
<div class="hero is-medium">
|
2
|
+
<%= render 'success' %>
|
10
3
|
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= content_for(:wechat_js) do %>
|
2
|
+
<%= wechat_config_js debug: false, apis: ['chooseWXPay'] -%>
|
3
|
+
<meta name="turbo-visit-control" content="reload">
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<%= turbo_stream_from @order %>
|
7
|
+
<div data-controller="wxpay" data-wxpay-params-value="<%= { timestamp: @wxpay_order[:timeStamp], nonceStr: @wxpay_order[:nonceStr], package: @wxpay_order[:package], signType: @wxpay_order[:signType], paySign: @wxpay_order[:paySign] }.to_json %>">
|
8
|
+
<div class="hero is-medium" id="order_result">
|
9
|
+
<div data-wxpay-target="load" class="weui-loadmore" style="display: none">
|
10
|
+
<i class="weui-loading"></i><span class="weui-loadmore__tips">等待支付结果确认</span>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</div>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<%= turbo_stream_from @order %>
|
2
|
+
<div class="hero is-medium is-light" id="order_result">
|
3
|
+
<div class="hero-body container">
|
4
|
+
<div class="level">
|
5
|
+
<div class="level-left">
|
6
|
+
<p class="level-item"><%= t('.tip') %></p>
|
7
|
+
<p class="level-item">订单编号:<%= @order.uuid %></p>
|
8
|
+
</div>
|
9
|
+
<div class="level-right">
|
10
|
+
<p class="level-item">付款金额:<span class="has-text-danger"><%= @order.amount %></span></p>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<div class="tile is-parent">
|
14
|
+
<div class="tile is-child is-flex is-align-items-center">
|
15
|
+
<figure class="image">
|
16
|
+
<%= image_tag @image_url %>
|
17
|
+
</figure>
|
18
|
+
</div>
|
19
|
+
<div class="tile is-child">
|
20
|
+
<%= image_pack_tag 'wx.png', class: 'image' %>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</div>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<%= link_to 'My Expenses', my_expense_members_path, class: active_helper(controllers: 'finance_my/expense_members') %>
|
2
|
+
<%= link_to 'My Payment Methods', my_payment_methods_path, class: active_helper(controllers: 'payment_methods') %>
|
3
|
+
<%= link_to 'Add New', new_my_payment_method_path, class: 'ui teal button' %>
|
@@ -1,10 +1,9 @@
|
|
1
|
-
<tr
|
2
|
-
<td><%= payment_method.id %></td>
|
1
|
+
<tr>
|
3
2
|
<td><%= payment_method.account_name %></td>
|
4
3
|
<td><%= payment_method.account_num %></td>
|
5
4
|
<td><%= payment_method.bank %></td>
|
6
5
|
<td>
|
7
|
-
<%= link_to 'Edit', edit_my_payment_method_path(payment_method), class: '
|
8
|
-
<%= link_to 'Delete', my_payment_method_path(payment_method), class: '
|
6
|
+
<%= link_to 'Edit', edit_my_payment_method_path(payment_method), class: 'button is-link is-small' %>
|
7
|
+
<%= link_to 'Delete', my_payment_method_path(payment_method), class: 'button', method: :delete, data: { confirm: t('.confirm') } %>
|
9
8
|
</td>
|
10
9
|
</tr>
|