| | |
| | | </div> |
| | | </div> |
| | | <div class="list-view"> |
| | | <div class="table"> |
| | | <TableCommonView |
| | | ref="tableListRef" |
| | | :table-list="tableList" |
| | | @selTableCol="selTableCol" |
| | | @tableRowClick="tableRowClick" |
| | | :showSummary="true" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="210" align="center"> |
| | |
| | | </el-table-column> |
| | | </template> |
| | | </TableCommonView> |
| | | </div> |
| | | <div class="btn-pager"> |
| | | <PagerView |
| | | class="page" |
| | | :pager-options="pagerOptions" |
| | | v-on="pagerEvents" |
| | | /> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | <!-- 编辑 --> |
| | | <AddOverviewDialog |
| | | v-if="editConfig.visible" |
| | | :edit-common-config="editConfig" |
| | | :add-name="this.$route.params.name" |
| | | /> |
| | | <AddOverviewDialog v-if="editConfig.visible" :edit-common-config="editConfig" :add-name="this.$route.params.name" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | inStorage: "00.00", |
| | | toStore: 65432.0, |
| | | forecast: "0.00", |
| | | unit: "件", |
| | | unit: "件" |
| | | }, |
| | | { |
| | | product: "HC销售区/A区", |
| | |
| | | inStorage: "0.00", |
| | | toStore: 32618.0, |
| | | forecast: "0.00", |
| | | unit: "件", |
| | | }, |
| | | unit: "件" |
| | | } |
| | | ], |
| | | searchOptions: [], |
| | | commonDetail: { |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {}, |
| | | infomation: {} |
| | | }, |
| | | editConfig: { |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {}, |
| | | infomation: {} |
| | | }, |
| | | productId: this.$route.params.id, |
| | | productName: this.$route.params.name, |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.setTable(); |
| | | this.getData(); |
| | | this.setTable() |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | | setTable() { |
| | |
| | | showcol: this.showcol, |
| | | countcol: this.countcol, |
| | | allcol: [], |
| | | tableColumn: this.setTableColumn(this.showcol), |
| | | }; |
| | | let allcol = []; |
| | | tableColumn: this.setTableColumn(this.showcol) |
| | | } |
| | | let allcol = [] |
| | | for (let i = 0; i < this.tableList.tableColumn.length; i++) { |
| | | if (!this.tableList.tableColumn[i].default) { |
| | | const label = this.tableList.tableColumn[i].label; |
| | | allcol.push(label); |
| | | const label = this.tableList.tableColumn[i].label |
| | | allcol.push(label) |
| | | } |
| | | } |
| | | this.tableList.allcol = allcol; |
| | | this.tableList.allcol = allcol |
| | | }, |
| | | setTableColumn(showcol) { |
| | | let tableColumn = [ |
| | |
| | | label: "位置", |
| | | prop: "locationName", |
| | | default: true, |
| | | isShowColumn: true, |
| | | isShowColumn: true |
| | | }, |
| | | |
| | | { |
| | | label: "存储类别", |
| | | prop: "category", |
| | | default: false, |
| | | isShowColumn: showcol.includes("存储类别"), |
| | | isShowColumn: showcol.includes("存储类别") |
| | | }, |
| | | { |
| | | label: "产品", |
| | | prop: "productName", |
| | | default: true, |
| | | isShowColumn: true, |
| | | isShowColumn: true |
| | | }, |
| | | { |
| | | label: "产品类别", |
| | | prop: "productTypeName", |
| | | default: false, |
| | | isShowColumn: showcol.includes("产品类别"), |
| | | isShowColumn: showcol.includes("产品类别") |
| | | }, |
| | | { |
| | | label: "在库数量", |
| | |
| | | prop: "unit", |
| | | width: 120, |
| | | default: false, |
| | | isShowColumn: showcol.includes("价值"), |
| | | isShowColumn: showcol.includes("价值") |
| | | }, |
| | | { |
| | | label: "价值", |
| | |
| | | return tableColumn; |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val; |
| | | this.tableList.tableColumn = this.setTableColumn(val); |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setTableColumn(val) |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | await getLocationData({ |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | const list = res.data; |
| | | this.tableList.tableInfomation = list || []; |
| | | this.pagerOptions.totalCount = res.total; |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | |
| | | // 搜索 |
| | | getList(val) { |
| | | console.log(val); |
| | | console.log(val) |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row) { |
| | | console.log(row); |
| | | console.log(row) |
| | | // this.editConfig.visible = true; |
| | | this.editConfig.title = "查看"; |
| | | this.editConfig.infomation = { ...row }; |
| | | this.editConfig.title = "查看" |
| | | this.editConfig.infomation = { ...row } |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | |
| | | }, |
| | | // 状态 |
| | | getStatus(val) { |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : "完成"; |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : "完成" |
| | | }, |
| | | // 历史 |
| | | handleHistoryClick(row) { |
| | |
| | | }); |
| | | }, |
| | | // 补货 |
| | | handleAddGoods() {}, |
| | | }, |
| | | }; |
| | | handleAddGoods() {} |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped> |
| | | .rightContent { |
| | | height: 100%; |
| | | background: #e6ecf2; |
| | | padding: 10px; |
| | | // .top { |
| | | // margin-bottom: 20px; |
| | | // height: 60px; |
| | | // background: #fff; |
| | | // border-radius: 8px; |
| | | // } |
| | | .list-view { |
| | | height: calc(100% - 150px); |
| | | } |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped></style> |