Commit 8304a004 by 前端

Merge branch 'kuangyq_dev_v2.3.0' into 'v2.3.0'

Kuangyq dev v2.3.0

See merge request !139
2 parents 053a4d50 6fbe4685
......@@ -356,20 +356,6 @@ export default {
this.$refs.selectLabel.init(this.tagging)
},
handleSubmit() {
// let arr = []
// this.tagging.forEach(item => {
// item.labelList.forEach(tag => {
// arr.push({
// groupId: parseInt(item.labelGroup.id),
// groupName: item.labelGroup.name,
// labelId: parseInt(tag.id),
// labelName: tag.name,
// groupType: item.labelType
// })
// })
// })
// this.taggingList = arr
// console.log(this.taggingList)
this.$refs.basicForm.validate(valid => {
if (valid) {
this.attachmentShow = true
......@@ -388,7 +374,7 @@ export default {
this.attachmentText = '请输入群发内容'
return
}
this.$refs.groupForm.validate(v => {
this.$refs.groupForm.validate(async(v) => {
if (v) {
const params = this.getSiftMembers()
params.type = 1
......@@ -406,7 +392,7 @@ export default {
if (item.attType == 1) {
const list = emoji.flat(Infinity)
const cutImg = item.attContent.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) {
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function(str) {
let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]`
})
......@@ -421,27 +407,37 @@ export default {
if (params.sendType == 2) {
params.sendTimeStr = this.basicForm.sendTime + ' ' + this.basicForm.sendDate
}
this.addLoading = true
this.$apis.customerTransform.insert(params).then(res => {
if (res.code == '-1') {
this.$message({
type: 'error',
message: res.message
})
} else if (res.code == 0) {
this.$message({
type: 'success',
message: '操作成功!'
})
} else {
this.$message({
type: 'error',
message: res.message
})
}
this.addLoading = false
this.$router.push('/customerTransform/index')
})
const countParams = this.getSiftMembers()
const count = await this.$apis.customerTransform.customerCount(countParams)
console.log(count)
if (count) {
this.addLoading = true
this.$apis.customerTransform.insert(params).then(res => {
if (res.code == '-1') {
this.$message({
type: 'error',
message: res.message
})
} else if (res.code == 0) {
this.$message({
type: 'success',
message: '操作成功!'
})
} else {
this.$message({
type: 'error',
message: res.message
})
}
this.addLoading = false
this.$router.push('/customerTransform/index')
})
} else {
this.$message({
type: 'error',
message: '客户数不可为0!'
})
}
}
})
}
......@@ -449,15 +445,6 @@ export default {
},
handleSelect(val) {
this.isUpdate = true
// const arr = []
// if (val.length != 0) {
// val.forEach(item => {
// if (item.labelList.length != 0) {
// item.labelList.map(i => arr.push(i))
// }
// // arr.push(item.labelList)
// })
// }
this.tagging = val
let arr = []
this.tagging.forEach(item => {
......@@ -532,7 +519,8 @@ export default {
// tagId: tagFlag ? this.tagging.map(item => item.id).join(',') : '',
// tagName: tagFlag ? this.tagging.map(item => item.name).join(',') : ''
// tagId: JSON.stringify(this.tagging)
labelList: this.taggingList
labelList: this.taggingList,
combineType: 2
}
}
if (this.basicForm.condition.date) {
......@@ -587,7 +575,9 @@ export default {
const date = new Date(v).getTime()
if (date < Date.now()) {
this.timeOptions = {
selectableRange: `${dayjs().add(1, 'm').format('HH:mm')}:00 - 23:59:59`
selectableRange: `${dayjs()
.add(1, 'm')
.format('HH:mm')}:00 - 23:59:59`
}
} else {
this.timeOptions = {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!