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
0da934d5
Commit
0da934d5
authored
Sep 04, 2018
by
xinyuandu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加删除参数
parent
3b43cf2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
8 deletions
+32
-8
edit.html
application/index/view/houses/edit.html
+2
-2
shop_edit.js
public/resource/js/shop_edit.js
+30
-6
No files found.
application/index/view/houses/edit.html
View file @
0da934d5
...
...
@@ -75,7 +75,7 @@
<label
for=
""
>
盘方
</label>
</div>
<div
class=
"form-group phone-list-container"
>
<div
class=
"form-group phone-list-container
panfang
"
>
<input
type=
"tel"
class=
"form-control phone_jia"
placeholder=
"请输入"
>
<ul></ul>
</div>
...
...
@@ -130,7 +130,7 @@
<label
for=
""
>
案场权限人
</label>
</div>
<div
class=
"form-group phone-list-container"
>
<div
class=
"form-group phone-list-container
anchang
"
>
<input
type=
"tel"
class=
"form-control phone_jia"
placeholder=
"请输入"
>
<ul></ul>
</div>
...
...
public/resource/js/shop_edit.js
View file @
0da934d5
define
([
'doT'
,
'css!style/shop_edit.css'
,
'ckfinder'
,
'ckfinderStart'
],
function
(
doT
)
{
var
user
=
{
del_value_panfang
:
''
,
del_value_anchang
:
''
,
init
:
function
()
{
//初始化dot
user
.
event
();
...
...
@@ -221,7 +223,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
if
(
_panfangNum
==
0
)
{
$
(
'#pf_tel_jia'
).
prev
().
find
(
'input'
).
val
(
_data
[
'dish_name'
][
i
]).
attr
(
'data-id'
,
_data
[
'dish_name'
][
i
].
split
(
'-'
)[
0
]);
}
else
{
$
(
'#pf_tel_jia'
).
before
(
'<div class="form-group phone-list-container"><input type="tel" class="form-control phone_jia" placeholder="请输入" value="{0}" data-id="{1}"><ul></ul><img src="/resource/image/search_gb.png" class="input-cancel-pic"></div>'
.
stringFormatObj
({
$
(
'#pf_tel_jia'
).
before
(
'<div class="form-group phone-list-container"><input type="tel" class="form-control phone_jia" placeholder="请输入" value="{0}" data-id="{1}"><ul></ul><img src="/resource/image/search_gb.png" class="input-cancel-pic
panfang-del-id
"></div>'
.
stringFormatObj
({
'0'
:
_data
[
'dish_name'
][
i
],
'1'
:
_data
[
'dish_name'
][
i
].
split
(
'-'
)[
0
]
}));
...
...
@@ -235,7 +237,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
if
(
_acqxNum
==
0
)
{
$
(
'#acqx_tel_jia'
).
prev
().
find
(
'input'
).
val
(
_data
[
'agents_name'
][
i
]).
attr
(
'data-id'
,
_data
[
'agents_name'
][
i
].
split
(
'-'
)[
0
]);
}
else
{
$
(
'#acqx_tel_jia'
).
before
(
'<div class="form-group phone-list-container"><input type="tel" class="form-control phone_jia" placeholder="请输入" value="{0}" data-id="{1}"><ul></ul><img src="/resource/image/search_gb.png" class="input-cancel-pic"></div>'
.
stringFormatObj
({
$
(
'#acqx_tel_jia'
).
before
(
'<div class="form-group phone-list-container"><input type="tel" class="form-control phone_jia" placeholder="请输入" value="{0}" data-id="{1}"><ul></ul><img src="/resource/image/search_gb.png" class="input-cancel-pic
shangchang-del-id
"></div>'
.
stringFormatObj
({
'0'
:
_data
[
'agents_name'
][
i
],
'1'
:
_data
[
'agents_name'
][
i
].
split
(
'-'
)[
0
]
}));
...
...
@@ -261,7 +263,9 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
}));
};
});
user
.
del_value_anchang
=
''
;
user
.
del_value_panfang
=
''
;
_landlordPhoneObj
.
val
(
_data
[
'landlord_phone'
]);
//房东手机号
_internalNameObj
.
val
(
_data
[
'internal_title'
]);
//对内商铺名称
_zujinTypeObj
.
val
(
_data
[
'rent_type'
]);
//租金模式
...
...
@@ -713,10 +717,18 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
var
_this
=
$
(
this
);
var
_maxLen
=
5
;
if
(
_this
.
parent
().
find
(
'.phone_jia'
).
length
<
_maxLen
)
{
_this
.
before
(
'<div class="form-group phone-list-container{0}"><input type="tel" class="form-control phone_jia" placeholder="请输入" {2}>{1}<img src="/resource/image/search_gb.png" class="input-cancel-pic" /></div>'
.
stringFormatObj
({
var
type_class
=
''
;
console
.
log
(
$
(
this
).
parent
(
'li'
).
find
(
'div.phone-list-container'
).
hasClass
())
if
(
$
(
this
).
parent
(
'li'
).
find
(
'div.phone-list-container'
).
hasClass
(
'panfang'
)
){
type_class
=
'panfang-del-id'
}
else
{
type_class
=
'shangchang-del-id'
;
}
_this
.
before
(
'<div class="form-group phone-list-container{0}"><input type="tel" class="form-control phone_jia" placeholder="请输入" {2}>{1}<img src="/resource/image/search_gb.png" class="input-cancel-pic {3}" /></div>'
.
stringFormatObj
({
'0'
:
''
,
'1'
:
'<ul></ul>'
,
'2'
:
''
'2'
:
''
,
'3'
:
type_class
}));
}
else
{
alert
(
'最多添加'
+
_maxLen
+
'个'
);
...
...
@@ -743,7 +755,16 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
//号码搜索(含房东手机号部分),点击关闭,删除父节点
_doc
.
on
(
'click'
,
'.input-cancel-pic'
,
function
()
{
user
.
del_value
+=
$
(
this
).
parent
().
find
(
'input'
).
attr
(
"data-id"
)
+
','
;
$
(
this
).
parent
().
remove
();
//案场权限人删除的id
if
(
$
(
this
).
hasClass
(
"panfang-del-id"
)){
user
.
del_value_anchang
+=
$
(
this
).
parent
().
find
(
'input'
).
attr
(
"data-id"
)
+
','
;
}
//盘方删除的id
if
(
$
(
this
).
hasClass
(
"shangchang-del-id"
)){
user
.
del_value_panfang
+=
$
(
this
).
parent
().
find
(
'input'
).
attr
(
"data-id"
)
+
','
;
}
});
//动态搜索出来的电话列表的,点击事件
...
...
@@ -1155,8 +1176,11 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
'downriver'
:
_xiashuiObj
.
val
(),
'decoration'
:
_zuhangxiuObj
.
val
(),
'business_scope'
:
_idRunRoundObj
.
val
(),
'source'
:
_laiyuanObj
.
val
()
'source'
:
_laiyuanObj
.
val
(),
'del_agent_data'
:
user
.
del_value_anchang
.
substr
(
0
,
user
.
del_value_anchang
.
length
-
1
),
'del_agent_dish'
:
user
.
del_value_panfang
.
substr
(
0
,
user
.
del_value_panfang
.
length
-
1
)
};
if
(
_shangpuTypeObj
.
val
()
==
'0'
)
{
_data
[
'shop_area_end'
]
=
_roomArea2Obj
.
val
();
};
...
...
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