Commit 9ac97f6d by 前端

Merge branch 'v2.3.0' into 'v2.4.0'

V2.3.0

See merge request !156
2 parents 1a641c51 6b756417
import { http, http_common } from '@/main'
import { http, http_common, http2 } from '@/main'
const defaultPath = 'scrm.api.carlife.'
const getMerchantGoodsListApi = params => {
......@@ -94,4 +94,38 @@ const pictureUpload = params => {
noSignAttr: ['file']
})
}
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload }
const querylabeltree = params => {
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
// params.sessionId = session
return http2({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
// 人群列表
const getCrowdTreeListApi = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http2({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
// 跟进员工类型
const getStaffTypeListApi = params => {
params.method = 'entmicro.api.staff.listEntBusinessType'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload, querylabeltree, getCrowdTreeListApi, getStaffTypeListApi }
......@@ -4,7 +4,6 @@ const defaultPath = 'scrm.api.coupon.'
//优惠券列表
const getCouponListApi = params => {
// params.method = `${defaultPath}list.merchant`
params.method = 'scrm.backstage.coupon.list.merchant'
return http({
url: 'rop-scrm-coupon/router',
......
......@@ -77,6 +77,16 @@ const exportGiftInfoApi = params => {
// 编辑-选择定向礼包列表
const getDirectionalGiftListApi = params => {
params.method = 'scrm.api.coupon.directional.gift.coupon.list'
// params.method = 'scrm.api.coupon.gh.group.equity.coupon.list'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
const getghDirectionalGiftListApi = params => {
// params.method = 'scrm.api.coupon.directional.gift.coupon.list'
params.method = 'scrm.api.coupon.gh.group.equity.coupon.list'
return http({
......@@ -85,7 +95,7 @@ const getDirectionalGiftListApi = params => {
data: params,
sign: true
})
}
}
const insertGiftApi = params => {
params.method = 'scrm.api.coupon.directional.gift.create'
......@@ -109,4 +119,4 @@ const templateModal = params => {
})
}
export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi, getReceivedGiftInfoApi, exportGiftInfoApi, getDirectionalGiftListApi, insertGiftApi, templateModal }
export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi, getReceivedGiftInfoApi, exportGiftInfoApi, getDirectionalGiftListApi, insertGiftApi, templateModal ,getghDirectionalGiftListApi }
......@@ -40,7 +40,8 @@ const orderRefund = params => {
url: '/rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
sign: true,
returnAll: true
})
}
//套餐使用详情
......
......@@ -15,7 +15,17 @@ const getCustomerListApi = params => {
// 标签获取客户列表
const getCustomerByTagListApi = params => {
params.method = 'entmicro.api.customer.getCustomerPageByTag'
params.source = 'scrm-home'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 人群获取客户列表
const getCustomerCrowdApi = params => {
params.method = 'entmicro.api.customer.crowd.page'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
......@@ -78,6 +88,17 @@ const getSopStaffTaskListApi = params => {
})
}
// sop-完成率-根据evnetid获取失败事件列表
const getFailEventList = params => {
params.method = 'scrm.api.sop.sopEvent.listEventFailByEventId'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// 校验当前商户的企微群发任务情况
const getTaskStatusApi = params => {
params.method = 'scrm.api.sop.task.merchantWWMsgTaskStatusCheck'
......@@ -204,4 +225,4 @@ const getMomentListApi = params => {
})
}
export default { getCustomerListApi, getCustomerByTagListApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, getTaskStatusApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi, getGroupListApi, getMaterialListApi, getMomentListApi }
export default { getCustomerListApi, getCustomerByTagListApi, getCustomerCrowdApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, getFailEventList, getTaskStatusApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi, getGroupListApi, getMaterialListApi, getMomentListApi }
......@@ -523,6 +523,14 @@ html {
border-radius: 4px 0px 0px 0px;
border: 1px solid #f4f6fc !important;
}
.marketing .tips-icon {
display: inline-block;
width: 14px;
height: 14px;
margin-right: 12px;
vertical-align: middle;
cursor: pointer;
}
.el-message--info {
height: 40px;
......
......@@ -6,12 +6,11 @@
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '144px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :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-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
<span class="tips-icon"></span>
</el-tooltip>
{{ item.label }}
<el-popover placement="top" width="200" trigger="hover" :content="item.tips">
<img slot="reference" class="tips-icon" src="./images/icon-tip.png" />
</el-popover>
</span>
<span v-else-if="!item.isHide && item.label" slot="label">
<span v-else-if="!item.isHide && item.label && !item.tips" slot="label">
<span class="combi-form-label" :style="{ width: item.labelWidth ? item.labelWidth + labelPaddingRight + 'px' : '', 'padding-right': isEdit ? '12px' : labelPaddingRight + 'px' }">{{ item.label }}</span>
</span>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
......@@ -54,9 +53,12 @@
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
<!-- radio -->
<el-radio-group v-else-if="item.type === 'radio'" v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :disabled="item.isDisabled" @change="item.handleRadioChange">
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group>
<div v-else-if="item.type === 'radio'">
<el-radio-group v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :disabled="item.isDisabled" @change="item.handleRadioChange">
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group>
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
<el-date-picker v-else-if="item.type === 'datePicker'" v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :type="item.dateType || 'daterange'" :disabled="item.isDisabled" :value-format="item.valueFormat" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]"></el-date-picker>
<template v-else-if="item.type === 'upload'">
<p class="photo-top-tips">{{ item.topTips }}</p>
......@@ -307,36 +309,20 @@ export default {
background-color: #fff;
}
/* 提示图标 */
.glsx-combi-form .tips-block {
/* .glsx-combi-form .tips-block {
position: relative;
}
} */
.glsx-combi-form .tips-label {
margin-right: 20px;
margin-right: 2px;
}
.glsx-combi-form .tips-icon {
position: absolute;
display: inline-block;
width: 12px;
height: 12px;
top: 3px;
right: 14px;
margin-right: 4px;
width: 14px;
height: 14px;
margin-right: 12px;
vertical-align: middle;
cursor: pointer;
border: 1px dotted #7f7f7f;
border-radius: 50%;
}
.glsx-combi-form .tips-icon::before {
content: '?';
position: absolute;
width: 8px;
height: 8px;
top: -8px;
left: 1px;
font-size: 10px;
}
/* .glsx-combi-form .tips {
margin: 0;
} */
.glsx-combi-form .combi-form-label {
display: inline-block;
box-sizing: border-box;
......
......@@ -17,6 +17,7 @@ import selectMutiProForcouponDialog from '@/components/selectMutiProDialog/index
import tableTooltip from '@/components/table-tooltip/index.vue'
import glsxRows from '@/components/glsx-rows/index.vue'
import glsxDescriptions from '@/components/glsx-descriptions/index.vue'
import selectTag from '@/components/selectTag/index.vue'
Vue.component('glsx-combi-form', glsxCombiForm)
Vue.component('glsx-dialog', glsxDialog)
......@@ -27,3 +28,4 @@ Vue.component('select-muti-pro-forcoupon-dialog', selectMutiProForcouponDialog)
Vue.component('table-tooltip', tableTooltip)
Vue.component('glsx-rows', glsxRows)
Vue.component('glsx-descriptions', glsxDescriptions)
Vue.component('select-tag', selectTag)
\ No newline at end of file
......@@ -89,6 +89,12 @@ const staticRoutes = Object.freeze([
meta: {}
},
{
name: 'editMemberService',
path: '/couponManage/editMemberService',
component: resolve => require([`@/views/couponManage/editMemberService.vue`], resolve),
meta: {}
},
{
name: 'editCashCoupon',
path: '/couponManage/editCashCoupon/:addOrEdit',
component: resolve => require([`@/views/couponManage/editCashCoupon.vue`], resolve),
......
......@@ -8,15 +8,15 @@ export function debounce(func, wait = 200) {
}
}
export function dateFormat(dateTime, format = 'YYYY-MM-DD HH:mm') {
export function dateFormat(dateTime, format = 'YYYY-MM-DD HH:mm:ss') {
const date = new Date(dateTime)
const config = {
YYYY: date.getFullYear(),
MM: date.getMonth() + 1, //getMonth() 方法根据本地时间返回指定日期的月份(从 0 到 11)
DD: date.getDate(),
HH: date.getHours(),
mm: date.getMinutes(),
ss: date.getSeconds()
mm: date.getMinutes()<10?'0'+date.getMinutes():date.getMinutes(),
ss: date.getSeconds()<10?'0'+date.getSeconds():date.getSeconds()
}
for (const key in config) {
format = format.replace(key, config[key])
......
......@@ -751,7 +751,7 @@ export default {
var merchantval = true
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
merchantval = merchantVaild
})
}
if (valid && merchantval) {
......
......@@ -534,7 +534,7 @@ export default {
var merchantval = true
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
merchantval = merchantVaild
})
}
if (valid && merchantval) {
......
<!-- 编辑兑换券 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container" style="position: relative" v-loading="loading">
<div class="container edit-container" style="position: relative; min-height: 700px;" v-loading="loading">
<div class="right_show">
<div class="card-top"></div>
<div class="slider">
......@@ -437,7 +437,7 @@ export default {
var merchantval = true
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
merchantval = merchantVaild
})
}
if (valid && merchantval) {
......
......@@ -349,7 +349,13 @@ export default {
//新增服务券
addService() {
this.$router.push('/couponManage/editMemberService/1')
// this.$router.push('/couponManage/editMemberService/1')
this.$router.push({
path: '/couponManage/editMemberService',
query: {
$title: encodeURI('创建服务')
}
})
},
//新增折扣劵
......@@ -371,7 +377,15 @@ export default {
goto = '/couponManage/editCashCoupon/'
} else if (row.discountType == '7') {
//服务券
goto = '/couponManage/editMemberService/'
this.$router.push({
path: '/couponManage/editMemberService',
query: {
couponId: row.id,
title: addOrEdit == 2 ? '编辑' : '查看',
$title: encodeURI('编辑服务')
}
})
return true
} else if (row.discountType == '2') {
//折扣劵
goto = '/couponManage/editDiscountCoupon/'
......
......@@ -167,7 +167,7 @@ export default {
label: '领取用户',
prop: 'userName',
formatter: cellValue => {
return cellValue.userName + ' ' + cellValue.phone
return cellValue.userName == cellValue.phone ? cellValue.userName : cellValue.userName + ' ' + cellValue.phone
}
},
{
......@@ -203,7 +203,7 @@ export default {
// },
{
confId: '1',
confName: '已领取'
confName: '未使用'
},
{
confId: '2',
......@@ -211,7 +211,7 @@ export default {
},
{
confId: '3',
confName: '已过期'
confName: '已失效'
}
],
wechatUserFlagList: [
......
......@@ -202,7 +202,22 @@ export default {
label: '券来源',
prop: 'packageName',
formatter: cellValue => {
return cellValue.packageId ? cellValue.packageName : cellValue.directionalGiftId ? cellValue.directionalGiftName : '-'
let txt = ''
if (this.$isGroupUp) {
txt = cellValue.packageId ? cellValue.packageName : cellValue.directionalGiftId ? cellValue.directionalGiftName : '-'
} else {
txt = {
'': '-',
1: '营销活动',
2: '营销活动',
3: '会员服务套餐',
4: '营销活动',
5: '关联商品购买',
6: '通过集团套餐赠送',
7: '通过定向礼包赠送'
}[cellValue.receiveWay]
}
return txt
}
},
{
......
......@@ -45,14 +45,14 @@
</div>
</div>
<span slot="footer" class="dialog-footer">
<!-- <a class="dialog-jump" @click="jumpUrl" v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a> -->
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" @click="handleClose">
取 消
</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
......@@ -110,7 +110,6 @@ export default {
})
.then(res => {
if (selectItem && selectItem.length > 0) {
console.log(res.labelTreeRets)
this.labelTreeRets = res.labelTreeRets.map(item => {
return {
labelType: item.labelType == '企业标签' ? (this.$globalState.session.merchantModel == 1 ? '集团标签' : '企业标签') : item.labelType,
......@@ -138,10 +137,12 @@ export default {
})
this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index)
this.handleCheckedChange(item.tagChecked, index, 1)
})
})
this.labelTreeRetSelect = utils.deepClone(this.labelTreeRets)
this.$nextTick(() => {
this.labelTreeRetSelect = utils.deepClone(this.labelTreeRets)
})
} else {
this.labelTreeRets = res.labelTreeRets.map(item => {
return {
......@@ -179,6 +180,10 @@ export default {
})
})
},
handleClose() {
this.labelTreeRetSelect = []
this.dialogVisible = false
},
remove(items, idx) {
items.tagChecked.splice(idx, 1)
this.labelTreeRets.forEach(item => {
......@@ -201,7 +206,7 @@ export default {
})
this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index)
this.handleCheckedChange(item.tagChecked, index, 1)
})
})
},
......@@ -223,8 +228,6 @@ export default {
},
//全选
handleCheckAllChange(val, index) {
console.log(val, index)
console.log(this.labelTreeRetSelect, '==12')
if (val) {
this.labelTreeRets[index].tagChecked = []
this.labelTreeRets[index].labelList.forEach(item => {
......@@ -241,11 +244,9 @@ export default {
}
})
})
console.log(this.labelTreeRets, '==1532')
},
//选中
handleCheckedChange(value, index, status) {
console.log(value, index, status)
let checkedCount = value.length
this.labelTreeRets[index].checkAll = checkedCount === this.labelTreeRets[index].labelList.length
this.labelTreeRets[index].isIndeterminate = checkedCount > 0 && checkedCount < this.labelTreeRets[index].labelList.length
......@@ -271,7 +272,6 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.dialog-jump {
color: #5850ff;
......@@ -339,7 +339,6 @@ export default {
line-height: 24px;
font-size: 14px;
color: #666;
max-width: 200px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
......@@ -352,15 +351,11 @@ export default {
margin-left: 40px;
display: flex;
flex-wrap: wrap;
.radio-tag {
display: inline-block;
width: 50%;
.el-checkbox {
width: 40%;
margin-bottom: 6px;
display: flex;
align-items: center;
}
.el-checkbox {
width: 40%;
margin-bottom: 6px;
display: flex;
align-items: center;
}
}
}
......@@ -375,6 +370,7 @@ export default {
overflow: auto;
}
.tag-selected-box {
min-height: 200px;
// min-height: 200px;
overflow: auto;
}
</style>
</style>
\ No newline at end of file
......@@ -11,7 +11,7 @@
<el-input :size="size" v-model="searchForm.packageName" placeholder="请输入名称" clearable></el-input>
</el-form-item>
<el-form-item size="small" label="类型" style="margin-left: -10px">
<el-select size="small" v-model="searchForm.orderType" placeholder="请选择">
<el-select size="small" v-model="searchForm.orderType" placeholder="请选择">
<el-option v-for="item in orderTypeList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
</el-form-item>
......@@ -150,7 +150,10 @@ export default {
{
label: '用户信息',
prop: 'accountName'
prop: 'accountName',
formatter: cellValue => {
return cellValue.accountName + ' ' + cellValue.mobile
}
},
{
label: '订单号',
......@@ -167,12 +170,8 @@ export default {
},
created() {
if (window.__POWERED_BY_QIANKUN__) {
console.log('kkk', this.$globalState)
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
if (this.merchantModel == 1 && this.accountLevel == 1) {
this.searchForm.orderType = 2
}
}
},
mounted() {},
......@@ -231,6 +230,13 @@ export default {
this.refundVisible = !this.refundVisible
},
refundConfirmDialog() {
if (this.refund == '') {
this.$message({
message: '请输入退款说明',
type: 'error'
})
return
}
const params = {
reason: this.refund,
orderCode: this.orderCode
......@@ -251,8 +257,7 @@ export default {
this.$router.push({
path: '/memberCenter/orderDetail',
query: {
id: row.id,
detail: row
id: row.id
}
})
},
......@@ -302,10 +307,12 @@ export default {
.choseRow {
display: flex;
height: auto;
width: auto;
width:auto;
position: relative;
width:285px;
left: calc(100% - 285px);
.choseItem {
display:inline-block;
cursor: pointer;
text-align: center;
font-size: 12px;
......
......@@ -27,6 +27,13 @@
<template slot="orderType" slot-scope="scope">
<span>{{ scope.scope.orderType == 1 ? '套餐' : '权益卡' }}</span>
</template>
<template slot="amount">
<span>1</span>
</template>
<template slot="totalPrice" slot-scope="scope">
<span>{{ scope.scope.originalPrice * 1 }}</span>
</template>
<template slot="orderStatus" slot-scope="scope">
<span>{{ scope.scope.orderStatus == 2 ? '待收货' : scope.scope.orderStatus == 3 ? '已完成' : scope.scope.orderStatus == 4 ? '售后中' : scope.scope.orderStatus == 5 ? '退款失败' : scope.scope.orderStatus == 6 ? '已退款' : '' }}</span>
</template>
......@@ -59,80 +66,6 @@
<el-button type="primary" @click="goBack">返回</el-button>
</div>
</div>
<!-- <div class="live-room container">
<div class="topMsg">
<div class="orderNo">订单编号:{{ detail.orderCode }}</div>
<div class="orderTime">下单时间:{{ detail.createDate }}</div>
<el-button type="primary" size="small" class="backBtn" @click="goBack">
返回
</el-button>
</div>
<div class="midMsgWrap">
<div class="midMsgTitle">
<span>支付信息</span>
<span>用户信息</span>
<span>服务名称</span>
<span>已核/总次数</span>
</div>
<div class="midMsgContent">
<div class="item">
<div>付款状态:已付款</div>
<div>
付款金额:{{ detail.realPayPrice }}
<span v-show="detail.realPayPrice">元</span>
</div>
<div>付款方式:微信支付</div>
<div>付款时间:{{ detail.createDate }}</div>
</div>
<div class="item">
<div class="userName">用户名称:{{ detail.accountName }}</div>
<div class="phoneNumber">用户手机号:{{ detail.mobile }}</div>
</div>
<div class="item">
<div v-for="(item, index) in detail.list" :key="index">{{ item.serviceName }}</div>
</div>
<div class="item">
<div v-for="(item, index) in detail.list" :key="index">{{ item.serviceAmount }}/{{ item.serviceCount }}次</div>
</div>
</div>
</div>
<div id="tableWrap">
<div class="tableWrapBox">
<el-table :data="tableData" style="width: 100%" :header-cell-style="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<el-table-column label="商品名称" align="center">
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.couponList" :key="index">{{ item.couponName }}</div>
</template>
</el-table-column>
<el-table-column label="类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.orderType == 1 ? '套餐' : '权益卡' }}</span>
</template>
</el-table-column>
<el-table-column label="有效期" align="center" v-if="detail.orderType == 2">
<template slot-scope="scope">
<span>{{ scope.row.effectiveNum == '-1' ? '无限制' : scope.row.effectiveNum + '天' }}</span>
</template>
</el-table-column>
<el-table-column prop="originalPrice" label="单价/元" align="center"></el-table-column>
<el-table-column prop="amount" label="数量" align="center"></el-table-column>
<el-table-column prop="totalPrice" label="小计/元" align="center"></el-table-column>
<el-table-column prop="realPayPrice" label="实收金额" align="center">
<template slot-scope="scope">
<span style="color:#EB4E4E">{{ scope.row.realPayPrice }}</span>
</template>
</el-table-column>
<el-table-column prop="orderStatus" label="状态" align="center">
<template slot-scope="scope">
<div>{{ scope.row.refundReason }}</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div> -->
</div>
</template>
......@@ -233,8 +166,8 @@ export default {
},
{
colList: [
{ thColspan: 1, tdColspan: 2, label: '数量', name: 'amount' },
{ thColspan: 1, tdColspan: 2, label: '小计/元', name: 'totalPrice' }
{ thColspan: 1, tdColspan: 2, label: '数量', name: 'amount', addHtml: 'amount' },
{ thColspan: 1, tdColspan: 2, label: '小计/元', name: 'totalPrice', addHtml: 'totalPrice' }
]
},
{
......@@ -306,9 +239,6 @@ export default {
created() {
if (window.__POWERED_BY_QIANKUN__) {
this.accountLevel = this.$globalState.session.accountLevel
if (this.accountLevel == 4) {
this.basicParams.splice(6, 1)
}
}
this.tableSearchForm = {
id: this.$route.query.id
......@@ -316,20 +246,13 @@ export default {
this.getOrderPageDetail()
},
mounted() {
// this.$nextTick(() => {
// let clientHeight = document.documentElement.clientHeight
// let offsettop = document.getElementById('tableWrap').offsetTop
// document.getElementById('tableWrap').style.minHeight = clientHeight - offsettop - 120 + 'px'
// })
},
mounted() {},
methods: {
dateFormatFun(date) {
return dateFormat(date)
},
getOrderPageDetail() {
getOrderPageDetail({ id: this.$route.query.id }).then(res => {
// this.mylist=res.list
if (res.code == '0') {
this.detailData = res.data
} else {
......
......@@ -23,6 +23,9 @@
<span slot="effectiveType" slot-scope="scope">
<span>{{ toLabelText(scope.scope) }}</span>
</span>
<span slot="stock" slot-scope="scope">
<span>{{ scope.scope.limitStockFlag == 1 ? scope.scope.stock : '无限制' }}</span>
</span>
<span slot="useType" slot-scope="scope">
<span>{{ toRestrictLabelText(scope.scope) }}</span>
</span>
......@@ -31,6 +34,9 @@
<span slot="effectiveType" slot-scope="scope">
<span>{{ toLabelText(scope.scope) }}</span>
</span>
<span slot="stock" slot-scope="scope">
<span>{{ scope.scope.limitStockFlag == 1 ? scope.scope.stock : '无限制' }}</span>
</span>
<span slot="useType" slot-scope="scope">
<span>{{ toCashRestrictLabelText(scope.scope) }}</span>
</span>
......@@ -39,6 +45,9 @@
<span slot="effectiveType" slot-scope="scope">
<span>{{ toLabelText(scope.scope) }}</span>
</span>
<span slot="stock" slot-scope="scope">
<span>{{ scope.scope.limitStockFlag == 1 ? scope.scope.stock : '无限制' }}</span>
</span>
<span slot="useType">
<span>-</span>
</span>
......@@ -47,6 +56,9 @@
<span slot="effectiveType" slot-scope="scope">
<span>{{ toLabelText(scope.scope) }}</span>
</span>
<span slot="stock" slot-scope="scope">
<span>{{ scope.scope.limitStockFlag == 1 ? scope.scope.stock : '无限制' }}</span>
</span>
<span slot="useType">
<span>-</span>
</span>
......@@ -142,13 +154,6 @@ export default {
label: '名称',
prop: 'couponName'
},
// {
// label: '预估成本/元',
// prop: 'anticipatedCost',
// formatter: cellValue => {
// return (cellValue.anticipatedCost / 100).toFixed(2)
// }
// },
{
label: '有效期',
prop: 'effectiveType',
......@@ -156,8 +161,8 @@ export default {
},
{
label: '可用次数',
prop: 'effectiveType',
addHtml: 'effectiveType'
prop: 'useType',
addHtml: 'useType'
},
{
label: '适用范围',
......@@ -172,7 +177,8 @@ export default {
},
{
label: '剩余库存',
prop: 'residueAmount'
prop: 'stock',
addHtml: 'stock'
}
]
}
......@@ -236,7 +242,7 @@ export default {
}
this.loading = true
this.$apis.giftBag
.getDirectionalGiftListApi(params)
.getghDirectionalGiftListApi(params)
.then(res => {
// 重置分页组件
if (this.$refs[this.activeName + 'Ref'] && isResetPage) {
......
......@@ -16,7 +16,7 @@
/>
</div>
<tip-panel class="list-panel" panelMinHeight="40px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel>
<template v-if="accountLevel == 4">
<template v-if="accountLevel == 4 && merchantModel == 1">
<div class="setmeal-tabs flex-default m-t-10">
<template v-for="(tab, index) in tabList">
<div :class="['tab', tab.checked ? 'active' : '']" @click="changeTab(index)" :key="index">{{ tab.text }}</div>
......@@ -33,31 +33,33 @@
<ticket :choseItemList="scope.scope.list"></ticket>
</div>
</span>
<span class="table-btns" slot="optionsFun" slot-scope="scope" :data="scope.scope">
<!-- 是否置顶推荐:1 是;2 否 -->
<el-button type="text" v-if="scope.scope.topFlag == 1">已指定推荐</el-button>
<GLButton type="text" @click="handleUpdateToTop(scope.scope)" v-if="scope.scope.topFlag == 2" fn="置顶推荐">置顶推荐</GLButton>
<template v-if="scope.scope.state === 0">
<!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<template v-if="!(accountLevel == 4 && activetab == 1)">
<template v-if="scope.scope.state === 0">
<!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
<GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton>
</template>
<template v-else-if="scope.scope.state === 1">
<!-- <el-button type="text" @click="handleDownOption(scope.scope)">下架</el-button>
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
<GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton>
</template>
<template v-else-if="scope.scope.state === 1">
<!-- <el-button type="text" @click="handleDownOption(scope.scope)">下架</el-button>
<el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button> -->
<GLButton type="text" @click="handleDownOption(scope.scope)" fn="下架">下架</GLButton>
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
</template>
<template v-else>
<!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<GLButton type="text" @click="handleDownOption(scope.scope)" fn="下架">下架</GLButton>
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
</template>
<template v-else>
<!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<el-button type="text" @click="handleUpOption(scope.scope)">上架</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
<GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton>
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
<GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton>
</template>
<GLButton type="text" @click="handleUpdateToTop(scope.scope)" v-if="scope.scope.topFlag == 2" fn="置顶推荐">置顶推荐</GLButton>
<el-button type="text" v-if="scope.scope.topFlag == 1">已置顶推荐</el-button>
</template>
</span>
</GLTable>
......@@ -141,33 +143,25 @@ export default {
{
label: '套餐名称',
prop: 'packageName',
width: '180'
width: 220
},
{
label: '套餐售价/元',
prop: 'packagePrice',
width: 140
prop: 'packagePrice'
},
{
label: '说明',
prop: 'notes',
width: 160,
width: 300,
line: 4
},
{
label: '购买人数',
prop: 'buyNumber',
line: 1
label: '售出数量',
prop: 'buyNumber'
},
{
label: '套餐总价',
prop: 'referencePrice'
},
{
label: '状态',
prop: 'state',
width: '80',
formatter: cellValue => {
return this.baseDataList.stateList.find(item => item.confId == cellValue.state).confName
}
......@@ -176,7 +170,7 @@ export default {
label: '操作',
prop: 'optionsFun',
addHtml: 'optionsFun',
width: 160
width: 220
}
]
},
......@@ -191,7 +185,7 @@ export default {
},
computed: {
getListApi() {
const { activetab, merchantModel, accountLevel } = this
const { activetab } = this
let listApi = getSetMealListApi
if (activetab == 1) {
listApi = getSetMealListApi
......@@ -202,39 +196,48 @@ export default {
}
},
created() {
console.log(this.$route.query.activetab)
if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
// this.userType = this.$globalState.session.userType
if (this.merchantModel == 2) {
this.activetab = 0
}
}
this.searchForm = {
merchantId: this.merchantId
// merchantName
}
if (this.$route.query && this.$route.query.activetab) {
this.activetab = 0
// this.changeTab(this.activetab)
this.tabList.forEach(item => (item.checked = false))
this.tabList[this.activetab].checked = true
}
this.dynamicFile()
this.getLoginCountFun()
},
mounted() {},
methods: {
dynamicFile() {
const { activetab, merchantModel, accountLevel } = this
let { activetab, accountLevel } = this
const saleParam = {
label: '在本店售出数量',
prop: 'buyNumber',
width: 140
label: '售出数量',
prop: 'buyNumber'
}
const referencePrice = {
label: '套餐总价',
prop: 'referencePrice'
}
// accountLevel == 4
if (activetab == 1 && accountLevel == 4) {
this.tableParams.tableColumns.splice(5, 1, saleParam)
} else {
this.tableParams.tableColumns.splice(5, 1, referencePrice)
if ((activetab == 1 && accountLevel == 4) || accountLevel != 4) {
this.tableParams.tableColumns.splice(4, 1, saleParam)
} else if (activetab == 0 && accountLevel == 4) {
this.tableParams.tableColumns.splice(4, 1, referencePrice)
}
},
changeTab(index) {
......@@ -433,8 +436,8 @@ export default {
}
.setmeal-tabs {
cursor: pointer;
width: auto;
position: relative;
width:200px;
left: calc(100% - 196px);
.tab {
background: #fafafa;
......
<template>
<div>
<base-info v-show="activeName == 'baseInfo'" ref="baseInfoRef" :routeInfo="routeInfo" @handleTabChange="jumpEvent"></base-info>
<edit-event v-if="activeName == 'editEvent'" :eventObj="eventObj" :condLimitObj="condLimitObj" @handleTabChange="jumpBaseInfo" @handleInfoConfirm="handleInfoConfirm"></edit-event>
<edit-event v-if="activeName == 'editEvent'" :eventObj="eventObj" :parentCustomerObj="parentCustomerObj" @handleTabChange="jumpBaseInfo" @handleInfoConfirm="handleInfoConfirm"></edit-event>
</div>
</template>
......@@ -21,14 +21,19 @@ export default {
},
// 编辑-标记idx
eventIndex: '',
condLimitObj: {
// 1-有;0-无
hasPhone: 0,
hasQw: 0
},
eventObj: {
addOrEdit: 'add',
info: {}
},
parentCustomerObj: {
// 人群,标签,指定
currentCustomerTypeName: '',
parentPredictObj: {
total: '',
qiwei: '',
phone: ''
},
list: []
}
}
},
......@@ -48,6 +53,8 @@ export default {
},
handleInfoConfirm(info) {
this.eventObj.addOrEdit == 'add' ? this.$refs.baseInfoRef.editForm.eventList.push(info.baseInfo) : this.$set(this.$refs.baseInfoRef.editForm.eventList, this.eventIndex, info.baseInfo)
this.$refs.baseInfoRef.parentCustomerObj.phone = info.predictCountObj.phone
this.$refs.baseInfoRef.parentCustomerObj.qiwei = info.predictCountObj.qiwei
this.$refs.baseInfoRef.dealSopTime()
this.jumpBaseInfo({ activeName: 'baseInfo' })
},
......@@ -55,9 +62,8 @@ export default {
jumpEvent(obj) {
this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit)
this.$set(this.eventObj, 'info', obj.info)
this.parentCustomerObj = obj.parentCustomerObj
this.eventIndex = obj.eventIndex
this.$set(this.condLimitObj, 'hasPhone', obj.condLimitObj.hasPhone)
this.$set(this.condLimitObj, 'hasQw', obj.condLimitObj.hasQw)
this.activeName = obj.activeName
}
}
......
<template>
<div class="select-crowd">
<el-dialog title="选择人群" :visible="dialogVisible" width="1080px" :before-close="handleClose" :close-on-click-modal="false">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer">
<el-button :size="size" type="primary" @click="getList">查询</el-button>
</span>
</glsx-combi-form>
<GLTable ref="crowdRef" :pageConf="pageConf" :hasNum="false" :noDataImg="url" :tableData="crowdList" :tableTotal="total" :tableParams="tableParams" @refreshTable="getList" :setTableFinishFun="setTableFinishFun">
<div slot="radioHtml" class="crowd-table" slot-scope="scope">
<el-radio v-model="selectedCrowdId" :label="scope.scope.crowdId" @click.native="handleClick(scope.scope)"></el-radio>
</div>
</GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleClose">取 消</el-button>
<el-button size="small" type="primary" @click="handleConfirm">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'selectCrowd',
data() {
return {
url: url,
searchForm: {
req: {
crowdType: 2
}
},
total: 0,
crowdList: [],
heightBox: 200,
selectedCrowdId: '',
// 搜索
searchFormData: [
{
label: '关键字',
name: 'keyword',
type: 'input',
placeholder: '请输入人群名称'
}
],
// 表格
// getListApi: this.$apis.common.getCrowdTreeListApi,
tableParams: {
listName: 'crowdUnitList',
// 行数据的key
// mutiSelectUniqueKey: 'crowdId',
// checkSelectKey: 'crowdId',
// checkSelectVal: [],
// 多选ref的名称
// mutiSelectName: 'list',
tableColumns: [
{
label: '',
prop: '',
width: 80,
addHtml: 'radioHtml'
},
{
label: '序号',
prop: 'idx',
width: 80
},
{
label: '人群名称',
prop: 'crowdName',
formatter: cellValue => {
return cellValue.crowdName || '-'
}
},
{
label: '人群描述',
prop: 'crowdDesc',
formatter: cellValue => {
return cellValue.crowdDesc || '-'
}
},
{
label: '预估人数',
prop: 'total',
width: '160px'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
baseData: {}
}
},
props: {
dialogVisible: {
type: Boolean,
default: false
},
selectedCrowdList: {
type: Array,
default: () => []
}
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.getList()
},
methods: {
getList() {
var params = {
req: {
...this.searchForm,
pageNum: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageNum : 1,
pageSize: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageSize : 10
}
}
this.$apis.common.getCrowdTreeListApi(params).then(res => {
this.crowdList = res.crowdUnitList
this.total = res.total
var page = this.$refs.crowdRef.page
// 添加序号
this.crowdList.forEach((item, index) => {
item.idx = index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1
})
this.selectedCrowdList.length && (this.selectedCrowdId = this.selectedCrowdList[0].crowdId)
// this.recoverySelected()
this.$refs.crowdRef.tableHeightValues = '460px'
})
},
setTableFinishFun() {
this.crowdList = this.$refs.crowdRef.data
// this.recoverySelected()
//接收到的数据为空
// this.$refs.crowdRef.tableHeightValues = this.$refs.crowdRef.data.length ? '' : '400px'
this.$refs.crowdRef.tableHeightValues = '460px'
},
handleClick(val) {
let temp = JSON.parse(JSON.stringify(val))
delete temp.idx
this.selectedCrowdList = [temp]
},
handleClose() {
this.$emit('handleCrowdCustClose')
},
handleConfirm() {
this.$emit('handleCrowdCustConfirm', this.selectedCrowdList)
}
}
}
</script>
<style lang="scss">
.select-crowd {
.title {
margin-bottom: 12px;
}
.customer-tag-box {
display: flex;
margin: 20px 16px;
.tag-label {
display: inline-block;
height: 30px;
line-height: 30px;
}
.input-tag-wrapper {
max-height: 75px;
overflow: auto;
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 648px;
display: flex;
align-items: center;
cursor: pointer;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
}
// .customer-list {
// width: calc(100% - 280px);
// margin-right: 10px;
// }
.p-16 {
padding: 16px;
}
.crowd-table .el-radio__label {
display: none;
}
}
</style>
<template>
<div class="select-cutomer">
<div class="title">备注:为确保营销渠道正常触达,仅支持选择同条件客户(是否加企微、是否有手机号)</div>
<div class="flex-default">
<div class="customer-list">
<div class="customer-tag-box">
<span class="tag-label">用户标签:</span>
<div class="el-input-tag input-tag-wrapper" @click="handleClickTag">
<span v-if="!selectedLabelList.length" style="color: #BFBFBF;">请选择标签筛选客户</span>
<span v-for="(tag, idx) in selectedLabelList" :key="idx">
<el-tag v-for="(tagItem, idx1) in tag.labelList" :key="idx1" :size="size" type="info" :disable-transitions="false">{{ tagItem.name }}</el-tag>
</span>
</div>
<el-dialog title="选择客户" :visible="dialogVisible" width="1080px" :before-close="handleClose" :close-on-click-modal="false">
<!-- <div class="title">备注:为确保营销渠道正常触达,仅支持选择同条件客户(是否加企微、是否有手机号)</div> -->
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
<div class="flex-default">
<div class="customer-list">
<!-- <div class="customer-tag-box">
<span class="tag-label">用户标签:</span>
<div class="el-input-tag input-tag-wrapper" @click="handleClickTag">
<span v-if="!selectedLabelList.length" style="color: #BFBFBF;">请选择标签筛选客户</span>
<span v-for="(tag, idx) in selectedLabelList" :key="idx">
<el-tag v-for="(tagItem, idx1) in tag.labelList" :key="idx1" :size="size" type="info" :disable-transitions="false">{{ tagItem.name }}</el-tag>
</span>
</div>
</div> -->
<p class="list-title p-16">客户列表(最多仅可选200个客户)</p>
<GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable>
</div>
<GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable>
</div>
<div class="selected-list">
<p class="list-title p-16">已选({{ Array.isArray(selectedCustomerList) ? selectedCustomerList.length : 0 }})</p>
<div class="list-customers" :style="{ height: heightBox + 'px' }">
<el-tag class="customer-tag" v-for="(item, idx) in selectedCustomerList" :key="idx" :size="size" type="info" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ item.customerName }}
</el-tag>
<div class="selected-list">
<p class="list-title p-16">已选({{ Array.isArray(selectedCustomerList) ? selectedCustomerList.length : 0 }})</p>
<div class="list-customers" :style="{ height: heightBox + 'px' }">
<el-tag class="customer-tag" v-for="(item, idx) in selectedCustomerList" :key="idx" :size="size" type="info" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ item.customerName }}
</el-tag>
</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<!-- <a class="dialog-jump" @click="jumpUrl" v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a> -->
<el-button size="small" @click="handleClose">取 消</el-button>
<el-button size="small" type="primary" @click="handleConfirm">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
......@@ -38,6 +51,23 @@ export default {
searchForm: {},
customerList: [],
heightBox: 200,
// 搜索
searchFormData: [
{
label: '客户名称',
name: 'customerName',
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '客户手机号',
name: 'customerPhone',
type: 'input',
isClear: true,
maxlength: 11
}
],
// 表格
getListApi: this.$apis.sop.getCustomerListApi,
tableParams: {
......@@ -119,6 +149,10 @@ export default {
},
props: {
dialogVisible: {
type: Boolean,
default: false
},
selectedLabelList: {
type: Array,
default: () => []
......@@ -126,47 +160,41 @@ export default {
selectedCustomerList: {
type: Array,
default: () => []
},
condLimitObj: {
type: Object,
default: () => {
return {
// 1-有;0-无
hasPhone: 0,
hasQw: 0
}
}
}
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 350
this.heightBox = clientHeight - 0.15 * clientHeight - 425
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = {
combineType: 2,
tagLists: []
}
this.selectedLabelList.length &&
this.selectedLabelList.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => {
this.searchForm.tagLists.push({
groupId: item.labelGroup.id,
groupName: item.labelGroup.name,
groupType: item.labelType,
labelId: subItem.id,
labelName: subItem.name
})
})
})
this.getListApi = this.selectedLabelList.length ? this.$apis.sop.getCustomerByTagListApi : this.$apis.sop.getCustomerListApi
resolve()
})
// beforeSearchFn() {
// return new Promise(resolve => {
// this.searchForm = {
// combineType: 2,
// tagLists: []
// }
// this.selectedLabelList.length &&
// this.selectedLabelList.forEach(item => {
// item.labelList.length &&
// item.labelList.forEach(subItem => {
// this.searchForm.tagLists.push({
// groupId: item.labelGroup.id,
// groupName: item.labelGroup.name,
// groupType: item.labelType,
// labelId: subItem.id,
// labelName: subItem.name
// })
// })
// })
// this.getListApi = this.selectedLabelList.length ? this.$apis.sop.getCustomerByTagListApi : this.$apis.sop.getCustomerListApi
// resolve()
// })
// },
handleSearch() {
this.$refs.customerRef.refreshTable()
},
setTableFinishFun() {
......@@ -184,33 +212,26 @@ export default {
this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], true)
}
})
// 找到不符合条件的,变为不可选
this.tableParams.checkSelectVal = []
if (this.selectedCustomerList.length) {
if (this.selectedCustomerList.length >= 5) {
let tableIds = this.selectedCustomerList.map(item => item.id)
console.log(tableIds)
this.tableList.forEach((row, idx) => {
if (row.isJoin != this.condLimitObj.hasQw || !!row.customerPhone != this.condLimitObj.hasPhone) {
if (!tableIds.includes(row.id)) {
this.tableParams.checkSelectVal.push(row.id)
this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], false)
}
})
} else {
this.tableParams.checkSelectVal = []
}
})
},
dealCondLimit(val) {
this.condLimitObj.hasQw = val ? val.isJoin : 0
this.condLimitObj.hasPhone = val ? (val.customerPhone ? 1 : 0) : 0
},
handleClickTag() {
this.$emit('handleChangeTag', { condLimitObj: this.condLimitObj, tagList: this.selectedLabelList, customerInfoList: this.selectedCustomerList, activeName: 'tag' })
},
handleSelectionTable(val) {
// 未选客户时,筛选客户条件
if (!this.selectedCustomerList.length) {
this.dealCondLimit(val[0])
}
// if (!this.selectedCustomerList.length) {
// this.dealCondLimit(val[0])
// }
let currentList = JSON.parse(JSON.stringify(this.selectedCustomerList))
let tableIds = this.tableList.map(item => item.id)
this.selectedCustomerList = JSON.parse(JSON.stringify(val))
......@@ -221,6 +242,13 @@ export default {
}
})
this.recoverySelected()
},
handleClose() {
this.$emit('handleAppointCustClose')
},
handleConfirm() {
this.$emit('handleAppointCustConfirm', this.selectedCustomerList)
}
}
}
......@@ -268,7 +296,7 @@ export default {
}
.customer-list {
width: calc(100% - 280px);
border: 1px solid #eeeeee;
// border: 1px solid #eeeeee;
margin-right: 10px;
}
.p-16 {
......@@ -277,7 +305,7 @@ export default {
.selected-list {
width: 280px;
border-radius: 2px;
border: 1px solid #eeeeee;
// border: 1px solid #eeeeee;
i {
color: #75acff;
margin-right: 3px;
......@@ -290,6 +318,7 @@ export default {
.list-customers {
// box-sizing: border-box;
// height: 61vh;
border: 1px solid #eeeeee;
padding: 10px;
overflow-y: scroll;
.customer-tag {
......
......@@ -15,14 +15,26 @@
</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.eventCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-block back-image-green">
<div class="analysis-title-block m-b-20">
已完成事件数
<img src="@/assets/sop/completed-event.png" />
</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.finishEventCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-block back-image-orange">
<div class="analysis-title-block m-b-20">
<div>
失败事件数
<el-popover placement="top" width="200" trigger="hover" content="因企微、短信等限制无法正常执行的事件">
<img slot="reference" class="tips-icon" src="@/assets/icon-tip.png" />
</el-popover>
</div>
<img src="@/assets/sop/completed-event.png" />
</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.failEventCount || '-' : '-' }}</p>
</div>
<div class="analysis-block back-image-blue">
<div class="analysis-title-block m-b-20">
完成率
</div>
......@@ -34,7 +46,14 @@
<p class="m-b-10">日营销事件明细</p>
<!-- 表格区域 开始 -->
<GLTable ref="completeListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<GLTable ref="completeListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="failEventCount" slot-scope="scope">
<el-popover v-show="scope.scope.failEventList" placement="bottom-end" width="200" trigger="click" :content="scope.scope.failEventList">
<span class="cursor-pointer" slot="reference" @click="handleGetFailEvent(scope.scope)">{{ scope.scope.eventStatistics ? scope.scope.eventStatistics.failEventCount : '-' }}</span>
</el-popover>
<span v-show="!scope.scope.failEventList" class="cursor-pointer" slot="reference" @click="handleGetFailEvent(scope.scope)">{{ scope.scope.eventStatistics ? scope.scope.eventStatistics.failEventCount : '-' }}</span>
</template>
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
......@@ -111,11 +130,17 @@ export default {
},
{
label: '已完成事件数',
prop: 'eventStatistics',
prop: 'finishEventCount',
width: '140',
formatter: cellValue => {
return cellValue.eventStatistics ? cellValue.eventStatistics.finishEventCount : '-'
}
},
{
label: '失败事件数',
prop: 'failEventCount',
width: '140',
addHtml: 'failEventCount'
}
]
},
......@@ -150,11 +175,19 @@ export default {
getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.sopInfo = res
console.log(this.sopInfo)
this.sopInfo.completedPercent = Math.round((this.sopInfo.sopStatistics.finishEventCount / this.sopInfo.sopStatistics.eventCount) * 100).toFixed(0) + '%'
this.drawPie()
})
},
handleGetFailEvent(row) {
this.$apis.sop.getFailEventList({ id: row.id }).then(res => {
let idx = this.$refs.completeListRef.data.findIndex(item => item.id == row.id)
this.$refs.completeListRef.data[idx].failEventList = res
})
},
drawPie() {
let chartDom = document.getElementById('completePie')
let myChart = echarts.init(chartDom)
......@@ -197,7 +230,7 @@ export default {
margin-right: 20px;
flex-basis: 0 0 auto;
background: #ffffff;
background-image: linear-gradient(0deg, #f8f8fc 0%, #f4f4ff 100%);
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f7ff 100%);
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.analysis-title-block {
display: flex;
......@@ -220,6 +253,15 @@ export default {
font-weight: 600;
}
}
.analysis-block.back-image-green {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%);
}
.analysis-block.back-image-orange {
background-image: linear-gradient(0deg, #f8f8fc 0%, #fff6f0 100%);
}
.analysis-block.back-image-blue {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f0ff 100%);
}
}
}
</style>
......@@ -24,14 +24,14 @@
</div>
<p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.customerCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-block back-image-green">
<div class="analysis-title-block m-b-20">
已触达客户数
<img src="@/assets/sop/touch-customer.png" />
</div>
<p class="analysis-num">{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-block back-image-blue">
<div class="analysis-title-block m-b-20">
触达率
</div>
......@@ -107,6 +107,17 @@ export default {
}
},
{
label: '推送人',
prop: 'pusherName'
},
{
label: '推送时间',
prop: 'pusherTime',
formatter: cellValue => {
return cellValue.pusherTime ? dayjs(cellValue.pusherTime).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '初次查看事件',
prop: 'firstViewDate',
formatter: cellValue => {
......@@ -120,6 +131,10 @@ export default {
return cellValue.viewCount || '-'
}
}
// {
// label: '查看总时长',
// prop: ''
// }
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
......@@ -263,7 +278,7 @@ export default {
margin-right: 20px;
flex-basis: 0 0 auto;
background: #ffffff;
background-image: linear-gradient(0deg, #f8f8fc 0%, #f4f4ff 100%);
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f7ff 100%);
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.analysis-title-block {
display: flex;
......@@ -286,6 +301,12 @@ export default {
font-weight: 600;
}
}
.analysis-block.back-image-green {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%);
}
.analysis-block.back-image-blue {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f0ff 100%);
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!