liche update for admin clues lists import bug
This commit is contained in:
@@ -214,6 +214,127 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
vue_obj = new Vue({
|
||||
el: '#search_form',
|
||||
data: {
|
||||
city_id:<?=$params['city_id']?$params['city_id']:0?>,
|
||||
county_id:<?=$params['county_id']?$params['county_id']:0?>,
|
||||
cfrom_id:<?=$params['cfrom_id']?$params['cfrom_id']:0?>,
|
||||
cfrom_id2:<?=$params['cfrom_id2']?$params['cfrom_id2']:0?>,
|
||||
cfroms:[],
|
||||
cfroms2:[],
|
||||
cityAry:[],
|
||||
countyAry:[]
|
||||
},
|
||||
mounted: function(){
|
||||
this.getCfroms()
|
||||
this.init_citys();
|
||||
},
|
||||
methods: {
|
||||
init_citys:function(){
|
||||
var vm = this;
|
||||
$.get('common/area',{id:'350',key:'city',type:1},function(response){
|
||||
if (response.code == 1) {
|
||||
vm.cityAry = response.data;
|
||||
}
|
||||
});
|
||||
if(vm.city_id>0){
|
||||
$.get('common/area',{id:vm.city_id,key:'county',type:1},function(response){
|
||||
if (response.code == 1) {
|
||||
vm.countyAry = response.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
getCfroms: function(){
|
||||
var that = this
|
||||
$.get('/receiver/clues/get_cfroms',function(result){
|
||||
that.cfroms = result.data.data
|
||||
});
|
||||
if(that.cfrom_id>0){
|
||||
$.get('/receiver/clues/get_cfroms',{'id':that.cfrom_id},function(result){
|
||||
that.cfroms2 = result.data.data
|
||||
});
|
||||
}
|
||||
},
|
||||
reset:function(){
|
||||
var that = this;
|
||||
$('#search_tp').val('mobile');
|
||||
$('#title').val('');
|
||||
$('#id-create-time').val('');
|
||||
$('#id-en-time').val('');
|
||||
that.city_id = '0';
|
||||
that.county_id = '0';
|
||||
that.cfrom_id = 0;
|
||||
that.cfrom_id2 = 0;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'city_id':function(nv, ov){
|
||||
var that = this;
|
||||
if(nv == ''){
|
||||
that.countyAry = [];
|
||||
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;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'cfrom_id':function(nv,ov){
|
||||
var that = this;
|
||||
if(nv == ''){
|
||||
that.cfrom_id2 = 0;
|
||||
that.cfroms = [];
|
||||
} else {
|
||||
$.get('/receiver/clues/get_cfroms',{'id':nv},function(result){
|
||||
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;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#import").click(function () {
|
||||
$("#clue-file").val('');
|
||||
layer.open({
|
||||
type: 1,
|
||||
area: ['40%'], //宽高
|
||||
content: $('#cule-modal'),
|
||||
title: '导入线索',
|
||||
shade: false,
|
||||
btn: ['完成'],
|
||||
yes: function (index) {
|
||||
layer.close(index);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
require(['laydate', 'autocomplete'], function (laydate) {
|
||||
laydate.render({
|
||||
elem: '#id-create-time', range: '~'
|
||||
@@ -290,125 +411,4 @@
|
||||
$("#import-form").ajaxSubmit(options);
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#import").click(function () {
|
||||
$("#clue-file").val('');
|
||||
layer.open({
|
||||
type: 1,
|
||||
area: ['40%'], //宽高
|
||||
content: $('#cule-modal'),
|
||||
title: '导入线索',
|
||||
shade: false,
|
||||
btn: ['完成'],
|
||||
yes: function (index) {
|
||||
layer.close(index);
|
||||
}
|
||||
});
|
||||
});
|
||||
vue_obj = new Vue({
|
||||
el: '#search_form',
|
||||
data: {
|
||||
city_id:<?=$params['city_id']?$params['city_id']:0?>,
|
||||
county_id:<?=$params['county_id']?$params['county_id']:0?>,
|
||||
cfrom_id:<?=$params['cfrom_id']?$params['cfrom_id']:0?>,
|
||||
cfrom_id2:<?=$params['cfrom_id2']?$params['cfrom_id2']:0?>,
|
||||
cfroms:[],
|
||||
cfroms2:[],
|
||||
cityAry:[],
|
||||
countyAry:[]
|
||||
},
|
||||
mounted: function(){
|
||||
this.getCfroms()
|
||||
this.init_citys();
|
||||
},
|
||||
methods: {
|
||||
init_citys:function(){
|
||||
var vm = this;
|
||||
$.get('common/area',{id:'350',key:'city',type:1},function(response){
|
||||
if (response.code == 1) {
|
||||
vm.cityAry = response.data;
|
||||
}
|
||||
});
|
||||
if(vm.city_id>0){
|
||||
$.get('common/area',{id:vm.city_id,key:'county',type:1},function(response){
|
||||
if (response.code == 1) {
|
||||
vm.countyAry = response.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
getCfroms: function(){
|
||||
var that = this
|
||||
$.get('/receiver/clues/get_cfroms',function(result){
|
||||
that.cfroms = result.data.data
|
||||
});
|
||||
if(that.cfrom_id>0){
|
||||
$.get('/receiver/clues/get_cfroms',{'id':that.cfrom_id},function(result){
|
||||
that.cfroms2 = result.data.data
|
||||
});
|
||||
}
|
||||
},
|
||||
reset:function(){
|
||||
var that = this;
|
||||
$('#search_tp').val('mobile');
|
||||
$('#title').val('');
|
||||
$('#id-create-time').val('');
|
||||
$('#id-en-time').val('');
|
||||
that.city_id = '0';
|
||||
that.county_id = '0';
|
||||
that.cfrom_id = 0;
|
||||
that.cfrom_id2 = 0;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'city_id':function(nv, ov){
|
||||
var that = this;
|
||||
if(nv == ''){
|
||||
that.countyAry = [];
|
||||
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;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'cfrom_id':function(nv,ov){
|
||||
var that = this;
|
||||
if(nv == ''){
|
||||
that.cfrom_id2 = 0;
|
||||
that.cfroms = [];
|
||||
} else {
|
||||
$.get('/receiver/clues/get_cfroms',{'id':nv},function(result){
|
||||
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;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user