| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- /*******************************************************************************
- * Copyright(c) 2022 dongke All rights reserved. / Confidential
- * 类的信息:
- * 1.程序名称:
- * 编辑履历:
- * 作者 日期 版本 修改内容
- * 于继渤 2024-1-23 1.00 客户档案新增
- *******************************************************************************/
- const Constants = require('@/utils/Constants.js');
- const util = require('@/utils/util.js')
- const mixins = require('@/mixins/index.js')
- const app = getApp()
- Page({
- mixins: [mixins],
- /**
- * 页面的初始数据
- */
- data: {
- tagList: [{ title: "潜在客户", code: '销售状态-潜客' }, { title: "公海客户", code: '销售状态-公海' }, { title: "成交客户", code: '销售状态-成交' }, { title: "全部客户", code: 'all' }],
- // 查询条件
- searchContent: [
- { code: 'createtime', title: '近30天', defaultValue: 5, searchType: Constants.searchType.date },
- { code: 'staff', title: '员工', dropType: 'staff' },
- { code: 'org', title: '部门', dropType: 'org' },
- { code: 'choose', title: '筛选', searchType: Constants.searchType.pick }
- ],
- buttonSaveList:[{code:'add',title:'新建',width:'120rpx',color:'#1B365D'}],
- contentSaveList:[{code:'need',title:'共 位客户',type:'str',color:'#1B365D'}],
- // 查询条件-筛选
- pullMenuList: [{
- code: 'customerFrom',
- pullType: 'mSelect',
- typeName: 'customerFrom'
- }, {
- code: 'fitupType',
- pullType: 'mSelect',
- typeName: 'fitupType'
- }, {
- code: 'houseType',
- pullType: 'mSelect',
- typeName: 'houseType'
- }, {
- code: 'ageComposition',
- pullType: 'mSelect',
- typeName: 'ageComposition'
- }],
- // 列表区(脚部信息)
- footerInfo: [{
- prefix: '跟进',
- name: 'followCount',
- title: '次',
- different: '从未跟进 | 逾期未跟进',
- color: 'red'
- },],
- // 列表区(内容)
- contentList: [
- { name: 'cusPhone', title: '客户电话', phone: true },
- { name: 'addressFull', title: '客户地址' },
- {
- name: [{ name: 'orgName', title: '' },
- { name: 'staffName', title: '业务员' }], title: '门店信息'
- },
- { name: 'nextFollowTime', title: '提醒时间' }
- ],
- contentObj: {
- '成交': [
- { name: 'orderNo', title: '订单单号' },
- {
- name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: '业务员' }
- ],
- title: '客户地址'
- }],
- '未成交': [{
- name: 'orderNo',
- title: '订单单号'
- }, {
- name: 'customerPhone',
- title: '客户电话'
- }, {
- name: [{
- name: 'orgName',
- title: ''
- }, {
- name: 'staffName',
- title: '业务员'
- }],
- title: '客户地址'
- }]
- },
- // 弹出按钮
- buttonList: [
- { name: 'followUp', title: '客户跟进' },
- { name: 'followUpTasks', title: '跟进任务' },
- { name: 'customerRefundList', title: '客户收款' }
- ],
- totallength: 0, //视图下方提醒数量
- // 路由
- routeObjName: 'customer',
- active: 0,
- saleStatus: '销售状态-潜客',
- },
- /**
- * @desc : 切换
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
- onChangeTabs(e) {
- let code = e.detail.detail.code
- this.setData({
- saleStatus: code,
- })
- this.searchData()
- },
- /**
- * @desc : 详细页面
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
- toDetail(e) {
- let cusId = e.detail.item.cusId
- this.setData({
- selectflag: true
- })
- wx.navigateTo({
- url: this.data.route.detail.url,
- success: function (res) {
- // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
- res.eventChannel.emit('params', { id: cusId, formMode: Constants.formMode.edit })
- }
- })
- },
- /**
- * @desc : 设置查询参数
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
- setSearchParams(params) {
- //销售状态
- params.saleStatus = this.data.saleStatus == 'all' ? '' : this.data.saleStatus
- return params
- },
- /**
- * @desc : 查询
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
- getData(params) {
- return this.excute(this.data.service, this.data.service.selectByCond, params);
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
- if (this.data.refreshDataFlag) {
- this.searchData()
- }
- },
- })
|