|
|
@ -4161,7 +4161,7 @@ end
|
|
|
|
sheet1 = book.create_worksheet :name => "sheet"
|
|
|
|
sheet1 = book.create_worksheet :name => "sheet"
|
|
|
|
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
|
|
|
|
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
|
|
|
|
sheet1.row(0).default_format = blue
|
|
|
|
sheet1.row(0).default_format = blue
|
|
|
|
sheet1.row(0).concat(["姓名", "手机号","邮箱","单位名称", "职位","专业", "学号", '培训类型', '授课/研究领域' "支付方式","支付状态","支付时间", "发票类型", "发票抬头","税务登记号", "发票内容", "备注", "微信支付单号", "报名时间"])
|
|
|
|
sheet1.row(0).concat(["姓名", "手机号","邮箱","单位名称", "职位","专业", "学号", '授课/研究领域' "支付方式","支付状态","支付时间", "发票类型", "发票抬头","税务登记号", "发票内容", "备注", "微信支付单号", "报名时间"])
|
|
|
|
count_row = 1
|
|
|
|
count_row = 1
|
|
|
|
trainings.find_each do |t|
|
|
|
|
trainings.find_each do |t|
|
|
|
|
sheet1[count_row, 0] = t.name
|
|
|
|
sheet1[count_row, 0] = t.name
|
|
|
@ -4171,18 +4171,17 @@ end
|
|
|
|
sheet1[count_row, 4] = t.position
|
|
|
|
sheet1[count_row, 4] = t.position
|
|
|
|
sheet1[count_row, 5] = t.major
|
|
|
|
sheet1[count_row, 5] = t.major
|
|
|
|
sheet1[count_row, 6] = t.student_id
|
|
|
|
sheet1[count_row, 6] = t.student_id
|
|
|
|
sheet1[count_row, 7] = t.training_category
|
|
|
|
sheet1[count_row, 7] = t.research_field
|
|
|
|
sheet1[count_row, 8] = t.research_field
|
|
|
|
sheet1[count_row, 8] = t.training_payinfo.try(:pay_type_str)
|
|
|
|
sheet1[count_row, 9] = t.training_payinfo.try(:pay_type_str)
|
|
|
|
sheet1[count_row, 9] = t.training_payinfo.try(:pay_status_str)
|
|
|
|
sheet1[count_row, 10] = t.training_payinfo.try(:pay_status_str)
|
|
|
|
sheet1[count_row, 10] = format_time t.training_payinfo.try(:pay_time)
|
|
|
|
sheet1[count_row, 11] = format_time t.training_payinfo.try(:pay_time)
|
|
|
|
sheet1[count_row, 11] = t.training_payinfo.try(:invoice_title).present? ? '需要' : '不需要'
|
|
|
|
sheet1[count_row, 12] = t.training_payinfo.try(:invoice_title).present? ? '需要' : '不需要'
|
|
|
|
sheet1[count_row, 12] = t.training_payinfo.try(:invoice_title)
|
|
|
|
sheet1[count_row, 13] = t.training_payinfo.try(:invoice_title)
|
|
|
|
sheet1[count_row, 13] = t.training_payinfo.try(:invoice_no)
|
|
|
|
sheet1[count_row, 14] = t.training_payinfo.try(:invoice_no)
|
|
|
|
sheet1[count_row, 14] = t.training_payinfo.try(:invoice_content)
|
|
|
|
sheet1[count_row, 15] = t.training_payinfo.try(:invoice_content)
|
|
|
|
sheet1[count_row, 15] = t.training_payinfo.try(:info)
|
|
|
|
sheet1[count_row, 16] = t.training_payinfo.try(:info)
|
|
|
|
sheet1[count_row, 16] = t.training_payinfo.try(:out_trade_no)
|
|
|
|
sheet1[count_row, 17] = t.training_payinfo.try(:out_trade_no)
|
|
|
|
sheet1[count_row, 17] = format_time t.created_at
|
|
|
|
sheet1[count_row, 18] = format_time t.created_at
|
|
|
|
|
|
|
|
count_row += 1
|
|
|
|
count_row += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
book.write xls_report
|
|
|
|
book.write xls_report
|
|
|
|