Commit a438719a by crushh

update: temp

parent bc924129
......@@ -4,7 +4,8 @@
<head>
<meta charset="utf-8">
<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="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico">
<title>积分商城</title>
......
<template>
<el-dialog
title="查看当前商品历史配置数据"
:visible.sync="dialogVisible"
width="750px"
:before-close="handleClose"
>
<span>提示:以下数据为快照,不生效,需要在上架规则中配置完成才能生效</span>
<div>
<el-alert
title="提示:以下为历史数据,不生效,需要在上架规则中配置完成才能生效"
type="info"
:closable="false"
show-icon
/>
<el-form
ref="form"
:model="giftForm"
label-position="right"
style="margin-top: 20px"
label-width="100px"
label-width="80px"
>
<el-form-item
label="展现门店"
......@@ -26,7 +26,7 @@
<div slot="content" style="line-height:18px">
会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见
</div>
<i class="iconfont icon-xinxixianshi" style="color:#1890ff" />
<i class="iconfont icon-QuestionCircleOutlined" />
</el-tooltip>
<vue-gic-store-linkage
v-if="giftForm.useNewStoreWidget === 0 &&giftForm.creatorId "
......@@ -50,7 +50,7 @@
/>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<script>
export default {
......@@ -59,7 +59,6 @@ export default {
},
data () {
return {
dialogVisible: false,
giftForm: {
useNewStoreWidget: 1,
openFlag: false,
......@@ -86,13 +85,5 @@ export default {
immediate: true,
},
},
methods: {
handleClose () {
this.dialogVisible = false;
},
showPop () {
this.dialogVisible = true;
},
},
};
</script>
<template>
<el-dialog title="关联上架组件" :visible.sync="dialogTableVisible" width="850px">
<el-dialog title="上架规则" :visible.sync="dialogTableVisible" width="850px">
<div class="search-wrap">
<div class="table-page-search-wrapper">
<el-input
......@@ -12,9 +12,9 @@
@clear="getSearchList"
/>
</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')">
去新建上架规则({{ totalCount }}/20)
去新建上架规则({{ allRuleData.length }}/20)
</el-button>
</div>
</div>
......@@ -95,6 +95,7 @@ export default {
},
dialogTableVisible: false,
echoRuleId: '',
allRuleData: [],
};
},
watch: {
......@@ -122,6 +123,9 @@ export default {
getList () {
this.loading = true;
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) => {
this.tableDate = res.data.result.result || [];
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 @@
label-position="right"
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">
<span class="ruleTitle" v-show="giftForm.ruleTitle">{{ giftForm.ruleTitle }}</span>
<el-button small type="text" @click="openRelating">
......@@ -65,8 +29,22 @@
<div slot="content" style="line-height:18px">
会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见
</div>
<i class="iconfont icon-xinxixianshi" style="color:#1890ff" />
<i class="iconfont icon-QuestionCircleOutlined" />
</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
v-if="giftForm.useNewStoreWidget === 0 &&giftForm.creatorId"
style="margin-left:10px"
......@@ -88,6 +66,43 @@
scenes
/>
</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" />
</el-form>
</template>
......@@ -172,6 +187,14 @@ export default {
mounted () {
},
methods: {
update () {
this.$confirm('升级后,通过【上架规则-人群筛选器】控制可见', '确认升级【展现门店数据】?', {
confirmButtonText: '确认并升级',
type: 'warning',
}).then(() => {
this.$emit('update');
});
},
getDisGroupList (arr) {
console.log('methods---groupIdDisableList====>');
console.log(arr);
......@@ -244,7 +267,7 @@ export default {
};
</script>
<style scoped>
<style lang="less" scoped>
.ruleTitle{
width: fit-content;
height: 32px;
......@@ -258,4 +281,36 @@ font-size: 14px;
.el-form-item {
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>
......@@ -9,7 +9,7 @@ import axios from 'axios';
import VueAxios from 'vue-axios';
import store from './store';
import './assets/theme/index.css';
import '../static/fonts/iconfont.js';
promise.polyfill();
Vue.use(VueAxios, axios);
......
......@@ -47,16 +47,33 @@ const router = new Router({
path: '/giftAdd',
name: 'giftAdd',
component: giftDetail,
meta: {
type: 'add',
},
},
{
path: '/giftEdit',
name: 'giftEdit',
component: giftDetail,
meta: {
type: 'edit',
},
},
{
path: '/giftInfo',
name: 'giftInfo',
component: giftDetail,
meta: {
type: 'info',
},
},
{
path: '/giftDetail',
name: 'giftDetail',
path: '/giftCopy',
name: 'giftCopy',
component: giftDetail,
meta: {
type: 'copy',
},
},
{
path: '/coupon',
......
......@@ -348,7 +348,7 @@
</el-button>
<el-button
type="text"
v-if="scope.row.newRuleFlag!=1 && $getButtonLimit($buttonCode.couponRelating)"
v-if="!scope.row.ruleTitle && $getButtonLimit($buttonCode.couponRelating)"
@click="relating(scope.row)"
:limit-code="$buttonCode.couponRelating"
>
......
......@@ -17,7 +17,6 @@
<span>{{ mallProId === '-1' ? '新建' : '编辑' }}优惠券</span>
</h3>
</div>
<updateInfo v-if="!isNew" v-loading="submitLoading" />
<div class="section" v-loading="submitLoading">
<el-form
:model="couponForm"
......@@ -245,19 +244,26 @@
<div class="section-content">
<h3>
可见配置<span class="sub_title">该配置决定客户是否可见</span>
<el-button
type="text"
style="position: absolute;right: 20%;"
@click="readHistoryData"
v-show="isNew&&(visibleData.useNewStoreWidget==0 || (visibleData.uuid && visibleData.useNewStoreWidget == 1))"
<el-popover
placement="right"
width="670"
trigger="click"
>
查看当前商品历史配置数据
</el-button>
<historyData ref="historyData" :form="visibleData" />
<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>
<visible-setting
ref="visibleSetting"
:form="visibleData"
:isAdd="isAdd"
@update="isNew = true"
:isNew="isNew"
/>
</div>
......@@ -472,14 +478,6 @@
<el-form-item class="fix-btn">
<el-button
type="primary"
@click="clearHistoryData"
size="small"
v-show="!isNew"
>
清除门店数据
</el-button>
<el-button
type="primary"
size="small"
@click="submitForm('couponForm')"
:disabled="!canEdit||isDetail==1"
......@@ -505,7 +503,6 @@
@selectCard="selectCard"
ref="dmcard"
/>
<historyData ref="historyData" :form="visibleData" />
</div>
</template>
......@@ -516,13 +513,11 @@ import copy from '../../../utils/clone.js';
import getInputVal from '../../../utils/common.js';
import tinymceEdit from '../../../components/tinymce-edit';
import visibleSetting from '@/components/visible';
import updateInfo from '@/components/updateInfo';
import historyData from '@/components/historyData';
export default {
components: {
tinymceEdit,
visibleSetting,
updateInfo,
historyData,
},
data () {
......@@ -701,9 +696,6 @@ export default {
this.isNew = true;
});
},
readHistoryData () {
this.$refs.historyData.showPop();
},
jump (index) {
const jump = document.querySelectorAll('.section-content');
const total = jump[index].offsetTop;
......
......@@ -11,13 +11,12 @@
<el-breadcrumb-item :to="{ path: '/gift' }">
礼品
</el-breadcrumb-item>
<el-breadcrumb-item>{{ giftId === '-1' ? '新建' : '编辑' }}{{ giftType === 1 ? '实物' : '虚拟' }}礼品</el-breadcrumb-item>
<el-breadcrumb-item>{{ typeVal }}{{ giftType === 1 ? '实物' : '虚拟' }}礼品</el-breadcrumb-item>
</el-breadcrumb>
<h3>
<span>{{ giftId === '-1' ? '新建' : '编辑' }}{{ giftType === 1 ? '实物' : '虚拟' }}礼品</span>
<span>{{ typeVal }}{{ giftType === 1 ? '实物' : '虚拟' }}礼品</span>
</h3>
</div>
<updateInfo v-if="!isNew" v-loading="submitLoading" />
<div class="section" v-loading="submitLoading">
<el-form
:model="giftForm"
......@@ -244,18 +243,27 @@
<div class="section-content">
<h3>
可见配置<span class="sub_title">该配置决定客户是否可见</span><el-button
type="text"
style="position: absolute;right: 20%;"
@click="readHistoryData"
v-show="isNew&&(visibleData.useNewStoreWidget==0 || (visibleData.uuid && visibleData.useNewStoreWidget == 1))"
可见配置<span class="sub_title">该配置决定客户是否可见</span>
<el-popover
placement="right"
width="670"
trigger="click"
>
查看当前商品历史配置数据
</el-button>
<historyData ref="historyData" :form="visibleData" />
<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>
<visible-setting
ref="visibleSetting"
:form="visibleData"
@update="isNew = true"
:isNew="isNew"
/>
</div>
......@@ -528,7 +536,7 @@
</el-form-item>
<el-form-item label="自提点" v-if="giftForm.changeTypeList.indexOf('4') != -1">
<pickUp-store
:isAdd="isAddPick"
:isAdd="isAdd"
:pickUpPointType="pickUpPointType"
:selectData="selectedStoreData"
@getArr="getArr"
......@@ -631,17 +639,9 @@
<el-form-item class="fix-btn">
<el-button
type="primary"
@click="clearHistoryData"
size="small"
v-show="!isNew"
>
清除门店数据
</el-button>
<el-button
type="primary"
@click="submitGoodsForm('giftForm')"
size="small"
:disabled="isDetail==1"
:disabled="$route.meta.type=='info'"
>
保存
</el-button>
......@@ -698,7 +698,6 @@
</span>
</el-dialog>
<importCoupon :importCouponModal="importCouponModal" @getSuceessNum="getSuceessNum" />
<historyData ref="historyData" :form="visibleData" />
</div>
</template>
......@@ -716,7 +715,6 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css';
import pickUpStore from '../../../components/store/store';
import draggable from 'vuedraggable';
import visibleSetting from '@/components/visible';
import updateInfo from '@/components/updateInfo';
import historyData from '@/components/historyData';
export default {
data () {
......@@ -866,19 +864,19 @@ export default {
pickUpPointList: [], // 门店自提列表
// 新版门店卡券选择器
uuid: '',
isAdd: true,
// 门店自提数据
pickUpPointType: 0,
selectedStoreData: [],
pickUpPointStr: '',
isAddPick: true,
warnStatus: {
way: false, // 配送方式提示
refund: false, // 退款提示
textCode: false, // 文本券码
},
memberGrade: '',
isEdit: false,
isEdit: this.$route.meta.type == 'edit',
isAdd: this.$route.meta.type == 'add',
isCopy: this.$route.meta.type == 'copy',
isCorrect: true, // 校验阶梯价的验证是否可以保存阶梯价
enterpriseId: '', // 商户id
specialOrder: false, // 是否定制
......@@ -908,6 +906,12 @@ export default {
isNew: true, // 编辑旧商品时,是否确认转换为新数据格式
};
},
computed: {
typeVal () {
const obj = { add: '新建', copy: '复制', edit: '编辑', info: '查看' };
return obj[this.$route.meta.type];
},
},
mounted () {
this.getOpenStatus();
this.getUserId();
......@@ -916,19 +920,13 @@ export default {
localStorage.removeItem('giftListObj');
};
this.giftType = Number(this.$route.query.type); // 列表上实物是1虚拟是0
this.isDetail = Number(this.$route.query.isDetail);
this.giftId = this.$route.query.giftId;
this.mallProId = this.$route.query.giftId;
if (this.$route.query.proReferId !== '-1') {
// 编辑
this.giftForm.proReferId = this.$route.query.proReferId;
this.isAdd = false;
this.isEdit = true;
} else {
// 新增
this.giftForm.proReferId = '';
this.getMemberGradeList(); // 会员等级列表
this.isEdit = false;
this.isNew = true;
}
......@@ -940,36 +938,17 @@ export default {
}
if (this.giftId !== '-1') {
this.getInfo();
this.isAddPick = false;
this.editChangeTypeStatus = true;
} else {
this.isAddPick = true;
if (this.giftType === 0) {
this.getGiftId();
} else {
this.mallProId = '-1';
}
}
if ((this.giftId == '-1' || this.isCopy) && this.giftType === 0) {
this.getGiftId();
}
this.$nextTick(function () {
window.addEventListener('scroll', this.onScroll, true);
});
document.documentElement.scrollTop = 0;
},
methods: {
clearHistoryData () {
this.$confirm('是否确认清除【展示门店数据】?清除后,可进入升级后的编辑页面。', '提示', {
confirmButtonText: '确定',
showCancelButton: false,
type: 'warning',
}).then(() => {
this.jump(2);
this.isNew = true;
});
},
readHistoryData () {
this.$refs.historyData.showPop();
},
// 阶梯价定制,判断达摩测试环境与地素环境
// 达摩测试 ff8080815dacd3a2015dacd3ef5c0000
// 达摩生产 ff8080816a36326c016a53380d8b5f52
......@@ -1257,7 +1236,6 @@ export default {
request.post('/api-integral-mall/get-integral-mall-pro', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
const data = res.data.result;
console.log(data);
this.echoVisibleData(data);
this.giftForm.proName = data.proName; // 名称
this.proNameLen = getInputVal.getZhLen(this.giftForm.proName);
......@@ -1519,6 +1497,9 @@ export default {
} else {
this.isNew = false;
}
if (this.isCopy) {
this.isNew = true;
}
if (useNewStoreWidget == 0) { // 使用老的门店控件 (兼容老数据)
const type = Number(showStore);
this.visibleData.sendChildData.storeType = type; // :0所有 1门店分组 2部分门店
......@@ -2240,7 +2221,7 @@ export default {
this.$refs[form].validate(valid => {
if (valid) {
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
giftType: this.giftType === 0 ? 0 : 1, //0、虚拟 1、实物
proName: this.giftForm.proName.trim(), //礼品名称
......@@ -2390,7 +2371,6 @@ export default {
pickUpStore,
draggable,
visibleSetting,
updateInfo,
historyData
}
};
......@@ -2658,7 +2638,7 @@ export default {
color: #909399;
position: absolute;
left: 430px;
top: 0px;
top: 80px;
}
.tips {
font-size: 12px;
......
......@@ -364,7 +364,7 @@
</el-button>
<el-button
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)"
:limit-code="$buttonCode.giftRelating"
>
......@@ -372,6 +372,12 @@
</el-button>
<el-button
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"
:limit-code="$buttonCode.giftNew"
@click="deleteList(scope.row, 2)"
......@@ -388,7 +394,7 @@
</el-button>
<el-button
type="text"
@click="goAdd(scope.row)"
@click="goAdd(scope.row,'giftEdit')"
:limit-code="$buttonCode.giftEdit"
v-if="$getButtonLimit($buttonCode.giftEdit)"
>
......@@ -657,7 +663,7 @@ export default {
},
handleCommand (command, item, index) {
if (command == 0) {
this.goAdd(item, 'detail');
this.goAdd(item, 'giftInfo');
} else if (command == 1) {
this.goRecord(item);
} else if (command == 2) {
......@@ -915,8 +921,12 @@ export default {
};
request.post('/api-integral-mall/delete-pro', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
const text = Number(type) === 0 ? '删除成功' : Number(type) === 1 ? '下架成功' : '上架成功';
this.$message.success(text);
if (res.data.message) {
this.$message.error(res.data.message);
} else {
const text = Number(type) === 0 ? '删除成功' : Number(type) === 1 ? '下架成功' : '上架成功';
this.$message.success(text);
}
this.currentPage = 1;
this.getList(); // 拉取列表
this.goodsType = '';
......@@ -944,7 +954,10 @@ export default {
sortColumn: this.sortColumn,
};
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) {
......
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