lvhao 7 часов назад
Родитель
Сommit
79a5cddb95
2 измененных файлов с 9 добавлено и 3 удалено
  1. 8 2
      core/CoreApp/controllers/Returns.php
  2. 1 1
      template/erp/returns.html

+ 8 - 2
core/CoreApp/controllers/Returns.php

@@ -733,7 +733,7 @@ class Returns extends Start_Controller {
 					'xh'=>isset($value['退货箱号'])?$value['退货箱号']:'',
 					'xh'=>isset($value['退货箱号'])?$value['退货箱号']:'',
 				];
 				];
 			}
 			}
-
+			$count_i = 0;
 			foreach($list as $key => $value){
 			foreach($list as $key => $value){
 				$info = $this->returns->get_torderinfo($value[0]['torderinfo']);
 				$info = $this->returns->get_torderinfo($value[0]['torderinfo']);
 				if(empty($info)){
 				if(empty($info)){
@@ -795,9 +795,15 @@ class Returns extends Start_Controller {
 					'received' => $received_str,
 					'received' => $received_str,
 					'xh' => $xh_str,
 					'xh' => $xh_str,
 				],$info['id']);
 				],$info['id']);
+				$count_i++;
 
 
 			}
 			}
-			echo json_encode(array('msg'=>'提交完成','success'=>true,'data'=>$err_list));exit;
+			if(!empty($err_list)){
+				$msg = $count_i."条已导入成功,".count($err_list)."条导入失败!下载导入失败清单。";
+			}else{
+				$msg = "全部数据导入成功";
+			}
+			echo json_encode(array('msg'=>$msg,'success'=>true,'data'=>$err_list));exit;	
 		}else{
 		}else{
 			echo json_encode(array('msg'=>'参数错误','success'=>false));exit;
 			echo json_encode(array('msg'=>'参数错误','success'=>false));exit;
 		}
 		}

+ 1 - 1
template/erp/returns.html

@@ -178,7 +178,7 @@ function  doSendExcel(jsonData){
             layx.destroy('loadId');
             layx.destroy('loadId');
             if (a && a.success) {
             if (a && a.success) {
                 if(a.data.length >  0){
                 if(a.data.length >  0){
-                    layx.confirm('提示','是否下载不符合条件的数据',null,{
+                    layx.confirm('提示',a.msg,null,{
                         buttons:[
                         buttons:[
                             {
                             {
                                 label:'确定',
                                 label:'确定',