zuozhengqing
2023-10-16 8e5ec095fc4ba9cac7c91b681b06846d3e4155ae
src/views/sales/quotation/AddQuotationDialog.vue
@@ -356,8 +356,9 @@
      editConfig: this.editCommonConfig,
      rules: {
        number: [{ required: true, message: "请输入", trigger: "blur" }],
        quotationName: [{ required: true, message: "请输入", trigger: "blur" }],
        quotation_status_id: [{ required: true, message: "请选择", trigger: "change" }],
        sale_chance_name: [{ required: true, message: "请选择销售机会", trigger: "blur" }],
        sale_chance_name: [{ required: true, validator: this.checkChance, trigger: "change" }],
        member_id: [{ required: true, message: "请选择负责人", trigger: "change" }]
      },
      memberOptions: [],
@@ -495,7 +496,7 @@
      let data = this.editConfig.infomation
      let params = {
        id: this.editConfig.title === "新建" ? 0 : data.id,
        quotationName: this.quotationName || "",
        quotationName: data.quotationName || "",
        conditions: data.conditions || "",
        file: data.file || "",
        member_id: data.member_id || 0,
@@ -505,7 +506,8 @@
        validity_date: data.validity_date || "",
        products: this.tableData,
        codeStandID: data.ID,
        codeRule: this.codeRule
        codeRule: this.codeRule,
        client_id: this.clientId || 0,
      }
      return params
    },
@@ -659,6 +661,14 @@
    clearupProduct(data) {
      this.tableData = data
      this.productTableList.tableData = this.tableData
    },
    // 订单编码单独校验
    checkChance(rule, value, callback) {
      if (this.editConfig.infomation.sale_chance_name && this.editConfig.infomation.sale_chance_name.length > 0) {
        callback()
      } else {
        callback(new Error("请选择销售机会"))
      }
    }
  }
}