lvhao 11 часов назад
Родитель
Сommit
74b05d8e05
1 измененных файлов с 12 добавлено и 0 удалено
  1. 12 0
      core/CoreApp/controllers/Whlabel.php

+ 12 - 0
core/CoreApp/controllers/Whlabel.php

@@ -1114,6 +1114,7 @@ class Whlabel extends Start_Controller
 				$rows[$key]['cs'] =  $u9_info['jm'];
 				$rows[$key]['cs'] =  $u9_info['jm'];
 				$sd = $this->whlabel->find_all($where . ' and sku = "' . $value['sku'] . '" and warehouse = "' . $value['warehouse'] . '" and features = "' . $value['features'] . '"', 'details,cpid,cpbz,state');
 				$sd = $this->whlabel->find_all($where . ' and sku = "' . $value['sku'] . '" and warehouse = "' . $value['warehouse'] . '" and features = "' . $value['features'] . '"', 'details,cpid,cpbz,state');
 				$details = array();
 				$details = array();
+				$details_num = [];
 				$cpid = array();
 				$cpid = array();
 				$cpbz = array();
 				$cpbz = array();
 				$c = 0;
 				$c = 0;
@@ -1141,6 +1142,11 @@ class Whlabel extends Start_Controller
 					if ($v['state'] == "3" || $v['state'] == "4" || $v['state'] == "5" || $v['state'] == "6" || $v['state'] == "7") {
 					if ($v['state'] == "3" || $v['state'] == "4" || $v['state'] == "5" || $v['state'] == "6" || $v['state'] == "7") {
 						$q++;
 						$q++;
 					}
 					}
+					if(isset($details_num[$v['details']])){
+						$details_num[$v['details']] = $details_num[$v['details']] + 1;
+					}else{
+						$details_num[$v['details']] = 1;
+					}
 					$details[$v['details']] = $v['details'];
 					$details[$v['details']] = $v['details'];
 					if ($v['cpid'] != 0) {
 					if ($v['cpid'] != 0) {
 						$cpid[$v['cpid']] = $v['cpid'];
 						$cpid[$v['cpid']] = $v['cpid'];
@@ -1161,6 +1167,11 @@ class Whlabel extends Start_Controller
 				$rows[$key]['s'] = $s;
 				$rows[$key]['s'] = $s;
 				$rows[$key]['q'] = $q;
 				$rows[$key]['q'] = $q;
 				$rows[$key]['wzsl'] = count($details);
 				$rows[$key]['wzsl'] = count($details);
+				$wzlpsl_str= "";
+				foreach($details_num as $kk => $vv){
+					$wzlpsl_str .= $kk . ":" . $vv . " <br/>";
+				}
+				$rows[$key]['wzlpsl'] = trim($wzlpsl_str,"<br/>");
 				//cpbzs
 				//cpbzs
 				$tmp_cpbzs = explode(',', $value['cpbzs']);
 				$tmp_cpbzs = explode(',', $value['cpbzs']);
 				$unique_arr = array_unique($tmp_cpbzs);
 				$unique_arr = array_unique($tmp_cpbzs);
@@ -1187,6 +1198,7 @@ class Whlabel extends Start_Controller
 			<td>删除数量</td>
 			<td>删除数量</td>
 			<td>其它操作</td>
 			<td>其它操作</td>
 			<td>位置数量</td>
 			<td>位置数量</td>
+			<td>位置货物数量</td>
             </tr>
             </tr>
             </table>";
             </table>";
 			$filename = $title . ".xls";
 			$filename = $title . ".xls";