src/views/sales/salesDetails/AddSalesDetailsDialog.vue
@@ -554,7 +554,7 @@
  computed: {
    clientList() {
      return this.$store.state.getClientName.clientList
    }
    },
    // saleChancelist() {
    //   return this.$store.state.getClientName.saleChancelist
    // },
@@ -637,6 +637,10 @@
        }
      }
    }
  },
  mounted(){
    this.getSaleChanceList()
    this.getQuotation()
  },
  created() {
    if (this.editConfig.title !== "新建") {
@@ -820,13 +824,16 @@
    },
    // 获取报价单
    getQuotation(id, value) {
      getQuotationList({
        page: 0,
     let params={
         page: 0,
        pageSize: 0,
        search_map: {
          sale_chance_id: id
        }
      }).then((res) => {
     }
     if(id){
      params.search_map={
        sale_chance_id: id
      }
     }
      getQuotationList(params).then((res) => {
        if (res.code == 200) {
          console.log(res)
          this.quotationList = res.data.list
@@ -856,15 +863,12 @@
        restaurants = this.clientList
        console.log(restaurants, "客户单")
      } else if (value === "chance") {
        if (this.editConfig.infomation.client_name) {
          restaurants = this.saleChancelist
        }
      } else if (value === "subbill") {
        restaurants = this.subOrderList
      } else if (value === "quotation") {
        if (this.editConfig.infomation.sale_chance_name) {
          restaurants = this.quotationList
        }
        console.log(this.quotationList,'quotationList')
      }
      var results = queryString ? restaurants.filter(this.createStateFilter(queryString, value)) : restaurants
      cb(results)
@@ -880,13 +884,22 @@
    },
    // 销售机会列表
    async getSaleChanceList(item) {
      await getSaleChanceList({
        page: 1,
        pageSize: 15,
        search_map: {
      let params={}
      if(item){
        params={
          page: 1,
          pageSize: 15,
        }
        params.search_map={
          client_id: item.id
        }
      }).then((res) => {
      }else{
        params={
          page: 0,
          pageSize: 0,
        }
      }
      await getSaleChanceList(params).then((res) => {
        console.log(res)
        this.saleChancelist = res.data.list
      })