<template>
    <!-- 供应商采购订单 已出库 -->
    <div class="common-box">
        
    </div>
</template>

<script>
import ylPagination from "@/components/yl-pagination";
import { getSplerDelvOrdPage } from "@/api/orderManage-sup/index";
    export default {
        components: {
            ylPagination
        },
        data() {
            return {
                listQuery:{
                    current: 1,
                    size: 10,
                    purcOrdId: "",
                    docmkDateStart: "",
                    docmkDateEnd: "",
                    docmkDate: [],
                    purcOrdStas: "",
                },
                stasOptions: [
                    {value: 'C', lable: "已出库"},
                    {value: 'D', lable: "部分出库"},
                    {value: 'Y', lable: "已入库"},
                    {value: 'P', lable: "部分入库"}
                ],
                dd1: [
                    {value: 0, name: "订单类型1"},
                    {value: 1, name: "订单类型2"}
                ],
                listLoading: false,
                list: [],
                total: 0,
            }
        },
        mounted () {
            this.getData();
        },
        methods: {
            getData(type) {
                if (type == "search") {
                    this.listQuery.current = 1;
                }
                this.listLoading = true;
                this.listQuery.docmkDateStart = this.listQuery.docmkDate[0];
                this.listQuery.docmkDateEnd = this.listQuery.docmkDate[1];
                getSplerDelvOrdPage(this.listQuery).then((res) => {
                    this.list = res.data.records;
                    this.total = res.data.total;
                    this.listLoading = false;
                })
                .catch((err) => {
                    this.listLoading = false;
                });
            },
            reset(){
                this.$refs.queryForm.resetFields();
                this.getData();
            },
            // 详情
            handleDetail(row){
                console.log(row)
                this.$router.push({
                    name: 'alreadyDetail',
                    query: {
                        delvOrdId: row.delvOrdId,
                        purcOrdId: row.purcOrdId,
                        detlCnt: row.detlCnt,
                        orgName: row.orgName,
                        docmker: row.docmker,
                        docmkDate: row.docmkDate,
                        purcOrdStas: row.purcOrdStas,
                    }
                });
            },
        },
    }
</script>

<style lang="scss" scoped>

</style>