You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.7 KiB

3 years ago
<template>
3 years ago
<div>
3 years ago
<div>
<div ref="lxHeader">
3 years ago
<lx-header icon="md-apps" style="margin-bottom: 10px; border: 0px; margin-top: 15px" text="产品管理">
3 years ago
<div slot="content"></div>
<slot>
<div>
3 years ago
<Input placeholder="关键字搜索" style="width: 200px; margin-right: 10px"/>
<Button style="margin-left: 10px" type="primary">查询</Button>
<Button style="margin-left: 10px" type="primary"
@click="$refs['addProduct'].type = 'add',$refs['addProduct'].isShow = true">新建产品
</Button>
3 years ago
</div>
</slot>
</lx-header>
</div>
</div>
3 years ago
<xy-table></xy-table>
3 years ago
3 years ago
<add-product ref="addProduct" :product-sku="productSku" :product-type="productType"></add-product>
3 years ago
</div>
</template>
<script>
3 years ago
import {getList} from '@/api/product'
import {getparameter} from '@/api/system/dictionary'
import {getList as getTypes} from '@/api/productType'
import addProduct from "@/views/product/productComponent/addProduct";
3 years ago
export default {
3 years ago
components: {
addProduct
3 years ago
},
3 years ago
data() {
3 years ago
return {
3 years ago
isShowAdd: false,
productType: [],
productSku: [],
list: [],
table: []
3 years ago
}
3 years ago
},
3 years ago
methods: {
async getList() {
const res = await getList()
console.log(res)
},
async getProductType() {
const res = await getTypes({page_size: 999})
this.productType = res.data
},
async getProductSku() {
const res = await getparameter({number: 'productSku'})
this.productSku = res.detail
}
},
mounted() {
this.getList()
this.getProductType()
this.getProductSku()
}
3 years ago
}
</script>
3 years ago
<style lang="scss" scoped>
3 years ago
</style>