master
xy 3 years ago
parent cdf984c4a8
commit 84b7f7775a

@ -105,6 +105,8 @@ import { getList as getProducts } from "@/api/product"
import { serveList, getList } from "@/api/serveDetail"; import { serveList, getList } from "@/api/serveDetail";
import { parseTime, getAgeByIdcard } from "@/utils"; import { parseTime, getAgeByIdcard } from "@/utils";
import { download } from "@/utils/downloadRequest"; import { download } from "@/utils/downloadRequest";
import { getAuthTypes } from "@/utils/auth"
import qs from 'qs';
import serveDraw from "@/views/finance/component/serveDraw"; import serveDraw from "@/views/finance/component/serveDraw";
export default { export default {
@ -187,9 +189,13 @@ export default {
async getProducts(){ async getProducts(){
const res = await getProducts({ const res = await getProducts({
page:1, page:1,
page_size:999 page_size:999,
}) })
this.products = res.data let typesId = getAuthTypes(this).map(item => item.id)
this.products = res.data.filter(item => {
return typesId.indexOf(item.product_type_id) !== -1
})
this.select.product_id = this.products[0]?.id this.select.product_id = this.products[0]?.id
}, },

Loading…
Cancel
Save