|
|
@@ -30,7 +30,7 @@ class Order < ActiveRecord::Base
|
|
|
|
|
|
end
|
|
|
STATUS_ENUM = [["未支付","unpay"],["已关闭","closed"],["待确认","unconfirmed"],["处理中","processing"],["已完成","complete"],["待收货","dispatch"],["已退款","refunded"]]
|
|
|
- TYPE_ENUM = [["普通",0],["秒杀",1],["店长",2]]
|
|
|
+ TYPE_ENUM = [["普通",0],["秒杀",1],["店长",2],["积分",3]]
|
|
|
EXP_ENUM = []
|
|
|
|
|
|
expressCompanys = ExpressCompany.order("id asc")
|
|
|
@@ -40,9 +40,9 @@ class Order < ActiveRecord::Base
|
|
|
end
|
|
|
|
|
|
PAY_WAY_ENUM = [
|
|
|
-
|
|
|
- ["微信支付","weixinpay"],
|
|
|
- ["代金券支付","balance"],
|
|
|
+ ["微信支付","weixinpay"],
|
|
|
+ ["代金券支付","balance"],
|
|
|
+ ["积分支付","cent"],
|
|
|
]
|
|
|
|
|
|
SOURCE_ENUM = [["小程序","xcx"],["公众号","gzh"],["第五创系统","d5c_sys"]]
|
|
|
@@ -103,6 +103,11 @@ class Order < ActiveRecord::Base
|
|
|
end
|
|
|
end
|
|
|
|
|
|
+ def cent_price_format
|
|
|
+ paied_price_f = self.cent_price!=0 ? ((self.cent_price)/100.0) :0
|
|
|
+ return paied_price_f.to_s #+ "代金券"
|
|
|
+ end
|
|
|
+
|
|
|
def coupon_price_format
|
|
|
coupon_price_f = self.coupon_price!=0 ? ((self.coupon_price)/100.0) :0
|
|
|
return coupon_price_f.to_s
|
|
|
@@ -154,6 +159,7 @@ class Order < ActiveRecord::Base
|
|
|
visible true
|
|
|
end
|
|
|
field :coupon_price_format
|
|
|
+ field :cent_price_format
|
|
|
field :paied_price_format do
|
|
|
visible true
|
|
|
end
|
|
|
@@ -217,6 +223,7 @@ class Order < ActiveRecord::Base
|
|
|
end
|
|
|
end
|
|
|
field :coupon_price_format
|
|
|
+ field :cent_price_format
|
|
|
field :paied_price_format
|
|
|
field :buy_price
|
|
|
field :trade_no
|