Sha256: f1f2b635c77540a8d1fbdc11ba6611138f92383b096b48eb59aacc6ba9a32c89

Contents?: true

Size: 1.01 KB

Versions: 3

Compression:

Stored size: 1.01 KB

Contents

json.data do
  json.array! @data do |d|
    json.id d.id
    json.staff d.staff.user.real_name
    json.clazz EducodeSales::SalePlan::CLAZZ_NAME.invert[d.clazz]
    json.year d.year
    json.business_name d.business.name
    json.department d.business.department&.name
    json.school d.business.department&.school&.name
    json.stage d.business.last_follow_up&.stage&.name
    json.staff_manages d.business.last_follow_up&.assign_follow_ups.present? ? (d.business.last_follow_up.assign_follow_ups.map{ |d| d.staff.user.real_name}.join("、")) : d.business.staff&.user&.real_name
    json.created_at d.created_at.to_s
    json.sale_way d.business.last_follow_up&.place&.name.present? ? '渠道' : '直销'
    json.budget_amount d.business&.last_follow_up ? d.business.last_follow_up.budget_amount.to_f.round(2)  : 0
    json.plan_bid_on d.plan_bid_on
    json.plan_sign_on d.plan_sign_on
    json.prepayment_plan_on d.prepayment_plan_on
    json.prepayment_amount d.prepayment_amount
  end
end

json.code 0
json.count @data.total_count

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
educode_sales-0.9.70 app/views/educode_sales/plans/business_infos.json.jbuilder
educode_sales-0.9.69 app/views/educode_sales/plans/business_infos.json.jbuilder
educode_sales-0.9.68 app/views/educode_sales/plans/business_infos.json.jbuilder