过滤
This commit is contained in:
parent
89d4a490f5
commit
08377c74b2
@ -67,16 +67,17 @@ export default {
|
|||||||
show(bool) {
|
show(bool) {
|
||||||
this.my_show = bool;
|
this.my_show = bool;
|
||||||
if (bool) {
|
if (bool) {
|
||||||
this.initData().then(() => {
|
if (this.data) {
|
||||||
this.init();
|
console.log("data", this.data);
|
||||||
|
for (let k in this.data) {
|
||||||
if (this.data) {
|
if (k in this.params) {
|
||||||
for (let k in this.data) {
|
this.params[k] = this.data[k];
|
||||||
if (k in this.params) {
|
|
||||||
this.params[k] = this.data[k];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.initData().then(() => {
|
||||||
|
this.init();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -109,7 +110,13 @@ export default {
|
|||||||
return item.status === 0;
|
return item.status === 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.completePackagesFilter = this.packages;
|
if (typeof this.params.carrier_operator === "number") {
|
||||||
|
this.completePackagesFilter = this.packages.filter(item => {
|
||||||
|
return item.carrier_operator === this.params.carrier_operator;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.completePackagesFilter = this.packages;
|
||||||
|
}
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
@ -140,6 +147,9 @@ export default {
|
|||||||
|
|
||||||
if (selectPackage) {
|
if (selectPackage) {
|
||||||
this.params.carrier_operator = selectPackage.carrier_operator;
|
this.params.carrier_operator = selectPackage.carrier_operator;
|
||||||
|
this.completePackagesFilter = this.packages.filter(item => {
|
||||||
|
return item.carrier_operator === this.params.carrier_operator;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleChangeCarrierOperator(value) {
|
handleChangeCarrierOperator(value) {
|
||||||
@ -329,6 +339,7 @@ export default {
|
|||||||
this.params.company_id = item[0].company_id;
|
this.params.company_id = item[0].company_id;
|
||||||
|
|
||||||
if ([0, 1].indexOf(this.type)) {
|
if ([0, 1].indexOf(this.type)) {
|
||||||
|
console.log(item);
|
||||||
this.params.package_id = item[0].package_id;
|
this.params.package_id = item[0].package_id;
|
||||||
this.handleChangePackage(this.params.package_id);
|
this.handleChangePackage(this.params.package_id);
|
||||||
}
|
}
|
||||||
@ -402,6 +413,13 @@ export default {
|
|||||||
for (let index = 0; index < needParams.length; index++) {
|
for (let index = 0; index < needParams.length; index++) {
|
||||||
const element = needParams[index];
|
const element = needParams[index];
|
||||||
|
|
||||||
|
if (
|
||||||
|
element === "carrier_operator" &&
|
||||||
|
typeof this.params.carrier_operator === "number"
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
let node = orders
|
let node = orders
|
||||||
.map(el => {
|
.map(el => {
|
||||||
return el[element];
|
return el[element];
|
||||||
@ -423,6 +441,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.params.company_id || this.params.package_id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.$store.dispatch("getRelations").then(res => {
|
this.$store.dispatch("getRelations").then(res => {
|
||||||
let relations = res.filter(el => {
|
let relations = res.filter(el => {
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user