zuozhengqing
2023-10-28 4b4438e7231bff0f260b0c17761072503e2af7b1
src/views/reportForm/inboundOutboundDetail/index.vue
@@ -31,7 +31,7 @@
<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"
@@ -181,23 +181,32 @@
          }
        })
      } 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
          }
        })