Commit f5b7d836 authored by clone's avatar clone

1

parent 9361f06b
...@@ -49,6 +49,7 @@ class StoreFee extends Basic ...@@ -49,6 +49,7 @@ class StoreFee extends Basic
'purpose' => 111, //详细用途 'purpose' => 111, //详细用途
'agent_id' => 11,//经纪人id 'agent_id' => 11,//经纪人id
'store_id' => 12,//门店id 'store_id' => 12,//门店id
'office_id' => 12,//办公室id
'site_id' => 10001, //站点id 'site_id' => 10001, //站点id
'card_name' => "123123",//收款卡户名 非必填 'card_name' => "123123",//收款卡户名 非必填
'bank' => "123123",//开户行 非必填 'bank' => "123123",//开户行 非必填
...@@ -65,6 +66,7 @@ class StoreFee extends Basic ...@@ -65,6 +66,7 @@ class StoreFee extends Basic
$total_fee = $params["total_fee"]; $total_fee = $params["total_fee"];
$agent_id = $params["agent_id"]; $agent_id = $params["agent_id"];
$store_id = $params["store_id"]; $store_id = $params["store_id"];
$office_id = $params["office_id"];
$purpose = $params["purpose"]; $purpose = $params["purpose"];
$site_id = $params["site_id"]; $site_id = $params["site_id"];
$card_name = $params["card_name"]; $card_name = $params["card_name"];
...@@ -80,7 +82,7 @@ class StoreFee extends Basic ...@@ -80,7 +82,7 @@ class StoreFee extends Basic
return $this->response("101", "类型选择错误"); return $this->response("101", "类型选择错误");
} }
$is_ok = $this->service_->addApplyFor($type, $fee_item, $total_fee, $agent_id, $store_id, $purpose, $site_id, $card_name, $is_ok = $this->service_->addApplyFor($type, $fee_item, $total_fee, $agent_id, $store_id, $purpose, $site_id, $card_name,
$bank, $card_no, $count_time, $img_arr); $bank, $card_no, $count_time, $img_arr, 0, $office_id);
if ($is_ok > 0) { if ($is_ok > 0) {
return $this->response("200", "request success", []); return $this->response("200", "request success", []);
} else { } else {
...@@ -94,19 +96,20 @@ class StoreFee extends Basic ...@@ -94,19 +96,20 @@ class StoreFee extends Basic
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function getApplyForFeeStore(){ public function getApplyForFeeStore()
{
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"store_id" => 1 "store_id" => 1
);*/ );*/
$storeModel = new AStore(); $storeModel = new AStore();
$field = "a.id,a.office_id,b.office_address"; $field = "a.id,a.office_id,b.office_address";
$office_info = $storeModel->getStoreAndOffice($field,["store_id"=> $params["store_id"]]); $office_info = $storeModel->getStoreAndOffice($field, ["store_id" => $params["store_id"]]);
if($office_info && $office_info[0]["office_id"] > 0){ if ($office_info && $office_info[0]["office_id"] > 0) {
return $this->response("200", "request success", $office_info[0]); return $this->response("200", "request success", $office_info[0]);
}else if ($office_info && $office_info[0]["office_id"] == 0){ } else if ($office_info && $office_info[0]["office_id"] == 0) {
return $this->response("101", "该门店没有绑定办公室"); return $this->response("101", "该门店没有绑定办公室");
}else{ } else {
return $this->response("101", "此门店不存在"); return $this->response("101", "此门店不存在");
} }
} }
......
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