Commit f5b7d836 authored by clone's avatar clone

1

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