yangfeng
2023-10-16 0f43183f986f0ed314647687c73da5a4493d2611
src/views/other/payment/receipt/index.vue
@@ -146,6 +146,7 @@
    }
    this.getData()
  },
  mounted() {},
  methods: {
    setTable() {
      this.tableList = {
@@ -176,16 +177,31 @@
    },
    // 请求数据
    async getData() {
      // console.log()
      this.loading = true
      await getReceiptList({
        keyword: this.keyword,
        keywordType: this.keywordType,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      })
      let params = {}
      let sourceTyle = this.addConfig.keywordType === "销售明细单" ? 1 : 2
      if (this.addConfig.id) {
        params = {
          sourceID: this.addConfig.id,
          sourceType: sourceTyle,
          page: this.pagerOptions.currPage,
          pageSize: this.pagerOptions.pageSize,
          client_id: this.addConfig.client_id
        }
      } else {
        params = {
          keyword: this.keyword,
          keywordType: this.keywordType,
          page: this.pagerOptions.currPage,
          pageSize: this.pagerOptions.pageSize,
          client_id: this.addConfig.client_id
        }
      }
      await getReceiptList(params)
        .then((res) => {
          if (res.data.code === 200) {
            const resList = res?.data?.data?.data ?? []
          if (res.code === 200) {
            const resList = res?.data?.data ?? []
            if (resList.length > 0) {
              const list = resList.map((item) => {
                return {
@@ -196,7 +212,7 @@
                }
              })
              this.tableList.tableInfomation = list || []
              this.pagerOptions.totalCount = res.data.data.count
              this.pagerOptions.totalCount = res.data.count
            } else {
              this.tableList.tableInfomation = []
            }