master
tping 4 years ago
parent 0d52dc7d61
commit ff4975bacb

@ -409,6 +409,15 @@ class PartnerController extends ThinkController
$model = M("partner_verify", 'tab_');
if ($_POST) {
$save = I("post.");
$save['relation']['collaborate_way'] = $save['part_a_type'];
if ($save['part_a_type'] == 1) {
$save['relation']['self_company_id'] = $save['part_b'];
}
if ($save['part_a_type'] == 2) {
$save['relation']['self_company_id'] = $save['part_a'];
}
$this->checkData($save);
try {
@ -434,14 +443,6 @@ class PartnerController extends ThinkController
$this->error('已存在同名cp,请勿重复添加');
}
$save['relation']['collaborate_way'] = $save['part_a_type'];
if ($save['part_a_type'] == 1) {
$save['relation']['self_company_id'] = $save['part_b'];
}
if ($save['part_a_type'] == 2) {
$save['relation']['self_company_id'] = $save['part_a'];
}
$res =D("PartnerVerify")->add_db($save);
if ($res) {
//操作日志

@ -460,6 +460,14 @@ class PromoteCompanyController extends ThinkController
$save['promotes'] = json_decode($save['promotes'], true);
$save['relation']['collaborate_way'] = $save['part_a_type'];
if ($save['part_a_type'] == 1) {
$save['relation']['self_company_id'] = $save['part_b'];
}
if ($save['part_a_type'] == 2) {
$save['relation']['self_company_id'] = $save['part_a'];
}
$this->checkData($save);
$presidentDepositService = new PresidentDepositService();
@ -480,14 +488,6 @@ class PromoteCompanyController extends ThinkController
$save['create_time'] = $time;
$save['turnover_ratio'] = $this->setTurnoverRatio($save);
$save['relation']['collaborate_way'] = $save['part_a_type'];
if ($save['part_a_type'] == 1) {
$save['relation']['self_company_id'] = $save['part_b'];
}
if ($save['part_a_type'] == 2) {
$save['relation']['self_company_id'] = $save['part_a'];
}
$result = D("PromoteCompanyVerify")->add_db($save);
if ($result) {
addOperationLog(['op_type'=>0,'key'=>$save['company_name'],'op_name'=>'新增推广公司','url'=>U('PromoteCompany/lists')]);
@ -675,6 +675,15 @@ class PromoteCompanyController extends ThinkController
{
if ($_POST) {
$save = I('post.');//前端已经验证
$save['relation']['collaborate_way'] = $save['part_a_type'];
if ($save['part_a_type'] == 1) {
$save['relation']['self_company_id'] = $save['part_b'];
}
if ($save['part_a_type'] == 2) {
$save['relation']['self_company_id'] = $save['part_a'];
}
$this->checkData($save);
$promoteCompanyService = new PromoteCompanyService();
@ -699,14 +708,6 @@ class PromoteCompanyController extends ThinkController
));
}
$save['relation']['collaborate_way'] = $save['part_a_type'];
if ($save['part_a_type'] == 1) {
$save['relation']['self_company_id'] = $save['part_b'];
}
if ($save['part_a_type'] == 2) {
$save['relation']['self_company_id'] = $save['part_a'];
}
$save['turnover_ratio'] = $this->setTurnoverRatio($save);
$res = D("PromoteCompanyVerify")->edit_db($save);
if ($res) {

Loading…
Cancel
Save