haoxuan
2023-10-17 d5ed072db0c236ba505971471460e24789c58562
src/views/other/payment/receipt/index.vue
@@ -146,8 +146,7 @@
    }
    this.getData()
  },
  mounted() {
  },
  mounted() {},
  methods: {
    setTable() {
      this.tableList = {
@@ -181,14 +180,14 @@
      // console.log()
      this.loading = true
      let params = {}
      let sourceTyle = this.addConfig.keywordType === "销售明细单" ? 1 : 2
      let sourceTyle = this.addConfig.keywordType === "销售明细单" || this.addConfig.keywordType === "客户名称" ? 1 : 2
      if (this.addConfig.id) {
        params = {
          sourceID: this.addConfig.id,
          sourceId: this.addConfig.id,
          sourceType: sourceTyle,
          page: this.pagerOptions.currPage,
          pageSize: this.pagerOptions.pageSize,
          client_id:this.addConfig.client_id,
          client_id: this.addConfig.client_id
        }
      } else {
        params = {
@@ -196,13 +195,13 @@
          keywordType: this.keywordType,
          page: this.pagerOptions.currPage,
          pageSize: this.pagerOptions.pageSize,
          client_id:this.addConfig.client_id,
          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 {
@@ -213,7 +212,7 @@
                }
              })
              this.tableList.tableInfomation = list || []
              this.pagerOptions.totalCount = res.data.data.count
              this.pagerOptions.totalCount = res.data.count
            } else {
              this.tableList.tableInfomation = []
            }
@@ -247,8 +246,9 @@
    addBtnClick() {
      this.editConfig.visible = true
      this.editConfig.title = "新建"
      this.editConfig.sourceType = this.sourceType
      this.editConfig.infomation = { ...this.addConfig, number: "" }
      this.editConfig.sourceType = this.addConfig.keywordType === "客户名称" ? 1 : this.sourceType
      console.log(this.addConfig)
      this.editConfig.infomation = { ...this.addConfig, saleDetailNumber: "" }
    }
  }
}