|
@@ -29,7 +29,7 @@ class CashBalance < ActiveRecord::Base
|
|
|
["活动退款","dollar_win_return"],
|
|
["活动退款","dollar_win_return"],
|
|
|
["活动报名","dollar_win"],
|
|
["活动报名","dollar_win"],
|
|
|
["佣金转提货券","cash_to_balance"],
|
|
["佣金转提货券","cash_to_balance"],
|
|
|
- ["佣金自动分账","cash_profit"],
|
|
|
|
|
|
|
+ ["佣金自动分账","cash_to_profit"],
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
def remain_sum
|
|
def remain_sum
|
|
@@ -40,6 +40,19 @@ class CashBalance < ActiveRecord::Base
|
|
|
return self.count
|
|
return self.count
|
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
|
|
+
|
|
|
|
|
+ def profit_state
|
|
|
|
|
+ if self.trade_no.length>0
|
|
|
|
|
+ if self.profit_flag
|
|
|
|
|
+ return "分账已完成"
|
|
|
|
|
+ else
|
|
|
|
|
+ return "分账处理中"
|
|
|
|
|
+ end
|
|
|
|
|
+ else
|
|
|
|
|
+ return "--"
|
|
|
|
|
+ end
|
|
|
|
|
+ end
|
|
|
|
|
+
|
|
|
rails_admin do
|
|
rails_admin do
|
|
|
navigation_label '资金管理'
|
|
navigation_label '资金管理'
|
|
|
weight -920
|
|
weight -920
|
|
@@ -68,6 +81,7 @@ class CashBalance < ActiveRecord::Base
|
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
field :remark
|
|
field :remark
|
|
|
|
|
+ field :profit_state
|
|
|
field :created_at
|
|
field :created_at
|
|
|
# field :updated_at
|
|
# field :updated_at
|
|
|
end
|
|
end
|
|
@@ -91,6 +105,7 @@ class CashBalance < ActiveRecord::Base
|
|
|
end
|
|
end
|
|
|
field :relate_id
|
|
field :relate_id
|
|
|
field :remark
|
|
field :remark
|
|
|
|
|
+ field :profit_state
|
|
|
field :created_at
|
|
field :created_at
|
|
|
end
|
|
end
|
|
|
|
|
|