|
//企业所在省市 begin
localStorage.removeItem("invoiceProvince");//invoiceProvince 开票企业所在省市,自治区
var provincename = res.provincename;
var prov = "";
if(provincename.indexOf("省")!=-1){
prov = provincename.slice(0,provincename.indexOf("省"));
}else if(provincename.indexOf("市")!=-1){
prov = provincename.slice(0,provincename.indexOf("市"));
}else if(provincename.indexOf("自治区")!=-1){
if(provincename.indexOf("内蒙古")!=-1){
prov = provincename.slice(0,3)
}else {
prov = provincename.slice(0,2)
}
}else if(provincename.indexOf("特别行政区")!=-1){
prov = provincename.slice(0,2)
}
localStorage.setItem("invoiceProvince", prov);
//企业所在省市 end
|
|