From 2c51451859a03fda7b32e5a67b8fa30749a5594e Mon Sep 17 00:00:00 2001
From: sk1551 <15175617877@163.com>
Date: Wed, 17 Mar 2021 15:28:55 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=AC=E4=B8=803.15?=
=?UTF-8?q?=E9=97=AE=E9=A2=98(=E5=AE=A2=E6=88=B7=E5=85=B3=E7=B3=BB?=
=?UTF-8?q?=E7=BB=B4=E6=8A=A4)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-ui/src/views/benyi/customer/index.vue | 65 ++++++-------------
.../controller/ByCustomerController.java | 2 +-
.../project/benyi/domain/ByCustomer.java | 43 ++++++------
.../mybatis/benyi/ByCustomerMapper.xml | 2 +-
4 files changed, 43 insertions(+), 69 deletions(-)
diff --git a/ruoyi-ui/src/views/benyi/customer/index.vue b/ruoyi-ui/src/views/benyi/customer/index.vue
index 517d8a777..50b8c9842 100644
--- a/ruoyi-ui/src/views/benyi/customer/index.vue
+++ b/ruoyi-ui/src/views/benyi/customer/index.vue
@@ -114,6 +114,14 @@
v-hasPermi="['benyi:customer:remove']"
>删除
+ 导出
-
-
+
-
-
-
@@ -370,16 +368,9 @@ export default {
name: "Customer",
data() {
return {
+ // 省市二级联动
options: provinceAndCityDataPlus,
- selectedOptions: [],
- // placeholders: {
- // province: "请选择省",
- // city: "请选择市",
- // },
- // diglogForm: {
- // province: null,
- // city: null,
- // },
+ selectedOptions: ["", ""],
// 遮罩层
loading: true,
// 选中数组
@@ -452,13 +443,6 @@ export default {
lxdh: [
{ required: true, message: "联系电话不能为空", trigger: "blur" },
],
- sheng: [
- {
- required: true,
- message: "省市区不能为空",
- trigger: "blur",
- },
- ],
},
};
},
@@ -522,20 +506,10 @@ export default {
});
},
// 省市二级联动
- handleChange (val) {
- // for (let i = 0; i < this.selectedOptions.length; i++) {
- // console.log(this.selectedOptions[i]);
- // location+= CodeToText[this.selectedOptions[i]];
- // this.form.shengid = this.selectedOptions[i];
- this.form.shengid = val[0];
- this.form.shiid = val[1];
- this.form.sheng = CodeToText[val[0]]+CodeToText[val[1]];
-
-
- //打印区域码所对应的属性值即中文地址
- // console.log(location);
-
- //this.form.sheng = location;
+ handleChange(val) {
+ this.form.shengid = val[0];
+ this.form.shiid = val[1];
+ this.form.sheng = CodeToText[val[0]] + CodeToText[val[1]];
},
// 取消按钮
cancel() {
@@ -569,8 +543,7 @@ export default {
createTime: undefined,
gbtime: undefined,
};
- // this.diglogForm.province = "";
- // this.diglogForm.city = "";
+ this.selectedOptions = ["", ""];
this.resetForm("form");
},
/** 搜索按钮操作 */
@@ -597,13 +570,12 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
- this.selectedOptions = new Array();
this.reset();
const id = row.id || this.ids;
getCustomer(id).then((response) => {
this.form = response.data;
- this.selectedOptions.push(response.data.shengid,response.data.shiid);
- console.log(this.selectedOptions);
+ this.selectedOptions.push(response.data.shengid);
+ this.selectedOptions.push(response.data.shiid);
this.open = true;
this.title = "修改本一-客户关系管理";
});
@@ -653,6 +625,7 @@ export default {
})
.catch(function () {});
},
+
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByCustomerController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByCustomerController.java
index 33a2c4d55..5388722d5 100644
--- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByCustomerController.java
+++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByCustomerController.java
@@ -57,7 +57,7 @@ public class ByCustomerController extends BaseController {
public AjaxResult export(ByCustomer byCustomer) {
List list = byCustomerService.selectByCustomerList(byCustomer);
ExcelUtil util = new ExcelUtil(ByCustomer.class);
- return util.exportExcel(list, "customer");
+ return util.exportExcel(list, "客户关系管理-客户列表");
}
/**
diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByCustomer.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByCustomer.java
index 5c05694ab..09562c83f 100644
--- a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByCustomer.java
+++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByCustomer.java
@@ -20,134 +20,135 @@ public class ByCustomer extends BaseEntity {
/**
* 编号
*/
+ @Excel(name = "客户序号", cellType = Excel.ColumnType.NUMERIC, prompt = "客户编号")
private Long id;
/**
* 姓名
*/
- @Excel(name = "姓名")
+ @Excel(name = "姓名", type = Excel.Type.EXPORT)
private String name;
/**
* 身份
*/
- @Excel(name = "身份")
+ @Excel(name = "身份", type = Excel.Type.EXPORT, readConverterExp = "01=园长,02=投资人,03=园长+投资人,04=家长,05=其他")
private String sflx;
/**
* 联系电话
*/
- @Excel(name = "联系电话")
+ @Excel(name = "联系电话", type = Excel.Type.EXPORT)
private String lxdh;
/**
* 微信
*/
- @Excel(name = "微信")
+ @Excel(name = "微信", type = Excel.Type.EXPORT)
private String wx;
/**
* 抖音
*/
- @Excel(name = "抖音")
+ @Excel(name = "抖音", type = Excel.Type.EXPORT)
private String dy;
/**
* 其他
*/
- @Excel(name = "其他")
+ @Excel(name = "其他", type = Excel.Type.EXPORT)
private String qt;
/**
* 幼儿园名称
*/
- @Excel(name = "幼儿园名称")
+ @Excel(name = "幼儿园名称", type = Excel.Type.EXPORT)
private String schoolname;
/**
* 幼儿园人数
*/
- @Excel(name = "幼儿园人数")
+ @Excel(name = "幼儿园人数", type = Excel.Type.EXPORT)
private Long rs;
/**
* 所在省
*/
- @Excel(name = "所在省")
+ @Excel(name = "所在省", type = Excel.Type.EXPORT)
private String sheng;
/**
* 所在省编号
*/
- @Excel(name = "所在省编号")
+ //@Excel(name = "所在省编号")
private String shengid;
/**
* 所在市
*/
- @Excel(name = "所在市")
+ //@Excel(name = "所在市")
private String shi;
/**
* 所在市编号
*/
- @Excel(name = "所在市编号")
+ //@Excel(name = "所在市编号")
private String shiid;
/**
* 客户来源
*/
- @Excel(name = "客户来源")
+ @Excel(name = "客户来源", type = Excel.Type.EXPORT, readConverterExp = "01=线下教研,02=抖音,03=快手,04=微信群,05=网络,06=来电来访,07=其它")
private String khly;
/**
* 创建人
*/
- @Excel(name = "创建人")
+ //@Excel(name = "创建人", type = Excel.Type.EXPORT, targetAttr = "user_name")
private Long createUserid;
/**
* 备注
*/
- @Excel(name = "备注")
+ @Excel(name = "备注", type = Excel.Type.EXPORT)
private String bz;
/**
* 转换跟进
*/
- @Excel(name = "转换跟进")
+ @Excel(name = "转换跟进", type = Excel.Type.EXPORT)
private String zhgj;
/**
* 状态
*/
- @Excel(name = "状态")
+ //@Excel(name = "状态", type = Excel.Type.EXPORT)
private String state;
/**
* 消费项目
*/
- @Excel(name = "消费项目")
+ @Excel(name = "消费项目", type = Excel.Type.EXPORT)
private String xfxm;
/**
* 创建时间gbtime
*/
- @Excel(name = "开通截至日期", width = 30, dateFormat = "yyyy-MM-dd")
+ @Excel(name = "开通截至日期", width = 30, dateFormat = "yyyy-MM-dd", type = Excel.Type.EXPORT)
@JsonFormat(pattern = "yyyy-MM-dd")
private Date createTime;
/**
* 过保时间
*/
- @Excel(name = "开通截至日期", width = 30, dateFormat = "yyyy-MM-dd")
+ @Excel(name = "开通截至日期", width = 30, dateFormat = "yyyy-MM-dd", type = Excel.Type.EXPORT)
@JsonFormat(pattern = "yyyy-MM-dd")
private Date gbtime;
/**
* 消费价值
*/
- @Excel(name = "消费价值")
+ @Excel(name = "消费价值", type = Excel.Type.EXPORT)
private Long xfjz;
public void setId(Long id) {
diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByCustomerMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByCustomerMapper.xml
index 370b05551..58a744c9d 100644
--- a/ruoyi/src/main/resources/mybatis/benyi/ByCustomerMapper.xml
+++ b/ruoyi/src/main/resources/mybatis/benyi/ByCustomerMapper.xml
@@ -44,7 +44,7 @@
and qt = #{qt}
and schoolname like concat('%', #{schoolname}, '%')
and rs = #{rs}
- and sheng = #{sheng}
+ and sheng like concat('%', #{sheng}, '%')
and shengid = #{shengid}
and shi = #{shi}
and shiid = #{shiid}