yangfeng
2023-07-19 23d80c1b64f23ede237ab8e89ebc2ee2aaf43f26
src/views/sales/salesOpportunity/index.vue
@@ -85,16 +85,16 @@
      this.tableList = {
        tableInfomation: [],
        tableColumn: [
          { label: "机会名称", prop: "opportunityName", min: 120 }, // 机会名称
          { label: "客户名称", prop: "customName", min: 90 }, // 客户名称
          { label: "销售机会编号", prop: "salesOpportunityNo" }, // 销售机会编号
          { label: "联系人姓名", prop: "contactName", min: 100 }, // 联系人姓名
          { label: "销售阶段", prop: "saleStage" }, // 销售阶段
          { label: "可能性(%)", prop: "possible" }, // 可能性
          { label: "预计成交日期", prop: "expectDealDate" }, // 预计成交日期
          { label: "预计合同金额", prop: "expectContractAmount" }, // 预计合同金额
          { label: "预算绝对值", prop: "budgetAbsoluteValue" }, // 预算绝对值
          { label: "销售负责人", prop: "salesHead" } // 销售负责人
          { label: "机会名称", prop: "name", min: 120 }, // 机会名称
          { label: "客户名称", prop: "client_name", min: 90 }, // 客户名称
          { label: "销售机会编号", prop: "number" }, // 销售机会编号
          { label: "联系人姓名", prop: "contact_name", min: 100 }, // 联系人姓名
          { label: "销售阶段", prop: "sale_stage_id" }, // 销售阶段
          { label: "可能性(%)", prop: "possibilities_id" }, // 可能性
          { label: "预计成交日期", prop: "expected_time" }, // 预计成交日期
          { label: "预计合同金额", prop: "projected_amount" }, // 预计合同金额
          { label: "预算绝对值", prop: "capital_budget" }, // 预算绝对值
          { label: "销售负责人", prop: "member_id" } // 销售负责人
        ]
      }
      this.searchOptions = []
@@ -113,7 +113,9 @@
            if (res.data.list && res.data.list.length > 0) {
              const list = res.data.list.map((item) => {
                return {
                  ...item
                  ...item,
                  client_name: item.client.name,
                  contact_name: item.contact.name
                }
              })
              this.tableList.tableInfomation = list || []
@@ -135,84 +137,14 @@
    addBtnClick() {
      this.editConfig.visible = true
      this.editConfig.title = "新建"
      this.editConfig.infomation = {
        customName: "",
        salesOpportunityNo: "POT521",
        opportunityName: "",
        contactName: "",
        businessSource: "",
        businessType: "",
        saleStage: "",
        salesHead: "",
        oldCustomerMarket: "",
        competitor: "",
        possible: "",
        currency: "",
        budgetAbsoluteValue: "",
        expectDealDate: "",
        expectContractAmount: "",
        currentState: "",
        demandPainPoint: "",
        projectApproval: "",
        fundBudget: "",
        decisionMaker: "",
        decisionFactors: "",
        decisionFlow: "",
        programme: "",
        advantage: "",
        disadvantage: "",
        opportunity: "",
        threaten: "",
        position: "",
        map: "",
        country: "1",
        province: "1",
        city: "1",
        region: "1",
        notes: ""
      }
      this.editConfig.infomation = {}
    },
    // 编辑
    handleClick(row) {
      console.log(row)
      this.editConfig.visible = true
      this.editConfig.title = "编辑"
      this.editConfig.infomation = {
        customName: "",
        salesOpportunityNo: "POT521",
        opportunityName: "",
        contactName: "",
        businessSource: "",
        businessType: "",
        saleStage: "",
        salesHead: "",
        oldCustomerMarket: "",
        competitor: "",
        possible: "",
        currency: "",
        budgetAbsoluteValue: "",
        expectDealDate: "",
        expectContractAmount: "",
        currentState: "",
        demandPainPoint: "",
        projectApproval: "",
        fundBudget: "",
        decisionMaker: "",
        decisionFactors: "",
        decisionFlow: "",
        programme: "",
        advantage: "",
        disadvantage: "",
        opportunity: "",
        threaten: "",
        position: "",
        map: "",
        country: "1",
        province: "1",
        city: "1",
        region: "1",
        notes: ""
      }
      this.editConfig.infomation = { ...row }
    }
  }
}