Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
6e8c0431
Commit
6e8c0431
authored
Apr 20, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户列表新增客户修改
parent
e0aeccda
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
12 deletions
+61
-12
Finance.php
application/index/controller/Finance.php
+0
-1
Member.php
application/index/controller/Member.php
+28
-4
users_list.html
application/index/view/member/users_list.html
+1
-3
Users.php
application/model/Users.php
+2
-1
project.properties
nbproject/project.properties
+8
-0
project.xml
nbproject/project.xml
+9
-0
user.js
public/resource/js/user.js
+13
-3
No files found.
application/index/controller/Finance.php
View file @
6e8c0431
...
@@ -10,7 +10,6 @@ namespace app\index\controller;
...
@@ -10,7 +10,6 @@ namespace app\index\controller;
use
app\api_broker\service\OrderLogService
;
use
app\api_broker\service\OrderLogService
;
use
app\api_broker\untils\PlsDemo
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\OBargainModel
;
use
app\model\OBargainModel
;
...
...
application/index/controller/Member.php
View file @
6e8c0431
...
@@ -292,14 +292,15 @@ class Member extends Basic{
...
@@ -292,14 +292,15 @@ class Member extends Basic{
public
function
pcEditClient
()
{
public
function
pcEditClient
()
{
$data
=
[];
$data
=
[];
if
(
empty
(
$this
->
params
[
'user_nick'
])
||
empty
(
$this
->
params
[
'
id
'
]))
{
if
(
empty
(
$this
->
params
[
'user_nick'
])
||
empty
(
$this
->
params
[
'
user_phone
'
]))
{
return
$this
->
response
(
101
,
'user_nick or user_phone or id is null'
);
return
$this
->
response
(
101
,
'user_nick or user_phone or id is null'
);
}
}
if
(
$this
->
request
->
isPost
())
{
if
(
$this
->
request
->
isPost
())
{
//编辑用户
if
(
isset
(
$this
->
params
[
'id'
]))
{
$user_data
=
$this
->
user
->
getUserById
(
'id,agent_id'
,
$this
->
params
[
'id'
]);
$user_data
=
$this
->
user
->
getUserById
(
'id,agent_id'
,
$this
->
params
[
'id'
]);
if
(
empty
(
$user_data
))
{
if
(
empty
(
$user_data
))
{
return
$this
->
response
(
101
,
'没有用户信息'
);
return
$this
->
response
(
101
,
'没有用户信息'
);
}
else
{
}
else
{
...
@@ -307,15 +308,38 @@ class Member extends Basic{
...
@@ -307,15 +308,38 @@ class Member extends Basic{
if
(
$this
->
params
[
'agents_id'
]
!=
$user_data
[
'agent_id'
])
{
if
(
$this
->
params
[
'agents_id'
]
!=
$user_data
[
'agent_id'
])
{
$agent
=
new
AAgents
();
$agent
=
new
AAgents
();
$agent_data
=
$agent
->
getAgentInfo
(
'name,phone'
,
$this
->
params
[
'agents_id'
]);
$agent_data
=
$agent
->
getAgentInfo
(
'name,phone'
,
$this
->
params
[
'agents_id'
]);
$remark
=
'修改客方为'
.
$agent_data
[
'name'
]
.
'-'
.
$agent_data
[
'phone'
];
$remark
=
'修改为'
.
$agent_data
[
'name'
]
.
'-'
.
$agent_data
[
'phone'
];
}
else
{
}
else
{
$remark
=
'用户编辑'
;
$remark
=
'用户编辑'
;
}
}
$data
[
'start'
]
=
$this
->
user
->
edit
(
$this
->
params
,
$this
->
params
[
'id'
]);
//新增或编辑
}
}
else
{
//新增用户
$where
[
'user_phone'
]
=
$this
->
params
[
'user_phone'
];
$num
=
$this
->
user
->
all_user_count
(
$where
);
if
(
$num
>
0
)
{
return
$this
->
response
(
101
,
'该用户已经存在!'
);
}
$agent
=
new
AAgents
();
$agent_data
=
$agent
->
getAgentInfo
(
'name,phone'
,
$this
->
params
[
'agents_id'
]);
$remark
=
'新增为'
.
$agent_data
[
'name'
]
.
'-'
.
$agent_data
[
'phone'
];
$result
=
$this
->
user
->
edit
(
$this
->
params
,
$this
->
params
[
'id'
]);
//新增或编辑
if
(
$result
==
-
1
)
{
return
$this
->
response
(
101
,
'该用户已经存在!'
);
}
$this
->
params
[
'id'
]
=
$result
;
}
}
$data
[
'start'
]
=
$this
->
user
->
edit
(
$this
->
params
,
$this
->
params
[
'id'
]);
//新增或编辑
$this
->
operating_records
(
$this
->
userId
,
$type
=
3
,
$remark
,
$this
->
params
[
'id'
]);
$this
->
operating_records
(
$this
->
userId
,
$type
=
3
,
$remark
,
$this
->
params
[
'id'
]);
}
else
{
}
else
{
//编辑获取用户信息
if
(
empty
((
$this
->
params
[
'id'
])))
{
return
$this
->
response
(
101
,
'Id is null'
);
}
$data
[
'list'
]
=
$this
->
user
->
getClient
(
$this
->
params
[
'id'
]);
$data
[
'list'
]
=
$this
->
user
->
getClient
(
$this
->
params
[
'id'
]);
}
}
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$data
);
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$data
);
...
...
application/index/view/member/users_list.html
View file @
6e8c0431
...
@@ -67,9 +67,7 @@
...
@@ -67,9 +67,7 @@
<div
class=
"pull-right"
>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<ul
class=
"bread_btn"
>
<li>
<li>
<!-- <a href="#modal_add_user" data-toggle="modal" class="btn btn-default"><i class="icon-plus"></i>
<a
href=
"#modal_add_user"
data-toggle=
"modal"
class=
"btn btn-default add_alert"
><i
class=
"icon-plus"
></i>
添加客户</a> -->
<a
href=
"#modal_add_user"
data-toggle=
"modal"
class=
"btn btn-default"
><i
class=
"icon-plus"
></i>
添加客户
</a>
添加客户
</a>
</li>
</li>
</ul>
</ul>
...
...
application/model/Users.php
View file @
6e8c0431
...
@@ -216,7 +216,8 @@ class Users extends Model
...
@@ -216,7 +216,8 @@ class Users extends Model
$insert_data
[
'source'
]
=
20
;
$insert_data
[
'source'
]
=
20
;
$insert_data
[
'status'
]
=
-
1
;
$insert_data
[
'status'
]
=
-
1
;
$insert_data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
);
$insert_data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
);
$return_id
=
$this
->
save
(
$insert_data
);
$this
->
save
(
$insert_data
);
$return_id
=
$this
->
id
;
}
else
{
}
else
{
$return_id
=
-
1
;
$return_id
=
-
1
;
}
}
...
...
nbproject/project.properties
0 → 100644
View file @
6e8c0431
auxiliary.org-netbeans-modules-php-smarty.smarty-framework
=
true
include.path
=
${php.global.include.path}
php.version
=
PHP_70
source.encoding
=
UTF-8
src.dir
=
.
tags.asp
=
false
tags.short
=
false
web.root
=
.
nbproject/project.xml
0 → 100644
View file @
6e8c0431
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://www.netbeans.org/ns/project/1"
>
<type>
org.netbeans.modules.php.project
</type>
<configuration>
<data
xmlns=
"http://www.netbeans.org/ns/php-project/1"
>
<name>
think
</name>
</data>
</configuration>
</project>
public/resource/js/user.js
View file @
6e8c0431
...
@@ -35,6 +35,12 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
...
@@ -35,6 +35,12 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
$
(
"#close"
).
click
(
function
()
{
$
(
"#close"
).
click
(
function
()
{
document
.
getElementById
(
"add_user_form"
).
reset
();
document
.
getElementById
(
"add_user_form"
).
reset
();
$
(
".user-ul"
).
empty
();
});
$
(
".close"
).
click
(
function
(){
document
.
getElementById
(
"add_user_form"
).
reset
();
$
(
".user-ul"
).
empty
();
});
});
$
(
"#confirm_delete"
).
click
(
function
(){
$
(
"#confirm_delete"
).
click
(
function
(){
...
@@ -403,11 +409,10 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
...
@@ -403,11 +409,10 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
var
params
=
{};
var
params
=
{};
params
.
user_nick
=
$
(
"#add_user_form input[name='user_nick']"
).
val
();
params
.
user_nick
=
$
(
"#add_user_form input[name='user_nick']"
).
val
();
params
.
user_phone
=
$
(
"#add_user_form input[name='user_phone']"
).
val
();
params
.
user_phone
=
$
(
"#add_user_form input[name='user_phone']"
).
val
();
params
.
agent_id
=
$
(
"#add_user_form input[name='agent_id']"
).
val
();
//客方
params
.
agent
s
_id
=
$
(
"#add_user_form input[name='agent_id']"
).
val
();
//客方
params
.
sex
=
$
(
"#user_sex option:selected"
).
val
();
params
.
sex
=
$
(
"#user_sex option:selected"
).
val
();
params
.
type
=
'add'
;
if
(
params
.
realname
==
''
)
{
if
(
params
.
user_nick
==
''
)
{
alert
(
'姓名不能为空'
);
alert
(
'姓名不能为空'
);
$
(
"input[name='realname']"
).
focus
();
$
(
"input[name='realname']"
).
focus
();
return
;
return
;
...
@@ -422,6 +427,11 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
...
@@ -422,6 +427,11 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
$
(
"input[name='pwd']"
).
focus
();
$
(
"input[name='pwd']"
).
focus
();
return
;
return
;
}
}
if
(
params
.
user_phone
.
length
!=
11
)
{
alert
(
'手机号错误'
);
$
(
"input[name='user_phone']"
).
focus
();
return
;
}
$
.
ajax
({
$
.
ajax
({
url
:
'/index/pcEditClient'
,
url
:
'/index/pcEditClient'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment