Sha256: d8dd034706ccbc6601d39a8d2f7c77c73da2692bc9220ab9b32262717eafacb4

Contents?: true

Size: 1.4 KB

Versions: 11

Compression:

Stored size: 1.4 KB

Contents

json.data do
  json.array! @sales_details do |d|
    json.id d.id
    json.business_id d.business_id
    json.number d.business.number
    json.name d.business.name
    json.department d.business.department&.name
    json.school d.business.department&.school&.name
    json.school_id d.business.department&.school_id

    json.actual_amount d.business.last_follow_up&.actual_amount.to_f.round(2)
    json.created_at d.created_at.to_s
    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.area d.business.department&.school&.province

    json.majors d.business.department&.department_majors&.pluck(:name).present? ? d.business.department&.department_majors&.pluck(:name).join(",") : ""
    json.signed_department d.business.last_follow_up&.signed_department&.school&.name || ''
    json.item_clazz d.product_catalog.item_clazz
    json.brand d.product_catalog.brand
    json.specification d.product_catalog.specification
    json.unit d.product_catalog.unit
    json.amount d.amount
    json.total_price d.total_price
    json.source_method d.product_catalog.source_method
    json.custom_clazz d.custom_clazz
    json.supplier d.product_catalog.supplier
    json.delivery_date d.delivery_date
  end
end


json.code 0
json.count @sales_details.total_count
json.msg 'succcess'

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
educode_sales-0.9.98 app/views/educode_sales/sales_details/index.json.jbuilder
educode_sales-0.9.97 app/views/educode_sales/sales_details/index.json.jbuilder
educode_sales-0.9.96 app/views/educode_sales/sales_details/index.json.jbuilder
educode_sales-0.9.95 app/views/educode_sales/sales_details/index.json.jbuilder
educode_sales-0.9.94 app/views/educode_sales/sales_details/index.json.jbuilder
educode_sales-0.9.93 app/views/educode_sales/sales_details/index.json.jbuilder
educode_sales-0.9.92 app/views/educode_sales/sales_details/index.json.jbuilder
educode_sales-0.9.91 app/views/educode_sales/sales_details/index.json.jbuilder
educode_sales-0.9.90 app/views/educode_sales/sales_details/index.json.jbuilder
educode_sales-0.9.89 app/views/educode_sales/sales_details/index.json.jbuilder
educode_sales-0.9.86 app/views/educode_sales/sales_details/index.json.jbuilder