马宇豪
2025-04-07 759946c50ace53d29c2463b9d3d661b357fff0b6
src/views/purchase/personPurchaseDetail/index.vue
@@ -56,6 +56,7 @@
<script>
import {getPersonDetailListData} from "@/api/productPurchaseSearch";
import {computePageCount} from "../../../utils";
import {getDLPersonDetailListData} from "../../../api/productPurchaseSearch";
export default {
    name: "index",
@@ -86,7 +87,7 @@
    },
    methods:{
        openPersonPurchaseDetail(startTime,endTime,identify,enterpriseNumber,directionCode){
        openPersonPurchaseDetail(startTime,endTime,identify,enterpriseNumber,directionCode,type){
            this.listQuery.filter.starttime = startTime
            this.listQuery.filter.endtime = endTime
            this.listQuery.filter.identify = identify
@@ -95,7 +96,11 @@
            this.listQuery.pageIndex = 1;
            this.listQuery.pageSize = 10;
            this.personPurchaseDetailVisible = true
            this.getPersonProductDetailList()
            if(type == 1){
                this.getPersonProductDetailList()
            }else{
                this.getDLPersonProductDetailList()
            }
        },
         async getPersonProductDetailList(){
            this.listLoading = true
@@ -114,6 +119,23 @@
            }
            this.listLoading = false
        },
        async getDLPersonProductDetailList(){
            this.listLoading = true
            let res = await getDLPersonDetailListData(this.listQuery)
            if(res.data.code === "200"){
                this.recordTotal = res.data.result.total
                this.pageSize = res.data.result.size
                this.pageTotal = computePageCount(res.data.result.total, res.data.result.size)
                this.currentPage = res.data.result.current
                this.personPurchaseDetailData = res.data.result.records
            }else{
                this.$message({
                    type:'warning',
                    message:res.data.message
                })
            }
            this.listLoading = false
        },
        handleSizeChange(val) {
            this.listQuery.pageSize = val
            this.getPersonProductDetailList()