diff --git a/ruoyi-ui/src/views/crm/business/index.vue b/ruoyi-ui/src/views/crm/business/index.vue index 94a950b..5fcaab9 100644 --- a/ruoyi-ui/src/views/crm/business/index.vue +++ b/ruoyi-ui/src/views/crm/business/index.vue @@ -1,14 +1,14 @@ @@ -297,6 +298,23 @@ this.title = '修改线索' }) }, + /** 退回按钮操作 */ + handleRollback (row) { + this.reset(); + this.form.owner = ''; + this.form.id = row.id; + const that = this + this.$modal + .confirm('是否确认退回线索?') + .then(function () { + return updateClues(that.form) + }) + .then(() => { + this.getList() + this.$modal.msgSuccess('已退回线索') + }) + .catch(() => { }) + }, /** 提交按钮 */ submitForm () { this.$refs['form'].validate((valid) => { diff --git a/ruoyi-ui/src/views/crm/customer/list.vue b/ruoyi-ui/src/views/crm/customer/list.vue index d771786..0ae7c3f 100644 --- a/ruoyi-ui/src/views/crm/customer/list.vue +++ b/ruoyi-ui/src/views/crm/customer/list.vue @@ -70,6 +70,7 @@ @@ -161,6 +162,7 @@ import { addCustomer, updateCustomer, } from '@/api/crm/customer' +import { addBusiness } from "@/api/crm/business"; import TransferCustomerComponent from './Transfer' import ToPoolComponent from './ToPool' @@ -223,6 +225,8 @@ export default { }, // 表单参数 form: {}, + //新增商机参数 + businessForm: {}, // 表单校验 rules: { name: [ @@ -370,6 +374,27 @@ export default { this.$refs.transferCustomer.open(ids) }) }, + //转为商机按钮 + handleToBusiness (row) { + this.businessForm.customerId = row.id + this.businessForm.businessName = '由客户转换而来' + this.businessForm.stageType = 0 + this.businessForm.forecastBusinessPrice = 0 + const that = this + getCustomer(this.businessForm.customerId).then((response) => { + this.businessForm.customerNumber = response.data.code + }) + this.$modal + .confirm('是否确认转为商机?') + .then(function () { + return addBusiness(that.businessForm) + }) + .then(() => { + this.getList() + this.$modal.msgSuccess('已成功转为商机') + }) + .catch(() => { }) + }, handleTransferCustomerClose () { this.transferCustomer = false; this.getList(); diff --git a/ruoyi-ui/src/views/crm/customer/person-list.vue b/ruoyi-ui/src/views/crm/customer/person-list.vue index b159376..e03690e 100644 --- a/ruoyi-ui/src/views/crm/customer/person-list.vue +++ b/ruoyi-ui/src/views/crm/customer/person-list.vue @@ -70,6 +70,7 @@ @@ -161,6 +162,7 @@ import { addCustomer, updateCustomer, } from '@/api/crm/customer' +import { addBusiness } from "@/api/crm/business"; import TransferCustomerComponent from './Transfer' import ToPoolComponent from './ToPool' @@ -370,6 +372,27 @@ export default { this.$refs.transferCustomer.open(ids) }) }, + //转为商机按钮 + handleToBusiness (row) { + this.businessForm.customerId = row.id + this.businessForm.businessName = '由客户转换而来' + this.businessForm.stageType = 0 + this.businessForm.forecastBusinessPrice = 0 + const that = this + getCustomer(this.businessForm.customerId).then((response) => { + this.businessForm.customerNumber = response.data.code + }) + this.$modal + .confirm('是否确认转为商机?') + .then(function () { + return addBusiness(that.businessForm) + }) + .then(() => { + this.getList() + this.$modal.msgSuccess('已成功转为商机') + }) + .catch(() => { }) + }, handleTransferCustomerClose () { this.transferCustomer = false; this.getList(); diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index c17e678..5884f7e 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -2,8 +2,7 @@
-

- +