Commit bc837e32 authored by xishifeng's avatar xishifeng

跟进

parent bd378dbf
...@@ -134,19 +134,19 @@ ...@@ -134,19 +134,19 @@
6、选在哪些区域? 6、选在哪些区域?
</p> </p>
<div class="area_list"> <div class="area_list">
<select id="area_province" v-model="province"> <select id="area_province" v-model="province" @change="changeProvince($event)">
<option v-for="item in provinceList" :value="item.code" :key="item.code">{{item.name}}</option> <option v-for="item in provinceList" :value="item.code" :key="item.code">{{item.name}}</option>
</select> </select>
<img src="/app/images/but_down.png" class="but_down"> <img src="/app/images/but_down.png" class="but_down">
<select id="area_city" v-model="city"> <select id="area_city" v-model="city" @change="changeCity($event)">
<option v-for="item in cityList" :value="item.code" :key="item.code">{{item.name}}</option> <option v-for="item in cityList" :value="item.code" :key="item.code">{{item.name}}</option>
</select> </select>
<img src="/app/images/but_down.png" class="but_down"> <img src="/app/images/but_down.png" class="but_down">
<select id="area_area" v-model="district"> <select id="area_area" v-model="district">
<option v-for="item in districtList" :value="item.code" :key="item.code">{{item.name}}</option> <option v-for="item in districtList" :value="item.code" :key="item.code">{{item.fullName}}</option>
</select> </select>
<img src="/app/images/but_down.png" class="but_down"> <img src="/app/images/but_down.png" class="but_down">
<input id="business_area" type="text" v-model="business_area" placeholder="请输入商圈信息" />
<textarea placeholder="请输入其他信息" name="content" id="content_area" v-model.trim="other_area"></textarea> <textarea placeholder="请输入其他信息" name="content" id="content_area" v-model.trim="other_area"></textarea>
......
...@@ -161,6 +161,13 @@ ...@@ -161,6 +161,13 @@
.area_list select:nth-of-type(1){ .area_list select:nth-of-type(1){
margin-left: 0rem!important; margin-left: 0rem!important;
} }
#business_area{
height: .6rem;
border-radius: 0.14rem;
box-shadow: 0 0 0.1rem 0 rgba(0,0,0,0.2);
margin-top: .14rem;
text-indent: .2rem;
}
.but_down{ .but_down{
width: 0.14rem; width: 0.14rem;
height: 0.07rem; height: 0.07rem;
......
require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.css', 'jquery0325', 'common', 'lrz'], function(Vue) { require(['vue', 'vconsole', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.css', 'jquery0325', 'common', 'lrz'], function(Vue, VConsole) {
var vConsole = new VConsole();
var _applyId = getUrlParam("applyid"); //获取GET参数 var _applyId = getUrlParam("applyid"); //获取GET参数
var _token = getUrlParam("token"); var _token = getUrlParam("token");
Vue.component('imgshow-component', { Vue.component('imgshow-component', {
...@@ -35,7 +36,8 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs ...@@ -35,7 +36,8 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs
cityList: [], cityList: [],
city: '', city: '',
districtList: [], districtList: [],
district: '' district: '',
business_area: ''
}, },
created: function() { created: function() {
var _this = this; var _this = this;
...@@ -52,16 +54,13 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs ...@@ -52,16 +54,13 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs
getArea: function(_obj, fn){ getArea: function(_obj, fn){
var _this = this, var _this = this,
_data = {}; _data = {};
if(_obj['getType'] !== 'province'){ if(_obj['getType'] === 'district'){
if(!!_obj['dom']){ _data['parent_code'] = _obj['code'];
_data['parent_code'] = Number(_obj['dom'].val()) }else if(_obj['getType'] === 'city'){
}else{ _data['parent_code'] = _obj['code'];
//处理没有市选项,区选项的内容 }else if(_obj['getType'] === 'province'){
_obj['dom'].next().html('');
fn && fn(); }else{}
return false;
};
};
$.ajax({ $.ajax({
url: "/broker/getregions", url: "/broker/getregions",
type: 'GET', type: 'GET',
...@@ -69,12 +68,12 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs ...@@ -69,12 +68,12 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs
data: _data, data: _data,
beforeSend: function() {}, beforeSend: function() {},
dataType: "json", dataType: "json",
success: function(data) { success: function(_data) {
if(typeof data === 'object') { if(typeof _data === 'object') {
if(data['code'] == '200') { if(_data['code'] == '200') {
fn && fn(data); fn && fn(_data.data);
} else { } else {
layerTipsX(data['msg']); layerTipsX(_data['msg']);
} }
} else { } else {
layerTipsX('数据错误'); layerTipsX('数据错误');
...@@ -92,14 +91,37 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs ...@@ -92,14 +91,37 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs
} }
}); });
}, },
loadMain: function() { changeProvince: function(e){
var _this = this; var _this = this;
_this.userid = localStorage.getItem('id');
_this.getArea({ _this.getArea({
'getType': 'province' 'getType': 'city',
},function(_data){ 'code': _this.province
_this.provinceList = data; },function(_data2){
_this.cityList = _data2;
_this.city = _data2[0]['code'];
_this.getArea({
'getType': 'district',
'code': _this.city
},function(_data3){
_this.districtList = _data3;
_this.district = _data3[0]['code'];
});
}); });
console.log(e.target.value);
},
changeCity: function(e){
var _this = this;
_this.getArea({
'getType': 'district',
'code': _this.city
},function(_data3){
_this.districtList = _data3;
_this.district = _data3[0]['code'];
});
},
loadMain: function() {
var _this = this;
_this.userid = localStorage.getItem('id');
$.ajax({ $.ajax({
url: ServerHostTempC + "/broker/getFollowUpList", url: ServerHostTempC + "/broker/getFollowUpList",
type: 'POST', type: 'POST',
...@@ -113,7 +135,38 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs ...@@ -113,7 +135,38 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs
success: function(data) { success: function(data) {
if(typeof data === 'object') { if(typeof data === 'object') {
if(data['code'] == '200') { if(data['code'] == '200') {
_this.user_type = data.data[0]['user_type'];
_this.decision_maker = data.data[0]['decision_maker'];
_this.industry_type = data.data[0]['industry_type'];
_this.area_requirement = data.data[0]['area_requirement'];
_this.price_requirement = data.data[0]['price_requirement'];
_this.business_area = data.data[0]['business_area'];
_this.other_area = data.data[0]['other_area'];
_this.explain = data.data[0]['explain'];
_this.imgShowList.push({
'name': data.data[0]['explain_img']
});
//区域自动获取,并赋值
_this.getArea({
'getType': 'province'
},function(_data){
_this.provinceList = _data;
_this.province = data.data[0]['province']?data.data[0]['province']:'310000';
_this.getArea({
'getType': 'city',
'code': _this.province
},function(_data2){
_this.cityList = _data2;
_this.city = data.data[0]['city']?data.data[0]['city']:_data2[0]['code'];
_this.getArea({
'getType': 'district',
'code': _this.city
},function(_data3){
_this.districtList = _data3;
_this.district = data.data[0]['district']?data.data[0]['district']:_data3[0]['code'];
});
});
});
} else { } else {
layerTipsX(data['msg']); layerTipsX(data['msg']);
} }
...@@ -285,12 +338,19 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs ...@@ -285,12 +338,19 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs
"user_type": _this.user_type, "user_type": _this.user_type,
"industry_type": _this.industry_type, "industry_type": _this.industry_type,
"area_requirement": _this.area_requirement, "area_requirement": _this.area_requirement,
"price_requirement": _this.price_requirement "price_requirement": _this.price_requirement,
'province': _this.province,
'city': _this.city,
'district': _this.district
}; };
if(_this.decision_maker !== '') { if(_this.decision_maker !== '') {
//第一决策人 //第一决策人
_data.decision_maker = _this.decision_maker; _data.decision_maker = _this.decision_maker;
}; };
if(_this.business_area !== '') {
//商圈信息
_data.business_area = _this.business_area;
};
if(_this.other_area !== '') { if(_this.other_area !== '') {
//区域的补充说明 //区域的补充说明
_data.other_area = _this.other_area; _data.other_area = _this.other_area;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment