Commit d5a5f816 by 胡悦
2 parents 502cfed6 e7db956e
...@@ -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>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<span class="number">上传</span> <span class="number">上传</span>
<input type="file" style="opacity: 0;" ref="file" class="activity-img home-img-w-h" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleImgChange(e, subIndex)" /> <input type="file" style="opacity: 0;" ref="file" class="activity-img home-img-w-h" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleImgChange(e, subIndex)" />
</div> </div>
<div v-show="!subItem.bannerImg"> <div v-show="!subItem.bannerImg" style="margin-left: 40px;">
<el-button type="text" class="el-icon-delete" @click="handleBannerDelete(subIndex)"></el-button> <el-button type="text" class="el-icon-delete" @click="handleBannerDelete(subIndex)"></el-button>
</div> </div>
</div> </div>
......
...@@ -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,13 @@ ...@@ -4,7 +4,13 @@
<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> <!-- @click="isDialogVisible = true" -->
<div class="seeBtnWrap">
<el-button :size="size" @click="previewPic">查看示例效果</el-button>
<div class="demo-image__preview">
<el-image ref="previewImg" style="width: 110px; height: 32px" :src="surl" :preview-src-list="srcList"></el-image>
</div>
</div>
</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 +38,13 @@ ...@@ -32,17 +38,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,13 +57,12 @@ ...@@ -55,13 +57,12 @@
<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,
...@@ -70,6 +71,8 @@ export default { ...@@ -70,6 +71,8 @@ export default {
data() { data() {
return { return {
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 +137,11 @@ export default { ...@@ -134,9 +137,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 +167,6 @@ export default { ...@@ -162,7 +167,6 @@ export default {
this.$refs.memberSetMealRef.setTableHeightFun() this.$refs.memberSetMealRef.setTableHeightFun()
} }
}, },
//创建套餐 //创建套餐
handleCreate() { handleCreate() {
this.$router.push({ this.$router.push({
...@@ -245,6 +249,19 @@ export default { ...@@ -245,6 +249,19 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.btnWrap { .btnWrap {
margin-bottom: 20px; margin-bottom: 20px;
.seeBtnWrap {
margin-left: 20px;
display: inline-block;
position: relative;
.demo-image__preview {
position: absolute;
left: 0px;
top: 0;
width: 68px;
height: 32px;
opacity: 0;
}
}
} }
/deep/ .el-dialog__header { /deep/ .el-dialog__header {
......
...@@ -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) {
......
...@@ -138,7 +138,8 @@ ...@@ -138,7 +138,8 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<table class="table-spesc" style="max-height: 400px; overflow: scroll;"> <div style="max-height: 400px; overflow: scroll;">
<table class="table-spesc">
<tbody> <tbody>
<tr <tr
style="border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;" style="border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;"
...@@ -209,6 +210,7 @@ ...@@ -209,6 +210,7 @@
</table> </table>
</div> </div>
</div> </div>
</div>
<template slot="retailPrice"> <template slot="retailPrice">
<p class="edit-tips">作为商品商城售卖的价格</p> <p class="edit-tips">作为商品商城售卖的价格</p>
</template> </template>
...@@ -1322,7 +1324,7 @@ export default { ...@@ -1322,7 +1324,7 @@ export default {
deleteAttrList.forEach(item => { deleteAttrList.forEach(item => {
delete params[item] delete params[item]
}) })
console.log(params) // console.log(params)
this.$apis.proManage.insertOrUpdateProApi(params).then(res => { this.$apis.proManage.insertOrUpdateProApi(params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : '操作失败', message: res.code == '0' ? '操作成功' : '操作失败',
......
<!-- 商品编辑 - 带货 --> <!-- 商品编辑 - 带货 -->
<template> <template>
<div class="edit-product-dh marketing p-t-20"> <div class="edit-product-dh marketing p-t-20 edit-box">
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">{{ title }}</p> <p class="edit-title">{{ title }}</p>
<div class="flex" style="margin-top: 20px;"> <div class="flex" style="margin-top: 20px;">
<div style="width: 440px; text-align: center;"> <div class="main-img-box">
<img class="main-img" :src="mainImgUrl" /> <!-- <img class="main-img" :src="mainImgUrl" />
<div> <div>
<div class="flex"> <div class="flex">
<p class="arrow left-arrow" @click="handleMoveImg('left')"></p> <p class="arrow left-arrow" @click="handleMoveImg('left')"></p>
...@@ -16,7 +16,18 @@ ...@@ -16,7 +16,18 @@
</div> </div>
<p class="arrow right-arrow" @click="handleMoveImg('right')"></p> <p class="arrow right-arrow" @click="handleMoveImg('right')"></p>
</div> </div>
</div> </div> -->
<!-- <img
v-if="!wechatImgList.length"
class="inner-img"
src="@/assets/product-default.png"
/> -->
<el-carousel height="420px">
<el-carousel-item v-for="item in editForm.goodsDetailImageList" :key="item">
<video v-if="item.resType == 3" class="inner-img" :src="item.content"></video>
<img class="inner-img" :src="item.content" />
</el-carousel-item>
</el-carousel>
</div> </div>
<div style="width: calc(100% - 440px);"> <div style="width: calc(100% - 440px);">
<p class="pro-name txt-ellipsis">{{ editForm.goodsName }}</p> <p class="pro-name txt-ellipsis">{{ editForm.goodsName }}</p>
...@@ -25,21 +36,22 @@ ...@@ -25,21 +36,22 @@
</div> </div>
<div v-if="specificationDetailList.length" class="flex" style="margin-top: 20px;" id="specificationDetailList"> <div v-if="specificationDetailList.length" class="flex" style="margin-top: 20px;" id="specificationDetailList">
<span class="spesc-label" :style="{ width: labelWidth }">规格明细:</span> <span class="spesc-label" :style="{ width: labelWidth }">规格明细:</span>
<div style="width: calc(100% - 100px);"> <div style="width: calc(100% - 100px); padding-right: 20px;">
<table class="table-spesc"> <table class="table-spesc">
<tbody> <tbody>
<tr> <tr style="background: #F4F6FC; box-shadow: 0px 1px 5px 0px rgba(38, 38, 38, 0.1);">
<td :style="{ width: specsWidth }" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex">{{ subItem.specificationName }}</td> <td :style="{ width: specsWidth, padding: '17px 0' }" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex">{{ subItem.specificationName }}</td>
<td :style="{ width: specsWidth }">零售价(元)</td> <td :style="{ width: specsWidth, padding: '17px 0' }">零售价(元)</td>
<td :style="{ width: specsWidth }">供货价</td> <td :style="{ width: specsWidth, padding: '17px 0' }">供货价</td>
<td :style="{ width: specsWidth }">利润</td> <td :style="{ width: specsWidth, padding: '17px 0' }">利润</td>
<td :style="{ width: specsWidth }">库存</td> <td :style="{ width: specsWidth, padding: '17px 0' }">库存</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<table class="table-spesc" style="max-height: 400px;"> <div style="max-height: 400px; overflow: scroll;">
<table class="table-spesc">
<tbody> <tbody>
<tr style="border-bottom: 1px solid rgb(235, 235, 235);" v-for="(item, index) in nameToValSpecsList" :key="index"> <tr style="border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;" v-for="(item, index) in nameToValSpecsList" :key="index">
<td :style="{ width: specsWidth }" v-for="(n, idx) in item.specsValueList" :key="idx">{{ n }}</td> <td :style="{ width: specsWidth }" v-for="(n, idx) in item.specsValueList" :key="idx">{{ n }}</td>
<td :style="{ width: specsWidth }"> <td :style="{ width: specsWidth }">
<el-input :disabled="isDisabled" :class="{ 'border-red': (!(item.retailPrice + '') || +item.supplyPrice > +item.retailPrice) && submitted }" placeholder="零售价" v-model="item.retailPrice" @input.native="e => handleInput(e, index)"> <el-input :disabled="isDisabled" :class="{ 'border-red': (!(item.retailPrice + '') || +item.supplyPrice > +item.retailPrice) && submitted }" placeholder="零售价" v-model="item.retailPrice" @input.native="e => handleInput(e, index)">
...@@ -56,7 +68,12 @@ ...@@ -56,7 +68,12 @@
</table> </table>
</div> </div>
</div> </div>
</div>
<glsx-combi-form v-if="!specificationDetailList.length" class="edit-form-container" ref="editFormRef" labelWidth="140px" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"></glsx-combi-form> <glsx-combi-form v-if="!specificationDetailList.length" class="edit-form-container" ref="editFormRef" labelWidth="140px" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"></glsx-combi-form>
<div style="width: 375px; margin: 0 0 10px 40px;" v-for="(item, index) in editForm.goodsDescList" :key="index">
<div v-show="item.resType == 2">{{item.content}}</div>
<img style="width: 375px; width: 375px;" v-show="item.resType == 1" :src="item.content" />
</div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" @click="handleConfirm">确定</el-button> <el-button type="primary" @click="handleConfirm">确定</el-button>
...@@ -369,9 +386,21 @@ export default { ...@@ -369,9 +386,21 @@ export default {
vertical-align: top; vertical-align: top;
} }
.edit-product-dh .main-img { /* .edit-product-dh .main-img {
width: 375px; width: 375px;
height: 375px; height: 375px;
} */
.edit-product-dh .inner-img {
width: 420px;
height: 420px;
}
.edit-product-dh .main-img-box {
width: 440px;
/* height: 440px; */
text-align: center;
padding: 0 20px;
} }
/* .edit-product-dh .flex { /* .edit-product-dh .flex {
...@@ -424,6 +453,7 @@ export default { ...@@ -424,6 +453,7 @@ export default {
.edit-product-dh .supply-price { .edit-product-dh .supply-price {
font-size: 26px; font-size: 26px;
color: #FF6D00; color: #FF6D00;
margin-top: 10px;
} }
.edit-product-dh .border-red { .edit-product-dh .border-red {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!