|
@@ -9,7 +9,7 @@ import './index.scss'
|
9
|
9
|
import ActivityItem from './item'
|
10
|
10
|
import dayjs from 'dayjs'
|
11
|
11
|
const iconImg = require('@assets/person/icon.png')
|
12
|
|
-import {getThumbnail } from '@utils/tools'
|
|
12
|
+import { getThumbnail } from '@utils/tools'
|
13
|
13
|
import emptyImg from '@assets/empty.png'
|
14
|
14
|
|
15
|
15
|
@connect(({ user, city }) => ({ user, city }))
|
|
@@ -217,29 +217,36 @@ export default class myCustomer extends Taro.Component {
|
217
|
217
|
}
|
218
|
218
|
addFollowRecord
|
219
|
219
|
followSaveBtn() {
|
220
|
|
- const { customerId } = this.$router.params
|
221
|
|
- const params = {
|
222
|
|
- recordType: '添加跟进',
|
223
|
|
- recordContent: this.state.followValue,
|
224
|
|
- customerSex: this.state.customerDetail.sex,
|
225
|
|
- customerId,
|
226
|
|
- }
|
227
|
|
- addFollowRecord(params).then(res => {
|
228
|
|
- this.queryFollowRecord(1)
|
|
220
|
+ if (this.state.followValue == "") {
|
229
|
221
|
Taro.showToast({
|
230
|
|
- title: '添加跟进成功',
|
|
222
|
+ title: '跟进内容不能为空',
|
231
|
223
|
icon: 'none'
|
232
|
224
|
})
|
233
|
|
- }).catch(err => {
|
234
|
|
- Taro.showToast({
|
235
|
|
- title: '添加跟进失败',
|
236
|
|
- icon: 'none'
|
|
225
|
+ } else {
|
|
226
|
+ const { customerId } = this.$router.params
|
|
227
|
+ const params = {
|
|
228
|
+ recordType: '添加跟进',
|
|
229
|
+ recordContent: this.state.followValue,
|
|
230
|
+ customerSex: this.state.customerDetail.sex,
|
|
231
|
+ customerId,
|
|
232
|
+ }
|
|
233
|
+ addFollowRecord(params).then(res => {
|
|
234
|
+ this.queryFollowRecord(1)
|
|
235
|
+ Taro.showToast({
|
|
236
|
+ title: '添加跟进成功',
|
|
237
|
+ icon: 'none'
|
|
238
|
+ })
|
|
239
|
+ }).catch(err => {
|
|
240
|
+ Taro.showToast({
|
|
241
|
+ title: '添加跟进失败',
|
|
242
|
+ icon: 'none'
|
|
243
|
+ })
|
237
|
244
|
})
|
238
|
|
- })
|
239
|
|
- this.setState({
|
240
|
|
- followVisible: false,
|
241
|
|
- followValue: '',
|
242
|
|
- })
|
|
245
|
+ this.setState({
|
|
246
|
+ followVisible: false,
|
|
247
|
+ followValue: '',
|
|
248
|
+ })
|
|
249
|
+ }
|
243
|
250
|
}
|
244
|
251
|
followCancelBtn() {
|
245
|
252
|
this.setState({
|