Commit a438719a by crushh

update: temp

parent bc924129
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="./static/css/iconfont.css"> <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_688955_izyug5a9kjr.css" /> <!--好办后台3.0-->
<script src="//at.alicdn.com/t/font_688955_izyug5a9kjr.js"></script>
<link rel="stylesheet" type="text/css" href="./static/css/common.css"> <link rel="stylesheet" type="text/css" href="./static/css/common.css">
<link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico"> <link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico">
<title>积分商城</title> <title>积分商城</title>
......
<template> <template>
<el-dialog <div>
title="查看当前商品历史配置数据" <el-alert
:visible.sync="dialogVisible" title="提示:以下为历史数据,不生效,需要在上架规则中配置完成才能生效"
width="750px" type="info"
:before-close="handleClose" :closable="false"
> show-icon
<span>提示:以下数据为快照,不生效,需要在上架规则中配置完成才能生效</span> />
<el-form <el-form
ref="form" ref="form"
:model="giftForm" :model="giftForm"
label-position="right" label-position="right"
style="margin-top: 20px" style="margin-top: 20px"
label-width="100px" label-width="80px"
> >
<el-form-item <el-form-item
label="展现门店" label="展现门店"
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<div slot="content" style="line-height:18px"> <div slot="content" style="line-height:18px">
会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见 会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见
</div> </div>
<i class="iconfont icon-xinxixianshi" style="color:#1890ff" /> <i class="iconfont icon-QuestionCircleOutlined" />
</el-tooltip> </el-tooltip>
<vue-gic-store-linkage <vue-gic-store-linkage
v-if="giftForm.useNewStoreWidget === 0 &&giftForm.creatorId " v-if="giftForm.useNewStoreWidget === 0 &&giftForm.creatorId "
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-dialog> </div>
</template> </template>
<script> <script>
export default { export default {
...@@ -59,7 +59,6 @@ export default { ...@@ -59,7 +59,6 @@ export default {
}, },
data () { data () {
return { return {
dialogVisible: false,
giftForm: { giftForm: {
useNewStoreWidget: 1, useNewStoreWidget: 1,
openFlag: false, openFlag: false,
...@@ -86,13 +85,5 @@ export default { ...@@ -86,13 +85,5 @@ export default {
immediate: true, immediate: true,
}, },
}, },
methods: {
handleClose () {
this.dialogVisible = false;
},
showPop () {
this.dialogVisible = true;
},
},
}; };
</script> </script>
<template> <template>
<el-dialog title="关联上架组件" :visible.sync="dialogTableVisible" width="850px"> <el-dialog title="上架规则" :visible.sync="dialogTableVisible" width="850px">
<div class="search-wrap"> <div class="search-wrap">
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<el-input <el-input
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
@clear="getSearchList" @clear="getSearchList"
/> />
</div> </div>
<div class="tips" style="font-size:14px"> <div class="tips" style="font-size:14px" v-show="allRuleData.length<20">
没有适用规则?<el-button type="text" size="small" @click="$router.push('/addRule')"> 没有适用规则?<el-button type="text" size="small" @click="$router.push('/addRule')">
去新建上架规则({{ totalCount }}/20) 去新建上架规则({{ allRuleData.length }}/20)
</el-button> </el-button>
</div> </div>
</div> </div>
...@@ -95,6 +95,7 @@ export default { ...@@ -95,6 +95,7 @@ export default {
}, },
dialogTableVisible: false, dialogTableVisible: false,
echoRuleId: '', echoRuleId: '',
allRuleData: [],
}; };
}, },
watch: { watch: {
...@@ -122,6 +123,9 @@ export default { ...@@ -122,6 +123,9 @@ export default {
getList () { getList () {
this.loading = true; this.loading = true;
this.tableRadio = ''; this.tableRadio = '';
request.get('/api-integral-mall/list-rule', { params: {} }).then(res => {
this.allRuleData = res.data.result || [];
});
request.get('/api-integral-mall/page-rule', { params: this.relateForm }).then(async (res) => { request.get('/api-integral-mall/page-rule', { params: this.relateForm }).then(async (res) => {
this.tableDate = res.data.result.result || []; this.tableDate = res.data.result.result || [];
this.totalCount = res.data.result.totalCount; this.totalCount = res.data.result.totalCount;
......
<template>
<div class="updateInfo">
<span class="title">积分商城升级说明</span>
<div class="content">
为了提供更好的服务,积分商城商品系统升级,升级后可设置【上架规则】,<br>
编辑前需要清除当前商品的【展现门店】,<span style="color:#F5222D;">操作不可逆</span>;不升级则当前页面配置继续生效。
</div>
</div>
</template>
<script>
export default {
};
</script>
<style lang="less" scoped>
.updateInfo{
width: 100%;
background: #FFFFFF;
border-radius: 2px;
padding: 20px 30px;
.title{
font-size: 18px;
line-height: 25px;
font-weight: bold;
}
.content{
margin: 16px 0;
font-size: 14px;
line-height: 20px;
}
}
</style>
...@@ -8,42 +8,6 @@ ...@@ -8,42 +8,6 @@
label-position="right" label-position="right"
style="margin-top: 20px" style="margin-top: 20px"
> >
<el-form-item label="上架时间" prop="releaseType">
<el-radio-group v-model="giftForm.releaseType">
<el-radio :label="1">
立即上架
</el-radio>
<el-radio :label="2">
自定义上架时间段
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item class="form-item-mt" v-if="giftForm.releaseType === 2" prop="limitTimeBegin">
<el-date-picker
v-model="giftForm.limitTimeBegin"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
/>
</el-form-item>
<el-form-item label="显示状态" prop="proShowStatus">
<el-radio-group v-model="giftForm.proShowStatus">
<el-radio :label="1">
上架状态就显示
</el-radio>
<el-radio :label="2">
兑换状态下显示
</el-radio>
</el-radio-group>
<div v-if="giftForm.proShowStatus == 1" style="margin-left:20px;">
<el-checkbox v-model="giftForm.isNewGuestVisible" :true-label="1" :false-label="0">
非会员可见
</el-checkbox>
<span class="tips">开启后,未开卡客户在积分商城也可见该礼品(前提是该礼品的“适用会员”包含最低会员卡等级)</span>
</div>
</el-form-item>
<el-form-item label="上架规则" prop="ruleTitle" v-if="isNew"> <el-form-item label="上架规则" prop="ruleTitle" v-if="isNew">
<span class="ruleTitle" v-show="giftForm.ruleTitle">{{ giftForm.ruleTitle }}</span> <span class="ruleTitle" v-show="giftForm.ruleTitle">{{ giftForm.ruleTitle }}</span>
<el-button small type="text" @click="openRelating"> <el-button small type="text" @click="openRelating">
...@@ -65,8 +29,22 @@ ...@@ -65,8 +29,22 @@
<div slot="content" style="line-height:18px"> <div slot="content" style="line-height:18px">
会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见 会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见
</div> </div>
<i class="iconfont icon-xinxixianshi" style="color:#1890ff" /> <i class="iconfont icon-QuestionCircleOutlined" />
</el-tooltip> </el-tooltip>
<div class="info">
<div>
<div class="title">
<i class="iconfont icon-xinxixianshi" style="color:#1890ff" />
<span>展现门店升级说明</span>
</div>
<div class="content">
为了提供更好的服务,积分商城商品系统升级。不升级【展现门店】则配置继续生效;升级后通过【上架规则-人群筛选器】控制可见。
</div>
</div>
<div class="button" @click="update">
<span>升级展现门店</span><i class="iconfont icon-arrow-right1" style="font-size:14px" />
</div>
</div>
<vue-gic-store-linkage <vue-gic-store-linkage
v-if="giftForm.useNewStoreWidget === 0 &&giftForm.creatorId" v-if="giftForm.useNewStoreWidget === 0 &&giftForm.creatorId"
style="margin-left:10px" style="margin-left:10px"
...@@ -88,6 +66,43 @@ ...@@ -88,6 +66,43 @@
scenes scenes
/> />
</el-form-item> </el-form-item>
<el-form-item label="上架时间" prop="releaseType">
<el-radio-group v-model="giftForm.releaseType">
<el-radio :label="1">
立即上架
</el-radio>
<el-radio :label="2">
自定义上架时间段
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item class="form-item-mt" v-if="giftForm.releaseType === 2" prop="limitTimeBegin">
<el-date-picker
v-model="giftForm.limitTimeBegin"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
/>
</el-form-item>
<el-form-item label="显示状态" prop="proShowStatus">
<el-radio-group v-model="giftForm.proShowStatus">
<el-radio :label="1">
上架状态就显示
</el-radio>
<el-radio :label="2">
兑换状态下显示
</el-radio>
</el-radio-group>
<div v-if="giftForm.proShowStatus == 1" style="margin-left:20px;">
<el-checkbox v-model="giftForm.isNewGuestVisible" :true-label="1" :false-label="0">
非会员可见
</el-checkbox>
<span class="tips">开启后,未开卡客户在积分商城也可见该礼品(前提是该礼品的“适用会员”包含最低会员卡等级)</span>
</div>
</el-form-item>
<relate-pop ref="relatePop" :integralMallProRuleId="giftForm.integralMallProRuleId" @finish="onPopFinish" /> <relate-pop ref="relatePop" :integralMallProRuleId="giftForm.integralMallProRuleId" @finish="onPopFinish" />
</el-form> </el-form>
</template> </template>
...@@ -172,6 +187,14 @@ export default { ...@@ -172,6 +187,14 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
update () {
this.$confirm('升级后,通过【上架规则-人群筛选器】控制可见', '确认升级【展现门店数据】?', {
confirmButtonText: '确认并升级',
type: 'warning',
}).then(() => {
this.$emit('update');
});
},
getDisGroupList (arr) { getDisGroupList (arr) {
console.log('methods---groupIdDisableList====>'); console.log('methods---groupIdDisableList====>');
console.log(arr); console.log(arr);
...@@ -244,7 +267,7 @@ export default { ...@@ -244,7 +267,7 @@ export default {
}; };
</script> </script>
<style scoped> <style lang="less" scoped>
.ruleTitle{ .ruleTitle{
width: fit-content; width: fit-content;
height: 32px; height: 32px;
...@@ -258,4 +281,36 @@ font-size: 14px; ...@@ -258,4 +281,36 @@ font-size: 14px;
.el-form-item { .el-form-item {
margin-left: 32px; margin-left: 32px;
} }
.info{
display: flex;
align-items: center;
background: #EBEFFE;
border-radius: 2px;
padding: 10px;
font-size:12px;
margin: 0 0 16px 16px;
width: 880px;
justify-content: space-between;
.title {
line-height: 18px;
margin-bottom: 5px;
span{
font-weight: 600;
margin-left:5px;
}
}
.content{
line-height: 18px;
margin-left: 20px;
}
.button{
font-size: 14px;
color: #1890ff;
cursor: pointer;
span{
margin-right: 5px;
}
}
}
</style> </style>
...@@ -9,7 +9,7 @@ import axios from 'axios'; ...@@ -9,7 +9,7 @@ import axios from 'axios';
import VueAxios from 'vue-axios'; import VueAxios from 'vue-axios';
import store from './store'; import store from './store';
import './assets/theme/index.css'; import './assets/theme/index.css';
import '../static/fonts/iconfont.js';
promise.polyfill(); promise.polyfill();
Vue.use(VueAxios, axios); Vue.use(VueAxios, axios);
......
...@@ -47,16 +47,33 @@ const router = new Router({ ...@@ -47,16 +47,33 @@ const router = new Router({
path: '/giftAdd', path: '/giftAdd',
name: 'giftAdd', name: 'giftAdd',
component: giftDetail, component: giftDetail,
meta: {
type: 'add',
},
},
{
path: '/giftEdit',
name: 'giftEdit',
component: giftDetail,
meta: {
type: 'edit',
},
}, },
{ {
path: '/giftInfo', path: '/giftInfo',
name: 'giftInfo', name: 'giftInfo',
component: giftDetail, component: giftDetail,
meta: {
type: 'info',
},
}, },
{ {
path: '/giftDetail', path: '/giftCopy',
name: 'giftDetail', name: 'giftCopy',
component: giftDetail, component: giftDetail,
meta: {
type: 'copy',
},
}, },
{ {
path: '/coupon', path: '/coupon',
......
...@@ -348,7 +348,7 @@ ...@@ -348,7 +348,7 @@
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
v-if="scope.row.newRuleFlag!=1 && $getButtonLimit($buttonCode.couponRelating)" v-if="!scope.row.ruleTitle && $getButtonLimit($buttonCode.couponRelating)"
@click="relating(scope.row)" @click="relating(scope.row)"
:limit-code="$buttonCode.couponRelating" :limit-code="$buttonCode.couponRelating"
> >
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
<span>{{ mallProId === '-1' ? '新建' : '编辑' }}优惠券</span> <span>{{ mallProId === '-1' ? '新建' : '编辑' }}优惠券</span>
</h3> </h3>
</div> </div>
<updateInfo v-if="!isNew" v-loading="submitLoading" />
<div class="section" v-loading="submitLoading"> <div class="section" v-loading="submitLoading">
<el-form <el-form
:model="couponForm" :model="couponForm"
...@@ -245,19 +244,26 @@ ...@@ -245,19 +244,26 @@
<div class="section-content"> <div class="section-content">
<h3> <h3>
可见配置<span class="sub_title">该配置决定客户是否可见</span> 可见配置<span class="sub_title">该配置决定客户是否可见</span>
<el-button <el-popover
type="text" placement="right"
style="position: absolute;right: 20%;" width="670"
@click="readHistoryData" trigger="click"
v-show="isNew&&(visibleData.useNewStoreWidget==0 || (visibleData.uuid && visibleData.useNewStoreWidget == 1))"
> >
查看当前商品历史配置数据 <historyData ref="historyData" :form="visibleData" />
</el-button> <el-button
slot="reference"
type="text"
style="position: absolute;right: 5%;"
v-show="isNew&&(visibleData.useNewStoreWidget==0 || (visibleData.uuid && visibleData.useNewStoreWidget == 1))"
>
查看当前商品历史配置数据
</el-button>
</el-popover>
</h3> </h3>
<visible-setting <visible-setting
ref="visibleSetting" ref="visibleSetting"
:form="visibleData" :form="visibleData"
:isAdd="isAdd" @update="isNew = true"
:isNew="isNew" :isNew="isNew"
/> />
</div> </div>
...@@ -472,14 +478,6 @@ ...@@ -472,14 +478,6 @@
<el-form-item class="fix-btn"> <el-form-item class="fix-btn">
<el-button <el-button
type="primary" type="primary"
@click="clearHistoryData"
size="small"
v-show="!isNew"
>
清除门店数据
</el-button>
<el-button
type="primary"
size="small" size="small"
@click="submitForm('couponForm')" @click="submitForm('couponForm')"
:disabled="!canEdit||isDetail==1" :disabled="!canEdit||isDetail==1"
...@@ -505,7 +503,6 @@ ...@@ -505,7 +503,6 @@
@selectCard="selectCard" @selectCard="selectCard"
ref="dmcard" ref="dmcard"
/> />
<historyData ref="historyData" :form="visibleData" />
</div> </div>
</template> </template>
...@@ -516,13 +513,11 @@ import copy from '../../../utils/clone.js'; ...@@ -516,13 +513,11 @@ import copy from '../../../utils/clone.js';
import getInputVal from '../../../utils/common.js'; import getInputVal from '../../../utils/common.js';
import tinymceEdit from '../../../components/tinymce-edit'; import tinymceEdit from '../../../components/tinymce-edit';
import visibleSetting from '@/components/visible'; import visibleSetting from '@/components/visible';
import updateInfo from '@/components/updateInfo';
import historyData from '@/components/historyData'; import historyData from '@/components/historyData';
export default { export default {
components: { components: {
tinymceEdit, tinymceEdit,
visibleSetting, visibleSetting,
updateInfo,
historyData, historyData,
}, },
data () { data () {
...@@ -701,9 +696,6 @@ export default { ...@@ -701,9 +696,6 @@ export default {
this.isNew = true; this.isNew = true;
}); });
}, },
readHistoryData () {
this.$refs.historyData.showPop();
},
jump (index) { jump (index) {
const jump = document.querySelectorAll('.section-content'); const jump = document.querySelectorAll('.section-content');
const total = jump[index].offsetTop; const total = jump[index].offsetTop;
......
...@@ -11,13 +11,12 @@ ...@@ -11,13 +11,12 @@
<el-breadcrumb-item :to="{ path: '/gift' }"> <el-breadcrumb-item :to="{ path: '/gift' }">
礼品 礼品
</el-breadcrumb-item> </el-breadcrumb-item>
<el-breadcrumb-item>{{ giftId === '-1' ? '新建' : '编辑' }}{{ giftType === 1 ? '实物' : '虚拟' }}礼品</el-breadcrumb-item> <el-breadcrumb-item>{{ typeVal }}{{ giftType === 1 ? '实物' : '虚拟' }}礼品</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<h3> <h3>
<span>{{ giftId === '-1' ? '新建' : '编辑' }}{{ giftType === 1 ? '实物' : '虚拟' }}礼品</span> <span>{{ typeVal }}{{ giftType === 1 ? '实物' : '虚拟' }}礼品</span>
</h3> </h3>
</div> </div>
<updateInfo v-if="!isNew" v-loading="submitLoading" />
<div class="section" v-loading="submitLoading"> <div class="section" v-loading="submitLoading">
<el-form <el-form
:model="giftForm" :model="giftForm"
...@@ -244,18 +243,27 @@ ...@@ -244,18 +243,27 @@
<div class="section-content"> <div class="section-content">
<h3> <h3>
可见配置<span class="sub_title">该配置决定客户是否可见</span><el-button 可见配置<span class="sub_title">该配置决定客户是否可见</span>
type="text" <el-popover
style="position: absolute;right: 20%;" placement="right"
@click="readHistoryData" width="670"
v-show="isNew&&(visibleData.useNewStoreWidget==0 || (visibleData.uuid && visibleData.useNewStoreWidget == 1))" trigger="click"
> >
查看当前商品历史配置数据 <historyData ref="historyData" :form="visibleData" />
</el-button> <el-button
slot="reference"
type="text"
style="position: absolute;right: 5%;"
v-show="isNew&&(visibleData.useNewStoreWidget==0 || (visibleData.uuid && visibleData.useNewStoreWidget == 1))&&!isCopy"
>
查看当前商品历史配置数据
</el-button>
</el-popover>
</h3> </h3>
<visible-setting <visible-setting
ref="visibleSetting" ref="visibleSetting"
:form="visibleData" :form="visibleData"
@update="isNew = true"
:isNew="isNew" :isNew="isNew"
/> />
</div> </div>
...@@ -528,7 +536,7 @@ ...@@ -528,7 +536,7 @@
</el-form-item> </el-form-item>
<el-form-item label="自提点" v-if="giftForm.changeTypeList.indexOf('4') != -1"> <el-form-item label="自提点" v-if="giftForm.changeTypeList.indexOf('4') != -1">
<pickUp-store <pickUp-store
:isAdd="isAddPick" :isAdd="isAdd"
:pickUpPointType="pickUpPointType" :pickUpPointType="pickUpPointType"
:selectData="selectedStoreData" :selectData="selectedStoreData"
@getArr="getArr" @getArr="getArr"
...@@ -631,17 +639,9 @@ ...@@ -631,17 +639,9 @@
<el-form-item class="fix-btn"> <el-form-item class="fix-btn">
<el-button <el-button
type="primary" type="primary"
@click="clearHistoryData"
size="small"
v-show="!isNew"
>
清除门店数据
</el-button>
<el-button
type="primary"
@click="submitGoodsForm('giftForm')" @click="submitGoodsForm('giftForm')"
size="small" size="small"
:disabled="isDetail==1" :disabled="$route.meta.type=='info'"
> >
保存 保存
</el-button> </el-button>
...@@ -698,7 +698,6 @@ ...@@ -698,7 +698,6 @@
</span> </span>
</el-dialog> </el-dialog>
<importCoupon :importCouponModal="importCouponModal" @getSuceessNum="getSuceessNum" /> <importCoupon :importCouponModal="importCouponModal" @getSuceessNum="getSuceessNum" />
<historyData ref="historyData" :form="visibleData" />
</div> </div>
</template> </template>
...@@ -716,7 +715,6 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'; ...@@ -716,7 +715,6 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css';
import pickUpStore from '../../../components/store/store'; import pickUpStore from '../../../components/store/store';
import draggable from 'vuedraggable'; import draggable from 'vuedraggable';
import visibleSetting from '@/components/visible'; import visibleSetting from '@/components/visible';
import updateInfo from '@/components/updateInfo';
import historyData from '@/components/historyData'; import historyData from '@/components/historyData';
export default { export default {
data () { data () {
...@@ -866,19 +864,19 @@ export default { ...@@ -866,19 +864,19 @@ export default {
pickUpPointList: [], // 门店自提列表 pickUpPointList: [], // 门店自提列表
// 新版门店卡券选择器 // 新版门店卡券选择器
uuid: '', uuid: '',
isAdd: true,
// 门店自提数据 // 门店自提数据
pickUpPointType: 0, pickUpPointType: 0,
selectedStoreData: [], selectedStoreData: [],
pickUpPointStr: '', pickUpPointStr: '',
isAddPick: true,
warnStatus: { warnStatus: {
way: false, // 配送方式提示 way: false, // 配送方式提示
refund: false, // 退款提示 refund: false, // 退款提示
textCode: false, // 文本券码 textCode: false, // 文本券码
}, },
memberGrade: '', memberGrade: '',
isEdit: false, isEdit: this.$route.meta.type == 'edit',
isAdd: this.$route.meta.type == 'add',
isCopy: this.$route.meta.type == 'copy',
isCorrect: true, // 校验阶梯价的验证是否可以保存阶梯价 isCorrect: true, // 校验阶梯价的验证是否可以保存阶梯价
enterpriseId: '', // 商户id enterpriseId: '', // 商户id
specialOrder: false, // 是否定制 specialOrder: false, // 是否定制
...@@ -908,6 +906,12 @@ export default { ...@@ -908,6 +906,12 @@ export default {
isNew: true, // 编辑旧商品时,是否确认转换为新数据格式 isNew: true, // 编辑旧商品时,是否确认转换为新数据格式
}; };
}, },
computed: {
typeVal () {
const obj = { add: '新建', copy: '复制', edit: '编辑', info: '查看' };
return obj[this.$route.meta.type];
},
},
mounted () { mounted () {
this.getOpenStatus(); this.getOpenStatus();
this.getUserId(); this.getUserId();
...@@ -916,19 +920,13 @@ export default { ...@@ -916,19 +920,13 @@ export default {
localStorage.removeItem('giftListObj'); localStorage.removeItem('giftListObj');
}; };
this.giftType = Number(this.$route.query.type); // 列表上实物是1虚拟是0 this.giftType = Number(this.$route.query.type); // 列表上实物是1虚拟是0
this.isDetail = Number(this.$route.query.isDetail);
this.giftId = this.$route.query.giftId; this.giftId = this.$route.query.giftId;
this.mallProId = this.$route.query.giftId; this.mallProId = this.$route.query.giftId;
if (this.$route.query.proReferId !== '-1') { if (this.$route.query.proReferId !== '-1') {
// 编辑
this.giftForm.proReferId = this.$route.query.proReferId; this.giftForm.proReferId = this.$route.query.proReferId;
this.isAdd = false;
this.isEdit = true;
} else { } else {
// 新增
this.giftForm.proReferId = ''; this.giftForm.proReferId = '';
this.getMemberGradeList(); // 会员等级列表 this.getMemberGradeList(); // 会员等级列表
this.isEdit = false;
this.isNew = true; this.isNew = true;
} }
...@@ -940,36 +938,17 @@ export default { ...@@ -940,36 +938,17 @@ export default {
} }
if (this.giftId !== '-1') { if (this.giftId !== '-1') {
this.getInfo(); this.getInfo();
this.isAddPick = false;
this.editChangeTypeStatus = true; this.editChangeTypeStatus = true;
} else { }
this.isAddPick = true; if ((this.giftId == '-1' || this.isCopy) && this.giftType === 0) {
if (this.giftType === 0) { this.getGiftId();
this.getGiftId();
} else {
this.mallProId = '-1';
}
} }
this.$nextTick(function () { this.$nextTick(function () {
window.addEventListener('scroll', this.onScroll, true); window.addEventListener('scroll', this.onScroll, true);
}); });
document.documentElement.scrollTop = 0; document.documentElement.scrollTop = 0;
}, },
methods: { methods: {
clearHistoryData () {
this.$confirm('是否确认清除【展示门店数据】?清除后,可进入升级后的编辑页面。', '提示', {
confirmButtonText: '确定',
showCancelButton: false,
type: 'warning',
}).then(() => {
this.jump(2);
this.isNew = true;
});
},
readHistoryData () {
this.$refs.historyData.showPop();
},
// 阶梯价定制,判断达摩测试环境与地素环境 // 阶梯价定制,判断达摩测试环境与地素环境
// 达摩测试 ff8080815dacd3a2015dacd3ef5c0000 // 达摩测试 ff8080815dacd3a2015dacd3ef5c0000
// 达摩生产 ff8080816a36326c016a53380d8b5f52 // 达摩生产 ff8080816a36326c016a53380d8b5f52
...@@ -1257,7 +1236,6 @@ export default { ...@@ -1257,7 +1236,6 @@ export default {
request.post('/api-integral-mall/get-integral-mall-pro', qs.stringify(params)).then(res => { request.post('/api-integral-mall/get-integral-mall-pro', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) { if (res.data.errorCode === 0) {
const data = res.data.result; const data = res.data.result;
console.log(data);
this.echoVisibleData(data); this.echoVisibleData(data);
this.giftForm.proName = data.proName; // 名称 this.giftForm.proName = data.proName; // 名称
this.proNameLen = getInputVal.getZhLen(this.giftForm.proName); this.proNameLen = getInputVal.getZhLen(this.giftForm.proName);
...@@ -1519,6 +1497,9 @@ export default { ...@@ -1519,6 +1497,9 @@ export default {
} else { } else {
this.isNew = false; this.isNew = false;
} }
if (this.isCopy) {
this.isNew = true;
}
if (useNewStoreWidget == 0) { // 使用老的门店控件 (兼容老数据) if (useNewStoreWidget == 0) { // 使用老的门店控件 (兼容老数据)
const type = Number(showStore); const type = Number(showStore);
this.visibleData.sendChildData.storeType = type; // :0所有 1门店分组 2部分门店 this.visibleData.sendChildData.storeType = type; // :0所有 1门店分组 2部分门店
...@@ -2240,7 +2221,7 @@ export default { ...@@ -2240,7 +2221,7 @@ export default {
this.$refs[form].validate(valid => { this.$refs[form].validate(valid => {
if (valid) { if (valid) {
let params = { let params = {
integralMallProId: this.mallProId === '-1' ? '' : this.mallProId, //礼品id integralMallProId: this.isCopy? (this.giftType == 1? '' : this.mallProId):this.mallProId === '-1' ? '' : this.mallProId, //礼品id 复制时 虚拟礼品拿到新id 实物礼品不传id
proType: this.giftForm.changeType === 1 ? 2 : 3, //发货方式是微信兑换券传2其他传3 proType: this.giftForm.changeType === 1 ? 2 : 3, //发货方式是微信兑换券传2其他传3
giftType: this.giftType === 0 ? 0 : 1, //0、虚拟 1、实物 giftType: this.giftType === 0 ? 0 : 1, //0、虚拟 1、实物
proName: this.giftForm.proName.trim(), //礼品名称 proName: this.giftForm.proName.trim(), //礼品名称
...@@ -2390,7 +2371,6 @@ export default { ...@@ -2390,7 +2371,6 @@ export default {
pickUpStore, pickUpStore,
draggable, draggable,
visibleSetting, visibleSetting,
updateInfo,
historyData historyData
} }
}; };
...@@ -2658,7 +2638,7 @@ export default { ...@@ -2658,7 +2638,7 @@ export default {
color: #909399; color: #909399;
position: absolute; position: absolute;
left: 430px; left: 430px;
top: 0px; top: 80px;
} }
.tips { .tips {
font-size: 12px; font-size: 12px;
......
...@@ -364,7 +364,7 @@ ...@@ -364,7 +364,7 @@
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
v-if="(scope.row.newRuleFlag!=1 || !scope.row.ruleTitle)&& $getButtonLimit($buttonCode.giftRelating)" v-if="!scope.row.ruleTitle&& $getButtonLimit($buttonCode.giftRelating)"
@click="relating(scope.row)" @click="relating(scope.row)"
:limit-code="$buttonCode.giftRelating" :limit-code="$buttonCode.giftRelating"
> >
...@@ -372,6 +372,12 @@ ...@@ -372,6 +372,12 @@
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
@click="goAdd(scope.row,'giftCopy')"
>
复制
</el-button>
<el-button
type="text"
v-if="((scope.row.status === 2 && scope.row.canEdit && scope.row.releaseType === 2 && scope.row.isShelves === 1) || (scope.row.status === 1 && scope.row.canEdit)) && $getButtonLimit($buttonCode.giftNew) && scope.row.ruleTitle" v-if="((scope.row.status === 2 && scope.row.canEdit && scope.row.releaseType === 2 && scope.row.isShelves === 1) || (scope.row.status === 1 && scope.row.canEdit)) && $getButtonLimit($buttonCode.giftNew) && scope.row.ruleTitle"
:limit-code="$buttonCode.giftNew" :limit-code="$buttonCode.giftNew"
@click="deleteList(scope.row, 2)" @click="deleteList(scope.row, 2)"
...@@ -388,7 +394,7 @@ ...@@ -388,7 +394,7 @@
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
@click="goAdd(scope.row)" @click="goAdd(scope.row,'giftEdit')"
:limit-code="$buttonCode.giftEdit" :limit-code="$buttonCode.giftEdit"
v-if="$getButtonLimit($buttonCode.giftEdit)" v-if="$getButtonLimit($buttonCode.giftEdit)"
> >
...@@ -657,7 +663,7 @@ export default { ...@@ -657,7 +663,7 @@ export default {
}, },
handleCommand (command, item, index) { handleCommand (command, item, index) {
if (command == 0) { if (command == 0) {
this.goAdd(item, 'detail'); this.goAdd(item, 'giftInfo');
} else if (command == 1) { } else if (command == 1) {
this.goRecord(item); this.goRecord(item);
} else if (command == 2) { } else if (command == 2) {
...@@ -915,8 +921,12 @@ export default { ...@@ -915,8 +921,12 @@ export default {
}; };
request.post('/api-integral-mall/delete-pro', qs.stringify(params)).then(res => { request.post('/api-integral-mall/delete-pro', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) { if (res.data.errorCode === 0) {
const text = Number(type) === 0 ? '删除成功' : Number(type) === 1 ? '下架成功' : '上架成功'; if (res.data.message) {
this.$message.success(text); this.$message.error(res.data.message);
} else {
const text = Number(type) === 0 ? '删除成功' : Number(type) === 1 ? '下架成功' : '上架成功';
this.$message.success(text);
}
this.currentPage = 1; this.currentPage = 1;
this.getList(); // 拉取列表 this.getList(); // 拉取列表
this.goodsType = ''; this.goodsType = '';
...@@ -944,7 +954,10 @@ export default { ...@@ -944,7 +954,10 @@ export default {
sortColumn: this.sortColumn, sortColumn: this.sortColumn,
}; };
window.localStorage.setItem('giftListObj', JSON.stringify(this.giftListObj)); window.localStorage.setItem('giftListObj', JSON.stringify(this.giftListObj));
this.$router.push({ name: type === 'detail' ? 'giftDetail' : 'giftInfo', query: { type: item.giftType, giftId: item.integralMallProId, proReferId: item.proReferId, isDetail: type === 'detail' ? 1 : 0 } }); this.$router.push({
name: type,
query: { type: item.giftType, giftId: item.integralMallProId, proReferId: item.proReferId },
});
}, },
// 编辑序号 // 编辑序号
editNumber (item) { editNumber (item) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment