diff --git a/app/contract/controller/Api.php b/app/contract/controller/Api.php index 7eac074..4796e2b 100644 --- a/app/contract/controller/Api.php +++ b/app/contract/controller/Api.php @@ -203,5 +203,40 @@ class Api extends BaseController $content = $list->contract_log($param); return to_assign(0, '', $content); } + + //获取客户列表 + public function get_customer() + { + $param = get_params(); + $where = array(); + if (!empty($param['keywords'])) { + $where[] = ['id|name', 'like', '%' . $param['keywords'] . '%']; + } + $where[] = ['delete_time', '=', 0]; + $uid = $this->uid; + $auth = isAuth($uid,'customer_admin'); + $dids = get_department_role($this->uid); + if($auth==0){ + $whereOr[] =['belong_uid', '=', $uid]; + if(!empty($dids)){ + $whereOr[] =['belong_did', 'in', $dids]; + } + $whereOr[] = ['', 'exp', Db::raw("FIND_IN_SET('{$uid}',share_ids)")]; + } + $rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit']; + $list = Db::name('Customer')->field('id,name,address')->order('id asc')->where($where)->paginate($rows, false)->each(function($item, $key){ + $contact = Db::name('CustomerContact')->where(['cid'=>$item['id'],'is_default'=>1])->find(); + if(!empty($contact)){ + $item['contact_name'] = $contact['name']; + $item['contact_mobile'] = $contact['mobile']; + } + else{ + $item['contact_name'] = ''; + $item['contact_mobile'] = ''; + } + return $item; + }); + table_assign(0, '', $list); + } } diff --git a/app/contract/controller/Index.php b/app/contract/controller/Index.php index db209ef..7059d80 100644 --- a/app/contract/controller/Index.php +++ b/app/contract/controller/Index.php @@ -169,6 +169,8 @@ class Index extends BaseController $id = isset($param['id']) ? $param['id'] : 0; $type = isset($param['type']) ? $param['type'] : 0; $pid = isset($param['pid']) ? $param['pid'] : 0; + $is_customer = Db::name('DataAuth')->where('name','contract_admin')->value('expected_1'); + View::assign('is_customer', $is_customer); View::assign('id', $id); View::assign('type', $type); View::assign('pid', $pid); diff --git a/app/contract/view/cate/conf.html b/app/contract/view/cate/conf.html index a5281e3..2afe1cb 100644 --- a/app/contract/view/cate/conf.html +++ b/app/contract/view/cate/conf.html @@ -5,7 +5,7 @@
+ |
合同模块使用说明: 1、设置合同管理员,可设置多个 a、拥有合同管理员权限的员工可以查看、编辑、作废、中止所有合同。 @@ -29,17 +29,20 @@ |
权限标识 | {$detail.name} | +开启关联客户 | ++ | ||||||||
权限人员* | -+ | ||||||||||||
+ | {$detail.desc} | ||||||||||||
合同编号* | -- - | 签约主体(乙方)* | + | +合同编号* | ++ | 合同类别* | @@ -52,10 +52,12 @@ {gt name="$pid" value="0"} {else/} - - {/gt} + + {/gt} + + | -签约客户代表 | +签约客户代表* | @@ -154,7 +156,7 @@ diff --git a/app/contract/view/index/edit.html b/app/contract/view/index/edit.html index e08f8ab..351fa21 100644 --- a/app/contract/view/index/edit.html +++ b/app/contract/view/index/edit.html @@ -22,11 +22,7 @@ | |||
合同编号* | -- - | -签约主体(甲方)* | +签约主体(乙方)* | + | +合同编号* | ++ | 合同类别* | @@ -46,9 +46,9 @@ | |||||
客户名称(乙方)* | +客户名称(甲方)* | - + | 签约客户代表 |
@@ -151,7 +151,7 @@
diff --git a/app/contract/view/index/index.html b/app/contract/view/index/index.html
index 5d84c5a..23375a5 100644
--- a/app/contract/view/index/index.html
+++ b/app/contract/view/index/index.html
@@ -179,7 +179,7 @@
title: '选择合同性质',
type:1,
area: ['480px', '336px'],
- content: ' ',
+ content: ' ',
success: function() {
table_a = table.render({
elem: '#boxselect',
diff --git a/public/static/assets/gougu/css/gougu.css b/public/static/assets/gougu/css/gougu.css
index 451e2b1..18c4f13 100644
--- a/public/static/assets/gougu/css/gougu.css
+++ b/public/static/assets/gougu/css/gougu.css
@@ -8,6 +8,8 @@
.layui-card-title {font-size: 18px;font-weight: 600;padding: 12px 12px 0;}
.layui-table, .layui-table-view{margin:0; background-color:#fff;}
.layui-table td, .layui-table th{padding:8px;}
+.picker-table{padding:8px;}
+.picker-table .layui-table-cell {padding:4px; height: 32px;line-height: 24px;}
.layui-table-cell{padding:6px;}
.layui-table-box{background-color:#fff;}
.layui-table-page{background-color:#fff;border-bottom:1px solid #f1f1f1;}
|