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,9 @@
|
|
1
|
+
<p>原价:<%= @additions.retail_price %></p>
|
2
|
+
<p style="color: red;">批发折扣:<%= @additions.discount_price %></p>
|
3
|
+
<p style="color: red;">商品优惠:<%= @additions.reduced_price %></p>
|
4
|
+
<p>折后价格: <%= @additions.final_price %></p>
|
5
|
+
<p style="color: red;">优惠价格: <%= @additions.promote_price %></p>
|
6
|
+
<p>附加服务: <%= @additions.total_serve_price %></p>
|
7
|
+
<p>最终价格: <%= @additions.total_price %></p>
|
8
|
+
|
9
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
$("#cart_item_<%= @cart_item.id %>").remove();
|
@@ -0,0 +1,104 @@
|
|
1
|
+
<div class="ui segment top attached">
|
2
|
+
<% if @user %>
|
3
|
+
<p>
|
4
|
+
Name: <%= @user.name %>
|
5
|
+
<%= link_to 'carts', user_id: @user.id %>
|
6
|
+
</p>
|
7
|
+
<p>Email: <%= @user.email %></p>
|
8
|
+
<% end %>
|
9
|
+
<% if @buyer %>
|
10
|
+
<p>Company Name: <% @buyer.name %>(<%= @buyer.id %>)
|
11
|
+
<%= link_to 'carts', buyer_id: @buyer.id %>
|
12
|
+
</p>
|
13
|
+
<p>
|
14
|
+
<%= select_tag :user_id, options_from_collection_for_select(@buyer.users, :id, :name, @user&.id), include_blank: true, class: 'ui dropdown' %>
|
15
|
+
</p>
|
16
|
+
<% end %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="ui segment top attached">
|
20
|
+
<% if @user %>
|
21
|
+
<%= link_to '生成订单', new_admin_order_path(user_id: @user.id), class: 'ui red button', id: 'new_order_top' %>
|
22
|
+
<%= link_to '生成文档', doc_admin_cart_items_path(user_id: @user.id), class: 'ui orange button', id: 'cart_items_doc' %>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
<table class="ui bottom attached table">
|
26
|
+
<thead>
|
27
|
+
<tr class="">
|
28
|
+
<th><%= check_box_tag :all %></th>
|
29
|
+
<th>Name</th>
|
30
|
+
<th>报价</th>
|
31
|
+
<th>数量</th>
|
32
|
+
<th>原价</th>
|
33
|
+
<th>最终价格</th>
|
34
|
+
<th>预成单报价</th>
|
35
|
+
<th>Actions</th>
|
36
|
+
</tr>
|
37
|
+
</thead>
|
38
|
+
<tbody>
|
39
|
+
<% @cart_items.each do |cart_item| %>
|
40
|
+
<tr class="<%= active_asserts join: false, active: cart_item.checked, positive: cart_item.good_id.to_s == params[:good_id] %>" id="cart_item_<%= cart_item.id %>">
|
41
|
+
<td><%= check_box_tag(:cart_item_id, cart_item.id, cart_item.checked) %></td>
|
42
|
+
<td>
|
43
|
+
<i class="child icon<%= active_assert(cart_item.myself, expected: ' green', unexpected: '') %>"></i>
|
44
|
+
<%= cart_item.good&.name %>
|
45
|
+
<%= link_to only_admin_cart_items_path(good_type: cart_item.good_type, good_id: cart_item.good_id) do %>
|
46
|
+
<i class="legal icon"></i>
|
47
|
+
<% end %>
|
48
|
+
</td>
|
49
|
+
<td>
|
50
|
+
<% cache [cart_item, 'good_price'] do %>
|
51
|
+
<%= render partial: 'good_price', locals: { cart_item: cart_item } %>
|
52
|
+
<% end %>
|
53
|
+
</td>
|
54
|
+
<td>
|
55
|
+
<div class="ui left right action input">
|
56
|
+
<div class="ui button" onclick="decrease_quantity(<%= cart_item.id %>)"><i class="minus icon"></i></div>
|
57
|
+
<%= text_field_tag :quantity, cart_item.quantity, id: "quantity_#{cart_item.id}", onkeyup: "update_quantity(#{cart_item.id})", disabled: true %>
|
58
|
+
<div class="ui button" onclick="increase_quantity(<%= cart_item.id %>)"><i class="plus icon"></i></div>
|
59
|
+
</div>
|
60
|
+
</td>
|
61
|
+
<td id="retail_price_<%= cart_item.id %>">
|
62
|
+
<% cache [cart_item, 'retail_price'] do %>
|
63
|
+
<%= render partial: 'retail_price', locals: { cart_item: cart_item } %>
|
64
|
+
<% end %>
|
65
|
+
</td>
|
66
|
+
<td id="single_price_<%= cart_item.id %>">
|
67
|
+
<% cache [cart_item, 'single_price'] do %>
|
68
|
+
<%= render partial: 'single_price', locals: { cart_item: cart_item } %>
|
69
|
+
<% end %>
|
70
|
+
</td>
|
71
|
+
<td id="order_price_<%= cart_item.id %>">
|
72
|
+
<% cache [cart_item, 'order_price'] do %>
|
73
|
+
<%= render partial: 'order_price', locals: { cart_item: cart_item } %>
|
74
|
+
<% end %>
|
75
|
+
</td>
|
76
|
+
<td>
|
77
|
+
<%= link_to 'delete', admin_cart_item_path(cart_item), method: :delete, remote: true, class: 'ui mini label' %>
|
78
|
+
</td>
|
79
|
+
</tr>
|
80
|
+
<% end %>
|
81
|
+
</tbody>
|
82
|
+
<tbody id="additions_body">
|
83
|
+
<%= render 'additions' %>
|
84
|
+
</tbody>
|
85
|
+
<tfoot>
|
86
|
+
<tr>
|
87
|
+
<th colspan="5"></th>
|
88
|
+
<th id="total_price">
|
89
|
+
<%= render 'total_price' %>
|
90
|
+
</th>
|
91
|
+
<th colspan="3"></th>
|
92
|
+
</tr>
|
93
|
+
<tr>
|
94
|
+
<th colspan="5"></th>
|
95
|
+
<th colspan="4">
|
96
|
+
<% if @user %>
|
97
|
+
<%= link_to '生成订单', new_admin_order_path(user_id: @user.id), class: 'ui red button', id: 'new_order_bottom' %>
|
98
|
+
<% end %>
|
99
|
+
</th>
|
100
|
+
</tr>
|
101
|
+
</tfoot>
|
102
|
+
</table>
|
103
|
+
|
104
|
+
<%= paginate @cart_items %>
|
@@ -0,0 +1,72 @@
|
|
1
|
+
<div class="ui segment top attached">
|
2
|
+
<% if @user %>
|
3
|
+
<p>
|
4
|
+
Name: <%= @user.name %>
|
5
|
+
<%= link_to 'carts', admin_cart_items_path(user_id: @user.id) %>
|
6
|
+
</p>
|
7
|
+
<p>Email: <%= @user.email %></p>
|
8
|
+
<% end %>
|
9
|
+
<% if @buyer %>
|
10
|
+
<p>Company Name: <% @buyer.name %>(<%= @buyer.id %>)
|
11
|
+
<%= link_to 'carts', admin_cart_items_path(buyer_id: @buyer.id) %>
|
12
|
+
</p>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<div class="ui segment top attached">
|
17
|
+
<%= link_to '生成订单', new_admin_order_path(cart_item_id: @cart_item.id), class: 'ui red button', id: 'new_order_top' %>
|
18
|
+
<%= link_to '生成文档', doc_admin_cart_items_path(cart_item_id: @cart_item.id), class: 'ui orange button', id: 'cart_items_doc' %>
|
19
|
+
</div>
|
20
|
+
<table class="ui bottom attached table">
|
21
|
+
<thead>
|
22
|
+
<tr class="">
|
23
|
+
<th>Name</th>
|
24
|
+
<th>报价</th>
|
25
|
+
<th>数量</th>
|
26
|
+
<th>原价</th>
|
27
|
+
<th>最终价格</th>
|
28
|
+
<th>预成单报价</th>
|
29
|
+
<th>Actions</th>
|
30
|
+
</tr>
|
31
|
+
</thead>
|
32
|
+
<tbody>
|
33
|
+
<tr class="<%= active_asserts join: false, active: @cart_item.checked, positive: @cart_item.good_id.to_s == params[:good_id] %>" id="cart_item_<%= @cart_item.id %>">
|
34
|
+
<td><%= @cart_item.good&.name %></td>
|
35
|
+
<td>
|
36
|
+
<div>
|
37
|
+
<%= @cart_item.good.retail_price %><i class="info circle icon xx_popup" style="color: grey;" data-content=""></i>
|
38
|
+
<div class="ui popup">
|
39
|
+
<p>Export price: <%= @cart_item.good.price %></p>
|
40
|
+
<% @cart_item.good.serve.charges.each do |charge| %>
|
41
|
+
<p><%= charge.item.name %>: <%= charge.subtotal %></p>
|
42
|
+
<% end %>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
<p><%= @cart_item.good&.quantity %><%= @cart_item.good&.unit %></p>
|
46
|
+
</td>
|
47
|
+
<td>
|
48
|
+
<div class="ui left right action input">
|
49
|
+
<div class="ui button" onclick="decrease_quantity(<%= @cart_item.id %>)"><i class="minus icon"></i></div>
|
50
|
+
<%= text_field_tag :quantity, @cart_item.quantity, id: "quantity_#{@cart_item.id}", onkeyup: "update_quantity(#{@cart_item.id})", disabled: true %>
|
51
|
+
<div class="ui button" onclick="increase_quantity(<%= @cart_item.id %>)"><i class="plus icon"></i></div>
|
52
|
+
</div>
|
53
|
+
</td>
|
54
|
+
<td id="retail_price_<%= @cart_item.id %>"><%= render partial: 'retail_price', locals: { cart_item: @cart_item }, cached: true %></td>
|
55
|
+
<td id="single_price_<%= @cart_item.id %>"><%= render partial: 'single_price', locals: { cart_item: @cart_item }, cached: true %></td>
|
56
|
+
<td id="order_price_<%= @cart_item.id %>"><%= render partial: 'order_price', locals: { cart_item: @cart_item }, cached: true %></td>
|
57
|
+
<td>
|
58
|
+
<%= link_to 'delete', admin_cart_item_path(@cart_item), method: :delete, remote: true, class: 'ui mini label' %>
|
59
|
+
</td>
|
60
|
+
</tr>
|
61
|
+
</tbody>
|
62
|
+
<tfoot>
|
63
|
+
<tr>
|
64
|
+
<th colspan="5"></th>
|
65
|
+
<th colspan="4">
|
66
|
+
<%= link_to '生成订单', new_admin_order_path(cart_item_id: @cart_item.id), class: 'ui red button', id: 'new_order_bottom' %>
|
67
|
+
<%= link_to '生成文档', doc_admin_cart_items_path(cart_item_id: @cart_item.id), class: 'ui orange button', id: 'cart_items_doc' %>
|
68
|
+
</th>
|
69
|
+
</tr>
|
70
|
+
</tfoot>
|
71
|
+
</table>
|
72
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
$('#additions_body').html('<%= j(render partial: 'additions') %>');
|
2
|
+
$('#total_price').html('<%= j(render partial: 'total_price') %>');
|
3
|
+
|
4
|
+
<% if params[:add_id].present? %>
|
5
|
+
$("#cart_item_<%= params[:add_id] %>").addClass('active');
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<% if params[:remove_id].present? %>
|
9
|
+
$("#cart_item_<%= params[:remove_id] %>").removeClass('active');
|
10
|
+
<% end %>
|
11
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
$("#retail_price_<%= @cart_item.id %>").html('<%= j(render partial: 'retail_price', locals: { cart_item: @cart_item }) %>');
|
2
|
+
$("#single_price_<%= @cart_item.id %>").html('<%= j(render partial: 'single_price', locals: { cart_item: @cart_item }) %>');
|
3
|
+
$("#order_price_<%= @cart_item.id %>").html('<%= j(render partial: 'order_price', locals: { cart_item: @cart_item }) %>');
|
4
|
+
|
5
|
+
$('#additions_body').html('<%= j(render partial: 'additions') %>');
|
6
|
+
|
7
|
+
$('#total_price').html('<%= j(render partial: 'total_price') %>');
|
8
|
+
|
9
|
+
$('.xx_popup').popup({
|
10
|
+
popup: '.ui.popup'
|
11
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= default_form_with model: [:admin, @good], class: 'ui form' do |f| %>
|
2
|
+
<%= render 'shared/error_messages', target: @good %>
|
3
|
+
<%= f.text_field :sku, css: { wrapper_input: 'disabled field' } %>
|
4
|
+
<%= f.text_field :unit %>
|
5
|
+
<%= f.number_field :price, step: '0.01' %>
|
6
|
+
<%= f.submit %>
|
7
|
+
<% end %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<div class="ui popup" id="show_good_<%= @good.id %>">
|
2
|
+
<div class="content">
|
3
|
+
<div class="ui items">
|
4
|
+
<div class="item">
|
5
|
+
<i class="users icon"></i>
|
6
|
+
<div class="content">
|
7
|
+
<%= @good.sku %>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
<div class="item">
|
11
|
+
<i class="users icon"></i>
|
12
|
+
<div class="content">
|
13
|
+
<%= @good.unit %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div class="item">
|
17
|
+
<i class="users icon"></i>
|
18
|
+
<div class="content">
|
19
|
+
<%= @good.price %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</div>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<div class="ui popup" id="show_good_<%= @good.id %>">
|
2
|
+
<div class="content">
|
3
|
+
<div class="ui items">
|
4
|
+
<div class="item">
|
5
|
+
<i class="users icon"></i>
|
6
|
+
<div class="content">
|
7
|
+
<%= @good.sku %>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
<div class="item">
|
11
|
+
<i class="users icon"></i>
|
12
|
+
<div class="content">
|
13
|
+
<%= @good.unit %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div class="item">
|
17
|
+
<i class="users icon"></i>
|
18
|
+
<div class="content">
|
19
|
+
<%= @good.price %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
$('#payment_method_<%= @payment_method.id %>').remove();
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<div class="ui breadcrumb">
|
2
|
+
<%= link_to '全部商品', admin_goods_path, class: 'section' %>
|
3
|
+
<div class="divider"> / </div>
|
4
|
+
<%= link_to @good.name, admin_good_path(@good), class: 'section' %>
|
5
|
+
<div class="divider"> / </div>
|
6
|
+
<span class="section">编辑</span>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="ui grid">
|
10
|
+
|
11
|
+
|
12
|
+
<div class="thirteen wide column">
|
13
|
+
|
14
|
+
<%= render 'form' %>
|
15
|
+
</div>
|
16
|
+
</div>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<div class="ui breadcrumb">
|
2
|
+
<%= link_to '全部商品', admin_goods_path, class: 'section' %>
|
3
|
+
<div class="divider"> / </div>
|
4
|
+
<%= link_to @good.name, admin_good_path(@good), class: 'section' %>
|
5
|
+
<div class="divider"> / </div>
|
6
|
+
<span class="section">编辑</span>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="ui grid">
|
10
|
+
|
11
|
+
<div class="three wide column">
|
12
|
+
<%= render 'nav' %>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<div class="thirteen wide column">
|
16
|
+
|
17
|
+
<%= form_for @good, :url => items_admin_good_path(@good), :html => {:class => 'ui form'} do |f| %>
|
18
|
+
|
19
|
+
<fieldset>
|
20
|
+
|
21
|
+
<div class="inline field">
|
22
|
+
<%= f.label :item_ids, "商品描述:", :class => "six wide field" %>
|
23
|
+
<%= f.collection_select :item_ids, @items, :id, :name, {}, { :multiple => true, :class => "nine wide field" } %>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div class="inline field">
|
27
|
+
<label class="six wide field"></label>
|
28
|
+
<%= f.submit '添加', class: 'ui button' %>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
</fieldset>
|
32
|
+
<% end %>
|
33
|
+
|
34
|
+
</div>
|
35
|
+
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<script>
|
39
|
+
$('#good_item_ids').select2({
|
40
|
+
allowClear: true
|
41
|
+
});
|
42
|
+
</script>
|
43
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<div class="ui breadcrumb">
|
2
|
+
<%= link_to '全部商品', admin_goods_path, class: 'section' %>
|
3
|
+
<div class="divider"> / </div>
|
4
|
+
<%= link_to @good.name, admin_good_path(@good), class: 'section' %>
|
5
|
+
<div class="divider"> / </div>
|
6
|
+
<span class="section">编辑</span>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="ui grid">
|
10
|
+
|
11
|
+
<div class="three wide column">
|
12
|
+
<%= render 'nav' %>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<div class="thirteen wide column">
|
16
|
+
|
17
|
+
<% @good.photos.each do |photo| %>
|
18
|
+
<%= image_tag photo.photo.small %>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<%= form_for @photo, :url => pic_admin_good_path(params[:id]), :html => { :class => 'ui form', :multipart => true } do |f| %>
|
22
|
+
<%= render :partial => 'admin/photos/form', :locals => { :f => f } %>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
</div>
|
26
|
+
|
27
|
+
</div>
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<script type="text/javascript" src="/assets/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
|
2
|
+
|
3
|
+
<div class="ui breadcrumb">
|
4
|
+
<%= link_to '全部商品', admin_goods_path, class: 'section' %>
|
5
|
+
<div class="divider"> / </div>
|
6
|
+
<%= link_to @good.name, admin_good_path(@good), class: 'section' %>
|
7
|
+
<div class="divider"> / </div>
|
8
|
+
<span class="section">编辑</span>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="ui grid">
|
12
|
+
|
13
|
+
<div class="three wide column">
|
14
|
+
<%= render 'nav' %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="thirteen wide column">
|
18
|
+
<%= form_for @good, :url => promote_admin_good_path(@good), :html => {:class => 'ui form'} do |f| %>
|
19
|
+
|
20
|
+
<fieldset>
|
21
|
+
|
22
|
+
<div class="inline field">
|
23
|
+
<%= f.label :promote_id, "促销分类:", :class => "six wide field" %>
|
24
|
+
<%= f.collection_select :promote_id, Promote.all, :id, :name, { :include_blank => true }, { :class => "nine wide field" } %>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<div class="inline field">
|
28
|
+
<%= f.label :start_at, "开始时间:", :class => "six wide field" %>
|
29
|
+
<%= f.text_field :start_at, :class => "nine wide field" %>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<div class="inline field">
|
33
|
+
<%= f.label :finish_at, "结束时间:", :class => "six wide field" %>
|
34
|
+
<%= f.text_field :finish_at, :class => "nine wide field" %>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div class="inline field">
|
38
|
+
<label class="six wide field"></label>
|
39
|
+
<%= f.submit class: 'ui button' %>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
</fieldset>
|
43
|
+
<% end %>
|
44
|
+
|
45
|
+
<script type="text/javascript">
|
46
|
+
$('#good_promote_id').select2({
|
47
|
+
allowClear: true
|
48
|
+
});
|
49
|
+
$('#good_start_at').datetimepicker({
|
50
|
+
language: 'zh-CN',
|
51
|
+
format: 'yyyy-mm-dd hh:ii'
|
52
|
+
});
|
53
|
+
$('#good_finish_at').datetimepicker({
|
54
|
+
language: 'zh-CN',
|
55
|
+
format: 'yyyy-mm-dd hh:ii'
|
56
|
+
});
|
57
|
+
</script>
|
58
|
+
</div>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|