<template>
  <!-- 采购订单待确认 -->
  <div class="common-box">
    
  </div>
</template>

<script>
import ylPagination from "@/components/yl-pagination";
import { getMcsOrdPageYqrSpler } from "@/api/orderManage-sup/index";
export default {
  components: {
    ylPagination,
  },
  data() {
    return {
      listQuery: {
        current: 1,
        size: 10,
        id: "",
        deptName: "",
        docmkDateStart: "",
        docmkDateEnd: "",
        docmkDate: [],
        stas: "",
      },
      stasOptions: [
        { value: "A", lable: "未受理" },
        { value: "B", lable: "已受理" },
        { value: "R", lable: "被驳回" },
        { value: "C", lable: "已出库" },
        { value: "D", lable: "部分出库" },
        { value: "Y", lable: "已入库" },
        { value: "P", lable: "部分入库" },
      ],
      options: [],
      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];
      getMcsOrdPageYqrSpler(this.listQuery)
        .then((res) => {
          this.list = res.data.records;
          this.total = res.data.total;
          this.listLoading = false;
        })
        .catch((err) => {
          this.listLoading = false;
        });
      // getMcsOrdPageYqrSpler().then(res =>{
      // this.options = res.data
      // })
    },
    reset() {
      this.$refs.queryForm.resetFields();
      this.getData();
    },
    // 详情
    handleDetail(row) {
      this.$router.push({
        name: "confirmDetail",
        query: {
          id: row.id,
          detlCnt: row.detlCnt,
          qtySum: row.qtySum,
          purcAmt: row.purcAmt,
          docmker: row.docmker,
          docmkDate: row.docmkDate,
          stas: row.stas,
        },
      });
    },
  },
};
</script>

<style lang="scss" scoped></style>
