| | |
| | | @resetClick="resetClick" |
| | | /> |
| | | <div class="add-view"> |
| | | <el-button type="primary" size="mini" @click="addBtnClick">新建</el-button> |
| | | <!-- <el-button type="primary" size="mini" @click="addBtnClick">新建</el-button> --> |
| | | </div> |
| | | </div> |
| | | <template> |
| | | <TableCommonView ref="tableListRef" :table-list="tableList" @selCommonClick="selCommonClick"> |
| | | <template slot="tableButton"> |
| | | <!-- <template slot="tableButton"> |
| | | <el-table-column label="操作" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button> |
| | | <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </template> --> |
| | | </TableCommonView> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | |
| | | tableColumn: [ |
| | | { label: "产品编码", prop: "number", min: 190, isCommonClick: true }, |
| | | { label: "产品名称", prop: "name", min: 130 }, |
| | | { label: "供应商", prop: "id", min: 130 }, |
| | | { label: "供应商", prop: "supplierNumber", min: 130 }, |
| | | { label: "产品类别", prop: "productType", min: 130 }, |
| | | { label: "规格", prop: "sales_resources", min: 130 }, |
| | | { label: "型号", prop: "province", min: 130 }, |
| | | { label: "规格", prop: "specifications", min: 130 }, |
| | | { label: "型号", prop: "modelNumber", min: 130 }, |
| | | { label: "单位", prop: "unit", min: 60 }, |
| | | { label: "价格", prop: "contact_phone1", min: 130 }, |
| | | { label: "最低库存", prop: "desc", min: 80 }, |
| | | { label: "最高库存", prop: "member_name", min: 80 } |
| | | { label: "价格", prop: "purchasePrice", min: 130 }, |
| | | { label: "最低库存", prop: "minimumStock", min: 80 }, |
| | | { label: "最高库存", prop: "maximumStock", min: 80 } |
| | | ] |
| | | } |
| | | this.searchOptions = [] |
| | |
| | | // 请求数据 |
| | | async getData(val, content) { |
| | | await getProductList({ |
| | | val, |
| | | content, |
| | | [val]: content, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.data.code === 200) { |
| | | const list = res.data.data.list.map((item) => { |
| | | return { |
| | | ...item |
| | | ...item, |
| | | supplierNumber: item.supplier.number |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.getData(val, content) |
| | | this.getData(val.value, content) |
| | | }, |
| | | resetClick() { |
| | | this.getData() |