From af0ad7dac6c6186d0dd31a9cb72fab538f3cd151 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Mon, 6 Mar 2023 17:32:15 +0800 Subject: [PATCH] 2023-3-6 --- src/views/customer/component/addCustomer.vue | 12 +++++++++++- src/views/finance/component/serveDraw.vue | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/customer/component/addCustomer.vue b/src/views/customer/component/addCustomer.vue index fccc719..b627ceb 100644 --- a/src/views/customer/component/addCustomer.vue +++ b/src/views/customer/component/addCustomer.vue @@ -268,6 +268,7 @@ import {save, getInfo} from '@/api/customer' import {save as orderSave} from '@/api/order' import {getList as productList} from "@/api/product"; import {getBirth,getSex,getAgeByIdcard} from '@/utils' +import {getAuthAreas} from "@/utils/auth" import moment from "moment"; export default { @@ -339,6 +340,7 @@ export default { type: '', isShow: false, addressInput: '',//地址输入框 + areas:[], addressTable: [ { @@ -587,6 +589,9 @@ export default { } }, methods: { + getAreas(){ + this.areas = getAuthAreas(this) + }, init(){ this.form = { name: '', @@ -825,9 +830,11 @@ export default { }, productFilter(){ if(this.form.product_type_customer_links.length === 0) return this.products + console.log(this.form.product_type_customer_links) let ids = this.form.product_type_customer_links.map(item => item.product_type_id) + let areaIds = this.areas.map(item => item.id) return this.products.filter(item => { - return ids.indexOf(item.product_type_id) !== -1 + return (ids.indexOf(item.product_type_id) !== -1) && (areaIds.indexOf(item.area_id) !== -1) }) } }, @@ -861,6 +868,9 @@ export default { }, mounted() { this.getProducts() + }, + created() { + this.getAreas() } } diff --git a/src/views/finance/component/serveDraw.vue b/src/views/finance/component/serveDraw.vue index 5e9be9f..c1c1b09 100644 --- a/src/views/finance/component/serveDraw.vue +++ b/src/views/finance/component/serveDraw.vue @@ -368,7 +368,7 @@ export default { .pop-confirm { z-index: 3000 !important; } -.avue-dialog{ +.avue-dialog { z-index:9999 !important; }