rails_trade 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +37 -15
- data/Rakefile +9 -27
- data/app/assets/javascripts/controllers/{rails_trade_admin → trade/admin}/cart_items/create.js +0 -0
- data/app/assets/javascripts/controllers/{rails_trade_admin → trade/admin}/cart_items/index.js +0 -0
- data/app/assets/javascripts/controllers/{rails_trade_admin → trade/admin}/cart_items/only.js +0 -0
- data/app/assets/javascripts/controllers/{rails_trade_admin → trade/admin}/orders/new.js +0 -0
- data/app/assets/javascripts/controllers/trade/admin/payment_methods/edit.js +1 -0
- data/app/assets/javascripts/controllers/{rails_trade_admin → trade/admin}/payment_methods/new.js +0 -0
- data/app/assets/javascripts/controllers/trade/admin/payments/edit.js +1 -0
- data/app/assets/javascripts/controllers/{rails_trade_admin → trade/admin}/payments/new.js +0 -0
- data/app/assets/javascripts/controllers/{rails_trade_admin → trade/admin}/promote_buyers/edit.js +0 -0
- data/app/assets/javascripts/controllers/{rails_trade_admin → trade/admin}/promote_buyers/new.js +3 -1
- data/app/assets/javascripts/controllers/trade/admin/promote_charges/edit.js +1 -0
- data/app/assets/javascripts/controllers/trade/admin/promote_charges/new.js +7 -0
- data/app/assets/javascripts/controllers/trade/admin/promote_goods/edit.js +1 -0
- data/app/assets/javascripts/controllers/trade/admin/promote_goods/new.js +17 -0
- data/app/assets/javascripts/controllers/trade/admin/promotes/edit.js +2 -0
- data/app/assets/javascripts/controllers/trade/admin/promotes/new.js +5 -0
- data/app/assets/javascripts/controllers/trade/admin/refunds/index.js +1 -0
- data/app/assets/javascripts/controllers/trade/admin/refunds/new.js +1 -0
- data/app/assets/javascripts/controllers/trade/my/carts/show-phone-ready.js +1 -0
- data/app/assets/javascripts/controllers/trade/my/carts/show-ready.js +28 -0
- data/app/assets/javascripts/controllers/trade/my/orders/wait-phone.js +8 -0
- data/app/{views/goods/show.html.erb → assets/javascripts/controllers/trade/my/trade_items/create.js} +0 -0
- data/app/assets/stylesheets/controllers/trade/admin/promote_charges/index.css +4 -0
- data/app/assets/stylesheets/controllers/trade/admin/promotes/index.css +4 -0
- data/app/{views/rails_trade_admin/orders/edit.html.erb → assets/stylesheets/controllers/trade/my/carts/show-phone.css} +0 -0
- data/app/assets/stylesheets/controllers/trade/payments/wxpay_result.css +57 -0
- data/app/channels/paid_channel.rb +7 -0
- data/app/controllers/concerns/controller_order_types.rb +3 -6
- data/app/controllers/rails_trade/my_cart.rb +16 -0
- data/app/controllers/trade/admin/base_controller.rb +5 -0
- data/app/controllers/{the_trade_admin → trade/admin}/buyers_controller.rb +3 -3
- data/app/controllers/{the_trade_admin/cart_item_serves_controller.rb → trade/admin/cart_serves_controller.rb} +8 -5
- data/app/controllers/{goods_controller.rb → trade/admin/goods_controller.rb} +7 -1
- data/app/controllers/{the_trade_admin → trade/admin}/order_payments_controller.rb +6 -3
- data/app/controllers/{the_trade_admin → trade/admin}/orders_controller.rb +23 -16
- data/app/controllers/{the_trade_admin → trade/admin}/payment_methods_controller.rb +8 -5
- data/app/controllers/{the_trade_admin → trade/admin}/payment_orders_controller.rb +10 -12
- data/app/controllers/{the_trade_admin → trade/admin}/payment_references_controller.rb +3 -3
- data/app/controllers/{the_trade_admin → trade/admin}/payment_strategies_controller.rb +9 -5
- data/app/controllers/trade/admin/payments_controller.rb +97 -0
- data/app/controllers/{the_trade_admin → trade/admin}/produces_controller.rb +4 -4
- data/app/controllers/trade/admin/promote_buyers_controller.rb +57 -0
- data/app/controllers/trade/admin/promote_charges_controller.rb +67 -0
- data/app/controllers/trade/admin/promote_goods_controller.rb +63 -0
- data/app/controllers/trade/admin/promotes_controller.rb +69 -0
- data/app/controllers/{the_trade_admin → trade/admin}/refunds_controller.rb +9 -12
- data/app/controllers/{the_trade_admin/cart_items_controller.rb → trade/admin/trade_items_controller.rb} +26 -28
- data/app/controllers/trade/admin/trade_promotes_controller.rb +71 -0
- data/app/controllers/trade/buyers_controller.rb +8 -0
- data/app/controllers/trade/my/base_controller.rb +4 -0
- data/app/controllers/trade/my/carts_controller.rb +32 -0
- data/app/controllers/{the_trade_my → trade/my}/order_items_controller.rb +4 -4
- data/app/controllers/trade/my/orders_controller.rb +106 -0
- data/app/controllers/{the_trade_my → trade/my}/payment_methods_controller.rb +1 -1
- data/app/controllers/trade/my/trade_items_controller.rb +47 -0
- data/app/controllers/trade/payments_controller.rb +71 -0
- data/app/models/cart.rb +4 -0
- data/app/models/order.rb +4 -0
- data/app/models/payment.rb +4 -0
- data/app/models/payment/alipay_payment.rb +3 -0
- data/app/models/payment/apple_payment.rb +3 -0
- data/app/models/payment/bank_payment.rb +3 -0
- data/app/models/payment/hand_payment.rb +3 -0
- data/app/models/payment/paypal_payment.rb +3 -0
- data/app/models/payment/stripe_payment.rb +3 -0
- data/app/models/payment/wxpay_payment.rb +3 -0
- data/app/models/payment_method.rb +3 -0
- data/app/models/{rails_trade/payment_methods → payment_method}/alipay_method.rb +1 -1
- data/app/models/{rails_trade/payment_methods → payment_method}/bank_method.rb +1 -1
- data/app/models/payment_method/stripe_method.rb +3 -0
- data/app/models/payment_order.rb +3 -0
- data/app/models/payment_reference.rb +3 -0
- data/app/models/payment_strategy.rb +3 -0
- data/app/models/payment_type.rb +3 -0
- data/app/models/promote.rb +3 -0
- data/app/models/promote_buyer.rb +3 -0
- data/app/models/promote_charge.rb +3 -0
- data/app/models/promote_charge/cash_promote_charge.rb +3 -0
- data/app/models/promote_charge/discount_promote_charge.rb +3 -0
- data/app/models/promote_charge/final_promote_charge.rb +3 -0
- data/app/models/promote_charge/minus_promote_charge.rb +3 -0
- data/app/models/promote_charge/plus_promote_charge.rb +3 -0
- data/app/models/promote_extra.rb +3 -0
- data/app/models/promote_good.rb +3 -0
- data/app/models/rails_trade/amount.rb +44 -0
- data/app/models/rails_trade/buyer.rb +35 -0
- data/app/models/rails_trade/cart.rb +64 -0
- data/app/models/rails_trade/good.rb +71 -0
- data/app/models/rails_trade/order.rb +78 -91
- data/app/models/rails_trade/ordering/payment.rb +113 -0
- data/app/models/rails_trade/{concerns/the_refund.rb → ordering/refund.rb} +3 -5
- data/app/models/rails_trade/payment.rb +72 -73
- data/app/models/rails_trade/payment/alipay_payment.rb +15 -0
- data/app/models/rails_trade/payment/apple_payment.rb +7 -0
- data/app/models/rails_trade/{payments → payment}/bank_payment.rb +2 -4
- data/app/models/rails_trade/payment/hand_payment.rb +8 -0
- data/app/models/rails_trade/payment/paypal_payment.rb +8 -0
- data/app/models/rails_trade/payment/stripe_payment.rb +9 -0
- data/app/models/rails_trade/{payments → payment}/wxpay_payment.rb +1 -2
- data/app/models/rails_trade/payment_method.rb +22 -12
- data/app/models/rails_trade/{payment_methods → payment_method}/stripe_method.rb +7 -4
- data/app/models/rails_trade/payment_order.rb +84 -51
- data/app/models/rails_trade/payment_reference.rb +12 -9
- data/app/models/rails_trade/payment_strategy.rb +15 -12
- data/app/models/rails_trade/payment_type/alipay.rb +28 -0
- data/app/models/rails_trade/payment_type/apple_pay.rb +18 -0
- data/app/models/rails_trade/{payment_interface/the_paypal.rb → payment_type/paypal.rb} +8 -29
- data/app/models/rails_trade/{payment_interface/the_stripe.rb → payment_type/stripe.rb} +8 -26
- data/app/models/rails_trade/payment_type/wxpay.rb +55 -0
- data/app/models/rails_trade/promote.rb +65 -27
- data/app/models/rails_trade/promote_buyer.rb +25 -7
- data/app/models/rails_trade/promote_charge.rb +78 -11
- data/app/models/rails_trade/promote_charge/cash_promote_charge.rb +12 -0
- data/app/models/rails_trade/promote_charge/discount_promote_charge.rb +17 -0
- data/app/models/rails_trade/promote_charge/final_promote_charge.rb +12 -0
- data/app/models/rails_trade/promote_charge/minus_promote_charge.rb +11 -0
- data/app/models/rails_trade/promote_charge/plus_promote_charge.rb +7 -0
- data/app/models/rails_trade/promote_extra.rb +13 -0
- data/app/models/rails_trade/promote_good.rb +20 -7
- data/app/models/rails_trade/refund.rb +30 -19
- data/app/models/rails_trade/{refunds → refund}/alipay_refund.rb +1 -1
- data/app/models/rails_trade/refund/bank_refund.rb +5 -0
- data/app/models/rails_trade/refund/hand_refund.rb +5 -0
- data/app/models/rails_trade/{refunds → refund}/paypal_refund.rb +1 -1
- data/app/models/rails_trade/{refunds → refund}/stripe_refund.rb +1 -1
- data/app/models/rails_trade/{refunds → refund}/wxpay_refund.rb +17 -9
- data/app/models/rails_trade/sell.rb +24 -0
- data/app/models/rails_trade/trade_item.rb +153 -0
- data/app/models/rails_trade/trade_promote.rb +92 -0
- data/app/models/rails_trade/user.rb +9 -0
- data/app/models/refund.rb +3 -0
- data/app/models/refund/alipay_refund.rb +3 -0
- data/app/models/refund/bank_refund.rb +3 -0
- data/app/models/refund/hand_refund.rb +3 -0
- data/app/models/refund/paypal_refund.rb +3 -0
- data/app/models/refund/stripe_refund.rb +3 -0
- data/app/models/refund/wxpay_refund.rb +3 -0
- data/app/models/trade_item.rb +3 -0
- data/app/models/trade_promote.rb +3 -0
- data/app/views/application/_trade_nav.html.erb +16 -0
- data/app/views/my/_trade_nav.html.erb +10 -0
- data/app/views/{rails_trade_admin → trade/admin}/buyers/_form.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/buyers/_menu.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/buyers/_search_form.html.erb +3 -3
- data/app/views/{rails_trade_admin → trade/admin}/buyers/edit.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/buyers/index.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/buyers/new.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/buyers/orders.html.erb +2 -2
- data/app/views/{rails_trade_admin → trade/admin}/buyers/overdue.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/buyers/show.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/_check.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/_index.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/_new.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/_serve.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/_single.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/_single_table.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/_total.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/_total_table.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/add.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/create.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/destroy.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/index.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/new.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/single.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/cart_item_serves/total.js.erb +0 -0
- data/app/views/trade/admin/goods/_form.html.erb +7 -0
- data/app/views/{rails_trade_admin → trade/admin}/goods/_item.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/goods/_new.html.erb +2 -2
- data/app/views/{rails_trade_admin → trade/admin}/goods/_show.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/goods/_show_tr.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/goods/create.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/goods/destroy.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/goods/edit.html.erb +2 -2
- data/app/views/{rails_trade_admin → trade/admin}/goods/edit.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/goods/edit_items.html.erb +2 -2
- data/app/views/{rails_trade_admin → trade/admin}/goods/edit_pic.html.erb +2 -2
- data/app/views/{rails_trade_admin → trade/admin}/goods/edit_promote.html.erb +2 -2
- data/app/views/{rails_trade_admin → trade/admin}/goods/index.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/goods/new.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/goods/new.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/goods/show.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/goods/update.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/order_payments/_index.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/order_payments/_new.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/order_payments/_payment_orders.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/order_payments/_payments.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/order_payments/create.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/order_payments/create_fail.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/order_payments/destroy.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/order_payments/index.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/order_payments/new.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/orders/_addresses.html.erb +1 -1
- data/app/views/trade/admin/orders/_filter.html.erb +26 -0
- data/app/views/trade/admin/orders/_form.html.erb +4 -0
- data/app/views/{rails_trade_admin → trade/admin}/orders/_invoice_addresses.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/orders/_item.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/orders/_new_items.html.erb +1 -1
- data/app/{assets/javascripts/controllers/rails_trade_admin/payments/index.js → views/trade/admin/orders/_search_form.html.erb} +0 -0
- data/app/views/trade/admin/orders/index.html.erb +52 -0
- data/app/views/{rails_trade_admin → trade/admin}/orders/new.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/orders/payments.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/orders/refresh.js.erb +0 -0
- data/app/views/trade/admin/orders/show.html.erb +75 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_methods/_edit.html.erb +0 -0
- data/app/views/{rails_trade_admin/payment_methods/_search_form.html.erb → trade/admin/payment_methods/_filter.html.erb} +5 -9
- data/app/views/{rails_trade_admin → trade/admin}/payment_methods/_form.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_methods/_index_layout.html.erb +2 -5
- data/app/views/{rails_trade_admin → trade/admin}/payment_methods/_new.html.erb +2 -2
- data/app/views/{rails_trade_admin → trade/admin}/payment_methods/_payment_method.html.erb +2 -3
- data/app/views/trade/admin/payment_methods/create.js.erb +2 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_methods/destroy.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_methods/edit.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/payment_methods/edit.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_methods/index.html.erb +7 -4
- data/app/views/{rails_trade_admin → trade/admin}/payment_methods/mine.html.erb +2 -2
- data/app/views/{rails_trade_admin → trade/admin}/payment_methods/new.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/payment_methods/new.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_methods/unverified.html.erb +4 -6
- data/app/views/{rails_trade_admin → trade/admin}/payment_methods/update.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_orders/_index.html.erb +2 -6
- data/app/views/trade/admin/payment_orders/_new.html.erb +23 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_orders/_orders.html.erb +2 -9
- data/app/views/{rails_trade_admin → trade/admin}/payment_orders/cancel.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_orders/create.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_orders/create_fail.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_orders/new.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_orders/raise_fail.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_orders/update.js.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/payment_orders/update_fail.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_references/_form.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/payment_references/_new.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/payment_references/destroy.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_references/edit.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_references/index.html.erb +1 -1
- data/app/views/{rails_trade_admin → trade/admin}/payment_references/new.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_references/show.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_strategies/_form.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payment_strategies/edit.html.erb +2 -2
- data/app/views/{rails_trade_admin → trade/admin}/payment_strategies/index.html.erb +2 -2
- data/app/views/{rails_trade_admin → trade/admin}/payment_strategies/new.html.erb +1 -1
- data/app/views/trade/admin/payments/_checked_amount.html.erb +6 -0
- data/app/views/trade/admin/payments/_edit.html.erb +12 -0
- data/app/views/trade/admin/payments/_filter.html.erb +40 -0
- data/app/views/{rails_trade_admin → trade/admin}/payments/_form.html.erb +6 -2
- data/app/views/trade/admin/payments/_item.html.erb +41 -0
- data/app/views/trade/admin/payments/_new.html.erb +12 -0
- data/app/views/{rails_trade_admin → trade/admin}/payments/analyze.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/payments/dashboard.html.erb +0 -0
- data/app/views/trade/admin/payments/edit.html.erb +13 -0
- data/app/views/trade/admin/payments/edit.js.erb +3 -0
- data/app/views/trade/admin/payments/index.html.erb +40 -0
- data/app/views/trade/admin/payments/new.html.erb +13 -0
- data/app/views/trade/admin/payments/new.js.erb +3 -0
- data/app/views/{rails_trade_admin → trade/admin}/payments/show.html.erb +0 -0
- data/app/views/trade/admin/promote_buyers/_filter.html.erb +7 -0
- data/app/views/trade/admin/promote_buyers/_form.html.erb +17 -0
- data/app/views/{rails_trade_admin → trade/admin}/promote_buyers/_promote_buyer.json.jbuilder +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/promote_buyers/edit.html.erb +1 -1
- data/app/views/trade/admin/promote_buyers/edit.js.erb +3 -0
- data/app/views/trade/admin/promote_buyers/index.html.erb +52 -0
- data/app/views/{rails_trade_admin → trade/admin}/promote_buyers/index.json.jbuilder +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/promote_buyers/new.html.erb +1 -1
- data/app/views/trade/admin/promote_buyers/new.js.erb +3 -0
- data/app/views/{rails_trade_admin → trade/admin}/promote_buyers/show.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/promote_buyers/show.json.jbuilder +0 -0
- data/app/views/trade/admin/promote_charges/_base_price_form.html.erb +1 -0
- data/app/views/trade/admin/promote_charges/_edit.html.erb +13 -0
- data/app/views/trade/admin/promote_charges/_filter.html.erb +11 -0
- data/app/views/trade/admin/promote_charges/_form.html.erb +11 -0
- data/app/views/trade/admin/promote_charges/_new.html.erb +13 -0
- data/app/views/trade/admin/promote_charges/index.html.erb +65 -0
- data/app/views/trade/admin/promote_charges/options.js.erb +4 -0
- data/app/views/trade/admin/promote_goods/_filter.html.erb +8 -0
- data/app/views/trade/admin/promote_goods/_form.html.erb +8 -0
- data/app/views/trade/admin/promote_goods/_goods_options.html.erb +1 -0
- data/app/views/trade/admin/promote_goods/goods.js.erb +2 -0
- data/app/views/trade/admin/promote_goods/index.html.erb +61 -0
- data/app/views/trade/admin/promotes/_edit.html.erb +12 -0
- data/app/views/trade/admin/promotes/_filter.html.erb +9 -0
- data/app/views/trade/admin/promotes/_form.html.erb +12 -0
- data/app/views/trade/admin/promotes/_new.html.erb +12 -0
- data/app/views/trade/admin/promotes/_new_promote_charge.html.erb +10 -0
- data/app/views/trade/admin/promotes/create.js.erb +2 -0
- data/app/views/trade/admin/promotes/index.html.erb +79 -0
- data/app/views/trade/admin/refunds/_filter.html.erb +11 -0
- data/app/views/{rails_trade_admin → trade/admin}/refunds/_form.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/refunds/_logs_table.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/refunds/_new.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/refunds/edit.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/refunds/index.html.erb +13 -17
- data/app/views/{rails_trade_admin → trade/admin}/refunds/logs.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/refunds/new.html.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/refunds/new.js.erb +0 -0
- data/app/views/{rails_trade_admin → trade/admin}/refunds/show.html.erb +0 -0
- data/app/views/{rails_trade_admin/cart_items → trade/admin/trade_items}/_additions.html.erb +0 -0
- data/app/views/{rails_trade_admin/cart_items → trade/admin/trade_items}/_filter.html.erb +0 -0
- data/app/views/{rails_trade_admin/cart_items → trade/admin/trade_items}/_good_price.html.erb +0 -0
- data/app/views/{rails_trade_admin/cart_items → trade/admin/trade_items}/_order_price.html.erb +0 -0
- data/app/views/{rails_trade_admin/cart_items → trade/admin/trade_items}/_retail_price.html.erb +0 -0
- data/app/views/{rails_trade_admin/cart_items → trade/admin/trade_items}/_single_price.html.erb +0 -0
- data/app/views/{rails_trade_admin/cart_items → trade/admin/trade_items}/_total_price.html.erb +0 -0
- data/app/views/{rails_trade_admin/cart_items → trade/admin/trade_items}/destroy.js.erb +0 -0
- data/app/views/{rails_trade_admin/cart_items → trade/admin/trade_items}/error.html.erb +0 -0
- data/app/views/{rails_trade_admin/cart_items → trade/admin/trade_items}/index.html.erb +3 -3
- data/app/views/{rails_trade_admin/cart_items → trade/admin/trade_items}/only.html.erb +2 -2
- data/app/views/{rails_trade_admin/cart_items → trade/admin/trade_items}/total.js.erb +0 -0
- data/app/views/{rails_trade_admin/cart_items → trade/admin/trade_items}/update.js.erb +0 -0
- data/app/views/trade/admin/trade_promotes/_filter.html.erb +7 -0
- data/app/views/trade/admin/trade_promotes/_form.html.erb +6 -0
- data/app/views/trade/admin/trade_promotes/_show_table.html.erb +20 -0
- data/app/views/trade/admin/trade_promotes/edit.html.erb +9 -0
- data/app/views/trade/admin/trade_promotes/edit.js.erb +3 -0
- data/app/views/trade/admin/trade_promotes/index.html.erb +38 -0
- data/app/views/trade/admin/trade_promotes/new.html.erb +9 -0
- data/app/views/trade/admin/trade_promotes/new.js.erb +3 -0
- data/app/views/trade/admin/trade_promotes/show.html.erb +7 -0
- data/app/views/trade/admin/trade_promotes/show.js.erb +3 -0
- data/app/views/trade/admin/trade_promotes/update.js.erb +1 -0
- data/app/views/{buyers → trade/buyers}/_show.html.erb +0 -0
- data/app/views/{buyers → trade/buyers}/show.js.erb +0 -0
- data/app/views/{goods → trade/goods}/_choose.html.erb +0 -0
- data/app/views/{goods → trade/goods}/_good.html.erb +0 -0
- data/app/views/{goods → trade/goods}/_good_item.html.erb +0 -0
- data/app/views/{goods → trade/goods}/_nav.html.erb +0 -0
- data/app/views/{goods → trade/goods}/_search.html.erb +0 -0
- data/app/views/{goods → trade/goods}/index.html.erb +0 -0
- data/app/views/{goods → trade/goods}/index/_product.html.erb +0 -0
- data/app/views/{goods → trade/goods}/item.html.erb +0 -0
- data/app/views/{goods → trade/goods}/produce.html.erb +0 -0
- data/app/views/trade/goods/show.html.erb +2 -0
- data/app/views/{goods → trade/goods}/show/_basic.html.erb +0 -0
- data/app/views/{goods → trade/goods}/show/_carousel.html.erb +0 -0
- data/app/views/{goods → trade/goods}/show/_items.html.erb +0 -0
- data/app/views/{goods → trade/goods}/show/_sales.html.erb +0 -0
- data/app/views/{goods → trade/goods}/show/_side.html.erb +0 -0
- data/app/views/{goods → trade/goods}/taxon/_breadcrumb.html.erb +0 -0
- data/app/views/{goods → trade/goods}/taxon/_nav.html.erb +0 -0
- data/app/views/{goods → trade/goods}/taxon/_nav_.html.erb +0 -0
- data/app/views/{goods → trade/goods}/taxon/_nav_last.html.erb +0 -0
- data/app/views/trade/my/carts/_filter.html.erb +7 -0
- data/app/views/trade/my/carts/_form.html.erb +8 -0
- data/app/views/trade/my/carts/_show_table.html.erb +28 -0
- data/app/views/trade/my/carts/edit.html.erb +9 -0
- data/app/views/trade/my/carts/edit.js.erb +3 -0
- data/app/views/trade/my/carts/index.html.erb +47 -0
- data/app/views/trade/my/carts/new.html.erb +9 -0
- data/app/views/trade/my/carts/new.js.erb +3 -0
- data/app/views/trade/my/carts/show.html+phone.erb +46 -0
- data/app/views/{rails_trade_admin/promote_goods → trade/my/carts}/show.html.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/order_items/_form.html.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/order_items/edit.html.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/order_items/index.html.erb +1 -1
- data/app/views/{rails_trade_my → trade/my}/order_items/new.html.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/order_items/show.html.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/orders/_date_form.html.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/orders/_edit.html.erb +2 -2
- data/app/views/trade/my/orders/_edit_payment_type.html.erb +12 -0
- data/app/views/{rails_trade_my → trade/my}/orders/_form.html.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/orders/destroy.js.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/orders/edit.js.erb +0 -0
- data/app/views/trade/my/orders/edit_payment_type.js.erb +4 -0
- data/app/views/{rails_trade_my → trade/my}/orders/fail.html.erb +0 -0
- data/app/views/trade/my/orders/index.html+phone.erb +37 -0
- data/app/views/trade/my/orders/index.html.erb +36 -0
- data/app/views/{rails_trade_my → trade/my}/orders/index.json.jbuilder +0 -0
- data/app/views/{rails_trade_my → trade/my}/orders/new.html.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/orders/refresh.js.erb +0 -0
- data/app/views/trade/my/orders/refund.json.jbuilder +12 -0
- data/app/views/trade/my/orders/show.html+phone.erb +3 -0
- data/app/views/{rails_trade_my → trade/my}/orders/show.html.erb +3 -3
- data/app/views/{rails_trade_my → trade/my}/orders/success.html.erb +0 -2
- data/app/views/{rails_trade_my → trade/my}/orders/update.js.erb +1 -1
- data/app/views/trade/my/orders/wait.html+wechat.erb +4 -0
- data/app/views/trade/my/orders/wxpay_pay.js.erb +16 -0
- data/app/views/trade/my/orders/wxpay_pay_err.js.erb +5 -0
- data/app/views/{rails_trade_my → trade/my}/payment_methods/_edit.html.erb +1 -1
- data/app/views/{rails_trade_my → trade/my}/payment_methods/_form.html.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/payment_methods/_index.html.erb +1 -1
- data/app/views/{rails_trade_my → trade/my}/payment_methods/_item.html.erb +1 -1
- data/app/views/{rails_trade_my → trade/my}/payment_methods/_new.html.erb +3 -3
- data/app/views/{rails_trade_my → trade/my}/payment_methods/create.js.erb +0 -0
- data/app/views/{rails_trade_my/addresses → trade/my/payment_methods}/destroy.js.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/payment_methods/edit.js.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/payment_methods/index.html.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/payment_methods/index.js.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/payment_methods/new.js.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/payment_methods/show.html.erb +0 -0
- data/app/views/{rails_trade_my/addresses → trade/my/payment_methods}/update.js.erb +0 -0
- data/app/views/trade/my/trade_items/_additions.html.erb +12 -0
- data/app/views/trade/my/trade_items/_cart_item.js.erb +2 -0
- data/app/views/trade/my/trade_items/_single_price.html.erb +6 -0
- data/app/views/trade/my/trade_items/_total_price.html.erb +8 -0
- data/app/views/trade/my/trade_items/_trade_items.html.erb +68 -0
- data/app/views/trade/my/trade_items/create.html.erb +1 -0
- data/app/views/{rails_trade_my/cart_items → trade/my/trade_items}/destroy.js.erb +0 -0
- data/app/views/trade/my/trade_items/index.json.jbuilder +0 -0
- data/app/views/trade/my/trade_items/update.js.erb +1 -0
- data/app/views/{rails_trade_my → trade/my}/users/_form.html.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/users/edit.html.erb +0 -0
- data/app/views/{rails_trade_my → trade/my}/users/show.html.erb +0 -0
- data/app/views/trade/payments/_wxpay_result.html.erb +3 -0
- data/app/views/trade/payments/wxpay_result.js.erb +1 -0
- data/config/locales/en.enum.yml +47 -0
- data/config/locales/en.yml +22 -60
- data/config/locales/zh.attributes.yml +75 -0
- data/config/locales/zh.controller.yml +51 -0
- data/config/locales/zh.enum.yml +58 -0
- data/config/locales/zh.help.yml +7 -0
- data/config/routes.rb +45 -59
- data/lib/rails_trade.rb +9 -19
- data/lib/rails_trade/apple_pay.rb +32 -0
- data/lib/rails_trade/config.rb +6 -3
- data/lib/rails_trade/engine.rb +15 -19
- data/lib/rails_trade/version.rb +1 -1
- metadata +475 -422
- data/app/assets/config/rails_trade_manifest.js +0 -1
- data/app/assets/javascripts/controllers/rails_trade_admin/buyers/index.js +0 -15
- data/app/assets/javascripts/controllers/rails_trade_admin/buyers/overdue.js +0 -15
- data/app/assets/javascripts/controllers/rails_trade_admin/payment_methods/edit.js +0 -1
- data/app/assets/javascripts/controllers/rails_trade_admin/payment_methods/index.js +0 -1
- data/app/assets/javascripts/controllers/rails_trade_admin/payment_methods/unverified.js +0 -1
- data/app/assets/javascripts/controllers/rails_trade_admin/promote_goods/index.js +0 -1
- data/app/assets/javascripts/controllers/rails_trade_admin/promotes/edit.js +0 -2
- data/app/assets/javascripts/controllers/rails_trade_admin/promotes/index.js +0 -1
- data/app/assets/javascripts/controllers/rails_trade_admin/promotes/new.js +0 -2
- data/app/assets/javascripts/controllers/rails_trade_admin/serves/edit.js +0 -2
- data/app/assets/javascripts/controllers/rails_trade_admin/serves/index.js +0 -1
- data/app/assets/javascripts/controllers/rails_trade_admin/serves/new.js +0 -4
- data/app/assets/javascripts/controllers/rails_trade_my/cart_items/create.js +0 -3
- data/app/assets/javascripts/controllers/rails_trade_my/cart_items/index.js +0 -65
- data/app/controllers/areas_controller.rb +0 -18
- data/app/controllers/buyers_controller.rb +0 -8
- data/app/controllers/payments_controller.rb +0 -50
- data/app/controllers/providers_controller.rb +0 -8
- data/app/controllers/the_trade_admin/addresses_controller.rb +0 -75
- data/app/controllers/the_trade_admin/areas_controller.rb +0 -50
- data/app/controllers/the_trade_admin/base_controller.rb +0 -5
- data/app/controllers/the_trade_admin/payments_controller.rb +0 -89
- data/app/controllers/the_trade_admin/promote_buyers_controller.rb +0 -39
- data/app/controllers/the_trade_admin/promote_charges_controller.rb +0 -62
- data/app/controllers/the_trade_admin/promote_goods_controller.rb +0 -50
- data/app/controllers/the_trade_admin/promotes_controller.rb +0 -105
- data/app/controllers/the_trade_admin/providers_controller.rb +0 -121
- data/app/controllers/the_trade_admin/serve_charges_controller.rb +0 -67
- data/app/controllers/the_trade_admin/serves_controller.rb +0 -107
- data/app/controllers/the_trade_my/addresses_controller.rb +0 -50
- data/app/controllers/the_trade_my/base_controller.rb +0 -13
- data/app/controllers/the_trade_my/buyers_controller.rb +0 -35
- data/app/controllers/the_trade_my/cart_items_controller.rb +0 -71
- data/app/controllers/the_trade_my/orders_controller.rb +0 -161
- data/app/controllers/the_trade_my/providers_controller.rb +0 -44
- data/app/models/rails_trade/address.rb +0 -14
- data/app/models/rails_trade/area.rb +0 -65
- data/app/models/rails_trade/cart_item.rb +0 -185
- data/app/models/rails_trade/cart_item_serve.rb +0 -16
- data/app/models/rails_trade/concerns/good_able.rb +0 -63
- data/app/models/rails_trade/concerns/order_able.rb +0 -48
- data/app/models/rails_trade/concerns/promote_fee.rb +0 -54
- data/app/models/rails_trade/concerns/serve_fee.rb +0 -41
- data/app/models/rails_trade/concerns/summary_service.rb +0 -67
- data/app/models/rails_trade/concerns/the_payment.rb +0 -88
- data/app/models/rails_trade/concerns/the_trade_buyer.rb +0 -50
- data/app/models/rails_trade/concerns/the_trade_user.rb +0 -23
- data/app/models/rails_trade/good_partner.rb +0 -8
- data/app/models/rails_trade/good_produce.rb +0 -14
- data/app/models/rails_trade/order_item.rb +0 -88
- data/app/models/rails_trade/order_promote.rb +0 -23
- data/app/models/rails_trade/order_serve.rb +0 -23
- data/app/models/rails_trade/order_shipment.rb +0 -10
- data/app/models/rails_trade/payment_interface/payment_interface_base.rb +0 -8
- data/app/models/rails_trade/payment_interface/the_alipay.rb +0 -49
- data/app/models/rails_trade/payment_interface/the_wxpay.rb +0 -56
- data/app/models/rails_trade/payments/alipay_payment.rb +0 -12
- data/app/models/rails_trade/payments/hand_payment.rb +0 -13
- data/app/models/rails_trade/payments/paypal_payment.rb +0 -8
- data/app/models/rails_trade/payments/stripe_payment.rb +0 -7
- data/app/models/rails_trade/produce.rb +0 -18
- data/app/models/rails_trade/promote_charges/single_promote_charge.rb +0 -7
- data/app/models/rails_trade/promote_charges/total_promote_charge.rb +0 -7
- data/app/models/rails_trade/promotes/amount_promote.rb +0 -4
- data/app/models/rails_trade/promotes/number_promote.rb +0 -4
- data/app/models/rails_trade/provider.rb +0 -25
- data/app/models/rails_trade/refunds/bank_refund.rb +0 -5
- data/app/models/rails_trade/refunds/hand_refund.rb +0 -5
- data/app/models/rails_trade/serve.rb +0 -44
- data/app/models/rails_trade/serve_charge.rb +0 -37
- data/app/models/rails_trade/serve_charges/single_serve_charge.rb +0 -7
- data/app/models/rails_trade/serve_charges/total_serve_charge.rb +0 -7
- data/app/models/rails_trade/serve_good.rb +0 -9
- data/app/models/rails_trade/serves/number_serve.rb +0 -4
- data/app/models/rails_trade/serves/quantity_serve.rb +0 -4
- data/app/models/rails_trade/shipment.rb +0 -8
- data/app/views/layouts/rails_trade_admin/base.html.erb +0 -25
- data/app/views/layouts/rails_trade_my/base.html.erb +0 -28
- data/app/views/rails_trade_admin/addresses/_address.html.erb +0 -24
- data/app/views/rails_trade_admin/addresses/_edit.html.erb +0 -13
- data/app/views/rails_trade_admin/addresses/_form.html.erb +0 -23
- data/app/views/rails_trade_admin/addresses/_new.html.erb +0 -13
- data/app/views/rails_trade_admin/addresses/create.js.erb +0 -2
- data/app/views/rails_trade_admin/addresses/destroy.js.erb +0 -1
- data/app/views/rails_trade_admin/addresses/edit.js.erb +0 -39
- data/app/views/rails_trade_admin/addresses/index.html.erb +0 -41
- data/app/views/rails_trade_admin/addresses/new.js.erb +0 -52
- data/app/views/rails_trade_admin/addresses/show.html.erb +0 -4
- data/app/views/rails_trade_admin/addresses/update.js.erb +0 -2
- data/app/views/rails_trade_admin/areas/_form.html.erb +0 -9
- data/app/views/rails_trade_admin/areas/edit.html.erb +0 -16
- data/app/views/rails_trade_admin/areas/index.html.erb +0 -43
- data/app/views/rails_trade_admin/areas/new.html.erb +0 -11
- data/app/views/rails_trade_admin/areas/show.html.erb +0 -1
- data/app/views/rails_trade_admin/base/_nav.html.erb +0 -24
- data/app/views/rails_trade_admin/base/_nav_bar.html.erb +0 -23
- data/app/views/rails_trade_admin/base/_nav_payment.html.erb +0 -25
- data/app/views/rails_trade_admin/goods/_form.html.erb +0 -7
- data/app/views/rails_trade_admin/orders/_filter.html.erb +0 -20
- data/app/views/rails_trade_admin/orders/_form.html.erb +0 -17
- data/app/views/rails_trade_admin/orders/_search_form.html.erb +0 -7
- data/app/views/rails_trade_admin/orders/index.html.erb +0 -61
- data/app/views/rails_trade_admin/orders/show.html.erb +0 -89
- data/app/views/rails_trade_admin/payment_methods/create.js.erb +0 -2
- data/app/views/rails_trade_admin/payment_orders/_new.html.erb +0 -24
- data/app/views/rails_trade_admin/payments/_item.html.erb +0 -49
- data/app/views/rails_trade_admin/payments/_search_form.html.erb +0 -15
- data/app/views/rails_trade_admin/payments/edit.html.erb +0 -15
- data/app/views/rails_trade_admin/payments/index.html.erb +0 -60
- data/app/views/rails_trade_admin/payments/new.html.erb +0 -17
- data/app/views/rails_trade_admin/promote_buyers/_form.html.erb +0 -6
- data/app/views/rails_trade_admin/promote_buyers/index.html.erb +0 -42
- data/app/views/rails_trade_admin/promote_charges/_edit.html.erb +0 -13
- data/app/views/rails_trade_admin/promote_charges/_form.html.erb +0 -6
- data/app/views/rails_trade_admin/promote_charges/_new.html.erb +0 -13
- data/app/views/rails_trade_admin/promote_charges/_search_form.html.erb +0 -9
- data/app/views/rails_trade_admin/promote_charges/edit.js.erb +0 -8
- data/app/views/rails_trade_admin/promote_charges/index.html.erb +0 -49
- data/app/views/rails_trade_admin/promote_charges/new.js.erb +0 -8
- data/app/views/rails_trade_admin/promote_goods/_form.html.erb +0 -4
- data/app/views/rails_trade_admin/promote_goods/_promote_good.json.jbuilder +0 -2
- data/app/views/rails_trade_admin/promote_goods/edit.html.erb +0 -14
- data/app/views/rails_trade_admin/promote_goods/index.html.erb +0 -37
- data/app/views/rails_trade_admin/promote_goods/index.json.jbuilder +0 -1
- data/app/views/rails_trade_admin/promote_goods/new.html.erb +0 -13
- data/app/views/rails_trade_admin/promote_goods/show.json.jbuilder +0 -1
- data/app/views/rails_trade_admin/promotes/_form.html.erb +0 -9
- data/app/views/rails_trade_admin/promotes/edit.html.erb +0 -9
- data/app/views/rails_trade_admin/promotes/index.html.erb +0 -65
- data/app/views/rails_trade_admin/promotes/new.html.erb +0 -9
- data/app/views/rails_trade_admin/promotes/show.html.erb +0 -4
- data/app/views/rails_trade_admin/providers/_form.html.erb +0 -6
- data/app/views/rails_trade_admin/providers/_product.html.erb +0 -12
- data/app/views/rails_trade_admin/providers/_side.html.erb +0 -8
- data/app/views/rails_trade_admin/providers/area.html.erb +0 -1
- data/app/views/rails_trade_admin/providers/channel.html.erb +0 -46
- data/app/views/rails_trade_admin/providers/edit.html.erb +0 -16
- data/app/views/rails_trade_admin/providers/index.html.erb +0 -27
- data/app/views/rails_trade_admin/providers/new.html.erb +0 -21
- data/app/views/rails_trade_admin/providers/posts.html.erb +0 -41
- data/app/views/rails_trade_admin/providers/products.html.erb +0 -23
- data/app/views/rails_trade_admin/providers/show.html.erb +0 -60
- data/app/views/rails_trade_admin/refunds/_search_form.html.erb +0 -13
- data/app/views/rails_trade_admin/serve_charges/_edit.html.erb +0 -13
- data/app/views/rails_trade_admin/serve_charges/_form.html.erb +0 -10
- data/app/views/rails_trade_admin/serve_charges/_new.html.erb +0 -13
- data/app/views/rails_trade_admin/serve_charges/_search_form.html.erb +0 -10
- data/app/views/rails_trade_admin/serve_charges/edit.js.erb +0 -7
- data/app/views/rails_trade_admin/serve_charges/index.html.erb +0 -56
- data/app/views/rails_trade_admin/serve_charges/new.js.erb +0 -8
- data/app/views/rails_trade_admin/serves/_form.html.erb +0 -9
- data/app/views/rails_trade_admin/serves/edit.html.erb +0 -9
- data/app/views/rails_trade_admin/serves/index.html.erb +0 -80
- data/app/views/rails_trade_admin/serves/new.html.erb +0 -9
- data/app/views/rails_trade_my/addresses/_edit.html.erb +0 -31
- data/app/views/rails_trade_my/addresses/_form.html.erb +0 -23
- data/app/views/rails_trade_my/addresses/_new.html.erb +0 -11
- data/app/views/rails_trade_my/addresses/create.js.erb +0 -2
- data/app/views/rails_trade_my/addresses/edit.js.erb +0 -39
- data/app/views/rails_trade_my/addresses/index.html.erb +0 -44
- data/app/views/rails_trade_my/addresses/new.js.erb +0 -39
- data/app/views/rails_trade_my/addresses/show.html.erb +0 -4
- data/app/views/rails_trade_my/base/_nav.html.erb +0 -22
- data/app/views/rails_trade_my/buyers/_form.html.erb +0 -5
- data/app/views/rails_trade_my/buyers/edit.html.erb +0 -2
- data/app/views/rails_trade_my/buyers/show.html.erb +0 -21
- data/app/views/rails_trade_my/cart_items/_additions.html.erb +0 -22
- data/app/views/rails_trade_my/cart_items/_single_price.html.erb +0 -6
- data/app/views/rails_trade_my/cart_items/_total_price.html.erb +0 -8
- data/app/views/rails_trade_my/cart_items/index.html.erb +0 -69
- data/app/views/rails_trade_my/cart_items/total.js.erb +0 -11
- data/app/views/rails_trade_my/cart_items/update.js.erb +0 -8
- data/app/views/rails_trade_my/my/index.html.erb +0 -17
- data/app/views/rails_trade_my/orders/_edit_payment_type.html.erb +0 -13
- data/app/views/rails_trade_my/orders/edit_payment_type.js.erb +0 -6
- data/app/views/rails_trade_my/orders/index.html.erb +0 -55
- data/app/views/rails_trade_my/orders/update_payment_type.js.erb +0 -3
- data/app/views/rails_trade_my/orders/wxpay_pay.js.erb +0 -16
- data/app/views/rails_trade_my/orders/wxpay_pay_err.js.erb +0 -5
- data/app/views/rails_trade_my/payment_methods/destroy.js.erb +0 -1
- data/app/views/rails_trade_my/payment_methods/update.js.erb +0 -2
- data/app/views/rails_trade_my/providers/_form.html.erb +0 -5
- data/app/views/rails_trade_my/providers/_provider.html.erb +0 -20
- data/app/views/rails_trade_my/providers/edit.html.erb +0 -2
- data/app/views/rails_trade_my/providers/index.html.erb +0 -12
- data/app/views/rails_trade_my/providers/new.html.erb +0 -10
- data/app/views/rails_trade_my/providers/show.html.erb +0 -13
- data/config/locales/zh.yml +0 -75
- data/db/migrate/20150514135720_create_providers.rb +0 -59
- data/db/migrate/20170601014520_create_payments.rb +0 -52
- data/db/migrate/20170602061859_create_payment_references.rb +0 -12
- data/db/migrate/20170702234123_create_orders.rb +0 -56
- data/db/migrate/20170714080032_create_payment_strategies.rb +0 -77
- data/db/migrate/20171115063702_create_promote_buyers.rb +0 -31
- data/db/schema.rb +0 -94
- data/lib/tasks/the_trade_tasks.rake +0 -4
@@ -1,89 +0,0 @@
|
|
1
|
-
<div class="ui grid">
|
2
|
-
<div class="sixteen wide column">
|
3
|
-
<div class="ui breadcrumb">
|
4
|
-
<%= link_to '全部订单', admin_orders_path(user_id: @order.user_id), class: 'section' %>
|
5
|
-
<i class="right chevron icon divider"></i>
|
6
|
-
<%= link_to '编辑', edit_admin_order_path(@order), class: 'section' %>
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<table class="ui table">
|
10
|
-
<thead>
|
11
|
-
<tr>
|
12
|
-
<th>商品</th>
|
13
|
-
<th>数量</th>
|
14
|
-
<th></th>
|
15
|
-
<th>Pure Price</th>
|
16
|
-
<th>Serve Sum</th>
|
17
|
-
<th>Promote Sum</th>
|
18
|
-
<th></th>
|
19
|
-
</tr>
|
20
|
-
</thead>
|
21
|
-
<% @order.order_items.each do |order_item| %>
|
22
|
-
<tr>
|
23
|
-
<td>
|
24
|
-
<%= order_item.good.name %>
|
25
|
-
<span><%= order_item.good&.price %></span>
|
26
|
-
<%# link_to order_item.good&.name, controller: '/' + order_item.good_type.underscore.pluralize, action: 'show', id: order_item.good_id %>
|
27
|
-
</td>
|
28
|
-
<td><%= order_item.number %></td>
|
29
|
-
<td><%= link_to '订单流程', admin_order_item_path(order_item) %></td>
|
30
|
-
<td><%= order_item.pure_price %></td>
|
31
|
-
<td><%= order_item.serve_sum %></td>
|
32
|
-
<td><%= order_item.promote_sum %></td>
|
33
|
-
<td><%= order_item.amount %></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 colspan="3"></td>
|
39
|
-
<td><%= order_serve.amount %></td>
|
40
|
-
<td colspan="3"></td>
|
41
|
-
</tr>
|
42
|
-
<% end %>
|
43
|
-
<% order_item.order_promotes.each do |order_promote| %>
|
44
|
-
<tr class="warning">
|
45
|
-
<td><%= order_promote.promote.name %></td>
|
46
|
-
<td colspan="4"></td>
|
47
|
-
<td><span style="color: red;"><%= order_promote.amount %></span></td>
|
48
|
-
<td colspan="2"></td>
|
49
|
-
</tr>
|
50
|
-
<% end %>
|
51
|
-
<% end %>
|
52
|
-
<% @order.pure_order_serves.each do |order_serve| %>
|
53
|
-
<tr>
|
54
|
-
<td><%= order_serve.serve.name %></td>
|
55
|
-
<td colspan="5"></td>
|
56
|
-
<td><%= order_serve.amount %></td>
|
57
|
-
<td></td>
|
58
|
-
</tr>
|
59
|
-
<% end %>
|
60
|
-
<% @order.pure_order_promotes.each do |order_promote| %>
|
61
|
-
<tr>
|
62
|
-
<td><%= order_promote.promote.name %></td>
|
63
|
-
<td colspan="5"></td>
|
64
|
-
<td><%= order_promote.amount %></td>
|
65
|
-
<td></td>
|
66
|
-
</tr>
|
67
|
-
<% end %>
|
68
|
-
<tr class="active">
|
69
|
-
<td>总价</td>
|
70
|
-
<td colspan="5"></td>
|
71
|
-
<td>
|
72
|
-
<%= @order.amount %>
|
73
|
-
<%= link_to new_admin_order_order_payment_path(@order.id), remote: true, class: 'ui icon green button' do %>
|
74
|
-
<i class="payment icon"></i>
|
75
|
-
<% end %>
|
76
|
-
</td>
|
77
|
-
</tr>
|
78
|
-
</table>
|
79
|
-
</div>
|
80
|
-
|
81
|
-
</div>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
@@ -1,24 +0,0 @@
|
|
1
|
-
<tr id="add_payment_order">
|
2
|
-
<td colspan="11">
|
3
|
-
<table class="ui blue table">
|
4
|
-
<thead>
|
5
|
-
<tr>
|
6
|
-
<th>订单ID</th>
|
7
|
-
<th>UUID</th>
|
8
|
-
<th>水单</th>
|
9
|
-
<th>订单金额</th>
|
10
|
-
<th>核销金额</th>
|
11
|
-
<th>状态</th>
|
12
|
-
<th>操作</th>
|
13
|
-
</tr>
|
14
|
-
</thead>
|
15
|
-
|
16
|
-
<% unless @payment.all_checked? %>
|
17
|
-
<%= render partial: 'orders', collection: @orders, as: :order %>
|
18
|
-
<% end %>
|
19
|
-
|
20
|
-
<%= render partial: 'index', collection: @payment.payment_orders, as: :payment_order %>
|
21
|
-
</table>
|
22
|
-
</td>
|
23
|
-
</tr>
|
24
|
-
|
@@ -1,49 +0,0 @@
|
|
1
|
-
<tr id="payment_<%= payment.id %>">
|
2
|
-
<td>
|
3
|
-
<%= payment.payment_uuid %>
|
4
|
-
<span class="ui tiny orange label"><%= Payment.enum_i18n(:type, payment.type) %></span>
|
5
|
-
</td>
|
6
|
-
<td>
|
7
|
-
<%= payment.total_amount %>
|
8
|
-
</td>
|
9
|
-
<td id="checked_amount_<%= payment.id %>" class="warning">
|
10
|
-
<%= payment.checked_amount %>
|
11
|
-
<% if payment.part_checked? && payment.init_adjust_amount > -1 && payment.init_adjust_amount < 1 %>
|
12
|
-
<%= link_to t('.adjust'), adjust_admin_payment_path(payment), method: :patch, class: 'ui mini grey button' %>
|
13
|
-
<% elsif payment.init? || payment.part_checked? %>
|
14
|
-
<span class="ui tiny grey label"><%= Payment.enum_i18n(:state, payment.state) %></span>
|
15
|
-
<% elsif payment.all_checked? %>
|
16
|
-
<span class="ui tiny green label"><%= Payment.enum_i18n(:state, payment.state) %></span>
|
17
|
-
<% end %>
|
18
|
-
</td>
|
19
|
-
<td>
|
20
|
-
<% if payment.income_amount.present? || payment.fee_amount %>
|
21
|
-
<%= [payment.income_amount, payment.fee_amount].join(' + ') %>
|
22
|
-
<% end %>
|
23
|
-
</td>
|
24
|
-
<td><%= payment.adjust_amount %></td>
|
25
|
-
<td><%= payment.buyer_name %></td>
|
26
|
-
<td>
|
27
|
-
<%= payment.buyer_identifier %>
|
28
|
-
<% if payment.payment_method %>
|
29
|
-
<%= link_to 'Payment Method', admin_payment_methods_path(id: payment.payment_method_id), class: 'ui mini label', targe: '_blank' %>
|
30
|
-
<% end %>
|
31
|
-
</td>
|
32
|
-
<td><%= payment.buyer_bank %></td>
|
33
|
-
<td><time><%= payment.notified_at.to_s(:rfc822) if payment.notified_at %></time></td>
|
34
|
-
<td class="ui labels">
|
35
|
-
<% if payment.payment_method.present? %>
|
36
|
-
<%= link_to t('.show'), admin_payment_methods_path(id: payment.payment_method_id), class: 'ui mini blue label', target: '_blank' %>
|
37
|
-
<% else %>
|
38
|
-
<%= link_to t('.analyze'), analyze_admin_payment_path(payment), method: :patch, class: 'ui mini blue label', remote: true %>
|
39
|
-
<% end %>
|
40
|
-
<%= link_to t('.checking'), new_admin_payment_payment_order_path(payment), class: 'ui mini red label', remote: true %>
|
41
|
-
<%= link_to audits_path('Payment', payment.id), remote: true, class: 'ui mini icon blue label' do %>
|
42
|
-
<i class="comments icon"></i>
|
43
|
-
<% end %>
|
44
|
-
</td>
|
45
|
-
<td>
|
46
|
-
<%= link_to t('.edit'), edit_admin_payment_path(payment) %>
|
47
|
-
</td>
|
48
|
-
</tr>
|
49
|
-
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<%= search_form_with css: { submit: 'ui green button' } do |f| %>
|
2
|
-
<div class="fields">
|
3
|
-
<%= f.text_field :payment_uuid, placeholder: 'UUID', css: { wrapper_input: 'two wide field' } %>
|
4
|
-
<%= f.text_field :'buyer_name-like', placeholder: 'Account Name' %>
|
5
|
-
<%= f.text_field :buyer_identifier, placeholder: 'Account Num' %>
|
6
|
-
<%= f.text_field :buyer_bank, placeholder: 'Buyer Bank' %>
|
7
|
-
</div>
|
8
|
-
<div class="fields">
|
9
|
-
<%= f.text_field :'orders.uuid', placeholder: 'Order UUID' %>
|
10
|
-
<%= f.submit 'Search' %>
|
11
|
-
<%= link_to 'Clear All Filters', filter_params(only: []), class: 'ui white button' %>
|
12
|
-
</div>
|
13
|
-
<% end %>
|
14
|
-
|
15
|
-
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<div class="">
|
2
|
-
|
3
|
-
<div class="ui segment breadcrumb">
|
4
|
-
<%= link_to 'Back', admin_payments_path, class: 'section' %>
|
5
|
-
<div class="divider"> / </div>
|
6
|
-
<div class="active section">Edit</div>
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div class="ui segment">
|
10
|
-
<%= default_form_with model: @payment, scope: :payment, url: admin_payment_path(@payment), method: :patch, local: true do |f| %>
|
11
|
-
<%= render partial: 'form', locals: { f: f } %>
|
12
|
-
<% end %>
|
13
|
-
</div>
|
14
|
-
|
15
|
-
</div>
|
@@ -1,60 +0,0 @@
|
|
1
|
-
<div>
|
2
|
-
|
3
|
-
<div class="ui top attached menu borderless">
|
4
|
-
<div class="item"><strong>Payments List</strong></div>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<div class="ui segment bottom attached">
|
8
|
-
<%= render 'search_form' %>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
<div class="ui segment top attached">
|
12
|
-
<p>
|
13
|
-
<span>Type:</span>
|
14
|
-
<%= link_to 'All', filter_params(except: [:type]), class: active_params(type: '', active_class: 'ui basic blue button', item_class: 'ui basic white button') %>
|
15
|
-
<%= link_to 'Bank', filter_params(type: 'BankPayment'), class: active_params(type: 'BankPayment', active_class: 'ui basic blue button', item_class: 'ui basic white button') %>
|
16
|
-
<%= link_to 'Hand', filter_params(type: 'HandPayment'), class: active_params(type: 'HandPayment', active_class: 'ui basic blue button', item_class: 'ui basic white button') %>
|
17
|
-
<%= link_to 'Paypal', filter_params(type: 'PaypalPayment'), class: active_params(type: 'PaypalPayment', active_class: 'ui basic blue button', item_class: 'ui basic white button') %>
|
18
|
-
</p>
|
19
|
-
<p>
|
20
|
-
<span>State:</span>
|
21
|
-
<%= link_to 'All', filter_params(except: [:state]), class: active_params(state: '', active_class: 'ui basic blue button', item_class: 'ui basic white button') %>
|
22
|
-
<%= link_to '未核销', filter_params(state: 'init'), class: active_params(state: 'init', active_class: 'ui basic blue button', item_class: 'ui basic white button') %>
|
23
|
-
<%= link_to '部分核销', filter_params(state: 'part_checked'), class: active_params(state: 'part_checked', active_class: 'ui basic blue button', item_class: 'ui basic white button') %>
|
24
|
-
<%= link_to '全部核销', filter_params(state: 'all_checked'), class: active_params(state: 'all_checked', active_class: 'ui basic blue button', item_class: 'ui basic white button') %>
|
25
|
-
</p>
|
26
|
-
<p>
|
27
|
-
<span>State:</span>
|
28
|
-
<%= link_to 'All', filter_params(except: [:'payment_orders.state']), class: active_params('payment_orders.state': '', active_class: 'ui basic blue button', item_class: 'ui basic white button') %>
|
29
|
-
<%= link_to t('init'), filter_params('payment_orders.state': 'init'), class: active_params('payment_orders.state': 'init', active_class: 'ui basic blue button', item_class: 'ui basic white button') %>
|
30
|
-
<%= link_to t('confirmed'), filter_params('payment_orders.state': 'confirmed'), class: active_params('payment_orders.state': 'confirmed', active_class: 'ui basic blue button', item_class: 'ui basic white button') %>
|
31
|
-
</p>
|
32
|
-
<p>
|
33
|
-
<%= link_to t('.add_new'), new_admin_payment_path, class: 'ui teal button' %>
|
34
|
-
<%= link_to t('.import'), import_data_list_table_lists_path('PaymentImport'), class: 'ui blue button', remote: true %>
|
35
|
-
</p>
|
36
|
-
</div>
|
37
|
-
|
38
|
-
<table class="ui bottom attached table">
|
39
|
-
<thead>
|
40
|
-
<tr>
|
41
|
-
<th><%= Payment.human_attribute_name(:uuid) %></th>
|
42
|
-
<th><%= Payment.human_attribute_name(:total_amount) %></th>
|
43
|
-
<th>已核销</th>
|
44
|
-
<th><%= Payment.human_attribute_name(:income_amount) %> + <%= Payment.human_attribute_name(:fee_amount) %></th>
|
45
|
-
<th><%= Payment.human_attribute_name(:adjust_amount) %></th>
|
46
|
-
<th><%= Payment.human_attribute_name(:buyer_name) %></th>
|
47
|
-
<th><%= Payment.human_attribute_name(:buyer_identifier) %></th>
|
48
|
-
<th><%= Payment.human_attribute_name(:buyer_bank) %></th>
|
49
|
-
<th><%= Payment.human_attribute_name(:notified_at) %></th>
|
50
|
-
<th colspan="2"></th>
|
51
|
-
</tr>
|
52
|
-
</thead>
|
53
|
-
|
54
|
-
<tbody>
|
55
|
-
<%= render partial: 'item', collection: @payments, as: :payment %>
|
56
|
-
</tbody>
|
57
|
-
</table>
|
58
|
-
|
59
|
-
<%= paginate @payments %>
|
60
|
-
</div>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
<div class="">
|
2
|
-
|
3
|
-
<div class="ui segment breadcrumb">
|
4
|
-
<%= link_to 'Back', admin_payments_path, class: 'section' %>
|
5
|
-
<div class="divider"> / </div>
|
6
|
-
<div class="active section">Add New</div>
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div class="ui segment">
|
10
|
-
|
11
|
-
<%= form_with model: @payment, url: admin_payments_path, local: true do |f| %>
|
12
|
-
<%= render partial: 'form', locals: { f: f } %>
|
13
|
-
<% end %>
|
14
|
-
|
15
|
-
</div>
|
16
|
-
|
17
|
-
</div>
|
@@ -1,6 +0,0 @@
|
|
1
|
-
<%= form_with model: [:admin, @promote_buyer], local: true do |f| %>
|
2
|
-
<%= render '/shared/error_messages', target: @promote_buyer %>
|
3
|
-
<%= f.select :buyer_id, options_for_select([[@promote_buyer.buyer&.name, @promote_buyer.buyer_id]], @promote_buyer.buyer_id), {}, { class: 'ui fluid dropdown search selection' } %>
|
4
|
-
<%= f.select :promote_id, options_for_select([[@promote_buyer.promote&.name, @promote_buyer.promote_id]], @promote_buyer.promote_id), {}, { class: 'ui fluid dropdown search selection' } %>
|
5
|
-
<%= f.submit %>
|
6
|
-
<% end %>
|
@@ -1,42 +0,0 @@
|
|
1
|
-
<div>
|
2
|
-
|
3
|
-
<div class="ui top attached menu borderless">
|
4
|
-
<div class="item"><strong>Promote Buyers</strong></div>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<div class="ui segment bottom attached">
|
8
|
-
<%# render 'search_form' %>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
<div class="ui segment top attached">
|
12
|
-
<%= link_to 'New Promote Buyer', new_admin_promote_buyer_path(request.GET), class: 'ui teal button' %>
|
13
|
-
</div>
|
14
|
-
|
15
|
-
<table class="ui bottom attached table">
|
16
|
-
<thead>
|
17
|
-
<tr>
|
18
|
-
<th>ID</th>
|
19
|
-
<th>Buyer</th>
|
20
|
-
<th>Promote</th>
|
21
|
-
<th>Actions</th>
|
22
|
-
</tr>
|
23
|
-
</thead>
|
24
|
-
|
25
|
-
<tbody>
|
26
|
-
<% @promote_buyers.each do |promote_buyer| %>
|
27
|
-
<tr>
|
28
|
-
<td><%= promote_buyer.id %></td>
|
29
|
-
<td><%= promote_buyer.buyer.name %></td>
|
30
|
-
<td><%= promote_buyer.promote.name %></td>
|
31
|
-
<td>
|
32
|
-
<%= link_to 'Destroy', admin_promote_buyer_path(promote_buyer), method: :delete, data: { confirm: 'Are you sure?' }, class: 'ui red label' %>
|
33
|
-
</td>
|
34
|
-
</tr>
|
35
|
-
<% end %>
|
36
|
-
</tbody>
|
37
|
-
</table>
|
38
|
-
|
39
|
-
<%= paginate @promote_buyers %>
|
40
|
-
</div>
|
41
|
-
|
42
|
-
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<div class="ui modal" id="charge_edit_modal">
|
2
|
-
<i class="close icon"></i>
|
3
|
-
<div class="ui header blue">
|
4
|
-
Edit Charge
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<div class="content">
|
8
|
-
<%= default_form_with model: @charge, scope: :charge, url: admin_promote_charge_path(@promote, @charge), method: :patch do |f| %>
|
9
|
-
<%= render partial: 'form', locals: { f: f } %>
|
10
|
-
<% end %>
|
11
|
-
</div>
|
12
|
-
|
13
|
-
</div>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<div class="ui modal" id="charge_new_modal">
|
2
|
-
<i class="close icon"></i>
|
3
|
-
<div class="ui header blue">
|
4
|
-
Add New Charge
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<div class="content">
|
8
|
-
<%= default_form_with model: @charge, scope: :charge, url: admin_promote_charges_path(@promote) do |f| %>
|
9
|
-
<%= render partial: 'form', locals: { f: f } %>
|
10
|
-
<% end %>
|
11
|
-
</div>
|
12
|
-
|
13
|
-
</div>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<%= search_form_with css: { wrapper_all: 'inline field', wrapper_input: 'field', wrapper_submit: 'field', submit: 'ui green button'} do |f| %>
|
2
|
-
<div class="fields">
|
3
|
-
<%= f.text_field :buyer_name, placeholder: 'Account Name' %>
|
4
|
-
<%= f.text_field :buyer_identifier, placeholder: 'Account Num' %>
|
5
|
-
<%= f.text_field :buyer_bank, placeholder: 'Buyer Bank' %>
|
6
|
-
<%= f.submit 'Search' %>
|
7
|
-
</div>
|
8
|
-
<% end %>
|
9
|
-
|
@@ -1,49 +0,0 @@
|
|
1
|
-
<div>
|
2
|
-
<div class="ui segment breadcrumb">
|
3
|
-
<%= link_to 'back', admin_promotes_path, class: 'section' %>
|
4
|
-
<i class="right angle icon divider"></i>
|
5
|
-
<div class="section">Charge List</div>
|
6
|
-
</div>
|
7
|
-
<div class="ui blue segment">
|
8
|
-
<%= render 'search_form' %>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
<div class="ui blue segment">
|
12
|
-
<%= link_to new_admin_promote_charge_path(@promote), remote: true, class: 'ui blue button' do %>
|
13
|
-
<i class="add circle icon"></i>Add New Charge
|
14
|
-
<% end %>
|
15
|
-
<table class="ui celled table">
|
16
|
-
<thead>
|
17
|
-
<tr>
|
18
|
-
<th class="center aligned">Min</th>
|
19
|
-
<th class="center aligned">Max</th>
|
20
|
-
<th class="center aligned">Price(RMB)</th>
|
21
|
-
<th class="center aligned">Type</th>
|
22
|
-
<th class="center aligned">Action</th>
|
23
|
-
</tr>
|
24
|
-
</thead>
|
25
|
-
<tbody>
|
26
|
-
<% @charges.each do |charge| %>
|
27
|
-
<tr>
|
28
|
-
<td class="center aligned"><%= charge.min %></td>
|
29
|
-
<td class="center aligned"><%= charge.max %></td>
|
30
|
-
<td class="center aligned"><%= charge.price %></td>
|
31
|
-
<td class="center aligned"><%= charge.type %></td>
|
32
|
-
<td class="center aligned">
|
33
|
-
<%= link_to edit_admin_promote_charge_path(@promote, charge), class: 'ui icon green button', 'data-content' => 'Edit Charge', 'data-variation' => 'inverted', remote: true do %>
|
34
|
-
<i class="edit white icon"></i>
|
35
|
-
<% end %>
|
36
|
-
<%= link_to admin_promote_charge_path(@promote, charge), method: :delete, class: 'ui icon red button floated', 'data-content': 'Delete', 'data-variation': 'inverted', data: { confirm: 'Are you sure?' } do %>
|
37
|
-
<i class="center aligned remove white icon"></i>
|
38
|
-
<% end %>
|
39
|
-
</td>
|
40
|
-
</tr>
|
41
|
-
<% end %>
|
42
|
-
</tbody>
|
43
|
-
</table>
|
44
|
-
<%= paginate @charges %>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
|
48
|
-
|
49
|
-
|