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
b1e834e7
Commit
b1e834e7
authored
Oct 23, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改编辑店长
parent
4f3d412f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
+13
-10
Store.php
application/index/controller/Store.php
+6
-6
AStore.php
application/model/AStore.php
+6
-4
storeList.js
public/resource/js/storeList.js
+1
-0
No files found.
application/index/controller/Store.php
View file @
b1e834e7
...
@@ -97,15 +97,15 @@ class Store extends Basic
...
@@ -97,15 +97,15 @@ class Store extends Basic
}
}
$district_id
=
$store
->
getStoreKeyById
(
'district_id'
,
[
'id'
=>
$this
->
params
[
'id'
]]);
$district_id
=
$store
->
getStoreKeyById
(
'district_id'
,
[
'id'
=>
$this
->
params
[
'id'
]]);
$old_site_id
=
$m_district
->
getDistrictKeyById
(
'site_id'
,
[
'id'
=>
$district_id
]);
$old_site_id
=
$m_district
->
getDistrictKeyById
(
'site_id'
,
[
'id'
=>
$district_id
]);
$new_site_id
=
$m_district
->
getDistrictKeyById
(
'site_id'
,
[
'id'
=>
$this
->
params
[
'district_id'
]]);
if
(
!
empty
(
$old_site_id
))
{
$new_site_id
=
$m_district
->
getDistrictKeyById
(
'site_id'
,
[
'id'
=>
$this
->
params
[
'district_id'
]]);
if
(
$old_site_id
!=
$new_site_id
)
{
if
(
$old_site_id
!=
$new_site_id
)
{
return
$this
->
response
(
101
,
'编辑门店部门,导致所属城市不一致'
);
return
$this
->
response
(
101
,
'编辑门店部门,导致所属城市不一致'
);
}
$this
->
params
[
'site_id'
]
=
$new_site_id
;
}
}
$this
->
params
[
'site_id'
]
=
$new_site_id
;
}
}
$this
->
data
=
$store
->
addStoreAgents
(
$this
->
params
,
$this
->
params
[
'agents_id'
]);
$this
->
data
=
$store
->
addStoreAgents
(
$this
->
params
,
$this
->
params
[
'agents_id'
]);
...
...
application/model/AStore.php
View file @
b1e834e7
...
@@ -40,10 +40,10 @@ class AStore extends BaseModel
...
@@ -40,10 +40,10 @@ class AStore extends BaseModel
if
(
$data
[
'id'
]
==
''
)
{
if
(
$data
[
'id'
]
==
''
)
{
$store_data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
);
$store_data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
);
$this
->
save
(
$store_data
);
$this
->
save
(
$store_data
);
$result
=
$this
->
id
;
$result
_id
=
$this
->
id
;
}
else
{
}
else
{
$this
->
save
(
$store_data
,
[
'id'
=>
$data
[
'id'
]]);
$this
->
save
(
$store_data
,
[
'id'
=>
$data
[
'id'
]]);
$result
=
$data
[
'id'
];
$result
_id
=
$data
[
'id'
];
}
}
//处理经纪人等级 10业务员 20店长 30总监 40店长和总监
//处理经纪人等级 10业务员 20店长 30总监 40店长和总监
...
@@ -63,6 +63,8 @@ class AStore extends BaseModel
...
@@ -63,6 +63,8 @@ class AStore extends BaseModel
}
else
{
}
else
{
$agents_data
[
$k
][
'level'
]
=
30
;
$agents_data
[
$k
][
'level'
]
=
30
;
}
}
$agents_data
[
$k
][
'store_id'
]
=
$result_id
;
}
}
}
}
$agents
->
saveAll
(
$agents_data
);
$agents
->
saveAll
(
$agents_data
);
...
@@ -73,10 +75,10 @@ class AStore extends BaseModel
...
@@ -73,10 +75,10 @@ class AStore extends BaseModel
}
else
{
}
else
{
$agents_store
[
'level'
]
=
20
;
$agents_store
[
'level'
]
=
20
;
}
}
$agents_store
[
'store_id'
]
=
$result
;
$agents_store
[
'store_id'
]
=
$result
_id
;
$agents
->
editData
(
$agents_store
,
$agents_id
,
'id'
);
$agents
->
editData
(
$agents_store
,
$agents_id
,
'id'
);
return
$result
;
return
$result
_id
;
}
}
/**
/**
...
...
public/resource/js/storeList.js
View file @
b1e834e7
...
@@ -271,6 +271,7 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
...
@@ -271,6 +271,7 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
if
(
data
.
code
==
200
){
if
(
data
.
code
==
200
){
alert
(
'提交成功'
);
alert
(
'提交成功'
);
$
(
"#modal-edit"
).
modal
(
'hide'
);
$
(
"#modal-edit"
).
modal
(
'hide'
);
store
.
getList
(
store
.
pageNo
);
}
else
{
}
else
{
alert
(
data
.
msg
);
alert
(
data
.
msg
);
}
}
...
...
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