Commit f111439e authored by clone's avatar clone

1

parent 9886c3c8
...@@ -707,6 +707,7 @@ class StoreFeeService ...@@ -707,6 +707,7 @@ class StoreFeeService
public function importStoreFee($file_path) public function importStoreFee($file_path)
{ {
echo 111;
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx(); $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
$reader->setReadDataOnly(true); $reader->setReadDataOnly(true);
$spreadsheet = ""; $spreadsheet = "";
......
...@@ -4502,7 +4502,7 @@ class Finance extends Basic ...@@ -4502,7 +4502,7 @@ class Finance extends Basic
} }
$m_pay_adjustment = new OPayLogAdjustment(); $m_pay_adjustment = new OPayLogAdjustment();
$adjustment_data = $m_pay_adjustment->getAdjustmentList('id,new_paylog_id,paylog_id,money,type,reckon_in_store_id', ['id' => $this->params['id']]); $adjustment_data = $m_pay_adjustment->getAdjustmentList('id,new_paylog_id,paylog_id,money,type,reckon_in_store', ['id' => $this->params['id']]);
if (empty($adjustment_data[0]['id'])) { if (empty($adjustment_data[0]['id'])) {
return $this->response($code, '没有该调整详情'); return $this->response($code, '没有该调整详情');
......
...@@ -124,17 +124,18 @@ class StoreFee extends Basic ...@@ -124,17 +124,18 @@ class StoreFee extends Basic
public function importStoreFee() public function importStoreFee()
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
set_time_limit(0); /* set_time_limit(0);
$file = $_FILES['file']; $file = $_FILES['file'];
$type = request()->param('type'); //excel_import $type = request()->param('type'); //excel_import
$uploadFileService = new UploadFileService(); $uploadFileService = new UploadFileService();
$uploadResult = $uploadFileService->upload($file, $type, 15000000, ['xls', 'xlsx']); $uploadResult = $uploadFileService->upload($file, $type, 15000000, ['xls', 'xlsx']);
if ($uploadResult["code"] == 200) { if ($uploadResult["code"] == 200) {*/
$result = $this->service_->importStoreFee($uploadResult["msg"]); // $result = $this->service_->importStoreFee($uploadResult["msg"]);
return $this->response("200", "excel上传成功", $uploadResult["msg"]); $result = $this->service_->importStoreFee("20190820/20190820110629513.xlsx");
/* return $this->response("200", "excel上传成功", $uploadResult["msg"]);
} else { } else {
return $this->response("101", $uploadResult["msg"]); return $this->response("101", $uploadResult["msg"]);
} }*/
} }
/** /**
......
...@@ -559,7 +559,7 @@ Route::group('index', [ ...@@ -559,7 +559,7 @@ Route::group('index', [
'getStoreOffice' => ['index/Store/getStoreOffice', ['method' => 'GET']],//获取费用承担办公室 'getStoreOffice' => ['index/Store/getStoreOffice', ['method' => 'GET']],//获取费用承担办公室
'creationStoreFee' => ['index/StoreFee/creationStoreFee', ['method' => 'POST|GET']], 'creationStoreFee' => ['index/StoreFee/creationStoreFee', ['method' => 'POST|GET']],
'getStoreFeeDetail' => ['index/StoreFee/getStoreFeeDetail', ['method' => 'POST|GET']], 'getStoreFeeDetail' => ['index/StoreFee/getStoreFeeDetail', ['method' => 'POST|GET']],
'importStoreFee' => ['index/StoreFee/importStoreFee', ['method' => 'POST']], 'importStoreFee' => ['index/StoreFee/importStoreFee', ['method' => 'POST|get']],
'getStoreCostParameterList' => ['index/CostParameter/getStoreCostParameterList', ['method' => 'POST|GET']], 'getStoreCostParameterList' => ['index/CostParameter/getStoreCostParameterList', ['method' => 'POST|GET']],
'editCostParameter' => ['index/CostParameter/editCostParameter', ['method' => 'POST|GET']], 'editCostParameter' => ['index/CostParameter/editCostParameter', ['method' => 'POST|GET']],
......
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