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