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
89e173ce
Commit
89e173ce
authored
Apr 26, 2018
by
hujun
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/test' into test
parents
e882005d
c42bab48
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
46 deletions
+60
-46
edit.html
application/index/view/houses/edit.html
+3
-8
edit.js
public/resource/js/edit.js
+51
-35
user.js
public/resource/js/user.js
+6
-3
No files found.
application/index/view/houses/edit.html
View file @
89e173ce
...
...
@@ -338,7 +338,7 @@
</div>
</li>
<!-- 案场人电话添加多个手机号-->
<li
class=
"list-group-item"
id=
"li_acr_phone"
>
<
!--<
li class="list-group-item" id="li_acr_phone">
<div class="form-group phone-list-container" style="width: 70px;">
<label for="">案场人电话</label>
</div>
...
...
@@ -346,13 +346,8 @@
<input type="tel" class="form-control phone_jia" placeholder="请输入">
<ul></ul>
</div>
<!--<div class="form-group phone-list-container">
<input type="tel" class="form-control phone_jia" placeholder="请输入">
<ul></ul>
<img src="/resource/image/search_gb.png" class="input-cancel-pic" />
</div>-->
<img src="/resource/image/jia2@2x.png" data-hideid='1' class="input-add-tel" id="acr_tel_jia" />
</li>
</li>
-->
<li
class=
"list-group-item"
id=
"li_pf_phone"
>
<div
class=
"form-group phone-list-container"
style=
"width: 70px;"
>
...
...
@@ -452,7 +447,7 @@
<div
class=
"form-group"
id=
"li_landlord_phone_input"
>
<label
for=
"internalName"
>
房东手机号
</label>
<div
class=
"form-group phone-list-container landlord-form-group"
>
<input
type=
"tel"
class=
"form-control phone_jia"
placeholder=
"请输入"
name=
"landlordPhone"
id=
"landlordPhone"
data-alert=
"请填写房东手机号!"
>
<input
type=
"tel"
class=
"form-control phone_jia"
placeholder=
"请输入"
name=
"landlordPhone"
id=
"landlordPhone"
data-alert=
"请填写房东手机号!"
data-addtype=
"landlord"
>
</div>
<img
src=
"/resource/image/jia2@2x.png"
class=
"input-add-tel input-add-tel-landlord"
data-addtype=
"landlord"
id=
"landlord_tel_jia"
/>
</div><br>
...
...
public/resource/js/edit.js
View file @
89e173ce
...
...
@@ -4,8 +4,10 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () {
//初始化dot
user
.
event
();
},
upload_id
:
0
,
event
:
function
()
{
var
_id
=
getUrlParam
(
'id'
),
//地址栏获取的商铺或者街铺id
var
_objThis
=
this
,
//user对象
_id
=
getUrlParam
(
'id'
),
//地址栏获取的商铺或者街铺id
_doc
=
$
(
document
),
_urlCut
=
location
.
origin
+
'/resource/lib/Attachments/images/'
,
//要截取的部分url
_loadMainItem
=
$
(
'#main_loading_pic'
),
//整个页面的加载图标
...
...
@@ -70,12 +72,19 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () {
};
if
(
_id
!=
null
){
var
_source
=
getUrlParam
(
'source'
);
var
_sublet_id
=
getUrlParam
(
'sublet_id'
);
var
_data
=
{
'id'
:
_id
};
if
(
_source
){
_data
[
'source'
]
=
_source
;
_data
[
'sublet_id'
]
=
_sublet_id
;
};
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/houseEdit'
,
data
:
{
'id'
:
_id
},
data
:
_data
,
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{
...
...
@@ -85,6 +94,7 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () {
if
(
typeof
data
===
'object'
)
{
var
_data
=
data
[
'data'
];
if
(
data
.
code
==
200
)
{
_objThis
.
upload_id
=
_data
[
'upload_id'
];
_shangpuTypeObj
.
val
(
_data
[
'shop_type'
]).
change
().
attr
({
'disabled'
:
'disabled'
,
'title'
:
'商铺类型暂不支持修改'
...
...
@@ -120,18 +130,18 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () {
};
//案场人电话
var
_phoneNum
=
0
;
for
(
var
i
in
_data
[
'phone'
]){
if
(
_phoneNum
==
0
){
$
(
'#acr_tel_jia'
).
prev
().
find
(
'input'
).
val
(
_data
[
'phone'
][
i
][
'name'
]
+
'-'
+
_data
[
'phone'
][
i
][
'phone'
]).
attr
(
'data-id'
,
_data
[
'phone'
][
i
][
'id'
]);
}
else
{
$
(
'#acr_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
({
'0'
:
_data
[
'phone'
][
i
][
'name'
]
+
'-'
+
_data
[
'phone'
][
i
][
'phone'
],
'1'
:
_data
[
'phone'
][
i
][
'id'
]
}));
};
_phoneNum
++
;
};
//
var _phoneNum = 0;
//
for(var i in _data['phone']){
//
if(_phoneNum == 0){
//
$('#acr_tel_jia').prev().find('input').val(_data['phone'][i]['name']+'-'+_data['phone'][i]['phone']).attr('data-id',_data['phone'][i]['id']);
//
}else{
//
$('#acr_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({
//
'0': _data['phone'][i]['name']+'-'+_data['phone'][i]['phone'],
//
'1': _data['phone'][i]['id']
//
}));
//
};
//
_phoneNum++;
//
};
//盘方
var
_panfangNum
=
0
;
...
...
@@ -174,7 +184,7 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () {
if
(
_landlordNum
===
0
){
$
(
'#landlord_tel_jia'
).
prev
().
find
(
'input'
).
val
(
item
);
}
else
{
$
(
'#landlord_tel_jia'
).
before
(
'<div class="form-group phone-list-container landlord-form-group"><input type="tel" class="form-control phone_jia" placeholder="请输入" value="{0}"><img src="/resource/image/search_gb.png" class="input-cancel-pic"></div>'
.
stringFormatObj
({
$
(
'#landlord_tel_jia'
).
before
(
'<div class="form-group phone-list-container landlord-form-group"><input type="tel" class="form-control phone_jia" placeholder="请输入" value="{0}"
data-addtype="landlord"
><img src="/resource/image/search_gb.png" class="input-cancel-pic"></div>'
.
stringFormatObj
({
'0'
:
item
}));
};
...
...
@@ -572,9 +582,10 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () {
var
_maxLen
=
_addType
===
'landlord'
?
3
:
5
;
var
_htmlStrTemp
=
_addType
===
'landlord'
?
''
:
'<ul></ul>'
;
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="请输入">{1}<img src="/resource/image/search_gb.png" class="input-cancel-pic" /></div>'
.
stringFormatObj
({
_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
({
'0'
:
_addType
===
'landlord'
?
' landlord-form-group'
:
''
,
'1'
:
_addType
===
'landlord'
?
''
:
'<ul></ul>'
'1'
:
_addType
===
'landlord'
?
''
:
'<ul></ul>'
,
'2'
:
_addType
===
'landlord'
?
'data-addtype="landlord"'
:
''
}));
}
else
{
alert
(
'最多添加'
+
_maxLen
+
'个'
);
...
...
@@ -726,18 +737,18 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () {
};
//验证案场联系人是否填写
var
_acrPhoneArr
=
[];
$
.
each
(
$
(
'#li_acr_phone input'
),
function
(
i
,
item
)
{
var
_id
=
item
.
getAttribute
(
'data-id'
);
if
(
_id
!==
undefined
&&
_id
!==
null
){
_acrPhoneArr
.
push
(
item
.
value
);
};
});
console
.
log
(
_acrPhoneArr
);
if
(
_acrPhoneArr
.
length
<
1
){
alert
(
'案场人电话至少需要选择一个!'
);
return
false
;
};
//
var _acrPhoneArr = [];
//
$.each($('#li_acr_phone input'), function(i,item) {
//
var _id = item.getAttribute('data-id');
//
if(_id !== undefined && _id !== null){
//
_acrPhoneArr.push(item.value);
//
};
//
});
//
console.log(_acrPhoneArr);
//
if(_acrPhoneArr.length<1){
//
alert('案场人电话至少需要选择一个!');
//
return false;
//
};
//验证盘方是否填写
var
_pfPhoneArr
=
[];
...
...
@@ -957,9 +968,9 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () {
});
};
$
.
each
(
_acrPhoneArr
,
function
(
i
,
item
)
{
_data
[
'phone['
+
i
+
']'
]
=
item
;
});
//
$.each(_acrPhoneArr, function(i, item) {
//
_data['phone['+i+']'] = item;
//
});
$
.
each
(
_liebiaoPicObj
,
function
(
i
,
item
)
{
_data
[
'cover['
+
i
+
']'
]
=
item
.
src
.
replace
(
_urlCut
,
''
);
});
...
...
@@ -972,7 +983,12 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () {
if
(
_fujianObj
.
length
===
1
){
_data
[
'file_path'
]
=
_fujianObj
[
0
].
href
.
replace
(
_urlCut
,
''
);
//附件取得是herf值
};
_id
!=
null
&&
(
_data
[
'id'
]
=
_id
);
//当为编辑时,要传入id
//当为编辑时,要传入id
if
(
_id
!=
null
){
_data
[
'id'
]
=
_id
;
_data
[
'upload_id'
]
=
_objThis
.
upload_id
;
};
$
.
ajax
({
type
:
'POST'
,
url
:
'/index/houseEdit'
,
...
...
public/resource/js/user.js
View file @
89e173ce
...
...
@@ -56,9 +56,9 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
$
(
document
).
delegate
(
".genj_ure"
,
"click"
,
function
()
{
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
$
(
"#genj_text"
).
val
(
''
);
$
(
"input[name = 'user_status']:checked"
).
removeAttr
(
"checked"
);
//
$("input[name = 'user_status']:checked").removeAttr("checked");
//
$("input[name = 'user_status']:checked").attr("checked",true);
$
(
"input[name = 'user_status']:checked"
).
attr
(
"checked"
,
true
);
user
.
getGenjinLabel
();
});
// ===========================新增客户====================
...
...
@@ -469,7 +469,10 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
$
(
"input[type='radio'][name='user_status'][value="
+
data
.
data
+
"]"
).
attr
(
"checked"
,
"checked"
);
//
// user.user_id = $ (this).attr ("data-id");
console
.
log
(
user
.
user_id
);
$
(
"input[type='radio'][name='user_status'][value="
+
data
.
data
+
"]"
).
prop
(
"checked"
,
"checked"
);
}
}
});
...
...
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