Sha256: 142c13ffbf799ddc6f522659a43d0631913de6e5a533c0124393f3e5730d0972

Contents?: true

Size: 1.75 KB

Versions: 3

Compression:

Stored size: 1.75 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.bidded_amount d.bidded_amount
    json.plan_sign_on d.plan_sign_on
    json.actual_sign_on d.actual_sign_on
    json.sign_amount d.sign_amount
    json.plan_deploy_on d.plan_deploy_on
    json.actual_deploy_on d.actual_deploy_on
    json.plan_check_on d.plan_check_on
    json.actual_check_on d.actual_check_on
    json.prepayment_plan_on d.prepayment_plan_on
    json.prepayment_actual_on d.prepayment_actual_on
    json.prepayment_amount d.prepayment_amount
    json.check_fee_plan_on d.check_fee_plan_on
    json.check_fee_actual_on d.check_fee_actual_on
    json.check_fee d.check_fee
    json.qa_plan_on d.qa_plan_on
    json.qa_actual_on d.qa_actual_on
    json.qa_amount d.qa_amount
    json.account_receivable d.account_receivable
    json.account_receivable_clazz d.account_receivable_clazz
    json.invoice_amount d.invoice_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/plan_business_infos.json.jbuilder
educode_sales-0.9.69 app/views/educode_sales/plans/plan_business_infos.json.jbuilder
educode_sales-0.9.68 app/views/educode_sales/plans/plan_business_infos.json.jbuilder