下游订单生成bug修正

master
zhengyongxing 5 years ago
parent 122a27634b
commit 63b44a78ff

@ -258,7 +258,9 @@
data = response.data; data = response.data;
console.log(data) console.log(data)
for (var i in data){ for (var i in data){
add += "<option company_id='"+data[i].company_id+"' value='"+data[i].company_id+"' "+('selected')+">"+data[i].company_name+"</option>" if (data[i].company_id) {
add += "<option company_id='" + data[i].company_id + "' value='" + data[i].company_id + "' " + ('selected') + ">" + data[i].company_name + "</option>"
}
} }
$("#company_name").empty(); $("#company_name").empty();
$("#company_name").append(add); $("#company_name").append(add);
@ -314,7 +316,7 @@
"<td class='sumAmount' data-value='"+sumAmount+"'>"+sumAmount+"</td>" + "<td class='sumAmount' data-value='"+sumAmount+"'>"+sumAmount+"</td>" +
"<td>-</td>" + "<td>-</td>" +
"<td>-</td>" + "<td>-</td>" +
"<td class='sumAll' data-value='"+sum+"'>"+sum+"</td>" + "<td class='sumAll' data-value='"+sum.toFixed(2)+"'>"+sum.toFixed(2)+"</td>" +
"</tr>"+ "</tr>"+
"<tr><td colspan='3'>\n" + "<tr><td colspan='3'>\n" +
"本月分成总金额(人民币大写)</td>" + "本月分成总金额(人民币大写)</td>" +
@ -336,7 +338,7 @@
console.log(ext_field); console.log(ext_field);
$("tbody").empty(); $("tbody").empty();
$("#company_name").val(""); // $("#company_name").val("");
$("#settlement_type").text(""); $("#settlement_type").text("");
$("#bank_card").val(""); $("#bank_card").val("");
$("#account_openin").val(""); $("#account_openin").val("");
@ -358,7 +360,7 @@
success:function(data){ success:function(data){
console.log($("#company_name option:selected").attr('company-type')) console.log($("#company_name option:selected").attr('company-type'))
$("#company_name").val(data.data.company_name); // $("#company_name").val(data.data.company_name);
$("#settlement_type").text(data.data.settlement_type); $("#settlement_type").text(data.data.settlement_type);
$("#bank_card").val(data.data.bank_card); $("#bank_card").val(data.data.bank_card);
$("#account_openin").val(data.data.account_openin); $("#account_openin").val(data.data.account_openin);
@ -377,10 +379,14 @@
dataType: 'json', dataType: 'json',
success: function (response) { success: function (response) {
add +='<option value="">体现单号</option>'; add +='<option value="">体现单号</option>';
data = response.data; var datas = response.data;
console.log(data)
for (var i in data){ var widthdrawNumber = datas[0].widthdraw_number;
add += "<option value='"+data[i].widthdraw_number+"' "+('selected')+">"+data[i].widthdraw_number+"</option>"
console.log(datas)
for (var i in datas){
add += "<option value='"+datas[i].widthdraw_number+"' "+(datas[i].widthdraw_number == widthdrawNumber?'selected':'')+">"+datas[i].widthdraw_number+"</option>"
} }
$("#ext_field").empty(); $("#ext_field").empty();
$("#ext_field").append(add); $("#ext_field").append(add);

Loading…
Cancel
Save