rails_trade 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +165 -0
- data/README.md +47 -0
- data/Rakefile +37 -0
- data/app/assets/config/rails_trade_manifest.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/buyers/index.js +15 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/buyers/overdue.js +15 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/cart_items/create.js +3 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/cart_items/index.js +80 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/cart_items/only.js +45 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/orders/new.js +29 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/payment_methods/edit.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/payment_methods/index.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/payment_methods/new.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/payment_methods/unverified.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/payments/index.js +0 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/payments/new.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/promote_buyers/edit.js +31 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/promote_buyers/new.js +31 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/promote_goods/index.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/promotes/edit.js +2 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/promotes/index.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/promotes/new.js +2 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/serves/edit.js +2 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/serves/index.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/serves/new.js +4 -0
- data/app/assets/javascripts/controllers/rails_trade_my/cart_items/create.js +3 -0
- data/app/assets/javascripts/controllers/rails_trade_my/cart_items/index.js +65 -0
- data/app/controllers/areas_controller.rb +18 -0
- data/app/controllers/buyers_controller.rb +8 -0
- data/app/controllers/concerns/controller_order_types.rb +92 -0
- data/app/controllers/goods_controller.rb +90 -0
- data/app/controllers/payments_controller.rb +50 -0
- data/app/controllers/providers_controller.rb +8 -0
- data/app/controllers/the_trade_admin/addresses_controller.rb +75 -0
- data/app/controllers/the_trade_admin/areas_controller.rb +50 -0
- data/app/controllers/the_trade_admin/base_controller.rb +5 -0
- data/app/controllers/the_trade_admin/buyers_controller.rb +37 -0
- data/app/controllers/the_trade_admin/cart_item_serves_controller.rb +63 -0
- data/app/controllers/the_trade_admin/cart_items_controller.rb +123 -0
- data/app/controllers/the_trade_admin/order_payments_controller.rb +52 -0
- data/app/controllers/the_trade_admin/orders_controller.rb +103 -0
- data/app/controllers/the_trade_admin/payment_methods_controller.rb +111 -0
- data/app/controllers/the_trade_admin/payment_orders_controller.rb +56 -0
- data/app/controllers/the_trade_admin/payment_references_controller.rb +54 -0
- data/app/controllers/the_trade_admin/payment_strategies_controller.rb +50 -0
- data/app/controllers/the_trade_admin/payments_controller.rb +89 -0
- data/app/controllers/the_trade_admin/produces_controller.rb +66 -0
- data/app/controllers/the_trade_admin/promote_buyers_controller.rb +39 -0
- data/app/controllers/the_trade_admin/promote_charges_controller.rb +62 -0
- data/app/controllers/the_trade_admin/promote_goods_controller.rb +50 -0
- data/app/controllers/the_trade_admin/promotes_controller.rb +105 -0
- data/app/controllers/the_trade_admin/providers_controller.rb +121 -0
- data/app/controllers/the_trade_admin/refunds_controller.rb +60 -0
- data/app/controllers/the_trade_admin/serve_charges_controller.rb +67 -0
- data/app/controllers/the_trade_admin/serves_controller.rb +107 -0
- data/app/controllers/the_trade_my/addresses_controller.rb +50 -0
- data/app/controllers/the_trade_my/base_controller.rb +13 -0
- data/app/controllers/the_trade_my/buyers_controller.rb +35 -0
- data/app/controllers/the_trade_my/cart_items_controller.rb +71 -0
- data/app/controllers/the_trade_my/order_items_controller.rb +49 -0
- data/app/controllers/the_trade_my/orders_controller.rb +161 -0
- data/app/controllers/the_trade_my/payment_methods_controller.rb +76 -0
- data/app/controllers/the_trade_my/providers_controller.rb +44 -0
- data/app/models/rails_trade/address.rb +14 -0
- data/app/models/rails_trade/area.rb +65 -0
- data/app/models/rails_trade/cart_item.rb +185 -0
- data/app/models/rails_trade/cart_item_serve.rb +16 -0
- data/app/models/rails_trade/concerns/good_able.rb +63 -0
- data/app/models/rails_trade/concerns/order_able.rb +48 -0
- data/app/models/rails_trade/concerns/promote_fee.rb +54 -0
- data/app/models/rails_trade/concerns/serve_fee.rb +41 -0
- data/app/models/rails_trade/concerns/summary_service.rb +67 -0
- data/app/models/rails_trade/concerns/the_payment.rb +88 -0
- data/app/models/rails_trade/concerns/the_refund.rb +36 -0
- data/app/models/rails_trade/concerns/the_trade_buyer.rb +50 -0
- data/app/models/rails_trade/concerns/the_trade_user.rb +23 -0
- data/app/models/rails_trade/good_partner.rb +8 -0
- data/app/models/rails_trade/good_produce.rb +14 -0
- data/app/models/rails_trade/order.rb +111 -0
- data/app/models/rails_trade/order_item.rb +88 -0
- data/app/models/rails_trade/order_promote.rb +23 -0
- data/app/models/rails_trade/order_serve.rb +23 -0
- data/app/models/rails_trade/order_shipment.rb +10 -0
- data/app/models/rails_trade/payment.rb +135 -0
- data/app/models/rails_trade/payment_interface/payment_interface_base.rb +8 -0
- data/app/models/rails_trade/payment_interface/the_alipay.rb +49 -0
- data/app/models/rails_trade/payment_interface/the_paypal.rb +103 -0
- data/app/models/rails_trade/payment_interface/the_stripe.rb +73 -0
- data/app/models/rails_trade/payment_interface/the_wxpay.rb +56 -0
- data/app/models/rails_trade/payment_method.rb +57 -0
- data/app/models/rails_trade/payment_methods/alipay_method.rb +7 -0
- data/app/models/rails_trade/payment_methods/bank_method.rb +7 -0
- data/app/models/rails_trade/payment_methods/stripe_method.rb +57 -0
- data/app/models/rails_trade/payment_order.rb +75 -0
- data/app/models/rails_trade/payment_reference.rb +15 -0
- data/app/models/rails_trade/payment_strategy.rb +16 -0
- data/app/models/rails_trade/payments/alipay_payment.rb +12 -0
- data/app/models/rails_trade/payments/bank_payment.rb +15 -0
- data/app/models/rails_trade/payments/hand_payment.rb +13 -0
- data/app/models/rails_trade/payments/paypal_payment.rb +8 -0
- data/app/models/rails_trade/payments/stripe_payment.rb +7 -0
- data/app/models/rails_trade/payments/wxpay_payment.rb +14 -0
- data/app/models/rails_trade/produce.rb +18 -0
- data/app/models/rails_trade/promote.rb +40 -0
- data/app/models/rails_trade/promote_buyer.rb +9 -0
- data/app/models/rails_trade/promote_charge.rb +17 -0
- data/app/models/rails_trade/promote_charges/single_promote_charge.rb +7 -0
- data/app/models/rails_trade/promote_charges/total_promote_charge.rb +7 -0
- data/app/models/rails_trade/promote_good.rb +9 -0
- data/app/models/rails_trade/promotes/amount_promote.rb +4 -0
- data/app/models/rails_trade/promotes/number_promote.rb +4 -0
- data/app/models/rails_trade/provider.rb +25 -0
- data/app/models/rails_trade/refund.rb +63 -0
- data/app/models/rails_trade/refunds/alipay_refund.rb +33 -0
- data/app/models/rails_trade/refunds/bank_refund.rb +5 -0
- data/app/models/rails_trade/refunds/hand_refund.rb +5 -0
- data/app/models/rails_trade/refunds/paypal_refund.rb +32 -0
- data/app/models/rails_trade/refunds/stripe_refund.rb +26 -0
- data/app/models/rails_trade/refunds/wxpay_refund.rb +40 -0
- data/app/models/rails_trade/serve.rb +44 -0
- data/app/models/rails_trade/serve_charge.rb +37 -0
- data/app/models/rails_trade/serve_charges/single_serve_charge.rb +7 -0
- data/app/models/rails_trade/serve_charges/total_serve_charge.rb +7 -0
- data/app/models/rails_trade/serve_good.rb +9 -0
- data/app/models/rails_trade/serves/number_serve.rb +4 -0
- data/app/models/rails_trade/serves/quantity_serve.rb +4 -0
- data/app/models/rails_trade/shipment.rb +8 -0
- data/app/views/buyers/_show.html.erb +7 -0
- data/app/views/buyers/show.js.erb +1 -0
- data/app/views/goods/_choose.html.erb +36 -0
- data/app/views/goods/_good.html.erb +17 -0
- data/app/views/goods/_good_item.html.erb +17 -0
- data/app/views/goods/_nav.html.erb +18 -0
- data/app/views/goods/_search.html.erb +6 -0
- data/app/views/goods/index.html.erb +34 -0
- data/app/views/goods/index/_product.html.erb +14 -0
- data/app/views/goods/item.html.erb +47 -0
- data/app/views/goods/produce.html.erb +48 -0
- data/app/views/goods/show.html.erb +2 -0
- data/app/views/goods/show/_basic.html.erb +23 -0
- data/app/views/goods/show/_carousel.html.erb +35 -0
- data/app/views/goods/show/_items.html.erb +32 -0
- data/app/views/goods/show/_sales.html.erb +17 -0
- data/app/views/goods/show/_side.html.erb +19 -0
- data/app/views/goods/taxon/_breadcrumb.html.erb +8 -0
- data/app/views/goods/taxon/_nav.html.erb +19 -0
- data/app/views/goods/taxon/_nav_.html.erb +18 -0
- data/app/views/goods/taxon/_nav_last.html.erb +19 -0
- data/app/views/layouts/rails_trade_admin/base.html.erb +25 -0
- data/app/views/layouts/rails_trade_my/base.html.erb +28 -0
- data/app/views/rails_trade_admin/addresses/_address.html.erb +24 -0
- data/app/views/rails_trade_admin/addresses/_edit.html.erb +13 -0
- data/app/views/rails_trade_admin/addresses/_form.html.erb +23 -0
- data/app/views/rails_trade_admin/addresses/_new.html.erb +13 -0
- data/app/views/rails_trade_admin/addresses/create.js.erb +2 -0
- data/app/views/rails_trade_admin/addresses/destroy.js.erb +1 -0
- data/app/views/rails_trade_admin/addresses/edit.js.erb +39 -0
- data/app/views/rails_trade_admin/addresses/index.html.erb +41 -0
- data/app/views/rails_trade_admin/addresses/new.js.erb +52 -0
- data/app/views/rails_trade_admin/addresses/show.html.erb +4 -0
- data/app/views/rails_trade_admin/addresses/update.js.erb +2 -0
- data/app/views/rails_trade_admin/areas/_form.html.erb +9 -0
- data/app/views/rails_trade_admin/areas/edit.html.erb +16 -0
- data/app/views/rails_trade_admin/areas/index.html.erb +43 -0
- data/app/views/rails_trade_admin/areas/new.html.erb +11 -0
- data/app/views/rails_trade_admin/areas/show.html.erb +1 -0
- data/app/views/rails_trade_admin/base/_nav.html.erb +24 -0
- data/app/views/rails_trade_admin/base/_nav_bar.html.erb +23 -0
- data/app/views/rails_trade_admin/base/_nav_payment.html.erb +25 -0
- data/app/views/rails_trade_admin/buyers/_form.html.erb +17 -0
- data/app/views/rails_trade_admin/buyers/_menu.html.erb +5 -0
- data/app/views/rails_trade_admin/buyers/_search_form.html.erb +11 -0
- data/app/views/rails_trade_admin/buyers/edit.html.erb +6 -0
- data/app/views/rails_trade_admin/buyers/index.html.erb +46 -0
- data/app/views/rails_trade_admin/buyers/new.html.erb +5 -0
- data/app/views/rails_trade_admin/buyers/orders.html.erb +134 -0
- data/app/views/rails_trade_admin/buyers/overdue.html.erb +49 -0
- data/app/views/rails_trade_admin/buyers/show.html.erb +4 -0
- data/app/views/rails_trade_admin/cart_item_serves/_check.html.erb +12 -0
- data/app/views/rails_trade_admin/cart_item_serves/_index.html.erb +37 -0
- data/app/views/rails_trade_admin/cart_item_serves/_new.html.erb +14 -0
- data/app/views/rails_trade_admin/cart_item_serves/_serve.html.erb +16 -0
- data/app/views/rails_trade_admin/cart_item_serves/_single.html.erb +10 -0
- data/app/views/rails_trade_admin/cart_item_serves/_single_table.html.erb +29 -0
- data/app/views/rails_trade_admin/cart_item_serves/_total.html.erb +10 -0
- data/app/views/rails_trade_admin/cart_item_serves/_total_table.html.erb +26 -0
- data/app/views/rails_trade_admin/cart_item_serves/add.js.erb +47 -0
- data/app/views/rails_trade_admin/cart_item_serves/create.js.erb +3 -0
- data/app/views/rails_trade_admin/cart_item_serves/destroy.js.erb +50 -0
- data/app/views/rails_trade_admin/cart_item_serves/index.js.erb +50 -0
- data/app/views/rails_trade_admin/cart_item_serves/new.js.erb +5 -0
- data/app/views/rails_trade_admin/cart_item_serves/single.js.erb +55 -0
- data/app/views/rails_trade_admin/cart_item_serves/total.js.erb +55 -0
- data/app/views/rails_trade_admin/cart_items/_additions.html.erb +20 -0
- data/app/views/rails_trade_admin/cart_items/_filter.html.erb +15 -0
- data/app/views/rails_trade_admin/cart_items/_good_price.html.erb +10 -0
- data/app/views/rails_trade_admin/cart_items/_order_price.html.erb +27 -0
- data/app/views/rails_trade_admin/cart_items/_retail_price.html.erb +4 -0
- data/app/views/rails_trade_admin/cart_items/_single_price.html.erb +28 -0
- data/app/views/rails_trade_admin/cart_items/_total_price.html.erb +9 -0
- data/app/views/rails_trade_admin/cart_items/destroy.js.erb +1 -0
- data/app/views/rails_trade_admin/cart_items/error.html.erb +3 -0
- data/app/views/rails_trade_admin/cart_items/index.html.erb +104 -0
- data/app/views/rails_trade_admin/cart_items/only.html.erb +72 -0
- data/app/views/rails_trade_admin/cart_items/total.js.erb +11 -0
- data/app/views/rails_trade_admin/cart_items/update.js.erb +11 -0
- data/app/views/rails_trade_admin/goods/_form.html.erb +7 -0
- data/app/views/rails_trade_admin/goods/_item.html.erb +6 -0
- data/app/views/rails_trade_admin/goods/_new.html.erb +11 -0
- data/app/views/rails_trade_admin/goods/_show.html.erb +24 -0
- data/app/views/rails_trade_admin/goods/_show_tr.html.erb +24 -0
- data/app/views/rails_trade_admin/goods/create.js.erb +2 -0
- data/app/views/rails_trade_admin/goods/destroy.js.erb +1 -0
- data/app/views/rails_trade_admin/goods/edit.html.erb +16 -0
- data/app/views/rails_trade_admin/goods/edit.js.erb +8 -0
- data/app/views/rails_trade_admin/goods/edit_items.html.erb +43 -0
- data/app/views/rails_trade_admin/goods/edit_pic.html.erb +32 -0
- data/app/views/rails_trade_admin/goods/edit_promote.html.erb +64 -0
- data/app/views/rails_trade_admin/goods/index.html.erb +32 -0
- data/app/views/rails_trade_admin/goods/new.html.erb +14 -0
- data/app/views/rails_trade_admin/goods/new.js.erb +8 -0
- data/app/views/rails_trade_admin/goods/show.js.erb +5 -0
- data/app/views/rails_trade_admin/goods/update.js.erb +2 -0
- data/app/views/rails_trade_admin/order_payments/_index.html.erb +44 -0
- data/app/views/rails_trade_admin/order_payments/_new.html.erb +44 -0
- data/app/views/rails_trade_admin/order_payments/_payment_orders.html.erb +17 -0
- data/app/views/rails_trade_admin/order_payments/_payments.html.erb +19 -0
- data/app/views/rails_trade_admin/order_payments/create.js.erb +2 -0
- data/app/views/rails_trade_admin/order_payments/create_fail.js.erb +1 -0
- data/app/views/rails_trade_admin/order_payments/destroy.js.erb +2 -0
- data/app/views/rails_trade_admin/order_payments/index.js.erb +8 -0
- data/app/views/rails_trade_admin/order_payments/new.js.erb +8 -0
- data/app/views/rails_trade_admin/orders/_addresses.html.erb +36 -0
- data/app/views/rails_trade_admin/orders/_filter.html.erb +20 -0
- data/app/views/rails_trade_admin/orders/_form.html.erb +17 -0
- data/app/views/rails_trade_admin/orders/_invoice_addresses.html.erb +36 -0
- data/app/views/rails_trade_admin/orders/_item.html.erb +10 -0
- data/app/views/rails_trade_admin/orders/_new_items.html.erb +70 -0
- data/app/views/rails_trade_admin/orders/_search_form.html.erb +7 -0
- data/app/views/rails_trade_admin/orders/edit.html.erb +1 -0
- data/app/views/rails_trade_admin/orders/index.html.erb +61 -0
- data/app/views/rails_trade_admin/orders/new.html.erb +23 -0
- data/app/views/rails_trade_admin/orders/payments.html.erb +50 -0
- data/app/views/rails_trade_admin/orders/refresh.js.erb +7 -0
- data/app/views/rails_trade_admin/orders/show.html.erb +89 -0
- data/app/views/rails_trade_admin/payment_methods/_edit.html.erb +6 -0
- data/app/views/rails_trade_admin/payment_methods/_form.html.erb +5 -0
- data/app/views/rails_trade_admin/payment_methods/_index_layout.html.erb +15 -0
- data/app/views/rails_trade_admin/payment_methods/_new.html.erb +13 -0
- data/app/views/rails_trade_admin/payment_methods/_payment_method.html.erb +25 -0
- data/app/views/rails_trade_admin/payment_methods/_search_form.html.erb +22 -0
- data/app/views/rails_trade_admin/payment_methods/create.js.erb +2 -0
- data/app/views/rails_trade_admin/payment_methods/destroy.js.erb +1 -0
- data/app/views/rails_trade_admin/payment_methods/edit.html.erb +15 -0
- data/app/views/rails_trade_admin/payment_methods/edit.js.erb +8 -0
- data/app/views/rails_trade_admin/payment_methods/index.html.erb +23 -0
- data/app/views/rails_trade_admin/payment_methods/mine.html.erb +23 -0
- data/app/views/rails_trade_admin/payment_methods/new.html.erb +15 -0
- data/app/views/rails_trade_admin/payment_methods/new.js.erb +7 -0
- data/app/views/rails_trade_admin/payment_methods/unverified.html.erb +60 -0
- data/app/views/rails_trade_admin/payment_methods/update.js.erb +2 -0
- data/app/views/rails_trade_admin/payment_orders/_index.html.erb +31 -0
- data/app/views/rails_trade_admin/payment_orders/_new.html.erb +24 -0
- data/app/views/rails_trade_admin/payment_orders/_orders.html.erb +27 -0
- data/app/views/rails_trade_admin/payment_orders/cancel.js.erb +2 -0
- data/app/views/rails_trade_admin/payment_orders/create.js.erb +2 -0
- data/app/views/rails_trade_admin/payment_orders/create_fail.js.erb +1 -0
- data/app/views/rails_trade_admin/payment_orders/new.js.erb +6 -0
- data/app/views/rails_trade_admin/payment_orders/raise_fail.js.erb +1 -0
- data/app/views/rails_trade_admin/payment_orders/update.js.erb +2 -0
- data/app/views/rails_trade_admin/payment_orders/update_fail.js.erb +2 -0
- data/app/views/rails_trade_admin/payment_references/_form.html.erb +20 -0
- data/app/views/rails_trade_admin/payment_references/_new.html.erb +11 -0
- data/app/views/rails_trade_admin/payment_references/destroy.js.erb +1 -0
- data/app/views/rails_trade_admin/payment_references/edit.html.erb +6 -0
- data/app/views/rails_trade_admin/payment_references/index.html.erb +25 -0
- data/app/views/rails_trade_admin/payment_references/new.js.erb +8 -0
- data/app/views/rails_trade_admin/payment_references/show.html.erb +4 -0
- data/app/views/rails_trade_admin/payment_strategies/_form.html.erb +5 -0
- data/app/views/rails_trade_admin/payment_strategies/edit.html.erb +13 -0
- data/app/views/rails_trade_admin/payment_strategies/index.html.erb +37 -0
- data/app/views/rails_trade_admin/payment_strategies/new.html.erb +13 -0
- data/app/views/rails_trade_admin/payments/_form.html.erb +12 -0
- data/app/views/rails_trade_admin/payments/_item.html.erb +49 -0
- data/app/views/rails_trade_admin/payments/_search_form.html.erb +15 -0
- data/app/views/rails_trade_admin/payments/analyze.js.erb +12 -0
- data/app/views/rails_trade_admin/payments/dashboard.html.erb +4 -0
- data/app/views/rails_trade_admin/payments/edit.html.erb +15 -0
- data/app/views/rails_trade_admin/payments/index.html.erb +60 -0
- data/app/views/rails_trade_admin/payments/new.html.erb +17 -0
- data/app/views/rails_trade_admin/payments/show.html.erb +4 -0
- data/app/views/rails_trade_admin/promote_buyers/_form.html.erb +6 -0
- data/app/views/rails_trade_admin/promote_buyers/_promote_buyer.json.jbuilder +2 -0
- data/app/views/rails_trade_admin/promote_buyers/edit.html.erb +14 -0
- data/app/views/rails_trade_admin/promote_buyers/index.html.erb +42 -0
- data/app/views/rails_trade_admin/promote_buyers/index.json.jbuilder +1 -0
- data/app/views/rails_trade_admin/promote_buyers/new.html.erb +13 -0
- data/app/views/rails_trade_admin/promote_buyers/show.html.erb +0 -0
- data/app/views/rails_trade_admin/promote_buyers/show.json.jbuilder +1 -0
- data/app/views/rails_trade_admin/promote_charges/_edit.html.erb +13 -0
- data/app/views/rails_trade_admin/promote_charges/_form.html.erb +6 -0
- data/app/views/rails_trade_admin/promote_charges/_new.html.erb +13 -0
- data/app/views/rails_trade_admin/promote_charges/_search_form.html.erb +9 -0
- data/app/views/rails_trade_admin/promote_charges/edit.js.erb +8 -0
- data/app/views/rails_trade_admin/promote_charges/index.html.erb +49 -0
- data/app/views/rails_trade_admin/promote_charges/new.js.erb +8 -0
- data/app/views/rails_trade_admin/promote_goods/_form.html.erb +4 -0
- data/app/views/rails_trade_admin/promote_goods/_promote_good.json.jbuilder +2 -0
- data/app/views/rails_trade_admin/promote_goods/edit.html.erb +14 -0
- data/app/views/rails_trade_admin/promote_goods/index.html.erb +37 -0
- data/app/views/rails_trade_admin/promote_goods/index.json.jbuilder +1 -0
- data/app/views/rails_trade_admin/promote_goods/new.html.erb +13 -0
- data/app/views/rails_trade_admin/promote_goods/show.html.erb +0 -0
- data/app/views/rails_trade_admin/promote_goods/show.json.jbuilder +1 -0
- data/app/views/rails_trade_admin/promotes/_form.html.erb +9 -0
- data/app/views/rails_trade_admin/promotes/edit.html.erb +9 -0
- data/app/views/rails_trade_admin/promotes/index.html.erb +65 -0
- data/app/views/rails_trade_admin/promotes/new.html.erb +9 -0
- data/app/views/rails_trade_admin/promotes/show.html.erb +4 -0
- data/app/views/rails_trade_admin/providers/_form.html.erb +6 -0
- data/app/views/rails_trade_admin/providers/_product.html.erb +12 -0
- data/app/views/rails_trade_admin/providers/_side.html.erb +8 -0
- data/app/views/rails_trade_admin/providers/area.html.erb +1 -0
- data/app/views/rails_trade_admin/providers/channel.html.erb +46 -0
- data/app/views/rails_trade_admin/providers/edit.html.erb +16 -0
- data/app/views/rails_trade_admin/providers/index.html.erb +27 -0
- data/app/views/rails_trade_admin/providers/new.html.erb +21 -0
- data/app/views/rails_trade_admin/providers/posts.html.erb +41 -0
- data/app/views/rails_trade_admin/providers/products.html.erb +23 -0
- data/app/views/rails_trade_admin/providers/show.html.erb +60 -0
- data/app/views/rails_trade_admin/refunds/_form.html.erb +17 -0
- data/app/views/rails_trade_admin/refunds/_logs_table.html.erb +33 -0
- data/app/views/rails_trade_admin/refunds/_new.html.erb +18 -0
- data/app/views/rails_trade_admin/refunds/_search_form.html.erb +13 -0
- data/app/views/rails_trade_admin/refunds/edit.html.erb +6 -0
- data/app/views/rails_trade_admin/refunds/index.html.erb +57 -0
- data/app/views/rails_trade_admin/refunds/logs.js.erb +8 -0
- data/app/views/rails_trade_admin/refunds/new.html.erb +5 -0
- data/app/views/rails_trade_admin/refunds/new.js.erb +8 -0
- data/app/views/rails_trade_admin/refunds/show.html.erb +4 -0
- data/app/views/rails_trade_admin/serve_charges/_edit.html.erb +13 -0
- data/app/views/rails_trade_admin/serve_charges/_form.html.erb +10 -0
- data/app/views/rails_trade_admin/serve_charges/_new.html.erb +13 -0
- data/app/views/rails_trade_admin/serve_charges/_search_form.html.erb +10 -0
- data/app/views/rails_trade_admin/serve_charges/edit.js.erb +7 -0
- data/app/views/rails_trade_admin/serve_charges/index.html.erb +56 -0
- data/app/views/rails_trade_admin/serve_charges/new.js.erb +8 -0
- data/app/views/rails_trade_admin/serves/_form.html.erb +9 -0
- data/app/views/rails_trade_admin/serves/edit.html.erb +9 -0
- data/app/views/rails_trade_admin/serves/index.html.erb +80 -0
- data/app/views/rails_trade_admin/serves/new.html.erb +9 -0
- data/app/views/rails_trade_my/addresses/_edit.html.erb +31 -0
- data/app/views/rails_trade_my/addresses/_form.html.erb +23 -0
- data/app/views/rails_trade_my/addresses/_new.html.erb +11 -0
- data/app/views/rails_trade_my/addresses/create.js.erb +2 -0
- data/app/views/rails_trade_my/addresses/destroy.js.erb +1 -0
- data/app/views/rails_trade_my/addresses/edit.js.erb +39 -0
- data/app/views/rails_trade_my/addresses/index.html.erb +44 -0
- data/app/views/rails_trade_my/addresses/new.js.erb +39 -0
- data/app/views/rails_trade_my/addresses/show.html.erb +4 -0
- data/app/views/rails_trade_my/addresses/update.js.erb +2 -0
- data/app/views/rails_trade_my/base/_nav.html.erb +22 -0
- data/app/views/rails_trade_my/buyers/_form.html.erb +5 -0
- data/app/views/rails_trade_my/buyers/edit.html.erb +2 -0
- data/app/views/rails_trade_my/buyers/show.html.erb +21 -0
- data/app/views/rails_trade_my/cart_items/_additions.html.erb +22 -0
- data/app/views/rails_trade_my/cart_items/_single_price.html.erb +6 -0
- data/app/views/rails_trade_my/cart_items/_total_price.html.erb +8 -0
- data/app/views/rails_trade_my/cart_items/destroy.js.erb +1 -0
- data/app/views/rails_trade_my/cart_items/index.html.erb +69 -0
- data/app/views/rails_trade_my/cart_items/total.js.erb +11 -0
- data/app/views/rails_trade_my/cart_items/update.js.erb +8 -0
- data/app/views/rails_trade_my/my/index.html.erb +17 -0
- data/app/views/rails_trade_my/order_items/_form.html.erb +17 -0
- data/app/views/rails_trade_my/order_items/edit.html.erb +6 -0
- data/app/views/rails_trade_my/order_items/index.html.erb +25 -0
- data/app/views/rails_trade_my/order_items/new.html.erb +5 -0
- data/app/views/rails_trade_my/order_items/show.html.erb +8 -0
- data/app/views/rails_trade_my/orders/_date_form.html.erb +23 -0
- data/app/views/rails_trade_my/orders/_edit.html.erb +10 -0
- data/app/views/rails_trade_my/orders/_edit_payment_type.html.erb +13 -0
- data/app/views/rails_trade_my/orders/_form.html.erb +4 -0
- data/app/views/rails_trade_my/orders/destroy.js.erb +1 -0
- data/app/views/rails_trade_my/orders/edit.js.erb +4 -0
- data/app/views/rails_trade_my/orders/edit_payment_type.js.erb +6 -0
- data/app/views/rails_trade_my/orders/fail.html.erb +11 -0
- data/app/views/rails_trade_my/orders/index.html.erb +55 -0
- data/app/views/rails_trade_my/orders/index.json.jbuilder +9 -0
- data/app/views/rails_trade_my/orders/new.html.erb +41 -0
- data/app/views/rails_trade_my/orders/refresh.js.erb +7 -0
- data/app/views/rails_trade_my/orders/show.html.erb +103 -0
- data/app/views/rails_trade_my/orders/success.html.erb +12 -0
- data/app/views/rails_trade_my/orders/update.js.erb +3 -0
- data/app/views/rails_trade_my/orders/update_payment_type.js.erb +3 -0
- data/app/views/rails_trade_my/orders/wxpay_pay.js.erb +16 -0
- data/app/views/rails_trade_my/orders/wxpay_pay_err.js.erb +5 -0
- data/app/views/rails_trade_my/payment_methods/_edit.html.erb +13 -0
- data/app/views/rails_trade_my/payment_methods/_form.html.erb +5 -0
- data/app/views/rails_trade_my/payment_methods/_index.html.erb +25 -0
- data/app/views/rails_trade_my/payment_methods/_item.html.erb +10 -0
- data/app/views/rails_trade_my/payment_methods/_new.html.erb +13 -0
- data/app/views/rails_trade_my/payment_methods/create.js.erb +3 -0
- data/app/views/rails_trade_my/payment_methods/destroy.js.erb +1 -0
- data/app/views/rails_trade_my/payment_methods/edit.js.erb +8 -0
- data/app/views/rails_trade_my/payment_methods/index.html.erb +1 -0
- data/app/views/rails_trade_my/payment_methods/index.js.erb +1 -0
- data/app/views/rails_trade_my/payment_methods/new.js.erb +8 -0
- data/app/views/rails_trade_my/payment_methods/show.html.erb +4 -0
- data/app/views/rails_trade_my/payment_methods/update.js.erb +2 -0
- data/app/views/rails_trade_my/providers/_form.html.erb +5 -0
- data/app/views/rails_trade_my/providers/_provider.html.erb +20 -0
- data/app/views/rails_trade_my/providers/edit.html.erb +2 -0
- data/app/views/rails_trade_my/providers/index.html.erb +12 -0
- data/app/views/rails_trade_my/providers/new.html.erb +10 -0
- data/app/views/rails_trade_my/providers/show.html.erb +13 -0
- data/app/views/rails_trade_my/users/_form.html.erb +17 -0
- data/app/views/rails_trade_my/users/edit.html.erb +44 -0
- data/app/views/rails_trade_my/users/show.html.erb +18 -0
- data/config/locales/en.yml +85 -0
- data/config/locales/zh.yml +75 -0
- data/config/routes.rb +118 -0
- data/db/migrate/20150514135720_create_providers.rb +59 -0
- data/db/migrate/20170601014520_create_payments.rb +52 -0
- data/db/migrate/20170602061859_create_payment_references.rb +12 -0
- data/db/migrate/20170702234123_create_orders.rb +56 -0
- data/db/migrate/20170714080032_create_payment_strategies.rb +77 -0
- data/db/migrate/20171115063702_create_promote_buyers.rb +31 -0
- data/db/schema.rb +94 -0
- data/lib/rails_trade.rb +22 -0
- data/lib/rails_trade/config.rb +12 -0
- data/lib/rails_trade/engine.rb +30 -0
- data/lib/rails_trade/version.rb +3 -0
- data/lib/tasks/the_trade_tasks.rake +4 -0
- metadata +491 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="ui modal">
|
2
|
+
<i class="close icon"></i>
|
3
|
+
<div class="ui header blue">
|
4
|
+
Edit Payment Method
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="content">
|
8
|
+
<%= form_with model: @payment_method, scope: 'payment_method', url: my_payment_method_path(@payment_method) do |f| %>
|
9
|
+
<%= render partial: 'form', locals: { f: f } %>
|
10
|
+
<% end %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
</div>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<div class="ui top attached borderless menu">
|
2
|
+
<%= link_to 'My Expenses', my_expense_members_path, class: active_helper(controllers: 'finance_my/expense_members') %>
|
3
|
+
<%= link_to 'My Payment Methods', my_payment_methods_path, class: active_helper(controllers: 'payment_methods') %>
|
4
|
+
</div>
|
5
|
+
<div class="ui segment attached">
|
6
|
+
<%= link_to 'Add New', new_my_payment_method_path, remote: true, class: 'ui teal button' %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<table class="ui bottom attached table">
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th>ID</th>
|
13
|
+
<th>Account Name</th>
|
14
|
+
<th>Account Num</th>
|
15
|
+
<th>Bank</th>
|
16
|
+
<th>Actions</th>
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
|
20
|
+
<tbody id="payment_method_tbody">
|
21
|
+
<% @payment_methods.each do |payment_method| %>
|
22
|
+
<%= render partial: 'item', locals: { payment_method: payment_method } %>
|
23
|
+
<% end %>
|
24
|
+
</tbody>
|
25
|
+
</table>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<tr id="payment_method_<%= payment_method.id %>">
|
2
|
+
<td><%= payment_method.id %></td>
|
3
|
+
<td><%= payment_method.account_name %></td>
|
4
|
+
<td><%= payment_method.account_num %></td>
|
5
|
+
<td><%= payment_method.bank %></td>
|
6
|
+
<td>
|
7
|
+
<%= link_to 'Edit', edit_my_payment_method_path(payment_method), class: 'ui mini blue button', remote: true %>
|
8
|
+
<%= link_to 'Delete', my_payment_method_path(payment_method), class: 'ui mini button', remote: true, method: :delete, data: { confirm: 'Are you sure?' } %>
|
9
|
+
</td>
|
10
|
+
</tr>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="ui modal">
|
2
|
+
<i class="close icon"></i>
|
3
|
+
<div class="ui header blue">
|
4
|
+
Add Payment Method
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="content">
|
8
|
+
<%= default_form_with model: [:my, @payment_method] do |f| %>
|
9
|
+
<%= render partial: 'form', locals: { f: f } %>
|
10
|
+
<% end %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
$('#payment_method_<%= @payment_method.id %>').remove();
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'index' %>
|
@@ -0,0 +1 @@
|
|
1
|
+
$('#content_body').html('<%= j(render 'index') %>')
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<table class="ui very basic large table">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th class="three wide"></th>
|
5
|
+
<th>
|
6
|
+
<%= link_to '编辑', edit_my_provider_path, class: 'ui mini blue right floated button' %>
|
7
|
+
</th>
|
8
|
+
</tr>
|
9
|
+
</thead>
|
10
|
+
<tbody>
|
11
|
+
<tr>
|
12
|
+
<td class="right aligned">名称:</td>
|
13
|
+
<td><%= @provider.name %></td>
|
14
|
+
</tr>
|
15
|
+
<tr>
|
16
|
+
<td class="right aligned"></td>
|
17
|
+
<td></td>
|
18
|
+
</tr>
|
19
|
+
</tbody>
|
20
|
+
</table>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div class="ui basic segment">
|
2
|
+
|
3
|
+
<h3 class="ui header">
|
4
|
+
<%= link_to '申请供应商', new_my_provider_path, class: 'ui right floated mini blue button' %>
|
5
|
+
</h3>
|
6
|
+
<div class="ui divided items">
|
7
|
+
<% @providers.each do |provider| %>
|
8
|
+
<%= render partial: 'provider', locals: { provider: provider } %>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% if @provider.new_record? %>
|
2
|
+
<%= render 'form' %>
|
3
|
+
<% else %>
|
4
|
+
<%= render 'provider' %>
|
5
|
+
|
6
|
+
<h3 class="ui header">提供服务</h3>
|
7
|
+
<div class="ui blue labels">
|
8
|
+
<% @provider.facilitate_providers.verified.each do |facilitate_provider| %>
|
9
|
+
<%= link_to facilitate_provider.facilitate.name, my_facilitate_provider_path(facilitate_provider), class: 'ui label' %>
|
10
|
+
<% end %>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= form_for(@person) do |f| %>
|
2
|
+
<% if @person.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(@person.errors.count, "error") %> prohibited this person from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @person.errors.full_messages.each do |msg| %>
|
8
|
+
<li><%= msg %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="actions">
|
15
|
+
<%= f.submit %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<div class="row">
|
2
|
+
|
3
|
+
<div class="col-3">
|
4
|
+
<%= render "side" %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="col-9">
|
8
|
+
<h1>用户信息编辑</h1>
|
9
|
+
<li><%= link_to "删除账户", registration_path(@user), :data => { :confirm => "Are you sure?" }, :method => :delete %></li>
|
10
|
+
|
11
|
+
<%= form_for @user, :html => { :multipart => true } do |f| %>
|
12
|
+
|
13
|
+
<fieldset>
|
14
|
+
|
15
|
+
<div class="control-group">
|
16
|
+
<%= f.label :name, "昵称:", :class => "control-label" %>
|
17
|
+
<div class="controls"><%= f.text_field :name, :class => "input-xlarge" %></div>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="control-group">
|
21
|
+
<%= f.label :email, "邮箱:", :class => "control-label" %>
|
22
|
+
<div class="controls"><%= f.email_field :email, :class => "input-xlarge" %></div>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<div class="control-group">
|
26
|
+
<%= f.label :avatar, "上传头像:", :class => "control-label" %>
|
27
|
+
<div class="controls">
|
28
|
+
<%= image_tag(@user.avatar_url) if @user.avatar? %>
|
29
|
+
<%= f.file_field :avatar %>
|
30
|
+
<%= f.hidden_field :avatar_cache %>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<div class="form-actions">
|
35
|
+
<%= f.submit :class => "btn btn-primary btn-large" %>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
</fieldset>
|
39
|
+
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
</div>
|
43
|
+
|
44
|
+
</div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div class="row">
|
2
|
+
|
3
|
+
<div class="col-md-3">
|
4
|
+
<%= render 'member/nav' %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="col-md-9">
|
8
|
+
|
9
|
+
<div class="panel panel-default">
|
10
|
+
<div class="panel-heading"><%= link_to '编辑信息', edit_user_registration_path %></div>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
|
14
|
+
</div>
|
15
|
+
|
16
|
+
</div>
|
17
|
+
|
18
|
+
|
@@ -0,0 +1,85 @@
|
|
1
|
+
en:
|
2
|
+
rails_trade_admin:
|
3
|
+
payments:
|
4
|
+
index:
|
5
|
+
add_new: add
|
6
|
+
import: Import
|
7
|
+
init: 预核销
|
8
|
+
confirmed: 未预核销
|
9
|
+
item:
|
10
|
+
edit: Edit
|
11
|
+
destroy: Destroy
|
12
|
+
show: 支付方式
|
13
|
+
checking: 核销
|
14
|
+
analyze: 分析支付方式
|
15
|
+
adjust: 平账
|
16
|
+
payment_methods:
|
17
|
+
index_layout:
|
18
|
+
remove: Remove
|
19
|
+
edit: Edit
|
20
|
+
destroy: Delete
|
21
|
+
new: Add
|
22
|
+
relate: Refer Buyer
|
23
|
+
activerecord:
|
24
|
+
models:
|
25
|
+
role: ''
|
26
|
+
attributes:
|
27
|
+
address/kind:
|
28
|
+
transport: Transport
|
29
|
+
forwarder: Forwarder
|
30
|
+
invoice: Invoice
|
31
|
+
buyer:
|
32
|
+
name: 公司名称
|
33
|
+
order/payment_type:
|
34
|
+
paypal: Paypal
|
35
|
+
alipay: Alipay
|
36
|
+
stripe: Stripe
|
37
|
+
payment/type:
|
38
|
+
HandPayment: Hand Record
|
39
|
+
BankPayment: Bank Record
|
40
|
+
PaypalPayment: Paypal
|
41
|
+
payment/state:
|
42
|
+
init: 未核销
|
43
|
+
part_checked: 部分核销
|
44
|
+
all_checked: 全部核销
|
45
|
+
abusive_checked: 问题核销
|
46
|
+
payment:
|
47
|
+
total_amount: 总金额
|
48
|
+
income_amount: 净收入
|
49
|
+
fee_amount: 手续费
|
50
|
+
adjust_amount: 四舍五入
|
51
|
+
buyer_name: 账号名称
|
52
|
+
buyer_identifier: 账号
|
53
|
+
buyer_bank: 银行
|
54
|
+
notified_at: 通知时间
|
55
|
+
uuid: 流水号
|
56
|
+
type: 类别
|
57
|
+
comment: 备注
|
58
|
+
payment_method:
|
59
|
+
account_name: Account Name
|
60
|
+
account_num: Account
|
61
|
+
bank: Bank
|
62
|
+
verified: Verified
|
63
|
+
payment_references: Associated Account
|
64
|
+
payment_order/state:
|
65
|
+
init: 预核销
|
66
|
+
confirmed: 已核销
|
67
|
+
promote/type:
|
68
|
+
QuantityPromote: 总重量
|
69
|
+
NumberPromote: 购买件数
|
70
|
+
AmountPromote: 总金额
|
71
|
+
promote/scope:
|
72
|
+
total: 全部应用
|
73
|
+
single: 单独应用
|
74
|
+
promote_charge/type:
|
75
|
+
SinglePromoteCharge: Single Charge
|
76
|
+
TotalPromoteCharge: Total Charge
|
77
|
+
serve/type:
|
78
|
+
QuantityServe: 总重量
|
79
|
+
NumberServe: 购买件数
|
80
|
+
serve/scope:
|
81
|
+
total: 全部应用
|
82
|
+
single: 单独应用
|
83
|
+
serve_charge/type:
|
84
|
+
SingleServeCharge: Single Charge
|
85
|
+
TotalServeCharge: Total Charge
|
@@ -0,0 +1,75 @@
|
|
1
|
+
zh:
|
2
|
+
rails_trade_admin:
|
3
|
+
payments:
|
4
|
+
index:
|
5
|
+
add_new: 新增
|
6
|
+
import: 导入
|
7
|
+
init: 预核销
|
8
|
+
confirmed: 未预核销
|
9
|
+
item:
|
10
|
+
edit: 编辑
|
11
|
+
destroy: 删除
|
12
|
+
show: 支付方式
|
13
|
+
checking: 核销
|
14
|
+
analyze: 分析支付方式
|
15
|
+
adjust: 平账
|
16
|
+
payment_methods:
|
17
|
+
index_layout:
|
18
|
+
remove: 移除
|
19
|
+
edit: 编辑
|
20
|
+
destroy: 删除
|
21
|
+
new: 新增
|
22
|
+
relate: 关联买家
|
23
|
+
activerecord:
|
24
|
+
models:
|
25
|
+
role: ''
|
26
|
+
attributes:
|
27
|
+
charge/type:
|
28
|
+
SingleCharge: Single Charge
|
29
|
+
TotalCharge: Total Charge
|
30
|
+
payment/type:
|
31
|
+
HandPayment: Hand Record
|
32
|
+
BankPayment: Bank Record
|
33
|
+
PaypalPayment: Paypal
|
34
|
+
payment/state:
|
35
|
+
init: 未核销
|
36
|
+
part_checked: 部分核销
|
37
|
+
all_checked: 全部核销
|
38
|
+
abusive_checked: 问题核销
|
39
|
+
payment:
|
40
|
+
total_amount: 总金额
|
41
|
+
income_amount: 净收入
|
42
|
+
fee_amount: 手续费
|
43
|
+
adjust_amount: 四舍五入
|
44
|
+
buyer_name: 账号名称
|
45
|
+
buyer_identifier: 账号
|
46
|
+
buyer_bank: 银行
|
47
|
+
notified_at: 通知时间
|
48
|
+
uuid: 流水号
|
49
|
+
type: 类别
|
50
|
+
comment: 备注
|
51
|
+
payment_method:
|
52
|
+
account_name: 账号名称
|
53
|
+
account_num: 账号
|
54
|
+
bank: 银行
|
55
|
+
verified: 已审核
|
56
|
+
payment_references: 关联账号
|
57
|
+
payment_order/state:
|
58
|
+
init: 待确认
|
59
|
+
confirmed: 已确认
|
60
|
+
promote/type:
|
61
|
+
QuantityPromote: 总重量
|
62
|
+
NumberPromote: 购买件数
|
63
|
+
AmountPromote: 总金额
|
64
|
+
promote/scope:
|
65
|
+
total: 全部应用
|
66
|
+
single: 单独应用
|
67
|
+
serve/type:
|
68
|
+
QuantityServe: 总重量
|
69
|
+
NumberServe: 购买件数
|
70
|
+
serve/scope:
|
71
|
+
total: 全部应用
|
72
|
+
single: 单独应用
|
73
|
+
serve_charge/type:
|
74
|
+
SingleServeCharge: Single Charge
|
75
|
+
TotalServeCharge: Total Charge
|
data/config/routes.rb
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
|
3
|
+
scope :admin, as: 'admin', module: 'rails_trade_admin' do
|
4
|
+
get 'trade' => 'trade#index'
|
5
|
+
resources :addresses
|
6
|
+
resources :areas
|
7
|
+
resources :buyers do
|
8
|
+
get :overdue, on: :collection
|
9
|
+
get :orders, on: :member
|
10
|
+
put :remind, on: :collection
|
11
|
+
end
|
12
|
+
resources :cart_items, except: [:new] do
|
13
|
+
get :total, on: :collection
|
14
|
+
get :doc, on: :collection
|
15
|
+
get :only, on: :collection
|
16
|
+
resources :cart_item_serves do
|
17
|
+
get :single, on: :collection
|
18
|
+
get :total, on: :collection
|
19
|
+
post :add, on: :collection
|
20
|
+
end
|
21
|
+
end
|
22
|
+
resources :orders do
|
23
|
+
get :payments, on: :collection
|
24
|
+
get :refresh, on: :collection
|
25
|
+
patch :refund, on: :member
|
26
|
+
resources :order_payments
|
27
|
+
end
|
28
|
+
resources :order_items
|
29
|
+
resources :payments do
|
30
|
+
resources :payment_orders do
|
31
|
+
patch :cancel, on: :member
|
32
|
+
end
|
33
|
+
get :dashboard, on: :collection
|
34
|
+
patch :analyze, on: :member
|
35
|
+
patch :adjust, on: :member
|
36
|
+
end
|
37
|
+
resources :payment_strategies
|
38
|
+
resources :payment_methods do
|
39
|
+
resources :payment_references, as: :references
|
40
|
+
get :unverified, on: :collection
|
41
|
+
get :mine, on: :collection
|
42
|
+
patch :verify, on: :member
|
43
|
+
patch :merge_from, on: :member
|
44
|
+
end
|
45
|
+
resources :produces
|
46
|
+
resources :promotes do
|
47
|
+
get :search, on: :collection
|
48
|
+
patch :toggle, on: :member
|
49
|
+
patch :overall, on: :member
|
50
|
+
patch :contain, on: :member
|
51
|
+
resources :promote_charges, as: 'charges'
|
52
|
+
end
|
53
|
+
resources :promote_buyers
|
54
|
+
resources :promote_goods
|
55
|
+
resources :providers
|
56
|
+
|
57
|
+
resources :refunds do
|
58
|
+
patch :confirm, on: :member
|
59
|
+
patch :deny, on: :member
|
60
|
+
end
|
61
|
+
resources :serves do
|
62
|
+
get :search, on: :collection
|
63
|
+
patch :toggle, on: :member
|
64
|
+
patch :overall, on: :member
|
65
|
+
patch :contain, on: :member
|
66
|
+
patch :default, on: :member
|
67
|
+
resources :serve_charges, as: 'charges'
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
scope :my, as: 'my', module: 'rails_trade_my' do
|
72
|
+
resource :buyer
|
73
|
+
resource :provider
|
74
|
+
|
75
|
+
resources :addresses
|
76
|
+
resources :buyers
|
77
|
+
resources :cart_items do
|
78
|
+
get :total, on: :collection
|
79
|
+
end
|
80
|
+
resources :good_providers
|
81
|
+
resources :orders do
|
82
|
+
post :direct, on: :collection
|
83
|
+
get :refresh, on: :collection
|
84
|
+
get :paypal_pay, on: :member
|
85
|
+
get :alipay_pay, on: :member
|
86
|
+
get :wxpay_pay, on: :member
|
87
|
+
patch :stripe_pay, on: :member
|
88
|
+
get :paypal_execute, on: :member
|
89
|
+
get :pay, on: :member
|
90
|
+
get 'payment_type' => :edit_payment_type, on: :member
|
91
|
+
put 'payment_type' => :update_payment_type, on: :member
|
92
|
+
patch 'payment_type' => :update_payment_type, on: :member
|
93
|
+
get 'cancel' => :edit_cancel, on: :member
|
94
|
+
put 'cancel' => :update_cancel, on: :member
|
95
|
+
put :refund, on: :member
|
96
|
+
get :check, on: :member
|
97
|
+
end
|
98
|
+
resources :order_items
|
99
|
+
resources :payment_methods
|
100
|
+
end
|
101
|
+
|
102
|
+
resources :areas, only: [] do
|
103
|
+
get :search, on: :collection
|
104
|
+
end
|
105
|
+
resources :payments, only: [:index] do
|
106
|
+
get :result, on: :collection
|
107
|
+
match :notify, on: :collection, via: [:get, :post]
|
108
|
+
match :alipay_notify, on: :collection, via: [:get, :post]
|
109
|
+
match :wxpay_notify, on: :collection, via: [:get, :post]
|
110
|
+
end
|
111
|
+
resources :providers, only: [] do
|
112
|
+
get :search, on: :collection
|
113
|
+
end
|
114
|
+
resources :buyers, only: [] do
|
115
|
+
get :search, on: :collection
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|