Commit e483aa90 by 杨明

fixed

1 parent f5dfa518
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-16 10:20:01
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-18 11:41:48
* @LastEditTime: 2023-05-18 14:44:16
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\ChatGPT.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -61,7 +61,7 @@ export default {
isError: false,
phrasesShow: false,
query: {},
contentHtml: '',
contentHtml: '我需要制定一套<span>续保</span>营销方案,活动时间为<span>5月份</span>。',
phrases: ['创建一个<span>端午节</span>的营销活动,活动时间为<span>6月份</span>', '我需要一个<span>立夏</span>的节日关怀营销活动', '建立一个<span>父亲节</span>的节日关怀活动'],
chatItem: [
{
......
......@@ -19,6 +19,14 @@
</span>
</div>
<glsx-combi-form class="edit-form-container" :isBlock="true" ref="editFormRef" formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="marketingTitle" class="input-slot">
<el-input placeholder="请输入营销主题" v-model="editForm.marketingTitle" style="width:400px" maxlength="12" show-word-limit></el-input>
<label>ChatGPT重新生成</label>
</div>
<div slot="marketingSubtitle" class="input-slot">
<el-input placeholder="请输入副主题" v-model="editForm.marketingSubtitle" style="width:400px" maxlength="20" show-word-limit></el-input>
<label>ChatGPT重新生成</label>
</div>
<template slot="activityTimeHtml">
<div class="activity-time-container" :style="{ 'margin-left': defaultLabelWidth }">
<el-date-picker v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy/MM/dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']" @change="e => handleTimeChange(e, scope.scope)"></el-date-picker>
......@@ -178,6 +186,7 @@ import selectGiftDialog from './selectGiftDialog'
import selectGoodsDialog from './selectGoodsDialog'
import selectEquityDialog from './selectEquityDialog'
import Drawing from '@/utils/drawing'
import { mapState, mapActions } from 'vuex'
export default {
data() {
return {
......@@ -206,12 +215,14 @@ export default {
{
label: '营销标题',
name: 'marketingTitle',
addHtml: 'marketingTitle',
type: 'input',
maxlength: 12
},
{
label: '营销副标题',
name: 'marketingSubtitle',
addHtml: 'marketingSubtitle',
type: 'input',
maxlength: 20
},
......@@ -377,6 +388,7 @@ export default {
}
},
computed: {
...mapState('marketing', ['activityInfo']),
mergeStr() {
const { backgroundImage, detailImage, merchantLog } = this.editForm
if (!backgroundImage || !detailImage || !merchantLog) return
......@@ -384,6 +396,9 @@ export default {
}
},
watch: {
activityInfo(val) {
val && this.confirmMsg()
},
mergeStr(val) {
if (val) {
this.getMergeImgs()
......@@ -398,6 +413,7 @@ export default {
selectEquityDialog
},
methods: {
...mapActions('marketing', ['setActivityInfo']),
//获取优惠券模板
couponTemplate() {
this.$apis.giftBag.couponTemplate({ pageSize: 10000, pageNum: 1 }).then(res => {
......@@ -671,27 +687,25 @@ export default {
},
getInfo() {
this.loading = true
this.reportFlag = '1'
const { id } = this.activityInfo
this.$apis.activity
.getActivityDetailApi({ id: this.routeInfo.id })
.findActivityInfo({ activityId: id })
.then(res => {
this.setActivityInfo()
var info = res
this.editForm = this.$common.utils.deepClone(res)
this.activityInfo = info
if (info.startTime) {
this.$set(this.editForm, 'activityTime', [info.startTime, info.endTime])
if (info.starttime) {
this.$set(this.editForm, 'activityTime', [info.starttime, info.endtime])
}
// this.routeInfo.addOrEdit == 'edit' && this.getGoodInfo(info.goodsId)
// if (info.activityPrice != null && info.goodsStock != null) {
// this.editForm.activityPrice = (info.activityPrice / 100).toFixed(2)
// this.editForm.goodsStock = info.goodsStock + ''
// }
if (info.crowdFundingPrice != null) {
this.editForm.crowdFundingPrice = (info.crowdFundingPrice / 100).toFixed(2)
}
// 地图
if (info.activityAddressProvinceName || info.activityAddressCityName) {
this.$refs.configEditFormRef.$refs.provinceForm[0].init(info.activityAddressProvinceName, info.activityAddressCityName)
this.$refs.editFormRef.$refs.provinceForm[0].init(info.activityAddressProvinceName, info.activityAddressCityName)
}
if (info.activityPrice) {
this.editForm.activityPrice = info.activityPrice / 100
......@@ -699,7 +713,6 @@ export default {
if (this.editForm.superMarketingCouponRelRequestList && this.editForm.superMarketingCouponRelRequestList.length) {
this.editForm.superMarketingCouponRelRequestList.forEach(item => {
item.id = item.couponId
item.anticipatedCost = item.couponAnticipatedCost
item.denomination = item.couponAnticipatedCost
})
this.selectedGoodsList = this.editForm.superMarketingCouponRelRequestList.filter(i => i.discountType == 8)
......@@ -724,7 +737,9 @@ export default {
.then(() => {
this.getInfo()
})
.catch(() => {})
.catch(() => {
this.setActivityInfo()
})
}
},
mounted() {
......@@ -781,6 +796,13 @@ export default {
}
.edit-form-container {
padding: 8px 50px;
.input-slot {
label {
color: #5850ff;
font-size: 14px;
margin-left: 10px;
}
}
}
.gift-panel {
.gift-block {
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:01
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2023-05-15 15:13:18
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-18 15:33:07
* @FilePath: \scrm-micro-home\src\views\home\components\marketing\MarketingLeft.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="left-wrap">
<div class="store-wrap">
<div class="mrglr text-16 scrm-c3 weight-6">D+安徽合肥凯越园区店</div>
<div class="merchantId scrm-c3 scrm-f14">商户号:1343234242242</div>
<div class="mrglr text-16 scrm-c3 weight-6">{{ merchantInfo.merchantName }}</div>
<div class="merchantId scrm-c3 scrm-f14">商户号:{{ merchantInfo.merchantId }}</div>
<el-button class="mrglr" icon="el-icon-plus" type="primary">新建</el-button>
</div>
<!-- 营销方案 -->
......@@ -19,10 +19,10 @@
<div class="scheme-list">
<template v-for="(item, index) in schemeList">
<div class="scheme-line scrm-c3 scrm-f14 flex" :class="{ select: item.hovering }" :key="index" @mouseenter="item.hovering = true" @mouseleave="item.hovering = false">
<div class="scheme-text one-line-ellipsis">{{ item.text }}</div>
<div class="scheme-text one-line-ellipsis">{{ item.activityName }}</div>
<div class="flex txt-blue" v-show="item.hovering">
<span>预览</span>
<span class="scrm-ml6">引用</span>
<span class="scrm-ml6" @click="setActivity(item)">引用</span>
</div>
</div>
</template>
......@@ -51,34 +51,14 @@
</template>
<script>
import GlsxCalendar from './components/GlsxCalendar'
import { mapActions } from 'vuex'
export default {
components: {
GlsxCalendar
},
data() {
return {
schemeList: [
{
text: '端午营销方案',
hovering: true
},
{
text: '定保招揽营销方案',
hovering: false
},
{
text: '续保招揽第三季度营销方案',
hovering: false
},
{
text: '定保招揽营销方案',
hovering: false
},
{
text: '续保招揽第三季度营销方案',
hovering: false
}
],
schemeList: [],
themeList: [
{
text: '5月定保营销种草',
......@@ -92,8 +72,34 @@ export default {
text: '店庆7周年',
hovering: false
}
]
],
merchantInfo: this.$globalState.session
}
},
methods: {
...mapActions('marketing', ['setActivityInfo']),
getSchemeList() {
const { merchantId } = this.merchantInfo
this.$apis.activity.listByPage({ merchantId: 44211227, pageSize: 5, currentPage: 1 }).then(res => {
const schemeList = res.list || []
this.schemeList = schemeList.map(item => {
return {
hovering: false,
activityName: item.activityName,
id: item.id,
subscribe: item.subscribe,
type: 'programme' //方案
}
})
})
},
//设置活动详情
setActivity(item) {
this.setActivityInfo(item)
}
},
mounted() {
this.getSchemeList()
}
}
</script>
......
......@@ -96,6 +96,7 @@ export default {
name: 'selectGiftDialog',
data() {
return {
size: 'small',
// 表格组件
activeName: 'service',
userInfo: {},
......@@ -403,6 +404,10 @@ export default {
}
</script>
<style lang="scss">
.muti-gift img {
width: auto;
height: auto;
}
.muti-gift .el-tabs__active-bar {
display: block;
}
......@@ -411,6 +416,16 @@ export default {
border-bottom: 1px solid #eeeeee;
}
.muti-gift .el-tabs__item {
width: 120px;
padding: 0 20px;
text-align: center;
font-weight: 400;
font-size: 16px;
color: #717171;
height: 36px !important;
line-height: 36px !important;
}
.muti-gift .el-tabs__item {
font-weight: 400;
font-size: 16px;
color: #717171;
......
......@@ -72,6 +72,7 @@ export default {
name: 'selectGoodsDialog',
data() {
return {
size: 'small',
// 表格组件
isMount: false,
activeName: 'card',
......@@ -407,6 +408,16 @@ export default {
.muti-gift .el-tabs__active-bar {
display: block;
}
.muti-gift .el-tabs__item {
width: 120px;
padding: 0 20px;
text-align: center;
font-weight: 400;
font-size: 16px;
color: #717171;
height: 36px !important;
line-height: 36px !important;
}
.muti-gift .el-tabs__nav-scroll {
display: block;
border-bottom: 1px solid #eeeeee;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!