| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992 |
- const app = getApp();
- const api = require('../../../utils/api.js');
- const Constants = require('../../../utils/Constants.js');
- const util = require('../../../utils/util.js')
- const common = require('../../../utils/common.js')
- import Dialog from '../../../dist/dialog/dialog.js';
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- statusItem_org: {
- text: '业务部门',
- value: -1
- },
- staffIds: [],
- selectflag: false,
- checked_1: false,
- checked_2: false,
- checked_3: false,
- checked_4: false,
- checked_5: false,
- checked_6: false,
- checked_7: false,
- checked_8: false,
- checked_9: false,
- checked_10: false,
- checked_11: false,
- checked_12: false,
- show: false,
- showTime: false,
- activeboxNames: [],
- customerName: '',
- noMore: false,
- loading: false,
- pageInfo: {
- pageSize: 6,
- currentPage: 1
- },
- list: [],
- totallength: 0, //视图下方提醒数量
- active: 0,
- createTimeType: {
- text: '近30天',
- value: 5
- },
- followUpPerson: {
- text: '张三',
- value: -1
- },
- followUpOrg: {
- text: '佛山居然店',
- value: -1
- },
- columns: [],
- currentDate: new Date().getTime() + 100,
- formatter(type, value) {
- if (type === 'year') {
- return `${value}年`;
- }
- if (type === 'month') {
- return `${value}月`;
- }
- if (type === 'day') {
- return `${value}日`;
- }
- if (type === 'hour') {
- return `${value}时`;
- }
- if (type === 'minute') {
- return `${value}分`;
- }
- return value;
- },
- form: {
- LeaveTime: '请选择',
- LeaveTime_: '请选择',
- OtherName: '其他',
- remindTime: '',
- followCount: '',
- followCount_: '',
- nextFollowTimeList: [],
- nextFollowTime: '',
- nextFollowTime_: '',
- },
- list: [],
- searchText: '',
- searchFormNumber: 0,
- //筛选字段
- searchForm: {
- overDueStatus:0,
- followStatusList: [],
- nextFollowTimeList: [],
- },
- nextFollowTime: '',
- },
- toAdd() {
- wx.navigateTo({
- url: './add/add?type=add',
- })
- },
- onChangePickDate() {
- this.setData({
- showTime: true
- })
- },
- /**
- * @desc : 跳转客户收款新建
- * @date : 2022/7/9 15:01
- * @author : 常皓宁
- */
- toCollectionAdd(e) {
- let customerItem = e.currentTarget.dataset.item
- if (!customerItem.customerId) {
- wx.showToast({
- title: '无此联系人,或陌生接待',
- icon: 'none'
- })
- return
- }
- this.setData({
- showShare: false
- })
- wx.navigateTo({
- url: '/package4/pages/order-billing/customer-collection/add/add?customerItem=' + encodeURIComponent(JSON.stringify(customerItem)),
- })
- },
- /**
- * 跳转
- */
- toDetail(e) {
- let item = e.currentTarget.dataset.item
- if(this.data.active ==1 ){
- wx.navigateTo({
- url: '/package-basic-data/pages/customer-follow-up/detail/detail?item=' + encodeURIComponent(JSON.stringify(item)),
- })
- return
- }
- wx.navigateTo({
- url: './detail/detail?item=' + encodeURIComponent(JSON.stringify(item)),
- })
- },
- onCloseChooseDate() {
- this.setData({
- showTime: false
- })
- },
- /**
- * 留店时长
- */
- showPopup() {
- this.setData({
- LeaveTimeFlag: true
- });
- },
- /**
- * @desc : 打电话
- * @date : 2022/5/18 15:49
- * @author : 于继渤
- */
- openTelPhone(e) {
- let tel = e.currentTarget.dataset.item.customerPhone
- if (tel) {
- wx.makePhoneCall({
- phoneNumber: tel,
- })
- } else {
- wx.showModal({
- title: '手机号不正确',
- message: ''
- })
- }
- },
- //抽屉打开
- openSearchPop() {
- this.setData({
- show: true,
- })
- let that = this
- setTimeout(function () {
- that.setData({
- activeboxNames: ['1', '2'],
- })
- }, 100)
- },
- closeSearchPop() {
- this.selectComponent("#pick").toggle(false) //取消选中样式
- this.setData({
- show: false
- })
- },
- onChangefollowCount(e) {
- let form = this.data.form
- form.followCount_ = e.detail
- this.setData({
- form: form
- })
- },
- onChangebox(e) {
-
- this.setData({
- activeboxNames: e.detail
- })
- },
- //抽屉确定
- doSearchData(e) {
- this.selectComponent("#pick").toggle(false) //取消选中样式
- let form = this.data.form
- let searchFormNumber = 0
- form.followCount = this.data.form.followCount_
- form.nextFollowTime = this.data.nextFollowTime
- form.LeaveTime = this.data.form.LeaveTime_
- let specsList_ = this.data.specsList_
- let specsList_flag = false
- specsList_.forEach(element => {
- if (element.checked) {
- specsList_flag = true
- }
- });
- let receptionStatusList_ = this.data.receptionStatusList_
- let receptionStatusList_flag = false
- receptionStatusList_.forEach(element => {
- if (element.checked) {
- receptionStatusList_flag = true
- }
- });
- if (this.data.form.LeaveTime_ != '请选择') {
- searchFormNumber++
- }
- if (this.data.form.followCount_ != '') {
- searchFormNumber++
- }
- if (this.data.form.nextFollowTime_ != '') {
- searchFormNumber++
- }
- if (specsList_flag) {
- searchFormNumber++
- }
- if (receptionStatusList_flag) {
- searchFormNumber++
- }
- this.setData({
- show: false,
- specsList: this.data.specsList_,
- receptionStatusList: this.data.receptionStatusList_,
- form,
- searchFormNumber
- })
- this.doSearch()
- },
- onTimeClose() {
- this.setData({
- LeaveTimeFlag: false,
- })
- },
- /**
- * @desc : 抽屉重置
- * @author : 于继渤
- * @date : 2022/6/7 19:16
- */
- clearSearchForm() {
- let searchForm = this.data.searchForm
- searchForm = {
- followStatusList: [],
- nextFollowTimeList: [],
- }
- let form = this.data.form
- form.LeaveTime_ = '请选择',
- form.followCount_ = '',
- form.nextFollowTime_ = '',
- this.setData({
- specsList_: this.data.specsList_center,
- receptionStatusList_: this.data.receptionStatusList_center,
- form,
- searchFormNumber: 0
- })
- this.selectComponent("#followStatus").clearForm()
- this.setData({
- searchForm: searchForm,
- nextFollowTime: '',
- })
- },
- /**
- * @desc : 跟进时间确认事件
- * @author : 于继渤
- * @date : 2022/5/26 17:16
- */
- onConfirmChooseDate(e) {
- let key = e.currentTarget.dataset.key
- //跟进时间
- if (key === 'nextFollowTime') {
- let form = this.data.form
- form.nextFollowTimeList = [util.formatDayTime(new Date(this.data.nextFollowTimeDefaultSearch)) + ' 00:00:00', util.formatDayTime(new Date(this.data.nextFollowTimeDefaultSearch)) + ' 23:59:59'],
- form.nextFollowTime_ = util.formatDayTime(new Date(this.data.nextFollowTimeDefaultSearch)),
- this.setData({
- form: form,
- nextFollowTimeFlag: false,
- })
- } else if (key === 'leaveTime') {
- let form = this.data.form
- let columns = this.data.columns
- form.LeaveTime_ = this.data.form.LeaveTime_ == "请选择" ? columns[0] : this.data.form.LeaveTime_
- this.setData({
- form: form,
- LeaveTimeFlag: false
- })
- }
- },
- /**
- * 留店时长
- * @param {*} e
- */
- onChange(e) {
- let form = this.data.form
- form.LeaveTime_ = e.detail.value
- this.setData({
- form: form,
- })
- },
- onCloseChooseDate() {
- this.setData({
- showTime: false
- })
- },
- /**
- * @desc :跟进时间变化事件
- * @author : 于继渤
- * @date :2022/6/8 9:16
- */
- changeDate(e) {
- let key = e.currentTarget.dataset.key
- //跟进时间
- if (key === 'nextFollowTime') {
- this.setData({
- nextFollowTimeDefaultSearch: e.detail
- })
- }
- },
- /**
- * @desc : 筛选选择跟进提醒时间
- * @author : 于继渤
- * @date : 2022/6/8 9:16
- */
- onClickTime(e) {
- let key = e.currentTarget.dataset.key
- if (key === 'nextFollowTime') {
- this.setData({
- nextFollowTimeDefaultSearch: new Date().getTime() + 100,
- nextFollowTimeFlag: true
- })
- }
- },
- //抽屉离焦关闭
- onClose() {
- this.setData({
- showShare: false,
- LeaveTimeFlag: false,
- show: false
- })
- this.selectComponent("#pick").toggle(false) //取消选中样式
- },
- /**
- * @desc : 调取企业微信会话
- * @date : 2022/5/18 15:49
- * @author : 于继渤
- */
- openWeChat(e) {
- if (!app.globalData.SystemInfo.environment) {
- wx.showToast({
- title: '请在企业微信模式下运行',
- icon: 'none'
- })
- return
- }
- let item = e.currentTarget.dataset.item
- wx.qy.openEnterpriseChat({
- // 注意:userIds和externalUserIds至少选填一个,且userIds+externalUserIds总数不能超过2000,如果externalUserIds有微信联系人,则总数不能超过40人。
- userIds: '', //参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
- // 参与会话的外部联系人列表,格式为userId1;userId2;…,用分号隔开。
- externalUserIds: item.qvExternalUserid,
- groupName: '', // 必填,会话名称。单聊时该参数传入空字符串""即可。
- chatId: "", //新建会话时,chatId必须为空串
- success: function (res) {
- // 回调
- var chatId = res.chatId; //返回chatId仅在企业微信3.0.36及以后版本支持;
- },
- fail: function (res) {
- // 失败处理
- wx.showToast({
- title: res.data.message,
- icon: 'none'
- })
- }
- });
- },
- /**
- * tabs切换
- * @param {*} e
- */
- onChangeTabs(e) {
- this.setData({
- list: []
- })
- let title = e.detail.title
- if (title === '所有接待') {
- this.setData({
- active: 0
- })
- }
- if (title === '跟进任务') {
- this.setData({
- active: 1
- })
- }
- if (title === '邀约进店') {
- this.setData({
- active: 2
- })
- }
- if (title === '预约量尺') {
- this.setData({
- active: 3
- })
- }
- // this.getData()
- this.doSearch()
- },
- /**
- * @desc : 日期组件后的回调
- * @author : 于继渤
- * @date : 2022/5/24 12:16
- */
- dateCommit(e) {
- let dateType = e.detail.dateType
- if (dateType === 'createtime') {
- let data = e.detail.date
- this.setData({
- createTimeSearch: data,
- createTimeType: e.detail.dateDefault
- })
- this.selectComponent('#create-time-type').toggle();
- }
- this.doSearch()
- },
- /**
- * @desc : 下拉多选关闭
- * @author : 于继渤
- * @date : 2022/5/26 12:16
- */
- muticloseAll(e) {
- let id = e.currentTarget.id
- if (id === 'staff') {
- this.setData({
- staffFlag: false
- })
- this.selectComponent("#statusItemStaff").toggle()
- }
- if (id === 'org') {
- this.setData({
- orgFlag: false
- })
- this.selectComponent("#statusItemOrg").toggle()
- }
- },
- onSearchText(e) {
-
- this.setData({
- searchText: e.detail,
- searchTextFlag: e.detail ? true : false//TOP搜索输入标识
- })
- },
- /**
- * @desc : 获取数据
- * @author : 于继渤
- * @date : 2022/5/23 15:16
- */
- getData(e) {
-
- let list = [{
- "addressArea": {
- "province": "辽宁省",
- "city": "沈阳市",
- "district": "铁西区"
- },
- "addressFull": "辽宁省沈阳市铁西区小四川水煮鱼(鑫丰中心里店)12313123122",
- "addressGcj02": {
- "latitude": 41.810535,
- "longitude": 123.38065
- },
- "addressName": "小四川水煮鱼(鑫丰中心里店)",
- "addressNo": "12313123122",
- "annexCount": 0,
- "annexPaths": [],
- "competitiveBrands": "",
- "cpId": 20760,
- "createTime": "2024-01-23",
- "customerCode": "12313123122-100310",
- "customerId": 3924,
- "customerName": "12313123122",
- "customerPhone": "13112122111",
- "designName": null,
- "designUser": null,
- "flgAgainMeasure": null,
- "flgValid": true,
- "followCount": 1,
- "followData": "11",
- "followId": 1928,
- "followQvRecord": null,
- "followStatus": "跟进状态-报备",
- "followStatusName": "留资接待",
- "followTime": "2024-01-23 16:07",
- "followTimeLen": null,
- "followType": "跟进方式-进店",
- "followTypeName": "进店",
- "followUser": 643,
- "followUserName": "王英杰",
- "hourTime": null,
- "intention": "客户意向-有意向",
- "intentionInfo": [],
- "intentionName": "有意向",
- "intentionTags": [],
- "intentionTagsName": null,
- "inviteResult": null,
- "inviteTime": null,
- "loseReasonName": null,
- "measureAnnex": null,
- "measureRemarks": null,
- "measureStatus": null,
- "measureTime": null,
- "nextFollowPlan": "",
- "nextFollowTime": null,
- "orgName": "北海富安居店",
- "qvChatId": null,
- "qvExternalUserid": null,
- "remarks": null,
- "saleStatus": "客成状态-成交",
- "saleStatusName": "成交",
- "stayTimeLen": "留店时长-0-10分钟",
- "tagName": [],
- "weekTime": null
- }];
- this.setData({
- list
- })
-
- },
- /**
- * @desc : 查询
- * @author : 于继渤
- * @date : 2022/5/24 08:49
- */
- doSearch() {
- let pageInfo = this.data.pageInfo;
- pageInfo.pageSize = 6;
- pageInfo.currentPage = 1;
- this.setData({
- show: false,
- noMore: false,
- pageInfo: pageInfo,
- list: []
- })
- this.getData()
- },
- /**
- * @desc : 页面上拉触底事件的处理函数
- * @author : 于继渤
- * @date : 2022/5/24 08:49
- */
- onReachBottom: function () {
- if (this.data.loading || this.data.noMore) {
- return;
- }
- this.setData({
- pageInfo: {
- pageSize: this.data.pageInfo.pageSize,
- currentPage: this.data.pageInfo.currentPage + 1
- }
- })
- this.getData('more')
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- //按钮权限
- // let Receive_Customer_Add = common.hasButtonRight(Constants.Receive_Customer_Add) //新建
- // let Receive_Customer_Follow = common.hasButtonRight(Constants.Receive_Customer_Follow) //跟进
- // let Receive_Customer_Task = common.hasButtonRight(Constants.Receive_Customer_Task) //跟进任务
- // let Receive_Customer_Order = common.hasButtonRight(Constants.Receive_Customer_Order) //销售订单
- // let Receive_Customer_Receive = common.hasButtonRight(Constants.Receive_Customer_Receive) //客户收款
- // let Receive_Customer_Measure = common.hasButtonRight(Constants.Receive_Customer_Measure) //量尺回执
- this.setData({
- Receive_Customer_Add: true,
- Receive_Customer_Follow: true,
- Receive_Customer_Task: true,
- Receive_Customer_Order: true,
- Receive_Customer_Receive: true,
- Receive_Customer_Measure: true,
- })
-
- this.doSearch()
-
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
- if (this.data.selectflag) {
- this.doSearch()
- this.followTime_init_base()
- }
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- let that = this
- //调用刷新时将执行的方法
- that.setData({
- loadingShow: true,
- })
- this.doSearch()
- this.followTime_init_base()
- //隐藏导航条加载动画
- wx.hideNavigationBarLoading();
- setTimeout(function () {
- that.setData({
- loadingShow: false,
- })
- //停止下拉刷新
- wx.stopPullDownRefresh();
- }, 800)
- },
- /**
- * 获取接待时常数据
- */
- followTime_init_base() {
- return
- let param = {
- dataSourceCode: 'followTime'
- }
- api.request(Constants.BASIC_COMMON_API + 'get_wx_init_data', 'POST', param).then(res => {
- if (res.data.code === 200) {
- let followTime = []
- let columns = []
- followTime = res.data.data
- followTime.forEach(element => {
- columns.push(element.name)
- });
- this.setData({
- columns
- })
- }
- })
- },
- /**
- * @desc : 下拉多选确定
- * @author : 于继渤
- * @date : 2022/5/26 12:16
- */
- mutiSearchAll(e) {
- let id = e.currentTarget.id
- if (id === 'staff') {
- this.setData({
- staffIds: e.detail.idList,
- staffNames: e.detail.names,
- staffFlag: false
- })
- this.selectComponent("#statusItemStaff").toggle(false)
- this.doSearch()
- }
- if (id === 'org') {
- this.setData({
- orgIds: e.detail.idList,
- orgNames: e.detail.names,
- orgFlag: false
- })
- this.selectComponent("#statusItemOrg").toggle(false)
- this.doSearch()
- }
- },
- /**
- * @desc : 下拉多选事件
- * @author : 于继渤
- * @date : 2022/5/26 12:16
- */
- openDropdown(e) {
- this.setData({
- staffFlag: true
- })
- },
- /**
- * @desc : 下拉多选事件
- * @author : 于继渤
- * @date : 2022/5/26 12:16
- */
- dropdowncommit(e) {
- this.setData({
- orgFlag: true
- })
- },
- /**
- * 获取意向品类数据源
- */
- getGoodsSpecs() {
- let param = {
- dataSourceCode: "商品规格分类"
- }
- param.cpId = app.globalData.user.cpId
- api.request(Constants.BASIC_COMMON_API + 'get_wx_init_data', 'POST', param).then(res => {
- if (res.data.code === 200) {
- let specsList = []
- specsList = res.data.data
- specsList.forEach(element => {
- element.checked = false
- });
- this.setData({
- specsList,
- specsList_: specsList,
- specsList_center: specsList
- })
- }
- })
- },
- /**
- * 获取接待状态数据源
- */
- getReceptionStatus() {
- let param = {
- dataSourceCode: "接待状态"
- }
- param.cpId = app.globalData.user.cpId
- api.request(Constants.BASIC_COMMON_API + 'get_wx_init_data', 'POST', param).then(res => {
- if (res.data.code === 200) {
- let receptionStatusList = []
- receptionStatusList = res.data.data
- receptionStatusList.forEach(element => {
- element.checked = false
- element.id = element.code
- });
- this.setData({
- receptionStatusList,
- receptionStatusList_: receptionStatusList,
- receptionStatusList_center: receptionStatusList
- })
- }
- })
- },
- /**
- *手风琴 复选框 数据源监听事件 ---接待状态
- */
- onReceptionStatusDataChange(e) {
- this.setData({
- receptionStatusList_: e.detail.dataList
- })
- },
- /**
- *手风琴 复选框 数据源监听事件 ---意向品类
- */
- onSpecsDataChange(e) {
- this.setData({
- specsList_: e.detail.dataList
- })
- },
- //3点
- onclik(e) {
- this.setData({
- showShare: true,
- bottomItem: e.currentTarget.dataset.item,
- customerName: e.currentTarget.dataset.item.customerName,
- onclikItem: e.currentTarget.dataset.item
- })
- },
- follow() {
- wx.navigateTo({
- url: '/package-basic-data/pages/customer-follow-up/customer-follow-up' ,
- })
- },
- followtask() {
- this.setData({
- showShare: false
- })
- wx.navigateTo({
- // url: '/package-basic-data/pages/follow-up-tasks/follow-up-tasks',
- url: '/package-basic-data/pages/customer-follow-up/follow-up-tasks/follow-up-tasks' ,
-
-
- })
- },
- //量尺回执
- measure() {
- this.setData({
- showShare: false
- })
- wx.navigateTo({
- url: '/package3/pages/customer-follow-up/measure-to/measure-to?item=' + encodeURIComponent(JSON.stringify(this.data.onclikItem)),
- })
- },
- /**
- * @desc : 跳转预算报价新建
- * @date : 2022/7/7 14:12
- * @author : 于继渤
- */
- toOrderAdd(e) {
- let customerItem = e.currentTarget.dataset.item
- if (!customerItem.customerId) {
- wx.showToast({
- title: '无此联系人,或陌生接待',
- icon: 'none'
- })
- return
- }
- this.setData({
- showShare: false
- })
- wx.navigateTo({
- url: '/package4/pages/order-billing/choose-goods/choose-goods?orderType=1&customerItem=' + encodeURIComponent(JSON.stringify(customerItem)),
- })
- },
- /**
- * @desc : 筛选数据源组件点击事件
- * @author : 于继渤
- * @date : 2022/5/31 08:59
- */
- onClickTag(e) {
- let key = e.detail.key
- let dataList = e.detail.dataList
- let searchForm = this.data.searchForm
- if (key === 'followStatus') {
-
- let tempList = []
- //客意品类-智能,客意品类-定制
- dataList.forEach(res => {
- if (res == 0) {
- tempList.push('跟进状态-报备')
- }
- if (res == 1) {
- tempList.push('跟进状态-接待')
- }
- })
- searchForm.followStatusList = tempList
- }
- if (key === 'overDueStatus') {
- let tempList = []
- let overDueStatus = 0
- dataList.forEach(res => {
- if (res == 0) {
- tempList.push('逾期状态-未逾期')
- overDueStatus = 0
- }
- if (res == 1) {
- tempList.push('逾期状态-逾期')
- overDueStatus = 1
- }
- if (res == 2) {
- tempList.push('逾期状态-完结')
- overDueStatus = 2
- }
- if (res == 3) {
- tempList.push('逾期状态-全部')
- overDueStatus = 3
- }
- })
- // searchForm.overdueStatusList = tempList
- searchForm.overDueStatus = overDueStatus
- }
- this.setData({
- searchForm: searchForm
- })
- },
- /**
- * @desc : 筛选选择跟进提醒时间确认事件
- * @author : 于继渤
- * @date : 2022/7/5 18:16
- */
- nextFollowTimeDateCommit(e) {
- let searchForm = this.data.searchForm
- let nextFollowTime = this.data.nextFollowTime
- searchForm.nextFollowTimeList = e.detail.date
- nextFollowTime = e.detail.date[0] + '-' + e.detail.date[1]
- this.setData({
- searchForm: searchForm,
- nextFollowTime: nextFollowTime
- })
- //调查询
- },
- toOk() {
- this.setData({
- showShare: false
- })
- let _this = this
- Dialog.confirm({
- message: '确认完成跟进任务吗?',
- }).then(() => {
- let bottomItem = this.data.bottomItem
- _this.isFlgvaild(bottomItem.planId)
- instance.close();
- }).catch(() => {
- // _this.setData({
- // showShare: true
- // })
- });
- },
- isFlgvaild(planId) {
- this.setData({
- loading: true
- })
- api.request(Constants.SALE_CUSTOMERFOLLOW_PLAN_API + 'update_by_follow_plan_id' , 'POST', {
- planId:planId
- }).then(res => {
- this.setData({
- loading: false
- })
- if (res.data.code === 200) {
- wx.showToast({
- title: '操作成功',
- image: '/static/image/success.png',
- duration: 1000
- })
- this.doSearch()
- }
- })
- },
- })
|