Commit bbd9cb42 authored by hujun's avatar hujun

image

parent 6b3c5f52
...@@ -274,7 +274,7 @@ class ApplyForCost extends Basic ...@@ -274,7 +274,7 @@ class ApplyForCost extends Basic
$store_id[] = $v['store_id']; $store_id[] = $v['store_id'];
} }
$key = $v['id']; $key = $v['id'];
$data[$key] = $v; $data[$key] = $v->toArray();
$data[$key]['type_name'] = $cost_service->getFeeType($v['type']); $data[$key]['type_name'] = $cost_service->getFeeType($v['type']);
$data[$key]['fee_item_name'] = $cost_service->getFeeType($v['fee_item']); $data[$key]['fee_item_name'] = $cost_service->getFeeType($v['fee_item']);
$data[$key]['source_name'] = empty($source[$v['source']]) ? '' : $source[$v['source']]; $data[$key]['source_name'] = empty($source[$v['source']]) ? '' : $source[$v['source']];
...@@ -301,23 +301,20 @@ class ApplyForCost extends Basic ...@@ -301,23 +301,20 @@ class ApplyForCost extends Basic
$img_where['img_type'] = ['in', '1,2']; $img_where['img_type'] = ['in', '1,2'];
$images_array = $image_data = $m_img->findByAll('id,img_name,img_type,img_id', $img_where); //图片 $images_array = $image_data = $m_img->findByAll('id,img_name,img_type,img_id', $img_where); //图片
foreach ($images_array as $v2) { foreach ($images_array as $v2) {
$image_array = $check_image_array = [];
$key = $v2['img_id']; $key = $v2['img_id'];
if ($v2['img_type'] == 1) { if ($v2['img_type'] == 1) {
$image_array[] = [ $image_array = [
'id' => $v2['id'], 'id' => $v2['id'],
'img_name' => $v2['img_name'] 'img_name' => $v2['img_name']
]; ];
array_push($data[$key]['image_array'], $image_array);
} else { } else {
$check_image_array[] = [ $check_image_array = [
'id' => $v2['id'], 'id' => $v2['id'],
'img_name' => $v2['img_name'] 'img_name' => $v2['img_name']
]; ];
array_push($data[$key]['check_image_array'], $check_image_array);
} }
$data[$key]['image_array'] = $image_array;
$data[$key]['check_image_array'] = $check_image_array;
} }
$check_field = 'a.remark,a.create_time,b.name as agent_name,apply_for_id'; $check_field = 'a.remark,a.create_time,b.name as agent_name,apply_for_id';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment