|
@@ -502,11 +502,11 @@ class Todo extends Auth
|
|
->setCellValue('T1', '所在科室/部门')
|
|
->setCellValue('T1', '所在科室/部门')
|
|
->setCellValue('U1', '来源')
|
|
->setCellValue('U1', '来源')
|
|
->setCellValue('V1', '部门分类')
|
|
->setCellValue('V1', '部门分类')
|
|
- ->setCellValue('W1', '签名图')
|
|
|
|
- ->setCellValue('X1', '物品名称')
|
|
|
|
- ->setCellValue('Y1', '单价')
|
|
|
|
- ->setCellValue('Z1', '数量')
|
|
|
|
- ->setCellValue('AA1', '总价');
|
|
|
|
|
|
+ ->setCellValue('W1', '物品名称')
|
|
|
|
+ ->setCellValue('X1', '单价')
|
|
|
|
+ ->setCellValue('Y1', '数量')
|
|
|
|
+ ->setCellValue('Z1', '总价')
|
|
|
|
+ ->setCellValue('AA1', '签名图');
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
if ($mode == 3) {
|
|
if ($mode == 3) {
|
|
@@ -644,55 +644,55 @@ class Todo extends Auth
|
|
$objPHPExcel->getActiveSheet()->setCellValue('U' . ($i + 2), $lists[$i]['source_type_text']);
|
|
$objPHPExcel->getActiveSheet()->setCellValue('U' . ($i + 2), $lists[$i]['source_type_text']);
|
|
$objPHPExcel->getActiveSheet()->setCellValue('V' . ($i + 2), $lists[$i]['dep_cate_name']);
|
|
$objPHPExcel->getActiveSheet()->setCellValue('V' . ($i + 2), $lists[$i]['dep_cate_name']);
|
|
|
|
|
|
- $signList = explode(".",$lists[$i]['sign']);
|
|
|
|
- if($signList){
|
|
|
|
- $ext = end($signList);
|
|
|
|
- $img ='';
|
|
|
|
- if ($ext == 'jpg' || $ext == 'jpeg'){
|
|
|
|
- $img = @imagecreatefromjpeg($lists[$i]['sign']);
|
|
|
|
- }
|
|
|
|
- if ($ext == 'png'){
|
|
|
|
- $img = @imagecreatefrompng($lists[$i]['sign']);
|
|
|
|
- }
|
|
|
|
- if($img){
|
|
|
|
- //实例化图片操作类
|
|
|
|
- $objDrawing = new \PHPExcel_Worksheet_MemoryDrawing();
|
|
|
|
- $objDrawing->setImageResource($img);
|
|
|
|
- $objDrawing->setRenderingFunction(\PHPExcel_Worksheet_MemoryDrawing::RENDERING_DEFAULT);//渲染方法
|
|
|
|
-
|
|
|
|
- $objDrawing->setMimeType(\PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT);
|
|
|
|
-
|
|
|
|
- $objDrawing->setHeight(40);//照片高度
|
|
|
|
- $objDrawing->setWidth(40); //照片宽度
|
|
|
|
- $objDrawing->setCoordinates('W'.($i+2));//图片要插入的单元格
|
|
|
|
-
|
|
|
|
- $objDrawing->setOffsetX(8);//图片X轴偏移
|
|
|
|
- $objDrawing->setOffsetY(8);//图片Y轴偏移
|
|
|
|
- $objDrawing->setWorksheet($objPHPExcel->getActiveSheet());
|
|
|
|
- //设置每一行高度
|
|
|
|
-
|
|
|
|
- }else{
|
|
|
|
- $objPHPExcel->getActiveSheet()->setCellValue('W' . ($i + 2), '');
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- }else{
|
|
|
|
- $objPHPExcel->getActiveSheet()->setCellValue('W' . ($i + 2), '');
|
|
|
|
- }
|
|
|
|
- $objActSheet->getRowDimension($i + 2)->setRowHeight(40); // 行高
|
|
|
|
|
|
+// $signList = explode(".",$lists[$i]['sign']);
|
|
|
|
+// if($signList){
|
|
|
|
+// $ext = end($signList);
|
|
|
|
+// $img ='';
|
|
|
|
+// if ($ext == 'jpg' || $ext == 'jpeg'){
|
|
|
|
+// $img = @imagecreatefromjpeg($lists[$i]['sign']);
|
|
|
|
+// }
|
|
|
|
+// if ($ext == 'png'){
|
|
|
|
+// $img = @imagecreatefrompng($lists[$i]['sign']);
|
|
|
|
+// }
|
|
|
|
+// if($img){
|
|
|
|
+// //实例化图片操作类
|
|
|
|
+// $objDrawing = new \PHPExcel_Worksheet_MemoryDrawing();
|
|
|
|
+// $objDrawing->setImageResource($img);
|
|
|
|
+// $objDrawing->setRenderingFunction(\PHPExcel_Worksheet_MemoryDrawing::RENDERING_DEFAULT);//渲染方法
|
|
|
|
+//
|
|
|
|
+// $objDrawing->setMimeType(\PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT);
|
|
|
|
+//
|
|
|
|
+// $objDrawing->setHeight(40);//照片高度
|
|
|
|
+// $objDrawing->setWidth(40); //照片宽度
|
|
|
|
+// $objDrawing->setCoordinates('W'.($i+2));//图片要插入的单元格
|
|
|
|
+//
|
|
|
|
+// $objDrawing->setOffsetX(8);//图片X轴偏移
|
|
|
|
+// $objDrawing->setOffsetY(8);//图片Y轴偏移
|
|
|
|
+// $objDrawing->setWorksheet($objPHPExcel->getActiveSheet());
|
|
|
|
+// //设置每一行高度
|
|
|
|
+//
|
|
|
|
+// }else{
|
|
|
|
+// $objPHPExcel->getActiveSheet()->setCellValue('W' . ($i + 2), '');
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+//
|
|
|
|
+// }else{
|
|
|
|
+// $objPHPExcel->getActiveSheet()->setCellValue('W' . ($i + 2), '');
|
|
|
|
+// }
|
|
|
|
+// $objActSheet->getRowDimension($i + 2)->setRowHeight(40); // 行高
|
|
|
|
|
|
|
|
|
|
$goodsName = $goodsPrice = $goodsNum = $goodsTotal = '';
|
|
$goodsName = $goodsPrice = $goodsNum = $goodsTotal = '';
|
|
if(empty($lists[$i]['cons'])){
|
|
if(empty($lists[$i]['cons'])){
|
|
|
|
+ $objPHPExcel->getActiveSheet()->setCellValue('W' . ($i + 2), "");
|
|
$objPHPExcel->getActiveSheet()->setCellValue('X' . ($i + 2), "");
|
|
$objPHPExcel->getActiveSheet()->setCellValue('X' . ($i + 2), "");
|
|
$objPHPExcel->getActiveSheet()->setCellValue('Y' . ($i + 2), "");
|
|
$objPHPExcel->getActiveSheet()->setCellValue('Y' . ($i + 2), "");
|
|
$objPHPExcel->getActiveSheet()->setCellValue('Z' . ($i + 2), "");
|
|
$objPHPExcel->getActiveSheet()->setCellValue('Z' . ($i + 2), "");
|
|
- $objPHPExcel->getActiveSheet()->setCellValue('AA' . ($i + 2), "");
|
|
|
|
}else{
|
|
}else{
|
|
|
|
+ $objPHPExcel->getActiveSheet()->getStyle('W'.($i + 2))->getAlignment()->setWrapText(true);
|
|
$objPHPExcel->getActiveSheet()->getStyle('X'.($i + 2))->getAlignment()->setWrapText(true);
|
|
$objPHPExcel->getActiveSheet()->getStyle('X'.($i + 2))->getAlignment()->setWrapText(true);
|
|
$objPHPExcel->getActiveSheet()->getStyle('Y'.($i + 2))->getAlignment()->setWrapText(true);
|
|
$objPHPExcel->getActiveSheet()->getStyle('Y'.($i + 2))->getAlignment()->setWrapText(true);
|
|
$objPHPExcel->getActiveSheet()->getStyle('Z'.($i + 2))->getAlignment()->setWrapText(true);
|
|
$objPHPExcel->getActiveSheet()->getStyle('Z'.($i + 2))->getAlignment()->setWrapText(true);
|
|
- $objPHPExcel->getActiveSheet()->getStyle('AA'.($i + 2))->getAlignment()->setWrapText(true);
|
|
|
|
|
|
|
|
foreach ($lists[$i]['cons'] as $kk=>$vv){
|
|
foreach ($lists[$i]['cons'] as $kk=>$vv){
|
|
$goodsName.= $vv['title']."\r\n";
|
|
$goodsName.= $vv['title']."\r\n";
|
|
@@ -700,12 +700,12 @@ class Todo extends Auth
|
|
$goodsNum.= $vv['money']."\r\n";
|
|
$goodsNum.= $vv['money']."\r\n";
|
|
$goodsTotal.= $vv['total_money']."\r\n";
|
|
$goodsTotal.= $vv['total_money']."\r\n";
|
|
}
|
|
}
|
|
- $objPHPExcel->getActiveSheet()->setCellValue('X' . ($i + 2), $goodsName);
|
|
|
|
- $objPHPExcel->getActiveSheet()->setCellValue('Y' . ($i + 2), $goodsPrice);
|
|
|
|
- $objPHPExcel->getActiveSheet()->setCellValue('Z' . ($i + 2), $goodsNum);
|
|
|
|
- $objPHPExcel->getActiveSheet()->setCellValue('AA' . ($i + 2), $goodsTotal);
|
|
|
|
|
|
+ $objPHPExcel->getActiveSheet()->setCellValue('W' . ($i + 2), $goodsName);
|
|
|
|
+ $objPHPExcel->getActiveSheet()->setCellValue('X' . ($i + 2), $goodsPrice);
|
|
|
|
+ $objPHPExcel->getActiveSheet()->setCellValue('Y' . ($i + 2), $goodsNum);
|
|
|
|
+ $objPHPExcel->getActiveSheet()->setCellValue('Z' . ($i + 2), $goodsTotal);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ $objPHPExcel->getActiveSheet()->setCellValue('AA' . ($i + 2), $lists[$i]['sign']);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
else {
|