Commit 019ee4fd authored by zhangjianguo's avatar zhangjianguo

修改样式

parent 13badf5f
This diff is collapsed.
...@@ -1051,7 +1051,7 @@ ...@@ -1051,7 +1051,7 @@
} }
this.apipost("/api/MallBase/AddOrUpdateMallBase", this.msg, res => { this.apipost("/api/MallBase/AddOrUpdateMallBase", this.msg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Info(res.data.message); this.Success(res.data.message);
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
......
...@@ -34,6 +34,11 @@ ...@@ -34,6 +34,11 @@
activeName: 'first' activeName: 'first'
} }
}, },
created(){
if(this.$route.query.activeName){
this.activeName = this.$route.query.activeName
}
},
components:{ components:{
vlogistics, vlogistics,
freight freight
......
...@@ -61,10 +61,10 @@ ...@@ -61,10 +61,10 @@
width="180"> width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top" > <el-tooltip class="item" effect="dark" content="编辑" placement="top" >
<img src="../../../assets/img/setup/edit.png" alt="" class="imgstyle"> <img src="../../../assets/img/setup/edit.png" alt="" class="imgstyle" @click="Edit(scope.row)">
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top"> <el-tooltip class="item" effect="dark" content="删除" placement="top" >
<img src="../../../assets/img/setup/del.png" alt="" class="imgstyle"> <img src="../../../assets/img/setup/del.png" alt="" class="imgstyle" @click="delete_b(scope.row)">
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
...@@ -113,6 +113,34 @@ ...@@ -113,6 +113,34 @@
}, },
addRule(){ addRule(){
this.$emit("AddRule",); this.$emit("AddRule",);
},
Edit(row){
this.$router.push({
name: 'addFreightRule',
query: {
ID:row.ID,
blank: "y"
}
});
},
delete_b(row){//删除按钮
let that=this;
that.Confirm("是否删除?", function () {
that.apipost(
"/api/MallBase/DelRules",
{Id:row.ID},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.GetLogisticsRulesPage();
} else {
that.Error(res.data.message);
}
},
null
);
});
} }
}, },
mounted(){ mounted(){
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
this.apipost("/api/MallBase/AddOrUpdateLogistics", this.msg, res => { this.apipost("/api/MallBase/AddOrUpdateLogistics", this.msg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Info(res.data.message); this.Success(res.data.message);
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
......
<template> <template>
<div class="regionChoice"> <div class="regionChoice" v-loading="loading">
<div class="item"> <div class="item">
<div class="item_b" v-for="(item,index) in regionList" :key="index"> <div class="item_b" v-for="(item,index) in regionList" :key="index">
<el-checkbox :indeterminate="item.indeterminate" v-model="item.ischeckAll" @change="handleCheckAllChange(index,item.ID,$event)" > </el-checkbox> <el-checkbox :indeterminate="item.indeterminate" v-model="item.ischeckAll" @change="handleCheckAllChange(index,item.ID,$event)" > </el-checkbox>
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
<script> <script>
export default { export default {
name: "regionChoice", name: "regionChoice",
props: {
List: Array,
required: true
},
data(){ data(){
return{ return{
regionList:[], regionList:[],
...@@ -39,16 +43,29 @@ ...@@ -39,16 +43,29 @@
cityList:[], cityList:[],
areaList:[], areaList:[],
loading:false,
getlist:[],
} }
}, },
methods:{ methods:{
getprovince(){ getprovince(){
let getlist = this.getlist
this.apipost("/api/Destination/GetChildList",this.msg , res => { this.apipost("/api/Destination/GetChildList",this.msg , res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data; let data = res.data.data;
for(let i=0;i<data.length;i++){ for(let i=0;i<data.length;i++){
data[i].ischeckAll=false; data[i].ischeckAll=false;
data[i].indeterminate=false; data[i].indeterminate=false;
for(let j=0;j<getlist.length;j++){
if(getlist[j].GrandpaID==data[i].ID || getlist[j].ParentID==data[i].ID){ //如果有着2个参数再 他的子级没选择完全
data[i].indeterminate=true;
}
if(getlist[j].RegionId==data[i].ID){
data[i].ischeckAll=true;
data[i].indeterminate=false;
this.getCitylist(true)
}
}
} }
this.regionList = data; this.regionList = data;
this.cityID = data[this.provinceindex].ID this.cityID = data[this.provinceindex].ID
...@@ -59,17 +76,46 @@ ...@@ -59,17 +76,46 @@
}) })
}, },
getCitylist(type=false){ getCitylist(type=false){
let getlist =this.getlist
console.log()
this.apipost("/api/Destination/GetChildList",{'Id':this.cityID} , res => { this.apipost("/api/Destination/GetChildList",{'Id':this.cityID} , res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data; let data = res.data.data;
this.areaID = data[this.cityindex].ID
for(let i=0;i<data.length;i++){ for(let i=0;i<data.length;i++){
if(type==true){ if(getlist.length>0){
data[i].ischeckAll=true; for(let j=0;j<getlist.length;j++){
data[i].indeterminate=false; if(type==true){
}else { data[i].ischeckAll=true;
data[i].ischeckAll=false; data[i].indeterminate=false;
data[i].indeterminate=false; }else {
} if(getlist[j].RegionId==this.cityID){ //父 勾选
data[i].ischeckAll=true;
data[i].indeterminate=false;
}else if(getlist[j].ParentID==data[i].ID){
data[i].ischeckAll=false;
data[i].indeterminate=true;
}else if(getlist[j].RegionId==data[i].ID){//如果自己身相等
data[i].ischeckAll=true;
data[i].indeterminate=false;
}else {
data[i].ischeckAll=false;
data[i].indeterminate=false;
}
}
}
}else {
if(type==true){
data[i].ischeckAll=true;
data[i].indeterminate=false;
}else {
data[i].ischeckAll=false;
data[i].indeterminate=false;
}
}
} }
let regionList = this.regionList let regionList = this.regionList
...@@ -79,7 +125,6 @@ ...@@ -79,7 +125,6 @@
} }
} }
this.cityList = regionList[this.provinceindex].cityList this.cityList = regionList[this.provinceindex].cityList
this.areaID = data[this.cityindex].ID
this.getareaIDlist(type) this.getareaIDlist(type)
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
...@@ -87,15 +132,40 @@ ...@@ -87,15 +132,40 @@
}) })
}, },
getareaIDlist(type=false){ getareaIDlist(type=false){
let getlist =this.getlist
this.apipost("/api/Destination/GetChildList",{'Id':this.areaID} , res => { this.apipost("/api/Destination/GetChildList",{'Id':this.areaID} , res => {
this.loading= false
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data; let data = res.data.data;
for(let i=0;i<data.length;i++){ for(let i=0;i<data.length;i++){
if(type==true){ if(getlist.length>0){
data[i].ischeckAll=true; for(let j=0;j<getlist.length;j++){
if(type==true){
data[i].ischeckAll=true;
}else {
if(getlist[j].RegionId==this.cityID){
data[i].ischeckAll=true;
}else if(getlist[j].RegionId==data[i].ID){
data[i].ischeckAll=true;
}else {
data[i].ischeckAll=false;
}
}
}
}else { }else {
data[i].ischeckAll=false; if(type==true){
} } data[i].ischeckAll=true;
}else {
data[i].ischeckAll=false;
}
}
}
let regionList = this.regionList; let regionList = this.regionList;
for(let i=0;i<regionList.length;i++){ for(let i=0;i<regionList.length;i++){
if(regionList[i].ID== this.cityID){ if(regionList[i].ID== this.cityID){
...@@ -133,7 +203,7 @@ ...@@ -133,7 +203,7 @@
this.cityList = cityList this.cityList = cityList
let areaList = this.cityList[this.cityindex].areaList let areaList = this.cityList[this.cityindex].areaList
for(let i=0;i<areaList.length;i++){ for(let i=0;i<areaList.length;i++){
areaList[i].ischeckAll=true areaList[i].ischeckAll=false
} }
this.areaList = areaList this.areaList = areaList
...@@ -152,8 +222,6 @@ ...@@ -152,8 +222,6 @@
} }
} }
this.toParent() this.toParent()
}, },
showcity(index, id){ showcity(index, id){
...@@ -172,29 +240,40 @@ ...@@ -172,29 +240,40 @@
let regionList = this.regionList; let regionList = this.regionList;
this.cityindex = index; this.cityindex = index;
this.areaID = id; this.areaID = id;
if(regionList[this.provinceindex].cityList[index].hasOwnProperty('areaList')==false){//没有子级的时候加载
this.getareaIDlist()
}else {
this.areaList = regionList[this.provinceindex].cityList[index].areaList;
}
//取消自己的勾的时候父级的勾改变 //取消自己的勾的时候父级的勾改变
let areaList = regionList[this.provinceindex].cityList[index].areaList; let areaList = regionList[this.provinceindex].cityList[index].areaList;
if(e==false){ if(e==false){
if(regionList[this.provinceindex].cityList[index].hasOwnProperty('areaList')==false){
this.getareaIDlist()
}else {
this.areaList = regionList[this.provinceindex].cityList[index].areaList;
}
regionList[this.provinceindex].indeterminate=true; regionList[this.provinceindex].indeterminate=true;
regionList[this.provinceindex].ischeckAll=false;
if(areaList!=undefined){ if(areaList!=undefined){
for(let i=0;i<areaList.length;i++){ for(let i=0;i<areaList.length;i++){
areaList[i].ischeckAll=false areaList[i].ischeckAll=false;
} }
regionList[this.provinceindex].cityList[index].indeterminate=false regionList[this.provinceindex].cityList[index].indeterminate=false
} }
}else { }else {
if(regionList[this.provinceindex].cityList[index].hasOwnProperty('areaList')==false){
this.getareaIDlist(true)
}else {
this.areaList = regionList[this.provinceindex].cityList[index].areaList;
}
regionList[this.provinceindex].indeterminate=true;
regionList[this.provinceindex].ischeckAll=false;
let all=true; let all=true;
let cityList = this.regionList[this.provinceindex].cityList; let cityList = this.regionList[this.provinceindex].cityList;
this.regionList[this.provinceindex].indeterminate=true;
if(cityList!=undefined){ if(cityList!=undefined){
for(let i=0;i<cityList.length;i++){ for(let i=0;i<cityList.length;i++){
if(cityList[i].ischeckAll==false){ if(cityList[i].ischeckAll==false){
all=false all=false
} }
...@@ -240,6 +319,7 @@ ...@@ -240,6 +319,7 @@
regionList[this.provinceindex].cityList[this.cityindex].indeterminate=true regionList[this.provinceindex].cityList[this.cityindex].indeterminate=true
}else { }else {
regionList[this.provinceindex].indeterminate=true
regionList[this.provinceindex].cityList[this.cityindex].indeterminate=true regionList[this.provinceindex].cityList[this.cityindex].indeterminate=true
let areaList= regionList[this.provinceindex].cityList[this.cityindex].areaList; let areaList= regionList[this.provinceindex].cityList[this.cityindex].areaList;
...@@ -270,9 +350,19 @@ ...@@ -270,9 +350,19 @@
}, },
toParent(){//传值给父组件 toParent(){//传值给父组件
this.$emit('event1', this.regionList) this.$emit('event1', this.regionList)
},
Receive(val){
console.log('进入')
this.regionList = [];
this.loading=true;
this.cityindex=0,
this.areaindex=0,
this.getlist= val;
setTimeout(()=>{
this.getprovince()
},100)
} }
}, },
mounted(){ mounted(){
......
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