Merge branch 'feature/group_type' of 47.111.118.107:wmtx/platform into dev

master
chenzhi 5 years ago
commit 0039431ccb

@ -37,9 +37,10 @@ class PartnerController extends ThinkController
$row = intval(I('row', 0));
$row = empty($row) ? 10 : $row;//每页条数
$data = $model
->field('tab_partner.id,tab_partner.partner,tab_partner.status,tab_partner.create_time,sys_member.nickname')
->join('left join sys_member on sys_member.uid = tab_partner.uid')
$data = $model->alias('p')
->field('p.id,p.partner,p.status,p.create_time,link_man,link_phone,address,company_tax_no,payee_name,
bank_account,opening_bank,m.nickname')
->join('left join sys_member as m on m.uid = p.uid')
->where($map)
->order('id desc')
->page($page, $row)
@ -92,10 +93,22 @@ class PartnerController extends ThinkController
if ($res) {
$this->error('合作方已存在');
}
if(!preg_match("/^1[358][0-9]{9}$/u",I('link_phone'))) {
$this->error('联系电话格式不正确');
}
$time = time();
$save['partner'] = $partner;
$save['status'] = $status;
$save['link_man'] = I('link_man');
$save['link_phone'] = I('link_phone');
$save['address'] = I('address');
$save['company_tax_no'] = I('company_tax_no');
$save['payee_name'] = I('payee_name');
$save['bank_account'] = I('bank_account');
$save['opening_bank'] = I('opening_bank');
$save['uid'] = UID;
$save['create_time'] = $time;
$save['last_up_time'] = $time;
@ -131,7 +144,9 @@ class PartnerController extends ThinkController
$this->error('参数异常');
}
$data = $model->field('id,partner')->find($id);
$data = $model
->field('id,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank')
->find($id);
if (empty($data)) {
$this->error('数据异常');
}
@ -142,12 +157,24 @@ class PartnerController extends ThinkController
$this->error('合作方已存在');
}
if(!preg_match("/^1[358][0-9]{9}$/u",I('link_phone'))) {
$this->error('联系电话格式不正确');
}
$time = time();
$save['id'] = $id;
$save['partner'] = $partner;
$save['link_man'] = I('link_man');
$save['link_phone'] = I('link_phone');
$save['address'] = I('address');
$save['company_tax_no'] = I('company_tax_no');
$save['payee_name'] = I('payee_name');
$save['bank_account'] = I('bank_account');
$save['opening_bank'] = I('opening_bank');
$save['status'] = $status;
$save['last_up_time'] = $time;
$res = $model->save($save);
if ($res === false) {
$this->error('保存失败');
@ -158,7 +185,9 @@ class PartnerController extends ThinkController
} else {
$id = intval(I('get.id', 0));
$map['id'] = $id;
$data = $model->field('id,partner,status')->find($id);
$data = $model
->field('id,partner,status,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank')
->find($id);
if (empty($data)) {
$this->error('数据异常', U('lists'));
}

@ -35,6 +35,57 @@
<input type="text" class="txt " name="partner" value="" placeholder="请输入合作方名称">
</td>
</tr>
<tr>
<td class="l">联系人:</td>
<td class="r" >
<input type="text" class="txt " name="link_man" value="" placeholder="请输入联系人">
</td>
</tr>
<tr>
<td class="l">联系电话:</td>
<td class="r" >
<input type="text" class="txt " name="link_phone" value="" placeholder="请输入联系电话">
</td>
</tr>
<tr>
<td class="l">邮寄地址:</td>
<td class="r" >
<input type="text" class="txt " name="address" value="" placeholder="请输入邮寄地址">
</td>
</tr>
<tr>
<td class="l">公司税号:</td>
<td class="r" >
<input type="text" class="txt " name="company_tax_no" value="" placeholder="请输入公司税号">
</td>
</tr>
<tr>
<td class="l">收款方名称:</td>
<td class="r" >
<input type="text" class="txt " name="payee_name" value="" placeholder="请输入收款方名称">
</td>
</tr>
<tr>
<td class="l">银行账号:</td>
<td class="r" >
<input type="text" class="txt " name="bank_account" value="" placeholder="请输入银行账号">
</td>
</tr>
<tr>
<td class="l">开户行:</td>
<td class="r" >
<input type="text" class="txt " name="opening_bank" value="" placeholder="请输入开户行">
</td>
</tr>
<tr>
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>显示状态:</td>
<td class="r table_radio">

@ -35,17 +35,68 @@
<input type="text" class="txt " name="partner" value="{$data.partner}" placeholder="请输入合作方名称">
</td>
</tr>
<tr>
<td class="l">联系人:</td>
<td class="r" >
<input type="text" class="txt " name="link_man" value="{$data.link_man}" placeholder="请输入联系人">
</td>
</tr>
<tr>
<td class="l">联系电话:</td>
<td class="r" >
<input type="text" class="txt " name="link_phone" value="{$data.link_phone}" placeholder="请输入联系电话">
</td>
</tr>
<tr>
<td class="l">邮寄地址:</td>
<td class="r" >
<input type="text" class="txt " name="address" value="{$data.address}" placeholder="请输入邮寄地址">
</td>
</tr>
<tr>
<td class="l">公司税号:</td>
<td class="r" >
<input type="text" class="txt " name="company_tax_no" value="{$data.company_tax_no}" placeholder="请输入公司税号">
</td>
</tr>
<tr>
<td class="l">收款方名称:</td>
<td class="r" >
<input type="text" class="txt " name="payee_name" value="{$data.payee_name}" placeholder="请输入收款方名称">
</td>
</tr>
<tr>
<td class="l">银行账号:</td>
<td class="r" >
<input type="text" class="txt " name="bank_account" value="{$data.bank_account}" placeholder="请输入银行账号">
</td>
</tr>
<tr>
<td class="l">开户行:</td>
<td class="r" >
<input type="text" class="txt " name="opening_bank" value="{$data.opening_bank}" placeholder="请输入开户行">
</td>
</tr>
<tr>
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>显示状态:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="1" name="status"
<eq name="data.status" value="1"> checked </eq>> 开启
<if condition="$data['status']==1"> checked </if>> 开启
</label>
<label>
<input type="radio" class="inp_radio" value="0" name="status"
<eq name="data.status" value="0"> checked </eq>> 关闭
<if condition="$data['status']==0"> checked </if>> 关闭
</label>
</span>
<span class="notice-text"></span>

@ -73,6 +73,15 @@
</th>
<th>合作方</th>
<th>显示状态</th>
<th>联系人</th>
<th>联系电话</th>
<th>邮寄地址</th>
<th>公司税号</th>
<th>收款方名称</th>
<th>银行账号</th>
<th>开户行</th>
<th>添加人</th>
<th>添加时间</th>
<th style="width:10%;min-width:150px;">操作</th>
@ -89,6 +98,15 @@
<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
<td>{$data.partner}</td>
<td>{$data.status}</td>
<td>{$data.link_man}</td>
<td>{$data.link_phone}</td>
<td>{$data.address}</td>
<td>{$data.company_tax_no}</td>
<td>{$data.payee_name}</td>
<td>{$data.bank_account}</td>
<td>{$data.opening_bank}</td>
<td>{$data.nickname}</td>
<td>{$data.create_time}</td>
<td>

@ -936,6 +936,14 @@ ADD COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '结算类型
ALTER TABLE tab_promote add `company_belong` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会归属0-内团1-外团';
ALTER TABLE tab_promote add `company_relation` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会关系0-自主开发及维护1-只维护';
--, liuweiwen 2020-01-03
ALTER TABLE tab_partner ADD `link_man` varchar(64) DEFAULT '' COMMENT '联系人' AFTER `status`;
ALTER TABLE tab_partner ADD `link_phone` varchar(24) DEFAULT NULL COMMENT '联系电话' AFTER `link_man`;
ALTER TABLE tab_partner ADD `address` varchar(255) DEFAULT NULL COMMENT '邮寄地址' AFTER `link_phone`;
ALTER TABLE tab_partner ADD `company_tax_no` varchar(64) DEFAULT NULL COMMENT '公司税号' AFTER `address`;
ALTER TABLE tab_partner ADD `payee_name` varchar(24) DEFAULT NULL COMMENT '收款方名称' AFTER `company_tax_no`;
ALTER TABLE tab_partner ADD `bank_account` varchar(32) DEFAULT NULL COMMENT '银行账号' AFTER `payee_name`;
ALTER TABLE tab_partner ADD `opening_bank` varchar(128) DEFAULT NULL COMMENT '开户行' AFTER `bank_account`;
-- 2020-01-02
-- 提现结算类型 cxj

Loading…
Cancel
Save