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
901ef20f
Commit
901ef20f
authored
May 10, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更换店长修改
parent
4b1f3575
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
40 deletions
+9
-40
index.html
application/index/view/store/index.html
+0
-1
AStore.php
application/model/AStore.php
+5
-4
storeList.js
public/resource/js/storeList.js
+4
-35
No files found.
application/index/view/store/index.html
View file @
901ef20f
...
...
@@ -282,7 +282,6 @@
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
店长:
</label>
<input
type=
"text"
value=
""
name=
"store-name"
class=
"form-control btn6"
placeholder=
"请输入店长"
id=
"set_father_id3"
>
<input
type=
"hidden"
id=
"shop_id"
>
<ul
class=
"user-ul"
>
</ul>
...
...
application/model/AStore.php
View file @
901ef20f
...
...
@@ -52,9 +52,10 @@ class AStore extends BaseModel
])
->
column
(
'id,level'
);
if
(
$agents_info
)
{
$agents_data
=
[];
foreach
(
$agents_info
as
$k
=>
$v
)
{
if
(
$agents_id
!=
$k
)
{
//店长降级为业务员
//
40等级和
店长降级为业务员
$agents_data
[
$k
][
'id'
]
=
$k
;
$agents_data
[
$k
][
'level'
]
=
10
;
$agents_data
[
$k
][
'store_id'
]
=
$data
[
'id'
];
...
...
@@ -62,9 +63,9 @@ class AStore extends BaseModel
}
$agents
->
saveAll
(
$agents_data
);
}
$agents_
data
[
'level'
]
=
20
;
$agents_
data
[
'store_id'
]
=
$data
[
'id'
];
$agents
->
editData
(
$agents_
data
,
$agents_id
,
'id'
);
$agents_
store
[
'level'
]
=
20
;
$agents_
store
[
'store_id'
]
=
$data
[
'id'
];
$agents
->
editData
(
$agents_
store
,
$agents_id
,
'id'
);
return
$resutlt
;
}
...
...
public/resource/js/storeList.js
View file @
901ef20f
...
...
@@ -10,6 +10,7 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
/*每页显示多少条*/
id
:
''
,
house_id
:
''
,
agents_id
:
''
,
type
:
''
,
valueCurrent
:
''
,
ajaxObj
:
''
,
...
...
@@ -51,13 +52,6 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
store
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
store
.
Mend
();
});
$
(
document
).
on
(
"input"
,
"#cus_fang"
,
function
()
{
//手机号搜索客方2
if
(
$
(
"#cus_fang"
).
val
()
==
''
){
$
(
".user-ul2"
).
html
(
''
);
}
else
{
store
.
search_phone2
();
}
});
$
(
document
).
on
(
"input"
,
"#set_father_id3"
,
function
()
{
//手机号搜索客方
if
(
$
(
"#set_father_id3"
).
val
()
==
''
){
$
(
".user-ul"
).
html
(
''
);
...
...
@@ -247,7 +241,7 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
Submit_edit
:
function
(){
//提交编辑的信息
var
par
=
{};
par
.
id
=
store
.
house_id
;
//门店id
par
.
agents_id
=
$
(
"#shop_id"
).
val
()
;
//经纪人id
par
.
agents_id
=
store
.
agents_id
;
//经纪人id
par
.
province
=
$
(
"#province_internal"
).
val
();
//省
par
.
city
=
$
(
"#city_internal"
).
val
();
//城市
par
.
district
=
$
(
"#disc_internal"
).
val
();
//区
...
...
@@ -331,7 +325,7 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
var
user_ht
=
$
(
obj
).
html
();
$
(
"#set_father_id3"
).
val
(
user_ht
);
$
(
".user-ul"
).
html
(
''
);
$
(
"#shop_id"
).
val
(
$
(
obj
).
attr
(
"data-id"
)
);
store
.
agents_id
=
$
(
obj
).
attr
(
"data-id"
);
},
search_phone
:
function
(){
//手机号
$
.
ajax
({
...
...
@@ -340,7 +334,7 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
async
:
true
,
data
:
{
"phone"
:
$
(
"#set_father_id3"
).
val
(),
"level"
:
10
"level"
:
"10,30"
},
dataType
:
'json'
,
success
:
function
(
data
)
{
...
...
@@ -358,31 +352,6 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
}
});
},
search_phone2
:
function
(){
//手机号
$
.
ajax
({
url
:
'/index/getBroker_new'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"phone"
:
$
(
"#cus_fang"
).
val
(),
"level"
:
10
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
user_ul2
=
""
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
user_ul2
+=
'<li class="addphone2" data-id="'
+
item
.
id
+
'">'
+
item
.
id
+
'-'
+
item
.
name
+
'-'
+
item
.
phone
+
'</li>'
;
});
$
(
".user-ul2"
).
html
(
user_ul2
);
}
else
{
alert
(
data
.
msg
);
}
}
});
},
getDistrict
:
function
(
name
)
{
$
.
ajax
({
url
:
'/index/getDistrictListByName'
,
...
...
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