优化公司显示

master
chenzhi 4 years ago
parent f7d90780aa
commit 35f2fe3f05

@ -873,7 +873,7 @@ function checkPhone($phone) {
* @return false|int * @return false|int
*/ */
function checkNumber($num) { function checkNumber($num) {
return preg_match("/^([1-9][0-9]*)+(.[0-9]{1,3})?$/",$num); return preg_match("/^([0-9]*)+(.[0-9]{1,3})?$/",$num);
} }
//获取sdk类型名称 //获取sdk类型名称

@ -218,7 +218,7 @@ class PartnerController extends ThinkController
$map = ["_string"=>"1=1"]; $map = ["_string"=>"1=1"];
$model = M("partner_verify", 'tab_'); $model = M("partner_verify", 'tab_');
$data = $model->where($map)->page($page,$row)->select(); $data = $model->where($map)->page($page,$row)->order("FIELD(verify_log,0,1,-1),create_time desc")->select();
foreach ($data as $k => &$v) { foreach ($data as $k => &$v) {
$v['partner_info'] = json_decode($v['partner_info'],true); $v['partner_info'] = json_decode($v['partner_info'],true);
if($v['partner_id'] == 0){ if($v['partner_id'] == 0){
@ -523,7 +523,7 @@ class PartnerController extends ThinkController
if(!empty(I('reg_phone')) && !checkPhone(I('reg_phone'))) { if(!empty(I('reg_phone')) && !checkPhone(I('reg_phone'))) {
$this->error('注册电话格式不正确'); $this->error('注册电话格式不正确');
} }
if(!empty(I('taxation_rate'))) { if(!empty(I('taxation_rate')) && I('taxation_rate') > 0) {
if(!checkNumber(I('taxation_rate'))){ if(!checkNumber(I('taxation_rate'))){
$this->error('税费费率格式错误'); $this->error('税费费率格式错误');
}else{ }else{
@ -532,7 +532,7 @@ class PartnerController extends ThinkController
}else{ }else{
$save['taxation_rate']=0; $save['taxation_rate']=0;
} }
if(!empty(I('channel_rate'))) { if(!empty(I('channel_rate')) && I('channel_rate') > 0) {
if(!checkNumber(I('channel_rate'))){ if(!checkNumber(I('channel_rate'))){
$this->error('渠道费率格式不对'); $this->error('渠道费率格式不对');
}else{ }else{
@ -541,7 +541,7 @@ class PartnerController extends ThinkController
}else{ }else{
$save['channel_rate']=0; $save['channel_rate']=0;
} }
if(!empty(I('invoice_rate'))) { if(!empty(I('invoice_rate')) && I('invoice_rate') > 0) {
if(!checkNumber(I('invoice_rate'))){ if(!checkNumber(I('invoice_rate'))){
$this->error('开票税点格式不对'); $this->error('开票税点格式不对');
}else{ }else{
@ -553,7 +553,11 @@ class PartnerController extends ThinkController
if(!empty(I('server_fee')) && !checkNumber(I('server_fee')) && I("has_server_fee") == 1) { if(!empty(I('server_fee')) && !checkNumber(I('server_fee')) && I("has_server_fee") == 1) {
$this->error('服务器费用格式不对'); $this->error('服务器费用格式不对');
}else{ }else{
$save['server_fee']=0; if(empty(I('server_fee'))){
$save['server_fee']=0;
}else{
$save['server_fee']=I('server_fee');
}
} }
$time = time(); $time = time();
$save['contract_start_time'] = strtotime($save['contract_start_time']); $save['contract_start_time'] = strtotime($save['contract_start_time']);

@ -69,7 +69,7 @@
<tr> <tr>
<td class="l">开票税点:</td> <td class="l">开票税点:</td>
<td class="r" > <td class="r" >
<input type="text" class="txt " name="inoice_rate" value="{$data.inoice_rate}" placeholder="请输入开票税点" readonly><span style="margin-left: 3px;padding-top: 5px">%</span> <input type="text" class="txt " name="inoice_rate" value="{$data.invoice_rate}" placeholder="请输入开票税点" readonly><span style="margin-left: 3px;padding-top: 5px">%</span>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -199,14 +199,14 @@
</tr> </tr>
<tr> <tr>
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>是否有预付款:</td> <td class="l noticeinfo">是否有预付款:</td>
<td class="r table_radio"> <td class="r table_radio">
<span class="form_radio table_btn"> <span class="form_radio table_btn">
<label> <label>
<input type="radio" class="inp_radio" value="0" name="has_advance_charge" <if condition="$data['has_advance_charge'] eq 0">checked</if> readonly> 否 <input type="radio" class="inp_radio" value="0" name="has_advance_charge" <if condition="$data['has_advance_charge'] eq 0">checked</if> disabled> 否
</label> </label>
<label> <label>
<input type="radio" class="inp_radio" value="1" name="has_advance_charge" <if condition="$data['has_advance_charge'] eq 1">checked</if> readonly> 是 <input type="radio" class="inp_radio" value="1" name="has_advance_charge" <if condition="$data['has_advance_charge'] eq 1">checked</if> disabled> 是
</label> </label>
</span> </span>
<span class="notice-text"></span> <span class="notice-text"></span>
@ -214,15 +214,15 @@
</tr> </tr>
<tr> <tr>
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>承担服务费:</td> <td class="l noticeinfo">承担服务费:</td>
<td class="r table_radio"> <td class="r table_radio">
<span class="form_radio table_btn" style="width: auto;"> <span class="form_radio table_btn" style="width: auto;">
<label> <label>
<input type="radio" class="inp_radio" value="0" name="has_server_fee" <if condition="$data['has_server_fee'] eq 0">checked</if> readonly> 否 <input type="radio" class="inp_radio" value="0" name="has_server_fee" <if condition="$data['has_server_fee'] eq 0">checked</if> disabled> 否
</label> </label>
<label> <label>
<input type="radio" class="inp_radio" value="1" name="has_server_fee" <if condition="$data['has_server_fee'] eq 1">checked</if> readonly> 是 <input type="radio" class="inp_radio" value="1" name="has_server_fee" <if condition="$data['has_server_fee'] eq 1">checked</if> disabled> 是
</label> </label>
</span> </span>
<span class="notice-text" id="server_fee_input" style="color: #000;<if condition="$data['has_server_fee'] eq 0">display: none;</if>"><input type="text" class="txt " name="server_fee" value="{$data['server_fee']}" placeholder="请输入服务器费用" style="width: 100px;" readonly>&nbsp;&nbsp;</span> <span class="notice-text" id="server_fee_input" style="color: #000;<if condition="$data['has_server_fee'] eq 0">display: none;</if>"><input type="text" class="txt " name="server_fee" value="{$data['server_fee']}" placeholder="请输入服务器费用" style="width: 100px;" readonly>&nbsp;&nbsp;</span>
@ -230,14 +230,14 @@
</tr> </tr>
<tr> <tr>
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>合作关系:</td> <td class="l noticeinfo">合作关系:</td>
<td class="r table_radio"> <td class="r table_radio">
<span class="form_radio table_btn"> <span class="form_radio table_btn">
<label> <label>
<input type="radio" class="inp_radio" value="1" name="cooperation_status" <if condition="$data['cooperation_status'] eq 1">checked</if> readonly> 合作中 <input type="radio" disabled class="inp_radio" value="1" name="cooperation_status" <if condition="$data['cooperation_status'] eq 1">checked</if> > 合作中
</label> </label>
<label> <label>
<input type="radio" class="inp_radio" value="0" name="cooperation_status" <if condition="$data['cooperation_status'] eq 0">checked</if> readonly> 停止合作 <input type="radio" disabled class="inp_radio" value="0" name="cooperation_status" <if condition="$data['cooperation_status'] eq 0">checked</if> > 停止合作
</label> </label>
</span> </span>
<span class="notice-text"></span> <span class="notice-text"></span>
@ -245,14 +245,14 @@
</tr> </tr>
<tr> <tr>
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>显示状态:</td> <td class="l noticeinfo">显示状态:</td>
<td class="r table_radio"> <td class="r table_radio">
<span class="form_radio table_btn"> <span class="form_radio table_btn">
<label> <label>
<input type="radio" class="inp_radio" value="1" name="status" <if condition="$data['status'] eq 1">checked</if> readonly> 开启 <input type="radio" class="inp_radio" value="1" name="status" <if condition="$data['status'] eq 1">checked</if> disabled> 开启
</label> </label>
<label> <label>
<input type="radio" class="inp_radio" value="0" name="status" <if condition="$data['status'] eq 0">checked</if> readonly> 关闭 <input type="radio" class="inp_radio" value="0" name="status" <if condition="$data['status'] eq 0">checked</if> disabled> 关闭
</label> </label>
</span> </span>
<span class="notice-text"></span> <span class="notice-text"></span>

Loading…
Cancel
Save