Commit 1f7ef7d9 authored by xishifeng's avatar xishifeng

032601

parent 30551323
......@@ -134,16 +134,20 @@
6、选在哪些区域?
</p>
<div class="area_list">
<select id="area_city">
<select id="area_province" v-model="province">
<option v-for="item in provinceList" :value="item.code" :key="item.code">{{item.name}}</option>
</select>
<img src="/app/images/but_down.png" class="but_down">
<select id="area_area">
<select id="area_city" v-model="city">
<option v-for="item in cityList" :value="item.code" :key="item.code">{{item.name}}</option>
</select>
<img src="/app/images/but_down.png" class="but_down">
<select id="area_q">
<select id="area_area" v-model="district">
<option v-for="item in districtList" :value="item.code" :key="item.code">{{item.name}}</option>
</select>
<img src="/app/images/but_down.png" class="but_down">
<textarea placeholder="请输入其他信息" name="content" id="content_area" v-model.trim="other_area"></textarea>
</div>
......
......@@ -158,6 +158,9 @@
background: #FFFFff;
margin-left: 0.35rem;
}
.area_list select:nth-of-type(1){
margin-left: 0rem!important;
}
.but_down{
width: 0.14rem;
height: 0.07rem;
......@@ -165,9 +168,6 @@
margin-left: -0.34rem;
margin-top: 0.23rem;
}
#area_city{
margin-left: 0rem!important;
}
#content_area{
width: 100%;
border-top: 1px solid #e5e5e5;
......
......@@ -11,7 +11,7 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs
},
methods: {
deleteimg: function(){
this.$emit('deleteimg', { message: this.data.name });
this.$emit('deleteimg', { 'message': this.data.name });
}
}
});
......@@ -29,7 +29,13 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs
price_requirement: '',
other_area: '',
explain: '',
imgShowList: []
imgShowList: [],
provinceList: [],
province: '310000',
cityList: [],
city: '',
districtList: [],
district: ''
},
created: function() {
var _this = this;
......@@ -43,9 +49,90 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs
}
},
methods: {
getArea: function(_obj, fn){
var _this = this,
_data = {};
if(_obj['getType'] !== 'province'){
if(!!_obj['dom']){
_data['parent_code'] = Number(_obj['dom'].val())
}else{
//处理没有市选项,区选项的内容
_obj['dom'].next().html('');
fn && fn();
return false;
};
};
$.ajax({
url: "/broker/getregions",
type: 'GET',
timeout: 30000,
data: _data,
beforeSend: function() {},
dataType: "json",
success: function(data) {
if(typeof data === 'object') {
if(data['code'] == '200') {
fn && fn(data);
} else {
layerTipsX(data['msg']);
}
} else {
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('上传失败,请重试');
},
complete: function(xhr, textStatus) {
if(textStatus === "timeout") {
//处理超时的逻辑
layerTipsX('请求超时,请重试');
};
}
});
},
loadMain: function() {
var _this = this;
_this.userid = localStorage.getItem('id');
_this.getArea({
'getType': 'province'
},function(_data){
_this.provinceList = data;
});
$.ajax({
url: ServerHostTempC + "/broker/getFollowUpList",
type: 'POST',
data: {
'report_id': _applyId
},
timeout: 30000,
beforeSend: function() {},
dataType: "json",
cache: false,
success: function(data) {
if(typeof data === 'object') {
if(data['code'] == '200') {
} else {
layerTipsX(data['msg']);
}
} else {
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('上传失败,请重试');
},
complete: function(xhr, textStatus) {
if(textStatus === "timeout") {
//处理超时的逻辑
layerTipsX('请求超时,请重试');
};
_this.uploadImgFlag = false;
}
});
// $.ajax({
// url: ServerHostTempC + "/applies/genjing_get",
// data: {
......@@ -129,6 +216,9 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs
},
deleteimgMain: function(payload){
console.log(payload);
this.imgShowList = this.imgShowList.filter(function(item, index, array){
return (item.name !== payload.message);
});
},
uploadImg: function(e) {
var _this = this,
......@@ -138,6 +228,9 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs
}else if(e.target.value.length <= 0){
layerTipsX('您取消了上传');
return false;
}else if(_this.imgShowList.length > 0){
layerTipsX('目前最多只能上传一张');
return false;
}else{
_fd.append('image', e.target.files[0]);
};
......@@ -149,7 +242,6 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs
beforeSend: function() {
_this.uploadImgFlag = true;
},
async: false,
dataType: "json",
cache: false,
processData: false,
......@@ -196,14 +288,21 @@ require(['vue', 'css!style/customerinfo_sub_page.css', 'css!style/customer_gj.cs
"price_requirement": _this.price_requirement
};
if(_this.decision_maker !== '') {
//第一决策人
_data.decision_maker = _this.decision_maker;
};
if(_this.other_area !== '') {
//区域的补充说明
_data.other_area = _this.other_area;
};
if(_this.explain !== '') {
//补充说明
_data.explain = _this.explain;
};
if(_this.imgShowList.length > 0) {
//图片,目前只能上传一张
_data.explain_img = _this.imgShowList[0].name;
};
$.ajax({
url: ServerHostTempC + "/broker/addFollowUp",
data: _data,
......
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