| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- /*******************************************************************************
- * 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: {
- radioFollowUp: '1',
- routeObjName: 'cusFollow',
- cardList: ['main'],
- buttonSaveList:[{code:'add',title:mixins.$t('save'),width:'120rpx'}],
- contentObj: {
- main: [
- { code: 'cusName', type: 'str', required: true, title: mixins.$t('customerName') },
- { code: 'cusPhone', type: 'phone', title: mixins.$t('cusPhone') , required: true },
- { code: 'addressFull', type: 'address', title: mixins.$t('addressFull') , required: false },
- { code: 'addressNo', type: 'str', required: false, title: mixins.$t('addressNo') },
- { code: 'intention', name: 'intentionName', type: 'drop', required: true, dropType: 'customerIntention', title: mixins.$t('intention') },
- { code: 'remarks', type: 'textarea', rows: '5', required: true, showWordLimit: true, title: mixins.$t('followData') },
- { code: 'nextFollowTime', type: 'dateTime', required: true, title: mixins.$t('nextFollowTime') },
- { code: 'stayTimeLen', name: 'stayTimeLenName', required: true, title: mixins.$t('stayTimeLen') , dropType: 'storeRetentionTime', type: 'drop', }
- ]
- },
- followStatus:mixins.$t('followStatusReporting')
- },
- /**
- * @desc : 设置保存参数
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
- setParams(params) {
- params.followStatus = this.data.followStatus
- params.followOrg = app.globalData.user.orgId
- return params
- },
- /**
- * @desc : 保存数据服务
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
- saveData() {
- return this.excute(this.data.service, this.data.service.insert, this.data.params);
- },
- onRadioFollowUp(e) {
- let detail = e.detail
- this.setFormContent(detail)
- this.setData({
- radioFollowUp: detail,
- formData:null
- })
- console.log('onRadioFollowUp', e.detail)
- },
- /**
- * @desc : 设置跟进form 字段
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
- setFormContent(radioFollowUp) {
- let radioFollowUpOnelist = [
- { code: 'cusName', type: 'str', required: true, title: mixins.$t('customerName') },
- { code: 'cusPhone', type: 'phone', title: mixins.$t('cusPhone'), required: true },
- { code: 'addressFull', type: 'address', title: mixins.$t('addressFull'), required: false },
- { code: 'addressNo', type: 'str', required: false, title: mixins.$t('addressNo') },
- { code: 'intention', name: 'intentionName', type: 'drop', required: true, dropType: 'customerIntention', title: mixins.$t('intention') },
- { code: 'remarks', type: 'textarea', rows: '5', required: true, showWordLimit: true, title: mixins.$t('followData') },
- { code: 'nextFollowTime', type: 'dateTime', required: true, title: mixins.$t('nextFollowTime') },
- { code: 'stayTimeLen', name: 'stayTimeLenName', required: true, title: mixins.$t('stayTimeLen'), dropType: 'storeRetentionTime', type: 'drop', }
- ]
- let radioFollowUpTwolist = [
- { code: 'intention', name: 'intentionName', type: 'drop', required: true, dropType: 'customerIntention', title: mixins.$t('intention') },
- { code: 'remarks', type: 'textarea', rows: '5', required: true, showWordLimit: true, title: mixins.$t('followData') },
- { code: 'stayTimeLen', name: 'stayTimeLenName', required: true, title: mixins.$t('stayTimeLen'), dropType: 'storeRetentionTime', type: 'drop', }
- ]
- let contentObj = this.data.contentObj
- let followStatus = this.data.followStatus
- if (radioFollowUp == '1') {
- followStatus = mixins.$t('followStatusReporting')
- contentObj.main = radioFollowUpOnelist
- }
- if (radioFollowUp == '2') {
- followStatus = mixins.$t('followStatusReception')
- contentObj.main = radioFollowUpTwolist
- }
- this.setData({
- followStatus,followStatus,
- contentObj: contentObj
- })
- }
- })
|