Commit d56fe0f3 by 前端

Merge branch 'v3.11.0' into 'master'

合并V3.11.0

See merge request !477
2 parents 696fd7e9 45c5069a
......@@ -17,8 +17,7 @@
<div class="member-card"><img src="@/assets/silver.png" alt="" /></div>
</template>
<template>
<GLButton @click="openEditWrap" fn="编辑" mode="div"><img src="@/assets/editBlue.png" class="editIcon"
@click="openEditWrap" alt="" /></GLButton>
<GLButton @click="openEditWrap" fn="编辑" mode="div"><img src="@/assets/editBlue.png" class="editIcon" @click="openEditWrap" alt="" /></GLButton>
</template>
</div>
<template v-if="showGh">
......@@ -49,45 +48,38 @@
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm">
<template v-if="!showGh">
<el-form-item label="会员卡名:" prop="cardName" size="small">
<el-input v-model.trim="ruleForm.cardName" size="small" class="cardNameInput" show-word-limit
placeholder="请输入会员卡名" maxlength="15"></el-input>
<el-input v-model.trim="ruleForm.cardName" size="small" class="cardNameInput" show-word-limit placeholder="请输入会员卡名" maxlength="15"></el-input>
</el-form-item>
</template>
<template v-else>
<el-form-item label="银卡" prop="cardName" size="small">
<el-input v-model.trim="ruleForm.cardName" size="small" class="cardNameInput" show-word-limit
placeholder="请输入银卡名称" maxlength="15"></el-input>
<el-input v-model.trim="ruleForm.cardName" size="small" class="cardNameInput" show-word-limit placeholder="请输入银卡名称" maxlength="15"></el-input>
</el-form-item>
<el-form-item label="金卡" prop="goldCardClassName" size="small">
<el-input v-model.trim="ruleForm.goldCardClassName" size="small" class="cardNameInput" show-word-limit
placeholder="请输入金卡名称" maxlength="15"></el-input>
<el-input v-model.trim="ruleForm.goldCardClassName" size="small" class="cardNameInput" show-word-limit placeholder="请输入金卡名称" maxlength="15"></el-input>
</el-form-item>
</template>
<div class="pricesMerge">
<el-form-item label="售价/元:" size="small" prop="price" style="width: 300px">
<el-input v-model="ruleForm.price" size="small" style="width: 136px" placeholder="请输入售价"
@keyup.native="ruleForm.price = oninput(ruleForm.price)">
<el-input v-model="ruleForm.price" size="small" style="width: 136px" placeholder="请输入售价" @keyup.native="ruleForm.price = oninput(ruleForm.price)">
<!-- <span slot="suffix" class="suffix-label">元</span> -->
</el-input>
</el-form-item>
<el-form-item label="市场价/元:" prop="marketPrice" size="small" style="width: 300px">
<el-input v-model="ruleForm.marketPrice" size="small" style="width: 136px" placeholder="请输入市场价"
@keyup.native="ruleForm.marketPrice = oninput(ruleForm.marketPrice)">
<el-input v-model="ruleForm.marketPrice" size="small" style="width: 136px" placeholder="请输入市场价" @keyup.native="ruleForm.marketPrice = oninput(ruleForm.marketPrice)">
<!-- <span slot="suffix" class="suffix-label">元</span> -->
</el-input>
</el-form-item>
</div>
<el-form-item :class="!ruleForm.tryNum ? 'is-error' : ''" class="memberTrial" label="会员卡试用" size="small">
<div class="trialMerge">
<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>
<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>
<div class="trialDays" v-if="ruleForm.tryAble == 1">
<span>试用时长</span>
<el-input-number v-model="ruleForm.tryNum" :controls="false" :min="1" :max="365"></el-input-number>
<span>天试用</span>
</div>
<div class="el-form-item__error trialDays_error" v-if="ruleForm.tryAble == 1 && !ruleForm.tryNum">请输入试用时长
</div>
<div class="el-form-item__error trialDays_error" v-if="ruleForm.tryAble == 1 && !ruleForm.tryNum">请输入试用时长</div>
</div>
<!-- <div v-if="ruleForm.tryAble" class="promoteQR">生成小程序码推广</div> -->
</el-form-item>
......@@ -101,17 +93,14 @@
</div>
<div class="pageTitle">会员用户</div>
<div class="live-room container">
<GLCombiForm class="p-t-20" ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData"
@handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm class="p-t-20" ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<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">
<GLTable ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="cardInfo" slot-scope="scope">
<GLTable class="centerTable" ref="cardListRef" :hasNum="false" :hasPage="false" :noDataImg="url"
:tableParams="cardParams" :tableData="scope.scope.list"></GLTable>
<GLTable class="centerTable" 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>
......@@ -154,8 +143,7 @@
</div>
<el-form-item label="领取链接" style="margin-top: 20px">
<div class="lineCtn">
<el-input disabled="true" :value="`${promotionForm.QRurl}`" maxlength="14" placeholder="请输入链接"
clearable></el-input>
<el-input disabled="true" :value="`${promotionForm.QRurl}`" maxlength="14" placeholder="请输入链接" clearable></el-input>
<el-button size="small" type="primary" @click="closeText(`${promotionForm.QRurl}`)">复制链接</el-button>
</div>
</el-form-item>
......@@ -344,8 +332,8 @@ export default {
dictValue: 0,
dictLabel: '试用领取'
},
{
dictValue:14,
{
dictValue: 14,
dictLabel: '兑换码兑换'
}
]
......@@ -394,12 +382,17 @@ export default {
},
methods: {
judgeGh() {
this.baseData.openModeList.push({
this.baseData.openModeList.push(
{
dictValue: 13,
dictLabel: '通过门店套餐赠送'
})
},
{
dictValue: 15,
dictLabel: '通过商品赠送'
}
)
this.tableParams.tableColumns.push({
label: '操作',
width: '140px',
......@@ -985,4 +978,5 @@ export default {
color: #5850ff;
cursor: pointer;
}
}</style>
}
</style>
......@@ -157,6 +157,25 @@
<template slot="memberPrice">
<p class="edit-tips">作为会员商城购买的价格</p>
</template>
<template slot="giveEquityCard" v-if="showGh && routeInfo.groupOrStore == 2">
<div style="display:flex;align-items:center">
<span class="spesc-label" :style="{ width: defaultLabelWidth, 'padding-right': 0 }">
<span
style="color: #f56c6c;
margin-right: 4px;"
>
*
</span>
赠送金卡会员:
</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">
<el-radio-group :disabled="isDisabled" v-model="editForm[scope.scope.name]" @change="handleTakeTypeChange">
<div v-for="(n, idx) in baseData.takeTypeList" :key="idx">
......@@ -511,7 +530,8 @@ export default {
// 带货是否选择全部商户(0:否,1:是)
takeAllMerchant: '1',
supplyMerchantList: [],
serviceDesc: ''
serviceDesc: '',
giveEquityCard: '0'
},
isEdit: true,
externalFormList: [
......@@ -677,7 +697,8 @@ export default {
originalPrice: [{ required: true, message: '请输入划线价', trigger: 'change' }],
takeFee: [{ required: true, 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: [
{
......@@ -748,6 +769,11 @@ export default {
placeholder: '请输入库存',
isHide: false,
isDisabled: false
},
{
label: '',
name: 'giveEquityCard',
addHtml: 'giveEquityCard'
}
]
},
......@@ -812,7 +838,7 @@ export default {
label: '服务说明',
name: 'serviceDesc',
addHtml: 'serviceDescHtml'
},
}
]
},
{
......@@ -872,15 +898,15 @@ export default {
},
// 零售价
'editForm.retailPrice'(newValue, oldValue) {
this.editForm.retailPrice = limitPrice(newValue, oldValue, 5, 2)
this.editForm.retailPrice = limitPrice(newValue, oldValue, 6, 2)
},
// 划线价
'editForm.originalPrice'(newValue, oldValue) {
this.editForm.originalPrice = limitPrice(newValue, oldValue, 5, 2)
this.editForm.originalPrice = limitPrice(newValue, oldValue, 6, 2)
},
// 供货价
'editForm.supplyPrice'(newValue, oldValue) {
this.editForm.supplyPrice = limitPrice(newValue, oldValue, 5, 2)
this.editForm.supplyPrice = limitPrice(newValue, oldValue, 6, 2)
},
// 分润比例
'editForm.takeFee'(newValue, oldValue) {
......@@ -888,7 +914,7 @@ export default {
},
// 会员价
'editForm.memberPrice'(newValue, oldValue) {
this.editForm.memberPrice = limitPrice(newValue, oldValue, 5, 2)
this.editForm.memberPrice = limitPrice(newValue, oldValue, 6, 2)
},
// 库存
'editForm.goodsStock'(newValue, oldValue) {
......@@ -944,7 +970,7 @@ export default {
// 从域名判断是不是广汇的
diffHost() {
let href = window.location.host
this.showGh = href.indexOf('cgacar') != -1
this.showGh = href.indexOf('cgacar') !== -1
if (this.showGh) {
let idx = this.externalFormList[0].editFormData.findIndex(item => item.name == 'erpMaterialNo')
let serviceCodeIdx = this.externalFormList[0].editFormData.findIndex(item => item.name == 'serviceCode')
......@@ -996,7 +1022,7 @@ export default {
})
})
},
handleCancelBubble(e) { },
handleCancelBubble(e) {},
// 小程序展示
getWechatImgList() {
this.wechatImgList = []
......@@ -1078,7 +1104,7 @@ export default {
if (e.key != 'Backspace' && newValue.length > 1) {
oldValue = newValue.slice(0, newValue.length - 1)
}
this.nameToValSpecsList[idx].retailPrice = limitPrice(newValue, oldValue, 5, 2)
this.nameToValSpecsList[idx].retailPrice = limitPrice(newValue, oldValue, 6, 2)
},
handleRetailPriceBlur() {
this.findSpeceMin()
......@@ -1379,6 +1405,7 @@ export default {
this.$nextTick(() => {
this.editStatus = false
})
console.log(this.editForm)
})
},
getOptionsList(idx, formName, hasAll = true, refreshSigle) {
......@@ -1565,6 +1592,12 @@ export default {
})
// 服务说明
params.serviceDesc = this.editForm.serviceDesc
//赠送金卡服务
if (this.showGh) {
params.giveEquityCard = this.editForm.giveEquityCard
} else {
delete params.giveEquityCard
}
this.loading = true
this.$apis.proManage
.insertOrUpdateProApi(params)
......@@ -1596,7 +1629,7 @@ export default {
.then(() => {
this.cancelJump()
})
.catch(() => { })
.catch(() => {})
} else {
this.cancelJump()
}
......
......@@ -446,4 +446,6 @@ export default {
}
</script>
<style scoped></style>
<style scoped>
</style>
......@@ -2,75 +2,36 @@
<template>
<div class="marketing pro-group">
<div class="m-b-20">
<GLButton :size="size"
type="primary"
fn="新建商品"
class="el-icon-plus"
@click="handleEdit(1)">新建商品</GLButton>
<GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton>
</div>
<div class="container">
<GLCombiForm ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="proGroupRef"
class="table-img"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@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" />
<GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @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>
</template>
<div class="table-btns"
slot="auth-button"
slot-scope="scope">
<GLTableButton :buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"></GLTableButton>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<!-- 下架 -->
<glsx-dialog title="下架"
:isVisible.sync="isDownVisible"
@confirmDialog="handleDownConfirm"
@closeDialog="handleDownClose">
<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>
<glsx-dialog title="下架" :isVisible.sync="isDownVisible" @confirmDialog="handleDownConfirm" @closeDialog="handleDownClose">
<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>
</glsx-dialog>
<!-- 分享 -->
<share-dialog :isShareVisible="isShareVisible"
:shareForm="shareForm"
@handleShareClose="handleShareClose"></share-dialog>
<share-dialog :isShareVisible="isShareVisible" :shareForm="shareForm" @handleShareClose="handleShareClose"></share-dialog>
</div>
</template>
......@@ -233,7 +194,7 @@ export default {
fn: '自建查看'
},
condition: row => {
return row.goodsStatus && (row.goodsSource == 1 || row.goodsSource == 3)
return row.goodsStatus && (row.goodsSource == 1 || row.goodsSource == 3)
},
listeners: {
click: row => this.handleEdit(3, row)
......@@ -385,7 +346,8 @@ export default {
components: {
shareDialog
},
created() {
},
mounted() {
this.getOptionsList('searchFormData')
},
......@@ -468,7 +430,7 @@ export default {
handleDwonNotice(row) {
this.$alert('你带货的' + row.goodsName + '商品现已下架,下架原因:' + row.offReason, '商品下架通知', {
confirmButtonText: '确定',
callback: action => { }
callback: action => {}
})
},
handleUpOrDown(row) {
......@@ -605,4 +567,16 @@ export default {
}
</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!