己方公司

master
chenzhi 5 years ago
parent ca5c68d078
commit c76cf038cd

@ -776,6 +776,12 @@ class ToolController extends ThinkController {
if (!in_array($status, [0, 1])) {
$this->error('参数异常');
}
if (!empty(I('fax_ratio'))) {
if(!preg_match('/^[0-9]+(.[0-9]{1,3})?$/', I('fax_ratio'))){
$this->error('税率只能数字');
}
}
$model = M('company_info', 'tab_');
$map['partner'] = $partner;
@ -802,6 +808,8 @@ class ToolController extends ThinkController {
$save['payee_name'] = I('payee_name');
$save['bank_account'] = I('bank_account');
$save['opening_bank'] = I('opening_bank');
$save['fax_ratio'] = I('fax_ratio');
$save['ali_account'] = I('ali_account');
$save['uid'] = UID;
$save['create_time'] = $time;
@ -842,6 +850,11 @@ class ToolController extends ThinkController {
if (!in_array($status, [0, 1])) {
$this->error('参数异常');
}
if (!empty(I('fax_ratio'))) {
if(!preg_match('/^[0-9]+(.[0-9]{1,3})?$/', I('fax_ratio'))){
$this->error('税率只能数字');
}
}
$data = $model
->field('id,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank')
@ -859,14 +872,14 @@ class ToolController extends ThinkController {
if(!checkPhone(I('link_phone'))) {
$this->error('联系电话格式不正确');
}
$res2 = $model->where([
'link_phone' => I('link_phone'),
'id' => ['neq', $id]
])->getField('id');
// $res2 = $model->where([
// 'link_phone' => I('link_phone'),
// 'id' => ['neq', $id]
// ])->getField('id');
if ($res2) {
$this->error('已存在此联系电话');
}
// if ($res2) {
// $this->error('已存在此联系电话');
// }
$time = time();
$save['id'] = $id;
$save['partner'] = $partner;
@ -879,6 +892,9 @@ class ToolController extends ThinkController {
$save['bank_account'] = I('bank_account');
$save['opening_bank'] = I('opening_bank');
$save['fax_ratio'] = I('fax_ratio');
$save['ali_account'] = I('ali_account');
$save['status'] = $status;
$save['last_up_time'] = $time;
$res = $model->save($save);
@ -892,7 +908,7 @@ class ToolController extends ThinkController {
$id = intval(I('get.id', 0));
$map['id'] = $id;
$data = $model
->field('id,partner,status,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank')
->field('*')
->find($id);
if (empty($data)) {
$this->error('数据异常', U('company_info'));

@ -86,6 +86,22 @@
</td>
</tr>
<tr>
<td class="l">开票税点:</td>
<td class="r" >
<input type="number" class="txt" name="fax_ratio" value="0" placeholder="请输入开票税点">
<span>%</span>
</td>
</tr>
<tr>
<td class="l">支付宝登陆账号:</td>
<td class="r" >
<input type="text" class="txt " name="ali_account" value="" placeholder="可以是手机及邮箱等">
<span class="notice-text">仅用于展示,打款的支付宝账号需要配置证书,此处修改无效</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>显示状态:</td>
<td class="r table_radio">

@ -84,6 +84,21 @@
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l">开票税点:</td>
<td class="r" >
<input type="number" class="txt" name="fax_ratio" value="{$company_info['fax_ratio']}" placeholder="请输入开票税点">
<span>%</span>
</td>
</tr>
<tr>
<td class="l">支付宝登陆账号:</td>
<td class="r" >
<input type="text" class="txt " name="ali_account" value="{$company_info['ali_account']}" placeholder="可以是手机及邮箱等">
<span class="notice-text">仅用于展示,打款的支付宝账号需要配置证书,此处修改无效</span>
</td>
</tr>
<tr>
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>显示状态:</td>

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save