|
|
@@ -20,51 +20,102 @@ Page({
|
|
|
radioFollowUp: '1',
|
|
|
routeObjName: 'cusFollow',
|
|
|
cardList: ['main'],
|
|
|
- buttonSaveList:[{code:'add',title:mixins.$t('save'),width:'120rpx'}],
|
|
|
+ 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: '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', }
|
|
|
+ { code: 'stayTimeLen', name: 'stayTimeLenName', required: true, title: mixins.$t('stayTimeLen'), dropType: 'storeRetentionTime', type: 'drop', }
|
|
|
]
|
|
|
},
|
|
|
-
|
|
|
- followStatus:mixins.$t('followStatusReporting')
|
|
|
+ table: Constants.tables.cusFollow,
|
|
|
+ customerService: app.globalData['customerService'],
|
|
|
+ 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() {
|
|
|
+ /**
|
|
|
+ * @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);
|
|
|
-},
|
|
|
-
|
|
|
-
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 手机号离开焦点事件
|
|
|
+ * @date : 2024/4/8 15:49
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
+ changePhoneblur(e) {
|
|
|
+ let phone = e.detail.detail.detail.value
|
|
|
+ if (phone) {
|
|
|
+ //查询客户信息
|
|
|
+ this.getCustomerData({ cusPhone: phone })
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
+ /**
|
|
|
+ * @desc : 查询客户信息
|
|
|
+ * @author : 于继渤
|
|
|
+ * @date : 2024/1/23 9:16
|
|
|
+ */
|
|
|
+ getCustomerData(params) {
|
|
|
+ return this.excute(this.data.customerService, this.data.customerService.selectByCondNoPage, params).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ if (res.data.data.length > 0) {
|
|
|
+ let formData = JSON.parse(this.data.formData)
|
|
|
+ let item = res.data.data[0]
|
|
|
+ formData.cusCode = item.cusCode
|
|
|
+ formData.cusId = item.cusId
|
|
|
+ formData.cusName = item.cusName
|
|
|
+ formData.cusFromName = item.cusFromName
|
|
|
+ //处理地址
|
|
|
+ formData.address = {
|
|
|
+ address: item.addressFull,
|
|
|
+ addressFull: item.addressFull,
|
|
|
+ addressArea: item.addressArea,
|
|
|
+ addressGcj02: item.addressGcj02,
|
|
|
+ addressName: item.addressName,
|
|
|
+ }
|
|
|
+ formData.addressArea = item.addressArea
|
|
|
+ formData.addressFull = item.addressFull
|
|
|
+ formData.addressGcj02 = item.addressGcj02
|
|
|
+ formData.addressName = item.addressName
|
|
|
+ formData.addressNo = item.addressNo
|
|
|
+ this.setData({
|
|
|
+ formData: JSON.stringify(formData)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 顶部切换
|
|
|
+ * @date : 2024/4/8 15:49
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
onRadioFollowUp(e) {
|
|
|
let detail = e.detail
|
|
|
this.setFormContent(detail)
|
|
|
this.setData({
|
|
|
radioFollowUp: detail,
|
|
|
- formData:null
|
|
|
+ formData: null
|
|
|
})
|
|
|
console.log('onRadioFollowUp', e.detail)
|
|
|
},
|
|
|
@@ -88,7 +139,8 @@ saveData() {
|
|
|
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', }
|
|
|
+ { code: 'stayTimeLen', name: 'stayTimeLenName', required: true, title: mixins.$t('stayTimeLen'), dropType: 'storeRetentionTime', type: 'drop', },
|
|
|
+ { code: 'file', type: 'uploader', title: mixins.$t("uploader") }
|
|
|
]
|
|
|
|
|
|
let contentObj = this.data.contentObj
|
|
|
@@ -103,7 +155,7 @@ saveData() {
|
|
|
}
|
|
|
|
|
|
this.setData({
|
|
|
- followStatus,followStatus,
|
|
|
+ followStatus, followStatus,
|
|
|
contentObj: contentObj
|
|
|
})
|
|
|
}
|