Commit 6fc3120d authored by zhengyi's avatar zhengyi

潜在客户编辑业务调整

parent 11af381b
...@@ -647,6 +647,25 @@ export default { ...@@ -647,6 +647,25 @@ export default {
this.isCustomerServiceConfirmed = this.$route.query.isCustomerServiceConfirmed ? true : false this.isCustomerServiceConfirmed = this.$route.query.isCustomerServiceConfirmed ? true : false
this.getCustomerSelect() this.getCustomerSelect()
this.reset() this.reset()
if (this.potential){
console.log("潜在客户编辑")
this.rules = {
name: [
{
required: true,
message: this.$t("客户名称不能为空"),
trigger: "blur"
}
],
source: [
{
required: true,
message: this.$t("客户来源不能为空"),
trigger: "blur"
}
]
}
}
// this.getUserMemberUserFn() // this.getUserMemberUserFn()
if (this.customerId !== "0") { if (this.customerId !== "0") {
let customerId = this.customerId let customerId = this.customerId
...@@ -1017,7 +1036,7 @@ export default { ...@@ -1017,7 +1036,7 @@ export default {
this.$modal.msgError(this.$t("至少填写一个联系人信息")) this.$modal.msgError(this.$t("至少填写一个联系人信息"))
return return
} }
if (this.form.competitorIds == 0) { if (this.form.competitorIds == 0 && !this.potential) {
this.$modal.msgError(this.$t("请重新选择主要竞争对手")) this.$modal.msgError(this.$t("请重新选择主要竞争对手"))
return return
} }
...@@ -1273,7 +1292,7 @@ export default { ...@@ -1273,7 +1292,7 @@ export default {
}) })
}, },
changeCompetitor(val) { changeCompetitor(val) {
if (val == 0) { if (val == 0 && !this.potential) {
this.$prompt("请输入主要竞争对手", "提示", { this.$prompt("请输入主要竞争对手", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消" cancelButtonText: "取消"
...@@ -1301,6 +1320,9 @@ export default { ...@@ -1301,6 +1320,9 @@ export default {
customerId() { customerId() {
return this.$route.params.customerId return this.$route.params.customerId
}, },
potential() {
return this.$route.query.potential
},
customerSelectFn() { customerSelectFn() {
if (this.recommended.length > 0) { if (this.recommended.length > 0) {
let i = this.customerSelect.find((item) => item.id === this.recommended[0].id) let i = this.customerSelect.find((item) => item.id === this.recommended[0].id)
......
...@@ -1252,7 +1252,20 @@ export default { ...@@ -1252,7 +1252,20 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
console.log(row.id) console.log(row.id)
this.$router.push("/customer/add-edit/" + row.id) switch (this.$route.path) {
case "/customer/customer":
this.$router.push("/customer/add-edit/" + row.id)
break
case "/customer/department-customers":
this.$router.push("/customer/add-edit/" + row.id)
break
case "/customer/potential":
this.$router.push("/customer/add-edit/" + row.id + "?potential=true")
break
default:
this.$router.push("/customer/add-edit/" + row.id)
break
}
// this.reset(); // this.reset();
// const id = row.id; // const id = row.id;
// getCustomer(id).then(response => { // getCustomer(id).then(response => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment