Commit 712ad406 by 前端

Merge branch 'v2.3.0' into 'develop'

V2.3.0上线后,代码合并到develop。

See merge request !175
2 parents 5f7e42d8 e11f1bd9
Showing 70 changed files with 1508 additions and 368 deletions
...@@ -4,8 +4,8 @@ import { http } from '@/main' ...@@ -4,8 +4,8 @@ import { http } from '@/main'
const getCenterListApi = params => { const getCenterListApi = params => {
// params.method = `${defaultPath}goods.list` // params.method = `${defaultPath}goods.list`
params.method = `scrm.api.equity.card.merchant.record.get` // params.method = `scrm.api.equity.card.merchant.record.get`
params.method = `scrm.api.equity.card.merchant.record.page`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
...@@ -48,9 +48,11 @@ const updateCardContent = params => { ...@@ -48,9 +48,11 @@ const updateCardContent = params => {
} }
const memberExportApi = params => { const memberExportApi = params => {
params.method = `scrm.api.equity.card.merchant.record.export` // params.method = `scrm.api.equity.card.merchant.record.export`
params.method = `scrm.api.equity.card.merchant.record.page.export`
return http({ return http({
url: 'rop-scrm-equity/router', url: '/rop-scrm-equity/router',
method: 'GET', method: 'GET',
data: params, data: params,
sign: true sign: true
...@@ -60,10 +62,22 @@ const memberExportApi = params => { ...@@ -60,10 +62,22 @@ const memberExportApi = params => {
const getQrUrl = params => { const getQrUrl = params => {
params.method = 'scrm.api.equity.card.class.generate.try.url' params.method = 'scrm.api.equity.card.class.generate.try.url'
return http({ return http({
url: 'rop-scrm-equity/router', url: '/rop-scrm-equity/router',
method: 'POST',
data: params,
returnAll: true
})
}
//门店会员开通方式
const getCardtypeList = params => {
params.method ='scrm.api.equity.card.active.type.list'
return http({
url: '/rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
returnAll: true returnAll: true
}) })
} }
export { getCenterListApi, getMoreMerchant, updateCardContent, getCardContent, memberExportApi, getQrUrl }
export { getCenterListApi, getMoreMerchant, updateCardContent, getCardContent, memberExportApi, getQrUrl ,getCardtypeList}
import { http, http_common } from '@/main' import { http, http_common, http2 } from '@/main'
const defaultPath = 'scrm.api.carlife.' const defaultPath = 'scrm.api.carlife.'
const getMerchantGoodsListApi = params => { const getMerchantGoodsListApi = params => {
...@@ -94,4 +94,38 @@ const pictureUpload = params => { ...@@ -94,4 +94,38 @@ const pictureUpload = params => {
noSignAttr: ['file'] 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 getStaffFollowerListApi = params => {
params.method = 'entmicro.api.staff.listEntFollowerType'
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, getStaffFollowerListApi }
...@@ -3,8 +3,7 @@ import { http } from '@/main' ...@@ -3,8 +3,7 @@ import { http } from '@/main'
const defaultPath = 'scrm.api.coupon.' const defaultPath = 'scrm.api.coupon.'
//优惠券列表 //优惠券列表
const getMerchantListApi = params => { const getCouponListApi = params => {
// params.method = `${defaultPath}list.merchant`
params.method = 'scrm.backstage.coupon.list.merchant' params.method = 'scrm.backstage.coupon.list.merchant'
return http({ return http({
url: 'rop-scrm-coupon/router', url: 'rop-scrm-coupon/router',
...@@ -25,6 +24,28 @@ const couponExportApi = params => { ...@@ -25,6 +24,28 @@ const couponExportApi = params => {
}) })
} }
//优惠券列表-集团-导出
const couponGroupExportApi = params => {
params.method = 'scrm.api.coupon.gh.group.list.export'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
//优惠券列表-门店-导出
const couponStoreExportApi = params => {
params.method = 'scrm.api.coupon.gh.store.list.export'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
//生效/失效 //生效/失效
const effectiveCouponApi = params => { const effectiveCouponApi = params => {
params.method = `${defaultPath}effective` params.method = `${defaultPath}effective`
...@@ -49,6 +70,17 @@ const deleteCouponApi = params => { ...@@ -49,6 +70,17 @@ const deleteCouponApi = params => {
}) })
} }
// 核销记录-券来源
const getPackageListApi = params => {
params.method = 'scrm.api.equity.package.gh.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
//核销记录列表 //核销记录列表
const getVerificationListApi = params => { const getVerificationListApi = params => {
params.method = `${defaultPath}verification.code.verification.list` params.method = `${defaultPath}verification.code.verification.list`
...@@ -151,4 +183,4 @@ const getAllGoodsApi = params => { ...@@ -151,4 +183,4 @@ const getAllGoodsApi = params => {
}) })
} }
export default { getMerchantListApi, couponExportApi, getVerificationListApi, verificationExportApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi } export default { getCouponListApi, couponExportApi, couponGroupExportApi, couponStoreExportApi, getPackageListApi, getVerificationListApi, verificationExportApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi }
...@@ -78,6 +78,17 @@ const exportGiftInfoApi = params => { ...@@ -78,6 +78,17 @@ const exportGiftInfoApi = params => {
// 编辑-选择定向礼包列表 // 编辑-选择定向礼包列表
const getDirectionalGiftListApi = params => { const getDirectionalGiftListApi = params => {
params.method = 'scrm.api.coupon.directional.gift.coupon.list' 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({ return http({
url: 'rop-scrm-coupon/router', url: 'rop-scrm-coupon/router',
method: 'GET', method: 'GET',
...@@ -108,4 +119,4 @@ const templateModal = params => { ...@@ -108,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 }
...@@ -3,9 +3,8 @@ import { http } from '@/main' ...@@ -3,9 +3,8 @@ import { http } from '@/main'
// const defaultPath = 'scrm.api.live.' // const defaultPath = 'scrm.api.live.'
const getOrderListApi = params => { const getOrderListApi = params => {
// params.method = `${defaultPath}goods.list` // params.method = `scrm.api.equity.merchant.order.list.with.page`
params.method = `scrm.api.equity.merchant.order.list.with.page` params.method = 'scrm.api.equity.merchant.order.gh.list.with.page'
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
...@@ -34,4 +33,26 @@ const orderExportApi = params => { ...@@ -34,4 +33,26 @@ const orderExportApi = params => {
sign: true sign: true
}) })
} }
export { getOrderListApi, getOrderPageDetail, orderExportApi } // 门店订单申请退款
const orderRefund = params => {
params.method = 'scrm.api.equity.merchant.order.refund'
return http({
url: '/rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true,
returnAll: true
})
}
//套餐使用详情
const getCouponList = params => {
params.method = 'scrm.api.equity.merchant.order.package.coupon.list'
return http({
url: '/rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
export { getOrderListApi, getOrderPageDetail, orderExportApi ,orderRefund,getCouponList}
...@@ -98,4 +98,4 @@ const verificationExportApi = params => { ...@@ -98,4 +98,4 @@ const verificationExportApi = params => {
// }) // })
// } // }
export { getRecordListApi, getVerificationCode, verificationExportApi } export default { getRecordListApi, getVerificationCode, verificationExportApi }
...@@ -2,20 +2,33 @@ import { http } from '@/main' ...@@ -2,20 +2,33 @@ import { http } from '@/main'
// const defaultPath = 'scrm.api.live.' // const defaultPath = 'scrm.api.live.'
const getSetMealListApi = params => { const getghSetMealListApi = params => {
// params.method = `${defaultPath}goods.list` // params.method = `${defaultPath}goods.list`
params.method = `scrm.api.equity.package.info.list.with.page` // params.method = `scrm.api.equity.package.info.list.with.page`//旧
params.method = `scrm.api.equity.package.gh.list.with.page`
return http({ return http({
url: 'rop-scrm-equity/router', url: '/rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getSetMealstoreListApi = params => {
// params.method = `${defaultPath}goods.list`
params.method = `scrm.api.equity.package.info.list.with.page`//旧
return http({
url: '/rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
//
const deleteSetMeal = params => { const deleteSetMeal = params => {
params.method = `scrm.api.equity.package.info.delete` // params.method = `scrm.api.equity.package.info.delete`
params.method = `scrm.api.equity.package.gh.delete`
return http({ return http({
url: 'rop-scrm-equity/router', url: '/rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
...@@ -26,7 +39,7 @@ const deleteSetMeal = params => { ...@@ -26,7 +39,7 @@ const deleteSetMeal = params => {
const getSetmealService = params => { const getSetmealService = params => {
params.method = `scrm.api.coupon.list.merchant` params.method = `scrm.api.coupon.list.merchant`
return http({ return http({
url: 'rop-scrm-coupon/router', url: '/rop-scrm-coupon/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
...@@ -88,4 +101,18 @@ const upDownPackage = params => { ...@@ -88,4 +101,18 @@ const upDownPackage = params => {
returnAll: true returnAll: true
}) })
} }
export { getSetMealListApi, deleteSetMeal, getSetmealService, getServiceInfo, createSetMeal, upDownPackage, updateSetMeal, configSetMeal }
//置顶推荐
const updateToTop = params=>{
params.method = `scrm.api.equity.package.gh.updateToTop`
return http({
url: '/rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export { getghSetMealListApi,getSetMealstoreListApi, deleteSetMeal, getSetmealService, getServiceInfo, createSetMeal, upDownPackage, updateSetMeal, configSetMeal ,updateToTop}
...@@ -15,7 +15,17 @@ const getCustomerListApi = params => { ...@@ -15,7 +15,17 @@ const getCustomerListApi = params => {
// 标签获取客户列表 // 标签获取客户列表
const getCustomerByTagListApi = params => { const getCustomerByTagListApi = params => {
params.method = 'entmicro.api.customer.getCustomerPageByTag' 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({ return http({
url: 'rop-scrm-entmicro/router', url: 'rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
...@@ -78,6 +88,17 @@ const getSopStaffTaskListApi = params => { ...@@ -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 => { const getTaskStatusApi = params => {
params.method = 'scrm.api.sop.task.merchantWWMsgTaskStatusCheck' params.method = 'scrm.api.sop.task.merchantWWMsgTaskStatusCheck'
...@@ -204,4 +225,4 @@ const getMomentListApi = params => { ...@@ -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 }
...@@ -26,7 +26,7 @@ html { ...@@ -26,7 +26,7 @@ html {
.live-room .container { .live-room .container {
background: #ffffff; background: #ffffff;
margin: 20px 0px; margin: 20px 0;
padding: 15px 20px; padding: 15px 20px;
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1); box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1);
} }
...@@ -138,6 +138,10 @@ html { ...@@ -138,6 +138,10 @@ html {
margin-bottom: 18px; margin-bottom: 18px;
} }
.marketing .color-transparent {
background-color: transparent;
}
.marketing .default-blue-btn { .marketing .default-blue-btn {
color: #5850ff; color: #5850ff;
border-color: #5850ff; border-color: #5850ff;
...@@ -152,6 +156,37 @@ html { ...@@ -152,6 +156,37 @@ html {
background-color: rgba(144, 147, 153, 0.5) !important; background-color: rgba(144, 147, 153, 0.5) !important;
} }
.marketing .table-title {
line-height: 32px;
}
.marketing .table-cicle {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 4px;
}
.marketing .back-orange {
background-color: #fdb757;
}
.marketing .back-blue {
background-color: #5850ff;
}
.marketing .back-grey {
background-color: #999999;
}
.marketing .back-green {
background-color: #2CCA74;
}
.marketing .back-red {
background-color: #EB4E4E;
}
.marketing .el-table .cell { .marketing .el-table .cell {
line-height: 16px; line-height: 16px;
} }
...@@ -193,6 +228,7 @@ html { ...@@ -193,6 +228,7 @@ html {
cursor: pointer; cursor: pointer;
} }
.marketing .w-100-percent,
.marketing .img-w-100 { .marketing .img-w-100 {
width: 100%; width: 100%;
} }
...@@ -212,6 +248,10 @@ html { ...@@ -212,6 +248,10 @@ html {
height: 120px; height: 120px;
} }
.marketing .w-150 {
width: 150px;
}
.marketing .w-320 { .marketing .w-320 {
width: 320px; width: 320px;
} }
...@@ -223,7 +263,12 @@ html { ...@@ -223,7 +263,12 @@ html {
.marketing .m-t-10 { .marketing .m-t-10 {
margin-top: 10px; margin-top: 10px;
} }
.marketing .m-t-20 {
margin-top: 20px;
}
.marketing .m-b-8 {
margin-bottom: 8px;
}
.marketing .m-b-10 { .marketing .m-b-10 {
margin-bottom: 10px; margin-bottom: 10px;
} }
...@@ -240,6 +285,10 @@ html { ...@@ -240,6 +285,10 @@ html {
margin-bottom: 60px; margin-bottom: 60px;
} }
.marketing .m-r-8 {
margin-right: 8px;
}
.marketing .m-r-10 { .marketing .m-r-10 {
margin-right: 10px; margin-right: 10px;
} }
...@@ -252,6 +301,11 @@ html { ...@@ -252,6 +301,11 @@ html {
margin-left: 20px; margin-left: 20px;
} }
.marketing.p-t-10,
.marketing .p-t-10 {
padding-top: 10px;
}
.marketing.p-t-20, .marketing.p-t-20,
.marketing .p-t-20 { .marketing .p-t-20 {
padding-top: 20px; padding-top: 20px;
...@@ -281,7 +335,9 @@ html { ...@@ -281,7 +335,9 @@ html {
.marketing .txt-grey { .marketing .txt-grey {
color: #999999; color: #999999;
} }
.marketing .text-e8{
color: #EB4E4E!important;
}
.marketing .txt-center { .marketing .txt-center {
text-align: center; text-align: center;
} }
...@@ -326,13 +382,24 @@ html { ...@@ -326,13 +382,24 @@ html {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.marketing .flex-align {
display: flex;
align-items: center;
}
.marketing .flex-top {
display: flex;
align-items: flex-start;
}
.marketing .flex-center { .marketing .flex-center {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.marketing .flex-between {
display: flex;
justify-content: space-between;
align-items: center;
}
.marketing .flex-grow { .marketing .flex-grow {
flex: 1; flex: 1;
} }
...@@ -456,6 +523,14 @@ html { ...@@ -456,6 +523,14 @@ html {
border-radius: 4px 0px 0px 0px; border-radius: 4px 0px 0px 0px;
border: 1px solid #f4f6fc !important; 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 { .el-message--info {
height: 40px; height: 40px;
...@@ -469,5 +544,35 @@ html { ...@@ -469,5 +544,35 @@ html {
color: #5850ff; color: #5850ff;
font-size: 16px; font-size: 16px;
} }
.marketing .text-14 {
font-size: 14px;
}
.marketing .text-16 {
font-size: 16px;
}
.marketing .color-3 {
color: #333333;
}
.marketing .line-20 {
line-height: 20px;
}
.marketin .weight-5 {
font-weight: 500;
}
.marketin .weight-4 {
font-weight: 400;
}
.el-tooltip__popper.is-light {
background: #ffffff;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08);
border: 1px solid #e4e7ed!important;
width: 177px;
box-sizing: border-box;
}
.el-tooltip__popper[x-placement^="top"] .popper__arrow {
border-top-color: #e4e7ed !important;
}
.el-tooltip__popper[x-placement^="top"] .popper__arrow:after {
border-top-color: #e4e7ed !important;
}
/* tab */ /* tab */

18.1 KB | W: | H:

108 KB | W: | H:

src/assets/memberCard.png
src/assets/memberCard.png
src/assets/memberCard.png
src/assets/memberCard.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -134,7 +134,7 @@ const orderTypesList = [ ...@@ -134,7 +134,7 @@ const orderTypesList = [
}, },
{ {
confId: 2, confId: 2,
confName: '会员卡' confName: '权益卡'
} }
] ]
const orderStatusList = [ const orderStatusList = [
......
...@@ -6,12 +6,11 @@ ...@@ -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"> <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 v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span> <span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'"> <el-popover placement="top" width="200" trigger="hover" :content="item.tips">
<span class="tips-icon"></span> <img slot="reference" class="tips-icon" src="./images/icon-tip.png" />
</el-tooltip> </el-popover>
{{ item.label }}
</span> </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 class="combi-form-label" :style="{ width: item.labelWidth ? item.labelWidth + labelPaddingRight + 'px' : '', 'padding-right': isEdit ? '12px' : labelPaddingRight + 'px' }">{{ item.label }}</span>
</span> </span>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot> <slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
...@@ -54,9 +53,12 @@ ...@@ -54,9 +53,12 @@
<slot :name="item.suffixSlot" :scope="item"></slot> <slot :name="item.suffixSlot" :scope="item"></slot>
</div> </div>
<!-- radio --> <!-- 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"> <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 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> </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> <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'"> <template v-else-if="item.type === 'upload'">
<p class="photo-top-tips">{{ item.topTips }}</p> <p class="photo-top-tips">{{ item.topTips }}</p>
...@@ -307,36 +309,20 @@ export default { ...@@ -307,36 +309,20 @@ export default {
background-color: #fff; background-color: #fff;
} }
/* 提示图标 */ /* 提示图标 */
.glsx-combi-form .tips-block { /* .glsx-combi-form .tips-block {
position: relative; position: relative;
} } */
.glsx-combi-form .tips-label { .glsx-combi-form .tips-label {
margin-right: 20px; margin-right: 2px;
} }
.glsx-combi-form .tips-icon { .glsx-combi-form .tips-icon {
position: absolute;
display: inline-block; display: inline-block;
width: 12px; width: 14px;
height: 12px; height: 14px;
top: 3px; margin-right: 12px;
right: 14px; vertical-align: middle;
margin-right: 4px;
cursor: pointer; 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 { .glsx-combi-form .combi-form-label {
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
......
<template>
<div class="el-descriptions">
<div class="el-descriptions__body">
<table class="el-descriptions__table is-bordered">
<tbody v-for="(item, index) in tableModel" :key="index">
<tr class="el-descriptions-row">
<template v-for="(trTtem, idx) in item.colList">
<th :key="idx" :colspan="trTtem.thColspan" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label">{{ trTtem.label }}</th>
<td :key="idx" :colspan="trTtem.tdColspan" class="el-descriptions-item__cell el-descriptions-item__content" :style="{ color: trTtem.color }">
<slot v-if="trTtem.addHtml" :name="trTtem.addHtml" :scope="list"></slot>
<span v-else>
{{ list[trTtem.name] ? list[trTtem.name] : ' — ' }}
</span>
</td>
</template>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
export default {
name: 'ylDescriptions',
props: {
tableModel: {
type: Array,
default: () => []
},
showData: {
type: Object,
default: () => {}
}
},
computed: {
list() {
return this.showData
}
}
}
</script>
<style lang="scss" scoped>
.el-descriptions .is-bordered {
table-layout: auto;
}
.el-descriptions__body .el-descriptions__table {
border-collapse: collapse;
table-layout: fixed;
}
.el-descriptions :not(.is-bordered) .el-descriptions-item__cell {
padding-bottom: 12px;
}
.el-descriptions .is-bordered .el-descriptions-item__cell {
border: 1px solid #ebeef5;
padding: 12px 10px;
}
.el-descriptions-item__label.is-bordered-label {
font-weight: 700;
color: #333333;
background: #f4f6fc;
}
.el-descriptions :not(.is-bordered) .el-descriptions-item__cell {
padding-bottom: 12px;
}
.el-descriptions .is-bordered .el-descriptions-item__cell {
border: 1px solid #e8e8ea;
padding: 7px 10px;
}
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell {
box-sizing: border-box;
text-align: left;
font-weight: 400;
line-height: 1.5;
width: 118px;
vertical-align: middle;
font-size: 14px;
}
.el-descriptions-item__content {
word-break: break-word;
overflow-wrap: break-word;
min-width: 238px;
}
</style>
<template>
<div>
<template v-if="rowParams.length > 0">
<div class="layout-wrap">
<el-row :gutter="30">
<template v-for="(params, index) in rowParams">
<!-- <template v-if="params.isHidden && params.isHidden(list)">
<el-col :span="params.span" :key="index">
<div class="label-wrap">
<label>{{ params.label }}</label>
<slot v-if="params.addHtml" :name="params.addHtml" :scope="list"></slot>
<span v-else>
{{ list[params.prop] }}
</span>
</div>
</el-col>
</template> -->
<template>
<el-col :span="params.span" :key="index">
<div class="label-wrap">
<label>{{ params.label }}</label>
<slot v-if="params.addHtml" :name="params.addHtml" :scope="list"></slot>
<span v-else>
{{ list[params.prop] }}
</span>
</div>
</el-col>
</template>
</template>
</el-row>
</div>
</template>
</div>
</template>
<script>
export default {
name: 'glsx-rows',
data() {
return {
list: '',
rowParams: ''
}
},
props: {
//获取的数据
layoutData: {
type: Object,
default: () => {}
},
layoutParams: {
type: Array,
default: () => []
}
},
watch: {
layoutData(val) {
this.list = val
let { layoutParams } = this
for (let i = 0; i < layoutParams.length; i++) {
if (layoutParams[i].isHidden && !layoutParams[i].isHidden(val)) {
layoutParams.splice(i--, 1)
}
}
this.rowParams = layoutParams
}
},
created() {}
}
</script>
<style scoped lang="scss">
.layout-wrap {
.el-row {
&:last-child {
margin-bottom: -20px;
}
.el-col {
margin-bottom: 20px;
}
.label-wrap {
display: flex;
align-items: center;
min-width: 80%;
label {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
text-align: right;
min-width: 70px;
display: inline-block;
}
span {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
text-align: left;
// max-width: 228px;
// white-space: nowrap;
// overflow: hidden;
// text-overflow: ellipsis;
// display: inline-block;
}
}
}
}
</style>
...@@ -15,6 +15,9 @@ import selectSingleProDialog from '@/components/selectSingleProDialog/index.vue' ...@@ -15,6 +15,9 @@ import selectSingleProDialog from '@/components/selectSingleProDialog/index.vue'
import relateStoreDialog from '@/components/relate-store-dialog' import relateStoreDialog from '@/components/relate-store-dialog'
import selectMutiProForcouponDialog from '@/components/selectMutiProDialog/indexForCoupon.vue' import selectMutiProForcouponDialog from '@/components/selectMutiProDialog/indexForCoupon.vue'
import tableTooltip from '@/components/table-tooltip/index.vue' 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-combi-form', glsxCombiForm)
Vue.component('glsx-dialog', glsxDialog) Vue.component('glsx-dialog', glsxDialog)
...@@ -23,3 +26,6 @@ Vue.component('select-single-pro-dialog', selectSingleProDialog) ...@@ -23,3 +26,6 @@ Vue.component('select-single-pro-dialog', selectSingleProDialog)
Vue.component('relate-store-dialog', relateStoreDialog) Vue.component('relate-store-dialog', relateStoreDialog)
Vue.component('select-muti-pro-forcoupon-dialog', selectMutiProForcouponDialog) Vue.component('select-muti-pro-forcoupon-dialog', selectMutiProForcouponDialog)
Vue.component('table-tooltip', tableTooltip) 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 \ No newline at end of file
...@@ -105,10 +105,12 @@ export default { ...@@ -105,10 +105,12 @@ export default {
this.productList.forEach(function(item) { this.productList.forEach(function(item) {
item.saleAmount = item.goodsStatistics.saleAmount item.saleAmount = item.goodsStatistics.saleAmount
if (item.specificationDetailList.length > 1) { if (item.specificationDetailList.length > 1) {
let retailPriceList = item.specificationDetailList.sort(function(a, b) { let retailPriceList = JSON.parse(JSON.stringify(item.specificationDetailList))
retailPriceList.sort((a, b) => {
return a.retailPrice - b.retailPrice return a.retailPrice - b.retailPrice
}) })
let stockeList = item.specificationDetailList.sort(function(a, b) { let stockeList = JSON.parse(JSON.stringify(item.specificationDetailList))
stockeList.sort((a, b) => {
return a.stock - b.stock return a.stock - b.stock
}) })
let minRatilPrice = retailPriceList[0].retailPrice / 100 let minRatilPrice = retailPriceList[0].retailPrice / 100
......
...@@ -27,17 +27,14 @@ ...@@ -27,17 +27,14 @@
</template> </template>
<script> <script>
// import { getGoodsList } from '@/api/modules/common'
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
export default { export default {
name: 'selectMutiProForcouponDialog', name: 'selectMutiProForcouponDialog',
data() { data() {
return { return {
// 表格组件 // 表格组件
// getListApi: this.$apis.common.getGoodsListApi,
productList: [], productList: [],
userInfo: {}, userInfo: {},
// pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
searchProForm: { searchProForm: {
name: '' name: ''
}, },
...@@ -97,8 +94,6 @@ export default { ...@@ -97,8 +94,6 @@ export default {
var params = { var params = {
goodsStatus: 1, goodsStatus: 1,
goodsSource: 1, goodsSource: 1,
// pageNum: isMounted ? 1 : this.$refs.mutiProRef.page.pageNum,
// pageSize: isMounted ? 10 : this.$refs.mutiProRef.page.pageSize
currentPage: 1, currentPage: 1,
pageNum: 1, pageNum: 1,
pageSize: 100000, pageSize: 100000,
...@@ -109,33 +104,8 @@ export default { ...@@ -109,33 +104,8 @@ export default {
this.$apis.couponManage.getAllGoodsApi(params).then(res => { this.$apis.couponManage.getAllGoodsApi(params).then(res => {
this.fnCallBack = true this.fnCallBack = true
// console.log(res) // console.log(res)
// this.productList = res
this.productList = res.list this.productList = res.list
// this.$refs.mutiProRef.tableTotal = res.total this.productList.forEach(function (item) {
this.productList.forEach(function(item) {
// item.saleAmount = item.goodsStatistics.saleAmount
// if (item.specificationDetailList.length > 1) {
// let retailPriceList = item.specificationDetailList.sort(function(a, b) {
// return a.retailPrice - b.retailPrice
// })
// let stockeList = item.specificationDetailList.sort(function(a, b) {
// return a.stock - b.stock
// })
// let minRatilPrice = retailPriceList[0].retailPrice / 100
// let maxRatilPrice = retailPriceList[retailPriceList.length - 1].retailPrice / 100
// let minStock = stockeList[0].stock
// let maxStock = stockeList[stockeList.length - 1].stock
// item.retailPrice = minRatilPrice == maxRatilPrice ? minRatilPrice.toFixed(2) : minRatilPrice.toFixed(2) + '-' + maxRatilPrice.toFixed(2)
// item.minRatilPrice = minRatilPrice.toFixed(2)
// item.goodsStock = minStock == maxStock ? minStock : minStock + '-' + maxStock
// } else if (item.specificationDetailList.length == 1) {
// item.retailPrice = (item.specificationDetailList[0].retailPrice / 100).toFixed(2)
// item.minRatilPrice = item.retailPrice
// item.goodsStock = item.specificationDetailList[0].stock
// } else {
// item.retailPrice = (item.retailPrice / 100).toFixed(2)
// item.minRatilPrice = item.retailPrice
// }
item.retailPrice = (item.retailPrice / 100).toFixed(2) item.retailPrice = (item.retailPrice / 100).toFixed(2)
}) })
this.recoverySelected() this.recoverySelected()
......
...@@ -83,6 +83,18 @@ const staticRoutes = Object.freeze([ ...@@ -83,6 +83,18 @@ const staticRoutes = Object.freeze([
meta: {} meta: {}
}, },
{ {
name: 'recordList',
path: '/couponManage/recordList',
component: resolve => require([`@/views/couponManage/recordList.vue`], resolve),
meta: {}
},
{
name: 'editMemberService',
path: '/couponManage/editMemberService',
component: resolve => require([`@/views/couponManage/editMemberService.vue`], resolve),
meta: {}
},
{
name: 'editCashCoupon', name: 'editCashCoupon',
path: '/couponManage/editCashCoupon/:addOrEdit', path: '/couponManage/editCashCoupon/:addOrEdit',
component: resolve => require([`@/views/couponManage/editCashCoupon.vue`], resolve), component: resolve => require([`@/views/couponManage/editCashCoupon.vue`], resolve),
......
...@@ -22,6 +22,8 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -22,6 +22,8 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$message = message Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
// 集团版集团账号
Vue.prototype.$isGroupUp = globalState.session.accountLevel != 4
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.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
......
...@@ -24,9 +24,11 @@ export async function start() { ...@@ -24,9 +24,11 @@ export async function start() {
// .forEach(item => { // .forEach(item => {
// urlParams[item.split('=')[0]] = item.split('=')[1] // urlParams[item.split('=')[0]] = item.split('=')[1]
// }) // })
var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'scrm-base-0958821a-6542-474e-b057-74a1192a25f2-rop' var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : ''
Vue.prototype.$http2 = new Http({ response, request: request2, sign, secret, alert: message.error, headers: { token } }) Vue.prototype.$http2 = new Http({ response, request: request2, sign, secret, alert: message.error, headers: { token } })
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } }) Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } })
// 集团版集团账号
Vue.prototype.$isGroupUp = false
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
Vue.prototype.$common = { utils: utils } Vue.prototype.$common = { utils: utils }
render('/', routes) render('/', routes)
......
...@@ -8,15 +8,15 @@ export function debounce(func, wait = 200) { ...@@ -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 date = new Date(dateTime)
const config = { const config = {
YYYY: date.getFullYear(), YYYY: date.getFullYear(),
MM: date.getMonth() + 1, //getMonth() 方法根据本地时间返回指定日期的月份(从 0 到 11) MM: date.getMonth() + 1, //getMonth() 方法根据本地时间返回指定日期的月份(从 0 到 11)
DD: date.getDate(), DD: date.getDate(),
HH: date.getHours(), HH: date.getHours(),
mm: date.getMinutes(), mm: date.getMinutes()<10?'0'+date.getMinutes():date.getMinutes(),
ss: date.getSeconds() ss: date.getSeconds()<10?'0'+date.getSeconds():date.getSeconds()
} }
for (const key in config) { for (const key in config) {
format = format.replace(key, config[key]) format = format.replace(key, config[key])
......
...@@ -162,8 +162,8 @@ export default { ...@@ -162,8 +162,8 @@ export default {
//时间段 //时间段
this.effective = coupon.effectiveStartTime + ' ~ ' + coupon.effectiveEndTime this.effective = coupon.effectiveStartTime + ' ~ ' + coupon.effectiveEndTime
} else if (coupon.effectiveType == 3) { } else if (coupon.effectiveType == 3) {
//无有效期 //永久有效
this.effective = '无有效期' this.effective = '永久有效'
} }
if (coupon.discountType == 3) { if (coupon.discountType == 3) {
......
...@@ -356,20 +356,6 @@ export default { ...@@ -356,20 +356,6 @@ export default {
this.$refs.selectLabel.init(this.tagging) this.$refs.selectLabel.init(this.tagging)
}, },
handleSubmit() { handleSubmit() {
// let arr = []
// this.tagging.forEach(item => {
// item.labelList.forEach(tag => {
// arr.push({
// groupId: parseInt(item.labelGroup.id),
// groupName: item.labelGroup.name,
// labelId: parseInt(tag.id),
// labelName: tag.name,
// groupType: item.labelType
// })
// })
// })
// this.taggingList = arr
// console.log(this.taggingList)
this.$refs.basicForm.validate(valid => { this.$refs.basicForm.validate(valid => {
if (valid) { if (valid) {
this.attachmentShow = true this.attachmentShow = true
...@@ -388,7 +374,7 @@ export default { ...@@ -388,7 +374,7 @@ export default {
this.attachmentText = '请输入群发内容' this.attachmentText = '请输入群发内容'
return return
} }
this.$refs.groupForm.validate(v => { this.$refs.groupForm.validate(async(v) => {
if (v) { if (v) {
const params = this.getSiftMembers() const params = this.getSiftMembers()
params.type = 1 params.type = 1
...@@ -406,7 +392,7 @@ export default { ...@@ -406,7 +392,7 @@ export default {
if (item.attType == 1) { if (item.attType == 1) {
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
const cutImg = item.attContent.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '') const cutImg = item.attContent.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) { const replaceImg = cutImg.replace(/(\d){3}.png">/g, function(str) {
let s = list[parseInt(str.split('.')[0]) - 1] let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]` return `[${s}]`
}) })
...@@ -421,6 +407,10 @@ export default { ...@@ -421,6 +407,10 @@ export default {
if (params.sendType == 2) { if (params.sendType == 2) {
params.sendTimeStr = this.basicForm.sendTime + ' ' + this.basicForm.sendDate params.sendTimeStr = this.basicForm.sendTime + ' ' + this.basicForm.sendDate
} }
const countParams = this.getSiftMembers()
const count = await this.$apis.customerTransform.customerCount(countParams)
console.log(count)
if (count) {
this.addLoading = true this.addLoading = true
this.$apis.customerTransform.insert(params).then(res => { this.$apis.customerTransform.insert(params).then(res => {
if (res.code == '-1') { if (res.code == '-1') {
...@@ -442,6 +432,12 @@ export default { ...@@ -442,6 +432,12 @@ export default {
this.addLoading = false this.addLoading = false
this.$router.push('/customerTransform/index') this.$router.push('/customerTransform/index')
}) })
} else {
this.$message({
type: 'error',
message: '客户数不可为0!'
})
}
} }
}) })
} }
...@@ -449,15 +445,6 @@ export default { ...@@ -449,15 +445,6 @@ export default {
}, },
handleSelect(val) { handleSelect(val) {
this.isUpdate = true this.isUpdate = true
// const arr = []
// if (val.length != 0) {
// val.forEach(item => {
// if (item.labelList.length != 0) {
// item.labelList.map(i => arr.push(i))
// }
// // arr.push(item.labelList)
// })
// }
this.tagging = val this.tagging = val
let arr = [] let arr = []
this.tagging.forEach(item => { this.tagging.forEach(item => {
...@@ -519,21 +506,17 @@ export default { ...@@ -519,21 +506,17 @@ export default {
} }
}, },
getSiftMembers() { getSiftMembers() {
const chatFlag = this.basicForm.condition.chat && this.basicForm.condition.chat.length
const tagFlag = this.tagging && this.tagging.length
const params = { const params = {
selectType: this.basicForm.selectType, selectType: this.basicForm.selectType
condition: { }
if (params.selectType == 2) {
const chatFlag = this.basicForm.condition.chat && this.basicForm.condition.chat.length
params.condition = {
sex: this.basicForm.condition.sex, sex: this.basicForm.condition.sex,
chatId: chatFlag ? this.basicForm.condition.chat.map(item => item.id).join(',') : '', chatId: chatFlag ? this.basicForm.condition.chat.map(item => item.id).join(',') : '',
chatName: chatFlag ? this.basicForm.condition.chat.map(item => item.groupName).join(',') : '', chatName: chatFlag ? this.basicForm.condition.chat.map(item => item.groupName).join(',') : '',
// tagId: "328,329,330", labelList: this.taggingList,
// tagName: "一般,重要,核心" combineType: 2
// tagId: tagFlag ? this.tagging.map(item => item.id).join(',') : '',
// tagName: tagFlag ? this.tagging.map(item => item.name).join(',') : ''
// tagId: JSON.stringify(this.tagging)
labelList: this.taggingList
}
} }
if (this.basicForm.condition.date) { if (this.basicForm.condition.date) {
let endTime = new Date(this.basicForm.condition.date[1]) let endTime = new Date(this.basicForm.condition.date[1])
...@@ -541,6 +524,7 @@ export default { ...@@ -541,6 +524,7 @@ export default {
params.condition.sTime = dayjs(this.basicForm.condition.date[0]).format('YYYY-MM-DD') params.condition.sTime = dayjs(this.basicForm.condition.date[0]).format('YYYY-MM-DD')
params.condition.eTime = dayjs(endTime).format('YYYY-MM-DD') params.condition.eTime = dayjs(endTime).format('YYYY-MM-DD')
} }
}
params.userList = this.basicForm.userList.map(item => { params.userList = this.basicForm.userList.map(item => {
return { return {
staffId: item.staffId, staffId: item.staffId,
...@@ -587,7 +571,9 @@ export default { ...@@ -587,7 +571,9 @@ export default {
const date = new Date(v).getTime() const date = new Date(v).getTime()
if (date < Date.now()) { if (date < Date.now()) {
this.timeOptions = { this.timeOptions = {
selectableRange: `${dayjs().add(1, 'm').format('HH:mm')}:00 - 23:59:59` selectableRange: `${dayjs()
.add(1, 'm')
.format('HH:mm')}:00 - 23:59:59`
} }
} else { } else {
this.timeOptions = { this.timeOptions = {
......
...@@ -329,6 +329,7 @@ export default { ...@@ -329,6 +329,7 @@ export default {
this.editForm.couponList.forEach(item => { this.editForm.couponList.forEach(item => {
this.couponObj[this.numToCoupon[item.discountType]].list.push(item) this.couponObj[this.numToCoupon[item.discountType]].list.push(item)
}) })
// console.log(this.couponObj, 'this.couponObj')
this.currentCoupons = this.$common.utils.deepClone(this.editForm.couponList) this.currentCoupons = this.$common.utils.deepClone(this.editForm.couponList)
this.currentPeople = this.$common.utils.deepClone(this.editForm.staffList) this.currentPeople = this.$common.utils.deepClone(this.editForm.staffList)
this.hasCouponBlock(false) this.hasCouponBlock(false)
...@@ -361,7 +362,7 @@ export default { ...@@ -361,7 +362,7 @@ export default {
this.couponObj[item].list.forEach(subItem => { this.couponObj[item].list.forEach(subItem => {
// 失效券不加入预估成本 // 失效券不加入预估成本
if (subItem.status != '3') { if (subItem.status != '3') {
this.totalEstimatedCost = this.totalEstimatedCost + parseInt(subItem.couponAnticipatedCost) * parseInt(subItem.couponAmount) this.totalEstimatedCost = this.totalEstimatedCost + parseInt(subItem.couponAnticipatedCost || 0) * parseInt(subItem.couponAmount)
} }
}) })
}) })
...@@ -386,11 +387,13 @@ export default { ...@@ -386,11 +387,13 @@ export default {
}, },
handleGiftAdd() { handleGiftAdd() {
// console.log(this.couponObj, '')
this.selectedGiftList = JSON.parse(JSON.stringify(this.couponObj)) this.selectedGiftList = JSON.parse(JSON.stringify(this.couponObj))
this.handleGiftClose() this.handleGiftClose()
}, },
handleGiftConfirm(selectedData) { handleGiftConfirm(selectedData) {
console.log(selectedData)
this.handleGiftClose() this.handleGiftClose()
this.couponObj = selectedData this.couponObj = selectedData
this.recoveryTotalPrice() this.recoveryTotalPrice()
...@@ -468,7 +471,7 @@ export default { ...@@ -468,7 +471,7 @@ export default {
.then(() => { .then(() => {
this.insertHttp(params) this.insertHttp(params)
}) })
.catch(() => {}) .catch(() => { })
} else { } else {
this.insertHttp(params) this.insertHttp(params)
} }
...@@ -509,7 +512,7 @@ export default { ...@@ -509,7 +512,7 @@ export default {
.then(() => { .then(() => {
this.cancelJump() this.cancelJump()
}) })
.catch(() => {}) .catch(() => { })
} else { } else {
this.cancelJump() this.cancelJump()
} }
......
...@@ -250,7 +250,7 @@ export default { ...@@ -250,7 +250,7 @@ export default {
toLabelText(row) { toLabelText(row) {
switch (row.effectiveType) { switch (row.effectiveType) {
case 3: case 3:
return '无有效期' return '永久有效'
case 2: case 2:
return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : '' return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : ''
case 1: case 1:
......
<template> <template>
<div class="live-room"> <div class="marketing live-room">
<div class="memberCardWrap" v-if="!(merchantModel == 2 && accountLevel == 1)"> <div class="memberCardWrap" v-if="!(merchantModel == 2 && accountLevel == 1)">
<div class="cardBoxWrap"> <div class="cardBoxWrap">
<img src="@/assets/memberCard.png" alt="" /> <img src="@/assets/memberCard.png" alt="" />
<div class="masonry"> <!-- <div class="masonry">
<img src="@/assets/masonry.png" alt="" /> <img src="@/assets/masonry.png" alt="" />
</div> </div> -->
<div class="memberCardName">{{ ruleForm.cardName }}</div> <div class="memberCardName">{{ ruleForm.cardName }}</div>
</div> </div>
<div class="cardDetail" v-if="!isShowEditWrap"> <div class="cardDetail" v-if="!isShowEditWrap">
<div class="flex-1"> <div class="flex-1">
<p>{{ ruleForm.cardName }}</p> <p>
{{ ruleForm.cardName }}
<el-tooltip content="会员已包含基础权益:生活权益、商城折扣" effect="light" placement="top">
<img class="icon-circle-question" src="@/assets/icon-circle-question.png" alt="" @click="isshow = true" />
</el-tooltip>
</p>
<GLButton @click="openEditWrap" fn="编辑" mode="div"><img src="@/assets/editBlue.png" class="editIcon" @click="openEditWrap" alt="" /></GLButton> <GLButton @click="openEditWrap" fn="编辑" mode="div"><img src="@/assets/editBlue.png" class="editIcon" @click="openEditWrap" alt="" /></GLButton>
</div> </div>
<!-- <img src="@/assets/edit.png" class="editIcon" @click="openEditWrap" alt="" /> --> <!-- <img src="@/assets/edit.png" class="editIcon" @click="openEditWrap" alt="" /> -->
<div class="row"> <div class="row">
<span>售价:</span> <span>售价:</span>
<span class="price" v-if="ruleForm.price">¥{{ ruleForm.price }}</span> <span class="price text-e8" v-if="ruleForm.price">¥{{ ruleForm.price }}</span>
</div> </div>
<div class="row"> <div class="row">
<span>市场价:</span> <span>市场价:</span>
...@@ -31,7 +36,7 @@ ...@@ -31,7 +36,7 @@
<span>会员卡试用:</span> <span>会员卡试用:</span>
<span class="membershipDays" v-if="ruleForm.tryAble == 1">{{ ruleForm.tryNum }}天试用</span> <span class="membershipDays" v-if="ruleForm.tryAble == 1">{{ ruleForm.tryNum }}天试用</span>
<span class="membershipDays" v-else>已关闭</span> <span class="membershipDays" v-else>已关闭</span>
<span class="lookQR" @click="extensionQR" v-if="ruleForm.tryAble == 1">查看小程序推广码</span> <span class="lookQR" @click="extensionQR" v-if="ruleForm.tryAble == 1">生成小程序码推广码></span>
<!-- <el-button class="lookQR" size="small" type="primary" @click="extensionQR" v-if="ruleForm.tryAble==1">生成小程序推广码</el-button> --> <!-- <el-button class="lookQR" size="small" type="primary" @click="extensionQR" v-if="ruleForm.tryAble==1">生成小程序推广码</el-button> -->
</div> </div>
<el-button class="seeEquity" size="small" type="primary" @click="openDialog">查看权益</el-button> <el-button class="seeEquity" size="small" type="primary" @click="openDialog">查看权益</el-button>
...@@ -78,9 +83,9 @@ ...@@ -78,9 +83,9 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="pageTitle" v-if="!(merchantModel == 2 && accountLevel == 1)">会员用户</div> -->
<p class="pageTitle" v-if="!(merchantModel == 2 && accountLevel == 1)">会员中心</p> <div class="pageTitle">会员用户</div>
<div class="live-room container"> <div class="live-room container p-t-20 ">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right"> <el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-row> <el-row>
<el-form-item size="small" label="会员用户"> <el-form-item size="small" label="会员用户">
...@@ -106,17 +111,24 @@ ...@@ -106,17 +111,24 @@
</el-form-item> </el-form-item>
<el-form-item size="small" label="开通方式" style="margin-left: -10px"> <el-form-item size="small" label="开通方式" style="margin-left: -10px">
<el-select size="small" v-model="searchForm.activeType" placeholder="请选择"> <el-select size="small" v-model="searchForm.activeType" placeholder="请选择">
<el-option v-for="item in openModeLists" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option> <el-option v-for="item in openModeLists" :key="item.activeType" :label="item.activeTypeDesc" :value="item.activeType"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item size="small" class="fr-mr0"> <el-form-item size="small" class="fr-mr0">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
<el-button :size="size" @click="handleReset">重置</el-button> <el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<div class="flex-between m-b-10 m-t-10">
<div class="text-16 color-3 weight-5">会员列表</div>
<div class="export" @click="handleExport">全部导出</div>
</div>
<GLTable ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="cardInfo" slot-scope="scope">
<GLTable ref="cardListRef" :hasNum="false" :hasPage="false" :noDataImg="url" :tableParams="cardParams" :tableData="scope.scope.list"></GLTable>
</div>
<span slot="accountName" slot-scope="scope"> <span slot="accountName" slot-scope="scope">
<div>{{ scope.scope.accountName }}</div> <div>{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div> <div>{{ scope.scope.mobile }}</div>
...@@ -181,9 +193,14 @@ const cloneText = message => { ...@@ -181,9 +193,14 @@ const cloneText = message => {
document.body.removeChild(input) document.body.removeChild(input)
} }
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent, memberExportApi, getQrUrl } from '@/api/modules/center' import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent, memberExportApi, getQrUrl, getCardtypeList } from '@/api/modules/center'
import { statusList, memberTypeList, exportFn } from '@/common/constant' import { statusList, memberTypeList, exportFn } from '@/common/constant'
export default { export default {
filters: {
filterTable(list, data) {
return data
}
},
components: { components: {
glsxDialog glsxDialog
}, },
...@@ -278,13 +295,18 @@ export default { ...@@ -278,13 +295,18 @@ export default {
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '',
prop: '',
columnattrs: {
type: 'expand'
},
addHtml: 'cardInfo'
},
{
label: '会员用户', label: '会员用户',
prop: 'accountName', prop: 'accountName',
width: '180', width: '180',
addHtml: 'accountName' addHtml: 'accountName'
// formatter: cellValue => {
// return cellValue.startTime + '-' + cellValue.endTime
// }
}, },
{ {
label: '会员类型', label: '会员类型',
...@@ -294,6 +316,19 @@ export default { ...@@ -294,6 +316,19 @@ export default {
} }
}, },
{ {
label: '状态',
prop: 'status',
formatter: cellValue => {
return this.baseDataList.statusList.find(item => item.confId == cellValue.memberStatus).confName
}
}
]
},
cardParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '开通门店', label: '开通门店',
prop: 'merchantName' prop: 'merchantName'
}, },
...@@ -304,14 +339,6 @@ export default { ...@@ -304,14 +339,6 @@ export default {
{ {
label: '开通日期', label: '开通日期',
prop: 'activeTime' prop: 'activeTime'
// addHtml: 'activeTime'
},
{
label: '状态',
prop: 'status',
formatter: cellValue => {
return this.baseDataList.statusList.find(item => item.confId == cellValue.status).confName
}
} }
] ]
}, },
...@@ -359,9 +386,18 @@ export default { ...@@ -359,9 +386,18 @@ export default {
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel
} }
this.getCardContentFun() this.getCardContentFun()
this.getCardtypeList()
}, },
mounted() {}, mounted() {},
methods: { methods: {
//门店会员开通方式
getCardtypeList() {
getCardtypeList({}).then(res => {
if (res.code == 0) {
this.openModeLists = res.data
}
})
},
// 复制链接按钮 // 复制链接按钮
closeText(val) { closeText(val) {
cloneText(val) cloneText(val)
...@@ -369,7 +405,7 @@ export default { ...@@ -369,7 +405,7 @@ export default {
}, },
// 查看小程序推广码 // 查看小程序推广码
extensionQR() { extensionQR() {
console.log(this.ruleForm.equityId) // console.log(this.ruleForm.equityId)
const params = { const params = {
id: this.ruleForm.equityId id: this.ruleForm.equityId
...@@ -397,7 +433,8 @@ export default { ...@@ -397,7 +433,8 @@ export default {
str = '' str = ''
} //限制只能输入一个小数点 } //限制只能输入一个小数点
if (value !== '' && value == 0) { if (value !== '' && value == 0) {
return (str = 1) // return (str = 1)
return (str = 0.01)
} }
if (Number(value) >= 99999) { if (Number(value) >= 99999) {
return (str = 99999) return (str = 99999)
...@@ -536,7 +573,7 @@ export default { ...@@ -536,7 +573,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .el-input-number--small{ /deep/ .el-input-number--small {
width: 53px; width: 53px;
margin: 0 3px; margin: 0 3px;
} }
...@@ -587,13 +624,17 @@ export default { ...@@ -587,13 +624,17 @@ export default {
.memberCardWrap { .memberCardWrap {
display: flex; display: flex;
background-color: #fff; background-color: #fff;
height: 172px; height: 190px;
box-sizing: border-box; box-sizing: border-box;
margin: 20px 0px; margin-top: 20px;
padding: 15px 20px; padding: 10px 8px;
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1); box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1);
.cardBoxWrap { .cardBoxWrap {
position: relative; position: relative;
img {
width: 321px;
height: 174px;
}
.masonry { .masonry {
position: absolute; position: absolute;
top: 40px; top: 40px;
...@@ -601,11 +642,13 @@ export default { ...@@ -601,11 +642,13 @@ export default {
} }
.memberCardName { .memberCardName {
position: absolute; position: absolute;
font-size: 15px; font-size: 17px;
color: #8e5310; font-weight: 600;
font-weight: 700; color: #ffd690;
top: 54px; line-height: 24px;
left: 88px; background: radial-gradient(125deg, #fde8bf 0%, #dda15f 100%);
top: 116px;
margin: 0 28px;
} }
} }
.cardDetail { .cardDetail {
...@@ -614,6 +657,11 @@ export default { ...@@ -614,6 +657,11 @@ export default {
padding-top: 8px; padding-top: 8px;
margin-left: 10px; margin-left: 10px;
position: relative; position: relative;
.icon-circle-question {
width: 16px;
height: 16px;
}
.seeEquity { .seeEquity {
position: absolute; position: absolute;
right: 0; right: 0;
...@@ -637,9 +685,10 @@ export default { ...@@ -637,9 +685,10 @@ export default {
bottom: 0; bottom: 0;
} }
.editIcon { .editIcon {
margin-left: 10px; margin-left: 6px;
vertical-align: middle; vertical-align: middle;
cursor: pointer; cursor: pointer;
width: 12.8px;
} }
.flex-1 { .flex-1 {
display: flex; display: flex;
...@@ -679,14 +728,29 @@ export default { ...@@ -679,14 +728,29 @@ export default {
.pageTitle { .pageTitle {
position: relative; position: relative;
padding: 0 0px; padding: 15px 20px;
height: 20px; margin-bottom: -20px;
font-size: 20px; font-size: 16px;
font-weight: 700; font-weight: 500;
color: #333333; color: #333333;
line-height: 20px; line-height: 28px;
letter-spacing: 1px; border-bottom: 1px solid #d8d8d8;
background-color: #fff;
margin-top: 20px;
} }
.export {
height: 32px;
border-radius: 4px;
border: 1px solid #5850ff;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 14px;
padding: 9px 20px;
box-sizing: border-box;
cursor: pointer;
}
.el-form-item { .el-form-item {
margin-bottom: 15px; margin-bottom: 15px;
} }
......
<template>
<div>
<template v-for="(item, index) in orderShow">
<div class="flex-top m-b-8" v-show="coupontData[item].list.length" :key="index">
<div class="content-meal-logo" :key="item.discountType">
<img :src="coupontData[item].logo" alt="" />
</div>
<div class="flex-align content-meal-list">
<template v-for="(subItem, subIndex) in coupontData[item].list">
<div class="every color-3 text-14 weight-4 line-20" :key="subIndex">{{ subItem.couponName }} × {{ subItem.serviceQuantity }}</div>
</template>
</div>
</div>
</template>
</div>
</template>
<script>
export default {
data() {
return {
orderShow: ['service', 'cash', 'discount', 'exchange'],
couponObj: {
// 折扣券
discount: {
label: '折扣券',
discountType: 2,
list: [],
logo: require('../../../assets/coupon/icon-discount.png')
},
// 代金券
cash: {
label: '代金券',
discountType: 3,
list: [],
logo: require('../../../assets/coupon/icon-cash.png')
},
// 兑换券
exchange: {
label: '兑换券',
discountType: 4,
list: [],
logo: require('../../../assets/coupon/icon-exchange.png')
},
service: {
label: '会员服务',
discountType: 7,
list: [],
logo: require('../../../assets/coupon/icon-service.png')
}
},
numToCoupon: {
2: 'discount',
3: 'cash',
4: 'exchange',
7: 'service'
}
}
},
computed: {
coupontData() {
let { couponObj, orderShow, choseItemList, numToCoupon } = this
orderShow.forEach(item => {
couponObj[item].list = []
})
choseItemList.forEach(item => {
couponObj[numToCoupon[item.discountType]].list.push(item)
})
return couponObj
}
},
props: {
choseItemList: {
type: Array,
default: () => []
}
}
}
</script>
<style lang="scss" scoped>
.content-meal-logo {
width: 58px;
height: 22px;
margin-right: 20px;
img {
width: 100%;
}
}
.content-meal-list {
width: calc(100% - 86px);
flex-wrap: wrap;
.every {
margin-right: 80px;
display: flex;
align-items: center;
}
.every::before {
content: '';
width: 6px;
height: 6px;
background: #5850ff;
border-radius: 50%;
margin-right: 7px;
display: inline-block;
}
}
</style>
<template> <template>
<div class="live-room"> <div class="live-room marketing">
<div class="live-room container"> <div class="live-room container">
<div class="flex"> <div class="flex">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right"> <el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<el-input :size="size" v-model="searchForm.packageName" placeholder="请输入名称" clearable></el-input> <el-input :size="size" v-model="searchForm.packageName" placeholder="请输入名称" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="类型" style="margin-left: -10px"> <el-form-item size="small" label="类型" style="margin-left: -10px">
<el-select size="small" v-model="searchForm.orderType" :disabled="merchantModel == 1 && accountLevel == 1" 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-option v-for="item in orderTypeList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -23,7 +23,9 @@ ...@@ -23,7 +23,9 @@
<el-form-item size="small" label="下单时间" style="margin-left: 20px"> <el-form-item size="small" label="下单时间" style="margin-left: 20px">
<el-date-picker :size="size" v-model="searchForm.daterange" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions || {}"></el-date-picker> <el-date-picker :size="size" v-model="searchForm.daterange" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item size="small" label="开通门店" style="margin-left: -10px">
<el-input :size="size" v-model="searchForm.merchantName" placeholder="请输入门店" clearable></el-input>
</el-form-item>
<el-form-item size="small" class="fr-mr0"> <el-form-item size="small" class="fr-mr0">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button> <el-button :size="size" type="primary" @click="handleExport">导出</el-button>
...@@ -32,33 +34,48 @@ ...@@ -32,33 +34,48 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<div class="choseRow"> <div class="choseRow m-b-10">
<div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index + 1)"> <div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index + 1)">
{{ item }} {{ item }}
</div> </div>
</div> </div>
<GLTable ref="memberOrderRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberOrderRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<!-- <span slot="shareImgUrl" slot-scope="scope"> <template slot="orderType" slot-scope="scope">
<img class="img-60" :src="scope.scope.shareImgUrl" /> <template v-if="scope.scope.orderType == 1">
</span> --> <span>{{ scope.scope.packageType == 1 ? '门店套餐' : '集团套餐' }}</span>
</template>
<template v-else>
<span>会员卡</span>
</template>
</template>
<span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope"> <span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType == 1">详情</el-button> <!-- <el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType == 1">详情</el-button>
<el-button type="text" style="color:#eee" v-else>详情</el-button> --> <el-button type="text" style="color:#eee" v-else>详情</el-button> -->
<GLButton @click="handleDetail(scope.scope)" fn="订单详情" type="text" v-if="scope.scope.orderType == 1">详情</GLButton> <GLButton @click="handleDetail(scope.scope)" fn="订单详情" type="text" v-if="scope.scope.orderType == 1">详情</GLButton>
<GLButton style="color: #eee" fn="订单详情" type="text" v-else>详情</GLButton> <GLButton style="color: #eee" fn="订单详情" type="text" v-else>详情</GLButton>
<GLButton fn="退款" v-if="scope.scope.refundFlag == 1" type="text" @click="handleRefund(scope.scope)">退款</GLButton>
</span> </span>
</GLTable> </GLTable>
</div> </div>
<glsx-dialog class="refund-fill-box" :width="'720px'" title="退款确认" :isVisible="refundVisible" @confirmDialog="refundConfirmDialog" @closeDialog="refundVisible = false" :isShowCloseBtn="true">
<div class="dialog-form">
<label>说明:</label>
<el-input v-model.trim="refund" type="textarea" :rows="3" placeholder="请输入退款说明"></el-input>
</div>
</glsx-dialog>
</div> </div>
</template> </template>
<script> <script>
import { orderTypesList, orderStatusList, exportFn } from '@/common/constant' import { orderTypesList, orderStatusList, exportFn } from '@/common/constant'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { getOrderListApi, orderExportApi } from '@/api/modules/order' import { getOrderListApi, orderExportApi, orderRefund } from '@/api/modules/order'
export default { export default {
data() { data() {
return { return {
orderCode: '',
refund: '',
refundVisible: false,
merchantModel: 1, //集团:1,门店:2 merchantModel: 1, //集团:1,门店:2
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店 accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
url: url, url: url,
...@@ -104,16 +121,14 @@ export default { ...@@ -104,16 +121,14 @@ export default {
label: '名称', label: '名称',
prop: 'packageName', prop: 'packageName',
width: '180' width: '180'
// formatter: cellValue => {
// return cellValue.startTime + '-' + cellValue.endTime
// }
}, },
{ {
label: '类型', label: '类型',
prop: 'orderType', prop: 'orderType',
formatter: cellValue => { addHtml: 'orderType'
return this.baseDataList.orderTypesList.find(item => item.confId == cellValue.orderType).confName // formatter: cellValue => {
} // return this.baseDataList.orderTypesList.find(item => item.confId == cellValue.orderType).confName
// }
}, },
{ {
label: '价格', label: '价格',
...@@ -134,15 +149,25 @@ export default { ...@@ -134,15 +149,25 @@ export default {
{ {
label: '下单时间', label: '下单时间',
prop: 'createDate', prop: 'createDate',
width: 95 width: 160
},
{
label: '开通门店',
prop: 'merchantName',
width: '180'
}, },
{ {
label: '用户信息', label: '用户信息',
prop: 'accountName' prop: 'accountName',
formatter: cellValue => {
return cellValue.accountName + ' ' + cellValue.mobile
}
}, },
{ {
label: '订单号', label: '订单号',
prop: 'orderCode' prop: 'orderCode',
width: 190
} }
] ]
}, },
...@@ -154,12 +179,8 @@ export default { ...@@ -154,12 +179,8 @@ export default {
}, },
created() { created() {
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
console.log('kkk', this.$globalState)
this.merchantModel = this.$globalState.session.merchantModel this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel
if (this.merchantModel == 1 && this.accountLevel == 1) {
this.searchForm.orderType = 2
}
} }
}, },
mounted() {}, mounted() {},
...@@ -213,13 +234,40 @@ export default { ...@@ -213,13 +234,40 @@ export default {
resolve() resolve()
}) })
}, },
handleRefund(data) {
this.orderCode = data.orderCode
this.refund = ''
this.refundVisible = !this.refundVisible
},
refundConfirmDialog() {
if (this.refund == '') {
this.$message({
message: '请输入退款说明',
type: 'error'
})
return
}
const params = {
reason: this.refund,
orderCode: this.orderCode
}
//申请退款
orderRefund(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功,正在为该客户进行退款' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.refundVisible = !this.refundVisible
this.handleSearch()
}
})
},
handleDetail(row) { handleDetail(row) {
this.$router.push({ this.$router.push({
path: '/memberCenter/orderDetail', path: '/memberCenter/orderDetail',
query: { query: {
id: row.id, id: row.id
detail: row
} }
}) })
}, },
...@@ -243,6 +291,7 @@ export default { ...@@ -243,6 +291,7 @@ export default {
this.currentIndex = 1 this.currentIndex = 1
this.searchForm = {} this.searchForm = {}
this.searchForm.orderStatus = '' //默认查询全部 this.searchForm.orderStatus = '' //默认查询全部
this.searchForm.orderType = ''
// this.handleSearch() // this.handleSearch()
this.$nextTick(() => { this.$nextTick(() => {
this.isReload = true this.isReload = true
...@@ -268,21 +317,43 @@ export default { ...@@ -268,21 +317,43 @@ export default {
.container { .container {
.choseRow { .choseRow {
display: flex; display: flex;
height: 34px; height: auto;
position: relative;
width: 285px;
left: calc(100% - 285px);
.choseItem { .choseItem {
display: inline-block;
cursor: pointer; cursor: pointer;
width: 120px;
height: 34px;
line-height: 34px;
text-align: center; text-align: center;
font-size: 14px; font-size: 12px;
font-weight: 400; font-weight: 400;
color: #333333; color: rgba(0, 0, 0, 0.65);
line-height: 32px;
width: 70px;
height: 32px;
background: #ffffff;
border-right: 1px solid #d5d5d5;
border-top: 1px solid #d5d5d5;
border-bottom: 1px solid #d5d5d5;
// border-left: 1px solid #d5d5d5;
} }
.active { .active {
color: #5850ff; color: #ffffff;
background-color: #f4f6fc; background: #5850ff;
}
}
.choseItem:nth-child(1) {
border-left: 1px solid #d5d5d5;
}
}
.refund-fill-box {
height: 320px;
.dialog-form {
padding: 26px 36px 46px 36px;
box-sizing: border-box;
display: flex;
label {
white-space: nowrap;
} }
} }
} }
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<script> <script>
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
import { getRecordListApi, getVerificationCode, verificationExportApi } from '@/api/modules/record' // import { getRecordListApi, getVerificationCode, verificationExportApi } from '@/api/modules/record'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { dateFormat } from '@/utils/index.js' import { dateFormat } from '@/utils/index.js'
import { exportFn } from '@/common/constant' import { exportFn } from '@/common/constant'
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
// 44187877 // 44187877
searchFormTable: {}, searchFormTable: {},
// 表格组件 // 表格组件
getListApi: getRecordListApi, getListApi: this.$apis.record.getRecordListApi,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数 // 表格参数
tableParams: { tableParams: {
...@@ -233,7 +233,7 @@ export default { ...@@ -233,7 +233,7 @@ export default {
let params = {} let params = {}
params.verficationCode = this.ruleForm.verficationCode params.verficationCode = this.ruleForm.verficationCode
// params.discountTypes=[7] // params.discountTypes=[7]
getVerificationCode(params).then(res => { this.$apis.record.getVerificationCode(params).then(res => {
if (res) { if (res) {
this.handleClose() this.handleClose()
this.handleSearch() this.handleSearch()
...@@ -262,7 +262,7 @@ export default { ...@@ -262,7 +262,7 @@ export default {
handleExport(row) { handleExport(row) {
var params = this.getParams() var params = this.getParams()
verificationExportApi(params).then(res => { this.$apis.record.verificationExportApi(params).then(res => {
exportFn(res) exportFn(res)
}) })
}, },
......
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
toLabelText(row) { toLabelText(row) {
switch (row.effectiveType) { switch (row.effectiveType) {
case 3: case 3:
return '无有效期' return '永久有效'
case 2: case 2:
return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : '' return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : ''
case 1: case 1:
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-form-item size="small" label="有效期" prop="effectiveType"> <el-form-item size="small" label="有效期" prop="effectiveType">
<div class="radioGroupWrap"> <div class="radioGroupWrap">
<el-radio-group v-model="ruleForm.effectiveType" :disabled="disabledContent"> <el-radio-group v-model="ruleForm.effectiveType" :disabled="disabledContent">
<el-radio :label="3" class="itemBlock">无有效期</el-radio> <el-radio :label="3" class="itemBlock">永久有效</el-radio>
<!-- effectiveType:1, effectiveDays:5 --> <!-- effectiveType:1, effectiveDays:5 -->
<el-radio :label="1"> <el-radio :label="1">
领取后 领取后
...@@ -239,7 +239,7 @@ export default { ...@@ -239,7 +239,7 @@ export default {
// delivery: false, // delivery: false,
// type: [], // type: [],
// resource: '', // resource: '',
effectiveType: 3, //有效期(默认无有效期) effectiveType: 3, //有效期(默认永久有效)
effectiveDays: '', effectiveDays: '',
customUseLimit: 0, //使用限制(默认不限制使用次数) customUseLimit: 0, //使用限制(默认不限制使用次数)
limitTime1: 1, limitTime1: 1,
......
<template> <template>
<div class="live-room"> <div class="marketing">
<tip-panel panelWidth="616px" panelMinHeight="40px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel>
<div class="live-room container">
<div class="btnWrap"> <div class="btnWrap">
<!-- <el-button :size="size" type="primary" @click="handleCreate" icon="el-icon-plus">创建套餐</el-button> --> <!-- <el-button :size="size" type="primary" @click="handleCreate" icon="el-icon-plus">创建套餐</el-button> -->
<GLButton type="primary" @click="handleCreate" size="small" icon="el-icon-plus" fn="创建套餐" mode="el-button">创建套餐</GLButton> <GLButton type="primary" @click="handleCreate" size="small" icon="el-icon-plus" fn="创建套餐" mode="el-button">创建套餐</GLButton>
<el-button :size="size" @click="showViewer = true">查看示例效果</el-button> <!-- <el-button :size="size" @click="showViewer = true">查看示例效果</el-button> -->
<el-image-viewer <el-image-viewer
v-if="showViewer" v-if="showViewer"
:on-close=" :on-close="
...@@ -17,14 +15,30 @@ ...@@ -17,14 +15,30 @@
style="padding:4%;" style="padding:4%;"
/> />
</div> </div>
<tip-panel class="list-panel" panelMinHeight="40px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel>
<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>
</template>
</div>
</template>
<div class="live-room container">
<GLTable ref="memberSetMealRef" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberSetMealRef" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="list" slot-scope="scope"> <span slot="list" slot-scope="scope">
<div v-for="(item, index) in scope.scope.list" :key="index">{{ item.couponName }}×{{ item.serviceQuantity }}</div> <div class="content-meal">
<div class="text-14 color-3 line-20 weight-5 m-b-10">套餐内容</div>
<ticket :choseItemList="scope.scope.list"></ticket>
</div>
</span> </span>
<span class="table-btns" slot="optionsFun" slot-scope="scope" :data="scope.scope"> <span class="table-btns" slot="optionsFun" slot-scope="scope" :data="scope.scope">
<template v-if="!(accountLevel == 4 && activetab == 1)">
<template v-if="scope.scope.state === 0"> <template v-if="scope.scope.state === 0">
<!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button> <!-- <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> --> <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton type="text" @click="handleEdit(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="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
...@@ -44,6 +58,9 @@ ...@@ -44,6 +58,9 @@
<GLButton type="text" @click="handleUpOption(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="handleDelete(scope.scope)" fn="删除">删除</GLButton>
</template> </template>
<GLButton type="text" @click="handleUpdateToTop(scope.scope)" v-if="scope.scope.topFlag == 2 && accountLevel != 4" fn="置顶推荐">置顶推荐</GLButton>
<el-button type="text" v-if="scope.scope.topFlag == 1 && accountLevel != 4">已置顶推荐</el-button>
</template>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -71,15 +88,17 @@ ...@@ -71,15 +88,17 @@
<script> <script>
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { getSetMealListApi, deleteSetMeal, upDownPackage } from '@/api/modules/setmeal' import { getghSetMealListApi, getSetMealstoreListApi, deleteSetMeal, upDownPackage, updateToTop } from '@/api/modules/setmeal'
import { getLoginCount } from '@/api/modules/service' import { getLoginCount } from '@/api/modules/service'
import { stateList } from '@/common/constant' import { stateList } from '@/common/constant'
import tipPanel from '@/components/tipPanel/index.vue' import tipPanel from '@/components/tipPanel/index.vue'
import ticket from './components/ticket.vue'
export default { export default {
components: { components: {
tipPanel, tipPanel,
glsxDialog, glsxDialog,
ticket,
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer') 'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer')
}, },
data() { data() {
...@@ -89,13 +108,23 @@ export default { ...@@ -89,13 +108,23 @@ export default {
surl: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/memberCase.png', surl: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/memberCase.png',
srcList: ['https://img01.glsx.com.cn/weapp/resource/saas/scrm/memberCase.png'], srcList: ['https://img01.glsx.com.cn/weapp/resource/saas/scrm/memberCase.png'],
isFirstShow: false, isFirstShow: false,
panelContent: '会员套餐:将已经创建好的会员服务打包成一个套餐售卖给客户。', panelContent: '会员套餐将会展示在小程序端【会员开通】页,客户开通会员时可选择性通过购买套餐方式开通会员或直接付费开通会员。',
size: 'small', size: 'small',
getListApi: getSetMealListApi,
searchForm: { searchForm: {
merchantId: 44184606 merchantId: 44184606
// merchantName // merchantName
}, },
tabList: [
{
text: '本店套餐',
checked: true
},
{
text: '集团套餐',
checked: false
}
],
activetab: 0,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数 // 表格参数
tableParams: { tableParams: {
...@@ -103,34 +132,35 @@ export default { ...@@ -103,34 +132,35 @@ export default {
// tableOption: true, // tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '套餐名称', label: '',
prop: 'packageName', prop: '',
width: '180' columnattrs: {
type: 'expand'
}, },
{ addHtml: 'list'
label: '套餐售价',
prop: 'packagePrice',
line: 1
}, },
{ {
label: '套餐总价', label: '套餐名称',
prop: 'referencePrice' prop: 'packageName',
width: 220
}, },
{ {
label: '套餐内容', label: '套餐售价/元',
prop: 'list', prop: 'packagePrice'
addHtml: 'list'
}, },
{ {
label: '说明', label: '说明',
prop: 'notes', prop: 'notes',
width: 160, width: 300,
line: 4 line: 4
}, },
{ {
label: '售出数量',
prop: 'buyNumber'
},
{
label: '状态', label: '状态',
prop: 'state', prop: 'state',
width: '80',
formatter: cellValue => { formatter: cellValue => {
return this.baseDataList.stateList.find(item => item.confId == cellValue.state).confName return this.baseDataList.stateList.find(item => item.confId == cellValue.state).confName
} }
...@@ -139,7 +169,7 @@ export default { ...@@ -139,7 +169,7 @@ export default {
label: '操作', label: '操作',
prop: 'optionsFun', prop: 'optionsFun',
addHtml: 'optionsFun', addHtml: 'optionsFun',
width: 160 width: 220
} }
] ]
}, },
...@@ -147,14 +177,67 @@ export default { ...@@ -147,14 +177,67 @@ export default {
stateList: stateList stateList: stateList
}, },
//查看示例 --弹窗 //查看示例 --弹窗
isDialogVisible: false isDialogVisible: false,
merchantModel: 1, //集团:1,门店:2
accountLevel: 0 //1,2,3,4工厂,省代,市代,门店
}
},
computed: {
getListApi() {
const { activetab } = this
let listApi = ''
if (activetab == 1) {
listApi = getghSetMealListApi
} else {
listApi = getSetMealstoreListApi
}
return listApi
} }
}, },
created() { 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
if (this.accountLevel != 4) {
this.activetab = 1
}
}
this.searchForm = {
merchantId: this.merchantId
// merchantName
}
this.dynamicFile()
this.getLoginCountFun() this.getLoginCountFun()
}, },
mounted() {}, mounted() {},
methods: { methods: {
dynamicFile() {
let { activetab, accountLevel } = this
const saleParam = {
label: '售出数量',
prop: 'buyNumber'
}
const referencePrice = {
label: '套餐总价',
prop: '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) {
this.activetab = index
this.tabList.forEach(item => (item.checked = false))
this.tabList[index].checked = true
this.handleSearch()
this.dynamicFile()
},
previewPic() { previewPic() {
this.$refs.previewImg.showViewer = true this.$refs.previewImg.showViewer = true
}, },
...@@ -236,6 +319,19 @@ export default { ...@@ -236,6 +319,19 @@ export default {
handleEdit(row) { handleEdit(row) {
this.$router.push({ path: '/memberCenter/setmealAddUpdate', query: { id: row.id, $title: encodeURI('编辑套餐') } }) this.$router.push({ path: '/memberCenter/setmealAddUpdate', query: { id: row.id, $title: encodeURI('编辑套餐') } })
}, },
//置顶推荐
handleUpdateToTop(row) {
updateToTop({ id: row.id }).then(res => {
console.log(res)
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleSearch()
}
})
},
// 查看示例效果 // 查看示例效果
handleLook(row) {}, handleLook(row) {},
handleDelete(row) { handleDelete(row) {
...@@ -264,7 +360,7 @@ export default { ...@@ -264,7 +360,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.btnWrap { .btnWrap {
margin-bottom: 20px; margin: 10px 0;
} }
/deep/ .el-dialog__header { /deep/ .el-dialog__header {
...@@ -321,4 +417,60 @@ export default { ...@@ -321,4 +417,60 @@ export default {
height: 40px; height: 40px;
font-size: 40px; font-size: 40px;
} }
/deep/ .el-table__expanded-cell {
padding: 0;
}
.list-panel {
/deep/ .initPanel {
margin: 0px;
}
}
.setmeal-tabs {
cursor: pointer;
position: relative;
width: 200px;
left: calc(100% - 196px);
.tab {
background: #fafafa;
border-radius: 4px 4px 0px 0px;
border: 1px solid #eeedff;
padding: 13px 20px;
color: #37383a;
line-height: 14px;
font-size: 14px;
width: auto;
}
.active {
color: #5850ff;
}
}
.content-meal {
padding: 17px 0 9px 16px;
&-logo {
width: 59px;
height: 22px;
margin-right: 20px;
img {
width: 100%;
}
}
&-list {
width: calc(100% - 86px);
flex-wrap: wrap;
.every {
margin-right: 80px;
display: flex;
align-items: center;
}
.every::before {
content: '';
width: 6px;
height: 6px;
background: #5850ff;
border-radius: 50%;
margin-right: 7px;
display: inline-block;
}
}
}
</style> </style>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-tab-pane label="基本信息" name="basicInfo"></el-tab-pane> <el-tab-pane label="基本信息" name="basicInfo"></el-tab-pane>
<el-tab-pane label="评价信息" name="afterOrder"></el-tab-pane> <el-tab-pane label="评价信息" name="afterOrder"></el-tab-pane>
</el-tabs> </el-tabs>
<div v-show="routeInfo.addOrEdit == '1' || (['2', '3'].includes(routeInfo.addOrEdit + '') && activeName == 'basicInfo')" class="container edit-container"> <div v-show="routeInfo.addOrEdit == '1' || (['2', '3'].includes(routeInfo.addOrEdit + '') && activeName == 'basicInfo')" v-loading="loading" class="container edit-container">
<div class="flex"> <div class="flex">
<div class="home-set-form flex-grow"> <div class="home-set-form flex-grow">
<div v-for="(item, index) in externalFormList" :key="index"> <div v-for="(item, index) in externalFormList" :key="index">
...@@ -323,6 +323,7 @@ export default { ...@@ -323,6 +323,7 @@ export default {
name: 'editProduct', name: 'editProduct',
data() { data() {
return { return {
loading: false,
dialogTableVisible: false, dialogTableVisible: false,
associationRadio: '', associationRadio: '',
templateSelection: [], templateSelection: [],
...@@ -892,7 +893,7 @@ export default { ...@@ -892,7 +893,7 @@ export default {
}, },
// 库存 // 库存
'editForm.goodsStock'(newValue, oldValue) { 'editForm.goodsStock'(newValue, oldValue) {
this.editForm.goodsStock = limitPrice(newValue, oldValue, 10, 0, 0, 10000000000, 'zNumReg') this.editForm.goodsStock = limitPrice(newValue, oldValue, 9, 0, 0, 10000000000, 'zNumReg')
}, },
// 运费 // 运费
'editForm.expressFee'(newValue, oldValue) { 'editForm.expressFee'(newValue, oldValue) {
...@@ -1094,7 +1095,7 @@ export default { ...@@ -1094,7 +1095,7 @@ export default {
if (e.key != 'Backspace' && newValue.length > 1) { if (e.key != 'Backspace' && newValue.length > 1) {
oldValue = newValue.slice(0, newValue.length - 1) oldValue = newValue.slice(0, newValue.length - 1)
} }
this.nameToValSpecsList[idx].stock = limitPrice(newValue, oldValue, 10, 0, 0, 10000000000, 'zNumReg') this.nameToValSpecsList[idx].stock = limitPrice(newValue, oldValue, 9, 0, 0, 10000000000, 'zNumReg')
}, },
// 二次确认 // 二次确认
secondSimpleConfirm(title, txt, fn) { secondSimpleConfirm(title, txt, fn) {
...@@ -1564,7 +1565,10 @@ export default { ...@@ -1564,7 +1565,10 @@ export default {
deleteAttrList.forEach(item => { deleteAttrList.forEach(item => {
delete params[item] delete params[item]
}) })
this.$apis.proManage.insertOrUpdateProApi(params).then(res => { this.loading = true
this.$apis.proManage
.insertOrUpdateProApi(params)
.then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
...@@ -1573,6 +1577,9 @@ export default { ...@@ -1573,6 +1577,9 @@ export default {
this.cancelJump() this.cancelJump()
} }
}) })
.finally(() => {
this.loading = false
})
}, },
cancelJump() { cancelJump() {
this.$router.push({ this.$router.push({
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<template> <template>
<div class="marketing pro-group p-t-20"> <div class="marketing pro-group p-t-20">
<div class="m-b-20"> <div class="m-b-20">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建商品</el-button> -->
<GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton> <GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton>
</div> </div>
<div class="container"> <div class="container">
...@@ -25,8 +24,6 @@ ...@@ -25,8 +24,6 @@
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleUpOrDown(scope.scope)">{{ scope.scope.goodsStatus ? '下架' : '上架' }}</el-button> <el-button type="text" @click="handleUpOrDown(scope.scope)">{{ scope.scope.goodsStatus ? '下架' : '上架' }}</el-button>
<!-- <el-button v-if="!scope.scope.goodsStatus" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button v-if="scope.scope.goodsStatus" type="text" @click="handleEdit(3, scope.scope)">查看</el-button> -->
<GLButton v-if="!scope.scope.goodsStatus" type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton> <GLButton v-if="!scope.scope.goodsStatus" type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="scope.scope.goodsStatus" type="text" fn="查看" @click="handleEdit(3, scope.scope)">查看</GLButton> <GLButton v-if="scope.scope.goodsStatus" type="text" fn="查看" @click="handleEdit(3, scope.scope)">查看</GLButton>
<el-button type="text" @click="handleTop(scope.scope)">置顶</el-button> <el-button type="text" @click="handleTop(scope.scope)">置顶</el-button>
...@@ -336,10 +333,12 @@ export default { ...@@ -336,10 +333,12 @@ export default {
this.$refs.proGroupRef.data.forEach(item => { this.$refs.proGroupRef.data.forEach(item => {
item.saleAmount = item.goodsStatistics.saleAmount item.saleAmount = item.goodsStatistics.saleAmount
if (item.specificationDetailList.length > 1) { if (item.specificationDetailList.length > 1) {
let retailPriceList = item.specificationDetailList.sort(function (a, b) { let retailPriceList = JSON.parse(JSON.stringify(item.specificationDetailList))
retailPriceList.sort((a, b) => {
return a.retailPrice - b.retailPrice return a.retailPrice - b.retailPrice
}) })
let stockeList = item.specificationDetailList.sort(function (a, b) { let stockeList = JSON.parse(JSON.stringify(item.specificationDetailList))
stockeList.sort((a, b) => {
return a.stock - b.stock return a.stock - b.stock
}) })
let minRatilPrice = retailPriceList[0].retailPrice / 100 let minRatilPrice = retailPriceList[0].retailPrice / 100
......
...@@ -386,10 +386,12 @@ export default { ...@@ -386,10 +386,12 @@ export default {
this.$refs.proGroupRef.data.forEach(item => { this.$refs.proGroupRef.data.forEach(item => {
item.saleAmount = item.goodsStatistics.saleAmount item.saleAmount = item.goodsStatistics.saleAmount
if (item.specificationDetailList.length > 1) { if (item.specificationDetailList.length > 1) {
let retailPriceList = item.specificationDetailList.sort(function (a, b) { let retailPriceList = JSON.parse(JSON.stringify(item.specificationDetailList))
retailPriceList.sort((a, b) => {
return a.retailPrice - b.retailPrice return a.retailPrice - b.retailPrice
}) })
let stockeList = item.specificationDetailList.sort(function (a, b) { let stockeList = JSON.parse(JSON.stringify(item.specificationDetailList))
stockeList.sort((a, b) => {
return a.stock - b.stock return a.stock - b.stock
}) })
let minRatilPrice = retailPriceList[0].retailPrice / 100 let minRatilPrice = retailPriceList[0].retailPrice / 100
......
<template> <template>
<div> <div>
<base-info v-show="activeName == 'baseInfo'" ref="baseInfoRef" :routeInfo="routeInfo" @handleTabChange="jumpEvent"></base-info> <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> </div>
</template> </template>
...@@ -21,14 +21,19 @@ export default { ...@@ -21,14 +21,19 @@ export default {
}, },
// 编辑-标记idx // 编辑-标记idx
eventIndex: '', eventIndex: '',
condLimitObj: {
// 1-有;0-无
hasPhone: 0,
hasQw: 0
},
eventObj: { eventObj: {
addOrEdit: 'add', addOrEdit: 'add',
info: {} info: {}
},
parentCustomerObj: {
// 人群,标签,指定
currentCustomerTypeName: '',
parentPredictObj: {
total: '',
qiwei: '',
phone: ''
},
list: []
} }
} }
}, },
...@@ -38,8 +43,13 @@ export default { ...@@ -38,8 +43,13 @@ export default {
editEvent editEvent
}, },
beforeRouteLeave(to, from, next) {
this.$common.utils.storage.get('sopInfo') && this.$common.utils.storage.remove('sopInfo')
next()
},
created() { created() {
this.routeInfo = this.$route.query this.routeInfo = Object.keys(this.$route.query).length ? this.$route.query : this.$common.utils.storage.get('sopInfo')
}, },
methods: { methods: {
...@@ -48,6 +58,8 @@ export default { ...@@ -48,6 +58,8 @@ export default {
}, },
handleInfoConfirm(info) { 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.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.$refs.baseInfoRef.dealSopTime()
this.jumpBaseInfo({ activeName: 'baseInfo' }) this.jumpBaseInfo({ activeName: 'baseInfo' })
}, },
...@@ -55,9 +67,8 @@ export default { ...@@ -55,9 +67,8 @@ export default {
jumpEvent(obj) { jumpEvent(obj) {
this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit) this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit)
this.$set(this.eventObj, 'info', obj.info) this.$set(this.eventObj, 'info', obj.info)
this.parentCustomerObj = obj.parentCustomerObj
this.eventIndex = obj.eventIndex this.eventIndex = obj.eventIndex
this.$set(this.condLimitObj, 'hasPhone', obj.condLimitObj.hasPhone)
this.$set(this.condLimitObj, 'hasQw', obj.condLimitObj.hasQw)
this.activeName = obj.activeName this.activeName = obj.activeName
} }
} }
......
...@@ -13,17 +13,26 @@ ...@@ -13,17 +13,26 @@
</el-tabs> </el-tabs>
</div> </div>
<div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading"> <div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading">
<div class="model-item" :class="{ checked: selectItem == item }" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)"> <div class="model-item" :class="{ checked: selectItem == item }" v-for="(item, index) in modelList"
:key="index" @click="handleSelectItem(item)">
<div class="model-item-title" :title="item.equityName" v-show="activeName == 3">{{ item.equityName }}</div> <div class="model-item-title" :title="item.equityName" v-show="activeName == 3">{{ item.equityName }}</div>
<div class="model-item-title" :title="item.couponName" v-show="activeName == 2">{{ item.couponName }}</div> <div class="model-item-title" :title="item.couponName" v-show="activeName == 2">{{ item.couponName }}</div>
<!-- <div class="model-item-title" :title="item.couponName" v-show="activeName == 6">{{ item.equityName }}</div> --> <!-- <div class="model-item-title" :title="item.couponName" v-show="activeName == 6">{{ item.equityName }}</div> -->
<div class="model-item-title" :title="item.packageName" v-show="activeName == 4">{{ item.packageName }}</div> <div class="model-item-title" :title="item.packageName" v-show="activeName == 4">{{ item.packageName }}
<div class="model-item-title" :title="item.activityName" v-show="activeName == 5">{{ item.activityName }}</div> </div>
<div class="model-item-title" :title="item.activityName" v-show="activeName == 5">{{ item.activityName }}
</div>
<div class="model-item-content" v-show="activeName == 3">领取方式:免费领用</div> <div class="model-item-content" v-show="activeName == 3">领取方式:免费领用</div>
<div class="model-item-content" v-show="activeName == 4">领取方式:付费购买</div> <div class="model-item-content" v-show="activeName == 4">领取方式:付费购买</div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 6">有效期:{{ item.effectiveDays }}天</div> <div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 6">有效期:{{
item.effectiveDays
}}天</div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 3">有效期:无限制</div> <div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 3">有效期:无限制</div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 2">有效期:{{ item.effectiveStartTime ? item.effectiveStartTime.split(' ')[0] : '' }}~{{ item.effectiveEndTime ? item.effectiveEndTime.split(' ')[0] : '' }}</div> <div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 2">有效期:{{
item.effectiveStartTime ? item.effectiveStartTime.split(' ')[0] : ''
}}~{{ item.effectiveEndTime ?
item.effectiveEndTime.split(' ')[0] : ''
}}</div>
<!-- <div class="model-item-content" v-show="activeName == 6">获取方式:需先购买无忧服务套餐</div> <!-- <div class="model-item-content" v-show="activeName == 6">获取方式:需先购买无忧服务套餐</div>
<div class="model-item-content" v-show="activeName == 6">获取限制:每个服务套餐限领一次</div> --> <div class="model-item-content" v-show="activeName == 6">获取限制:每个服务套餐限领一次</div> -->
...@@ -64,14 +73,19 @@ ...@@ -64,14 +73,19 @@
<img src="@/assets/empty.png" /> <img src="@/assets/empty.png" />
<div class="empty-item">暂无数据</div> <div class="empty-item">暂无数据</div>
</div> </div>
<el-pagination v-if="activeName != 3" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[12, 24, 36, 48]" :page-size="pageSize" :total="tableTotal" layout="total, sizes, prev, pager, next, jumper"></el-pagination> <el-pagination v-if="activeName != 3" @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="pageNum" :page-sizes="[12, 24, 36, 48]" :page-size="pageSize" :total="tableTotal"
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button> <el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect" v-show="modelList.length">确 定</el-button> <el-button size="small" type="primary" @click="handleSelect" v-show="modelList.length">确 定</el-button>
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && activeName == 2 && memberMenu">立即添加</el-button> <el-button size="small" type="primary" @click="handleOpen"
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && activeName == 4 && couponMenu">立即添加</el-button> v-show="modelList.length == 0 && activeName == 2 && memberMenu">立即添加</el-button>
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && activeName == 5 && activityMenu">立即添加</el-button> <el-button size="small" type="primary" @click="handleOpen"
v-show="modelList.length == 0 && activeName == 4 && couponMenu">立即添加</el-button>
<el-button size="small" type="primary" @click="handleOpen"
v-show="modelList.length == 0 && activeName == 5 && activityMenu">立即添加</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -182,6 +196,7 @@ export default { ...@@ -182,6 +196,7 @@ export default {
} }
if (this.activeName == 2) { if (this.activeName == 2) {
params.discountTypes = [2, 3, 4] params.discountTypes = [2, 3, 4]
params.directionalFlag = 1
params.validType = 'valid' params.validType = 'valid'
} }
if (this.activeName == 5) { if (this.activeName == 5) {
...@@ -255,29 +270,35 @@ export default { ...@@ -255,29 +270,35 @@ export default {
} }
} }
} }
.sop-activity-model.model-panel { .sop-activity-model.model-panel {
.model-panel-tab { .model-panel-tab {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 18px; margin-bottom: 18px;
label { label {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
color: #000000; color: #000000;
line-height: 24px; line-height: 24px;
} }
/deep/ { /deep/ {
.el-checkbox:last-of-type { .el-checkbox:last-of-type {
margin-right: 8px; margin-right: 8px;
} }
.el-tabs__nav { .el-tabs__nav {
border: 0; border: 0;
} }
.el-tabs__header { .el-tabs__header {
border: 0; border: 0;
background-color: #f4f6fc; background-color: #f4f6fc;
margin: 0px; margin: 0px;
} }
.el-tabs__item { .el-tabs__item {
border: none; border: none;
width: 180px; width: 180px;
...@@ -287,6 +308,7 @@ export default { ...@@ -287,6 +308,7 @@ export default {
text-align: center; text-align: center;
background: #f4f6fc; background: #f4f6fc;
} }
.el-tabs__item.is-active { .el-tabs__item.is-active {
background-color: #fff !important; background-color: #fff !important;
border-radius: 4px; border-radius: 4px;
...@@ -294,13 +316,15 @@ export default { ...@@ -294,13 +316,15 @@ export default {
} }
} }
} }
.model-item-empty { .model-item-empty {
> img { >img {
display: block; display: block;
margin: 50px auto 0px; margin: 50px auto 0px;
width: 60px; width: 60px;
height: auto; height: auto;
} }
.empty-item { .empty-item {
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
...@@ -310,6 +334,7 @@ export default { ...@@ -310,6 +334,7 @@ export default {
margin-bottom: 30px; margin-bottom: 30px;
} }
} }
.model-item-panel { .model-item-panel {
// display: grid; // display: grid;
// grid-template-columns: repeat(4, 25%); // grid-template-columns: repeat(4, 25%);
...@@ -320,6 +345,7 @@ export default { ...@@ -320,6 +345,7 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
align-items: stretch; align-items: stretch;
flex-direction: row; flex-direction: row;
.model-item { .model-item {
width: 240px; width: 240px;
margin-right: 24px; margin-right: 24px;
...@@ -332,13 +358,16 @@ export default { ...@@ -332,13 +358,16 @@ export default {
border: 1px solid #e6e6e6; border: 1px solid #e6e6e6;
padding: 14px 24px; padding: 14px 24px;
box-sizing: border-box; box-sizing: border-box;
&:nth-child(4n) { &:nth-child(4n) {
margin-right: 0px; margin-right: 0px;
} }
&.checked { &.checked {
background: rgba(88, 80, 255, 0.1); background: rgba(88, 80, 255, 0.1);
border: 1px solid #5850ff; border: 1px solid #5850ff;
} }
&-qrcode { &-qrcode {
position: absolute; position: absolute;
right: 10px; right: 10px;
...@@ -347,6 +376,7 @@ export default { ...@@ -347,6 +376,7 @@ export default {
height: 60px; height: 60px;
border: 1px solid #979797; border: 1px solid #979797;
} }
&-title { &-title {
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
...@@ -357,6 +387,7 @@ export default { ...@@ -357,6 +387,7 @@ export default {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
} }
&-content { &-content {
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
...@@ -367,15 +398,18 @@ export default { ...@@ -367,15 +398,18 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
&.model-item-weight { &.model-item-weight {
line-height: 20px; line-height: 20px;
height: 20px; height: 20px;
} }
span { span {
color: #5850ff; color: #5850ff;
font-size: 20px; font-size: 20px;
} }
} }
&-contents { &-contents {
line-height: 22px; line-height: 22px;
height: 22px; height: 22px;
......
<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: {
keyword: ''
},
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() {
this.userInfo = this.$globalState.session
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.getList()
},
methods: {
getList() {
var params = {
req: {
...this.searchForm,
crowdType: 3,
merchantId: this.userInfo.merchantId,
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.$refs.crowdRef.tableHeightValues = '460px'
})
},
setTableFinishFun() {
this.crowdList = this.$refs.crowdRef.data
//接收到的数据为空
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> <template>
<div class="select-cutomer"> <div class="select-cutomer">
<div class="title">备注:为确保营销渠道正常触达,仅支持选择同条件客户(是否加企微、是否有手机号)</div> <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="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
<div class="flex-default"> <div class="flex-default">
<div class="customer-list"> <div class="customer-list">
<div class="customer-tag-box"> <p class="list-title p-16">客户列表(最多仅可选200个客户)</p>
<span class="tag-label">用户标签:</span> <GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable>
<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>
<GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable>
</div> </div>
<div class="selected-list"> <div class="selected-list">
<p class="list-title p-16">已选({{ Array.isArray(selectedCustomerList) ? selectedCustomerList.length : 0 }})</p> <p class="list-title p-16">已选({{ Array.isArray(selectedCustomerList) ? selectedCustomerList.length : 0 }})</p>
...@@ -24,6 +21,11 @@ ...@@ -24,6 +21,11 @@
</div> </div>
</div> </div>
</div> </div>
<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> </div>
</template> </template>
...@@ -37,7 +39,26 @@ export default { ...@@ -37,7 +39,26 @@ export default {
url: url, url: url,
searchForm: {}, searchForm: {},
customerList: [], customerList: [],
selectedCustomerList: [],
heightBox: 200, heightBox: 200,
maxCustNum: 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, getListApi: this.$apis.sop.getCustomerListApi,
tableParams: { tableParams: {
...@@ -119,54 +140,25 @@ export default { ...@@ -119,54 +140,25 @@ export default {
}, },
props: { props: {
selectedLabelList: { dialogVisible: {
type: Array, type: Boolean,
default: () => [] default: false
}, },
selectedCustomerList: { parentSelectedCustomerList: {
type: Array, type: Array,
default: () => [] default: () => []
},
condLimitObj: {
type: Object,
default: () => {
return {
// 1-有;0-无
hasPhone: 0,
hasQw: 0
}
}
} }
}, },
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 350 this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.selectedCustomerList = JSON.parse(JSON.stringify(this.parentSelectedCustomerList))
}, },
methods: { methods: {
beforeSearchFn() { handleSearch() {
return new Promise(resolve => { this.$refs.customerRef.refreshTable(true, false)
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()
})
}, },
setTableFinishFun() { setTableFinishFun() {
...@@ -184,43 +176,45 @@ export default { ...@@ -184,43 +176,45 @@ export default {
this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], true) this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], true)
} }
}) })
// 找到不符合条件的,变为不可选 if (this.selectedCustomerList.length >= this.maxCustNum) {
this.tableParams.checkSelectVal = [] let selectIds = this.selectedCustomerList.map(item => item.id)
if (this.selectedCustomerList.length) {
this.tableList.forEach((row, idx) => { this.tableList.forEach((row, idx) => {
if (row.isJoin != this.condLimitObj.hasQw || !!row.customerPhone != this.condLimitObj.hasPhone) { if (!selectIds.includes(row.id)) {
this.tableParams.checkSelectVal.push(row.id) this.tableParams.checkSelectVal.push(row.id)
this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], false) 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) { handleSelectionTable(val) {
// 未选客户时,筛选客户条件
if (!this.selectedCustomerList.length) {
this.dealCondLimit(val[0])
}
let currentList = JSON.parse(JSON.stringify(this.selectedCustomerList)) let currentList = JSON.parse(JSON.stringify(this.selectedCustomerList))
let tableIds = this.tableList.map(item => item.id) let tableIds = this.tableList.map(item => item.id)
this.selectedCustomerList = JSON.parse(JSON.stringify(val)) var selectIds = currentList.map(item => item.id)
var selectIds = this.selectedCustomerList.map(item => item.id) var selectedIds = val.map(item => item.id)
currentList.forEach(item => { var tempList = []
if (!selectIds.includes(item.id) && !tableIds.includes(item.id)) { val.forEach(item => {
if (!selectIds.includes(item.id) && tableIds.includes(item.id) && this.selectedCustomerList.length < this.maxCustNum) {
this.selectedCustomerList.push(item) this.selectedCustomerList.push(item)
} }
}) })
this.selectedCustomerList.forEach(item => {
if (selectedIds.includes(item.id) || !tableIds.includes(item.id)) {
tempList.push(item)
}
})
this.selectedCustomerList = tempList
this.recoverySelected() this.recoverySelected()
},
handleClose() {
this.$emit('handleAppointCustClose')
},
handleConfirm() {
this.$emit('handleAppointCustConfirm', this.selectedCustomerList)
} }
} }
} }
...@@ -268,7 +262,7 @@ export default { ...@@ -268,7 +262,7 @@ export default {
} }
.customer-list { .customer-list {
width: calc(100% - 280px); width: calc(100% - 280px);
border: 1px solid #eeeeee; // border: 1px solid #eeeeee;
margin-right: 10px; margin-right: 10px;
} }
.p-16 { .p-16 {
...@@ -277,7 +271,7 @@ export default { ...@@ -277,7 +271,7 @@ export default {
.selected-list { .selected-list {
width: 280px; width: 280px;
border-radius: 2px; border-radius: 2px;
border: 1px solid #eeeeee; // border: 1px solid #eeeeee;
i { i {
color: #75acff; color: #75acff;
margin-right: 3px; margin-right: 3px;
...@@ -290,6 +284,7 @@ export default { ...@@ -290,6 +284,7 @@ export default {
.list-customers { .list-customers {
// box-sizing: border-box; // box-sizing: border-box;
// height: 61vh; // height: 61vh;
border: 1px solid #eeeeee;
padding: 10px; padding: 10px;
overflow-y: scroll; overflow-y: scroll;
.customer-tag { .customer-tag {
......
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
handleJump(path, row = {}) { handleJump(path, row = {}) {
this.$router.push({ this.$router.push({
path: '/sop/' + path, path: '/sop/' + path,
query: row ? { id: row.id, fromPage: 'index' } : '' query: row ? { id: row.id, fromPage: '/marketing/sop/index' } : ''
}) })
}, },
...@@ -197,7 +197,7 @@ export default { ...@@ -197,7 +197,7 @@ export default {
handleEdit(addOrEdit, row) { handleEdit(addOrEdit, row) {
var params = { var params = {
addOrEdit: addOrEdit, addOrEdit: addOrEdit,
fromPage: 'index', fromPage: '/marketing/sop/index',
$title: encodeURI(addOrEdit == 'add' ? '新建SOP' : '编辑SOP') $title: encodeURI(addOrEdit == 'add' ? '新建SOP' : '编辑SOP')
} }
addOrEdit != 'add' && (params.id = row.id) addOrEdit != 'add' && (params.id = row.id)
......
...@@ -15,14 +15,26 @@ ...@@ -15,14 +15,26 @@
</div> </div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.eventCount : '-' }}</p> <p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.eventCount : '-' }}</p>
</div> </div>
<div class="analysis-block"> <div class="analysis-block back-image-green">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
已完成事件数 已完成事件数
<img src="@/assets/sop/completed-event.png" /> <img src="@/assets/sop/completed-event.png" />
</div> </div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.finishEventCount : '-' }}</p> <p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.finishEventCount : '-' }}</p>
</div> </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-fail.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 class="analysis-title-block m-b-20">
完成率 完成率
</div> </div>
...@@ -34,7 +46,14 @@ ...@@ -34,7 +46,14 @@
<p class="m-b-10">日营销事件明细</p> <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 --> <!-- 表格区域 end -->
</div> </div>
</div> </div>
...@@ -111,11 +130,17 @@ export default { ...@@ -111,11 +130,17 @@ export default {
}, },
{ {
label: '已完成事件数', label: '已完成事件数',
prop: 'eventStatistics', prop: 'finishEventCount',
width: '140', width: '140',
formatter: cellValue => { formatter: cellValue => {
return cellValue.eventStatistics ? cellValue.eventStatistics.finishEventCount : '-' return cellValue.eventStatistics ? cellValue.eventStatistics.finishEventCount : '-'
} }
},
{
label: '失败事件数',
prop: 'failEventCount',
width: '140',
addHtml: 'failEventCount'
} }
] ]
}, },
...@@ -150,11 +175,19 @@ export default { ...@@ -150,11 +175,19 @@ export default {
getBaseInfo() { getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => { this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.sopInfo = 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.sopInfo.completedPercent = Math.round((this.sopInfo.sopStatistics.finishEventCount / this.sopInfo.sopStatistics.eventCount) * 100).toFixed(0) + '%'
this.drawPie() 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() { drawPie() {
let chartDom = document.getElementById('completePie') let chartDom = document.getElementById('completePie')
let myChart = echarts.init(chartDom) let myChart = echarts.init(chartDom)
...@@ -197,7 +230,7 @@ export default { ...@@ -197,7 +230,7 @@ export default {
margin-right: 20px; margin-right: 20px;
flex-basis: 0 0 auto; flex-basis: 0 0 auto;
background: #ffffff; 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); box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.analysis-title-block { .analysis-title-block {
display: flex; display: flex;
...@@ -220,6 +253,15 @@ export default { ...@@ -220,6 +253,15 @@ export default {
font-weight: 600; 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> </style>
...@@ -24,14 +24,14 @@ ...@@ -24,14 +24,14 @@
</div> </div>
<p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.customerCount : '-' }}</p> <p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.customerCount : '-' }}</p>
</div> </div>
<div class="analysis-block"> <div class="analysis-block back-image-green">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
已触达客户数 已触达客户数
<img src="@/assets/sop/touch-customer.png" /> <img src="@/assets/sop/touch-customer.png" />
</div> </div>
<p class="analysis-num">{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p> <p class="analysis-num">{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div> </div>
<div class="analysis-block"> <div class="analysis-block back-image-blue">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
触达率 触达率
</div> </div>
...@@ -96,7 +96,10 @@ export default { ...@@ -96,7 +96,10 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName' prop: 'customerName',
formatter: cellValue => {
return cellValue.customerName || '-'
}
}, },
{ {
label: '客户手机号', label: '客户手机号',
...@@ -107,7 +110,15 @@ export default { ...@@ -107,7 +110,15 @@ export default {
} }
}, },
{ {
label: '初次查看事件', label: '推送人',
prop: 'pusherName'
},
{
label: '推送时间',
prop: 'pusherTime'
},
{
label: '初次查看时间',
prop: 'firstViewDate', prop: 'firstViewDate',
formatter: cellValue => { formatter: cellValue => {
return cellValue.firstViewDate ? dayjs(cellValue.firstViewDate).format('YYYY-MM-DD HH:mm:ss') : '未查看' return cellValue.firstViewDate ? dayjs(cellValue.firstViewDate).format('YYYY-MM-DD HH:mm:ss') : '未查看'
...@@ -117,9 +128,13 @@ export default { ...@@ -117,9 +128,13 @@ export default {
label: '查看次数', label: '查看次数',
prop: 'viewCount', prop: 'viewCount',
formatter: cellValue => { formatter: cellValue => {
return cellValue.viewCount || '-' return cellValue.viewCount || '0'
} }
} }
// {
// label: '查看总时长',
// prop: ''
// }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
...@@ -263,7 +278,7 @@ export default { ...@@ -263,7 +278,7 @@ export default {
margin-right: 20px; margin-right: 20px;
flex-basis: 0 0 auto; flex-basis: 0 0 auto;
background: #ffffff; 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); box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.analysis-title-block { .analysis-title-block {
display: flex; display: flex;
...@@ -286,6 +301,12 @@ export default { ...@@ -286,6 +301,12 @@ export default {
font-weight: 600; 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> </style>
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
size: 'small', size: 'small',
routeInfo: { routeInfo: {
id: '', id: '',
fromPage: 'index' fromPage: '/marketing/sop/index'
} }
} }
}, },
...@@ -46,8 +46,8 @@ export default { ...@@ -46,8 +46,8 @@ export default {
methods: { methods: {
handleTabClick() { }, handleTabClick() { },
handleBack() { handleBack() {
this.$router.push({ this.$history.push({
path: '/sop/' + this.routeInfo.fromPage path: this.routeInfo.fromPage
}) })
} }
} }
......
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
handleJump(path, row = {}) { handleJump(path, row = {}) {
this.$router.push({ this.$router.push({
path: '/sop/' + path, path: '/sop/' + path,
query: row ? { id: row.id, fromPage: 'sopList' } : '' query: row ? { id: row.id, fromPage: '/marketing/sop/sopList' } : ''
}) })
}, },
...@@ -166,7 +166,7 @@ export default { ...@@ -166,7 +166,7 @@ export default {
handleEdit(addOrEdit, row) { handleEdit(addOrEdit, row) {
var params = { var params = {
addOrEdit: addOrEdit, addOrEdit: addOrEdit,
fromPage: 'sopList', fromPage: '/marketing/sop/sopList',
$title: encodeURI(addOrEdit == 'add' ? '新建SOP' : '编辑SOP') $title: encodeURI(addOrEdit == 'add' ? '新建SOP' : '编辑SOP')
} }
addOrEdit != 'add' && (params.id = row.id) addOrEdit != 'add' && (params.id = row.id)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!