|
|
|
@ -209,21 +209,12 @@ class PartnerController extends ThinkController
|
|
|
|
|
if (!strlen(I('is_sign_contract'))) {
|
|
|
|
|
$this->error('请选择是否签署合同');
|
|
|
|
|
}
|
|
|
|
|
if (empty(I('settlement_type'))) {
|
|
|
|
|
$this->error('请选择结算方式');
|
|
|
|
|
}
|
|
|
|
|
if (empty(I('company_type'))) {
|
|
|
|
|
$this->error('请输入公司性质');
|
|
|
|
|
}
|
|
|
|
|
if (!strlen(I('has_game_evidence'))) {
|
|
|
|
|
$this->error('请选择是否有游戏资质');
|
|
|
|
|
}
|
|
|
|
|
if (empty(I('link_man'))) {
|
|
|
|
|
$this->error('请输入联系人');
|
|
|
|
|
}
|
|
|
|
|
if (empty(I('link_phone'))) {
|
|
|
|
|
$this->error('请输入联系电话');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -234,13 +225,16 @@ class PartnerController extends ThinkController
|
|
|
|
|
$this->error('合作方已存在');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!checkPhone(I('link_phone'))) {
|
|
|
|
|
if(!empty(I('link_phone')) && !checkPhone(I('link_phone'))) {
|
|
|
|
|
$this->error('联系电话格式不正确');
|
|
|
|
|
}
|
|
|
|
|
$res2 = $model->where(['link_phone' => I('link_phone')])->getField('id');
|
|
|
|
|
if ($res2) {
|
|
|
|
|
$this->error('已存在此联系电话');
|
|
|
|
|
if(!empty(I('link_phone'))){
|
|
|
|
|
$res2 = $model->where(['link_phone' => I('link_phone')])->getField('id');
|
|
|
|
|
if ($res2) {
|
|
|
|
|
$this->error('已存在此联系电话');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$time = time();
|
|
|
|
|
$save['partner'] = $partner;
|
|
|
|
|
$save['status'] = $status;
|
|
|
|
@ -307,21 +301,12 @@ class PartnerController extends ThinkController
|
|
|
|
|
if (!strlen(I('is_sign_contract'))) {
|
|
|
|
|
$this->error('请选择是否签署合同');
|
|
|
|
|
}
|
|
|
|
|
if (empty(I('settlement_type'))) {
|
|
|
|
|
$this->error('请选择结算方式');
|
|
|
|
|
}
|
|
|
|
|
if (empty(I('company_type'))) {
|
|
|
|
|
$this->error('请输入公司性质');
|
|
|
|
|
}
|
|
|
|
|
if (!strlen(I('has_game_evidence'))) {
|
|
|
|
|
$this->error('请选择是否有游戏资质');
|
|
|
|
|
}
|
|
|
|
|
if (empty(I('link_man'))) {
|
|
|
|
|
$this->error('请输入联系人');
|
|
|
|
|
}
|
|
|
|
|
if (empty(I('link_phone'))) {
|
|
|
|
|
$this->error('请输入联系电话');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$data = $model
|
|
|
|
|
->field('id,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank')
|
|
|
|
@ -336,17 +321,20 @@ class PartnerController extends ThinkController
|
|
|
|
|
$this->error('合作方已存在');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!checkPhone(I('link_phone'))) {
|
|
|
|
|
if(!empty(I('link_phone')) && !checkPhone(I('link_phone'))) {
|
|
|
|
|
$this->error('联系电话格式不正确');
|
|
|
|
|
}
|
|
|
|
|
$res2 = $model->where([
|
|
|
|
|
'link_phone' => I('link_phone'),
|
|
|
|
|
'id' => ['neq', $id]
|
|
|
|
|
])->getField('id');
|
|
|
|
|
|
|
|
|
|
if ($res2) {
|
|
|
|
|
$this->error('已存在此联系电话');
|
|
|
|
|
if(!empty(I('link_phone'))){
|
|
|
|
|
$res2 = $model->where([
|
|
|
|
|
'link_phone' => I('link_phone'),
|
|
|
|
|
'id' => ['neq', $id]
|
|
|
|
|
])->getField('id');
|
|
|
|
|
|
|
|
|
|
if ($res2) {
|
|
|
|
|
$this->error('已存在此联系电话');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$time = time();
|
|
|
|
|
$save['id'] = $id;
|
|
|
|
|
$save['partner'] = $partner;
|
|
|
|
@ -394,11 +382,17 @@ class PartnerController extends ThinkController
|
|
|
|
|
if (empty($data)) {
|
|
|
|
|
$this->error('数据异常', U('lists'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($data['contract_start_time']) {
|
|
|
|
|
$data['contract_start_time'] = date('Y-m-d', $data['contract_start_time']);
|
|
|
|
|
}else{
|
|
|
|
|
$data['contract_start_time']='';
|
|
|
|
|
}
|
|
|
|
|
if ($data['contract_end_time']) {
|
|
|
|
|
$data['contract_end_time'] = date('Y-m-d', $data['contract_end_time']);
|
|
|
|
|
}else{
|
|
|
|
|
$data['contract_end_time']='';
|
|
|
|
|
}
|
|
|
|
|
$data['channel_rate'] *= 100;//存的是小数,显示百分比
|
|
|
|
|
$data['invoice_rate'] *= 100;//存的是小数,显示百分比
|
|
|
|
|