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
0b9aea2d
Commit
0b9aea2d
authored
Sep 21, 2018
by
xishifeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增商铺修改
parent
be584fa0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
198 deletions
+12
-198
edit.html
application/index/view/houses/edit.html
+2
-2
shop_edit.js
public/resource/js/shop_edit.js
+10
-196
No files found.
application/index/view/houses/edit.html
View file @
0b9aea2d
...
...
@@ -30,7 +30,7 @@
<!--<div class="form-group">-->
<div
class=
"form-group"
style=
"display: none;"
>
<label
for=
"show_all"
>
是否给商户公开
</label>
<select
class=
"form-control"
name=
"showCd"
id=
"showCd"
d
ata-alert=
"请选择是否给商户公开
"
>
<select
class=
"form-control"
name=
"showCd"
id=
"showCd"
d
isabled=
"
"
>
<option
value=
""
>
请选择
</option>
<option
value=
"0"
>
是
</option>
<option
value=
"1"
>
否
</option>
...
...
@@ -470,7 +470,7 @@
<label
for=
""
>
对内项目优势
</label>
<textarea
class=
"form-control textarea-500-width"
rows=
"3"
id=
"internalYoushi"
data-alert=
"请输入该商铺周边配套、所处地段和该商铺的优势!"
placeholder=
"请输入"
></textarea>
</div>
<div
class=
"form-group full-width-100
show-c-part
"
>
<div
class=
"form-group full-width-100"
>
<label
for=
""
>
经纪人对本铺的评价
</label>
<textarea
class=
"form-control textarea-500-width"
rows=
"3"
id=
"foreignYoushi"
data-alert=
"请输入该商铺周边配套、所处地段和该商铺的优势!"
placeholder=
"1、商铺周边配套(附近有什么) 2、商铺所处地段怎么样 3、商铺附近的人流怎么样"
></textarea>
</div>
...
...
public/resource/js/shop_edit.js
View file @
0b9aea2d
...
...
@@ -37,7 +37,6 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
_roomTagObj
,
//商铺标签,初始化
_landlordPhoneObj
=
$
(
'.li_landlord_phone input'
),
//房东手机号
_internalNameObj
=
$
(
'#internalName'
),
//对内商铺名称
_foreignNameObj
=
$
(
'#foreignName'
),
//对外商铺名称
_zujinTypeObj
=
$
(
'#zujinType'
),
//租金模式
_moonPriceObj
=
$
(
'#moonPrice'
),
//月租均价
_wuyePriceObj
=
$
(
'#wuyePrice'
),
//物业管理费
...
...
@@ -55,10 +54,6 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
_addressInternalObj
=
$
(
'#address_internal'
),
//对内地址详细地址
_longitudeObj
=
$
(
'#longitude'
),
//经度
_latitudeObj
=
$
(
'#latitude'
),
//纬度
_provinceExternalObj
=
$
(
'#province_external'
),
//对外地址省
_cityExternalObj
=
$
(
'#city_external'
),
//对外地址市
_discExternalObj
=
$
(
'#disc_external'
),
//对外地址区
_addressExternalObj
=
$
(
'#address_external'
),
//对外地址详细地址
_trafficObj
=
$
(
'#traffic'
),
//交通
_hasMovedObj
=
$
(
'#hasMoved'
),
//已入住
_yingyeTimeObj
=
$
(
'#yingyeTime'
),
//营业时间
...
...
@@ -179,19 +174,13 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
'title'
:
'商铺类型暂不支持修改'
});
}
_showCdObj
.
val
(
_data
[
'is_show'
]).
change
();
_showCdObj
.
val
(
_data
[
'is_show'
]).
parent
().
show
();
_exclusiveTypeObj
.
val
(
_data
[
'is_exclusive_type'
]).
change
();
if
(
_data
[
'shop_type'
]
==
'0'
)
{
//如果是商场
_roomArea2Obj
.
val
(
_data
[
'shop_area_end'
]);
//商铺面积范围上限值
};
if
(
_data
[
'is_show'
]
==
'0'
)
{
//如果是显示给C端用户看(对商户公开)
_foreignNameObj
.
val
(
_data
[
'external_title'
]);
//对外商铺名称
_addressExternalObj
.
val
(
_data
[
'external_address'
]);
//对外详细地址
};
if
(
_data
[
'shop_type'
]
==
'1'
&&
_data
[
'is_show'
]
==
'0'
){
if
(
_data
[
'shop_type'
]
==
'1'
){
//如果是街铺,且对商户公开
if
(
_data
[
'external_slotting_fee'
]
==
'-1'
){
_foreignZhuanrangFaceObj
.
attr
(
'checked'
,
'checked'
);
...
...
@@ -326,11 +315,8 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
_roomArea1Obj
.
val
(
_data
[
'shop_area_start'
]);
//商铺面积起始值
_businessAreaObj
.
val
(
_data
[
'market_area'
]);
//商业面积
_provinceInternalObj
.
val
(
_data
[
'province'
]);
//对内省
_provinceExternalObj
.
val
(
_data
[
'province'
]);
//对外省
_cityInternalObj
.
val
(
_data
[
'city'
]);
//对内市
_cityExternalObj
.
val
(
_data
[
'city'
]);
//对外市
_discInternalObj
.
val
(
_data
[
'disc'
]);
//对内区
_discExternalObj
.
val
(
_data
[
'disc'
]);
//对外区
_addressInternalObj
.
val
(
_data
[
'internal_address'
]);
//对内详细地址
_longitudeObj
.
val
(
_data
[
'longitude'
]),
//经度
_latitudeObj
.
val
(
_data
[
'latitude'
]),
//纬度
...
...
@@ -617,11 +603,8 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
console
.
log
(
data
);
if
(
data
[
'city'
])
{
_provinceInternalObj
.
val
(
data
[
'province'
]);
_provinceExternalObj
.
val
(
data
[
'province'
]);
_cityInternalObj
.
val
(
data
[
'city'
]);
_cityExternalObj
.
val
(
data
[
'city'
]);
_discInternalObj
.
val
(
data
[
'district'
]);
_discExternalObj
.
val
(
data
[
'district'
]);
var
_htmlOri
=
_this
.
find
(
'p:nth-of-type(2)'
).
html
(),
_htmlDeal
=
''
,
_index1
=
_htmlOri
.
indexOf
(
'市'
),
...
...
@@ -665,142 +648,6 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
};
/************************************************百度地址定位相关****结束*************************************************************/
/************省市区选择处理**************/
//自动获取省列表,并追加后面的市和区
// getCityDisc({
// 'getType': 'province'
// },function(_data){
// var _htmlTemp = '';
// $.each(_data, function(i, item) {
// _htmlTemp += '<option value="{0}">{1}</option>'.stringFormatObj({
// '0': item['code'],
// '1': item['name']
// });
// });
// _provinceInternalObj.html(_htmlTemp).val('310000');
// getCityDisc({
// 'dom': _provinceInternalObj,
// 'getType': 'city'
// }, function(){
// getCityDisc({
// 'dom': _provinceInternalObj.next(),
// 'getType': 'disc'
// });
// });
// });
//
// //获取省市区输入时的真实值和所见值的对应
// function getText(_domObj, fn){
// var _arrTemp = _domObj.find('option');
// if(_arrTemp.length > 0){
// $.each(_arrTemp, function(i, item) {
// var _item = $(item);
// if(_item.val() == _domObj.val()){
// fn(_item.html());
// return false;//jq跳出当前循环
// };
// });
// }else{
// fn('');
// };
// };
//
// //对内地址省市区映射到对外地址
// function mapInput(){
// getText(_provinceInternalObj, function(_text){
// _provinceExternalObj.val(_text);
// });
// getText(_cityInternalObj, function(_text){
// _cityExternalObj.val(_text);
// });
// getText(_discInternalObj, function(_text){
// _discExternalObj.val(_text);
// });
// return false;
// };
//
// //获取省市区事件封装
// function getCityDisc(_obj, fn){
// var _data = {};
// if(_obj['getType'] != 'province'){
// if(!!_obj['dom'].val()){
// _data['parent_code'] = Number(_obj['dom'].val())
// }else{
// //处理没有市选项,区选项的内容
// _obj['dom'].next().html('');
// fn && fn();
// return false;
// };
// };
// $.ajax({
// type: 'GET',
// url: '/index/regions.html',
// timeout: 30000,
// data: _data,
// dataType: 'json',
// beforeSend: function() {},
// success: function(data) {
// if(typeof data === 'object') {
// if (data.code == 200) {
// //如果是获取的省列表,直接直接返回数组
// if(_obj['getType'] == 'province'){
// fn(data['data']);
// return false;
// };
// var _htmlTemp = '';
// $.each(data['data'], function(i, item) {
// _htmlTemp += '<option value="{0}">{1}</option>'.stringFormatObj({
// '0': item['code'],
// '1': item['name']
// });
// });
// _obj['dom'].next().html(_htmlTemp);
// _obj['getType'] == 'disc' && mapInput();//对内地址省市区映射到对外地址
// fn && fn();
// }else {
// alert(data['msg']);
// };
// }else{
// alert('数据错误');
// };
// },
// error: function() {
// alert('error');
// },
// complete: function(xhr, textStatus){
// if(textStatus === 'timeout'){
// alert('请求超时');
// };
// }
// });
// };
//
// //省选择框事件添加
// _provinceInternalObj.change(function(){
// var _this = $(this);
// getCityDisc({
// 'dom': _this,
// 'getType': 'city'
// }, function(){
// getCityDisc({
// 'dom': _this.next(),
// 'getType': 'disc'
// });
// });
// });
//
// //市选择框事件添加
// _cityInternalObj.change(function(){
// var _this = $(this);
// getCityDisc({
// 'dom': _this,
// 'getType': 'disc'
// });
// });
// _discInternalObj.change(function(){
// mapInput();//对内地址省市区映射到对外地址
// });
/***************************************************省市区选择处理结束************************************************************/
//输入框联系人模糊搜索相关事件添加
...
...
@@ -946,12 +793,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
$
(
'.shangchang-show-part'
).
hide
();
$
.
trim
(
_roomAllNumObj
.
val
())
==
''
&&
_roomAllNumObj
.
val
(
1
);
$
.
trim
(
_roomShengyuNumObj
.
val
())
==
''
&&
_roomShengyuNumObj
.
val
(
1
);
//只有满足显示给C端看,且类型为街铺时,才显示对外转让费
// if(_showCdObj.val() == '0') {//对外转让费 不受 是否对客户显示 影响
_foreignZhuanrangPriceObj
.
closest
(
'.form-group'
).
css
(
'display'
,
'block'
);
// }else{
// _foreignZhuanrangPriceObj.closest('.form-group').hide();
// }
_foreignZhuanrangPriceObj
.
closest
(
'.form-group'
).
css
(
'display'
,
'block'
);
}
else
{
//商场
$
(
'.has-housed'
).
html
(
'已入驻'
);
...
...
@@ -962,24 +804,6 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
_foreignZhuanrangPriceObj
.
closest
(
'.form-group'
).
hide
();
};
});
//是否显示给C端用户看变化事件
// _showCdObj.change(function() {
// if($(this).val() == '1') {
// 不显示给C端
// $('.show-c-part').hide();
// _foreignZhuanrangPriceObj.closest('.form-group').hide();
// } else {
// 显示给C端
// $('.show-c-part').show();
// 只有满足显示给C端看,且类型为街铺时,才显示对外转让费
// if(_shangpuTypeObj.val() == '1') {
// _foreignZhuanrangPriceObj.closest('.form-group').css('display', 'block');
// }else{
// _foreignZhuanrangPriceObj.closest('.form-group').hide();
// }
// };
// });
//对外转让费的选择事件
_foreignZhuanrangFaceObj
.
change
(
function
(){
...
...
@@ -1021,7 +845,6 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
//是否给商户公开,是否独家验证是否选择
$
.
each
([
_shangpuTypeObj
,
//商铺类型是否选择
// _showCdObj, 显示给C端用户看
_exclusiveTypeObj
,
//是否独家
],
function
(
i
,
item
)
{
if
(
$
.
trim
(
item
.
val
())
==
''
)
{
...
...
@@ -1133,7 +956,6 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
//多个input输入框验证
$
.
each
([
_internalNameObj
,
//对内商铺名称
//_foreignNameObj, //对外商铺名称
_moonPriceObj
,
//月租均价
_wuyePriceObj
,
//物业管理费
_jinchangPriceObj
,
//进场费
...
...
@@ -1146,7 +968,6 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
_addressInternalObj
,
//对内地址详细地址
_longitudeObj
,
//经度
_latitudeObj
,
//纬度
//_addressExternalObj, //对外地址详细地址
_trafficObj
,
//交通
_hasMovedObj
,
//已入住
_yingyeTimeObj
,
//营业时间
...
...
@@ -1157,9 +978,7 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
_guizeYaObj
,
_qianyueNianxianObj
],
function
(
i
,
item
)
{
if
((
item
===
_foreignNameObj
||
item
===
_addressExternalObj
||
item
===
_foreignYoushiObj
)
&&
(
_showCdObj
.
val
()
==
'1'
))
{
console
.
log
(
'不显示给商户C端看的时候,对外名称,对外地址,对外项目优势 不需要填写'
);
}
else
if
(
item
===
_foreignZhuanrangPriceObj
){
if
(
item
===
_foreignZhuanrangPriceObj
){
if
((
_shangpuTypeObj
.
val
()
==
'1'
)){
if
(
_foreignZhuanrangFaceObj
.
is
(
':checked'
)){
...
...
@@ -1279,7 +1098,6 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
var
_data
=
{
'shop_type'
:
_shangpuTypeObj
.
val
(),
'is_show'
:
_showCdObj
.
val
(),
'is_exclusive_type'
:
_exclusiveTypeObj
.
val
(),
'agent_dish'
:
_pfPhoneArr
.
join
(
','
),
'agent_data'
:
_acqxPhoneArr
.
join
(
','
),
...
...
@@ -1334,16 +1152,12 @@ define(['doT', 'css!style/shop_edit.css', 'ckfinder', 'ckfinderStart'], function
if
(
_shangpuTypeObj
.
val
()
==
'0'
)
{
_data
[
'shop_area_end'
]
=
_roomArea2Obj
.
val
();
};
if
(
_showCdObj
.
val
()
==
'0'
)
{
_data
[
'external_title'
]
=
$
.
trim
(
_foreignNameObj
.
val
());
_data
[
'external_address'
]
=
$
.
trim
(
_addressExternalObj
.
val
());
_data
[
'external_item_advantage'
]
=
$
.
trim
(
_foreignYoushiObj
.
val
());
if
(
_shangpuTypeObj
.
val
()
==
'1'
){
if
(
_foreignZhuanrangFaceObj
.
is
(
':checked'
)){
_data
[
'external_slotting_fee'
]
=
-
1
;
}
else
{
_data
[
'external_slotting_fee'
]
=
$
.
trim
(
_foreignZhuanrangPriceObj
.
val
());
}
_data
[
'external_item_advantage'
]
=
$
.
trim
(
_foreignYoushiObj
.
val
());
if
(
_shangpuTypeObj
.
val
()
==
'1'
){
if
(
_foreignZhuanrangFaceObj
.
is
(
':checked'
)){
_data
[
'external_slotting_fee'
]
=
-
1
;
}
else
{
_data
[
'external_slotting_fee'
]
=
$
.
trim
(
_foreignZhuanrangPriceObj
.
val
());
}
};
if
(
_exclusiveTypeObj
.
val
()
==
'1'
)
{
...
...
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