Commit f838d605 by 前端

Merge branch 'v3.7.0' into 'master'

V3.7.0

See merge request !4
2 parents 49b6d5af a9bfe82b
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 16:38:54
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-03-14 14:08:40
* @LastEditTime: 2023-03-22 11:29:49
* @FilePath: \scrm-micro-link\src\api\modules\giftBag.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -35,5 +35,23 @@ const brandList = params => {
sign: true
})
}
const couponTemplate = params => {
params.method = 'scrm.api.coupon.template.page'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
const couponTemplateDetails = params => {
params.method = 'scrm.api.coupon.template.details.page'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getghDirectionalGiftListApi, getEquityListApi, brandList }
export default { getghDirectionalGiftListApi, getEquityListApi, brandList, couponTemplate, couponTemplateDetails }
......@@ -252,14 +252,24 @@ const subscribe = [
optionLabel: '定保招揽'
},
{
optionId: 4,
optionLabel: '家庭会员卡'
optionId: 5,
optionLabel: '续保招揽'
},
{
optionId: 6,
optionLabel: '节假日关怀'
},
{
optionId: 3,
optionLabel: '其他'
}
]
const giftPackage = [
{ id: 1, name: '换(焕新礼)' },
{ id: 2, name: '减(折扣礼)' },
{ id: 3, name: '送(券包礼)' },
{ id: 4, name: '约(膨胀礼)' }
]
function setMinHeight(calssName = '.edit-container') {
let height = document.querySelector('.header-wrap').clientHeight + 110 + 'px'
let minHeight = 'calc(100vh - ' + height + ')'
......@@ -281,4 +291,4 @@ function isShowBtn(value) {
}
return isShowStatus
}
export { isShowBtn, subscribe, limitPrice, getExplorer, exportFn, aToExport, downloadIamge, businessType, orderStatus, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, setMinHeight }
export { isShowBtn, subscribe, giftPackage, limitPrice, getExplorer, exportFn, aToExport, downloadIamge, businessType, orderStatus, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, setMinHeight }
......@@ -6,7 +6,11 @@
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '154px' : labelWidth" :class="[{ 'no-label': !item.label, isBlock: isBlock }, { textBox: item.type == 'textBox' }]" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span>
<el-popover placement="top" width="200" trigger="hover" :content="item.tips">
<el-popover placement="top" :width="item.tipsWidth || 200" trigger="hover">
<div>
{{ item.tips }}
<span class="tips-jump" v-if="item.jumpLabel" @click="item.handleJump">{{ item.jumpLabel }}</span>
</div>
<img slot="reference" class="tips-icon" src="./images/icon-tip.png" />
</el-popover>
:
......@@ -522,4 +526,8 @@ export default {
width: 62%;
/* background: #096; */
}
.tips-jump {
color: #5850ff;
cursor: pointer;
}
</style>
......@@ -3,8 +3,8 @@
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-03-02 17:28:20
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2023-03-24 14:35:10
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
......
......@@ -3,8 +3,8 @@
* @version: 1.0.0
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-03-10 18:08:50
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2023-03-24 17:46:01
* @FilePath: \scrm\scrm-sub-blog\src\main.js
*/
import Vue from 'vue'
......@@ -18,6 +18,7 @@ Vue.config.productionTip = false
Vue.prototype.$apis = apis
Vue.prototype.size = 'small'
Vue.prototype.defaultLabelWidth = '154px'
Vue.prototype.staticImgUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/'
try {
const loginpath = JSON.parse(sessionStorage.getItem('SCRM_BASE_SESSION'))?.loginpath
if (loginpath === '/oss') Vue.prototype.loginpath = true
......
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 09:23:57
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-12-23 15:17:06
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-03-23 16:54:09
* @FilePath: \scrm-micro-link\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -27,7 +27,7 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue.prototype.$common = common
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token:globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-23 11:06:49
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-12-01 10:06:04
* @LastEditTime: 2023-03-16 14:46:00
* @FilePath: \live\src\utils\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -56,3 +56,18 @@ export function GetDateDiff(time1, time2 = new Date()) {
let seconds = Math.round(leave3 / 1000)
return days + '天' + hours + '时' + minutes + '分' + seconds + '秒'
}
export function deepClone(obj) {
let result = typeof obj.splice === 'function' ? [] : {}
if (obj && typeof obj === 'object') {
for (let key in obj) {
if (obj[key] && typeof obj[key] === 'object') {
result[key] = deepClone(obj[key]) //如果对象的属性值为object的时候,递归调用deepClone,即在吧某个值对象复制一份到新的对象的对应值中。
} else {
result[key] = obj[key] //如果对象的属性值不为object的时候,直接复制参数对象的每一个键值到新的对象对应的键值对中。
}
}
return result
}
return obj
}
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-03-17 20:41:39
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-03-17 20:53:33
* @FilePath: \scrm-micro-link\src\views\activityLink\components\header-config.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="activity-guidance scrm-box-f">
<div class="activity-guidance-border" v-for="(item, index) in guidanceList" :key="item.content">
<div class="activity-guidance-item">
<div class="activity-guidance-item-head">
<img :src="require(`@/assets/seckillActivity/${item.img}.png`)" />
<div class="activity-guidance-item-title">{{ item.title }}</div>
</div>
<div class="activity-guidance-item-info">{{ item.content }}</div>
</div>
<div class="ai-arrow" v-if="index < 2">
<img src="@/assets/seckillActivity/arrow.png" />
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
guidanceList: [
{
img: 'play',
title: '选玩法',
content: '系统提供“换-减-送-约”四种核心营销链路,门店可根据业务需要按需选择。'
},
{
img: 'product',
title: '定产品',
content: '选择本次营销活动中要销售的门店服务或商品。平台所提供的多项权益服务可帮助门店打造差异化服务。'
},
{
img: 'fill',
title: '配物料',
content: '通过系统内置模版可快速构建美观充满氛围感的营销页面,店端也可根据需要自行上传物料进行个性化设置。'
}
]
}
}
}
</script>
<style lang="scss" scoped>
.activity-guidance {
background: #fff;
display: flex;
padding: 20px;
box-sizing: border-box;
margin: 16px 0px;
.activity-guidance-border {
display: flex;
align-items: center;
}
.activity-guidance-item {
flex: 1;
height: 112px;
background: linear-gradient(180deg, #f3f2f8 0%, #f9f9fc 100%);
padding: 16px 20px;
box-sizing: border-box;
&-head {
display: flex;
align-items: center;
margin-bottom: 8px;
img {
width: 22px;
height: 22px;
margin-right: 10px;
}
}
&-title {
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 22px;
}
&-info {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
}
.ai-arrow {
margin: 0 16px;
width: 20px;
height: 15px;
img {
width: 100%;
}
}
}
</style>
......@@ -224,6 +224,7 @@ export default {
getList(page, isResetPage = false, isMount = false) {
var params = {
...this.searchForm,
status: 2,
discountType: this.selectedGiftList[this.activeName].discountType,
merchantId: this.merchantId,
pageNum: isResetPage ? 1 : this.$refs[this.activeName + 'Ref'].page.pageNum,
......@@ -295,7 +296,7 @@ export default {
if (list && list.length) {
list.forEach(row => {
var idx = this.giftList.findIndex(k => k.id == row.id)
if (idx != -1 && row.status != '3') {
if (idx != -1) {
this.$refs[this.activeName + 'Ref'].$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.giftList[idx], true)
}
})
......@@ -322,7 +323,7 @@ export default {
this.$nextTick(() => {
deleteList.forEach(row => {
var idx = this.giftList.findIndex(k => k.id == row.id)
if (idx != -1 && row.status != '3') {
if (idx != -1) {
this.$refs[this.activeName + 'Ref'].$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.giftList[idx], false)
}
})
......@@ -366,15 +367,13 @@ export default {
couponName: item.couponName,
couponAmount: isSelected ? list.find(k => k.id == item.id).couponAmount : '1',
couponAnticipatedCost: item.couponAnticipatedCost,
status: '2',
status: item.status,
residueAmount: item.residueAmount
})
}
})
list.forEach(item => {
if (item.status == '3') {
this.selectedGiftList[this.activeName].list.push(item)
} else if (this.giftList.findIndex(k => k.id == item.id) == '-1' && this.selectedGiftList[this.activeName].list.findIndex(k => k.id == item.id) == '-1') {
if (this.giftList.findIndex(k => k.id == item.id) == '-1' && this.selectedGiftList[this.activeName].list.findIndex(k => k.id == item.id) == '-1') {
// 没有库存的券
this.selectedGiftList[this.activeName].list.push(item)
}
......
......@@ -47,18 +47,16 @@
<img class="muti-icon" :src="require(`@/assets/coupon/${item}.png`)" />
</div>
<div class="gift-content">
<template v-for="(subItem, subIndex) in selectedList[item].list">
<div class="gift-item" :key="subItem.id">
<img class="muti-icon" src="@/assets/muti-selected.png" @click="handleGoodsDelete(item, subIndex)" />
<el-tooltip effect="dark" placement="top" :disabled="couponString(subItem).length <= 8">
<p :class="['gift-coupon-name', 'ellipsis-1']">{{ couponString(subItem) > 8 ? couponString(subItem).slice(0, 8) + '...' : couponString(subItem) }}</p>
<div slot="content">{{ couponString(subItem) }}</div>
</el-tooltip>
<div class="gift-sum">
<el-input-number class="sum-input" v-model="subItem.couponAmount" :min="1" :max="9999" size="mini" label="描述文字"></el-input-number>
</div>
<div class="gift-item" :key="subItem.id" v-for="(subItem, subIndex) in selectedList[item].list">
<img class="muti-icon" src="@/assets/muti-selected.png" @click="handleGoodsDelete(item, subIndex)" />
<el-tooltip effect="dark" placement="top" :disabled="couponString(subItem).length <= 8">
<p :class="['gift-coupon-name', 'ellipsis-1']">{{ couponString(subItem) > 8 ? couponString(subItem).slice(0, 8) + '...' : couponString(subItem) }}</p>
<div slot="content">{{ couponString(subItem) }}</div>
</el-tooltip>
<div class="gift-sum">
<el-input-number class="sum-input" v-model="subItem.couponAmount" :min="1" :max="9999" size="mini" label="描述文字"></el-input-number>
</div>
</template>
</div>
</div>
</div>
</div>
......@@ -336,8 +334,10 @@ export default {
// },
// 选择/取消
handleSelectionTable(val) {
console.log(val)
const selectedList = this.initSelected ? this.initSelected[this.activeName].list : this.selectedList[this.activeName].list
var list = this.$common.utils.deepClone(selectedList)
// const val = this.getSelectionTable(list, valp)
var count = 0
var currentIdList = this.GoodsList.map(item => item.id)
val
......@@ -363,11 +363,11 @@ export default {
goodsName: item.goodsName,
denomination: item.denomination,
effectiveDays: item.effectiveDays,
rechargeDenomination: item.rechargeDenomination
rechargeDenomination: item.rechargeDenomination,
status: item.status
})
}
})
console.log(this.selectedList[this.activeName].list)
this.recoveryTotal()
},
handleGoodsConfirm() {
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-03-18 18:47:05
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2023-03-24 14:41:59
* @FilePath: \scrm-micro-link\src\views\activityLink\components\selectModel.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%A
-->
<template>
<div class="select-model">
<GLDialog title="选择模板" width="1080px" :visible.sync="dialogVisible" :before-close="handleClose" :close-on-click-modal="false" @onOk="handleConfirm" @onCancel="handleClose">
<div class="model-panel">
<div class="model-item" v-for="item in modelList" :key="item.value">
<img :src="item.imgUrl" alt="" />
<img src="@/assets/seckillActivity/check.png" v-if="modelValue == item.value" class="checked" />
<div class="model-title">{{ item.name }}</div>
</div>
</div>
</GLDialog>
</div>
</template>
<script>
export default {
name: 'selectModel',
data() {
return {
modelList: [
{
value: 1,
name: '节假日关怀',
imgUrl: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/activity-1.png'
},
{
value: 2,
name: '定保招揽',
imgUrl: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/activity-2.png'
},
{
value: 3,
name: '续保招揽',
imgUrl: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/activity-3.png'
}
]
}
},
props: {
dialogVisible: {
type: Boolean,
default: false
},
modelValue: {
type: Number,
default: 1
}
},
mounted() {
this.modelList = this.modelList.filter(k => k.value == this.modelValue)
},
methods: {
handleConfirm() {
this.$emit('handleRelateModelConfirm', this.modelValue)
},
handleClose() {
this.$emit('handleRelateModelClose')
}
}
}
</script>
<style lang="scss" scoped>
.model-panel {
display: flex;
.model-item {
position: relative;
margin-right: 24px;
img:not(.checked) {
width: 242px;
height: 492px;
}
.checked {
position: absolute;
top: 4px;
right: 4px;
}
.model-title {
font-size: 16px;
color: #1c2b38;
text-align: center;
font-weight: 700;
margin: 6px 0px;
}
}
}
</style>
......@@ -162,6 +162,14 @@ export default {
prop: 'orderCount'
},
{
label: '客户回店核销次数',
prop: 'checkNum'
},
{
label: '核销激励',
prop: 'checkReward'
},
{
label: '转化率',
prop: 'conversionRate',
formatter: cellValue => {
......
......@@ -90,15 +90,7 @@ export default {
maxlength: 20
},
{
label: '业务场景',
name: 'businessType',
type: 'select',
optionList: this.$common.utils.deepClone(businessType),
optionId: 'optionId',
optionLabel: 'optionLabel'
},
{
label: '所属订阅',
label: '场景选择',
name: 'subscribe',
type: 'select',
optionList: this.$common.utils.deepClone(subscribe),
......@@ -144,14 +136,7 @@ export default {
prop: 'merchantName'
},
{
label: '业务场景',
prop: 'businessType',
formatter: cellValue => {
return businessType.find(item => item.optionId == cellValue.businessType)?.optionLabel
}
},
{
label: '所属订阅',
label: '场景选择',
prop: 'subscribe',
formatter: cellValue => {
return subscribe.find(item => item.optionId == cellValue.subscribe)?.optionLabel
......@@ -192,7 +177,7 @@ export default {
type: 'text'
},
condition: row => {
return row.activityStatus == '1' && this.loginpath
return row.activityStatus == '1'
},
listeners: {
click: this.start
......@@ -205,7 +190,7 @@ export default {
type: 'text'
},
condition: row => {
return row.activityStatus == '2' && this.loginpath
return row.activityStatus == '2'
},
listeners: {
click: this.end
......@@ -217,9 +202,6 @@ export default {
attrs: {
type: 'text'
},
condition: row => {
return this.loginpath
},
listeners: {
click: row => {
this.handleEdit('edit', row)
......@@ -228,28 +210,13 @@ export default {
},
{
type: 'el-button',
name: '查看',
attrs: {
type: 'text'
},
condition: row => {
return !this.loginpath
},
listeners: {
click: row => {
this.handleEdit('detail', row)
}
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text',
fn: '删除'
},
condition: row => {
return row.activityStatus == '3' && this.loginpath
return row.activityStatus == '3'
},
listeners: {
click: this.del
......@@ -274,9 +241,6 @@ export default {
attrs: {
type: 'text'
},
condition: row => {
return this.loginpath
},
listeners: {
click: row => {
this.handleEdit('copy', row)
......@@ -301,7 +265,7 @@ export default {
},
created() {
if (!this.loginpath) {
const filterName = ['merchantName', 'subscribe', 'businessType']
const filterName = ['merchantName']
this.searchFormData = this.searchFormData.filter(item => !filterName.includes(item.name))
this.tableParams.tableColumns = this.tableParams.tableColumns.filter(item => !filterName.includes(item.prop))
}
......@@ -376,7 +340,7 @@ export default {
})
},
filterCouponList(list, isEquity = false) {
return list.filter(item => (isEquity ? item.discountType == 8 : item.discountType != 8))
return (list && list.filter(item => (isEquity ? item.discountType == 8 : item.discountType != 8))) || []
},
handleBoard(row) {
this.$router.push({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!