| | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import { getHistory } from "@/api/reportForm/inventoryRwport" |
| | | import { getProductOperatonList } from "@/api/product/product" |
| | | // import { getProductOperatonList } from "@/api/product/product" |
| | | |
| | | import AddOverviewDialog from "@/views/overview/AddOverviewDialog" |
| | | |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | await getProductOperatonList({ |
| | | productId: this.params.id, |
| | | // await getProductOperatonList({ |
| | | // productId: this.params.id, |
| | | // page: this.pagerOptions.currPage, |
| | | // pageSize: this.pagerOptions.pageSize |
| | | // }).then((res) => { |
| | | // if (res.code === 200) { |
| | | // const list = res.data.map((item) => { |
| | | // return { |
| | | // ...item, |
| | | // fromLocation: item.fromLocation.name, |
| | | // toLocation: item.toLocation.name, |
| | | // productName: this.params.name, |
| | | // amount: item.details[0].product.amount, |
| | | // unit: item.details[0].product.unit |
| | | // } |
| | | // }) |
| | | // this.tableList.tableInfomation = list || [] |
| | | // this.pagerOptions.totalCount = res.total |
| | | // } |
| | | // }) |
| | | await getHistory({ |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | const list = res.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | fromLocation: item.fromLocation.name, |
| | | toLocation: item.toLocation.name, |
| | | productName: this.params.name, |
| | | amount: item.details[0].product.amount, |
| | | unit: item.details[0].product.unit |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.tableList.tableInfomation = res.data |
| | | this.pagerOptions.totalCount = res.total |
| | | } |
| | | }) |