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
2e8e2f3e
Commit
2e8e2f3e
authored
Dec 27, 2017
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
转铺成功数量+1
parent
3ffa8e14
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
11 deletions
+25
-11
Transfer.php
application/index/controller/Transfer.php
+21
-8
Basic.php
application/index/extend/Basic.php
+1
-1
transfer.js
public/resource/js/transfer.js
+1
-0
transfer_template_tpl.html
public/resource/template/transfer_template_tpl.html
+2
-2
No files found.
application/index/controller/Transfer.php
View file @
2e8e2f3e
...
...
@@ -13,7 +13,7 @@ use app\index\extend\Basic;
use
app\model\AdminModel
;
use
app\model\FollowUp
;
use
app\model\SubletModel
;
use
app\model\Users
;
use
think\Db
;
use
think\Session
;
...
...
@@ -84,19 +84,32 @@ class Transfer extends Basic
public
function
putAway
()
{
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
$data
[
'data'
]
=
''
;
$params
=
$this
->
request
->
param
();
try
{
$sublet
=
new
SubletModel
();
$sublet
=
new
SubletModel
();
$sublet_data
=
$sublet
->
field
(
'id,house_id'
)
->
where
(
'id'
,
$params
[
'id'
])
->
find
();
if
(
$sublet
)
{
$sublet
->
update
([
'id'
=>
$params
[
'id'
],
'id'
=>
$sublet_data
[
'id'
],
'status'
=>
$params
[
'status'
]
]);
return
[
"code"
=>
"200"
,
"msg"
=>
'操作成功'
,
'data'
=>
[
'status'
=>
$params
[
'status'
]]];
}
catch
(
\Exception
$e
)
{
return
[
"code"
=>
"101"
,
"msg"
=>
"操作失败"
,
'data'
=>
''
];
$house
=
Db
::
table
(
'houseinfos'
)
->
field
(
'id,room_num_left'
)
->
where
(
'id'
,
$sublet_data
[
'house_id'
])
->
find
();
if
(
$house
)
{
Db
::
table
(
'houseinfos'
)
->
where
(
'id'
,
$house
[
'id'
])
->
update
([
'room_num_left'
=>
$house
[
'room_num_left'
]
+
1
]);
//自增1
$data
[
'msg'
]
=
'剩余铺数+1'
;
}
else
{
$data
[
'msg'
]
=
'请在同联后台管理中心,根据客户手机号补充信息。'
;
}
}
else
{
$data
[
'status'
]
=
101
;
$data
[
'msg'
]
=
'没有该商铺信息'
;
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
/**
...
...
application/index/extend/Basic.php
View file @
2e8e2f3e
...
...
@@ -55,7 +55,7 @@ class Basic extends Controller
if
(
!
in_array
(
trim
(
$requestPath
),
$this
->
filterVerify
))
{
$this
->
userVerify
();
//
$this->userVerify();
}
}
...
...
public/resource/js/transfer.js
View file @
2e8e2f3e
...
...
@@ -168,6 +168,7 @@ function edit(obj) {
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
data
.
msg
);
if
(
data
.
data
.
status
==
0
)
{
$
(
obj
).
html
(
'转为报备'
);
$
(
obj
).
attr
(
'class'
,
'btn1 btn-danger'
);
...
...
public/resource/template/transfer_template_tpl.html
View file @
2e8e2f3e
...
...
@@ -12,9 +12,9 @@
<
td
>
[
%=
it
[
item
][
"create_time"
]
%
]
<
/td
>
<
td
>
<
a
class
=
"btn1 btn-success "
href
=
"#modal-process"
data
-
toggle
=
"modal"
data
-
id
=
"[%= it[item]['id'] %]"
onclick
=
"alertFollow(this)"
>
跟进
<
/a
>
<
a
href
=
"#modal-details"
data
-
toggle
=
"modal"
onclick
=
"edit(this)"
data
-
id
=
"[%= it[item]['id'] %], [%= it[item]['status'] %]"
<
a
href
=
"#modal-details"
data
-
toggle
=
"modal"
data
-
id
=
"[%= it[item]['id'] %], [%= it[item]['status'] %]"
[
%
if
(
it
[
item
][
"status"
]
==
0
){
%
]
class
=
"btn1 btn-danger"
>
转为上架商铺
<
/a
>
onclick
=
"edit(this)"
class
=
"btn1 btn-danger"
>
转为上架商铺
<
/a
>
[
%
}
else
{
%
]
class
=
"btn1 btn-info"
>
已转为上架商铺
<
/a
>
[
%
}
%
]
...
...
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