Commit 45215e6c by 杨明

fixed

1 parent d40cf384
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-19 13:46:20
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-09 14:03:05
* @LastEditTime: 2023-07-10 10:17:54
* @FilePath: \scrm-micro-home\src\mixins\gpt.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -96,8 +96,8 @@ export default {
}
]
const textList = [
{ x: style1.x, y: style1.y, fontSize: style1.size, width: style1.width, text: style1.content, color: style1.color },
{ x: style2.x, y: style2.y, fontSize: style2.size, width: style2.width, text: style2.content, color: style2.color }
{ x: style1.x, y: style1.y, fontSize: style1.size, width: style1.width, text: style1.content, color: style1.color, font: style1.font },
{ x: style2.x, y: style2.y, fontSize: style2.size, width: style2.width, text: style2.content, color: style2.color, font: style2.font }
]
console.log(imageList, textList)
const canvasBase64 = await drawfun.begin({
......
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-07-10 10:53:53
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-10 11:10:17
* @FilePath: \scrm-micro-link\src\mixins\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
export default {
data() {
return {
process: { 0: false, 1: false, 2: false }
}
},
methods: {
setProcess(data) {
this.process = { ...this.process, ...data }
}
}
}
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-17 16:07:55
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-31 18:02:51
* @LastEditTime: 2023-07-10 10:08:29
* @FilePath: \scrm-micro-home\src\utils\drawing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -43,11 +43,11 @@ class Drawing {
return this.pixelRatio * val
}
drawText(textParams) {
let { fontSize, color, text, x, y, bold } = textParams
let { fontSize, color, text, x, y, bold, font } = textParams
fontSize = this.toRpx(fontSize)
x = this.toRpx(x)
y = this.toRpx(y)
this.ctx.font = `${bold ? 'bold ' : ''}${fontSize}px Calibri`
this.ctx.font = `${bold ? 'bold ' : ''}${fontSize}px ${font}`
this.ctx.fillStyle = color
this.ctx.textAlign = 'center'
this.ctx.fillText(text, this.canvasId.width / 2, y + fontSize)
......
......@@ -15,9 +15,13 @@
<div v-show="currentIndex == 1" class="car-table">
<GLTable :hasPage="false" v-loading="loading" ref="carRef" :tableData="carList" :tableParams="carTableParams" @refreshTable="getCarList" @select="handleSelectionCarTable">
<template slot="price" slot-scope="scope">
<el-input v-model="scope.scope.packageAmount" placeholder="请输入"></el-input>
<el-input v-model="scope.scope.packageAmount" placeholder="请输入" oninput="value=value.match(/\d+\.?\d{0,2}/, '')"></el-input>
</template>
</GLTable>
<div class="car-gift flex-space-between">
<span>零售礼包价格合计:{{ totalPrice }}</span>
<span>温馨提示:具体价格与营销人员商议结算流程。</span>
</div>
</div>
<div v-show="currentIndex == 2">
<div class="select-tab">
......@@ -81,7 +85,10 @@ export default {
data() {
return {
giftValue: '',
editForm: {},
editForm: {
giftList: 1
},
totalPrice: 0,
giftName: '',
merchantId: this.$globalState.session.merchantId,
tabList: [{ label: '用车权益' }, { label: '生活权益' }, { label: '门店服务' }],
......@@ -89,7 +96,7 @@ export default {
editFormData: [
{
label: '营销礼包',
name: 'superMarketing',
name: 'giftList',
addHtml: 'selectGiftBtn'
},
{
......@@ -98,13 +105,20 @@ export default {
type: 'input'
}
],
giftList: []
giftList: [],
editRule: {
giftList: [{ required: true, message: 'giftList', trigger: 'input' }],
activityPrice: [{ required: true, message: '请输入活动参与价格/元:', trigger: 'input' }]
}
}
},
watch: {
subscribe(val) {
this.getGiftList(val)
},
'editForm.activityPrice'(val) {
this.editForm.activityPrice = val.match(/\d+\.?\d{0,2}/, '')
},
currentIndex: {
handler() {
this.getList()
......@@ -186,6 +200,14 @@ export default {
this.$message.error('权益服务、平台优惠、门店优惠券至少选一项')
return
}
this.totalPrice = 0
for (let i = 0; i < this.selectedCarList.length; i++) {
if (!this.selectedCarList[i].packageAmount) {
this.$message.error('输入用车权益价格')
return
}
this.totalPrice = this.totalPrice + parseFloat(this.selectedCarList[i].packageAmount)
}
const params = {}
const selectedGoodsList = [...this.selectedGoodsList, ...this.selectedServiceList].map(item => {
return {
......@@ -216,9 +238,15 @@ export default {
return item.id
})
const equities = {}
selectedCarList.forEach(item => {
equities[item.packageCode] = item.packageAmount
})
this.totalPrice = 0
for (let i = 0; i < selectedCarList.length; i++) {
if (!selectedCarList[i].packageAmount) {
this.$message.error('输入用车权益价格')
return
}
this.totalPrice = this.totalPrice + parseFloat(selectedCarList[i].packageAmount)
equities[selectedCarList[i].packageCode] = selectedCarList[i].packageAmount
}
console.log(equities, selectedCarList)
let params = {
merchantId,
......@@ -285,7 +313,6 @@ export default {
} else {
this.deleteRows(this.selectedCarList, [row], 'packageCode')
}
console.log(this.selectedCarList)
this.setPackage(Object.assign(this.packageList, { selectedCarList: this.selectedCarList }))
},
getList() {
......
......@@ -80,7 +80,7 @@
</div>
<div class="task-add" @click="addTask">
<i class="el-icon-circle-plus-outline"></i>
请选择导入文档
新建营销任务
</div>
<div class="task-footer">
<el-button @click="handleCancel" size="medium">跳过营销任务</el-button>
......@@ -98,7 +98,7 @@
</div>
</div>
</GLDialog>
<GLDialog class="qr-dialog" title="话术、短信配置" mode="mid" :visible.sync="configVisible" @onOk="handleCancelConfirm" @onCancel="configVisible = false">
<GLDialog class="qr-dialog" title="话术、短信配置" mode="mid" :visible.sync="configVisible" @onOk="handleCancelConfirm" @onCancel="handleCancelConfing">
<div class="config-body">
<el-form ref="configForm" :model="configForm" label-width="200px">
<el-form-item label="AI人工智能外呼:" :size="size">
......@@ -116,6 +116,10 @@
</template>
<script>
const config = Object.freeze({
talkId: '',
messageContent: '【广汇汽车】尊敬的客户,您获得一份续保权益套餐,您可以点击https://dwz.cn/I2gmHGBQ 查看或使用您的权益明细,退订回T'
})
const taskData = { tableData: [], expand: true, assignType: 0, customerNumTotal: 0, lastFollowStaffList: [], staffList: [], excelUrl: '', isFinish: false }
import { mapActions, mapState } from 'vuex'
export default {
......@@ -132,7 +136,7 @@ export default {
},
isQrcodeVisible: false,
configVisible: false,
configForm: {},
configForm: config,
tableData: [],
roobList: [{ labe: 3, value: 4 }]
}
......@@ -275,18 +279,24 @@ export default {
this.batchNo = num - 1
this.selectIndex = row.$index
this.configForm = {
talkId: '',
messageContent: '【广汇汽车】尊敬的客户,您获得一份续保权益套餐,您可以点击https://dwz.cn/I2gmHGBQ 查看或使用您的权益明细,退订回T'
taskId: row.talkId ? row.talkId : config.talkId,
messageContent: row.messageContent ? row.messageContent : config.messageContent
}
this.$apis.marketing.getRobotList({}).then(res => {
this.roobList = res.list || []
})
},
handleCancelConfing() {
this.configVisible = false
this.configForm = {}
},
handleCancelConfirm() {
this.configVisible = false
this.taskList[this.batchNo].staffList[this.selectIndex].talkId = this.configForm.talkId
this.taskList[this.batchNo].staffList[this.selectIndex].messageContent = this.configForm.messageContent.replace(/广汇汽车/, this.$globalState.session.merchantName)
console.log(this.taskList[this.batchNo].tableData)
this.taskList[this.batchNo].tableData[this.selectIndex].talkId = this.configForm.talkId
this.taskList[this.batchNo].tableData[this.selectIndex].messageContent = this.configForm.messageContent.replace(/广汇汽车/, this.$globalState.session.merchantName)
},
handleCancel() {
this.taskList = [{ batchNo: 1, ...taskData, ...{ isFinish: false } }]
this.customerKey = []
......@@ -303,6 +313,7 @@ export default {
key: item.key
}
})
console.log(customerRequestList)
if (this.vaildTask())
this.setProcess({
0: {
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-09 12:39:02
* @LastEditTime: 2023-07-10 10:16:44
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -25,6 +25,7 @@
:y="item.y"
:style="{
'font-size': item.size + 'px',
'font-family': item.font,
color: item.color
}"
class="img_cl"
......@@ -225,7 +226,8 @@ export default {
remark: '文字',
size: 20,
color: '',
customId: '1'
customId: '1',
font: ''
},
{
type: 'text',
......@@ -237,7 +239,8 @@ export default {
remark: '文字',
size: 20,
color: '',
customId: '2'
customId: '2',
font: ''
}
],
isModel: true,
......@@ -343,8 +346,8 @@ export default {
try {
const style1 = JSON.parse(this.detail.titleStyle)
const style2 = JSON.parse(this.detail.subTitleStyle)
Object.assign(this.draggableList[0], { content: this.detail.marketingTitle, ...style1, color: style1.style.color })
Object.assign(this.draggableList[1], { content: this.detail.marketingSubtitle, ...style1, color: style2.style.color })
Object.assign(this.draggableList[0], { content: this.detail.marketingTitle, ...style1, color: style1.style.color, font: style1.font })
Object.assign(this.draggableList[1], { content: this.detail.marketingSubtitle, ...style1, color: style2.style.color, font: style2.font })
} catch (e) {
console.log(e)
}
......@@ -382,6 +385,16 @@ export default {
}
}
</script>
<style>
@font-face {
font-family: 'jingnanyuanmoti';
src: url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/fonts/KNFONTYUANMO-2.otf');
}
@font-face {
font-family: 'YouSheBiaoTiYuan';
src: url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/fonts/douyuFont-2.otf');
}
</style>
<style lang="scss" scoped>
.review-body {
margin: 10px auto;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!