From 0e24d92643c088f2bed004062c41c269f340d276 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 14 Jun 2019 16:36:18 +0800 Subject: [PATCH] tranings: fix bug --- app/views/trainings/pay.html.erb | 8 ++++---- app/views/trainings/result.html.erb | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/trainings/pay.html.erb b/app/views/trainings/pay.html.erb index 4ef654fb..9c4d2b59 100644 --- a/app/views/trainings/pay.html.erb +++ b/app/views/trainings/pay.html.erb @@ -271,7 +271,7 @@ $("#enlistM").html(money); $("#enlistNum").val(num); $("#enlistMoney").val(money); - + $("input[name='enlistNum']").val(num); } } function plusNum(item){ @@ -317,12 +317,12 @@ function billTypeShowFun(index, userInfo){ if (parseInt(index) == 0) { $(".needWrite").removeClass("none"); - $(".billUnit").attr("placeholder", "请填写公司单位名称").val(userInfo.school); - $(".taxNumber").removeClass("none"); + $(".billUnit").attr("placeholder", "请填写公司单位名称").val(userInfo.invoiceTitle || userInfo.school); + $(".taxNumber").removeClass("none").val(userInfo.invoiceNo); } else if (parseInt(index) == 1) { $(".needWrite").removeClass("none"); $(".billUnit").attr("placeholder", "请填写姓名").val(userInfo.name); - $(".taxNumber").addClass("none"); + $(".taxNumber").val('').addClass("none"); } else { $(".needWrite").addClass("none"); $(".billInput").val(''); diff --git a/app/views/trainings/result.html.erb b/app/views/trainings/result.html.erb index c63a24c5..ca1228b3 100644 --- a/app/views/trainings/result.html.erb +++ b/app/views/trainings/result.html.erb @@ -196,6 +196,7 @@ var data = new FormData(); data.append('image', files[0]); + data.append('tag_id', '<%= @tag_id %>'); $.ajax({ url: '<%= update_picture_trainings_path %>',