Commit eb6a2b00 by 前端

Merge branch 'v3.8.0' into 'master'

V3.8.0

See merge request !6
2 parents e034093b dec37f06
......@@ -60,6 +60,16 @@ const getSharedListApi = params => {
sign: true
})
}
const getPurposeListApi = params => {
params.method = 'scrm.api.shopmall.gh.customer.purpose.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
// 分页浏览-导出
const exportBrowseApi = (params, TYPE = 1) => {
//TYPE 1 浏览 2 访客 3 分享
......@@ -239,6 +249,16 @@ const liveroomDetailexport = params => {
sign: true
})
}
const purposeExport = params => {
params.method = 'scrm.api.shopmall.gh.customer.purpose.page.export'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
/**活动直播间数据统计-分页详情 */
const liveroomDetailpage = params => {
params.method = 'scrm.api.shopmall.activity.liveroom.detailpage'
......@@ -259,4 +279,4 @@ const liveroomOverview = params => {
sign: true
})
}
export default { getPayMerchatListApi, getPayListApi, liveroomDetailexport, liveroomDetailpage, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi, getDailyOrderQuantityStatistics, exportDailyOrderQuantityStatistics }
export default { purposeExport, getPayMerchatListApi, getPayListApi, liveroomDetailexport, liveroomDetailpage, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi, getPurposeListApi, getDailyOrderQuantityStatistics, exportDailyOrderQuantityStatistics }
......@@ -106,7 +106,9 @@ const orderManageStatusList = [
// { confId: '8', confName: '已核销' },
{ confId: '9', confName: '售后中' },
{ confId: '10', confName: '售后完成' },
{ confId: '11', confName: '待审批' }
{ confId: '11', confName: '待审批' },
{ confId: '13', confName: '待发货' },
{ confId: '14', confName: '已收货' }
]
const afterSaleStatusList = [
{ confId: '1', confName: '待审核' },
......
......@@ -86,7 +86,7 @@
<slot :name="item.suffixSlot" :scope="item"></slot>
</template>
<!-- 图文编辑器 -->
<textBox v-else-if="item.type === 'textBox'" :ref="item.name + 'TextBox'" :excludeMenus="item.excludeMenus || ['code']" @change="e => handleTextBoxChange(e, item)" @focus="handleTextBoxFocus(item)" :boxHeight="item.boxHeight"></textBox>
<textBox v-else-if="item.type === 'textBox'" ref="textBox" :excludeMenus="item.excludeMenus || ['code']" @change="e => handleTextBoxChange(e, item)" @focus="handleTextBoxFocus(item)" :boxHeight="item.boxHeight"></textBox>
<!-- 地图 -->
<div v-else-if="item.type === 'map'" class="flex">
<Province ref="provinceForm" :subdistrict="subdistrict" :isDisabled="item.isDisabled" @selectProvince="e => handleSelectProvince(e, item)" @selectCity="e => handleSelectCity(e, item)" :provinceView="item.provinceView"></Province>
......@@ -272,7 +272,9 @@ export default {
},
// 禁用富文本
forbidEdit() {
this.$refs.textBox.forbidEdit()
setTimeout(() => {
this.$refs.textBox.forbidEdit()
}, 2000)
},
// 地图
handleSelectMap(targetItem) {
......
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2023-03-24 14:35:10
* @LastEditTime: 2023-04-10 18:18:28
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
......
......@@ -13,8 +13,8 @@
<template v-if="browseObj.type != 2">
浏览
</template>
<span>{{ browseCount || 0 }}</span>
{{ browseObj.type == 2 ? '位访客' : '次' }}
<span>{{ total || 0 }}</span>
{{ browseObj.desc ? browseObj.desc : browseObj.type == 2 ? '位访客' : '次' }}
</div>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport">导出</el-button>
</div>
......@@ -29,6 +29,16 @@
</template>
<span class="m-l-10">{{ scope.scope.customerName }}</span>
</div>
<div slot="customerWeChatName" class="flex-align" slot-scope="scope">
<template v-if="scope.scope.customerWeChatAvatar">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.customerWeChatAvatar" />
<img class="img-36 pointer" slot="reference" :src="scope.scope.customerWeChatAvatar" />
</el-popover>
</template>
<span class="m-l-10">{{ scope.scope.customerWeChatName }}</span>
</div>
<div slot="shareName" class="flex-align" slot-scope="scope">
<template v-if="scope.scope.shareAvatar">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
......@@ -61,6 +71,7 @@ export default {
name: 'browseList',
data() {
return {
total: 0,
size: 'small',
url: url,
footerLeft: '0',
......@@ -133,8 +144,7 @@ export default {
},
created() {
const { type } = this.browseObj
console.log(type)
const lastTableColumns = [
let lastTableColumns = [
{
label: '浏览时长',
prop: 'browserTime'
......@@ -159,51 +169,76 @@ export default {
{
1: 'getBrowseListApi',
2: 'getVisitorListApi',
3: 'getSharedListApi'
3: 'getPurposeListApi'
}[type]
]
this.$nextTick(() => {
this.handleSearch()
})
// // listName:
// //1 浏览 2 访客 3 分享
if (type != 2) {
this.searchFormData.push({
label: '订单状态',
name: 'isBuy',
type: 'select',
width: '215px',
optionList: [
switch (type) {
case 1:
this.searchFormData.push({
label: '订单状态',
name: 'isBuy',
type: 'select',
width: '215px',
optionList: [
{
confId: '',
confName: '全部'
},
{
confId: 'Y',
confName: '已付款'
},
{
confId: 'N',
confName: '未付款'
}
],
optionId: 'confId',
optionLabel: 'confName'
})
break
case 2:
lastTableColumns = [
{
label: '浏览次数',
prop: 'browseCount'
},
{
label: '最后浏览时间',
prop: 'lastBrowseDate',
width: '195px'
}
]
break
case 3:
this.tableParams.tableColumns[0].addHtml = 'customerWeChatName'
this.tableParams.tableColumns[1].prop = 'customerPhone'
lastTableColumns = [
{
label: '用户名',
prop: 'customerName'
},
{
confId: '',
confName: '全部'
label: '车牌',
prop: 'customerPlateNo'
},
{
confId: 'Y',
confName: '已付款'
label: '浏览次数',
prop: 'browseCount',
width: '100px'
},
{
confId: 'N',
confName: '未付款'
label: '最后浏览时间',
prop: 'lastBrowseDate',
width: '195px'
}
],
optionId: 'confId',
optionLabel: 'confName'
})
this.tableParams.tableColumns = [...this.tableParams.tableColumns, ...lastTableColumns]
} else
this.tableParams.tableColumns = [
...this.tableParams.tableColumns,
{
label: '浏览次数',
prop: 'browseCount'
},
{
label: '最后浏览时间',
prop: 'lastBrowseDate'
}
]
]
break
}
this.tableParams.tableColumns = [...this.tableParams.tableColumns, ...lastTableColumns]
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
......@@ -214,16 +249,22 @@ export default {
return new Promise(resolve => {
console.log(this.$parent)
this.searchForm.activityId = this.$route.query.activityId
if (this.browseObj.timeType) this.searchForm.recordDateStr = dayjs(this.statDate).format('YYYY-MM-DD')
if (this.browseObj.timeType) {
this.searchForm.recordDateStr = dayjs(this.statDate).format('YYYY-MM-DD')
}
this.searchForm.customerWeChatName = this.searchForm.customerName
this.searchForm.customerPhone = this.searchForm.mobile
resolve()
})
},
handleExport() {
var params = this.$common.utils.deepClone(this.searchForm)
let { type } = this.browseObj
let exportUrl = 'exportBrowseApi'
if (type == 3) exportUrl = 'purposeExport'
params.pageNum = 1
params.pageSize = 999999
this.$apis.seckillActivity.exportBrowseApi(params, type).then(res => {
this.$apis.seckillActivity[exportUrl](params, type).then(res => {
exportFn(res)
})
},
......@@ -235,6 +276,7 @@ export default {
setTableFinishFun() {
//接收到的数据为空
this.$refs.browserRef.data.length ? (this.$refs.browserRef.tableHeightValues = '') : this.$refs.browserRef.setTableHeightFun()
this.total = this.$refs.browserRef.total
},
handleSearch() {
this.$refs.browserRef.refreshTable()
......@@ -254,10 +296,10 @@ export default {
.table-popover-img {
width: 160px;
}
.edit-container {
.edit-share {
.table-title {
font-weight: 400;
font-size: 14px;
font-weight: 700;
color: #333333;
line-height: 20px;
display: flex;
......@@ -266,8 +308,6 @@ export default {
color: #5850ff;
}
}
}
.edit-share {
/deep/ {
.gl-operate {
margin-left: 50px;
......
......@@ -4,28 +4,26 @@
<p class="edit-title">数据看板</p>
<div class="p-20">
<GLCombiForm ref="dataRef" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch"></GLCombiForm>
<div class="data-view">
<template v-for="(item, index) in dataList">
<div :key="index" class="item">
<div class="name">
{{ item.name }}
<el-popover class="tips" placement="top" width="260" trigger="hover" :content="item.tips">
<img slot="reference" class="tips-icon" src="@/components/glsx-combi-form/images/icon-tip.png" />
</el-popover>
</div>
<div class="value">
{{ dataBoard[item.key] || 0 }}
<span :class="{ disabled: !(dataBoard[item.key] || 0) }" @click="getDetail(item, dataBoard[item.key])">详情</span>
</div>
<template v-if="item.half">
<div class="half">
日环比:
<div :class="['icon', { up: dataBoard[item.half] > 0 }, { down: dataBoard[item.half] < 0 }]"></div>
<span class="num">{{ Math.abs(dataBoard[item.half]).toFixed(2) || 0 }}%</span>
</div>
</template>
<div class="data-view" :style="{ 'max-width': dataList.length == 6 ? '854px' : '1145px' }">
<div v-for="(item, index) in dataList" :key="index" class="item">
<div class="name">
{{ item.name }}
<el-popover class="tips" placement="top" width="260" trigger="hover" :content="item.tips">
<img slot="reference" class="tips-icon" src="@/components/glsx-combi-form/images/icon-tip.png" />
</el-popover>
</div>
<div class="value">
{{ dataBoard[item.key] || 0 }}
<span :class="{ disabled: !(dataBoard[item.key] || 0) }" @click="getDetail(item, dataBoard[item.key])">详情</span>
</div>
</template>
<template v-if="item.half">
<div class="half">
日环比:
<div :class="['icon', { up: dataBoard[item.half] > 0 }, { down: dataBoard[item.half] < 0 }]"></div>
<span class="num">{{ Math.abs(dataBoard[item.half]).toFixed(2) || 0 }}%</span>
</div>
</template>
</div>
</div>
</div>
</div>
......@@ -65,6 +63,7 @@ const dataList = [
{ name: '新增浏览量', type: 1, timeType: 1, key: 'browseCount', tips: '统计时间内,新增页面被浏览的次数(一人多次访问计为多次)', half: 'browseRingRatio' },
{ name: '新增访客数', type: 2, timeType: 1, key: 'fansCount', tips: '统计时间内访问页面的人数(一人多次访问计为一次)', half: 'fansRingRatio' },
{ name: '新增订单数', type: 1, timeType: 1, key: 'orderCount', tips: '统计时间内,新增订单数(只记录已付款的订单)', half: 'orderRingRatio' },
{ name: '意向客户数', type: 3, desc: '位意向客户', key: 'totalPurposeCustomerCount', tips: '意向客户数(只记录提交意向的客户)' },
{ name: '累计浏览量', type: 1, key: 'totalBrowseCount', tips: '页面被浏览的总次数(一人多次访问计为多次)' },
{ name: '累计访客数', type: 2, key: 'totalFansCount', tips: '访问页面的总人数(一人多次访问计为一次)' },
{ name: '累计订单数', type: 2, key: 'totalOrderCount', tips: '累计订单总数(只记录已付款的订单)' }
......
......@@ -35,7 +35,7 @@
<div class="container edit-container" style="min-height: 520px !important" v-show="step == 2">
<p class="edit-title" id="product">定产品</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="projuctEditFormData" :formRules="editRule">
<div slot="selectGiftBtn">
<div slot="selectGiftBtn" v-if="!isDisabledGH">
<el-button type="default" class="el-icon-plus" @click="handleGiftAdd">选择服务</el-button>
<el-popover placement="top-start" width="500" trigger="hover">
<img src="@/assets/coupon/coupon-view.png" alt="" />
......@@ -75,11 +75,11 @@
<div slot="selectGoodsBtn">
<div class="play-panel">
<div class="card-panel">
<el-tabs type="card" v-model="editForm.couponTemplateId" @tab-click="changeCouponTemplate">
<el-tabs type="card" v-model="editForm.couponTemplateId" @tab-click="changeCouponTemplate" v-if="!isDisabledGH">
<el-tab-pane :label="item.name" :name="item.id" v-for="item in couponTemplateList" :key="item.id"></el-tab-pane>
</el-tabs>
<div class="chose-panel" v-loading="goodsLoading">
<el-button type="default" class="el-icon-plus select-btn" @click="handleGoodsAdd">选择福利券</el-button>
<el-button type="default" v-if="!isDisabledGH" class="el-icon-plus select-btn" @click="handleGoodsAdd">选择福利券</el-button>
<div style="width: 852px" v-if="selectedGoodsList && selectedGoodsList.length">
<div class="goods-panel">
<el-table :data="selectedGoodsList" border style="width: 100%">
......@@ -449,6 +449,7 @@ export default {
}
return {
step: 1,
isDisabledGH: false,
activityModelImg: '',
size: 'small',
editChildRef: 'editChildRef',
......@@ -517,6 +518,7 @@ export default {
nameToValSpecsList: [],
activityInfo: {},
editForm: {
activityPrice: 0,
goodsList: null,
pageStyle: null,
merchantId: null,
......@@ -533,7 +535,7 @@ export default {
limitPurchaseFlag: 1,
limitPurchaseNumber: '',
subscribe: 1,
ghExclusiveFlag: 1,
// 活动配置
customerServiceFlag: 3,
customerServiceName: '',
......@@ -625,6 +627,7 @@ export default {
goodsStock: [{ required: true, message: '请输入库存', trigger: 'blur' }],
couponList: [{ required: true, message: '请选择优惠券', trigger: 'change' }],
subscribe: [{ required: true, message: '请选择关联产品类目项', trigger: ['change', 'blur'] }],
ghExclusiveFlag: [{ required: true, message: '请选择广汇专属', trigger: 'change' }],
limitPurchaseFlag: [{ required: true, message: '请选择是否限购', trigger: 'change' }],
limitPurchaseNumber: [
{ required: false, message: '请输入限购次数', trigger: 'blur' },
......@@ -724,6 +727,24 @@ export default {
label: '营销玩法',
name: 'play',
addHtml: 'play'
},
{
label: '广汇专属',
name: 'ghExclusiveFlag',
type: 'radio',
isHide: !this.loginpath,
optionList: [
{
optionId: 2,
optionLabel: '广汇续保权益套餐(仅限广汇门店选中)'
},
{
optionId: 1,
optionLabel: '非广汇续保权益套餐'
}
],
optionId: 'optionId',
optionLabel: 'optionLabel'
}
],
projuctEditFormData: [
......@@ -1225,6 +1246,22 @@ export default {
// },
// deep: true
// },
'editForm.ghExclusiveFlag'(val) {
const formObj = ['projuctEditFormData']
const hideValue = ['couponList', 'goodsList', 'activityPrice', 'goodsStock'] //'couponListBlock'
let hideStatus = false
if (val == 2) {
hideStatus = true
this.editForm.couponList =[]
this.selectedGoodsList = []
} else {
hideStatus = false
}
formObj.forEach(attr => {
this.setNameHide(attr, hideValue, hideStatus)
})
},
'editForm.merchantId'() {
if (this.loading) {
return
......@@ -1395,9 +1432,11 @@ export default {
this.recoveryTotalPrice()
this.recoveryGiftList()
},
setNameHide(name) {
var idx = this.projuctEditFormData.findIndex(item => item.name == name)
this.projuctEditFormData[idx].isHide = !this.selectedGoodsList.length
setNameHide(formName, name, status) {
name.forEach(i => {
var idx = this[formName].findIndex(item => item.name == i)
this[formName][idx].isHide = status
})
},
handleGoodsConfirm(selectedData) {
this.$refs.editFormRef.$refs[this.editChildRef].clearValidate('goodsList')
......@@ -1560,7 +1599,7 @@ export default {
this.editForm.activityBigImg = `${this.staticImgUrl}model-main-${val}.png`
const html = `<p><img src="${this.staticImgUrl}model-detail-${val}.png" style="max-width:100%;" contenteditable="false"/></p>`
this.editForm.activityDetail = html
this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].setEdit(html)
this.$refs.configEditFormRef.$refs.textBox[0].setEdit(html)
},
// 选择门店
handleRelateStoreClose() {
......@@ -1819,7 +1858,7 @@ export default {
// 活动详情
if (info.activityDetail) {
this.editForm.activityDetail = decodeURIComponent(info.activityDetail)
this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].setEdit(this.editForm.activityDetail)
this.$refs.configEditFormRef.$refs.textBox[0].setEdit(this.editForm.activityDetail)
}
if (info.activityPrice) {
this.editForm.activityPrice = info.activityPrice / 100
......@@ -1839,15 +1878,20 @@ export default {
this.handleMusicChange(this.musicList.length - 1)
}
}
this.editForm.couponList.forEach(item => {
item.id = item.couponId
item.anticipatedCost = item.couponAnticipatedCost
item.denomination = item.couponAnticipatedCost
})
this.selectedGoodsList = this.editForm.couponList.filter(i => i.discountType == 8)
this.editForm.couponList = this.editForm.couponList.filter(i => i.discountType != 8)
this.recoveryCoupon()
this.recoveryTotalPrice()
if (this.editForm.couponList && this.editForm.couponList.length) {
this.editForm.couponList.forEach(item => {
item.id = item.couponId
item.anticipatedCost = item.couponAnticipatedCost
item.denomination = item.couponAnticipatedCost
})
this.selectedGoodsList = this.editForm.couponList.filter(i => i.discountType == 8)
this.editForm.couponList = this.editForm.couponList.filter(i => i.discountType != 8)
this.recoveryCoupon()
this.recoveryTotalPrice()
} else {
this.editForm.couponList = []
}
// 表单设置
this.editForm.formDescribeCheck = []
this.editForm.selectCarNumberFlag = this.editForm.selectCarNumberFlag || 1
......@@ -2111,7 +2155,7 @@ export default {
return list
},
handlePrev() {
this.step--
this.editForm.ghExclusiveFlag == 2 ? (this.step -= 2) : this.step--
},
//验证表单
validManyForm(formName) {
......@@ -2133,7 +2177,7 @@ export default {
if (this.step == 1) {
if (this.editForm.playingType == 1 || this.editForm.playingType == 4) return this.$message.error('请选择正确的营销玩法')
Promise.all([this.validManyForm('markingEditFormRef'), this.validManyForm('palyEditFormRef')]).then(res => {
this.step++
this.editForm.ghExclusiveFlag == 2 ? (this.step += 2) : this.step++
})
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!