修改本一3.15问题(客户关系维护)

This commit is contained in:
sk1551 2021-03-17 15:28:55 +08:00
parent 94dd93fad4
commit 2c51451859
4 changed files with 43 additions and 69 deletions
ruoyi-ui/src/views/benyi/customer
ruoyi/src/main
java/com/ruoyi/project/benyi
resources/mybatis/benyi

@ -114,6 +114,14 @@
v-hasPermi="['benyi:customer:remove']"
>删除</el-button
>
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['benyi:customer:export']"
>导出</el-button
>
</div>
<el-table
@ -159,8 +167,7 @@
align="center"
prop="qt"
/>
<el-table-column label="所在省" align="center" prop="sheng" />
<el-table-column label="所在市" align="center" prop="shi" />
<el-table-column label="所在省市" align="center" prop="sheng" />
<el-table-column
label="消费项目"
align="center"
@ -294,15 +301,6 @@
@change="handleChange"
>
</el-cascader>
<!-- <v-distpicker
v-model="form.sheng"
:placeholders="placeholders"
:province="diglogForm.province"
:city="diglogForm.city"
@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-col>
<el-col :span="12">
@ -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;

@ -57,7 +57,7 @@ public class ByCustomerController extends BaseController {
public AjaxResult export(ByCustomer byCustomer) {
List<ByCustomer> list = byCustomerService.selectByCustomerList(byCustomer);
ExcelUtil<ByCustomer> util = new ExcelUtil<ByCustomer>(ByCustomer.class);
return util.exportExcel(list, "customer");
return util.exportExcel(list, "客户关系管理-客户列表");
}
/**

@ -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) {

@ -44,7 +44,7 @@
<if test="qt != null and qt != ''">and qt = #{qt}</if>
<if test="schoolname != null and schoolname != ''">and schoolname like concat('%', #{schoolname}, '%')</if>
<if test="rs != null ">and rs = #{rs}</if>
<if test="sheng != null and sheng != ''">and sheng = #{sheng}</if>
<if test="sheng != null and sheng != ''">and sheng like concat('%', #{sheng}, '%')</if>
<if test="shengid != null and shengid != ''">and shengid = #{shengid}</if>
<if test="shi != null and shi != ''">and shi = #{shi}</if>
<if test="shiid != null and shiid != ''">and shiid = #{shiid}</if>