Skip to content

Commit

Permalink
payment types
Browse files Browse the repository at this point in the history
  • Loading branch information
qinmingyuan committed Dec 17, 2023
1 parent da85e4c commit 34e96f9
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="weui-panel is-borderless">
<div data-controller="mini-program" data-mini-program-pt-class="pt-0" class="weui-panel__hd as-bar">
<%= link_to({ controller: 'orders' }, class: 'px-4') do %>
<i class="fa-solid fa-lg fa-fw-1 fa-angle-left"></i>
<% end %>
<div class="weui-title"><%= @order.uuid %></div>
<i style="width: 3rem"></i>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="weui-panel is-borderless">
<div data-controller="mini-program" data-mini-program-pt-class="pt-0" class="weui-panel__hd as-bar">
<%= link_to({ controller: 'orders' }, class: 'px-4') do %>
<i class="fa-solid fa-lg fa-fw-1 fa-angle-left"></i>
<% end %>
<div class="weui-title"><%= @order.uuid %></div>
<i style="width: 3rem"></i>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<%= form_with theme: 'weui', model: @payment, scope: :payment, url: { action: 'order_create' } do |f| %>
<%= hidden_field_tag :order_id, params[:order_id] %>
<%= form_with theme: 'weui', model: @payment, scope: :payment, url: { action: 'create' } do |f| %>
<%= f.hidden_field :type, value: 'Trade::HandPayment' %>
<%= f.number_field :total_amount, step: Trade::Payment.total_amount_step, required: true %>
<%= f.text_area :comment %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= link_to({ controller: 'payments', action: 'order_new', order_id: @order.id }, class: 'weui-cell weui-cell_active weui-cell_access') do %>
<%= link_to({ controller: 'order_payments', action: 'new', order_id: @order.id }, class: 'weui-cell weui-cell_active weui-cell_access') do %>
<div class="weui-cell__hd">
<i class="fa-solid fa-fw fa-receipt"></i>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="weui-panel is-borderless">
<div data-controller="mini-program" data-mini-program-pt-class="pt-0" class="weui-panel__hd as-bar">
<%= link_to({ controller: 'orders' }, class: 'px-4') do %>
<i class="fa-solid fa-lg fa-fw-1 fa-angle-left"></i>
<% end %>
<div class="weui-title"><%= @order.uuid %></div>
<i style="width: 3rem"></i>
</div>
</div>
15 changes: 15 additions & 0 deletions app/views/trade/admin/orders/payment_types.html+phone.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<%= render 'top_bar' %>

<table class="table is-fullwidth is-borderless as-show">
<tbody>
<tr>
<td class="has-text-right"><%= Trade::Order.human_attribute_name(:unreceived_amount) %></td>
<td class="has-text-danger"><%= @order.unreceived_amount.to_money.format.html_safe %></td>
</tr>
<%# render partial: 'wallet_payment', collection: @order.payment_orders, as: :payment_order %>
</tbody>
</table>

<div class="weui-panel is-box">
<%= render 'hand_payment' %>
</div>

0 comments on commit 34e96f9

Please sign in to comment.