| | |
| | | <!-- 位置报表 --> |
| | | <template> |
| | | <div class="rightContent"> |
| | | <div class="top"> |
| | |
| | | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin"; |
| | | import { getProductOperatonList } from "@/api/product/product"; |
| | | import { getLocationData,} from "@/api/locationApi/locationApi"; |
| | | import AddOverviewDialog from "@/views/overview/AddOverviewDialog"; |
| | | |
| | | export default { |
| | |
| | | }, |
| | | created() { |
| | | this.setTable(); |
| | | // this.getData(); |
| | | this.getData(); |
| | | }, |
| | | methods: { |
| | | setTable() { |
| | |
| | | } |
| | | } |
| | | this.tableList.allcol = allcol; |
| | | this.tableList.tableInfomation = this.testArr; |
| | | }, |
| | | setTableColumn(showcol) { |
| | | let tableColumn = [ |
| | | /* |
| | | product:"南方丝巢xxx", |
| | | category:"丝绸制品/真丝睡袍", |
| | | cost:"800.00", |
| | | totalPrices:"0.00", |
| | | inStore:"0.00", |
| | | availableStore:"0.00", |
| | | inStorage:"0.00", |
| | | toStore:"0.00", |
| | | forecast:"0.00", |
| | | unit:"件" |
| | | */ |
| | | { |
| | | label: "位置", |
| | | prop: "product", |
| | | prop: "locationName", |
| | | default: true, |
| | | isShowColumn: true, |
| | | }, |
| | | |
| | | { |
| | |
| | | }, |
| | | { |
| | | label: "产品", |
| | | prop: "cost", |
| | | prop: "productName", |
| | | default: true, |
| | | isShowColumn: true, |
| | | }, |
| | | { |
| | | label: "产品类别", |
| | | prop: "totalPrices", |
| | | prop: "productTypeName", |
| | | default: false, |
| | | isShowColumn: showcol.includes("产品类别"), |
| | | }, |
| | | { |
| | | label: "在库数量", |
| | | prop: "inStore", |
| | | prop: "amount", |
| | | isShowColumn: true, |
| | | default: true, |
| | | unit:"" |
| | | }, |
| | | { |
| | | label: "预留数量", |
| | | prop: "availableStore", |
| | | sortable: true, |
| | | default: false, |
| | | isShowColumn: showcol.includes("预留数量"), |
| | | isShowColumn: true, |
| | | default: true, |
| | | unit:"" |
| | | }, |
| | | { |
| | | label: "单位", |
| | | prop: "unit", |
| | | isShowColumn: true, |
| | | default: true, |
| | | }, |
| | | { |
| | | label: "价值", |
| | | prop: "toStore", |
| | | width: 120, |
| | | default: false, |
| | | isShowColumn: showcol.includes("价值"), |
| | | }, |
| | | { |
| | | label: "价值", |
| | | prop: "value", |
| | | width: 120, |
| | | default: false, |
| | | isShowColumn: showcol.includes("价值"), |
| | | unit:"¥" |
| | | }, |
| | | ]; |
| | | return tableColumn; |
| | |
| | | this.tableList.tableColumn = this.setTableColumn(val); |
| | | }, |
| | | // 请求数据 |
| | | // async getData() { |
| | | // await getProductOperatonList({ |
| | | // productId: this.productId, |
| | | // page: this.pagerOptions.currPage, |
| | | // pageSize: this.pagerOptions.pageSize, |
| | | // }).then((res) => { |
| | | // if (res.code === 200) { |
| | | // const list = res.data.map((item) => { |
| | | // return { |
| | | // ...item, |
| | | // from: item.fromLocation.name, |
| | | // to: item.toLocation.name, |
| | | // productName: this.productName, |
| | | // }; |
| | | // }); |
| | | // this.tableList.tableInfomation = list || []; |
| | | // this.pagerOptions.totalCount = res.total; |
| | | // } |
| | | // }); |
| | | // }, |
| | | async getData() { |
| | | await getLocationData({ |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | console.log(res.data,"接口请求成功") |
| | | const list = res.data |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.total |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 搜索 |
| | | getList(val) { |
| | |
| | | addBtnClick() { |
| | | this.editConfig.visible = true; |
| | | this.editConfig.title = "新建"; |
| | | this.getData() |
| | | }, |
| | | // 状态 |
| | | getStatus(val) { |