Commit d5a5f816 by 胡悦
2 parents 502cfed6 e7db956e
......@@ -74,7 +74,7 @@
<!-- 新增时并且为指定商品时显示,编辑或者查看时也显示 -->
<div slot="proTable" class="select-pro">
<!-- <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">
<img class="img-60" :src="scope.scope.goodsImage" />
</template>
......
......@@ -26,7 +26,7 @@
<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)" />
</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>
</div>
</div>
......
......@@ -314,6 +314,7 @@ mounted () {
this.ruleForm.price = res.goodPrice
this.ruleForm.marketPrice = res.marketPrice
this.ruleForm.linkUrl = res.freeUrl
this.ruleForm.tryAble=res.tryAble
})
},
openEditWrap() {
......
......@@ -4,7 +4,13 @@
<div class="live-room container">
<div class="btnWrap">
<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>
<GLTable ref="memberSetMealRef" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="list" slot-scope="scope">
......@@ -28,21 +34,17 @@
</span>
</GLTable>
</div>
<!-- btnCancelLabel="关闭" -->
<!-- btnCancelLabel="关闭" -->
<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-item col1">
<div class="subTitle">
1、管理后台先创建套餐
</div>
<div class="subTitle">1、管理后台先创建套餐</div>
<div class="imageWrap">
<img src="@/assets/table.png" alt="" />
</div>
</div>
<div class="content-item col2">
<div class="subTitle">
2、小程序端进行展示
</div>
<div class="subTitle">2、小程序端进行展示</div>
<div class="twoImageWrap">
<img src="@/assets/card1.png" alt="" />
<img src="@/assets/card2.png" alt="" />
......@@ -55,13 +57,12 @@
<script>
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 { getLoginCount } from '@/api/modules/service'
import { stateList } from '@/common/constant'
import tipPanel from '@/components/tipPanel/index.vue'
export default {
components: {
tipPanel,
......@@ -70,6 +71,8 @@ export default {
data() {
return {
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,
panelContent: '会员套餐:将已经创建好的会员服务打包成一个套餐售卖给客户。',
size: 'small',
......@@ -134,9 +137,11 @@ export default {
created() {
this.getLoginCountFun()
},
mounted () {
},
mounted() {},
methods: {
previewPic() {
this.$refs.previewImg.showViewer = true
},
getLoginCountFun() {
//loginType:5是查会员套餐浏览次数
getLoginCount({ loginType: 5 }).then(res => {
......@@ -162,7 +167,6 @@ export default {
this.$refs.memberSetMealRef.setTableHeightFun()
}
},
//创建套餐
handleCreate() {
this.$router.push({
......@@ -245,6 +249,19 @@ export default {
<style lang="scss" scoped>
.btnWrap {
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 {
......
......@@ -239,7 +239,7 @@ export default {
},
//删除该条服务套餐(让item.serviceQuantity==0)
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
// this.allItemList.forEach(ele => {
// if (ele.id == item.serviceId) {
......@@ -255,7 +255,7 @@ export default {
this.allItemList.forEach(item => {
if (item.serviceQuantity) {
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 {
this.setmealDialogVisible = false
this.totalPrice = 0
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) {
......
......@@ -138,75 +138,77 @@
</tr>
</tbody>
</table>
<table class="table-spesc" style="max-height: 400px; overflow: scroll;">
<tbody>
<tr
style="border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;"
v-for="(subItem, subIndex) in nameToValSpecsList"
:key="subIndex"
>
<td
:style="{ width: specsWidth }"
v-for="(n, idx) in subItem.specsValueList"
:key="idx"
:title="n"
>{{ n }}</td>
<td :style="{ width: specsWidth }">
<div v-if="routeInfo.groupOrStore == 1">
<div style="max-height: 400px; overflow: scroll;">
<table class="table-spesc">
<tbody>
<tr
style="border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;"
v-for="(subItem, subIndex) in nameToValSpecsList"
:key="subIndex"
>
<td
:style="{ width: specsWidth }"
v-for="(n, idx) in subItem.specsValueList"
:key="idx"
:title="n"
>{{ n }}</td>
<td :style="{ width: specsWidth }">
<div v-if="routeInfo.groupOrStore == 1">
<el-input
:disabled="isDisabled"
:class="{ 'border-red': (!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted }"
placeholder="零售价"
v-model="subItem.retailPrice"
@input.native="e => handleRetailPriceInput(e, subIndex)"
@blur="handleRetailPriceBlur"
>
<el-popover
v-show="(!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted"
slot="suffix"
placement="top"
title
width="90"
trigger="hover"
:content="!(subItem.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'"
>
<i class="el-icon-warning color-red" slot="reference"></i>
</el-popover>
</el-input>
</div>
<el-input
:disabled="isDisabled"
:class="{ 'border-red': (!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted }"
v-else
placeholder="零售价"
v-model="subItem.retailPrice"
@input.native="e => handleRetailPriceInput(e, subIndex)"
@blur="handleRetailPriceBlur"
></el-input>
</td>
<td :style="{ width: specsWidth }">
<el-input
:disabled="isDisabled"
placeholder="库存"
v-model="subItem.stock"
:class="{ 'border-red': !(subItem.stock + '') && submitted }"
@input.native="e => handleStockInput(e, subIndex)"
>
<el-popover
v-show="(!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted"
v-show="!(subItem.stock + '') && submitted"
slot="suffix"
placement="top"
title
width="90"
trigger="hover"
:content="!(subItem.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'"
content="库存是必填项"
>
<i class="el-icon-warning color-red" slot="reference"></i>
</el-popover>
</el-input>
</div>
<el-input
:disabled="isDisabled"
v-else
placeholder="零售价"
v-model="subItem.retailPrice"
@input.native="e => handleRetailPriceInput(e, subIndex)"
@blur="handleRetailPriceBlur"
></el-input>
</td>
<td :style="{ width: specsWidth }">
<el-input
:disabled="isDisabled"
placeholder="库存"
v-model="subItem.stock"
:class="{ 'border-red': !(subItem.stock + '') && submitted }"
@input.native="e => handleStockInput(e, subIndex)"
>
<el-popover
v-show="!(subItem.stock + '') && submitted"
slot="suffix"
placement="top"
title
width="90"
trigger="hover"
content="库存是必填项"
>
<i class="el-icon-warning color-red" slot="reference"></i>
</el-popover>
</el-input>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<template slot="retailPrice">
......@@ -1322,7 +1324,7 @@ export default {
deleteAttrList.forEach(item => {
delete params[item]
})
console.log(params)
// console.log(params)
this.$apis.proManage.insertOrUpdateProApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
......
<!-- 商品编辑 - 带货 -->
<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">
<p class="edit-title">{{ title }}</p>
<div class="flex" style="margin-top: 20px;">
<div style="width: 440px; text-align: center;">
<img class="main-img" :src="mainImgUrl" />
<div class="main-img-box">
<!-- <img class="main-img" :src="mainImgUrl" />
<div>
<div class="flex">
<p class="arrow left-arrow" @click="handleMoveImg('left')"></p>
......@@ -16,7 +16,18 @@
</div>
<p class="arrow right-arrow" @click="handleMoveImg('right')"></p>
</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 style="width: calc(100% - 440px);">
<p class="pro-name txt-ellipsis">{{ editForm.goodsName }}</p>
......@@ -25,38 +36,44 @@
</div>
<div v-if="specificationDetailList.length" class="flex" style="margin-top: 20px;" id="specificationDetailList">
<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">
<tbody>
<tr>
<td :style="{ width: specsWidth }" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex">{{ subItem.specificationName }}</td>
<td :style="{ width: specsWidth }">零售价(元)</td>
<td :style="{ width: specsWidth }">供货价</td>
<td :style="{ width: specsWidth }">利润</td>
<td :style="{ width: specsWidth }">库存</td>
</tr>
</tbody>
</table>
<table class="table-spesc" style="max-height: 400px;">
<tbody>
<tr style="border-bottom: 1px solid rgb(235, 235, 235);" 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 }">
<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-popover v-show="(!(item.retailPrice + '') || +item.supplyPrice > +item.retailPrice) && submitted" slot="suffix" placement="top" title="" width="90" trigger="hover" :content="!(item.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'">
<i class="el-icon-warning color-red" slot="reference"></i>
</el-popover>
</el-input>
</td>
<td :style="{ width: specsWidth }">{{ item.supplyPrice }}元</td>
<td :style="{ width: specsWidth }">{{ (item.retailPrice - item.supplyPrice).toFixed(2) }}元</td>
<td :style="{ width: specsWidth }">{{ item.stock }}件</td>
<tr style="background: #F4F6FC; box-shadow: 0px 1px 5px 0px rgba(38, 38, 38, 0.1);">
<td :style="{ width: specsWidth, padding: '17px 0' }" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex">{{ subItem.specificationName }}</td>
<td :style="{ width: specsWidth, padding: '17px 0' }">零售价(元)</td>
<td :style="{ width: specsWidth, padding: '17px 0' }">供货价</td>
<td :style="{ width: specsWidth, padding: '17px 0' }">利润</td>
<td :style="{ width: specsWidth, padding: '17px 0' }">库存</td>
</tr>
</tbody>
</table>
<div style="max-height: 400px; overflow: scroll;">
<table class="table-spesc">
<tbody>
<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 }">
<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-popover v-show="(!(item.retailPrice + '') || +item.supplyPrice > +item.retailPrice) && submitted" slot="suffix" placement="top" title="" width="90" trigger="hover" :content="!(item.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'">
<i class="el-icon-warning color-red" slot="reference"></i>
</el-popover>
</el-input>
</td>
<td :style="{ width: specsWidth }">{{ item.supplyPrice }}元</td>
<td :style="{ width: specsWidth }">{{ (item.retailPrice - item.supplyPrice).toFixed(2) }}元</td>
<td :style="{ width: specsWidth }">{{ item.stock }}件</td>
</tr>
</tbody>
</table>
</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>
<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 class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" @click="handleConfirm">确定</el-button>
......@@ -369,9 +386,21 @@ export default {
vertical-align: top;
}
.edit-product-dh .main-img {
/* .edit-product-dh .main-img {
width: 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 {
......@@ -424,6 +453,7 @@ export default {
.edit-product-dh .supply-price {
font-size: 26px;
color: #FF6D00;
margin-top: 10px;
}
.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!