|
|
|
|
@ -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()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|