Commit 74939fe4 by 王志慧

广汇商品支持配置是否赠送会员

1 parent 696fd7e9
...@@ -17,8 +17,7 @@ ...@@ -17,8 +17,7 @@
<div class="member-card"><img src="@/assets/silver.png" alt="" /></div> <div class="member-card"><img src="@/assets/silver.png" alt="" /></div>
</template> </template>
<template> <template>
<GLButton @click="openEditWrap" fn="编辑" mode="div"><img src="@/assets/editBlue.png" class="editIcon" <GLButton @click="openEditWrap" fn="编辑" mode="div"><img src="@/assets/editBlue.png" class="editIcon" @click="openEditWrap" alt="" /></GLButton>
@click="openEditWrap" alt="" /></GLButton>
</template> </template>
</div> </div>
<template v-if="showGh"> <template v-if="showGh">
...@@ -49,45 +48,38 @@ ...@@ -49,45 +48,38 @@
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm">
<template v-if="!showGh"> <template v-if="!showGh">
<el-form-item label="会员卡名:" prop="cardName" size="small"> <el-form-item label="会员卡名:" prop="cardName" size="small">
<el-input v-model.trim="ruleForm.cardName" size="small" class="cardNameInput" show-word-limit <el-input v-model.trim="ruleForm.cardName" size="small" class="cardNameInput" show-word-limit placeholder="请输入会员卡名" maxlength="15"></el-input>
placeholder="请输入会员卡名" maxlength="15"></el-input>
</el-form-item> </el-form-item>
</template> </template>
<template v-else> <template v-else>
<el-form-item label="银卡" prop="cardName" size="small"> <el-form-item label="银卡" prop="cardName" size="small">
<el-input v-model.trim="ruleForm.cardName" size="small" class="cardNameInput" show-word-limit <el-input v-model.trim="ruleForm.cardName" size="small" class="cardNameInput" show-word-limit placeholder="请输入银卡名称" maxlength="15"></el-input>
placeholder="请输入银卡名称" maxlength="15"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="金卡" prop="goldCardClassName" size="small"> <el-form-item label="金卡" prop="goldCardClassName" size="small">
<el-input v-model.trim="ruleForm.goldCardClassName" size="small" class="cardNameInput" show-word-limit <el-input v-model.trim="ruleForm.goldCardClassName" size="small" class="cardNameInput" show-word-limit placeholder="请输入金卡名称" maxlength="15"></el-input>
placeholder="请输入金卡名称" maxlength="15"></el-input>
</el-form-item> </el-form-item>
</template> </template>
<div class="pricesMerge"> <div class="pricesMerge">
<el-form-item label="售价/元:" size="small" prop="price" style="width: 300px"> <el-form-item label="售价/元:" size="small" prop="price" style="width: 300px">
<el-input v-model="ruleForm.price" size="small" style="width: 136px" placeholder="请输入售价" <el-input v-model="ruleForm.price" size="small" style="width: 136px" placeholder="请输入售价" @keyup.native="ruleForm.price = oninput(ruleForm.price)">
@keyup.native="ruleForm.price = oninput(ruleForm.price)">
<!-- <span slot="suffix" class="suffix-label">元</span> --> <!-- <span slot="suffix" class="suffix-label">元</span> -->
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="市场价/元:" prop="marketPrice" size="small" style="width: 300px"> <el-form-item label="市场价/元:" prop="marketPrice" size="small" style="width: 300px">
<el-input v-model="ruleForm.marketPrice" size="small" style="width: 136px" placeholder="请输入市场价" <el-input v-model="ruleForm.marketPrice" size="small" style="width: 136px" placeholder="请输入市场价" @keyup.native="ruleForm.marketPrice = oninput(ruleForm.marketPrice)">
@keyup.native="ruleForm.marketPrice = oninput(ruleForm.marketPrice)">
<!-- <span slot="suffix" class="suffix-label">元</span> --> <!-- <span slot="suffix" class="suffix-label">元</span> -->
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item :class="!ruleForm.tryNum ? 'is-error' : ''" class="memberTrial" label="会员卡试用" size="small"> <el-form-item :class="!ruleForm.tryNum ? 'is-error' : ''" class="memberTrial" label="会员卡试用" size="small">
<div class="trialMerge"> <div class="trialMerge">
<el-switch class="switchTag" active-value="1" inactive-value="0" v-model="ruleForm.tryAble" <el-switch class="switchTag" active-value="1" inactive-value="0" v-model="ruleForm.tryAble" active-color="#5850FF" inactive-color="#E8E8EA" active-text="开" inactive-text="关"></el-switch>
active-color="#5850FF" inactive-color="#E8E8EA" active-text="开" inactive-text="关"></el-switch>
<div class="trialDays" v-if="ruleForm.tryAble == 1"> <div class="trialDays" v-if="ruleForm.tryAble == 1">
<span>试用时长</span> <span>试用时长</span>
<el-input-number v-model="ruleForm.tryNum" :controls="false" :min="1" :max="365"></el-input-number> <el-input-number v-model="ruleForm.tryNum" :controls="false" :min="1" :max="365"></el-input-number>
<span>天试用</span> <span>天试用</span>
</div> </div>
<div class="el-form-item__error trialDays_error" v-if="ruleForm.tryAble == 1 && !ruleForm.tryNum">请输入试用时长 <div class="el-form-item__error trialDays_error" v-if="ruleForm.tryAble == 1 && !ruleForm.tryNum">请输入试用时长</div>
</div>
</div> </div>
<!-- <div v-if="ruleForm.tryAble" class="promoteQR">生成小程序码推广</div> --> <!-- <div v-if="ruleForm.tryAble" class="promoteQR">生成小程序码推广</div> -->
</el-form-item> </el-form-item>
...@@ -101,17 +93,14 @@ ...@@ -101,17 +93,14 @@
</div> </div>
<div class="pageTitle">会员用户</div> <div class="pageTitle">会员用户</div>
<div class="live-room container"> <div class="live-room container">
<GLCombiForm class="p-t-20" ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" <GLCombiForm class="p-t-20" ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
@handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex-between m-b-10 m-t-10"> <div class="flex-between m-b-10 m-t-10">
<div class="text-16 color-3 weight-5">会员列表</div> <div class="text-16 color-3 weight-5">会员列表</div>
<div class="export" @click="handleExport">全部导出</div> <div class="export" @click="handleExport">全部导出</div>
</div> </div>
<GLTable ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" <GLTable ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
:tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="cardInfo" slot-scope="scope"> <div slot="cardInfo" slot-scope="scope">
<GLTable class="centerTable" ref="cardListRef" :hasNum="false" :hasPage="false" :noDataImg="url" <GLTable class="centerTable" ref="cardListRef" :hasNum="false" :hasPage="false" :noDataImg="url" :tableParams="cardParams" :tableData="scope.scope.list"></GLTable>
:tableParams="cardParams" :tableData="scope.scope.list"></GLTable>
</div> </div>
<span slot="accountName" slot-scope="scope"> <span slot="accountName" slot-scope="scope">
<div>{{ scope.scope.accountName }}</div> <div>{{ scope.scope.accountName }}</div>
...@@ -154,8 +143,7 @@ ...@@ -154,8 +143,7 @@
</div> </div>
<el-form-item label="领取链接" style="margin-top: 20px"> <el-form-item label="领取链接" style="margin-top: 20px">
<div class="lineCtn"> <div class="lineCtn">
<el-input disabled="true" :value="`${promotionForm.QRurl}`" maxlength="14" placeholder="请输入链接" <el-input disabled="true" :value="`${promotionForm.QRurl}`" maxlength="14" placeholder="请输入链接" clearable></el-input>
clearable></el-input>
<el-button size="small" type="primary" @click="closeText(`${promotionForm.QRurl}`)">复制链接</el-button> <el-button size="small" type="primary" @click="closeText(`${promotionForm.QRurl}`)">复制链接</el-button>
</div> </div>
</el-form-item> </el-form-item>
...@@ -345,7 +333,7 @@ export default { ...@@ -345,7 +333,7 @@ export default {
dictLabel: '试用领取' dictLabel: '试用领取'
}, },
{ {
dictValue:14, dictValue: 14,
dictLabel: '兑换码兑换' dictLabel: '兑换码兑换'
} }
] ]
...@@ -394,11 +382,16 @@ export default { ...@@ -394,11 +382,16 @@ export default {
}, },
methods: { methods: {
judgeGh() { judgeGh() {
this.baseData.openModeList.push(
this.baseData.openModeList.push({ {
dictValue: 13, dictValue: 13,
dictLabel: '通过门店套餐赠送' dictLabel: '通过门店套餐赠送'
}) },
{
dictValue: 15,
dictLabel: '通过商品赠送'
}
)
this.tableParams.tableColumns.push({ this.tableParams.tableColumns.push({
label: '操作', label: '操作',
...@@ -985,4 +978,5 @@ export default { ...@@ -985,4 +978,5 @@ export default {
color: #5850ff; color: #5850ff;
cursor: pointer; cursor: pointer;
} }
}</style> }
</style>
...@@ -157,6 +157,17 @@ ...@@ -157,6 +157,17 @@
<template slot="memberPrice"> <template slot="memberPrice">
<p class="edit-tips">作为会员商城购买的价格</p> <p class="edit-tips">作为会员商城购买的价格</p>
</template> </template>
<template slot="giveEquityCard" v-if="showGh && routeInfo.groupOrStore == 2">
<div style="display:flex;align-items:center">
<span class="spesc-label" :style="{ width: defaultLabelWidth }">赠送金卡会员:</span>
<el-radio-group v-model="editForm.giveEquityCard">
<el-radio label="1">赠送</el-radio>
<el-radio label="0">不赠送</el-radio>
</el-radio-group>
<!-- </el-form-item> -->
</div>
<p class="edit-tips" style="margin-left:154px;">选择赠送,客户购买该套餐后即开通一年金卡会员权益</p>
</template>
<template slot="takeType" slot-scope="scope"> <template slot="takeType" slot-scope="scope">
<el-radio-group :disabled="isDisabled" v-model="editForm[scope.scope.name]" @change="handleTakeTypeChange"> <el-radio-group :disabled="isDisabled" v-model="editForm[scope.scope.name]" @change="handleTakeTypeChange">
<div v-for="(n, idx) in baseData.takeTypeList" :key="idx"> <div v-for="(n, idx) in baseData.takeTypeList" :key="idx">
...@@ -511,7 +522,8 @@ export default { ...@@ -511,7 +522,8 @@ export default {
// 带货是否选择全部商户(0:否,1:是) // 带货是否选择全部商户(0:否,1:是)
takeAllMerchant: '1', takeAllMerchant: '1',
supplyMerchantList: [], supplyMerchantList: [],
serviceDesc: '' serviceDesc: '',
giveEquityCard: 0
}, },
isEdit: true, isEdit: true,
externalFormList: [ externalFormList: [
...@@ -677,7 +689,8 @@ export default { ...@@ -677,7 +689,8 @@ export default {
originalPrice: [{ required: true, message: '请输入划线价', trigger: 'change' }], originalPrice: [{ required: true, message: '请输入划线价', trigger: 'change' }],
takeFee: [{ required: true, message: '请输入分润比例', trigger: 'change' }], takeFee: [{ required: true, message: '请输入分润比例', trigger: 'change' }],
supplyPrice: [{ required: false, message: '请输入供货价', trigger: 'change' }], supplyPrice: [{ required: false, message: '请输入供货价', trigger: 'change' }],
goodsStock: [{ required: true, message: '请输入库存', trigger: 'change' }] goodsStock: [{ required: true, message: '请输入库存', trigger: 'change' }],
giveEquityCard: [{ required: true, message: '请选择是否赠送金卡会员', trigger: 'change' }]
}, },
editFormData: [ editFormData: [
{ {
...@@ -748,6 +761,11 @@ export default { ...@@ -748,6 +761,11 @@ export default {
placeholder: '请输入库存', placeholder: '请输入库存',
isHide: false, isHide: false,
isDisabled: false isDisabled: false
},
{
label: '',
name: 'giveEquityCard',
addHtml: 'giveEquityCard'
} }
] ]
}, },
...@@ -812,7 +830,7 @@ export default { ...@@ -812,7 +830,7 @@ export default {
label: '服务说明', label: '服务说明',
name: 'serviceDesc', name: 'serviceDesc',
addHtml: 'serviceDescHtml' addHtml: 'serviceDescHtml'
}, }
] ]
}, },
{ {
...@@ -945,7 +963,7 @@ export default { ...@@ -945,7 +963,7 @@ export default {
diffHost() { diffHost() {
let href = window.location.host let href = window.location.host
this.showGh = href.indexOf('cgacar') != -1 this.showGh = href.indexOf('cgacar') != -1
if (this.showGh) { if (!this.showGh) {
let idx = this.externalFormList[0].editFormData.findIndex(item => item.name == 'erpMaterialNo') let idx = this.externalFormList[0].editFormData.findIndex(item => item.name == 'erpMaterialNo')
let serviceCodeIdx = this.externalFormList[0].editFormData.findIndex(item => item.name == 'serviceCode') let serviceCodeIdx = this.externalFormList[0].editFormData.findIndex(item => item.name == 'serviceCode')
this.externalFormList[0].editFormData[idx].isHide = !this.showGh this.externalFormList[0].editFormData[idx].isHide = !this.showGh
...@@ -996,7 +1014,7 @@ export default { ...@@ -996,7 +1014,7 @@ export default {
}) })
}) })
}, },
handleCancelBubble(e) { }, handleCancelBubble(e) {},
// 小程序展示 // 小程序展示
getWechatImgList() { getWechatImgList() {
this.wechatImgList = [] this.wechatImgList = []
...@@ -1379,6 +1397,7 @@ export default { ...@@ -1379,6 +1397,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.editStatus = false this.editStatus = false
}) })
console.log(this.editForm)
}) })
}, },
getOptionsList(idx, formName, hasAll = true, refreshSigle) { getOptionsList(idx, formName, hasAll = true, refreshSigle) {
...@@ -1565,6 +1584,12 @@ export default { ...@@ -1565,6 +1584,12 @@ export default {
}) })
// 服务说明 // 服务说明
params.serviceDesc = this.editForm.serviceDesc params.serviceDesc = this.editForm.serviceDesc
//赠送金卡服务
if (this.showGh) {
params.giveEquityCard = this.editForm.giveEquityCard
} else {
delete params.giveEquityCard
}
this.loading = true this.loading = true
this.$apis.proManage this.$apis.proManage
.insertOrUpdateProApi(params) .insertOrUpdateProApi(params)
...@@ -1596,7 +1621,7 @@ export default { ...@@ -1596,7 +1621,7 @@ export default {
.then(() => { .then(() => {
this.cancelJump() this.cancelJump()
}) })
.catch(() => { }) .catch(() => {})
} else { } else {
this.cancelJump() this.cancelJump()
} }
......
...@@ -446,4 +446,6 @@ export default { ...@@ -446,4 +446,6 @@ export default {
} }
</script> </script>
<style scoped></style> <style scoped>
</style>
...@@ -2,75 +2,38 @@ ...@@ -2,75 +2,38 @@
<template> <template>
<div class="marketing pro-group"> <div class="marketing pro-group">
<div class="m-b-20"> <div class="m-b-20">
<GLButton :size="size" <GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton>
type="primary"
fn="新建商品"
class="el-icon-plus"
@click="handleEdit(1)">新建商品</GLButton>
</div> </div>
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="proGroupRef" <GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
class="table-img" <div slot="giveEquityCard" slot-scope="scope" v-if="showGh && scope.scope.giveEquityCard == 1">
:getListApi="getListApi" <div class="gold-sign">送会员</div>
:noDataImg="url" </div>
:searchForm="tableSearchForm" <template slot="goodsImage" slot-scope="scope">
:tableParams="tableParams" <el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
:pageConf="pageConf" <img class="table-popover-img" :src="scope.scope.goodsImage" />
:beforeSearchFn="beforeSearchFn" <img class="img-60 pointer" slot="reference" :src="scope.scope.goodsImage" />
@setTableFinishFun="setTableFinishFun">
<template slot="goodsImage"
slot-scope="scope">
<el-popover placement="top"
width="160"
trigger="hover"
popper-class="table-popover-block">
<img class="table-popover-img"
:src="scope.scope.goodsImage" />
<img class="img-60 pointer"
slot="reference"
:src="scope.scope.goodsImage" />
</el-popover> </el-popover>
</template> </template>
<div class="table-btns" <div class="table-btns" slot="auth-button" slot-scope="scope">
slot="auth-button" <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
slot-scope="scope">
<GLTableButton :buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<!-- 下架 --> <!-- 下架 -->
<glsx-dialog title="下架" <glsx-dialog title="下架" :isVisible.sync="isDownVisible" @confirmDialog="handleDownConfirm" @closeDialog="handleDownClose">
:isVisible.sync="isDownVisible" <el-form ref="downRef" label-width="100px" :rules="downRules" :model="downForm">
@confirmDialog="handleDownConfirm" <el-form-item label="下架备注" prop="offReason">
@closeDialog="handleDownClose"> <el-input :size="size" v-model="downForm.offReason" placeholder="请输入下架备注" maxlength="30"></el-input>
<el-form ref="downRef"
label-width="100px"
:rules="downRules"
:model="downForm">
<el-form-item label="下架备注"
prop="offReason">
<el-input :size="size"
v-model="downForm.offReason"
placeholder="请输入下架备注"
maxlength="30"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</glsx-dialog> </glsx-dialog>
<!-- 分享 --> <!-- 分享 -->
<share-dialog :isShareVisible="isShareVisible" <share-dialog :isShareVisible="isShareVisible" :shareForm="shareForm" @handleShareClose="handleShareClose"></share-dialog>
:shareForm="shareForm"
@handleShareClose="handleShareClose"></share-dialog>
</div> </div>
</template> </template>
...@@ -83,6 +46,7 @@ export default { ...@@ -83,6 +46,7 @@ export default {
name: 'productGroup', name: 'productGroup',
data() { data() {
return { return {
showGh: false,
size: 'small', size: 'small',
url: url, url: url,
// 下架 // 下架
...@@ -294,6 +258,11 @@ export default { ...@@ -294,6 +258,11 @@ export default {
line: 2 line: 2
}, },
{ {
label: '',
addHtml: 'giveEquityCard',
width: 80
},
{
label: '缩略图', label: '缩略图',
prop: 'goodsImage', prop: 'goodsImage',
addHtml: 'goodsImage' addHtml: 'goodsImage'
...@@ -385,7 +354,9 @@ export default { ...@@ -385,7 +354,9 @@ export default {
components: { components: {
shareDialog shareDialog
}, },
created() {
this.showGh = window.location.host.indexOf('cgacar') == -1
},
mounted() { mounted() {
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}, },
...@@ -468,7 +439,7 @@ export default { ...@@ -468,7 +439,7 @@ export default {
handleDwonNotice(row) { handleDwonNotice(row) {
this.$alert('你带货的' + row.goodsName + '商品现已下架,下架原因:' + row.offReason, '商品下架通知', { this.$alert('你带货的' + row.goodsName + '商品现已下架,下架原因:' + row.offReason, '商品下架通知', {
confirmButtonText: '确定', confirmButtonText: '确定',
callback: action => { } callback: action => {}
}) })
}, },
handleUpOrDown(row) { handleUpOrDown(row) {
...@@ -605,4 +576,16 @@ export default { ...@@ -605,4 +576,16 @@ export default {
} }
</script> </script>
<style scoped></style> <style scoped>
.gold-sign {
width: 48px;
height: 20px;
background: #fee9cc;
border-radius: 2px;
white-space: nowrap;
font-size: 12px;
color: #fdb757;
text-align: center;
line-height: 20px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!