Commit 6fbe4685 by 胡悦

Merge remote-tracking branch 'origin/v2.3.0' into kuangyq_dev_v2.3.0

2 parents 731e1df3 0b122471
......@@ -4,8 +4,8 @@ import { http } from '@/main'
const getCenterListApi = params => {
// 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({
url: 'rop-scrm-equity/router',
method: 'POST',
......@@ -48,9 +48,11 @@ const updateCardContent = 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({
url: 'rop-scrm-equity/router',
url: '/rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
......
......@@ -3,7 +3,7 @@ import { http } from '@/main'
const defaultPath = 'scrm.api.coupon.'
//优惠券列表
const getMerchantListApi = params => {
const getCouponListApi = params => {
// params.method = `${defaultPath}list.merchant`
params.method = 'scrm.backstage.coupon.list.merchant'
return http({
......@@ -25,6 +25,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 => {
params.method = `${defaultPath}effective`
......@@ -49,6 +71,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 => {
params.method = `${defaultPath}verification.code.verification.list`
......@@ -151,4 +184,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 }
......@@ -77,7 +77,8 @@ const exportGiftInfoApi = 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',
......
......@@ -3,9 +3,8 @@ import { http } from '@/main'
// const defaultPath = 'scrm.api.live.'
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({
url: 'rop-scrm-equity/router',
method: 'POST',
......@@ -34,4 +33,25 @@ const orderExportApi = params => {
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
})
}
//套餐使用详情
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 => {
// })
// }
export { getRecordListApi, getVerificationCode, verificationExportApi }
export default { getRecordListApi, getVerificationCode, verificationExportApi }
......@@ -4,18 +4,31 @@ import { http } from '@/main'
const getSetMealListApi = params => {
// 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({
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',
data: params,
sign: true
})
}
//
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({
url: 'rop-scrm-equity/router',
url: '/rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
......@@ -26,7 +39,7 @@ const deleteSetMeal = params => {
const getSetmealService = params => {
params.method = `scrm.api.coupon.list.merchant`
return http({
url: 'rop-scrm-coupon/router',
url: '/rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
......@@ -88,4 +101,18 @@ const upDownPackage = params => {
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 { getSetMealListApi,getSetMealstoreListApi, deleteSetMeal, getSetmealService, getServiceInfo, createSetMeal, upDownPackage, updateSetMeal, configSetMeal ,updateToTop}
......@@ -26,7 +26,7 @@ html {
.live-room .container {
background: #ffffff;
margin: 20px 0px;
margin: 20px 0;
padding: 15px 20px;
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1);
}
......@@ -130,7 +130,7 @@ html {
}
.marketing .f-right {
float: right;
float: right;
}
.marketing .footer-btns {
......@@ -138,6 +138,10 @@ html {
margin-bottom: 18px;
}
.marketing .color-transparent {
background-color: transparent;
}
.marketing .default-blue-btn {
color: #5850ff;
border-color: #5850ff;
......@@ -152,6 +156,37 @@ html {
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 {
line-height: 16px;
}
......@@ -169,32 +204,33 @@ html {
}
.table-popover-block {
position: relative;
height: 160px !important;
overflow: hidden;
border-width: 0 !important;
padding: 0 !important;
margin-bottom: 10px !important;
position: relative;
height: 160px !important;
overflow: hidden;
border-width: 0 !important;
padding: 0 !important;
margin-bottom: 10px !important;
}
.table-popover-block.el-popper .popper__arrow {
display: none !important;
display: none !important;
}
.table-popover-img {
width: 100%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.marketing .pointer {
cursor: pointer;
cursor: pointer;
}
.marketing .w-100-percent,
.marketing .img-w-100 {
width: 100%;
width: 100%;
}
.marketing .img-60 {
......@@ -212,6 +248,10 @@ html {
height: 120px;
}
.marketing .w-150 {
width: 150px;
}
.marketing .w-320 {
width: 320px;
}
......@@ -223,7 +263,12 @@ html {
.marketing .m-t-10 {
margin-top: 10px;
}
.marketing .m-t-20 {
margin-top: 20px;
}
.marketing .m-b-8 {
margin-bottom: 8px;
}
.marketing .m-b-10 {
margin-bottom: 10px;
}
......@@ -240,6 +285,10 @@ html {
margin-bottom: 60px;
}
.marketing .m-r-8 {
margin-right: 8px;
}
.marketing .m-r-10 {
margin-right: 10px;
}
......@@ -252,6 +301,11 @@ html {
margin-left: 20px;
}
.marketing.p-t-10,
.marketing .p-t-10 {
padding-top: 10px;
}
.marketing.p-t-20,
.marketing .p-t-20 {
padding-top: 20px;
......@@ -281,7 +335,9 @@ html {
.marketing .txt-grey {
color: #999999;
}
.marketing .text-e8{
color: #EB4E4E!important;
}
.marketing .txt-center {
text-align: center;
}
......@@ -326,13 +382,24 @@ html {
display: flex;
flex-wrap: wrap;
}
.marketing .flex-align {
display: flex;
align-items: center;
}
.marketing .flex-top {
display: flex;
align-items: flex-start;
}
.marketing .flex-center {
display: flex;
justify-content: center;
align-items: center;
}
.marketing .flex-between {
display: flex;
justify-content: space-between;
align-items: center;
}
.marketing .flex-grow {
flex: 1;
}
......@@ -469,5 +536,35 @@ html {
color: #5850ff;
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 */

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
<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,8 @@ import selectSingleProDialog from '@/components/selectSingleProDialog/index.vue'
import relateStoreDialog from '@/components/relate-store-dialog'
import selectMutiProForcouponDialog from '@/components/selectMutiProDialog/indexForCoupon.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'
Vue.component('glsx-combi-form', glsxCombiForm)
Vue.component('glsx-dialog', glsxDialog)
......@@ -23,3 +25,5 @@ Vue.component('select-single-pro-dialog', selectSingleProDialog)
Vue.component('relate-store-dialog', relateStoreDialog)
Vue.component('select-muti-pro-forcoupon-dialog', selectMutiProForcouponDialog)
Vue.component('table-tooltip', tableTooltip)
Vue.component('glsx-rows', glsxRows)
Vue.component('glsx-descriptions', glsxDescriptions)
......@@ -19,8 +19,8 @@ export const fetchConfig = function (isEnv = true) {
// }
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
}
export const config = {
install(vue, cfg) {
......
......@@ -83,6 +83,12 @@ const staticRoutes = Object.freeze([
meta: {}
},
{
name: 'recordList',
path: '/couponManage/recordList',
component: resolve => require([`@/views/couponManage/recordList.vue`], resolve),
meta: {}
},
{
name: 'editCashCoupon',
path: '/couponManage/editCashCoupon/:addOrEdit',
component: resolve => require([`@/views/couponManage/editCashCoupon.vue`], resolve),
......
......@@ -22,6 +22,8 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$common = common
Vue.prototype.$message = message
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.$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 } })
......
......@@ -24,9 +24,11 @@ export async function start() {
// .forEach(item => {
// 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.$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.prototype.$common = { utils: utils }
render('/', routes)
......
<!-- 编辑折扣券 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container" style="position: relative">
<div class="container edit-container" style="position: relative" v-loading="loading">
<!-- <div class="right_show">
<div class="card-top"></div>
<div class="card-middle">
......@@ -119,6 +119,13 @@
</el-radio>
</el-form-item>
</template>
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<template slot="stock" slot-scope="scope">
<span v-if="$isGroupUp">无库存限制</span>
<el-input v-else class="w-150" v-model="editForm[scope.scope.name]" placeholder="请输入库存">
<span slot="suffix">张</span>
</el-input>
</template>
<template slot="useDescriptionHtml">
<el-input type="textarea" v-model="editForm.useDescription" style="width: 320px" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="userDisable" />
</template>
......@@ -126,6 +133,10 @@
<el-button style="margin-left: 80px" @click="editMessage">编辑</el-button>
</template>
</glsx-combi-form>
<div v-if="$isGroupUp">
<p class="edit-title">适用门店配置</p>
<glsx-combi-form class="edit-form-container" ref="merchantRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="merchantEditFormData" :formRules="merchantRule"></glsx-combi-form>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="showSubmit" @click="handleConfirm">确定</el-button>
......@@ -154,6 +165,7 @@ export default {
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
loading: false,
// pickerOptions: {
// disabledDate(v) {//禁用当前之前的日期
// return v.getTime() < new Date().getTime() - 86400000;
......@@ -189,7 +201,8 @@ export default {
effectiveDays: '',
anticipatedCost: '',
discountIntensity: '',
directionalFlag: '1'
directionalFlag: '1',
scopeApplication: ''
},
editRule: {
anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }],
......@@ -201,7 +214,7 @@ export default {
effectiveTime: [{ required: true, message: '有效期不能为空', trigger: 'change' }],
effectiveDays: [{ required: true, message: '有效天数不能为空', trigger: 'blur' }],
useDescription: [{ required: true, message: '使用说明不能为空', trigger: 'change' }],
stock: [{ required: true, message: '发放数量不能为空', trigger: 'change' }]
stock: [{ required: true, message: '库存不能为空', trigger: 'change' }]
},
editFormData: [
{
......@@ -231,18 +244,18 @@ export default {
addHtml: 'useLimitHtml'
},
{
label: '发放数量',
label: '库存',
name: 'stock',
width: '180px',
type: 'input',
append: '张'
addHtml: 'stock'
// width: '180px',
// type: 'input',
// append: '张'
},
{
label: '使用规则',
name: 'directionalFlag',
addHtml: 'directionalFlagHtml',
isHide: false
// index:5
},
{
label: '有效期',
......@@ -259,10 +272,38 @@ export default {
addHtml: 'editHtml',
isHide: true
}
],
// 适用门店
merchantRule: {
scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
},
merchantEditFormData: [
{
label: '适用范围',
name: 'scopeApplication',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
isDisabled: false,
optionList: [
{
confId: '1',
confName: '旗下所有店通用'
},
{
confId: '2',
confName: '旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
}
]
}
]
}
},
created() {
this.editRule.stock[0].required = !this.$isGroupUp
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
......@@ -278,6 +319,7 @@ export default {
this.title = '查看'
const editHtmlIndex = this.editFormData.findIndex(val => val.addHtml == 'editHtml')
this.editFormData[editHtmlIndex].isHide = false
this.setAllDisabled('merchantEditFormData')
} else if (addOrEdit == 2) {
this.apear = 'couponEdit'
this.title = '编辑'
......@@ -337,6 +379,11 @@ export default {
}
},
methods: {
setAllDisabled(editName) {
this[editName].forEach(item => {
item.isDisabled = true
})
},
editCoupon(attribute) {
attribute.forEach(item => {
let index = this.editFormData.findIndex(val => val.name == `${item}`)
......@@ -369,27 +416,36 @@ export default {
},
getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
console.log(res)
this.editForm = this.$common.utils.deepClone(res)
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.useBarriers = this.editForm.useBarriers + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
this.editForm.discountIntensity = (this.editForm.discountIntensity / 100).toFixed(2)
//使用限制,满多少元可用
if (this.editForm.useBarriers == 2) {
this.editForm.full = this.editForm.full
}
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) {
this.editForm.effectiveTime = [this.editForm.effectiveStartTime, this.editForm.effectiveEndTime]
}
this.$nextTick(() => {
this.editStatus = false
this.loading = true
this.$apis.couponManage
.getCouponDetailApi({ couponId: this.routeInfo.id })
.then(res => {
console.log(res)
this.editForm = this.$common.utils.deepClone(res)
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.useBarriers = this.editForm.useBarriers + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
this.editForm.discountIntensity = (this.editForm.discountIntensity / 100).toFixed(2)
if (this.$isGroupUp) {
this.editForm.scopeApplication = this.editForm.scopeApplication + ''
}
//使用限制,满多少元可用
if (this.editForm.useBarriers == 2) {
this.editForm.full = this.editForm.full
}
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) {
this.editForm.effectiveTime = [this.editForm.effectiveStartTime, this.editForm.effectiveEndTime]
}
this.$nextTick(() => {
this.editStatus = false
})
})
.finally(() => {
this.loading = false
})
})
},
validateRules() {
......@@ -450,7 +506,12 @@ export default {
obj.full = form.full
}
//库存
obj.stock = form.stock
obj.limitStockFlag = this.$isGroupUp ? 2 : 1
if (!this.$isGroupUp) {
obj.stock = form.stock
} else {
obj.scopeApplication = form.scopeApplication
}
//折扣
obj.discountIntensity = (form.discountIntensity * 100).toFixed(0)
//类型(0:不限制次数,1:根据有效期限制多少次,2:根据间隔多少天限制多少次)
......@@ -470,7 +531,13 @@ export default {
handleConfirm() {
this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var merchantval = true
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
})
}
if (valid && merchantval) {
var params = this.getCouponInfoParams()
let method = ''
if (params.couponId) {
......@@ -505,7 +572,7 @@ export default {
.then(() => {
this.cancelJump()
})
.catch(() => {})
.catch(() => { })
} else {
this.cancelJump()
}
......
<!-- 编辑兑换券 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container" style="height: 650px; position: relative">
<div class="container edit-container" style="position: relative" v-loading="loading">
<div class="right_show">
<div class="card-top"></div>
<div class="slider">
......@@ -54,6 +54,13 @@
</div>
<p class="edit-title">{{ title }}兑换券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<template slot="stock" slot-scope="scope">
<span v-if="$isGroupUp">无库存限制</span>
<el-input v-else class="w-150" v-model="editForm[scope.scope.name]" placeholder="请输入库存">
<span slot="suffix">张</span>
</el-input>
</template>
<template slot="directionalFlagHtml">
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
......@@ -89,6 +96,10 @@
<el-button style="margin-left: 80px" @click="editMessage">编辑</el-button>
</template>
</glsx-combi-form>
<div v-if="$isGroupUp">
<p class="edit-title">适用门店配置</p>
<glsx-combi-form class="edit-form-container" ref="merchantRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="merchantEditFormData" :formRules="merchantRule"></glsx-combi-form>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="showSubmit" @click="handleConfirm">确定</el-button>
......@@ -117,6 +128,7 @@ export default {
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
loading: false,
editStatus: false,
// pickerOptions: {
// disabledDate(v) {//禁用当前之前的日期
......@@ -149,7 +161,8 @@ export default {
effectiveTime: [],
effectiveDays: '',
anticipatedCost: '',
directionalFlag: '1'
directionalFlag: '1',
scopeApplication: ''
},
editRule: {
anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }],
......@@ -158,7 +171,7 @@ export default {
effectiveTime: [{ required: true, message: '有效期不能为空', trigger: 'change' }],
effectiveDays: [{ required: true, message: '有效天数不能为空', trigger: 'blur' }],
useDescription: [{ required: true, message: '使用说明不能为空', trigger: 'change' }],
stock: [{ required: true, message: '发放数量不能为空', trigger: 'change' }]
stock: [{ required: true, message: '库存不能为空', trigger: 'change' }]
},
editFormData: [
{
......@@ -176,11 +189,12 @@ export default {
isDisabled: false
},
{
label: '发放数量',
label: '库存',
name: 'stock',
width: '180px',
type: 'input',
append: '张'
addHtml: 'stock'
// width: '180px',
// type: 'input',
// append: '张'
},
{
label: '使用规则',
......@@ -204,10 +218,38 @@ export default {
addHtml: 'editHtml',
isHide: true
}
],
// 适用门店
merchantRule: {
scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
},
merchantEditFormData: [
{
label: '适用范围',
name: 'scopeApplication',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
isDisabled: false,
optionList: [
{
confId: '1',
confName: '旗下所有店通用'
},
{
confId: '2',
confName: '旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
}
]
}
]
}
},
created() {
this.editRule.stock[0].required = !this.$isGroupUp
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
......@@ -223,6 +265,7 @@ export default {
this.editFormData[editHtmlIndex].isHide = false
this.showSubmit = false
this.title = '查看'
this.setAllDisabled('merchantEditFormData')
} else if (addOrEdit == 2) {
this.apear = 'couponEdit'
this.title = '编辑'
......@@ -270,6 +313,11 @@ export default {
},
methods: {
setAllDisabled(editName) {
this[editName].forEach(item => {
item.isDisabled = true
})
},
editCoupon(attribute) {
attribute.forEach(item => {
let index = this.editFormData.findIndex(val => val.name == `${item}`)
......@@ -294,20 +342,28 @@ export default {
},
getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
this.editForm = this.$common.utils.deepClone(res)
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) {
this.editForm.effectiveTime = [this.editForm.effectiveStartTime, this.editForm.effectiveEndTime]
}
this.$nextTick(() => {
this.editStatus = false
this.loading = true
this.$apis.couponManage
.getCouponDetailApi({ couponId: this.routeInfo.id })
.then(res => {
this.editForm = this.$common.utils.deepClone(res)
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
if (this.$isGroupUp) {
this.editForm.scopeApplication = this.editForm.scopeApplication + ''
}
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) {
this.editForm.effectiveTime = [this.editForm.effectiveStartTime, this.editForm.effectiveEndTime]
}
this.$nextTick(() => {
this.editStatus = false
})
}).finally(() => {
this.loading = false
})
})
},
validateRules() {
......@@ -355,7 +411,12 @@ export default {
}
//库存
obj.stock = form.stock
obj.limitStockFlag = this.$isGroupUp ? 2 : 1
if (!this.$isGroupUp) {
obj.stock = form.stock
} else {
obj.scopeApplication = form.scopeApplication
}
//类型(0:不限制次数,1:根据有效期限制多少次,2:根据间隔多少天限制多少次)
obj.useType = 1
//有效期或者间隔天数使用次数
......@@ -373,7 +434,13 @@ export default {
handleConfirm() {
this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var merchantval = true
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
})
}
if (valid && merchantval) {
var params = this.getCouponInfoParams()
let method = ''
if (params.couponId) {
......@@ -408,7 +475,7 @@ export default {
.then(() => {
this.cancelJump()
})
.catch(() => {})
.catch(() => { })
} else {
this.cancelJump()
}
......
<!-- 编辑会员服务 -->
<!-- 编辑服务券 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container">
<p class="edit-title">{{ title }}会员服务</p>
<div class="container edit-container" v-loading="loading">
<p class="edit-title">{{ title }}服务券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="3" :disabled="apear != 'couponAdd'">无有效期</el-radio>
......@@ -42,10 +42,21 @@
</el-form-item>
</el-radio>
</template>
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<template slot="stock" slot-scope="scope">
<span v-if="$isGroupUp">无库存限制</span>
<el-input v-else class="w-150" v-model="editForm[scope.scope.name]" placeholder="请输入库存">
<span slot="suffix">张</span>
</el-input>
</template>
<template slot="useDescriptionHtml">
<el-input type="textarea" v-model="editForm.useDescription" style="width: 320px" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="apear == 'couponSee'" />
</template>
</glsx-combi-form>
<div v-if="$isGroupUp">
<p class="edit-title">适用门店配置</p>
<glsx-combi-form class="edit-form-container" ref="merchantRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="merchantEditFormData" :formRules="merchantRule"></glsx-combi-form>
</div>
</div>
<!-- <div class="left_show">
<div class="card-panel-top">
......@@ -86,6 +97,7 @@ export default {
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
loading: false,
// pickerOptions: {
// disabledDate(v) {//禁用当前之前的日期
// return v.getTime() < new Date().getTime() - 86400000;
......@@ -107,7 +119,8 @@ export default {
effectiveType: '3',
useType: '0',
usageTimes: 1,
usageTimes2: 1
usageTimes2: 1,
scopeApplication: ''
},
editRule: {
couponName: [{ required: true, message: '请输入优惠券名称', trigger: 'change' }],
......@@ -156,18 +169,47 @@ export default {
{
label: '库存',
name: 'stock',
width: '150px',
type: 'input'
addHtml: 'stock'
// width: '150px',
// type: 'input'
},
{
label: '使用说明',
name: 'useDescription',
addHtml: 'useDescriptionHtml'
}
],
// 适用门店
merchantRule: {
scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
},
merchantEditFormData: [
{
label: '适用范围',
name: 'scopeApplication',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
isDisabled: false,
optionList: [
{
confId: '1',
confName: '旗下所有店通用'
},
{
confId: '2',
confName: '旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
}
]
}
]
}
},
created() {
this.editRule.stock[0].required = !this.$isGroupUp
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
......@@ -180,6 +222,7 @@ export default {
if (addOrEdit == 3) {
this.apear = 'couponSee'
this.title = '查看'
this.setAllDisabled('merchantEditFormData')
} else if (addOrEdit == 2) {
this.apear = 'couponEdit'
this.title = '编辑'
......@@ -228,29 +271,42 @@ export default {
},
methods: {
setAllDisabled(editName) {
this[editName].forEach(item => {
item.isDisabled = true
})
},
setDateString(objField, special) {
var value = typeof objField == 'string' ? objField.split(' ')[0] : special ? objField.format('YYYY年MM月DD日') : objField.format('YYYY年MM月DD日')
return value
},
getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
this.editForm = this.$common.utils.deepClone(res)
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.useType = this.editForm.useType + ''
this.loading = true
this.$apis.couponManage
.getCouponDetailApi({ couponId: this.routeInfo.id })
.then(res => {
this.editForm = this.$common.utils.deepClone(res)
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.useType = this.editForm.useType + ''
if (this.$isGroupUp) {
this.editForm.scopeApplication = this.editForm.scopeApplication + ''
}
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) {
this.editForm.effectiveTime = [this.editForm.effectiveStartTime, this.editForm.effectiveEndTime]
}
//类型(0:不限制次数,1:根据有效期限制多少次,2:根据间隔多少天限制多少次)
if (this.editForm.useType == 1) {
this.editForm.usageTimes = this.editForm.useAmount
} else if (this.editForm.useType == 2) {
this.editForm.usageTimes2 = this.editForm.useAmount
}
})
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) {
this.editForm.effectiveTime = [this.editForm.effectiveStartTime, this.editForm.effectiveEndTime]
}
//类型(0:不限制次数,1:根据有效期限制多少次,2:根据间隔多少天限制多少次)
if (this.editForm.useType == 1) {
this.editForm.usageTimes = this.editForm.useAmount
} else if (this.editForm.useType == 2) {
this.editForm.usageTimes2 = this.editForm.useAmount
}
}).finally(() => {
this.loading = false
})
},
validateRules() {
......@@ -293,7 +349,7 @@ export default {
//编辑时只允许编辑使用说明
//优惠券名称
obj.couponName = form.couponName
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:服务券
obj.discountType = '7'
//有效期
......@@ -325,7 +381,12 @@ export default {
//门店价
obj.shopPrice = form.shopPrice
//库存
obj.stock = form.stock
obj.limitStockFlag = this.$isGroupUp ? 2 : 1
if (!this.$isGroupUp) {
obj.stock = form.stock
} else {
obj.scopeApplication = form.scopeApplication
}
}
//使用描述
obj.useDescription = form.useDescription
......@@ -335,7 +396,13 @@ export default {
handleConfirm() {
this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var merchantval = true
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
})
}
if (valid && merchantval) {
var params = this.getCouponInfoParams()
let method = ''
if (params.couponId) {
......
......@@ -329,6 +329,7 @@ export default {
this.editForm.couponList.forEach(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.currentPeople = this.$common.utils.deepClone(this.editForm.staffList)
this.hasCouponBlock(false)
......@@ -386,11 +387,13 @@ export default {
},
handleGiftAdd() {
console.log(this.couponObj,'')
this.selectedGiftList = JSON.parse(JSON.stringify(this.couponObj))
this.handleGiftClose()
},
handleGiftConfirm(selectedData) {
console.log(selectedData)
this.handleGiftClose()
this.couponObj = selectedData
this.recoveryTotalPrice()
......
......@@ -578,7 +578,7 @@ export default {
this.isConsultantVisible = !this.isConsultantVisible
},
handleConsultantConfirm() {
this.$history.push('/home/followUp/index')
this.$history.push('/settings/followUp/index')
},
getConsultant() {
this.$apis.homeSet.getConsultantListApi({ merchantId: this.userInfo.merchantId, followTypes: [3] }).then(res => {
......
<template>
<div class="live-room">
<div class="marketing live-room">
<div class="memberCardWrap" v-if="!(merchantModel == 2 && accountLevel == 1)">
<div class="cardBoxWrap">
<img src="@/assets/memberCard.png" alt="" />
<div class="masonry">
<!-- <div class="masonry">
<img src="@/assets/masonry.png" alt="" />
</div>
</div> -->
<div class="memberCardName">{{ ruleForm.cardName }}</div>
</div>
<div class="cardDetail" v-if="!isShowEditWrap">
<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>
</div>
<!-- <img src="@/assets/edit.png" class="editIcon" @click="openEditWrap" alt="" /> -->
<div class="row">
<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 class="row">
<span>市场价:</span>
......@@ -31,7 +36,7 @@
<span>会员卡试用:</span>
<span class="membershipDays" v-if="ruleForm.tryAble == 1">{{ ruleForm.tryNum }}天试用</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> -->
</div>
<el-button class="seeEquity" size="small" type="primary" @click="openDialog">查看权益</el-button>
......@@ -78,9 +83,9 @@
</div>
</div>
</div>
<p class="pageTitle" v-if="!(merchantModel == 2 && accountLevel == 1)">会员中心</p>
<div class="live-room container">
<!-- <div class="pageTitle" v-if="!(merchantModel == 2 && accountLevel == 1)">会员用户</div> -->
<div class="pageTitle">会员用户</div>
<div class="live-room container p-t-20 ">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-row>
<el-form-item size="small" label="会员用户">
......@@ -111,12 +116,19 @@
</el-form-item>
<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="handleExport">导出</el-button>
<el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item>
</el-row>
</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">
<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">
<div>{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div>
......@@ -184,6 +196,11 @@ import glsxDialog from '@/components/glsx-dialog'
import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent, memberExportApi, getQrUrl } from '@/api/modules/center'
import { statusList, memberTypeList, exportFn } from '@/common/constant'
export default {
filters: {
filterTable(list, data) {
return data
}
},
components: {
glsxDialog
},
......@@ -278,21 +295,39 @@ export default {
tableOption: false,
tableColumns: [
{
label: '',
prop: '',
columnattrs: {
type: 'expand'
},
addHtml: 'cardInfo'
},
{
label: '会员用户',
prop: 'accountName',
width: '180',
addHtml: 'accountName'
// formatter: cellValue => {
// return cellValue.startTime + '-' + cellValue.endTime
// }
},
// {
// label: '会员类型',
// prop: 'memberType',
// formatter: cellValue => {
// return this.baseDataList.memberTypeList.find(item => item.confId == cellValue.memberType).confName
// }
// },
{
label: '会员类型',
prop: 'memberType',
label: '状态',
prop: 'status',
formatter: cellValue => {
return this.baseDataList.memberTypeList.find(item => item.confId == cellValue.memberType).confName
return this.baseDataList.statusList.find(item => item.confId == cellValue.memberStatus).confName
}
},
}
]
},
cardParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '开通门店',
prop: 'merchantName'
......@@ -304,14 +339,6 @@ export default {
{
label: '开通日期',
prop: 'activeTime'
// addHtml: 'activeTime'
},
{
label: '状态',
prop: 'status',
formatter: cellValue => {
return this.baseDataList.statusList.find(item => item.confId == cellValue.status).confName
}
}
]
},
......@@ -536,7 +563,7 @@ export default {
</script>
<style lang="scss" scoped>
/deep/ .el-input-number--small{
/deep/ .el-input-number--small {
width: 53px;
margin: 0 3px;
}
......@@ -587,13 +614,17 @@ export default {
.memberCardWrap {
display: flex;
background-color: #fff;
height: 172px;
height: 190px;
box-sizing: border-box;
margin: 20px 0px;
padding: 15px 20px;
margin-top: 20px;
padding: 10px 8px;
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1);
.cardBoxWrap {
position: relative;
img {
width: 321px;
height: 174px;
}
.masonry {
position: absolute;
top: 40px;
......@@ -601,11 +632,13 @@ export default {
}
.memberCardName {
position: absolute;
font-size: 15px;
color: #8e5310;
font-weight: 700;
top: 54px;
left: 88px;
font-size: 17px;
font-weight: 600;
color: #ffd690;
line-height: 24px;
background: radial-gradient(125deg, #fde8bf 0%, #dda15f 100%);
top: 116px;
margin: 0 28px;
}
}
.cardDetail {
......@@ -614,6 +647,11 @@ export default {
padding-top: 8px;
margin-left: 10px;
position: relative;
.icon-circle-question {
width: 16px;
height: 16px;
}
.seeEquity {
position: absolute;
right: 0;
......@@ -637,9 +675,10 @@ export default {
bottom: 0;
}
.editIcon {
margin-left: 10px;
margin-left: 6px;
vertical-align: middle;
cursor: pointer;
width: 12.8px;
}
.flex-1 {
display: flex;
......@@ -679,14 +718,28 @@ export default {
.pageTitle {
position: relative;
padding: 0 0px;
height: 20px;
font-size: 20px;
font-weight: 700;
padding: 15px 20px;
margin-bottom: -20px;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
line-height: 28px;
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;
}
.el-form-item {
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>
<div class="live-room">
<div class="live-room marketing">
<div class="live-room container">
<div class="flex">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
......@@ -23,7 +23,9 @@
<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-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-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
......@@ -32,33 +34,40 @@
</el-row>
</el-form>
</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)">
{{ item }}
</div>
</div>
<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">
<img class="img-60" :src="scope.scope.shareImgUrl" />
</span> -->
<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" style="color:#eee" v-else>详情</el-button> -->
<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 fn="退款" v-if="scope.scope.refundFlag == 1" type="text" @click="handleRefund(scope.scope)">退款</GLButton>
</span>
</GLTable>
</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>
</template>
<script>
import { orderTypesList, orderStatusList, exportFn } from '@/common/constant'
import url from '@/assets/empty.png'
import { getOrderListApi, orderExportApi } from '@/api/modules/order'
import { getOrderListApi, orderExportApi, orderRefund } from '@/api/modules/order'
export default {
data() {
return {
orderCode: '',
refund: '',
refundVisible: false,
merchantModel: 1, //集团:1,门店:2
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
url: url,
......@@ -104,9 +113,6 @@ export default {
label: '名称',
prop: 'packageName',
width: '180'
// formatter: cellValue => {
// return cellValue.startTime + '-' + cellValue.endTime
// }
},
{
label: '类型',
......@@ -134,15 +140,22 @@ export default {
{
label: '下单时间',
prop: 'createDate',
width: 95
width: 160
},
{
label: '开通门店',
prop: 'merchantName',
width: '180'
},
{
label: '用户信息',
prop: 'accountName'
},
{
label: '订单号',
prop: 'orderCode'
prop: 'orderCode',
width: 190
}
]
},
......@@ -213,7 +226,27 @@ export default {
resolve()
})
},
handleRefund(data) {
this.orderCode = data.orderCode
this.refundVisible = !this.refundVisible
},
refundConfirmDialog() {
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) {
this.$router.push({
path: '/memberCenter/orderDetail',
......@@ -268,21 +301,42 @@ export default {
.container {
.choseRow {
display: flex;
height: 34px;
height: auto;
width: auto;
position: relative;
left: calc(100% - 285px);
.choseItem {
cursor: pointer;
width: 120px;
height: 34px;
line-height: 34px;
text-align: center;
font-size: 14px;
font-size: 12px;
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 {
color: #5850ff;
background-color: #f4f6fc;
color: #ffffff;
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 @@
<script>
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 { dateFormat } from '@/utils/index.js'
import { exportFn } from '@/common/constant'
......@@ -105,7 +105,7 @@ export default {
// 44187877
searchFormTable: {},
// 表格组件
getListApi: getRecordListApi,
getListApi: this.$apis.record.getRecordListApi,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
......@@ -233,7 +233,7 @@ export default {
let params = {}
params.verficationCode = this.ruleForm.verficationCode
// params.discountTypes=[7]
getVerificationCode(params).then(res => {
this.$apis.record.getVerificationCode(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
......@@ -262,7 +262,7 @@ export default {
handleExport(row) {
var params = this.getParams()
verificationExportApi(params).then(res => {
this.$apis.record.verificationExportApi(params).then(res => {
exportFn(res)
})
},
......
<template>
<div class="live-room">
<tip-panel panelWidth="616px" panelMinHeight="40px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel>
<div class="live-room container">
<div class="btnWrap">
<!-- <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>
<el-button :size="size" @click="showViewer = true">查看示例效果</el-button>
<el-image-viewer
v-if="showViewer"
:on-close="
() => {
showViewer = false
}
"
:url-list="srcList"
style="padding:4%;"
/>
<div class="marketing">
<div class="btnWrap">
<!-- <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>
<!-- <el-button :size="size" @click="showViewer = true">查看示例效果</el-button> -->
<el-image-viewer
v-if="showViewer"
:on-close="
() => {
showViewer = false
}
"
:url-list="srcList"
style="padding:4%;"
/>
</div>
<tip-panel class="list-panel" panelMinHeight="40px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel>
<template v-if="accountLevel == 4">
<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">
<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 class="table-btns" slot="optionsFun" slot-scope="scope" :data="scope.scope">
<!-- 是否置顶推荐:1 是;2 否 -->
<el-button type="text" v-if="scope.scope.topFlag == 1">已指定推荐</el-button>
<GLButton type="text" @click="handleUpdateToTop(scope.scope)" v-if="scope.scope.topFlag == 2" fn="置顶推荐">置顶推荐</GLButton>
<template v-if="scope.scope.state === 0">
<!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<el-button type="text" @click="handleUpOption(scope.scope)">上架</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
......@@ -71,15 +86,17 @@
<script>
import glsxDialog from '@/components/glsx-dialog'
import url from '@/assets/empty.png'
import { getSetMealListApi, deleteSetMeal, upDownPackage } from '@/api/modules/setmeal'
import { getSetMealListApi, getSetMealstoreListApi, deleteSetMeal, upDownPackage, updateToTop } from '@/api/modules/setmeal'
import { getLoginCount } from '@/api/modules/service'
import { stateList } from '@/common/constant'
import tipPanel from '@/components/tipPanel/index.vue'
import ticket from './components/ticket.vue'
export default {
components: {
tipPanel,
glsxDialog,
ticket,
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer')
},
data() {
......@@ -89,13 +106,24 @@ export default {
surl: '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,
panelContent: '会员套餐:将已经创建好的会员服务打包成一个套餐售卖给客户。',
panelContent: '会员套餐将会展示在小程序端【会员开通】页,客户开通会员时可选择性通过购买套餐方式开通会员或直接付费开通会员。',
size: 'small',
getListApi: getSetMealListApi,
// getListApi: getSetMealListApi,
searchForm: {
merchantId: 44184606
// merchantName
},
tabList: [
{
text: '本店套餐',
checked: false
},
{
text: '集团套餐',
checked: true
}
],
activetab: 1,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
......@@ -103,23 +131,22 @@ export default {
// tableOption: true,
tableColumns: [
{
label: '',
prop: '',
columnattrs: {
type: 'expand'
},
addHtml: 'list'
},
{
label: '套餐名称',
prop: 'packageName',
width: '180'
},
{
label: '套餐售价',
label: '套餐售价/元',
prop: 'packagePrice',
line: 1
},
{
label: '套餐总价',
prop: 'referencePrice'
},
{
label: '套餐内容',
prop: 'list',
addHtml: 'list'
width: 140
},
{
label: '说明',
......@@ -128,6 +155,16 @@ export default {
line: 4
},
{
label: '购买人数',
prop: 'buyNumber',
line: 1
},
{
label: '套餐总价',
prop: 'referencePrice'
},
{
label: '状态',
prop: 'state',
width: '80',
......@@ -147,14 +184,66 @@ export default {
stateList: stateList
},
//查看示例 --弹窗
isDialogVisible: false
isDialogVisible: false,
merchantModel: 1, //集团:1,门店:2
accountLevel: 0 //1,2,3,4工厂,省代,市代,门店
}
},
computed: {
getListApi() {
const { activetab, merchantModel, accountLevel } = this
let listApi = getSetMealListApi
if (activetab == 1) {
listApi = getSetMealListApi
} else {
listApi = getSetMealstoreListApi
}
return listApi
}
},
created() {
if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
// this.userType = this.$globalState.session.userType
}
this.searchForm = {
merchantId: this.merchantId
// merchantName
}
this.dynamicFile()
this.getLoginCountFun()
},
mounted() {},
methods: {
dynamicFile() {
const { activetab, merchantModel, accountLevel } = this
const saleParam = {
label: '在本店售出数量',
prop: 'buyNumber',
width: 140
}
const referencePrice = {
label: '套餐总价',
prop: 'referencePrice'
}
// accountLevel == 4
if (activetab == 1 && accountLevel == 4) {
this.tableParams.tableColumns.splice(5, 1, saleParam)
} else {
this.tableParams.tableColumns.splice(5, 1, referencePrice)
}
},
changeTab(index) {
this.activetab = index
this.tabList.forEach(item => (item.checked = false))
this.tabList[index].checked = true
this.handleSearch()
this.dynamicFile()
},
previewPic() {
this.$refs.previewImg.showViewer = true
},
......@@ -236,6 +325,19 @@ export default {
handleEdit(row) {
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) {},
handleDelete(row) {
......@@ -264,7 +366,7 @@ export default {
<style lang="scss" scoped>
.btnWrap {
margin-bottom: 20px;
margin: 10px 0;
}
/deep/ .el-dialog__header {
......@@ -321,4 +423,60 @@ export default {
height: 40px;
font-size: 40px;
}
/deep/ .el-table__expanded-cell {
padding: 0;
}
.list-panel {
/deep/ .initPanel {
margin: 0px;
}
}
.setmeal-tabs {
cursor: pointer;
width: auto;
position: relative;
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>
......@@ -5,7 +5,7 @@
<el-tab-pane label="基本信息" name="basicInfo"></el-tab-pane>
<el-tab-pane label="评价信息" name="afterOrder"></el-tab-pane>
</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="home-set-form flex-grow">
<div v-for="(item, index) in externalFormList" :key="index">
......@@ -323,6 +323,7 @@ export default {
name: 'editProduct',
data() {
return {
loading: false,
dialogTableVisible: false,
associationRadio: '',
templateSelection: [],
......@@ -1564,15 +1565,21 @@ export default {
deleteAttrList.forEach(item => {
delete params[item]
})
this.$apis.proManage.insertOrUpdateProApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
this.loading = true
this.$apis.proManage
.insertOrUpdateProApi(params)
.then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.cancelJump()
}
})
.finally(() => {
this.loading = false
})
if (res.code == '0') {
this.cancelJump()
}
})
},
cancelJump() {
this.$router.push({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!