diff --git a/admin/controllers/items/goods/Goods.php b/admin/controllers/items/goods/Goods.php index 0d96473a..a4eb933d 100644 --- a/admin/controllers/items/goods/Goods.php +++ b/admin/controllers/items/goods/Goods.php @@ -277,7 +277,7 @@ class Goods extends HD_Controller } - public function edit_excel() + public function add_excel() { require_once COMMPATH . '/third_party/PHPExcel/IOFactory.php'; $res = $this->upload(); @@ -322,6 +322,7 @@ class Goods extends HD_Controller $cor_id = $re_a0 ? $re_a0['id'] : 0; $re_a2 = $this->mdAutoAttr->get(array('s_id' => $s_id, 'type' => 2, 'title' => $incor_id)); $incor_id = $re_a2 ? $re_a2['id'] : 0; + $pro_time = $pro_time ? gmdate("Y/m/d H:i:s", PHPExcel_Shared_Date::ExcelToPHP($pro_time)) : ''; $addData = array('brand_id' => $brand_id, 's_id' => $s_id, 'v_id' => $v_id, 'cor_id' => $cor_id, 'incor_id' => $incor_id , 'ori_price' => $ori_price, 'vin' => $vin, 'frame_num' => $frame_num, 'stdard_num' => $stdard_num, 'pro_time' => $pro_time, 'c_time' => time()); $id = $this->mdItems->add($addData); @@ -345,7 +346,7 @@ class Goods extends HD_Controller { $config['upload_path'] = $_SERVER['DOCUMENT_ROOT'] . '/temp/'; $config['allowed_types'] = '*';//xls|xlsx - $config['max_size'] = 2 * 1024; + $config['max_size'] = 5 * 1024; $config['file_name'] = 'items_' . time() . rand(1, 99999); $this->load->library('upload', $config); if (!$this->upload->do_upload('file')) { diff --git a/admin/views/items/goods/lists.php b/admin/views/items/goods/lists.php index 375cdd17..006b01c4 100644 --- a/admin/views/items/goods/lists.php +++ b/admin/views/items/goods/lists.php @@ -55,11 +55,8 @@ class="am-btn am-btn-success am-btn-sm w100">新增 -