Commit 5f3e4afb by cwq0219
2 parents 8cf2c053 4cb938a3
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<!-- 新增时并且为指定商品时显示,编辑或者查看时也显示 --> <!-- 新增时并且为指定商品时显示,编辑或者查看时也显示 -->
<div slot="proTable" class="select-pro"> <div slot="proTable" class="select-pro">
<!-- <div style="height:70px" v-if="editForm.goodsRefList.length"></div> --> <!-- <div style="height:70px" v-if="editForm.goodsRefList.length"></div> -->
<GLTable v-show="editForm.goodsRefList.length" :hasPage="false" :tableParams="tableParams" :tableData="editForm.goodsRefList" style="padding-left:10px;width:70vw;max-height:350px;overflow: auto;"> <GLTable v-show="editForm.goodsRefList.length" :hasPage="false" :tableParams="tableParams" :tableData="editForm.goodsRefList" style="padding-left:10px;margin-right:340px;max-height:350px;overflow:auto;">
<template slot="goodsImage" slot-scope="scope"> <template slot="goodsImage" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" /> <img class="img-60" :src="scope.scope.goodsImage" />
</template> </template>
......
<template> <template>
<div class="square-main"> <div class="square-main">
<el-dialog title="选择活动" :visible.sync="dialogVisible" width="70%" :before-close="handleClose"> <el-dialog
title="选择活动"
:visible.sync="dialogVisible"
width="1088px"
:before-close="handleClose"
>
<div class="model-panel"> <div class="model-panel">
<div class="model-panel-tab"> <div class="model-panel-tab">
<label>活动类型:</label> <label>活动类型:</label>
...@@ -44,13 +49,9 @@ ...@@ -44,13 +49,9 @@
:title="item.activityName" :title="item.activityName"
v-show="activeName == 5" v-show="activeName == 5"
>{{ item.activityName }}</div> >{{ item.activityName }}</div>
<div class="model-item-content" v-show="activeName == 1 || activeName == 4"></div>
<div class="model-item-content" v-show="activeName == 2">剩余数量:{{ item.residueAmount }}</div>
<div class="model-item-content" v-show="activeName == 1">剩余数量:{{ item.remainAmount }}</div> <div class="model-item-content" v-show="activeName == 1">剩余数量:{{ item.remainAmount }}</div>
<div class="model-item-content" v-show="activeName == 3">价格:{{ item.goodPrice }}元</div> <div class="model-item-content" v-show="activeName == 3">领取方式:免费领用</div>
<div class="model-item-content" v-show="activeName == 4">价格:{{ item.packagePrice }}元</div> <div class="model-item-content" v-show="activeName == 4">领取方式:付费购买</div>
<div class="model-item-content" v-show="activeName == 5"></div>
<div class="model-item-content" v-show="activeName == 5"></div>
<div <div
class="model-item-content" class="model-item-content"
v-show="activeName == 2 && item.effectiveType == 1" v-show="activeName == 2 && item.effectiveType == 1"
...@@ -64,26 +65,36 @@ ...@@ -64,26 +65,36 @@
v-show="activeName == 2 && item.effectiveType == 2" v-show="activeName == 2 && item.effectiveType == 2"
>有效期:{{ item.effectiveStartTime ? item.effectiveStartTime.split(' ')[0] : '' }}~{{ item.effectiveEndTime ? item.effectiveEndTime.split(' ')[0] : '' }}</div> >有效期:{{ item.effectiveStartTime ? item.effectiveStartTime.split(' ')[0] : '' }}~{{ item.effectiveEndTime ? item.effectiveEndTime.split(' ')[0] : '' }}</div>
<div class="model-item-content" v-show="activeName == 3">有效期:{{ item.effectivedDay }}天</div> <div class="model-item-content" v-show="activeName == 3"></div>
<div class="model-item-content model-item-contents" v-show="activeName == 3">
试用天数:
<span>{{ item.freeDay }}天</span>
</div>
<div class="model-item-content" v-show="activeName == 2"> <div class="model-item-content" v-show="activeName == 2">
类型: 使用途径:
<span>{{ item.discountType == 2 ? '折扣券' : item.discountType == 3 ? '代金券' : item.discountType == 4 ? '兑换券' : '' }}</span> {{ item.useChannel == 1 ? '线上商品' : '到店核销' }}
</div> </div>
<div class="model-item-content" v-show="activeName == 1"> <div class="model-item-content" v-show="activeName == 1">
类型: 类型:
<span>精品券</span> <span>精品券</span>
</div> </div>
<div class="model-item-content" v-show="activeName == 3"> <div class="model-item-content" v-show="activeName == 4 || activeName == 5"></div>
类型: <div class="model-item-content model-item-contents" v-show="activeName == 4">
<span>权益卡</span> 销售价格:
<span>{{ item.packagePrice }}元</span>
</div> </div>
<div class="model-item-content" v-show="activeName == 4"> <div class="model-item-content" v-if="activeName == 5">
类型: 开始时间:
<span>权益套餐</span> {{ item.startTime }}
</div> </div>
<div class="model-item-content" v-if="activeName == 5"> <div class="model-item-content" v-if="activeName == 5">
活动时间: 结束时间:
{{ item.startTime.split(' ')[0] }}-{{ item.endTime.split(' ')[0] }} {{ item.endTime }}
</div>
<div class="model-item-content model-item-contents" v-show="activeName == 2">
数量:
<span>{{ item.residueAmount }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -133,6 +144,7 @@ export default { ...@@ -133,6 +144,7 @@ export default {
if (item.equityClassId) { if (item.equityClassId) {
this.selectItem.id = item.equityClassId this.selectItem.id = item.equityClassId
} }
console.log(this.selectItem)
}, },
handleSelect() { handleSelect() {
if (!this.selectItem.id) { if (!this.selectItem.id) {
...@@ -229,9 +241,6 @@ export default { ...@@ -229,9 +241,6 @@ export default {
line-height: 24px; line-height: 24px;
} }
/deep/ { /deep/ {
.el-pager {
height: 30px;
}
.el-checkbox:last-of-type { .el-checkbox:last-of-type {
margin-right: 8px; margin-right: 8px;
} }
...@@ -275,28 +284,33 @@ export default { ...@@ -275,28 +284,33 @@ export default {
} }
} }
.model-item-panel { .model-item-panel {
display: grid; // display: grid;
grid-template-columns: repeat(4, 25%); // grid-template-columns: repeat(4, 25%);
grid-row-gap: 10px; // grid-row-gap: 10px;
max-height: 35vh; max-height: 38vh;
min-height: 35vh;
padding: 10px;
overflow: auto; overflow: auto;
text-align: center; display: flex;
flex-wrap: wrap;
align-items: stretch;
flex-direction: row;
.model-item { .model-item {
width: 240px;
margin-right: 24px;
margin-bottom: 24px;
padding: 12px 16px;
position: relative; position: relative;
height: 128px; height: 128px;
background: #ffffff; background: #ffffff;
border-radius: 4px; border-radius: 4px;
border: 2px solid #e6e6e6; border: 1px solid #e6e6e6;
padding: 14px 24px; padding: 14px 24px;
box-sizing: border-box; box-sizing: border-box;
margin-right: 10px;
&:nth-child(4n) { &:nth-child(4n) {
margin-right: 0px; margin-right: 0px;
} }
&.checked { &.checked {
border: 2px solid #5850ff; background: rgba(88, 80, 255, 0.1);
border: 1px solid #5850ff;
} }
&-qrcode { &-qrcode {
position: absolute; position: absolute;
...@@ -320,16 +334,25 @@ export default { ...@@ -320,16 +334,25 @@ export default {
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
line-height: 17px; line-height: 16px;
height: 16px;
margin-top: 6px; margin-top: 6px;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
span { span {
color: #5850ff; color: #5850ff;
font-size: 20px;
} }
} }
&-contents {
line-height: 22px;
height: 22px;
}
} }
} }
} }
/deep/ .el-pager {
height: 30px;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -314,6 +314,7 @@ mounted () { ...@@ -314,6 +314,7 @@ mounted () {
this.ruleForm.price = res.goodPrice this.ruleForm.price = res.goodPrice
this.ruleForm.marketPrice = res.marketPrice this.ruleForm.marketPrice = res.marketPrice
this.ruleForm.linkUrl = res.freeUrl this.ruleForm.linkUrl = res.freeUrl
this.ruleForm.tryAble=res.tryAble
}) })
}, },
openEditWrap() { openEditWrap() {
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<div class="live-room container"> <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>
<el-button :size="size" @click="isDialogVisible = true">查看示例效果</el-button> <el-button :size="size" @click="showViewer=true">查看示例效果</el-button>
<el-image-viewer v-if="showViewer" :on-close="()=>{showViewer=false}" :url-list="srcList"/>
</div> </div>
<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">
...@@ -32,17 +33,13 @@ ...@@ -32,17 +33,13 @@
<glsx-dialog title="示例效果" width="1142px" :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" typeName="primary" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose"> <glsx-dialog title="示例效果" width="1142px" :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" typeName="primary" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<div class="content-body"> <div class="content-body">
<div class="content-item col1"> <div class="content-item col1">
<div class="subTitle"> <div class="subTitle">1、管理后台先创建套餐</div>
1、管理后台先创建套餐
</div>
<div class="imageWrap"> <div class="imageWrap">
<img src="@/assets/table.png" alt="" /> <img src="@/assets/table.png" alt="" />
</div> </div>
</div> </div>
<div class="content-item col2"> <div class="content-item col2">
<div class="subTitle"> <div class="subTitle">2、小程序端进行展示</div>
2、小程序端进行展示
</div>
<div class="twoImageWrap"> <div class="twoImageWrap">
<img src="@/assets/card1.png" alt="" /> <img src="@/assets/card1.png" alt="" />
<img src="@/assets/card2.png" alt="" /> <img src="@/assets/card2.png" alt="" />
...@@ -55,21 +52,24 @@ ...@@ -55,21 +52,24 @@
<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 { getSetMealListApi, deleteSetMeal, upDownPackage } 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'
export default { export default {
components: { components: {
tipPanel, tipPanel,
glsxDialog glsxDialog,
'el-image-viewer':()=>import('element-ui/packages/image/src/image-viewer')
}, },
data() { data() {
return { return {
showViewer:false,
url: url, url: url,
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, isFirstShow: false,
panelContent: '会员套餐:将已经创建好的会员服务打包成一个套餐售卖给客户。', panelContent: '会员套餐:将已经创建好的会员服务打包成一个套餐售卖给客户。',
size: 'small', size: 'small',
...@@ -134,9 +134,11 @@ export default { ...@@ -134,9 +134,11 @@ export default {
created() { created() {
this.getLoginCountFun() this.getLoginCountFun()
}, },
mounted () { mounted() {},
},
methods: { methods: {
previewPic() {
this.$refs.previewImg.showViewer = true
},
getLoginCountFun() { getLoginCountFun() {
//loginType:5是查会员套餐浏览次数 //loginType:5是查会员套餐浏览次数
getLoginCount({ loginType: 5 }).then(res => { getLoginCount({ loginType: 5 }).then(res => {
...@@ -162,7 +164,6 @@ export default { ...@@ -162,7 +164,6 @@ export default {
this.$refs.memberSetMealRef.setTableHeightFun() this.$refs.memberSetMealRef.setTableHeightFun()
} }
}, },
//创建套餐 //创建套餐
handleCreate() { handleCreate() {
this.$router.push({ this.$router.push({
......
...@@ -239,7 +239,7 @@ export default { ...@@ -239,7 +239,7 @@ export default {
}, },
//删除该条服务套餐(让item.serviceQuantity==0) //删除该条服务套餐(让item.serviceQuantity==0)
closeChoseItemFun(item, index) { closeChoseItemFun(item, index) {
this.totalPrice = (this.totalPrice*100 - item.vipPrice * item.serviceQuantity*100)/100 this.totalPrice = ((this.totalPrice*100 - item.vipPrice * item.serviceQuantity*100)/100).toFixed(2)
// item.serviceQuantity = 0 // item.serviceQuantity = 0
// this.allItemList.forEach(ele => { // this.allItemList.forEach(ele => {
// if (ele.id == item.serviceId) { // if (ele.id == item.serviceId) {
...@@ -255,7 +255,7 @@ export default { ...@@ -255,7 +255,7 @@ export default {
this.allItemList.forEach(item => { this.allItemList.forEach(item => {
if (item.serviceQuantity) { if (item.serviceQuantity) {
this.selectNum++ this.selectNum++
this.totalPrice = (this.totalPrice *100+item.vipPrice * item.serviceQuantity*100)/100 this.totalPrice = ((this.totalPrice*100 +item.vipPrice * item.serviceQuantity*100)/100).toFixed(2)
} }
}) })
}, },
...@@ -406,7 +406,7 @@ export default { ...@@ -406,7 +406,7 @@ export default {
this.setmealDialogVisible = false this.setmealDialogVisible = false
this.totalPrice = 0 this.totalPrice = 0
this.choseItemList.forEach(item => { this.choseItemList.forEach(item => {
this.totalPrice = (this.totalPrice*100+ item.vipPrice * item.serviceQuantity*100)/100 this.totalPrice =((this.totalPrice*100+ item.vipPrice * item.serviceQuantity*100)/100).toFixed(2)
}) })
// this.totalPrice = this.choseItemList.reduce(function(preValue, choseItem) { // this.totalPrice = this.choseItemList.reduce(function(preValue, choseItem) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!