| | |
| | | <div class="product-manage"> |
| | | <div class="filter"> |
| | | <div class="filter-card"> |
| | | <!-- <SearchCommonView--> |
| | | <!-- ref="searchCommonView"--> |
| | | <!-- :search-options="searchOptions"--> |
| | | <!-- @searchClick="searchClick"--> |
| | | <!-- @resetClick="resetClick"--> |
| | | <!-- />--> |
| | | |
| | | <CommonSearch |
| | | :show-add="false" |
| | | :show-download="false" |
| | | :show-download="true" |
| | | :amount-view="false" |
| | | :show-action-btn="false" |
| | | :placeholder="'请输入产品名称/供应商'" |
| | | @searchClick="onFilterSearch" |
| | | /> |
| | | |
| | | <div class="add-view"> |
| | | <!-- <el-button type="primary" size="mini" @click="addBtnClick">新建</el-button>--> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="body"> |
| | |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <!-- 新建/编辑产品 --> |
| | | <AddProduct v-if="editConfig.visible" :add-common-config="editConfig" /> |
| | |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | | searchText:'', |
| | | searchText: "", |
| | | tableList: {}, |
| | | searchOptions: [], |
| | | commonDetail: { |
| | |
| | | { label: "最低库存", prop: "minimumStock", min: 80 }, |
| | | { label: "最高库存", prop: "maximumStock", min: 80 } |
| | | ], |
| | | showCol: ['产品编码', '产品名称', '供应商', '产品类别', '规格', '价格', '最低库存', '最高库存'] |
| | | showCol: ["产品编码", "产品名称", "供应商", "产品类别", "规格", "价格", "最低库存", "最高库存"] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | methods: { |
| | | setColumnVisible(showCol){ |
| | | return this.tableColumn.map(ele=>{ |
| | | return this.tableColumn.map((ele) => { |
| | | return { |
| | | ...ele, |
| | | isShowColumn:showCol.includes(ele.label) |
| | |
| | | allcol: [], |
| | | tableColumn:this.setColumnVisible(this.showCol) |
| | | } |
| | | this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label); |
| | | this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label) |
| | | |
| | | this.searchOptions = [] |
| | | for (let i = 0; i < this.tableList.tableColumn.length; i++) { |
| | |
| | | } |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val; |
| | | this.tableList.tableColumn = this.setColumnVisible(val); |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setColumnVisible(val) |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | |
| | | // }, |
| | | |
| | | onFilterSearch(val){ |
| | | this.searchText = val ?? '' |
| | | this.searchText = val ?? "" |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |