yangfeng
2023-08-24 4a63f03516cc177ad60ebbe28a65e80587846b3e
src/views/other/commonDialog/SelectCommonDialog.vue
@@ -45,6 +45,7 @@
import { getServiceContractList } from "@/api/serviceManage/serviceContract"
import { getServiceOrderList } from "@/api/serviceManage/clientServiceOrder"
import { getProductList } from "@/api/common/other"
import { getSalesReturnList } from "@/api/sales/salesReturn"
export default {
  name: "EditSelCommonDialog",
  props: {
@@ -150,6 +151,17 @@
          ]
        }
        this.searchSel = { value: "name", label: "产品名称" }
      } else if (this.editConfig.title === "销售退货单") {
        this.tableList = {
          tableInfomation: [],
          tableColumn: [
            { label: "退货单编号", prop: "number", isClick: true },
            { label: "退货日期", prop: "returnDate" },
            { label: "状态", prop: "salesReturnStatus_name" },
            { label: "退入仓库", prop: "repository" }
          ]
        }
        this.searchSel = { value: "number", label: "销售退货单编号" }
      }
      this.searchOptions = []
      for (let i = 0; i < this.tableList.tableColumn.length; i++) {
@@ -173,6 +185,8 @@
        this.getServiceOrderList()
      } else if (this.editConfig.title === "产品名称") {
        this.getProductList()
      } else if (this.editConfig.title === "销售退货单") {
        this.getSalesReturnList()
      }
    },
    // 销售总单
@@ -326,6 +340,29 @@
        this.loading = false
      })
    },
    async getSalesReturnList() {
      await getSalesReturnList({
        keyword: this.keyword,
        keywordType: this.keywordType,
        page: 0,
        pageSize: 0
      }).then((res) => {
        if (res.code === 200) {
          if (res.data.list && res.data.list.length > 0) {
            const list = res.data.list.map((item) => {
              return {
                ...item,
                salesReturnStatus_name: item.SalesReturnStatus.name
              }
            })
            this.tableList.tableInfomation = list.slice(0, 5) || []
          } else {
            this.tableList.tableInfomation = []
          }
        }
        this.loading = false
      })
    },
    handleClose() {
      this.editConfig.editVisible = false
    },
@@ -343,6 +380,8 @@
        this.$emit("selClient", row, "customService")
      } else if (this.editConfig.title === "产品名称") {
        this.$emit("selClient", row, "productName")
      } else if (this.editConfig.title === "销售退货单") {
        this.$emit("selClient", row, "salesReturn")
      }
    },
    // 搜索