Authored by dongjunjie

yoho币bug

@@ -146,7 +146,9 @@ function ajaxUploadSubmit(importAuditorId){ @@ -146,7 +146,9 @@ function ajaxUploadSubmit(importAuditorId){
146 },function(rs){ 146 },function(rs){
147 if(rs.code == 200){ 147 if(rs.code == 200){
148 common.util.__tip("批量导入保存成功!", "success"); 148 common.util.__tip("批量导入保存成功!", "success");
149 - location.href = ''; 149 + setTimeout(function() {
  150 + location.href = '';
  151 + }, 1000);
150 }else{ 152 }else{
151 common.util.__tip(rs.data.message); 153 common.util.__tip(rs.data.message);
152 } 154 }
@@ -182,6 +184,14 @@ function clearImportResult(){ @@ -182,6 +184,14 @@ function clearImportResult(){
182 $("#yohoCoinImportResult").hide(); 184 $("#yohoCoinImportResult").hide();
183 } 185 }
184 186
  187 +//批量导入确认—校验审核人
  188 +function isNeedImportAuditor(){
  189 + $.each(importYohoCoinData, function(index,value){
  190 + if(value.isNeedAudit || value.salesPrice * pricePercent <= value.needAuditCoin) return true;
  191 + });
  192 + return false;
  193 +}
  194 +
185 //吊牌价跟销售价校验 195 //吊牌价跟销售价校验
186 function checkPrice(retailPrice, salesPrice){ 196 function checkPrice(retailPrice, salesPrice){
187 if(retailPrice == salesPrice){ 197 if(retailPrice == salesPrice){
@@ -293,7 +303,7 @@ $(document).on('click', '.btn-delete-yohoCoin', function() { @@ -293,7 +303,7 @@ $(document).on('click', '.btn-delete-yohoCoin', function() {
293 //批量导入结果列表确定 303 //批量导入结果列表确定
294 $(document).on('click', '.btn-submit-yohoCoin', function() { 304 $(document).on('click', '.btn-submit-yohoCoin', function() {
295 var importAuditorIdInput = $("#importAuditor"); 305 var importAuditorIdInput = $("#importAuditor");
296 - if(isNeedAudit){ 306 + if(isNeedImportAuditor()){
297 if(!checkAuditor(importAuditorIdInput)){ 307 if(!checkAuditor(importAuditorIdInput)){
298 return false; 308 return false;
299 } 309 }
@@ -128,14 +128,14 @@ @@ -128,14 +128,14 @@
128 <div class="dataTables_wrapper no-footer" id="yohoCoin_table"></div> 128 <div class="dataTables_wrapper no-footer" id="yohoCoin_table"></div>
129 129
130 <div class="panel bulk-import" id="yohoCoin_import"> 130 <div class="panel bulk-import" id="yohoCoin_import">
131 - <a id="return-btn" href="javascript:;" class="btn btn-primary">返回列表</a> 131 + <a id="return-btn" href="javascript:;" class="btn btn-info">返回列表</a>
132 132
133 <table class="table table-bordered" style="border:1px solid #ddd; margin-top: 10px"> 133 <table class="table table-bordered" style="border:1px solid #ddd; margin-top: 10px">
134 <tr> 134 <tr>
135 <td width="120px" style="line-height: 37px"><b>上传EXCEL:</b></td> 135 <td width="120px" style="line-height: 37px"><b>上传EXCEL:</b></td>
136 <td style="position: relative;"> 136 <td style="position: relative;">
137 <input id="yohoCoinUpload" name="file" type="file" style="cursor: pointer; height: 37px; top: 8px;"> 137 <input id="yohoCoinUpload" name="file" type="file" style="cursor: pointer; height: 37px; top: 8px;">
138 - <div class="file-name btn btn-info">请选择文件</div> 138 + <div class="file-name btn btn-primary">请选择文件</div>
139 </td> 139 </td>
140 </tr> 140 </tr>
141 <tr> 141 <tr>