| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- /*******************************************************************************
- * Copyright(c) 2022 dongke All rights reserved. / Confidential
- * 类的信息:
- * 1.程序名称:
- * 2.新增接待
- * 编辑履历:
- * 作者 日期 版本 修改内容
- * yjb 2022-0-12 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:mixins.$t('allReceptions'), code: 'all' }, { title: mixins.$t('followUpTasks'), code: mixins.$t('followStatusFollowUp') }, { title: mixins.$t('followStatusInvitationName'), code:mixins.$t('followStatusInvitation') }, { title: mixins.$t('followStatusFootName'), code: mixins.$t('followStatusFoot') }],
- buttonSaveList: [{ code: 'add', title: mixins.$t('add'), width: '120rpx', color: '#1B365D' }],
- contentSaveList: [{ code: 'need', title: mixins.$t('together'), type: 'count', color: '#1B365D', tail: mixins.$t('receptionInformation'), bill: 1, fontSize: '15px' }],
- // 查询条件
- searchContent: [
- { code: 'createtime', title: mixins.$t('pastThirthtyDays'), defaultValue: 5, searchType: Constants.searchType.date },
- { code: 'staff', title: mixins.$t('staffId'), dropType: 'staff' },
- { code: 'choose', title: mixins.$t('choose'), searchType: Constants.searchType.pick }
- ],
- // 查询条件-筛选
- pullMenuList: [
- { code: 'followStatus', pullType: 'mSelect', typeName: 'followStatus' },
- { code: 'followCount', dataType: 'number' },
- { code: 'nextFollowTime', dataType: 'date' }
- ],
- // 列表区(内容)
- contentList: [
- { name: 'cusPhone', title: mixins.$t('cusPhone'), phone: true },
- { name: 'addressFull', title: mixins.$t('addressFull')},
- { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: '' }], title: mixins.$t('storeInformation') },
- { name: 'followTime', title: mixins.$t('followTime') }
- ],
- contentObj: {
- '跟进状态-跟进': [{ name: 'cusPhone', title: mixins.$t('cusPhone'), phone: true },
- { name: 'addressFull', title: mixins.$t('addressFull') },
- { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t('staffId') }], title: mixins.$t('storeInformation') },
- { name: 'followTime', title: mixins.$t('followTime') }],
- '跟进状态-报备': [{ name: 'cusPhone', title: mixins.$t('cusPhone'), phone: true },
- { name: 'addressFull', title: mixins.$t('addressFull') },
- { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t('staffId') }], title: mixins.$t('storeInformation') },
- { name: 'followTime', title: mixins.$t('followTime') }],
- '跟进状态-邀约': [{ name: 'cusPhone', title: mixins.$t('cusPhone'), phone: true },
- { name: 'addressFull', title: mixins.$t('addressFull') },
- { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t('staffId') }], title: mixins.$t('storeInformation') },
- { name: 'followTime', title: mixins.$t('followTime') }],
- '跟进状态-约尺': [{ name: 'cusPhone', title: mixins.$t('cusPhone'), phone: true },
- { name: 'addressFull', title: mixins.$t('addressFull') },
- { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t('staffId') }], title: mixins.$t('storeInformation') },
- { name: 'followTime', title: mixins.$t('followTime') }],
- '跟进状态-接待': [
- { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t('staffId') }], title: mixins.$t('storeInformation') },
- { name: 'followTime', title: mixins.$t('followTime') }],
- '跟进状态-成交': [{ name: 'cusPhone', title: mixins.$t('cusPhone'), phone: true },
- { name: 'addressFull', title: mixins.$t('addressFull') },
- { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t('staffId') }], title: mixins.$t('storeInformation') },
- { name: 'followTime', title: mixins.$t('followTime') }],
- '跟进状态-报价': [{ name: 'cusPhone', title: mixins.$t('cusPhone'), phone: true },
- { name: 'addressFull', title: mixins.$t('addressFull') },
- { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t('staffId') }], title: mixins.$t('storeInformation') },
- { name: 'followTime', title: mixins.$t('followTime') }],
- },
- // 列表区(脚部信息)
- footerInfo: [{
- prefix: mixins.$t('followedUp'),
- name: 'followCount',
- title: mixins.$t('next')
- },],
- // 弹出按钮
- buttonList: [
- { name: 'followUp', title: mixins.$t('follow') },
- { name: 'followUpTasks', title: mixins.$t('followUpTasks') },
- { name: 'customerRefundList', title: mixins.$t('saleOrder' )},
- { name: 'customerRefundList', title: mixins.$t('cusCollection') },
- ],
- totallength: 0, //视图下方提醒数量
- // 路由
- routeObjName: 'cusFollow',
- followStatus: 'all',
- active: 0
- },
- /**
- * @desc : 点击三个点事件
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
- toPoint(e) {
- let item = e.detail.item
- let buttonList = this.data.buttonList
- if (item.followStatus == mixins.$t('followStatusFoot') && item.measureStatus == mixins.$t('scaleStatusMeasured') ) {
- buttonList = [
- { name: 'followUp', title: mixins.$t('follow') },
- { name: 'followUpTasks', title: mixins.$t('followUpTasks') },
- { name: 'customerRefundList', title: mixins.$t('saleOrder' )},
- { name: 'customerRefundList', title: mixins.$t('cusCollection') },
- { name: 'measureTo', title: mixins.$t('measuringScaleReceipt') }
- ]
- } else {
- buttonList = [
- { name: 'followUp', title: mixins.$t('follow') },
- { name: 'followUpTasks', title: mixins.$t('followUpTasks') },
- { name: 'customerRefundList', title: mixins.$t('saleOrder' )},
- { name: 'customerRefundList', title: mixins.$t('cusCollection') },
- ]
- }
- this.setData({
- buttonList: buttonList
- })
- },
- /**
- * @desc : 切换
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
- onChangeTabs(e) {
- let code = e.detail.detail.code
- this.setData({
- followStatus: code,
- })
- this.searchData()
- },
- /**
- * @desc : 设置查询参数
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
- setSearchParams(params) {
- //销售状态
- params.followStatus = this.data.followStatus == 'all' ? '' : this.data.followStatus
- return params
- },
- /**
- * @desc : 处理接口返回数据
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
- handleSearchData(tableData) {
- let contentSaveList = this.data.contentSaveList
- contentSaveList[0].bill = tableData.length
- this.setData({
- contentSaveList: contentSaveList
- })
- },
- /**
- * @desc : 查询
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
- getData(params) {
- return this.excute(this.data.service, this.data.service.selectByCond, params);
- },
- })
|