|
@@ -397,23 +397,28 @@ class Filing extends Base
|
|
|
->findOrEmpty();
|
|
|
if (empty($rs)) return json_show(1005, '该报备单不存在或不允许审核');
|
|
|
|
|
|
- $userCommon = \app\admin\common\User::getIns();
|
|
|
- $company = $userCommon->handle('cInfo', ['companyNo' => $param['companyCode']]);
|
|
|
- if (!isset($company['data'])) return json_show(1005, '该客户不存在');
|
|
|
- $tmp = Db::name('platform')
|
|
|
- ->where(['is_del' => 0, 'id' => $param['platform_id']])
|
|
|
- ->field('id,is_select_pay_rate,status')
|
|
|
- ->findOrEmpty();
|
|
|
- if (empty($tmp)) return json_show(1005, '该平台不存在');
|
|
|
- if ($tmp['status'] != 1) return error_show(1004, "平台信息已禁用");
|
|
|
- if($tmp['is_select_pay_rate']==1 && channel_is_company($param['platform_id'],$rs['customerCode']))return
|
|
|
- error_show(1004, "平台渠道包含当前业务公司 {$rs['customerName']}");
|
|
|
+ $companyName='';
|
|
|
+ if($param["is_check"]==2){
|
|
|
+ $userCommon = \app\admin\common\User::getIns();
|
|
|
+ $company = $userCommon->handle('cInfo', ['companyNo' => $param['companyCode']]);
|
|
|
+ if (!isset($company['data'])) return json_show(1005, '该客户不存在');
|
|
|
+ $companyName=$company['data']['companyName']??"";
|
|
|
+ $tmp = Db::name('platform')
|
|
|
+ ->where(['is_del' => 0, 'id' => $param['platform_id']])
|
|
|
+ ->field('id,is_select_pay_rate,status')
|
|
|
+ ->findOrEmpty();
|
|
|
+ if (empty($tmp)) return json_show(1005, '该平台不存在');
|
|
|
+ if ($tmp['status'] != 1) return error_show(1004, '平台信息已禁用');
|
|
|
+ if($tmp['is_select_pay_rate']==1 && channel_is_company($param['platform_id'],$rs['customerCode']))return
|
|
|
+ error_show(1004, "平台渠道包含当前业务公司 {$rs['customerName']}");
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
//校验支付渠道中的业务公司是否与报备单业务公司重复
|
|
|
|
|
|
$update = array_merge($param, [
|
|
|
- 'companyName' => $company['data']['companyName'],
|
|
|
+ 'companyName' => $companyName,
|
|
|
"status"=>$param["is_check"],
|
|
|
'updaterid' => $this->uid,
|
|
|
'updater' => $this->uname,
|