Commit 90b8efd9 by 杨明

fixed

1 parent cabcf0f1
...@@ -268,6 +268,10 @@ const subscribe = [ ...@@ -268,6 +268,10 @@ const subscribe = [
{ {
optionId: 8, optionId: 8,
optionLabel: '超级营销' optionLabel: '超级营销'
},
{
optionId: 9,
optionLabel: '售后众筹'
} }
] ]
const giftPackage = [ const giftPackage = [
......
.vdr {
touch-action: none;
position: absolute;
box-sizing: border-box;
border: 1px dashed black;
}
.handle {
box-sizing: border-box;
position: absolute;
width: 10px;
height: 10px;
background: #EEE;
border: 1px solid #333;
}
.handle-tl {
top: -10px;
left: -10px;
cursor: nw-resize;
}
.handle-tm {
top: -10px;
left: 50%;
margin-left: -5px;
cursor: n-resize;
}
.handle-tr {
top: -10px;
right: -10px;
cursor: ne-resize;
}
.handle-ml {
top: 50%;
margin-top: -5px;
left: -10px;
cursor: w-resize;
}
.handle-mr {
top: 50%;
margin-top: -5px;
right: -10px;
cursor: e-resize;
}
.handle-bl {
bottom: -10px;
left: -10px;
cursor: sw-resize;
}
.handle-bm {
bottom: -10px;
left: 50%;
margin-left: -5px;
cursor: s-resize;
}
.handle-br {
bottom: -10px;
right: -10px;
cursor: se-resize;
}
@media only screen and (max-width: 768px) {
[class*="handle-"]:before {
content: '';
left: -10px;
right: -10px;
bottom: -10px;
top: -10px;
position: absolute;
}
}
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-19 13:46:20 * @Date: 2023-05-19 13:46:20
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-31 18:11:57 * @LastEditTime: 2023-07-09 12:59:17
* @FilePath: \scrm-micro-home\src\mixins\gpt.js * @FilePath: \scrm-micro-home\src\mixins\gpt.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from 'vuex'
import apis from '@/api'
import Drawing from '@/utils/drawing' import Drawing from '@/utils/drawing'
const WIDTH = 375
export default { export default {
data() { data() {
return {} return {}
...@@ -77,6 +78,43 @@ export default { ...@@ -77,6 +78,43 @@ export default {
} catch (e) { } catch (e) {
console.log(e) console.log(e)
} }
},
async createMain(h, url, draggableList) {
const style1 = draggableList[0]
const style2 = draggableList[1]
const drawfun = new Drawing(document.getElementById('canvasId'), {
width: WIDTH,
height: h
})
const imageList = [
{
url,
x: 0,
y: 0,
width: WIDTH,
height: h
}
]
const textList = [
{ x: style1.x, y: style1.y, fontSize: style1.size, width: style1.width, text: style1.content },
{ x: style2.x, y: style2.y, fontSize: style2.size, width: style2.width, text: style2.content }
]
console.log(imageList, textList)
const canvasBase64 = await drawfun.begin({
imageList,
textList
})
return new Promise(async resolve => {
resolve(await this.uploadImg(canvasBase64))
})
},
uploadImg(imgFile) {
return new Promise((resolve, reject) => {
const base64 = 'png' + '@' + imgFile.split(',')[1]
apis.common.pictureUpload({ file: base64, fileType: 'image' }).then(res => {
resolve(res)
})
})
} }
}, },
mounted() {} mounted() {}
......
...@@ -2,25 +2,34 @@ ...@@ -2,25 +2,34 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 17:13:33 * @Date: 2023-05-16 17:13:33
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-07 18:23:30 * @LastEditTime: 2023-07-09 11:19:44
* @FilePath: \scrm-micro-home\src\store\modules\marketing.js * @FilePath: \scrm-micro-home\src\store\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
import apis from '@/api' import apis from '@/api'
const subscribeData = { 5: '保险', 2: '定保', 8: '售后众筹' } const subscribeData = { 5: '保险', 2: '定保', 9: '售后众筹' }
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
subscribe: null, subscribe: 5,
keywords: null, keywords: null,
GPTList: null, GPTList: null,
packageList: {}, packageList: {},
process: { 0: false, 1: false, 2: false }, process: { 0: false, 1: false, 2: false },
activityInfo: {} activityInfo: null
}, },
mutations: { mutations: {
SET_INIT(state, data) {
if (data) {
state.keywords = null
state.GPTList = null
state.packageList = {}
state.process = Object.assign({}, { 0: false, 1: false, 2: false })
state.activityInfo = Object.assign({})
}
},
// 设置场景值 // 设置场景值
SET_SUBSCRIBE(state, data) { SET_SUBSCRIBE(state, data) {
state.subscribe = data state.subscribe = data
...@@ -55,19 +64,15 @@ export default { ...@@ -55,19 +64,15 @@ export default {
}) })
}, },
//活动活动详情 //活动活动详情
getActivityInfo({ commit }, data) { getActivityInfo({ commit, state }, data) {
let { id, subscribe } = data, apis.marketing.activityDetail({ id: data }).then(res => {
param = { state.subscribe = res.subscribe
activityId: id commit('SET_ACTIVITY_INFO', res)
})
}, },
activityAPi = 'findActivityInfo' //活动模板详情
if (subscribe != 8) { getCalendarDetail({ commit }, data) {
param = { apis.marketing.calendarDetail({ id: data }).then(res => {
id
}
activityAPi = 'activityDetail'
}
apis.marketing[activityAPi](param).then(res => {
commit('SET_ACTIVITY_INFO', res) commit('SET_ACTIVITY_INFO', res)
}) })
}, },
......
import { isFunction } from './fns'
export function matchesSelectorToParentElements(el, selector, baseNode) {
let node = el
const matchesSelectorFunc = ['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'].find(func => isFunction(node[func]))
if (!isFunction(node[matchesSelectorFunc])) return false
do {
if (node[matchesSelectorFunc](selector)) return true
if (node === baseNode) return false
node = node.parentNode
} while (node)
return false
}
export function getComputedSize($el) {
const style = window.getComputedStyle($el)
return [parseFloat(style.getPropertyValue('width'), 10), parseFloat(style.getPropertyValue('height'), 10)]
}
export function addEvent(el, event, handler) {
if (!el) {
return
}
if (el.attachEvent) {
el.attachEvent('on' + event, handler)
} else if (el.addEventListener) {
el.addEventListener(event, handler, true)
} else {
el['on' + event] = handler
}
}
export function removeEvent(el, event, handler) {
if (!el) {
return
}
if (el.detachEvent) {
el.detachEvent('on' + event, handler)
} else if (el.removeEventListener) {
el.removeEventListener(event, handler, true)
} else {
el['on' + event] = null
}
}
export function isFunction(func) {
return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]'
}
export function snapToGrid(grid, pendingX, pendingY, scale = 1) {
const [scaleX, scaleY] = typeof scale === 'number' ? [scale, scale] : scale
const x = Math.round(pendingX / scaleX / grid[0]) * grid[0]
const y = Math.round(pendingY / scaleY / grid[1]) * grid[1]
return [x, y]
}
export function getSize(el) {
const rect = el.getBoundingClientRect()
return [parseInt(rect.width), parseInt(rect.height)]
}
export function computeWidth(parentWidth, left, right) {
return parentWidth - left - right
}
export function computeHeight(parentHeight, top, bottom) {
return parentHeight - top - bottom
}
export function restrictToBounds(value, min, max) {
if (min !== null && value < min) {
return min
}
if (max !== null && max < value) {
return max
}
return value
}
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-tab-pane label="保 险" name="5"></el-tab-pane> <el-tab-pane label="保 险" name="5"></el-tab-pane>
<el-tab-pane label="定 保" name="2"></el-tab-pane> <el-tab-pane label="定 保" name="2"></el-tab-pane>
<el-tab-pane label="节日关怀" name="6"></el-tab-pane> <el-tab-pane label="节日关怀" name="6"></el-tab-pane>
<el-tab-pane label="售后众筹" name="4"></el-tab-pane> <el-tab-pane label="售后众筹" name="9"></el-tab-pane>
</el-tabs> </el-tabs>
<div></div> <div></div>
</div> </div>
...@@ -130,7 +130,7 @@ export default { ...@@ -130,7 +130,7 @@ export default {
//引用 //引用
handleUse(row) { handleUse(row) {
this.caseVisible = false this.caseVisible = false
this.getActivityInfo(row) this.getActivityInfo(row.id)
}, },
//预览 //预览
handleView(row) {}, handleView(row) {},
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-29 21:24:27 * @Date: 2023-06-29 21:24:27
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-07 18:29:33 * @LastEditTime: 2023-07-09 12:29:03
* @FilePath: \scrm-micro-link\src\views\activityLink\components\MarketingContent.vue * @FilePath: \scrm-micro-link\src\views\activityLink\components\MarketingContent.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -60,7 +60,8 @@ export default { ...@@ -60,7 +60,8 @@ export default {
editFormData: [ editFormData: [
{ {
label: '预设模板', label: '预设模板',
addHtml: 'model' addHtml: 'model',
isHide: false
}, },
{ {
label: '营销标题', label: '营销标题',
...@@ -207,6 +208,7 @@ export default { ...@@ -207,6 +208,7 @@ export default {
deep: true deep: true
}, },
subscribe(val) { subscribe(val) {
console.log(val, 999)
if (val == 5) { if (val == 5) {
this.editRule.detailImage[0].required = false this.editRule.detailImage[0].required = false
this.editFormData[0].isHide = false this.editFormData[0].isHide = false
...@@ -217,6 +219,13 @@ export default { ...@@ -217,6 +219,13 @@ export default {
}, },
activityInfo: { activityInfo: {
handler(info) { handler(info) {
if (Object.keys(info).length == 0) {
return (this.editForm = {})
}
if (info.subTitle) {
this.setDetail(info)
return
}
this.editForm = this.$common.utils.deepClone(info) this.editForm = this.$common.utils.deepClone(info)
if (info.activityName) { if (info.activityName) {
this.$set(this.editForm, 'marketingTitle', info.activityName) this.$set(this.editForm, 'marketingTitle', info.activityName)
...@@ -242,10 +251,21 @@ export default { ...@@ -242,10 +251,21 @@ export default {
} }
}, },
computed: { computed: {
...mapState('marketing', ['GPTList', 'subscribe', 'activityInfo']) ...mapState('marketing', ['GPTList', 'subscribe', 'activityInfo', 'isInit'])
}, },
methods: { methods: {
...mapActions('marketing', ['setProcess']), ...mapActions('marketing', ['setProcess']),
setDetail(info) {
const { title, subTitle, startTime, endTime, backgroundImg, captionImg, titleStyle, subTitleStyle, codeId } = this.$common.utils.deepClone(info || {})
this.editForm.codeId = codeId
this.editForm.marketingTitle = title
this.editForm.marketingSubtitle = subTitle
this.editForm.backgroundImage = backgroundImg
this.editForm.detailImage = captionImg
this.editForm.titleStyle = titleStyle
this.editForm.subTitleStyle = subTitleStyle
this.editForm.activityTime = [startTime + ' 00:00:00', endTime + ' 00:00:00']
},
handleSure(val) { handleSure(val) {
this.modelVisible = false this.modelVisible = false
this.getTemplateInfo(val.id) this.getTemplateInfo(val.id)
...@@ -253,8 +273,9 @@ export default { ...@@ -253,8 +273,9 @@ export default {
getTemplateInfo(id) { getTemplateInfo(id) {
this.$apis.marketing.calendarDetail({ id }).then(res => { this.$apis.marketing.calendarDetail({ id }).then(res => {
console.log(res) console.log(res)
const { title, subTitle, startTime, endTime, backgroundImg, captionImg } = this.$common.utils.deepClone(res || {}) const { title, subTitle, startTime, endTime, backgroundImg, captionImg, codeId } = this.$common.utils.deepClone(res || {})
this.editForm.templateId = id this.editForm.templateId = id
this.editForm.codeId = id
this.editForm.marketingTitle = title this.editForm.marketingTitle = title
this.editForm.marketingSubtitle = subTitle this.editForm.marketingSubtitle = subTitle
this.editForm.backgroundImage = backgroundImg this.editForm.backgroundImage = backgroundImg
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div v-show="currentIndex == 1" class="car-table"> <div v-show="currentIndex == 1" class="car-table">
<GLTable :hasPage="false" v-loading="loading" ref="carRef" :tableData="carList" :tableParams="carTableParams" @refreshTable="getCarList" @select="handleSelectionCarTable"> <GLTable :hasPage="false" v-loading="loading" ref="carRef" :tableData="carList" :tableParams="carTableParams" @refreshTable="getCarList" @select="handleSelectionCarTable">
<template slot="price" slot-scope="scope"> <template slot="price" slot-scope="scope">
<el-input v-model="scope.scope.price" placeholder="请输入"></el-input> <el-input v-model="scope.scope.packageAmount" placeholder="请输入"></el-input>
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<div class="tab-border" :style="{ left: (serviceIndex == 7 ? 0 : serviceIndex - 1) * 88 + 2 + 'px' }"></div> <div class="tab-border" :style="{ left: (serviceIndex == 7 ? 0 : serviceIndex - 1) * 88 + 2 + 'px' }"></div>
</div> </div>
<div v-for="(item, index) in serviceTabList" :key="index"> <div v-for="(item, index) in serviceTabList" :key="index">
<GLTable :hasPage="false" v-loading="loading" v-show="serviceIndex == item.type" :ref="'serviceRef' + item.type" :tableData="serviceList" :tableParams="serviceTableParams" @refreshTable="getServiceList" @select="handleSelectionServiceTable"> <GLTable v-loading="loading" v-show="serviceIndex == item.type" :ref="'serviceRef' + item.type" :tableData="serviceList" :tableParams="serviceTableParams" @refreshTable="getServiceList" @select="handleSelectionServiceTable">
<span slot="effectiveType" slot-scope="scope"> <span slot="effectiveType" slot-scope="scope">
<span>{{ toLabelText(scope.scope) }}</span> <span>{{ toLabelText(scope.scope) }}</span>
</span> </span>
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
type: 'input' type: 'input'
} }
], ],
giftList: [{ name: 'A礼包' }, { name: 'B礼包' }] giftList: []
} }
}, },
watch: { watch: {
...@@ -120,9 +120,20 @@ export default { ...@@ -120,9 +120,20 @@ export default {
}, },
activityInfo: { activityInfo: {
handler(info) { handler(info) {
this.init()
this.$nextTick(() => {
if (info.serviceMerchantPackageConfigDTOList && info.serviceMerchantPackageConfigDTOList.length) { if (info.serviceMerchantPackageConfigDTOList && info.serviceMerchantPackageConfigDTOList.length) {
this.selectedCarList = info.serviceMerchantPackageConfigDTOList.map(item => {
return {
packageCode: item.packageCode,
packageAmount: item.packageAmount
}
})
this.selectedCarList = info.serviceMerchantPackageConfigDTOList this.selectedCarList = info.serviceMerchantPackageConfigDTOList
let activityCoupon = info.activityCouponBaseInfoDTOS || info.couponList }
let activityCoupon = info.activityCouponBaseInfoDTOS || info.couponList || info.couponItemList
if (activityCoupon && activityCoupon.length) { if (activityCoupon && activityCoupon.length) {
activityCoupon.forEach(item => { activityCoupon.forEach(item => {
item.id = item.couponId item.id = item.couponId
...@@ -131,7 +142,9 @@ export default { ...@@ -131,7 +142,9 @@ export default {
this.selectedGoodsList = activityCoupon.filter(i => i.discountType == 8) this.selectedGoodsList = activityCoupon.filter(i => i.discountType == 8)
this.selectedServiceList = activityCoupon.filter(i => i.discountType != 8) this.selectedServiceList = activityCoupon.filter(i => i.discountType != 8)
} }
} console.log(this.selectedCarList, this.selectedGoodsList, this.selectedServiceList, 11111111)
this.getList()
})
}, },
deep: true deep: true
} }
...@@ -141,6 +154,20 @@ export default { ...@@ -141,6 +154,20 @@ export default {
}, },
methods: { methods: {
...mapActions('marketing', ['setPackage', 'setProcess']), ...mapActions('marketing', ['setPackage', 'setProcess']),
init() {
this.currentIndex = '1'
this.goodsIndex = 1
this.serviceIndex = 7
this.carList = []
this.selectedCarList = []
this.serviceList = []
this.selectedServiceList = []
this.goodsList = []
this.selectedGoodsList = []
this.$refs['carRef'].$refs['listMutiTable'].clearSelection()
this.$refs['goodsRef' + this.goodsIndex][0].$refs['listMutiTable'].clearSelection()
this.$refs['serviceRef' + this.serviceIndex][0].$refs['listMutiTable'].clearSelection()
},
getGiftList(val) { getGiftList(val) {
const { merchantId } = this const { merchantId } = this
let params = { let params = {
...@@ -152,6 +179,9 @@ export default { ...@@ -152,6 +179,9 @@ export default {
}) })
}, },
handleSaveGift() { handleSaveGift() {
if (!this.editForm.activityPrice) {
this.$message.error('输入活动价格')
}
if (this.selectedGoodsList.length + this.selectedServiceList.length + this.selectedCarList.length == 0) { if (this.selectedGoodsList.length + this.selectedServiceList.length + this.selectedCarList.length == 0) {
this.$message.error('权益服务、平台优惠、门店优惠券至少选一项') this.$message.error('权益服务、平台优惠、门店优惠券至少选一项')
return return
...@@ -186,8 +216,9 @@ export default { ...@@ -186,8 +216,9 @@ export default {
}) })
const equities = {} const equities = {}
selectedCarList.forEach(item => { selectedCarList.forEach(item => {
equities[item.packageCode] = item.price equities[item.packageCode] = item.packageAmount
}) })
console.log(equities, selectedCarList)
let params = { let params = {
merchantId, merchantId,
activitySubscribe: subscribe, activitySubscribe: subscribe,
...@@ -225,10 +256,11 @@ export default { ...@@ -225,10 +256,11 @@ export default {
}, },
// 选择/取消 门店服务 // 选择/取消 门店服务
handleSelectionServiceTable(selection, row) { handleSelectionServiceTable(selection, row) {
console.log(selection, row)
if (selection && selection.find(item => item && item.id == row.id)) { if (selection && selection.find(item => item && item.id == row.id)) {
this.addRows(this.selectedServiceList, [row]) this.addRows(this.selectedServiceList, [row], 'id')
} else { } else {
this.deleteRows(this.selectedServiceList, [val]) this.deleteRows(this.selectedServiceList, [row], 'id')
} }
console.log(this.selectedServiceList) console.log(this.selectedServiceList)
// this.selectedServiceList = val // this.selectedServiceList = val
...@@ -301,6 +333,7 @@ export default { ...@@ -301,6 +333,7 @@ export default {
.then(res => { .then(res => {
this.loading = false this.loading = false
this.carList = res.packageConfigs this.carList = res.packageConfigs
this.selectedPreExisting(this.selectedCarList, this.carList, 'packageCode', this.$refs['carRef'])
}) })
.finally(() => { .finally(() => {
this.loading = false this.loading = false
...@@ -369,7 +402,7 @@ export default { ...@@ -369,7 +402,7 @@ export default {
this.serviceList = res.list this.serviceList = res.list
// this.fnCallBack = true // this.fnCallBack = true
this.$refs['serviceRef' + this.serviceIndex][0].tableTotal = res.total this.$refs['serviceRef' + this.serviceIndex][0].tableTotal = res.total
this.selectedPreExisting(this.selectedServiceList, this.serviceList, 'id', this.$refs['goodsRef' + this.serviceIndex][0]) this.selectedPreExisting(this.selectedServiceList, this.serviceList, 'id', this.$refs['serviceRef' + this.serviceIndex][0])
}) })
.finally(() => { .finally(() => {
this.loading = false this.loading = false
...@@ -377,8 +410,34 @@ export default { ...@@ -377,8 +410,34 @@ export default {
}, },
//获取礼包详情 //获取礼包详情
getModel() { getModel() {
if (!this.giftValue) {
return
}
this.$apis.giftBag.packageDetail({ id: this.giftValue }).then(res => { this.$apis.giftBag.packageDetail({ id: this.giftValue }).then(res => {
console.log(res) this.init()
this.$nextTick(() => {
if (res.serviceMerchantPackageConfigDTOS && res.serviceMerchantPackageConfigDTOS.length) {
this.selectedCarList = res.serviceMerchantPackageConfigDTOS.map(item => {
return {
packageCode: item.packageCode,
packageAmount: item.packageAmount
}
})
}
let activityCoupon = res.couponList || []
if (activityCoupon && activityCoupon.length) {
activityCoupon.forEach(item => {
item.id = item.couponId
item.denomination = item.couponAnticipatedCost
})
this.selectedGoodsList = activityCoupon.filter(i => i.discountType == 8)
this.selectedServiceList = activityCoupon.filter(i => i.discountType != 8)
}
console.log(this.selectedCarList)
this.getList()
})
}) })
}, },
handleClose() { handleClose() {
......
...@@ -23,12 +23,12 @@ ...@@ -23,12 +23,12 @@
<div class="task-box-num">导入客户</div> <div class="task-box-num">导入客户</div>
<div class="task-num-item flex-column-center"> <div class="task-num-item flex-column-center">
<label>分配方式:</label> <label>分配方式:</label>
{{ item.taskType == 1 ? '平均分配' : '上次跟进人' }} {{ item.assignType == 0 ? '平均分配' : '上次跟进人' }}
</div> </div>
<div class="task-num-item flex"> <div class="task-num-item flex">
<label>选择跟进人:</label> <label>选择跟进人:</label>
<div class="task-border"> <div class="task-border">
<div class="flow-emp" v-for="(v, k) in item.staffList" :key="k">{{ v.staffName }}({{ v.customerNum }}人)</div> <div class="flow-emp" v-for="(v, k) in item.staffList" :key="k">{{ v.staffName || v.staffPhone }}({{ v.customerNum }}人)</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -43,27 +43,27 @@ ...@@ -43,27 +43,27 @@
</el-button> </el-button>
<input type="file" style="opacity: 0" ref="file" accept="*" @change="uploadFile($event, item)" /> <input type="file" style="opacity: 0" ref="file" accept="*" @change="uploadFile($event, item)" />
</div> </div>
<a>下载数据模板</a> <a :href="importUrl">下载数据模板</a>
</div> </div>
<div class="task-box-desc"> <div class="task-box-desc">
<div class="task-box-num">导入客户</div> <div class="task-box-num">导入客户</div>
<div class="task-num-item flex-column-center"> <div class="task-num-item flex-column-center">
<label>分配方式:</label> <label>分配方式:</label>
<el-radio-group v-model="item.taskType" @change="handleChange(item)"> <el-radio-group v-model="item.assignType" @change="handleChange(item)">
<el-radio :label="1">平均分配</el-radio> <el-radio :label="0">平均分配</el-radio>
<el-radio :label="2">上次跟进人</el-radio> <el-radio :label="1">上次跟进人</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="task-num-item flex"> <div class="task-num-item flex">
<label>选择跟进人:</label> <label>选择跟进人:</label>
<el-table class="task-tabel" :ref="'form' + item.batchNo" :data="item.taskType == 1 ? tableData : tableData.concat(item.LastFollowStaff)" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange($event, item)"> <el-table class="task-tabel" :ref="'form' + item.batchNo" :data="item.tableData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange($event, item)">
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="跟进人" width="220"> <el-table-column label="跟进人" width="220">
<template slot-scope="scope">{{ scope.row.staffName }} {{ scope.row.staffPhone }}</template> <template slot-scope="scope">{{ scope.row?.staffName }} {{ scope.row?.staffPhone }}</template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="260"> <el-table-column label="操作" width="260">
<div class="config-panel flex" slot-scope="scope"> <div class="config-panel flex" slot-scope="scope">
<div class="config-msg" v-if="item.taskType == 2" @click="showRegister">邀请人员注册</div> <div class="config-msg" v-if="item.assignType == 1" @click="showRegister">邀请人员注册</div>
<div class="config-msg" @click="handleConfig(scope.row)">配置话术 / 短信</div> <div class="config-msg" @click="handleConfig(scope.row)">配置话术 / 短信</div>
</div> </div>
</el-table-column> </el-table-column>
...@@ -99,8 +99,7 @@ ...@@ -99,8 +99,7 @@
<el-form ref="configForm" :model="configForm" label-width="200px"> <el-form ref="configForm" :model="configForm" label-width="200px">
<el-form-item label="AI人工智能外呼:" :size="size"> <el-form-item label="AI人工智能外呼:" :size="size">
<el-select v-model="configForm.talkId" placeholder="请选择"> <el-select v-model="configForm.talkId" placeholder="请选择">
<el-option label="区域一" value="shanghai"></el-option> <el-option v-for="item in roobList" :key="item.id" :label="item.label" :value="item.value"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="营销短信:" :size="size"> <el-form-item label="营销短信:" :size="size">
...@@ -113,8 +112,8 @@ ...@@ -113,8 +112,8 @@
</template> </template>
<script> <script>
const taskData = { expand: true, taskType: 1, customerNumTotal: 0, lastFollowStaffList: [], staffList: [], excelUrl: '', isFinish: false } const taskData = { tableData: [], expand: true, assignType: 0, customerNumTotal: 0, lastFollowStaffList: [], staffList: [], excelUrl: '', isFinish: false }
import { mapActions } from 'vuex' import { mapActions, mapState } from 'vuex'
export default { export default {
data() { data() {
return { return {
...@@ -126,12 +125,24 @@ export default { ...@@ -126,12 +125,24 @@ export default {
isQrcodeVisible: false, isQrcodeVisible: false,
configVisible: false, configVisible: false,
configForm: {}, configForm: {},
tableData: [] tableData: [],
roobList: [{ labe: 3, value: 4 }]
} }
}, },
mounted() { mounted() {
this.findMerchantStaffList() this.findMerchantStaffList()
}, },
computed: {
...mapState('marketing', ['subscribe']),
importUrl() {
const url = {
5: 'https://wx.glsx.com.cn/upload/biz/e78dea4b-c55c-4af7-bb42-0f3d99bf27a8.xlsx',
2: 'https://wx.glsx.com.cn/upload/biz/4fec9d20-d685-4cee-8c3e-23f2d22b18ad.xlsx',
6: 'https://wx.glsx.com.cn/upload/biz/980515d5-20df-49a5-90a7-1accb2aed2a6.xlsx'
}
return url[this.subscribe]
}
},
methods: { methods: {
...mapActions('marketing', ['setProcess']), ...mapActions('marketing', ['setProcess']),
uploadFile(e, item) { uploadFile(e, item) {
...@@ -169,14 +180,15 @@ export default { ...@@ -169,14 +180,15 @@ export default {
} }
this.$apis.marketing.findMerchantStaffList(param).then(res => { this.$apis.marketing.findMerchantStaffList(param).then(res => {
this.tableData = res || [] this.tableData = res || []
this.taskList[0].tableData = this.$common.utils.deepClone(this.tableData)
}) })
}, },
handleChange(item) { handleChange(item) {
if (item.taskType == 2) { if (item.assignType == 1) {
const staffPhone = item.lastFollowStaffList.map(item => item.staffPhone) const staffPhone = item.lastFollowStaffList.map(item => item.staffPhone)
this.tableData.forEach(i => { item.tableData.forEach(i => {
if (staffPhone.includes(i.staffPhone)) { if (staffPhone.includes(i.staffPhone)) {
this.$refs['form' + item.batchNo].toggleRowSelection(i) this.$refs['form' + item.batchNo][0].toggleRowSelection(i)
} }
}) })
} }
...@@ -186,7 +198,7 @@ export default { ...@@ -186,7 +198,7 @@ export default {
console.log(this.customerKeys) console.log(this.customerKeys)
let param = { let param = {
merchantId: this.$globalState.session.merchantId, merchantId: this.$globalState.session.merchantId,
excelUrl: ['https://wx.glsx.com.cn/upload/biz/ef349845-5332-4bf0-9d5d-255c16afd7e7.xlsx', 'https://wx.glsx.com.cn/upload/biz/72dd6967-c2f9-478b-94a8-f31c955d839a.xlsx'][this.customerKey.length], excelUrl: url,
customerKeys: this.customerKey customerKeys: this.customerKey
} }
this.$apis.marketing.importCustomer(param).then(res => { this.$apis.marketing.importCustomer(param).then(res => {
...@@ -195,6 +207,17 @@ export default { ...@@ -195,6 +207,17 @@ export default {
item.lastFollowStaffList = res.lastFollowStaffList item.lastFollowStaffList = res.lastFollowStaffList
item.customerNumTotal = res.customerNumTotal item.customerNumTotal = res.customerNumTotal
this.customerKey.push(res.customerKey) this.customerKey.push(res.customerKey)
const staffList = [...item.lastFollowStaffList]
const staffPhone = staffList.map(item => item.staffPhone)
const tableData = this.$common.utils.deepClone(item.tableData)
tableData.forEach(item => {
if (!item.lastCustomerNum) item.lastCustomerNum = 0
if (!staffPhone.includes(item.staffPhone)) {
staffList.push(item)
}
})
item.tableData = staffList
console.log(item.tableData)
}) })
}, },
handleExpand(item) { handleExpand(item) {
...@@ -202,9 +225,18 @@ export default { ...@@ -202,9 +225,18 @@ export default {
}, },
handleSelectionChange(val, item) { handleSelectionChange(val, item) {
item.staffList = val item.staffList = val
item.staffList.forEach(item => { item.staffList = item.staffList.map(item => {
if (item.registerStatus !== 0) { return {
item.registerStatus = 1 lastStaffFlag: item.lastCustomerNum ? 1 : 0,
lastCustomerNum: item.lastCustomerNum,
merchantId: item.merchantNo,
staffPhone: item.staffPhone,
staffName: item.staffName,
staffUuid: item.uuid,
id: item.id,
messageContent: item.messageContent,
talkId: item.talkId,
createdBy: item.createdBy
} }
}) })
}, },
...@@ -216,6 +248,10 @@ export default { ...@@ -216,6 +248,10 @@ export default {
handleConfig(row) { handleConfig(row) {
this.configVisible = true this.configVisible = true
this.selectEmp = row this.selectEmp = row
this.configForm = {
talkId: '',
messageContent: '【门店名称】诚邀您参与{0},请尽快点击链接参与,谨防错过哦! {1} 谨防错过退订回T。'
}
this.$apis.marketing.getRobotList({}).then(res => { this.$apis.marketing.getRobotList({}).then(res => {
console.log(res) console.log(res)
}) })
...@@ -229,36 +265,52 @@ export default { ...@@ -229,36 +265,52 @@ export default {
this.setProcess({ 0: true }) this.setProcess({ 0: true })
}, },
handleConfirm() { handleConfirm() {
console.log(this.taskList) const customerRequestList = this.$common.utils.deepClone(this.taskList)
this.setProcess({ 0: { customerRequestList: this.taskList } }) delete customerRequestList.tableData
if (this.vaildTask()) this.setProcess({ 0: { customerRequestList } })
}, },
addTask() { //验证配置任务,及分配人员
vaildTask() {
let len = this.taskList.length let len = this.taskList.length
if (len == 10) {
this.$message.error('营销任务不能超过10个')
return
}
const task = this.taskList[len - 1] const task = this.taskList[len - 1]
//获取上次跟进人总数
console.log(task.staffList)
let lastCustomerNum = task.staffList.reduce((prev, cur) => {
return prev + cur.lastCustomerNum || 0
}, 0)
if (task.assignType == 0) lastCustomerNum = 0
if (task.excelUrl && task.staffList.length) { if (task.excelUrl && task.staffList.length) {
task.isFinish = true task.isFinish = true
if (task.taskType == 1) { const customerNumTotal = task.customerNumTotal - lastCustomerNum || 0 // 去除上次跟进人总数
const customerNumTotal = task.customerNumTotal
const length = task.staffList.length const length = task.staffList.length
let avag = Math.ceil(customerNumTotal / length) let avag = Math.ceil(customerNumTotal / length)
let residue = customerNumTotal let residue = customerNumTotal
task.staffList.forEach(item => { task.staffList.forEach((item, i) => {
this.$set(item, 'customerNum', residue > avag ? avag : residue) const lastNum = task.assignType == 0 ? 0 : item.lastCustomerNum
this.$set(item, 'customerNum', residue > avag ? lastNum || 0 + avag : lastNum || 0 + residue)
residue = residue - avag residue = residue - avag
avag = Math.ceil(residue / (length - i - 1))
}) })
console.log(task.staffList) return true
} else {
this.$message.error('请配置营销任务')
return false
} }
},
addTask() {
let len = this.taskList.length
if (len == 10) {
this.$message.error('营销任务不能超过10个')
return
}
if (this.vaildTask())
this.taskList.push({ this.taskList.push({
batchNo: ++len, batchNo: ++len,
...taskData ...taskData,
tableData: this.$common.utils.deepClone(this.tableData)
}) })
} }
} }
}
} }
</script> </script>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32 * @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-07 12:17:20 * @LastEditTime: 2023-07-09 12:39:02
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue * @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 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -13,10 +13,33 @@ ...@@ -13,10 +13,33 @@
<img src="@/assets/seckillActivity/phone.png" class="review-phone" /> <img src="@/assets/seckillActivity/phone.png" class="review-phone" />
<div class="review-title_top">{{ detail.marketingTitle || detail.activityName }}</div> <div class="review-title_top">{{ detail.marketingTitle || detail.activityName }}</div>
<div class="review-content"> <div class="review-content">
<div class="review-main"> <div class="review-main" v-if="backgroundHeight" :style="{ height: backgroundHeight + 'px' }">
<template v-for="item in draggableList">
<vue-draggable-resizable
:customId="item.customId"
:key="item.customId"
v-if="item.type == 'text'"
:w="item.width"
:h="item.height"
:x="item.x"
:y="item.y"
:style="{
'font-size': item.size + 'px',
color: item.color
}"
class="img_cl"
parent=".review-main"
@dragging="onDrag"
@resizing="onResize"
@activated="onActivated"
>
{{ item.content }}
</vue-draggable-resizable>
</template>
<div class="review-bg-img"> <div class="review-bg-img">
<img :src="detail.backgroundImg" v-if="detail.backgroundImg" /> <img :src="detail.backgroundImage" v-if="detail.backgroundImage" />
</div> </div>
<div>
<div class="main-body" style="background: #DEEAF2;"> <div class="main-body" style="background: #DEEAF2;">
<template v-if="modelNum == 1"> <template v-if="modelNum == 1">
<!-- 权益服务 --> <!-- 权益服务 -->
...@@ -79,6 +102,7 @@ ...@@ -79,6 +102,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<template v-else-if="isSuper"> <template v-else-if="isSuper">
<img src="@/assets/seckillActivity/phone.png" class="review-phone" /> <img src="@/assets/seckillActivity/phone.png" class="review-phone" />
...@@ -165,6 +189,8 @@ ...@@ -165,6 +189,8 @@
</div> </div>
</template> </template>
<script> <script>
const WIDTH = 244
const RATIO = RATIO / 375
import PhoneViewA from './PhoneViewA' import PhoneViewA from './PhoneViewA'
import draw from '@/mixins/draw' import draw from '@/mixins/draw'
import equityOne from './model/model_1/equity' import equityOne from './model/model_1/equity'
...@@ -180,14 +206,46 @@ import equityFour from './model/model_4/equity' ...@@ -180,14 +206,46 @@ import equityFour from './model/model_4/equity'
import goodsFour from './model/model_4/goods' import goodsFour from './model/model_4/goods'
import couponFour from './model/model_4/coupon' import couponFour from './model/model_4/coupon'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import VueDraggableResizable from '@/components/draggable/vue-draggable-resizable'
import '@/components/draggable/vue-draggable-resizable.css'
export default { export default {
mixins: [draw], mixins: [draw],
data() { data() {
return { return {
backgroundHeight: 0,
currentIndex: 0,
draggableList: [
{
type: 'text',
x: 0,
y: 0,
width: 40,
height: 20,
content: '默认',
remark: '文字',
size: 20,
color: '',
customId: '1'
},
{
type: 'text',
x: 0,
y: 0,
width: 40,
height: 20,
content: '默认',
remark: '文字',
size: 20,
color: '',
customId: '2'
}
],
isModel: true, isModel: true,
modelNum: 4, modelNum: 4,
activityInfo: {}, activityInfo: {},
detail: {}, detail: {
backgroundImg: ''
},
logoInfo: {}, logoInfo: {},
textList: [], textList: [],
discount: { discount: {
...@@ -199,6 +257,7 @@ export default { ...@@ -199,6 +257,7 @@ export default {
} }
}, },
components: { components: {
VueDraggableResizable,
PhoneViewA, PhoneViewA,
equityOne, equityOne,
goodsOne, goodsOne,
...@@ -214,7 +273,7 @@ export default { ...@@ -214,7 +273,7 @@ export default {
couponFour couponFour
}, },
computed: { computed: {
...mapState('marketing', ['packageList']) ...mapState('marketing', ['packageList', 'process'])
}, },
props: { props: {
// activityInfo: { // activityInfo: {
...@@ -271,10 +330,54 @@ export default { ...@@ -271,10 +330,54 @@ export default {
packageList: { packageList: {
handler(val) { handler(val) {
console.log(val, 8888) console.log(val, 8888)
this.detail = val this.detail = { ...this.detail, ...val }
}, },
deep: true, deep: true,
immediate: true immediate: true
},
process: {
async handler(val) {
this.detail = { ...this.detail, ...val[2] }
console.log(this.detail)
this.backgroundHeight = await this.getImgWH(this.detail.backgroundImage)
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 })
} catch (e) {
console.log(e)
}
},
deep: true
}
},
methods: {
//获取图片宽度高度
getImgWH(src) {
return new Promise(resolve => {
const img = new Image()
img.src = src
img.onload = () => {
console.log(WIDTH, img.height, img.width)
resolve(Math.floor((WIDTH * img.height) / img.width))
}
})
},
onDrag(x, y) {
this.draggableList[this.currentIndex].x = x
this.draggableList[this.currentIndex].y = y
},
onActivated(index) {
const idx = this.draggableList.findIndex(item => item.customId == index)
this.currentIndex = idx
},
onResize(x, y, width, height) {
this.draggableList[this.currentIndex].x = x
this.draggableList[this.currentIndex].y = y
this.draggableList[this.currentIndex].width = width
this.draggableList[this.currentIndex].height = height
this.draggableList[this.currentIndex].size = height
} }
} }
} }
...@@ -322,6 +425,12 @@ export default { ...@@ -322,6 +425,12 @@ export default {
.review-main { .review-main {
position: relative; position: relative;
height: 300px; height: 300px;
.review-bg-img {
width: 100%;
img {
width: 100%;
}
}
.main-title { .main-title {
position: absolute; position: absolute;
width: 100%; width: 100%;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
<div class="case-container"> <div class="case-container">
<div class="case-container-title">预览营销方案</div> <div class="case-container-title">预览营销方案</div>
<phoneView></phoneView> <phoneView ref="viewForm"></phoneView>
</div> </div>
</div> </div>
</template> </template>
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
import phoneView from './PhoneView' import phoneView from './PhoneView'
import draw from '@/mixins/draw'
export default { export default {
mixins: [draw],
components: { components: {
phoneView phoneView
}, },
...@@ -44,7 +46,13 @@ export default { ...@@ -44,7 +46,13 @@ export default {
} }
}, },
methods: { methods: {
handleSave() { async handleSave() {
const {
backgroundHeight,
detail: { backgroundImage },
draggableList
} = this.$refs.viewForm
const url = await this.createMain(backgroundHeight, backgroundImage, draggableList)
let params = { merchantId: this.$globalState.session.merchantId } let params = { merchantId: this.$globalState.session.merchantId }
for (let k in this.process) { for (let k in this.process) {
if (!this.process[k]) { if (!this.process[k]) {
...@@ -53,6 +61,8 @@ export default { ...@@ -53,6 +61,8 @@ export default {
} }
params = { ...params, ...this.process[k] } params = { ...params, ...this.process[k] }
} }
params.subscribe = this.subscribe
params.backgroundImage = url
this.loading = true this.loading = true
this.$apis.marketing this.$apis.marketing
.createSuperMarketing(params) .createSuperMarketing(params)
...@@ -68,7 +78,7 @@ export default { ...@@ -68,7 +78,7 @@ export default {
} }
}, },
computed: { computed: {
...mapState('marketing', ['process']) ...mapState('marketing', ['process', 'subscribe'])
} }
} }
</script> </script>
......
...@@ -4,7 +4,19 @@ ...@@ -4,7 +4,19 @@
<div class="choseRow"> <div class="choseRow">
<div class="choseItem" :class="{ active: currentIndex == item.type }" v-for="(item, index) in tabList" :key="index" @click="tabClick(item.type)">{{ item.label }}</div> <div class="choseItem" :class="{ active: currentIndex == item.type }" v-for="(item, index) in tabList" :key="index" @click="tabClick(item.type)">{{ item.label }}</div>
</div> </div>
<div class="fes-box">
<div class="fes-item" v-for="item in festivalList" :key="item.id">{{ item.title }}</div>
<div class="fes-waiting">不断更新中……</div>
</div>
<div class="scene-content"> <div class="scene-content">
<!-- <div class="scene-card">
<div class="scene-card-img">
<img src="" />
</div>
<div class="scene-card-content">
请扫码添加【XXXX】小管家,并组群获得支持
</div>
</div> -->
<div class="scene-item" v-for="(item, index) in sceneList" :key="index"> <div class="scene-item" v-for="(item, index) in sceneList" :key="index">
<div class="scene-item-box"> <div class="scene-item-box">
<div class="scene-item-title"> <div class="scene-item-title">
...@@ -22,11 +34,18 @@ ...@@ -22,11 +34,18 @@
</template> </template>
<script> <script>
import { mapActions } from 'vuex' import { mapActions, mapMutations, mapState } from 'vuex'
export default { export default {
data() { data() {
return { return {
tabList: [{ label: '保险', type: 5 }, { label: '定保', type: 2 }, { label: '节日关怀', type: 6 }, { label: '售后众筹' }], routeInfo: {},
tabList: [
{ label: '保险', type: 5 },
{ label: '定保', type: 2 },
{ label: '节日关怀', type: 6 },
{ label: '售后众筹', type: 9 }
],
festivalList: [],
currentIndex: 5, currentIndex: 5,
sceneList: [ sceneList: [
{ {
...@@ -56,13 +75,41 @@ export default { ...@@ -56,13 +75,41 @@ export default {
] ]
} }
}, },
mounted() {
this.calendarPage()
this.routeInfo = this.$route.query
if (this.routeInfo.addOrEdit == 'edit') {
this.getInfo()
} else {
this.setSubscribe(this.routeInfo.subscribe)
}
},
computed: {
...mapState('marketing', ['subscribe'])
},
watch: {
subscribe(val) {
this.currentIndex = val
}
},
methods: { methods: {
...mapActions('marketing', ['setSubscribe']), ...mapActions('marketing', ['setSubscribe', 'getActivityInfo']),
handleAdd() {}, ...mapMutations('marketing', ['SET_INIT']),
handleAdd() {
this.SET_INIT(true)
},
getInfo() {
this.getActivityInfo(this.routeInfo.id)
},
tabClick(index) { tabClick(index) {
this.currentIndex = index this.currentIndex = index
console.log(index) console.log(index)
this.setSubscribe(index) this.setSubscribe(index)
},
calendarPage() {
this.$apis.marketing.calendarPage({ pageSize: 100, pageNum: 1 }).then(res => {
this.festivalList = (res.data || []).filter(item => item.marketingType == 6)
})
} }
} }
} }
...@@ -75,6 +122,29 @@ export default { ...@@ -75,6 +122,29 @@ export default {
background: #fff; background: #fff;
padding: 16px; padding: 16px;
display: flex; display: flex;
position: relative;
.scene-card {
position: absolute;
width: 178px;
height: 169px;
background: #ffffff;
border: 1px solid #e5e5e5;
box-shadow: 0 4px 12px 0 #00000014;
top: -160px;
left: 16px;
padding: 10px;
&-img {
width: 82px;
height: 82px;
margin: 10px auto;
}
&-content {
font-size: 12px;
color: #666666;
text-align: center;
line-height: 18px;
}
}
.scene-item { .scene-item {
width: 16.7%; width: 16.7%;
display: flex; display: flex;
...@@ -117,6 +187,28 @@ export default { ...@@ -117,6 +187,28 @@ export default {
} }
} }
} }
.fes-box {
display: flex;
height: 70px;
background: #ffffff;
border-radius: 0 4px 4px 4px;
padding: 20px;
box-sizing: border-box;
.fes-item {
padding: 0px 16px;
background: #f9f9f9;
height: 30px;
line-height: 30px;
font-size: 12px;
color: #666666;
margin-right: 10px;
}
.fes-waiting {
font-size: 12px;
color: #666666;
line-height: 30px;
}
}
.choseRow { .choseRow {
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
</GLDialog> </GLDialog>
</template> </template>
<script> <script>
import { mapActions } from 'vuex'
export default { export default {
data() { data() {
return { return {
...@@ -31,6 +32,7 @@ export default { ...@@ -31,6 +32,7 @@ export default {
} }
}, },
methods: { methods: {
...mapActions('marketing', ['getCalendarDetail']),
calendarPage() { calendarPage() {
this.$apis.marketing.calendarPage({ pageSize: 100, pageNum: 1 }).then(res => { this.$apis.marketing.calendarPage({ pageSize: 100, pageNum: 1 }).then(res => {
this.modelList = (res.data || []).filter(item => item.marketingType == 5) this.modelList = (res.data || []).filter(item => item.marketingType == 5)
...@@ -38,7 +40,8 @@ export default { ...@@ -38,7 +40,8 @@ export default {
}) })
}, },
handleConfirm() { handleConfirm() {
this.$emit('handleSure', this.selectObj) this.getCalendarDetail(this.selectObj.id)
this.$emit('handleClose')
}, },
handleModelClose() { handleModelClose() {
this.$emit('handleClose') this.$emit('handleClose')
......
<template> <template>
<div class="wrap" v-if="serviceList.length>0"> <div class="wrap" v-if="serviceList.length > 0">
<div class="container-panel"> <div class="container-panel">
<img class="angle" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/deliver.png?v=1.0.2" /> <img class="angle" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/deliver.png?v=1.0.2" />
<div class="title"> <div class="title">
...@@ -30,23 +30,24 @@ export default { ...@@ -30,23 +30,24 @@ export default {
4: '兑换券', 4: '兑换券',
7: '服务券' 7: '服务券'
}, },
serviceList:[] serviceList: []
} }
}, },
props: { props: {
detail: { detail: {
type: Object, type: Object,
default:()=> {} default: () => {}
} }
}, },
watch: { watch: {
detail: { detail: {
handler(n) { handler(n) {
const serviceList = n.selectedGoodsList const serviceList = n.selectedGoodsList || []
serviceList.length>0&&serviceList.forEach(item=>{ serviceList.length > 0 &&
item.couponAnticipatedCost = (item.denomination/100).toFixed(2).replace(/\.[0]+$/,'') serviceList.forEach(item => {
item.couponAnticipatedCost = (item.denomination / 100).toFixed(2).replace(/\.[0]+$/, '')
}) })
this.serviceList =serviceList this.serviceList = serviceList
}, },
deep: true, deep: true,
immediate: true immediate: true
...@@ -99,7 +100,7 @@ export default { ...@@ -99,7 +100,7 @@ export default {
background-image: linear-gradient(-83deg, #fe6a7545 0%, #fcf0ee00 96%); background-image: linear-gradient(-83deg, #fe6a7545 0%, #fcf0ee00 96%);
border-radius: 10px; border-radius: 10px;
margin-top: 10px; margin-top: 10px;
padding:8px; padding: 8px;
box-sizing: border-box; box-sizing: border-box;
&:last-child { &:last-child {
......
<template> <template>
<div class="wrap" v-if="serviceList.length>0"> <div class="wrap" v-if="serviceList.length > 0">
<div class="container-panel"> <div class="container-panel">
<img class="header-panel" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/model_4/delivery.png" /> <img class="header-panel" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/model_4/delivery.png" />
<div class="service-item" v-for="(item, index) in serviceList" :key="index"> <div class="service-item" v-for="(item, index) in serviceList" :key="index">
<div class="service-logo"> </div> <div class="service-logo"></div>
<div class="service-desc"> <div class="service-desc">
<div class="service-title">{{item.brandName}}{{item.goodsName}}</div> <div class="service-title">{{ item.brandName }}{{ item.goodsName }}</div>
<div class="service-content">x{{item.couponAmount}} 抵扣券</div> <div class="service-content">x{{ item.couponAmount }} 抵扣券</div>
</div>
<div class="service-price">
{{ item.couponAnticipatedCost }}
<span>元</span>
</div>
</div> </div>
<div class="service-price">{{item.couponAnticipatedCost}}<span>元</span> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
export default { export default {
...@@ -23,23 +26,24 @@ export default { ...@@ -23,23 +26,24 @@ export default {
4: '兑换券', 4: '兑换券',
7: '服务券' 7: '服务券'
}, },
serviceList:[] serviceList: []
} }
}, },
props: { props: {
detail: { detail: {
type: Object, type: Object,
default:()=> {} default: () => {}
} }
}, },
watch: { watch: {
detail: { detail: {
handler(n) { handler(n) {
const serviceList = n.selectedGoodsList const serviceList = n.selectedGoodsList || []
serviceList.length>0&&serviceList.forEach(item=>{ serviceList.length > 0 &&
item.couponAnticipatedCost = (item.denomination/100).toFixed(2).replace(/\.[0]+$/,'') serviceList.forEach(item => {
item.couponAnticipatedCost = (item.denomination / 100).toFixed(2).replace(/\.[0]+$/, '')
}) })
this.serviceList =serviceList this.serviceList = serviceList
}, },
deep: true, deep: true,
immediate: true immediate: true
......
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
watch: { watch: {
detail: { detail: {
handler(n) { handler(n) {
const serviceList = n.selectedGoodsList const serviceList = n.selectedGoodsList || []
serviceList.length > 0 && serviceList.length > 0 &&
serviceList.forEach(item => { serviceList.forEach(item => {
item.couponAnticipatedCost = (item.denomination / 100).toFixed(2).replace(/\.[0]+$/, '') item.couponAnticipatedCost = (item.denomination / 100).toFixed(2).replace(/\.[0]+$/, '')
......
<template> <template>
<div class="wrap" v-if="serviceList.length>0"> <div class="wrap" v-if="serviceList && serviceList.length > 0">
<div class="container-panel"> <div class="container-panel">
<img class="header-panel" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/model_8/rob.png" /> <img class="header-panel" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/model_8/rob.png" />
<div class="service-item" v-for="(item, index) in serviceList" :key="index"> <div class="service-item" v-for="(item, index) in serviceList" :key="index">
...@@ -16,20 +16,20 @@ ...@@ -16,20 +16,20 @@
export default { export default {
data() { data() {
return { return {
serviceList:[] serviceList: []
} }
}, },
props: { props: {
detail: { detail: {
type: Object, type: Object,
default:()=> {} default: () => {}
} }
}, },
watch: { watch: {
detail: { detail: {
handler(n) { handler(n) {
const serviceList = n.selectedCarList const serviceList = n.selectedCarList
this.serviceList =serviceList this.serviceList = serviceList
}, },
deep: true, deep: true,
immediate: true immediate: true
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
text-align: center; text-align: center;
font-size: 16px; font-size: 16px;
color: #fe455d; color: #fe455d;
width:63px; width: 63px;
span { span {
font-size: 12px; font-size: 12px;
......
<template> <template>
<div class="wrap" v-if="serviceList.length>0"> <div class="wrap" v-if="serviceList.length > 0">
<div class="container-panel"> <div class="container-panel">
<img class="header-panel" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/model_8/deliver.png" /> <img class="header-panel" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/model_8/deliver.png" />
<div class="service-item" v-for="(item, index) in serviceList" :key="index"> <div class="service-item" v-for="(item, index) in serviceList" :key="index">
...@@ -38,7 +38,7 @@ export default { ...@@ -38,7 +38,7 @@ export default {
watch: { watch: {
detail: { detail: {
handler(n) { handler(n) {
const serviceList = n.selectedGoodsList const serviceList = n.selectedGoodsList || []
serviceList.length > 0 && serviceList.length > 0 &&
serviceList.forEach(item => { serviceList.forEach(item => {
item.couponAnticipatedCost = (item.denomination / 100).toFixed(2).replace(/\.[0]+$/, '') item.couponAnticipatedCost = (item.denomination / 100).toFixed(2).replace(/\.[0]+$/, '')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!