yangfeng
2023-10-17 67f27508d3720d38b16bc23b4a9e8fc306597855
销售明细单新建弹窗问题选择客户相关问题修改
2个文件已修改
60 ■■■■■ 已修改文件
src/views/sales/salesDetails/AddSalesDetailsDialog.vue 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesDetails/index.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesDetails/AddSalesDetailsDialog.vue
@@ -547,7 +547,7 @@
      getAllData()
        .then((res) => {
          this.memberOptions = res.data.member
          this.dataProcess()
          // this.dataProcess()
        })
        .catch((err) => {
          console.log(err)
@@ -672,30 +672,37 @@
        }
      }
    },
    async handleSelectClient(value, item) {
    // 销售机会列表
    async getSaleChanceList(item) {
      await getSaleChanceList({
        page: 1,
        pageSize: 15,
        search_map: {
          client_id: item.id
        }
      }).then((res) => {
        console.log(res)
        this.saleChancelist = res.data.list
      })
    },
    // 销售子单列表
    async getSubOrderList(item) {
      await getSubOrderList({
        page: 1,
        pageSize: 15,
        search_map: {
          client_id: item.id
        }
      }).then((res) => {
        this.subOrderList = res.data.list
      })
    },
    handleSelectClient(value, item) {
      if (value === "client") {
        this.clientId = item.id
        this.editConfig.infomation.client_name = item.name
        // 需要修改
        await getSaleChanceList({
          page: 1,
          pageSize: 15,
          search_map: {
            client_id: item.id
          }
        }).then((res) => {
          console.log(res)
          this.saleChancelist = res.data.list
        })
        await getSubOrderList({
          page: 1,
          pageSize: 15,
          search_map: {
            client_id: item.id
          }
        }).then((res) => {
          this.subOrderList = res.data.list
        })
        this.getSaleChanceList(item)
        this.getSubOrderList(item)
      } else if (value === "chance") {
        this.saleChanceId = item.id
        this.editConfig.infomation.client_name = item.name
@@ -721,6 +728,8 @@
      if (value === "client") {
        this.editConfig.infomation.client_name = row.name
        this.clientId = row.id
        this.getSaleChanceList(row)
        this.getSubOrderList(row)
      } else if (value === "chance") {
        this.editConfig.infomation.sale_chance_name = row.name
        this.saleChanceId = row.id
src/views/sales/salesDetails/index.vue
@@ -290,7 +290,12 @@
    addBtnClick() {
      this.editConfig.visible = true
      this.editConfig.title = "新建"
      this.editConfig.infomation = { ...this.addConfig, currency: "人民币" }
      console.log(this.addConfig)
      this.editConfig.infomation = {
        ...this.addConfig,
        currency: "人民币",
        client_name: Object.keys(this.addConfig).length === 0 ? "" : this.addConfig.client_name
      }
    },
    // 编辑
    handleClick(row) {