客户关系初版
This commit is contained in:
parent
89bb38b42e
commit
b981e07d4e
@ -107,20 +107,21 @@
|
|||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<!-- <el-table-column label="编号" align="center" prop="id" /> -->
|
|
||||||
<el-table-column label="客户姓名" align="center" prop="name" />
|
<el-table-column label="客户姓名" align="center" prop="name" />
|
||||||
<el-table-column label="幼儿园名称" align="center" prop="schoolname" />
|
<el-table-column label="幼儿园名称" align="center" prop="schoolname" />
|
||||||
<el-table-column label="幼儿园人数" align="center" prop="rs" />
|
<el-table-column label="幼儿园人数" align="center" prop="rs" />
|
||||||
<el-table-column label="身份" align="center" prop="sflx" :formatter="gxFormat"/>
|
<el-table-column label="身份" align="center" prop="sflx" :formatter="gxFormat"/>
|
||||||
|
<el-table-column label="客户来源" align="center" prop="khly" :formatter="lyFormat"/>
|
||||||
<el-table-column label="联系电话" align="center" prop="lxdh" />
|
<el-table-column label="联系电话" align="center" prop="lxdh" />
|
||||||
<el-table-column label="微信" align="center" prop="wx" />
|
<el-table-column label="微信号" align="center" prop="wx" />
|
||||||
<el-table-column label="抖音" align="center" prop="dy" />
|
<el-table-column label="抖音号" align="center" prop="dy" />
|
||||||
<el-table-column label="其他" align="center" prop="qt" />
|
<el-table-column label="其他联系方式" align="center" prop="qt" />
|
||||||
<el-table-column label="所在省" align="center" prop="sheng" />
|
<el-table-column label="所在省" align="center" prop="sheng" />
|
||||||
<el-table-column label="所在市" align="center" prop="shi" />
|
<el-table-column label="所在市" align="center" prop="shi" />
|
||||||
<el-table-column label="客户来源" align="center" prop="khly" :formatter="lyFormat"/>
|
|
||||||
<el-table-column label="消费项目" align="center" prop="xfxm" />
|
<el-table-column label="消费项目" align="center" prop="xfxm" />
|
||||||
<el-table-column label="消费价值" align="center" prop="xfjz" />
|
<el-table-column label="消费价值" align="center" prop="xfjz" />
|
||||||
|
<el-table-column label="录入人" align="center" prop="createUserid" :formatter="userFormat" />
|
||||||
|
<el-table-column label="录入时间" align="center" prop="createTime" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
align="center"
|
align="center"
|
||||||
@ -198,13 +199,13 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="微信" prop="wx">
|
<el-form-item label="微信号" prop="wx">
|
||||||
<el-input v-model="form.wx" placeholder="请输入微信" />
|
<el-input v-model="form.wx" placeholder="请输入微信号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="抖音" prop="dy">
|
<el-form-item label="抖音号" prop="dy">
|
||||||
<el-input v-model="form.dy" placeholder="请输入抖音" />
|
<el-input v-model="form.dy" placeholder="请输入抖音号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -212,14 +213,18 @@
|
|||||||
<el-input v-model="form.qt" placeholder="请输入其他联系方式" />
|
<el-input v-model="form.qt" placeholder="请输入其他联系方式" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="24">
|
||||||
<el-form-item label="所在省" prop="sheng">
|
<el-form-item label="所在省" prop="sheng">
|
||||||
<el-input v-model="form.sheng" placeholder="请输入所在省" />
|
<v-distpicker
|
||||||
</el-form-item>
|
v-model="form.sheng"
|
||||||
</el-col>
|
:placeholders="placeholders"
|
||||||
<el-col :span="12">
|
:province="diglogForm.province"
|
||||||
<el-form-item label="所在市" prop="shi">
|
:city="diglogForm.city"
|
||||||
<el-input v-model="form.shi" placeholder="请输入所在市" />
|
:area="diglogForm.area"
|
||||||
|
@selected="onSelected"
|
||||||
|
></v-distpicker>
|
||||||
|
<el-input v-model="form.shengid" v-if="false" />
|
||||||
|
<el-input v-model="form.shiid" v-if="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -277,11 +282,23 @@ import {
|
|||||||
updateCustomer,
|
updateCustomer,
|
||||||
exportCustomer,
|
exportCustomer,
|
||||||
} from "@/api/benyi/customer";
|
} from "@/api/benyi/customer";
|
||||||
|
import VDistpicker from "v-distpicker";
|
||||||
|
import { listUser } from "@/api/system/user";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Customer",
|
name: "Customer",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
placeholders: {
|
||||||
|
province: "请选择省",
|
||||||
|
city: "请选择市",
|
||||||
|
area: "请选择区"
|
||||||
|
},
|
||||||
|
diglogForm: {
|
||||||
|
province: null,
|
||||||
|
city: null,
|
||||||
|
area: null
|
||||||
|
},
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@ -300,6 +317,8 @@ export default {
|
|||||||
open: false,
|
open: false,
|
||||||
gxOptions: [],
|
gxOptions: [],
|
||||||
lyOptions: [],
|
lyOptions: [],
|
||||||
|
// 用户选项
|
||||||
|
userOptions: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -315,9 +334,10 @@ export default {
|
|||||||
sheng: undefined,
|
sheng: undefined,
|
||||||
shengid: undefined,
|
shengid: undefined,
|
||||||
shi: undefined,
|
shi: undefined,
|
||||||
shiid: undefined,
|
// shiid: undefined,
|
||||||
khly: undefined,
|
khly: undefined,
|
||||||
createUserid: undefined,
|
createUserid: undefined,
|
||||||
|
createTime: undefined,
|
||||||
bz: undefined,
|
bz: undefined,
|
||||||
zhgj: undefined,
|
zhgj: undefined,
|
||||||
state: undefined,
|
state: undefined,
|
||||||
@ -337,6 +357,13 @@ export default {
|
|||||||
lxdh: [
|
lxdh: [
|
||||||
{ required: true, message: "幼儿园名称不能为空", trigger: "blur" },
|
{ required: true, message: "幼儿园名称不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
|
sheng: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "省市区不能为空",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -348,13 +375,38 @@ export default {
|
|||||||
this.getDicts("sys_dm_khgxly").then((response) => {
|
this.getDicts("sys_dm_khgxly").then((response) => {
|
||||||
this.lyOptions = response.data;
|
this.lyOptions = response.data;
|
||||||
});
|
});
|
||||||
|
this.getUserList();
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
//省市区三级联动全局组件
|
||||||
|
VDistpicker,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 字典翻译
|
/** 查询用户列表 */
|
||||||
|
getUserList() {
|
||||||
|
listUser(null).then(
|
||||||
|
(response) => {
|
||||||
|
this.userOptions = response.rows;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
// 教师字典翻译
|
||||||
|
userFormat(row, column) {
|
||||||
|
var actions = [];
|
||||||
|
var datas = this.userOptions;
|
||||||
|
Object.keys(datas).map((key) => {
|
||||||
|
if (datas[key].userId == "" + row.createUserid) {
|
||||||
|
actions.push(datas[key].nickName);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return actions.join("");
|
||||||
|
},
|
||||||
|
// 字典翻译
|
||||||
gxFormat(row, column) {
|
gxFormat(row, column) {
|
||||||
return this.selectDictLabel(this.gxOptions, row.sflx);
|
return this.selectDictLabel(this.gxOptions, row.sflx);
|
||||||
},
|
},
|
||||||
// 字典翻译
|
// 字典翻译
|
||||||
lyFormat(row, column) {
|
lyFormat(row, column) {
|
||||||
return this.selectDictLabel(this.lyOptions, row.khly);
|
return this.selectDictLabel(this.lyOptions, row.khly);
|
||||||
},
|
},
|
||||||
@ -367,6 +419,20 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//所在省市区触发联动方法
|
||||||
|
onSelected(data) {
|
||||||
|
if (
|
||||||
|
data.province.code == undefined ||
|
||||||
|
data.city.code == undefined
|
||||||
|
) {
|
||||||
|
this.form.sheng = undefined;
|
||||||
|
} else {
|
||||||
|
this.form.sheng = data.province.value;
|
||||||
|
this.form.shengid = data.province.code;
|
||||||
|
this.form.shi = data.city.value;
|
||||||
|
this.form.shiid = data.city.code;
|
||||||
|
}
|
||||||
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -396,7 +462,11 @@ export default {
|
|||||||
xfxm: undefined,
|
xfxm: undefined,
|
||||||
xfjz: undefined,
|
xfjz: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
|
createTime: undefined,
|
||||||
};
|
};
|
||||||
|
this.diglogForm.province = "";
|
||||||
|
this.diglogForm.city = "";
|
||||||
|
this.diglogForm.area = "";
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
@ -427,6 +497,8 @@ export default {
|
|||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
getCustomer(id).then((response) => {
|
getCustomer(id).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
this.diglogForm.province = response.data.sheng;
|
||||||
|
this.diglogForm.city = response.data.shi;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改本一-客户关系管理";
|
this.title = "修改本一-客户关系管理";
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.project.benyi.controller;
|
package com.ruoyi.project.benyi.controller;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
@ -74,6 +75,7 @@ public class ByCustomerController extends BaseController {
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody ByCustomer byCustomer) {
|
public AjaxResult add(@RequestBody ByCustomer byCustomer) {
|
||||||
byCustomer.setCreateUserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
byCustomer.setCreateUserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||||
|
byCustomer.setCreateTime(new Date());
|
||||||
return toAjax(byCustomerService.insertByCustomer(byCustomer));
|
return toAjax(byCustomerService.insertByCustomer(byCustomer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
package com.ruoyi.project.benyi.domain;
|
package com.ruoyi.project.benyi.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 本一-客户关系管理对象 by_customer
|
* 本一-客户关系管理对象 by_customer
|
||||||
*
|
*
|
||||||
@ -127,6 +130,13 @@ public class ByCustomer extends BaseEntity {
|
|||||||
@Excel(name = "消费项目")
|
@Excel(name = "消费项目")
|
||||||
private String xfxm;
|
private String xfxm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "开通截至日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消费价值
|
* 消费价值
|
||||||
*/
|
*/
|
||||||
@ -319,4 +329,13 @@ public class ByCustomer extends BaseEntity {
|
|||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user