liche update for admin clues and customer lists select bug

This commit is contained in:
xxb
2021-09-02 10:03:59 +08:00
parent a71bcb7333
commit c26bde6854
2 changed files with 60 additions and 3 deletions
+24 -2
View File
@@ -329,11 +329,22 @@
var that = this;
if(nv == ''){
that.countyAry = [];
that.county_id = '';
that.county_id = '0';
} else {
$.get('common/area',{id:nv,key:'county',type:1},function(response){
if (response.code == 1) {
that.countyAry = response.data;
if(that.county_id>0){
var county_id = '0';
for(var i in that.countyAry){
var county = that.countyAry[i];
if(county.id == that.county_id){
county_id = county.id;
break;
}
}
that.county_id = county_id;
}
}
});
}
@@ -345,7 +356,18 @@
that.cfroms = [];
} else {
$.get('/receiver/clues/get_cfroms',{'id':nv},function(result){
that.cfroms2 = result.data.data
that.cfroms2 = result.data.data;
if(that.cfrom_id2>0){
var cfrom_id2 = '0';
for(var i in that.cfroms){
var county = that.cfroms[i];
if(county.id == that.cfrom_id2){
cfrom_id2 = county.id;
break;
}
}
that.cfrom_id2 = cfrom_id2;
}
});
}
}
+36 -1
View File
@@ -224,18 +224,42 @@
watch: {
'params.city_id':function(nv, ov){
var that = this;
that.county_id = '';
if(nv == ''){
that.countyAry = [];
that.bizList = [];
that.params.county_id = '';
that.params.biz_id = '';
} else {
$.get('common/area',{id:nv,key:'county',type:1},function(response){
if (response.code == 1) {
that.countyAry = response.data;
if(that.params.county_id>0){
var county_id = '';
for(var i in that.countyAry){
var county = that.countyAry[i];
if(county.id == that.params.county_id){
county_id = county.id;
break;
}
}
that.params.county_id = county_id;
}
}
});
$.post('receiver/clues/get_adviser',{city_id:that.params.city_id,county_id:that.params.county_id},function(response){
if (response.code == 1) {
that.bizList = response.data.bizList;
if(that.params.biz_id>0){
var biz_id = '';
for(var i in that.bizList){
var biz = that.bizList[i];
if(biz.id == that.params.biz_id){
biz_id = biz.id;
break;
}
}
that.params.biz_id = biz_id;
}
}
});
}
@@ -245,6 +269,17 @@
$.post('receiver/clues/get_adviser',{city_id:that.params.city_id,county_id:that.params.county_id},function(response){
if (response.code == 1) {
that.bizList = response.data.bizList;
if(that.params.biz_id>0){
var biz_id = '';
for(var i in that.bizList){
var biz = that.bizList[i];
if(biz.id == that.params.biz_id){
biz_id = biz.id;
break;
}
}
that.params.biz_id = biz_id;
}
}
});
},