Showing
1 changed file
with
8 additions
and
7 deletions
@@ -6,7 +6,6 @@ var $ = require('jquery'), | @@ -6,7 +6,6 @@ var $ = require('jquery'), | ||
6 | var pricePercent = 0.2; //yoho币审核比例线 | 6 | var pricePercent = 0.2; //yoho币审核比例线 |
7 | var loadModal = null; | 7 | var loadModal = null; |
8 | var importYohoCoinData = null; | 8 | var importYohoCoinData = null; |
9 | -var isNeedAudit = false; | ||
10 | var ENUM = { | 9 | var ENUM = { |
11 | gender: { | 10 | gender: { |
12 | 1: '男', | 11 | 1: '男', |
@@ -150,7 +149,7 @@ function ajaxUploadSubmit(importAuditorId){ | @@ -150,7 +149,7 @@ function ajaxUploadSubmit(importAuditorId){ | ||
150 | location.href = ''; | 149 | location.href = ''; |
151 | }, 1000); | 150 | }, 1000); |
152 | }else{ | 151 | }else{ |
153 | - common.util.__tip(rs.data.message); | 152 | + common.util.__tip(rs.message || rs.data.message); |
154 | } | 153 | } |
155 | },true); | 154 | },true); |
156 | } | 155 | } |
@@ -166,7 +165,6 @@ function showImportMessage(message, statue){ | @@ -166,7 +165,6 @@ function showImportMessage(message, statue){ | ||
166 | //显示批量导入数据表 | 165 | //显示批量导入数据表 |
167 | function showImportTable(data){ | 166 | function showImportTable(data){ |
168 | importYohoCoinData = data.successList; | 167 | importYohoCoinData = data.successList; |
169 | - isNeedAudit = data.isNeedAudit; | ||
170 | 168 | ||
171 | $("#importResultTable").html(common.util.__template2($("#yohoCoinImportResultTable").html(),data)); | 169 | $("#importResultTable").html(common.util.__template2($("#yohoCoinImportResultTable").html(),data)); |
172 | $("#yohoCoinImportResultSet").show(); | 170 | $("#yohoCoinImportResultSet").show(); |
@@ -186,9 +184,11 @@ function clearImportResult(){ | @@ -186,9 +184,11 @@ function clearImportResult(){ | ||
186 | 184 | ||
187 | //批量导入确认—校验审核人 | 185 | //批量导入确认—校验审核人 |
188 | function isNeedImportAuditor(){ | 186 | function isNeedImportAuditor(){ |
189 | - $.each(importYohoCoinData, function(index,value){ | ||
190 | - if(value.isNeedAudit || value.salesPrice * pricePercent <= value.needAuditCoin) return true; | ||
191 | - }); | 187 | + for(var i=0; i < importYohoCoinData.length; i++){ |
188 | + if((importYohoCoinData[i].salesPrice * pricePercent) <= importYohoCoinData[i].needAuditCoin){ | ||
189 | + return true; | ||
190 | + } | ||
191 | + } | ||
192 | return false; | 192 | return false; |
193 | } | 193 | } |
194 | 194 | ||
@@ -303,7 +303,8 @@ $(document).on('click', '.btn-delete-yohoCoin', function() { | @@ -303,7 +303,8 @@ $(document).on('click', '.btn-delete-yohoCoin', function() { | ||
303 | //批量导入结果列表确定 | 303 | //批量导入结果列表确定 |
304 | $(document).on('click', '.btn-submit-yohoCoin', function() { | 304 | $(document).on('click', '.btn-submit-yohoCoin', function() { |
305 | var importAuditorIdInput = $("#importAuditor"); | 305 | var importAuditorIdInput = $("#importAuditor"); |
306 | - if(isNeedImportAuditor()){ | 306 | + var isNeedAuditor = isNeedImportAuditor(); |
307 | + if(isNeedAuditor){ | ||
307 | if(!checkAuditor(importAuditorIdInput)){ | 308 | if(!checkAuditor(importAuditorIdInput)){ |
308 | return false; | 309 | return false; |
309 | } | 310 | } |
-
Please register or login to post a comment