Commit 454c684d by 杨明

fixed

1 parent 67918186
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 09:23:56
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-05 10:23:20
* @LastEditTime: 2023-08-08 14:50:15
* @FilePath: \scrm-micro-link\src\api\modules\activity.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -99,6 +99,16 @@ const pageAllApi = params => {
sign: true
})
}
// 列表-导出
const activityExport = params => {
params.method = 'scrm.api.shopmall.all.bulge.activity.export'
return http({
url: 'http://192.168.1.163:8558/rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
const pageApi = params => {
params.method = `scrm.api.shopmall.bulge.activity.page`
return http({
......@@ -149,5 +159,6 @@ export default {
pageAllApi,
updateApi,
getShared,
activityPage
activityPage,
activityExport
}
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-29 16:16:03
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-28 17:47:10
* @LastEditTime: 2023-08-10 16:14:32
* @FilePath: \scrm-micro-link\src\api\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -152,6 +152,46 @@ const importModel = params => {
sign: true
})
}
const getSmsTemplate = params => {
params.method = `marketing.api.supermarket.bulge.getSmsTemplate`
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
const findMarketingTask = params => {
params.method = `marketing.api.supermarket.findMarketingTask`
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//创建/修改自定义套餐
const packageGetCode = params => {
params.method = `scrm.api.equity.service.package.customize.code.get`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//获取服务项目列表
const servicePage = params => {
params.method = `scrm.api.equity.service.items.pages`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
viewData,
......@@ -168,5 +208,9 @@ export default {
registerSso,
EntWechatQrCode,
findMerchantDetailByMerchantNo,
importModel
importModel,
getSmsTemplate,
findMarketingTask,
servicePage,
packageGetCode
}

5.96 KB | W: | H:

2.77 KB | W: | H:

src/assets/marketing/scence-bg.png
src/assets/marketing/scence-bg.png
src/assets/marketing/scence-bg.png
src/assets/marketing/scence-bg.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -29,7 +29,10 @@ export default {
{
label: '名称',
prop: 'packageName',
width: 300
width: 300,
formatter: cellValue => {
return cellValue.packageName || cellValue.serviceName
}
},
{
label: '价格',
......
......@@ -3,7 +3,7 @@
<glsx-combi-form class="edit-form-container" :isBlock="true" ref="editFormRef" formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="selectGiftBtn">
<el-radio label="" v-model="giftValue" v-if="!isGhPackage">自定义礼包</el-radio>
<el-radio label="" v-model="giftValue" v-else>自定义续保套餐</el-radio>
<el-radio label="" v-model="giftValue" v-else @change="getModel">自定义续保套餐</el-radio>
<div class="gift-container">
<el-radio-group v-model="giftValue" @change="getModel">
<el-radio :label="item.id" v-for="item in giftList" :key="item.id">{{ item.name }}(成本:{{ item.totalEquityPrice || 0 }})</el-radio>
......@@ -209,7 +209,7 @@ export default {
}
setTimeout(() => {
if (this.routerInfo.addOrEdit == 'edit') {
this.handleSaveGift()
this.handleSaveGift(false)
}
}, 0)
......@@ -241,7 +241,7 @@ export default {
this.$refs['serviceRef' + this.serviceIndex][0].$refs['listMutiTable'].clearSelection()
},
validGh() {
if (this.activityInfo.ghExclusiveFlag != 2) return
if (this.activityInfo.ghExclusiveFlag != 2 && this.routerInfo.addOrEdit != 'edit') return
this.isGhPackage = true
// const carList = this.carList.map(item => item.packageCode)
// const serviceList = this.serviceList.map(item => item.id)
......@@ -267,7 +267,7 @@ export default {
this.totalPrice = this.totalPrice + parseFloat(this.selectedCarList[i].packageAmount || 0)
}
},
handleSaveGift() {
async handleSaveGift(status = true) {
if (!this.editForm.activityPrice) {
this.$message.error('输入活动价格')
return
......@@ -277,13 +277,27 @@ export default {
this.$message.error('权益服务、平台优惠、门店优惠券至少选一项')
return
}
if (this.isGhPackage && selectedCarList.length == 0) {
this.$message.error('请选择1~2项用车权益')
return
}
if (this.isGhPackage && selectedCarList.length > 2) {
this.$message.error('最多只能选择2项用车权益')
return
let equityCode
if (this.isGhPackage && !this.giftValue) {
if (selectedCarList.length == 0) {
this.$message.error('请选择1~2项用车权益')
return
}
if (selectedCarList.length > 2) {
this.$message.error('最多只能选择2项用车权益')
return
}
const serviceItemsList = selectedCarList.map(item => {
return {
serviceCode: item.serviceCode,
servicePeriod: item.packageAmount
}
})
equityCode = await this.$apis.marketing.packageGetCode({
merchantId: this.merchantId,
createdBy: this.merchantId,
serviceItemsList
})
}
this.totalPrice = 0
for (let i = 0; i < selectedCarList.length; i++) {
......@@ -304,6 +318,7 @@ export default {
packageAmount: i.packageAmount
}
})
console.log(this.selectedCarList, 'selectedCarList')
const params = {}
params.serviceMerchantPackageConfigDTOS = serviceMerchantPackageConfigDTOS
const equityServices = selectedCarList.map(i => i.packageCode)
......@@ -311,8 +326,14 @@ export default {
params.activityPrice = (this.editForm.activityPrice * 100).toFixed(0)
params.superMarketingCouponRelRequestList = selectedGoodsList || []
params.giftId = this.giftValue
if (this.giftValue) {
this.handleSave()
if ((status && this.giftValue) || (!this.giftValue && this.isGhPackage)) {
this.handleSave(equityCode)
params.serviceMerchantPackageConfigDTOS = [
{
packageCode: equityCode,
packageAmount: this.totalPrice
}
]
}
this.SET_STEP(3)
this.setProcess({
......@@ -321,22 +342,23 @@ export default {
}
})
},
handleSave() {
if (this.giftValue) {
handleSave(equityCode) {
if (this.giftValue || (!this.giftValue && this.isGhPackage)) {
const giftList = this.giftList.find(item => this.giftValue == item.id)
this.handleConfirm(giftList)
this.handleConfirm(giftList, equityCode)
} else {
this.giftVisible = true
this.giftName = ''
}
},
handleConfirm(res) {
handleConfirm(res, equityCode) {
const { merchantId, selectedServiceList, selectedGoodsList, subscribe, giftName } = this
const selectedCarList = this.selectedCarList.filter(item => item.packageAmount)
const couponIds = [...selectedServiceList, ...selectedGoodsList].map(item => {
return item.id
})
const equities = {}
const equities = {},
serviceItem = {}
this.totalPrice = 0
console.log(selectedCarList.length + selectedServiceList.length + selectedGoodsList.length)
if (selectedCarList.length + selectedServiceList.length + selectedGoodsList.length == 0) {
......@@ -345,7 +367,8 @@ export default {
}
for (let i = 0; i < selectedCarList.length; i++) {
this.totalPrice = this.totalPrice + parseFloat(selectedCarList[i].packageAmount)
equities[selectedCarList[i].packageCode] = selectedCarList[i].packageAmount
if (selectedCarList[i].serviceCode) serviceItem[selectedCarList[i].serviceCode] = selectedCarList[i].packageAmount
else equities[selectedCarList[i].packageCode] = selectedCarList[i].packageAmount
}
let params = {
merchantId,
......@@ -353,12 +376,17 @@ export default {
name: giftName,
totalEquityPrice: this.totalPrice,
couponIds: JSON.stringify(couponIds),
serviceItem: JSON.stringify(serviceItem),
equities: JSON.stringify(equities)
}
if (res && res.id) {
params.id = res.id
params.name = res.name
}
if (equityCode) {
params.name = '自定义套餐'
params.equities = JSON.stringify({ [equityCode]: this.totalPrice })
}
this.$apis.giftBag.packageAdd(params).then(res => {
if (res) {
this.giftVisible = false
......@@ -607,9 +635,27 @@ export default {
this.loading = false
})
},
getCarMoreList() {
var params = {
serviceStatus: 1,
pageNum: 1,
pageSize: 10000
}
this.loading = true
this.$apis.marketing.servicePage(params).then(res => {
this.loading = false
this.selectedCarList = []
this.$refs['carRef'].$refs['listMutiTable'].clearSelection()
this.carList = res.list || []
this.carList.forEach(item => {
item.packageCode = item.serviceCode
})
})
},
//获取礼包详情
getModel() {
if (!this.giftValue) {
this.getCarMoreList()
return
}
this.$apis.giftBag.packageDetail({ id: this.giftValue }).then(res => {
......@@ -624,8 +670,11 @@ export default {
})
this.selectedGoodsList = activityCoupon.filter(i => i.discountType == 8)
this.selectedServiceList = activityCoupon.filter(i => i.discountType != 8)
console.log(this.selectedGoodsList, this.selectedServiceList)
this.getList()
if (res.name == '自定义套餐') {
this.getCarMoreList()
} else {
this.getList()
}
})
})
},
......@@ -664,6 +713,9 @@ export default {
.acitity-content {
#giftList {
display: flex !important;
.el-form-item__content {
flex: 1;
}
}
.el-radio {
margin-bottom: 6px;
......
......@@ -148,11 +148,11 @@ export default {
configVisible: false,
config: {
talkId: '',
messageContent: this.$messageModel
messageContent: ''
},
configForm: {
talkId: '',
messageContent: this.$messageModel
messageContent: ''
},
importModelUrl: {},
tableData: [],
......@@ -162,6 +162,7 @@ export default {
mounted() {
this.findMerchantStaffList()
this.importModel()
this.getSmsTemplate()
},
watch: {
process: {
......@@ -174,10 +175,18 @@ export default {
},
deep: true,
immediate: true
},
activityInfo: {
handler(val) {
const info = this.$common.utils.deepClone(val)
if (this.routerInfo.addOrEdit == 'edit') {
this.findMarketingTask(info.id)
}
}
}
},
computed: {
...mapState('marketing', ['subscribe', 'process']),
...mapState('marketing', ['subscribe', 'process', 'activityInfo']),
importUrl() {
const url = {
5: 'importModelXB',
......@@ -190,10 +199,24 @@ export default {
methods: {
...mapActions('marketing', ['setProcess']),
...mapMutations('marketing', ['SET_STEP']),
//获取短信模板
getSmsTemplate() {
this.$apis.marketing.getSmsTemplate({ merchantId: this.$globalState.session.merchantId, type: 1 }).then(res => {
const msg = res[0].content
this.config.messageContent = msg
this.config.configForm = msg
})
},
//获取任务详情
findMarketingTask(activityId) {
this.$apis.marketing.findMarketingTask({ activityId }).then(res => {
const { staffList = [], customerNum = 0, assignType = 1 } = res
this.taskList = [{ ...taskData, isFinish: true, staffList, customerNumTotal: customerNum, assignType }]
})
},
//获取客户导入模板
importModel() {
this.$apis.marketing.importModel({}).then(res => {
console.log(res)
this.importModelUrl = res
})
},
......
......@@ -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-20 17:47:39
* @LastEditTime: 2023-08-09 15:34:15
* @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
-->
......@@ -223,7 +223,7 @@
<div class="review-equity" v-if="detailCoupon.selectedCarList && detailCoupon.selectedCarList.length">
<div class="service-item" v-for="(item, index) in detailCoupon.selectedCarList" :key="index">
<div class="service-time">{{ item.packageAmount }}</div>
<div class="service-title">{{ item.packageName }}</div>
<div class="service-title">{{ item.packageName || item.serviceName }}</div>
</div>
</div>
<div class="review-goods" v-if="detailCoupon.selectedGoodsList && detailCoupon.selectedGoodsList.length">
......
......@@ -216,8 +216,8 @@ export default {
padding-bottom: 80%;
background-image: url('../../../assets/marketing/scence-bg.png');
background-size: 100% 100%;
padding-left: 12%;
padding-right: 12%;
padding-left: 1.2vw;
padding-right: 1.2vw;
font-size: 1vw;
.scene-item-icon {
text-align: center;
......
......@@ -4,7 +4,7 @@
<img class="angle" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/rob.png?v=1.0.2" />
<div class="title">用车权益</div>
<div class="service-item" v-for="(item, index) in serviceList" :key="index">
<div class="service-title">{{ item.packageName }}</div>
<div class="service-title">{{ item.packageName || item.serviceName }}</div>
<div class="service-time">
{{ item.packageAmount }}
<span>元</span>
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-07-08 09:40:43
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-14 16:06:09
* @LastEditTime: 2023-08-09 15:26:08
* @FilePath: \scrm-micro-link\src\views\activityLink\components\model\model_2\equity\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -11,7 +11,7 @@
<div class="container-panel">
<img class="header-panel" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/model_4/rob.png" />
<div class="service-item" v-for="(item, index) in serviceList" :key="index">
<div class="service-title">{{ item.packageName }}</div>
<div class="service-title">{{ item.packageName || item.serviceName }}</div>
<div class="service-time">
{{ item.packageAmount }}
<span>元</span>
......
......@@ -11,7 +11,7 @@
1
<span>元</span>
</div>
<div class="service-title">{{ item.packageName }}</div>
<div class="service-title">{{ item.packageName || item.serviceName }}</div>
</div>
</div>
</div>
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-07-08 09:40:45
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-09 15:26:22
* @FilePath: \scrm-micro-link\src\views\activityLink\components\model\model_4\equity\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="wrap" v-if="serviceList && serviceList.length > 0">
<div class="container-panel">
......@@ -7,7 +15,7 @@
1
<sapn>元</sapn>
</div>
<div class="service-title">{{ item.packageName }}</div>
<div class="service-title">{{ item.packageName || item.serviceName }}</div>
</div>
</div>
</div>
......@@ -54,7 +62,7 @@ export default {
left: 50%;
transform: translateX(-50%);
width: 160px;
height: 36px;
height: 36px;
}
.service-item {
......
......@@ -2121,7 +2121,7 @@ export default {
})
param.couponCreateRequests = couponLists.concat(selectedGoodsList) || []
const equityServices = this.selectedEquityList.map(i => i.packageCode)
if(!param.serviceMerchantPackageConfigDTOS) {
if (!param.serviceMerchantPackageConfigDTOS) {
delete param.serviceMerchantPackageConfigDTOS
}
param.equityServices = equityServices.join(',')
......
......@@ -7,7 +7,10 @@
<!-- 表格区域 开始 -->
<div class="live-table-header">
<h2>活动列表</h2>
<el-button :size="size" type="primary" @click="handleEdit('add')" v-if="loginpath">创建活动链接</el-button>
<div>
<el-button :size="size" type="primary" @click="activityExport" v-if="!loginpath">导出</el-button>
<el-button :size="size" type="primary" @click="handleEdit('add')" v-if="loginpath">创建活动链接</el-button>
</div>
</div>
<GLTable ref="classifyRef" :getListApi="getListApi" :hasNum="false" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="sub-tabel" slot="giftInfo" slot-scope="scope">
......@@ -65,7 +68,7 @@
</div>
</template>
<script>
import { orderStatus, businessType, subscribe, downloadIamge } from '@/common/constant'
import { orderStatus, subscribe, downloadIamge, exportFn } from '@/common/constant'
import { cloneText } from '@/utils/index'
import url from '@/assets/empty.png'
export default {
......@@ -322,6 +325,12 @@ export default {
})
},
methods: {
activityExport() {
const params = this.getParams()
this.$apis.activity.activityExport(params).then(res => {
exportFn(res)
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-26 13:38:34
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-04 16:40:50
* @LastEditTime: 2023-08-10 15:30:46
* @FilePath: \scrm-micro-link\src\views\activityLink\marketingActivity.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -18,7 +18,7 @@
</div>
<div class="full-wrap" v-if="isGuide">
<div :class="['full-wrap-body', `background-${step}`]">
<img class="full-body-bg" :src="`https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/guide-${step}.png?v=1.0`" />
<img class="full-body-bg" :src="`https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/guide-${step}.png?v=1.1`" />
<div class="full-footer">
<el-checkbox v-model="checked" class="select-tips">下次不在弹出引导提示</el-checkbox>
<div class="operate-tip">
......@@ -46,14 +46,18 @@ export default {
},
data() {
return {
isGuide: true,
step: 1
step: 1,
isGuide: false,
checked: false
}
},
methods: {
...mapMutations('marketing', ['SET_STATUS']),
...mapActions('marketing', ['getMerchantInfo']),
closeGuide() {
if (this.checked) {
localStorage.setItem('GUIDE_STATUS', true)
}
this.isGuide = false
},
addGuide() {
......@@ -61,6 +65,7 @@ export default {
}
},
mounted() {
this.isGuide = this.$route.query.addOrEdit != 'edit' && !localStorage.getItem('GUIDE_STATUS')
this.getMerchantInfo({ merchantId: this.$globalState.session.merchantId })
this.SET_STATUS(this.$route.query.addOrEdit)
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!