Commit 67e7dedc by crushh

update: dist

parents 7f28462a 825c3cd4
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -4,18 +4,10 @@ ...@@ -4,18 +4,10 @@
<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="./static/css/iconfont.css"> <!-- 历史老icon-->
<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>
<!-- GrowingIO Analytics code version 2.1 -->
<!-- Copyright 2015-2018 GrowingIO, Inc. More info available at http://www.growingio.com -->
<!-- <script type='text/javascript'>
!function(e,t,n,g,i){e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},n=t.createElement("script"),tag=t.getElementsByTagName("script")[0],n.async=1,n.src=('https:'==document.location.protocol?'https://':'http://')+g,tag.parentNode.insertBefore(n,tag)}(window,document,"script","assets.giocdn.com/2.1/gio.js","gio");
gio('init','8be12240a3749eab', {});
gio('send');
</script> -->
<!-- End GrowingIO Analytics code version: 2.1 -->
</head> </head>
<body> <body>
......
...@@ -27,9 +27,6 @@ ...@@ -27,9 +27,6 @@
</p> </p>
<img :src="modalData.imgUrl" class="wechat-img" style="width:140px;height:140px;"> <img :src="modalData.imgUrl" class="wechat-img" style="width:140px;height:140px;">
</div> </div>
<div class="wechat-force" style="margin-bottom:0">
<p>温馨提示:通过二维码兑换,仅校验会员适用等级</p>
</div>
<div class="wechat-force"> <div class="wechat-force">
<el-button type="primary" @click="force"> <el-button type="primary" @click="force">
重新生成 重新生成
...@@ -40,11 +37,9 @@ ...@@ -40,11 +37,9 @@
</template> </template>
<script> <script>
// import request from '../../../service/request.js';
import request from '../service/request';
export default { export default {
props: { props: {
modalData: { modalVal: {
type: Object, type: Object,
}, },
integralMallProId: { integralMallProId: {
...@@ -53,26 +48,26 @@ export default { ...@@ -53,26 +48,26 @@ export default {
return ''; return '';
}, },
}, },
saleType: {
type: String,
default () {
return '';
},
},
}, },
data () { data () {
return { return {
// loading:true, // loading:true,
forceIntegralMallProId: '', forceIntegralMallProId: '',
forceType: '', forceType: '',
modalData: {
show: false,
imgUrl: '',
loading: false,
},
}; };
}, },
watch: { watch: {
integralMallProId: function (value) { integralMallProId: function (value) {
this.forceIntegralMallProId = value; this.forceIntegralMallProId = value;
}, },
saleType: function (value) { modalVal (val) {
this.forceType = value; console.log(val);
this.modalData = val;
}, },
}, },
methods: { methods: {
...@@ -83,22 +78,7 @@ export default { ...@@ -83,22 +78,7 @@ export default {
this.$message.error('复制失败'); this.$message.error('复制失败');
}, },
force () { force () {
const params = { this.$emit('updateEqcode', { integralMallProId: this.forceIntegralMallProId });
integralMallProId: this.forceIntegralMallProId,
type: this.forceType,
isForce: '1',
};
this.modalData.show = true;
request.get('/api-integral-mall/get-qRCode', { params }).then(res => {
if (res.data.errorCode === 0) {
this.modalData.show = true;
this.modalData.pageUrl = res.data.result.page;
this.modalData.imgUrl = res.data.result.url;
this.modalData.loading = false;
} else {
this.$message.error(res.data.message);
}
});
}, },
}, },
}; };
......
...@@ -381,15 +381,7 @@ export default { ...@@ -381,15 +381,7 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.w-100 {
width: 100px;
}
.w-160 {
width: 160px;
}
.w-300 {
width: 300px;
}
.gift-info img { .gift-info img {
width: 48px; width: 48px;
height: 48px; height: 48px;
...@@ -410,8 +402,10 @@ export default { ...@@ -410,8 +402,10 @@ export default {
color: #606266; color: #606266;
height: 22px; height: 22px;
line-height: 22px; line-height: 22px;
/* width: 230px; */
font-size: 14px; font-size: 14px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.category-ellipsis { .category-ellipsis {
color: #909399; color: #909399;
......
<template>
<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="80px"
>
<el-form-item
label="展现门店"
style="position:relative"
>
<el-tooltip
class="tips-content"
effect="dark"
popper-class="store-tips"
placement="top-start"
>
<div slot="content" style="line-height:18px">
会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见
</div>
<i class="iconfont icon-QuestionCircleOutlined" />
</el-tooltip>
<vue-gic-store-linkage
v-if="giftForm.useNewStoreWidget === 0 &&giftForm.creatorId "
style="margin-left:10px"
:creatorId="giftForm.creatorId"
:disabled="true"
:openFlag="giftForm.openFlag"
@getDisGroupList="getDisGroupList"
:msg="giftForm.sendChildData"
ref="selectTree"
/>
<span v-if="giftForm.useNewStoreWidget === 0&&giftForm.sendChildData.storeType === 1" class="store-tip" style="display: contents;">若选中的父分组下有新增的门店分组,系统不会默认选中此新增门店分组,请重新确认选择并保存礼品</span>
<vue-gic-store-card
v-show="giftForm.useNewStoreWidget === 1"
style="margin-left:10px"
class="pt10"
ref="storeCard"
:readonly="true"
:uuid.sync="giftForm.uuid"
scenes
/>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
props: {
form: Object,
},
data () {
return {
giftForm: {
useNewStoreWidget: 1,
openFlag: false,
creatorId: '',
sendChildData: { // 公共组件的值
storeType: 1,
storeGroupIds: '',
storeIds: [],
},
uuid: '',
}, // 表单的值
};
},
watch: {
form: {
handler (val) {
this.giftForm = JSON.parse(JSON.stringify(val));
if (this.giftForm.useNewStoreWidget == 1) {
this.$nextTick(_ => {
this.$refs.storeCard && this.$refs.storeCard.init();
});
}
},
immediate: true,
},
},
};
</script>
<template>
<el-dialog
title="上架规则列表"
:key="updateDialog"
:visible.sync="dialogTableVisible"
:before-close="closePop"
:width="$store.state.product.ruleMemberFilterClose==0?'1200px':'900px'"
>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="上架规则" name="list">
<div class="tab-pane-container">
<div class="search-wrap">
<div class="table-page-search-wrapper">
<el-form @submit.native.prevent>
<el-input
v-model="relateForm.ruleTitle"
placeholder="请输入上架规则名称"
prefix-icon="el-icon-search"
clearable
class="w-260"
@keyup.enter.native="getSearchList"
@clear="getSearchList"
/>
</el-form>
</div>
<!-- <div class="tips" style="font-size:14px">
没有适用规则?<el-button type="text" size="small" @click="$router.push('/addRule')">
去新建上架规则
</el-button>
</div> -->
</div>
<el-table :data="tableDate" @row-click="onRowClick" v-loading="loading">
<el-table-column width="35">
<template slot-scope="{row}">
<div class="label">
<el-radio v-model="tableRadio" :label="row.integralMallProRuleId" />
</div>
</template>
</el-table-column>
<el-table-column property="ruleTitle" label="上架规则名称">
<template slot-scope="{row}">
<div>
<div class="title">
{{ row.ruleTitle }}
</div>
<div
style="font-size: 12px;color: rgb(144, 147, 153);"
>
{{ row.ruleExplanation }}
</div>
</div>
</template>
</el-table-column>
<el-table-column label="可见条件" show-overflow-tooltip min-width="180">
<template slot-scope="{row}">
{{ row.memberType==1?'全部顾客':row.showBack }}
</template>
</el-table-column>
</el-table>
<div class="pagination-conteiner" style="padding:10px 0 0 0;" v-if="totalCount>5">
<div class="pagination">
<el-pagination
layout="prev, pager, next"
:current-page.sync="relateForm.currentPage"
:page-size.sync="relateForm.pageSize"
@current-change="getList"
:total="totalCount"
/>
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="新建规则" name="form">
<div class="tab-pane-container" style="max-height: 500px;overflow-y: auto;overflow-x: hidden;">
<ruleInfo
:isDialog="true"
ref="ruleInfo"
@submit="getRow"
@btnLoading="btnLoading=true"
@btnStop="btnLoading=false"
/>
</div>
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="closePop">取消</el-button>
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="submit"
>确认</el-button>
</span>
</el-dialog>
</template>
<script>
import request from '@/service/request.js';
import ruleInfo from '@/components/ruleDetail.vue';
export default {
name: 'RelatePop',
components: {
ruleInfo,
},
props: {
integralMallProRuleId: String,
},
data () {
return {
loading: false,
btnLoading: false,
tableRadio: '',
activeName: 'list',
tableDate: [],
relateForm: {
ruleTitle: '',
pageSize: 5,
currentPage: 1,
},
dialogTableVisible: false,
echoRuleId: '',
updateDialog: false,
};
},
watch: {
integralMallProRuleId (val) {
if (val) {
this.echoRuleId = val;
}
},
},
mounted () {
},
methods: {
onRowClick (row) {
this.tableRadio = row.integralMallProRuleId;
},
showPop () {
this.dialogTableVisible = true;
this.getList();
},
getSearchList () {
this.relateForm.currentPage = 1;
this.getList();
},
getList () {
this.loading = true;
this.tableRadio = '';
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;
this.tableDate = this.tableDate.splice(0);
if (this.echoRuleId) this.tableRadio = this.echoRuleId;
}).finally(_ => {
this.loading = false;
});
},
echoData (row) {
const form = new FormData();
form.append('params', row.filterJson);
form.append('requestProject', 'integral-mall');
form.append('sceneCode', 'member');
return request.post('/api-plug/screening-show-back', form);
},
closePop () {
this.tableRadio = '';
this.relateForm = {
ruleTitle: '',
pageSize: 5,
currentPage: 1,
};
this.activeName = 'list';
this.updateDialog = !this.updateDialog;
this.dialogTableVisible = false;
this.btnLoading = false;
},
finishBtnLoading () {
this.btnLoading = false;
},
getRow (row) {
this.$emit('finish', row);
},
submit () {
if (this.activeName == 'list') {
if (!this.tableRadio) {
this.$message.warning('请选择规则');
return;
}
const row = this.tableDate.filter(item => item.integralMallProRuleId == this.tableRadio)[0];
this.btnLoading = true;
this.$emit('finish', row);
} else {
this.$refs.ruleInfo.submit();
}
},
},
};
</script>
<style lang="scss" scoped>
.label{
/deep/ .el-radio__label{
display: none;
}
}
.tab-pane-container{
margin-top: 24px;
}
</style>
<template>
<el-form
ref="ruleForm"
:rules="rules"
:model="ruleForm"
label-width="130px"
size="small"
v-loading="loading"
>
<el-form-item label="上架规则名称" prop="ruleTitle">
<el-input
maxlength="30"
show-word-limit
placeholder="请输入上架规则名称"
v-model="ruleForm.ruleTitle"
style="width:340px"
/>
</el-form-item>
<el-form-item label="上架规则说明" prop="ruleExplanation">
<el-input
maxlength="50"
show-word-limit
placeholder="请输入上架规则说明"
v-model="ruleForm.ruleExplanation"
style="width:340px"
/>
</el-form-item>
<el-form-item label="适用人群" prop="memberType">
<span v-if="$store.state.product.ruleMemberFilterClose==0" class="tips">【人群筛选器】类型的上架规则最多支持20条,目前已创建 <span style="color:#1890ff">{{ memberTypeTotal }}</span></span>
<div>
<el-radio v-model="ruleForm.memberType" :label="1">
全部客户
</el-radio>
<el-radio v-model="ruleForm.memberType" :label="4">
门店筛选
</el-radio>
<el-radio
v-model="ruleForm.memberType"
:label="3"
:disabled="memberTypeTotal>=20&&isAdd"
v-if="$store.state.product.ruleMemberFilterClose==0"
>
人群筛选器
</el-radio>
</div>
</el-form-item>
<el-form-item v-show="ruleForm.memberType === 4">
<vue-gic-store-new
:isAdd="isAdd || !uuid"
:uuid.sync="uuid"
ref="storeGroup"
@store-change="storeChange"
/>
</el-form-item>
<vue-gic-people
v-show="ruleForm.memberType === 3&&$store.state.product.ruleMemberFilterClose==0"
v-bind="storeParams"
:projectName="projectName"
:triggerReset="true"
:useId="useId"
:hasSearchData="hasSearchData"
:sceneValue="sceneValue"
ref="peopleFilter"
@findFilter="findFilter"
@getBackData="getBackData"
@editShow="hasEditGicPeople=true"
/>
<div>
<el-form-item style="margin-top:50px" v-show="!isDialog">
<el-button
type="primary"
size="small"
@click="submit()"
:loading="btnLoading"
>
确认
</el-button>
</el-form-item>
</div>
</el-form>
</template>
<script>
import request from '@/service/request';
export default {
props: {
isDialog: {
default: false,
type: Boolean,
},
},
data () {
const activityTimeVal = (rule, value, callback) => {
callback(new Error('请填写'));
};
return {
fixedWidth: document.documentElement.clientWidth - 200,
ruleForm: {
memberType: 1, // 1:全部顾客 3 人群筛选 4 门店筛选
},
rules: {
ruleTitle: [
{ required: true, message: '请填写', trigger: 'blur' },
],
activityTime: [
{ required: true, message: '请填写', trigger: 'blur', validator: activityTimeVal },
],
},
projectName: 'integral-mall',
useId: '',
hasSearchData: '',
sceneValue: 'member', // 场景值
hasEditGicPeople: false,
isEdit: this.$route.meta.type === 'edit',
isAdd: this.$route.meta.type === 'add',
isCopy: this.$route.meta.type === 'copy',
loading: false,
btnLoading: false,
uuid: '',
memberTypeTotal: 0,
};
},
computed: {
storeParams () {
return !this.isAdd ? { creatorId: this.ruleForm.creatorId } : {};
},
},
mounted () {
if (!this.isAdd) {
this.integralMallProRuleId = this.$route.params.id;
this.getDatail(this.$route.params.id);
}
this.memberTypeNum();
},
methods: {
/** 门店筛选器 */
storeChange (storeId) {
this.uuid = storeId;
},
/** 人群筛选器 */
// 获取需要回显的数据, 供保存时候使用
getBackData (val) {
console.log(val);
this.ruleForm.searchJson = val;
},
// 子组件触发父组件事件,返回过滤条件数据
findFilter (val) {
console.log(val);
this.ruleForm.filterJson = val;
},
getDatail (integralMallProRuleId) {
this.loading = true;
request.get('/api-integral-mall/get-rule', { params: { integralMallProRuleId } }).then(res => {
if (res.data.result) {
this.ruleForm = res.data.result;
if (this.ruleForm.memberType == 3) { // 人群筛选器回显
this.hasSearchData = this.ruleForm.filterJson;
this.useId = this.ruleForm.searchId;
if (this.isCopy) {
const form = new FormData();
form.append('requestProject', 'integral-mall');
form.append('id', this.ruleForm.searchId);
request.post('/api-plug/get-screening-detail', form).then(res => {
this.ruleForm.searchJson = res.data.result && res.data.result.detail;
});
}
} else if (this.ruleForm.memberType == 4) { // 门店筛选器回显
this.uuid = JSON.parse(this.ruleForm.filterJson).storeWidgetId;
}
}
}).finally(() => {
this.loading = false;
});
},
submitRequest () {
this.$refs.ruleForm.validate(val => {
if (val) {
let data = {};
if (this.isCopy) {
const { ruleTitle, ruleExplanation, filterJson, memberType, searchJson, showBack } = this.ruleForm;
data = { ruleTitle, ruleExplanation, memberType, filterJson, searchJson, showBack };
} else {
data = this.ruleForm;
}
this.btnLoading = true;
this.$emit('btnLoading');
request.post('/api-integral-mall/add-update-rule', data).then(res => {
const integralMallProRuleId = res.data.result;
if (this.isDialog) {
this.$emit('submit', { ...data, integralMallProRuleId });
} else {
this.$router.go(-1);
}
}).finally(() => {
this.$emit('btnStop');
this.btnLoading = false;
});
}
});
},
async submit () {
if (this.ruleForm.memberType == 1) {
this.ruleForm.filterJson = '';
this.ruleForm.searchJson = '';
this.ruleForm.searchId = '';
this.submitRequest();
} else if (this.ruleForm.memberType == 3) {
if (this.hasEditGicPeople) {
this.$refs.peopleFilter.confirmSet().then(async () => {
const res = await this.echoData(this.ruleForm.filterJson);
this.ruleForm.showBack = res.data.result;
this.submitRequest();
});
} else {
const res = await this.echoData(this.ruleForm.filterJson);
this.ruleForm.showBack = res.data.result;
this.submitRequest();
}
} else if (this.ruleForm.memberType == 4) {
this.$refs.storeGroup.getStoreConfig().then(async (data) => {
let type = 0;
if (data.type != 0) {
type = 1;
}
const res = await this.echoData2(this.uuid, data.type);
const { data: { result: { result } } } = res;
console.log(result);
if (result) {
this.ruleForm.showBack = result.map(item => item.name).join(',');
} else {
this.ruleForm.showBack = '所有门店';
}
this.ruleForm.filterJson = JSON.stringify({ storeMode: type, storeWidgetId: this.uuid });
this.ruleForm.searchJson = '';
this.ruleForm.searchId = this.uuid;
this.submitRequest();
});
}
},
echoData (filterJson) { // 取得人群筛选器回显文字
const form = new FormData();
form.append('params', filterJson);
form.append('requestProject', 'integral-mall');
form.append('sceneCode', 'member');
return request.post('/api-plug/screening-show-back', form);
},
echoData2 (key, type) { // 取得门店筛选器的文字回显
const form = new FormData();
form.append('key', key);
form.append('selectType', type);
form.append('currentPage', 1);
form.append('pageSize', 20);
return request.post('/api-plug/list-right-data', form);
},
memberTypeNum () {
request.get('/api-integral-mall/list-rule', { params: { memberType: 3 } }).then(res => {
this.memberTypeTotal = res.data.result.length || 0;
});
},
},
};
</script>
<style scoped>
.gic-people--button{
background: #f2f3f4;
padding: 0 0 20px 124px;
}
</style>
...@@ -273,7 +273,7 @@ export default { ...@@ -273,7 +273,7 @@ export default {
return false; return false;
} }
// 过滤数据只保留部分有用字段 // 过滤数据只保留部分有用字段
this.selectLeftList.map(v => { this.selectLeftList.forEach(v => {
delete v.children; delete v.children;
delete v.parentGroupId; delete v.parentGroupId;
delete v.groupLevel; delete v.groupLevel;
...@@ -334,9 +334,7 @@ export default { ...@@ -334,9 +334,7 @@ export default {
.search-content { .search-content {
margin: 10px; margin: 10px;
} }
.w-180 {
width: 180px;
}
.border-radius20 /deep/ input { .border-radius20 /deep/ input {
border-radius: 20px; border-radius: 20px;
} }
......
...@@ -318,9 +318,7 @@ export default { ...@@ -318,9 +318,7 @@ export default {
.search-content { .search-content {
margin: 10px; margin: 10px;
} }
.w-180 {
width: 180px;
}
.border-radius20 /deep/ input { .border-radius20 /deep/ input {
border-radius: 20px; border-radius: 20px;
} }
......
...@@ -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);
...@@ -21,6 +21,9 @@ Vue.config.productionTip = false; ...@@ -21,6 +21,9 @@ Vue.config.productionTip = false;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
Vue.config.devtools = true; Vue.config.devtools = true;
} }
window.ELEMENT.Dialog.props.closeOnClickModal.default = false; // 全局设置点击蒙层不关闭
/* eslint-disable no-new */ /* eslint-disable no-new */
/* eslint-disable no-new */ /* eslint-disable no-new */
window.getLimit(router, 'integral-mall').then(() => { window.getLimit(router, 'integral-mall').then(() => {
......
...@@ -5,12 +5,14 @@ import Router from 'vue-router'; ...@@ -5,12 +5,14 @@ import Router from 'vue-router';
import VueClipboard from 'vue-clipboard2'; import VueClipboard from 'vue-clipboard2';
import main from '../views/main'; import main from '../views/main';
import gift from '../views/goods/gift/gift'; import gift from '../views/goods/gift/gift';
import giftInfo from '../views/goods/gift/info'; // import giftInfo from '../views/goods/gift/info';
import giftDetail from '../views/goods/gift/detail';
import coupon from '../views/goods/coupon/coupon'; import coupon from '../views/goods/coupon/coupon';
import soldStatistics from '../views/goods/soldStatistics/statistics'; import soldStatistics from '../views/goods/soldStatistics/statistics';
import flashSale from '../views/activities/flashSale/list'; import flashSale from '../views/activities/flashSale/list';
import flashSaleInfo from '../views/activities/flashSale/detail'; import flashSaleInfo from '../views/activities/flashSale/detail';
import couponInfo from '../views/goods/coupon/info'; // import couponInfo from '../views/goods/coupon/info';
import couponDetail from '../views/goods/coupon/detail';
import giftExchange from '../views/order/giftExchange'; import giftExchange from '../views/order/giftExchange';
import couponExchange from '../views/order/couponExchange'; import couponExchange from '../views/order/couponExchange';
import refundList from '../views/order/refundList'; import refundList from '../views/order/refundList';
...@@ -19,6 +21,8 @@ import editDeliver from '../views/setting/editDeliver'; ...@@ -19,6 +21,8 @@ import editDeliver from '../views/setting/editDeliver';
import orderDetail from '../views/order/orderDetail'; import orderDetail from '../views/order/orderDetail';
import recordList from '../views/setting/recordList'; import recordList from '../views/setting/recordList';
import convenSet from '../views/setting/convenSet'; import convenSet from '../views/setting/convenSet';
import ruleList from '../views/goods/ruleList/ruleList';
import ruleInfo from '../views/goods/ruleList/info';
Vue.use(VueClipboard); Vue.use(VueClipboard);
/** /**
...@@ -42,17 +46,34 @@ const router = new Router({ ...@@ -42,17 +46,34 @@ const router = new Router({
{ {
path: '/giftAdd', path: '/giftAdd',
name: 'giftAdd', name: 'giftAdd',
component: giftInfo, component: giftDetail,
meta: {
type: 'add',
},
},
{
path: '/giftEdit',
name: 'giftEdit',
component: giftDetail,
meta: {
type: 'edit',
},
}, },
{ {
path: '/giftInfo', path: '/giftInfo',
name: 'giftInfo', name: 'giftInfo',
component: giftInfo, component: giftDetail,
meta: {
type: 'info',
},
}, },
{ {
path: '/giftDetail', path: '/giftCopy',
name: 'giftDetail', name: 'giftCopy',
component: giftInfo, component: giftDetail,
meta: {
type: 'copy',
},
}, },
{ {
path: '/coupon', path: '/coupon',
...@@ -65,17 +86,34 @@ const router = new Router({ ...@@ -65,17 +86,34 @@ const router = new Router({
{ {
path: '/couponAdd', path: '/couponAdd',
name: 'couponAdd', name: 'couponAdd',
component: couponInfo, component: couponDetail,
meta: {
type: 'add',
},
}, },
{ {
path: '/couponInfo', path: '/couponInfo',
name: 'couponInfo', name: 'couponInfo',
component: couponInfo, component: couponDetail,
meta: {
type: 'info',
},
}, },
{ {
path: '/couponDetail', path: '/couponEdit',
name: 'couponDetail', name: 'couponEdit',
component: couponInfo, component: couponDetail,
meta: {
type: 'edit',
},
},
{
path: '/couponCopy',
name: 'couponCopy',
component: couponDetail,
meta: {
type: 'copy',
},
}, },
{ {
path: '/soldStatistics', path: '/soldStatistics',
...@@ -101,6 +139,38 @@ const router = new Router({ ...@@ -101,6 +139,38 @@ const router = new Router({
component: flashSaleInfo, component: flashSaleInfo,
}, },
{ {
path: '/ruleList',
name: 'ruleList',
component: ruleList,
meta: {
useMenuLimit: true,
},
},
{
path: '/editRule/:id',
name: 'editRule',
component: ruleInfo,
meta: {
type: 'edit',
},
},
{
path: '/addRule',
name: 'addRule',
component: ruleInfo,
meta: {
type: 'add',
},
},
{
path: '/copyRule/:id',
name: 'copyRule',
component: ruleInfo,
meta: {
type: 'copy',
},
},
{
path: '/giftExchange', path: '/giftExchange',
name: 'giftExchange', name: 'giftExchange',
component: giftExchange, component: giftExchange,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import axios from 'axios'; import axios from 'axios';
import store from '../store/index'; import store from '../store/index';
import router from '../router'; import router from '../router';
import { Message } from 'element-ui';
// axios 配置 // axios 配置
// axios.defaults.timeout = 5000; // axios.defaults.timeout = 5000;
// let adminUrl = 'http://gicdev.demogic.com' // let adminUrl = 'http://gicdev.demogic.com'
...@@ -46,26 +46,58 @@ request.interceptors.request.use( ...@@ -46,26 +46,58 @@ request.interceptors.request.use(
// http response 拦截器 // http response 拦截器
request.interceptors.response.use( request.interceptors.response.use(
response => { response => {
if (response.status == 200 && response.data.errorCode === 401) { const { data, config } = response;
window.location.href = window.location.origin + '/gic-web'; let err;
// window.location.href = 'http://gicdev.com/gic-web' const { errorCode } = data;
switch (errorCode) {
case 0:
return response;
case 401:
Message({
message: '登录失效',
type: 'error',
});
window.location.href = window.location.origin + '/gic-web';
break;
case undefined:
break;
default:
Message({
message: data.message,
type: 'error',
});
err = new Error(`${data.message}: ${config.url}`);
return Promise.reject(err);
} }
return response;
}, },
error => { error => {
if (error.response) { console.log('===>');
switch (error.response.status) { console.log(error);
case 401: const status = err.response.status;
// 401 清除token信息并跳转到登录页面 switch (status) {
store.commit(types.LOGOUT); case 400: err.message = '请求错误'; break;
router.replace({ case 401: err.message = '未授权,请登录';
name: 'login', store.commit(types.LOGOUT);
query: { redirect: router.currentRoute.fullPath } window.location.href = window.location.origin + '/gic-web';
}); break;
} case 403: err.message = '拒绝访问'; break;
case 404: err.message = `请求地址出错: ${err.response.config.url}`; break;
case 408: err.message = '请求超时'; break;
case 500: err.message = '服务器内部错误'; break;
case 501: err.message = '服务未实现'; break;
case 502: err.message = '网关错误'; break;
case 503: err.message = '服务不可用'; break;
case 504: err.message = '网关超时'; break;
case 505: err.message = 'HTTP版本不受支持'; break;
default: break;
} }
return Promise.reject(error.response.data);
Message({
message: '系统异常',
type: 'error',
});
return Promise.reject(err);
} }
); );
......
...@@ -5,6 +5,7 @@ const state = { ...@@ -5,6 +5,7 @@ const state = {
total: 0, total: 0,
canUseMenuUrl: [], canUseMenuUrl: [],
erpGoodsFlag: 0, erpGoodsFlag: 0,
ruleMemberFilterClose: 0,
}; };
// getters // getters
...@@ -64,6 +65,10 @@ const mutations = { ...@@ -64,6 +65,10 @@ const mutations = {
mutations_erpGoodsFlag (state, val) { mutations_erpGoodsFlag (state, val) {
state.erpGoodsFlag = val; state.erpGoodsFlag = val;
}, },
// 是否关闭人群筛选器
mutations_ruleMemberFilterClose (state, val) {
state.ruleMemberFilterClose = val;
},
}; };
export default { export default {
......
...@@ -99,5 +99,12 @@ export default { ...@@ -99,5 +99,12 @@ export default {
second >= 10 ? (second = second) : (second = '0' + second); //判断小于10的秒的情况 second >= 10 ? (second = second) : (second = '0' + second); //判断小于10的秒的情况
return year + '-' + month + '-' + date + ' ' + hour + ':' + minute + ':' + second; return year + '-' + month + '-' + date + ' ' + hour + ':' + minute + ':' + second;
} },
uploadAction: function(src='/api-plug/upload-img?requestProject=integral-mall') {
let url = window.location.origin + src;
if (window.location.origin.indexOf('localhost') != -1) {
url = `http://gicdev.demogic.com${src}`;
}
return url;
},
}; };
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
:disabled="isEdit" :disabled="isEdit"
:label="1" :label="1"
> >
全部会员 全部顾客
</el-radio> </el-radio>
<el-radio <el-radio
style="margin-right:0px" style="margin-right:0px"
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
:disabled="isEdit" :disabled="isEdit"
:label="3" :label="3"
> >
会员筛选 人群筛选
</el-radio> </el-radio>
</el-form-item> </el-form-item>
<el-form-item v-if="flashSaleForm.memberSearchType === 2"> <el-form-item v-if="flashSaleForm.memberSearchType === 2">
...@@ -1305,12 +1305,7 @@ export default { ...@@ -1305,12 +1305,7 @@ export default {
.disabled { .disabled {
pointer-events: none; pointer-events: none;
} }
.section {
background: #fff;
margin: 24px;
padding: 24px;
margin-bottom: 80px;
}
.w-300 { .w-300 {
width: 300px; width: 300px;
} }
......
...@@ -347,7 +347,7 @@ ...@@ -347,7 +347,7 @@
</el-button> </el-button>
</el-popover> </el-popover>
</el-form-item> </el-form-item>
<!-- <el-form-item label="会员筛选"> <!-- <el-form-item label="人群筛选">
<div style="margin-right:24px;"> <div style="margin-right:24px;">
<vue-gic-people :projectName="projectName" :useId="useId" :hasSearchData="hasSearchData" :sceneValue="sceneValue" ref="peopleFilter" :isAdd="operateType" @findFilter="findFilter" @getBackData="getBackData" @editHide="editHide" @editShow="editShow" @hideBtn="hideBtn"> </vue-gic-people> <vue-gic-people :projectName="projectName" :useId="useId" :hasSearchData="hasSearchData" :sceneValue="sceneValue" ref="peopleFilter" :isAdd="operateType" @findFilter="findFilter" @getBackData="getBackData" @editHide="editHide" @editShow="editShow" @hideBtn="hideBtn"> </vue-gic-people>
<div class="gic-people--button" v-show="toggleTag"> <div class="gic-people--button" v-show="toggleTag">
...@@ -1003,7 +1003,7 @@ export default { ...@@ -1003,7 +1003,7 @@ export default {
this.currentStock = res.data.result.virtualStock; this.currentStock = res.data.result.virtualStock;
this.couponForm.detailDescription = res.data.result.detailDescription; // 图文详情 this.couponForm.detailDescription = res.data.result.detailDescription; // 图文详情
// if (res.data.result.searchParams) { // if (res.data.result.searchParams) {
// this.searchParams = res.data.result.searchParams; //会员筛选 // this.searchParams = res.data.result.searchParams; //人群筛选
// } else { // } else {
// this.searchParams = {}; // this.searchParams = {};
// } // }
...@@ -1697,11 +1697,8 @@ export default { ...@@ -1697,11 +1697,8 @@ export default {
width: 100px; width: 100px;
} }
.section { .section {
background: #fff; padding:0 0 24px 0;
margin: 24px; margin-bottom:80px;
padding-bottom: 24px;
margin-bottom: 80px;
/* padding: 24px; */
} }
.section-content h3 { .section-content h3 {
...@@ -1859,9 +1856,7 @@ export default { ...@@ -1859,9 +1856,7 @@ export default {
.select-shop__right { .select-shop__right {
line-height: 28px !important; line-height: 28px !important;
} }
.section-content .pagination {
float: none !important;
}
.upload-list-box .el-upload--picture-card { .upload-list-box .el-upload--picture-card {
width: 104px; width: 104px;
height: 104px; height: 104px;
......
...@@ -54,16 +54,19 @@ ...@@ -54,16 +54,19 @@
<script> <script>
import errorList from '../../order/errorList'; import errorList from '../../order/errorList';
import getInputVal from '@/utils/common.js';
export default { export default {
props: { props: {
importCouponModal: { couponModal: {
type: Object, type: Object,
default () {
return {};
},
}, },
}, },
data () { data () {
return { return {
action: window.location.origin + '/api-integral-mall/upload-gift-card?requestProject=intergral-mall', action: getInputVal.uploadAction('/api-integral-mall/upload-gift-card?requestProject=intergral-mall'),
// action: 'http://gicdev.demogic.com/api-integral-mall/upload-gift-card?requestProject=intergral-mall',
headersUpload: { headersUpload: {
sign: '', sign: '',
}, },
...@@ -81,8 +84,17 @@ export default { ...@@ -81,8 +84,17 @@ export default {
list: [], list: [],
}, },
importMess: false, importMess: false,
importCouponModal: {},
}; };
}, },
watch: {
couponModal: {
handler (val) {
this.importCouponModal = val;
},
immediate: true,
},
},
methods: { methods: {
// 下载模板 // 下载模板
downloadFile () { downloadFile () {
......
...@@ -269,6 +269,30 @@ ...@@ -269,6 +269,30 @@
/> />
</el-select> </el-select>
<span class="tips">不符合此处会员等级卡的客户在小程序积分商城中不可见该礼品</span> <span class="tips">不符合此处会员等级卡的客户在小程序积分商城中不可见该礼品</span>
<!-- <div style="margin-right:24px;">
<vue-gic-people
v-bind="storeParams"
:projectName="projectName"
:triggerReset="true"
:useId="useId"
:hasSearchData="hasSearchData"
:sceneValue="sceneValue"
ref="peopleFilter"
@findFilter="findFilter"
@getBackData="getBackData"
@editHide="editHide"
@editShow="editShow"
@hideBtn="hideBtn"
/>
<div class="gic-people--button" v-show="toggleTag">
<el-button size="small" type="primary" @click="getData">
确 定
</el-button>
<el-button size="small" @click="cancelFilter">
取 消
</el-button>
</div>
</div> -->
</el-form-item> </el-form-item>
<el-form-item prop="ladder" v-if="specialOrder"> <el-form-item prop="ladder" v-if="specialOrder">
<el-checkbox-group v-model="giftForm.ladder" @change="changeladder" style="display:inline-block"> <el-checkbox-group v-model="giftForm.ladder" @change="changeladder" style="display:inline-block">
...@@ -359,7 +383,7 @@ ...@@ -359,7 +383,7 @@
</el-button> </el-button>
</el-popover> </el-popover>
</el-form-item> </el-form-item>
<!-- <el-form-item label="会员筛选"> <!-- <el-form-item label="人群筛选">
<div style="margin-right:24px;"> <div style="margin-right:24px;">
<vue-gic-people :projectName="projectName" :useId="useId" :hasSearchData="hasSearchData" :sceneValue="sceneValue" ref="peopleFilter" :isAdd="operateType" @findFilter="findFilter" @getBackData="getBackData" @editHide="editHide" @editShow="editShow" @hideBtn="hideBtn"> </vue-gic-people> <vue-gic-people :projectName="projectName" :useId="useId" :hasSearchData="hasSearchData" :sceneValue="sceneValue" ref="peopleFilter" :isAdd="operateType" @findFilter="findFilter" @getBackData="getBackData" @editHide="editHide" @editShow="editShow" @hideBtn="hideBtn"> </vue-gic-people>
<div class="gic-people--button" v-show="toggleTag"> <div class="gic-people--button" v-show="toggleTag">
...@@ -958,16 +982,14 @@ export default { ...@@ -958,16 +982,14 @@ export default {
creatorId: '', // 权限id creatorId: '', // 权限id
// // 人群筛选器 // // 人群筛选器
// // 可传参数 // // 可传参数
// // projectName: 'integral-mall', // 当前项目名 // projectName: 'integral-mall', // 当前项目名
// getSaveData: '', getSaveData: '',
// sceneValue: 'member', // 场景值 sceneValue: 'member', // 场景值
// useId: '', // 模板id useId: '', // 模板id
// hasSearchData: '', // 当前页回显的数据(接口返回) hasSearchData: '', // 当前页回显的数据(接口返回)
// operateType: true, // 编辑的时候是false 新增是true 例如列表筛选是开始true 编辑改成false operateType: true, // 编辑的时候是false 新增是true 例如列表筛选是开始true 编辑改成false
// toggleTag: false, // 控制(确认取消)按钮显示的参数,仅供参考,可自行修改 toggleTag: false, // 控制(确认取消)按钮显示的参数,仅供参考,可自行修改
// saveTag: false, // 控制(保存)按钮显示的参数,仅供参考,可自行修改 searchParams: {}, // 查询数据数据
// searchParams: {}, //查询数据数据
// responseParams: [] //回显的数据
useNewStoreWidget: 1, // 1新的卡券门店组件 ,0老的门店组件 useNewStoreWidget: 1, // 1新的卡券门店组件 ,0老的门店组件
pickUpPointList: [], // 门店自提列表 pickUpPointList: [], // 门店自提列表
// 新版门店卡券选择器 // 新版门店卡券选择器
...@@ -1295,6 +1317,8 @@ export default { ...@@ -1295,6 +1317,8 @@ export default {
}, },
getDisGroupList (arr) { getDisGroupList (arr) {
console.log('methods---groupIdDisableList====>');
console.log(arr);
this.groupIdDisableList = arr; this.groupIdDisableList = arr;
// console.log(this.mallProId); // console.log(this.mallProId);
// if (this.giftId !== '-1') { // if (this.giftId !== '-1') {
...@@ -1445,16 +1469,11 @@ export default { ...@@ -1445,16 +1469,11 @@ export default {
} }
}); });
// if (res.data.result.searchParams) { // if (res.data.result.searchParams) {
// this.searchParams = res.data.result.searchParams; //会员筛选 // this.searchParams = res.data.result.searchParams; //人群筛选
// } else { // } else {
// this.searchParams = {}; // this.searchParams = {};
// } // }
// if (res.data.result.responseParams) {
// this.responseParams = res.data.result.responseParams;
// } else {
// this.responseParams = [];
// }
// this.useId = res.data.result.integralMallProId; // this.useId = res.data.result.integralMallProId;
this.hasSearchData = res.data.result.searchParams; this.hasSearchData = res.data.result.searchParams;
this.giftForm.gradeType = res.data.result.gradeType; this.giftForm.gradeType = res.data.result.gradeType;
...@@ -1479,6 +1498,7 @@ export default { ...@@ -1479,6 +1498,7 @@ export default {
gradeName: item.gradeName, gradeName: item.gradeName,
}); });
}); });
console.log(this.ladderMemberGrade);
} }
}); });
this.giftForm.proReferId = res.data.result.proReferId; this.giftForm.proReferId = res.data.result.proReferId;
...@@ -1545,6 +1565,8 @@ export default { ...@@ -1545,6 +1565,8 @@ export default {
if (this.sendChildData.storeType === 1) { if (this.sendChildData.storeType === 1) {
const arr = res.data.result.storeGroupIds.split(','); const arr = res.data.result.storeGroupIds.split(',');
// console.log(222, this.groupIdDisableList); // console.log(222, this.groupIdDisableList);
console.log('groupIdDisableList====>');
console.log(this.groupIdDisableList);
for (let i = 0; i < arr.length; i++) { for (let i = 0; i < arr.length; i++) {
if (this.groupIdDisableList.indexOf(arr[i]) !== -1) { if (this.groupIdDisableList.indexOf(arr[i]) !== -1) {
// 存在 // 存在
...@@ -1639,7 +1661,6 @@ export default { ...@@ -1639,7 +1661,6 @@ export default {
} else { } else {
this.submitSkuJson = []; this.submitSkuJson = [];
} }
// 获取头部 // 获取头部
this.skuHeaderList = []; this.skuHeaderList = [];
...@@ -1744,7 +1765,7 @@ export default { ...@@ -1744,7 +1765,7 @@ export default {
limitProCodeType () { limitProCodeType () {
const reg = /^[0-9a-zA-Z\-]+?$/; const reg = /^[0-9a-zA-Z\-]+?$/;
if (!reg.test(this.giftForm.proCode)) { if (!reg.test(this.giftForm.proCode)) {
this.$message.error('请输入数字或者字母或-'); this.$message.error('请输入数字或者字母');
this.giftForm.proCode = ''; this.giftForm.proCode = '';
} else { } else {
// 校验是否重复给出提示 // 校验是否重复给出提示
...@@ -1887,6 +1908,7 @@ export default { ...@@ -1887,6 +1908,7 @@ export default {
} else { } else {
this.memberGradeList = []; this.memberGradeList = [];
} }
console.log(this.memberGradeList);
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
...@@ -2664,7 +2686,7 @@ export default { ...@@ -2664,7 +2686,7 @@ export default {
}, },
// 检测是否开启 erp商品兑换接口 // 检测是否开启 erp商品兑换接口
getErpGoodsFlag() { getErpGoodsFlag() {
request.get('/api-integral-mall/get-erp-config').then(res => { request.get('/api-integral-mall/get-config').then(res => {
if (res.data.errorCode === 0) { if (res.data.errorCode === 0) {
const result = res.data.result || {}; const result = res.data.result || {};
this.$store.commit('mutations_erpGoodsFlag', result.goodsStockSync || 0); this.$store.commit('mutations_erpGoodsFlag', result.goodsStockSync || 0);
...@@ -2672,51 +2694,40 @@ export default { ...@@ -2672,51 +2694,40 @@ export default {
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
}); });
},
//人群筛选器使用的方法
// 父组件调用子组件方法,触发父组件事件
getData() {
this.$refs.peopleFilter.confirmSet();
},
// 子组件触发父组件事件,返回过滤条件数据
findFilter(value) {
console.log(value)
this.searchParams = value;
},
// 取消
cancelFilter() {
this.$refs.peopleFilter.cancelSet();
},
// 获取需要回显的数据, 供保存时候使用
getBackData(val) {
this.getSaveData = val;
},
// 显示编辑,保存按钮隐藏,确认按钮显示 (子组件会调用)
editShow() {
this.toggleTag = true;
},
// 显示保存按钮,隐藏确认按钮显示 (子组件会调用)
editHide() {
this.toggleTag = false;
},
// 隐藏保存按钮和确认按钮 (子组件会调用)
// 传个参数给父组件 来查数据
hideBtn(refresh) {
if (refresh === 0) {
this.toggleTag = false;
}
} }
// //人群筛选器使用的方法
// // 父组件调用子组件方法,触发父组件事件
// getData() {
// var that = this;
// that.$refs.peopleFilter.confirmSet();
// // that.usePeopleFilter = true;
// },
// // 子组件触发父组件事件,返回过滤条件数据
// findFilter(value) {
// // var that = this;
// this.searchParams = value;
// },
// // 取消
// cancelFilter() {
// var that = this;
// that.$refs.peopleFilter.cancelSet();
// },
// // 获取需要回显的数据, 供保存时候使用
// getBackData(val) {
// this.responseParams = val;
// this.getSaveData = val;
// },
// // 显示编辑,保存按钮隐藏,确认按钮显示 (子组件会调用)
// editShow() {
// var that = this;
// that.toggleTag = true;
// that.saveTag = false;
// },
// // 显示保存按钮,隐藏确认按钮显示 (子组件会调用)
// editHide() {
// var that = this;
// that.toggleTag = false;
// that.saveTag = true;
// },
// // 隐藏保存按钮和确认按钮 (子组件会调用)
// // 传个参数给父组件 来查数据
// hideBtn(refresh) {
// if (refresh === 0) {
// this.memberSearchStr = -1;
// this.toggleTag = false;
// // 查数据的方法
// // this.getList();
// }
// }
}, },
components: { components: {
Treeselect, Treeselect,
...@@ -2734,10 +2745,8 @@ export default { ...@@ -2734,10 +2745,8 @@ export default {
width: 100px; width: 100px;
} }
.section { .section {
background: #fff; padding:0 0 24px 0;
margin: 24px; margin-bottom:80px;
padding-bottom: 24px;
margin-bottom: 80px;
} }
.section-content h3 { .section-content h3 {
height: 55px; height: 55px;
......
<template>
<div class="mall-section-container">
<div class="mall-content-section">
<div class="mall-content-title">
<el-breadcrumb separator="/">
<el-breadcrumb-item :to="{ path: '' }">
<a href="/report/#/memberSummary">首页</a>
</el-breadcrumb-item>
<el-breadcrumb-item>积分商城</el-breadcrumb-item>
<el-breadcrumb-item>商品</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/ruleList' }">
上架规则
</el-breadcrumb-item>
<el-breadcrumb-item>{{ breadcrumbTitle }}</el-breadcrumb-item>
</el-breadcrumb>
<h3>
<span>{{ breadcrumbTitle }}</span>
</h3>
</div>
<div class="section">
<ruleInfo />
</div>
</div>
</div>
</template>
<script>
import ruleInfo from '@/components/ruleDetail.vue';
export default {
components: {
ruleInfo,
},
data () {
return {
breadcrumbTitle: '新建上架规则',
};
},
mounted () {
const obj = {
edit: '编辑上架规则',
add: '新建上架规则',
copy: '复制上架规则',
};
this.breadcrumbTitle = obj[this.$route.meta.type];
},
};
</script>
<style scoped>
.gic-people--button{
background: #f2f3f4;
padding: 0 0 20px 124px;
}
</style>
...@@ -16,10 +16,8 @@ ...@@ -16,10 +16,8 @@
</div> </div>
<div class="section"> <div class="section">
<div style="margin-bottom:22px"> <div style="margin-bottom:22px">
<div class="infoTips"> <div class="infoTips" style="width:auto;">
<div class="infoTipsTitle"> <i class="el-icon-info infoTipsIcon" />
<i class="el-icon-info" style="color:#1890FF" /> 温馨提示
</div>
<div class="infoTipsContent"> <div class="infoTipsContent">
<p>1.使用该功能请在常规设置中关闭“无库存自动下架”的设置项;</p> <p>1.使用该功能请在常规设置中关闭“无库存自动下架”的设置项;</p>
<p>2.若礼品增加库存后将清空之前的统计数;</p> <p>2.若礼品增加库存后将清空之前的统计数;</p>
...@@ -233,11 +231,7 @@ export default { ...@@ -233,11 +231,7 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.section {
background: #fff;
margin: 24px;
padding: 24px;
}
.w-280 { .w-280 {
width: 280px; width: 280px;
} }
...@@ -268,20 +262,5 @@ export default { ...@@ -268,20 +262,5 @@ export default {
color: #909399; color: #909399;
font-size: 13px; font-size: 13px;
} }
.infoTips {
margin-bottom: 20px;
background: #e6f7ff;
border-radius: 4px;
border: 1px solid #91d5ff;
padding: 13px 16px;
color: #606266;
}
.infoTipsTitle {
font-size: 14px;
line-height: 22px;
}
.infoTipsContent {
line-height: 22px;
font-size: 13px;
}
</style> </style>
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
</template> </template>
<script> <script>
import bus from '../assets/eventBus.js'; import bus from '../assets/eventBus.js';
import request from '@/service/request.js';
export default { export default {
components: {}, components: {},
data () { data () {
...@@ -51,8 +52,16 @@ export default { ...@@ -51,8 +52,16 @@ export default {
// 刷新左侧菜单 // 刷新左侧菜单
that.$refs.leftmenu.handleSelect(key); that.$refs.leftmenu.handleSelect(key);
}); });
this.getRuleMemberFilterClose();
}, },
methods: { methods: {
// 检测是否 关闭人群筛选器
getRuleMemberFilterClose () {
request.get('/api-integral-mall/get-config').then(res => {
const result = res.data.result || {};
this.$store.commit('mutations_ruleMemberFilterClose', result.ruleMemberFilterClose);
});
},
// 处理路由跳转 // 处理路由跳转
toRouterView (val) { toRouterView (val) {
const that = this; const that = this;
......
...@@ -663,11 +663,7 @@ export default { ...@@ -663,11 +663,7 @@ export default {
} }
} }
} }
.section {
background: #fff;
margin: 24px;
padding: 24px;
}
.goods-list-content { .goods-list-content {
margin: 0 25px 25px 25px; margin: 0 25px 25px 25px;
padding: 22px 24px 24px 24px; padding: 22px 24px 24px 24px;
......
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
<span v-if="scope.row.status === 11">待付款</span> <span v-if="scope.row.status === 11">待付款</span>
<span v-if="scope.row.status === 1">待发货</span> <span v-if="scope.row.status === 1">待发货</span>
<span v-if="scope.row.status === 3">已发货</span> <span v-if="scope.row.status === 3">已发货</span>
<span v-if="scope.row.status === 4">交易完成</span> <span v-if="scope.row.status === 4">交易完成{{ scope.row.overFlag==1?'(超期)':'' }}</span>
<span v-if="scope.row.status <= 0">交易关闭</span> <span v-if="scope.row.status <= 0">交易关闭</span>
</p> </p>
<p style="line-height:18px"> <p style="line-height:18px">
...@@ -1153,11 +1153,6 @@ export default { ...@@ -1153,11 +1153,6 @@ export default {
} }
</style> </style>
<style scoped> <style scoped>
.section {
background: #fff;
margin: 24px;
padding: 24px;
}
.goods-list-content { .goods-list-content {
margin: 0 25px 25px 25px; margin: 0 25px 25px 25px;
......
...@@ -562,11 +562,7 @@ export default { ...@@ -562,11 +562,7 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.section {
background: #fff;
margin: 24px;
padding: 24px;
}
.m-r-10 { .m-r-10 {
margin-right: 10px; margin-right: 10px;
} }
......
...@@ -206,11 +206,7 @@ export default { ...@@ -206,11 +206,7 @@ export default {
.mall-section-container { .mall-section-container {
padding-bottom: 58px; padding-bottom: 58px;
} }
.section {
background: #fff;
margin: 24px;
padding: 24px;
}
.icon-type-title { .icon-type-title {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -105,6 +105,15 @@ ...@@ -105,6 +105,15 @@
自提设置 自提设置
</el-button> </el-button>
<el-button <el-button
plain
@click="multipleClose()"
style="margin:0 10px 0 0"
v-if="$getButtonLimit($buttonCode.deliverSetBatchDeActive)"
:limit-code="$buttonCode.deliverSetBatchDeActive"
>
<i style="margin-right:5px" />批量失效
</el-button>
<el-button
type="primary" type="primary"
@click="addStore('-1')" @click="addStore('-1')"
style="margin:0 " style="margin:0 "
...@@ -149,6 +158,22 @@ ...@@ -149,6 +158,22 @@
> >
编辑 编辑
</el-button> </el-button>
<el-button
type="text"
v-if="scope.row.isValid==1&&$getButtonLimit($buttonCode.deliverSetDeActive)"
@click="multipleClose(scope.row)"
:limit-code="$buttonCode.deliverSetDeActive"
>
失效
</el-button>
<el-button
type="text"
@click="open(scope.row)"
v-if="scope.row.isValid !== 1&&$getButtonLimit($buttonCode.deliverSetActive)"
:limit-code="$buttonCode.deliverSetActive"
>
启用
</el-button>
<el-popover <el-popover
placement="top" placement="top"
width="160" width="160"
...@@ -226,7 +251,7 @@ import request from '../../service/request.js'; ...@@ -226,7 +251,7 @@ import request from '../../service/request.js';
// import getInputVal from '../../../utils/common.js'; // import getInputVal from '../../../utils/common.js';
// import stockModal from '../../../components/getSkuList'; // import stockModal from '../../../components/getSkuList';
import pickedAuto from './pickedAuto'; import pickedAuto from './pickedAuto';
import { alertInfo } from '../../utils/user.js';
export default { export default {
components: { components: {
pickedAuto, pickedAuto,
...@@ -253,7 +278,6 @@ export default { ...@@ -253,7 +278,6 @@ export default {
}, },
pickedVisible: false, pickedVisible: false,
creatorLoading: false, creatorLoading: false,
enableAccessControl: false,
// 导出 // 导出
dialogVisible: false, dialogVisible: false,
excelUrl: '/api-integral-mall/pick-up-points-excel', excelUrl: '/api-integral-mall/pick-up-points-excel',
...@@ -262,18 +286,6 @@ export default { ...@@ -262,18 +286,6 @@ export default {
}; };
}, },
created () { created () {
this.getAccessControl();
// export const alertInfo = () => {
// Notification({
// title: '温馨提示',
// type: 'warning',
// message: '在此页面进行修改、删除等操作将更改本商户下所有的配置 请谨慎进行'
// });
// }
this.enableAccessControl = localStorage.getItem('enableAccessControl') != 'false';
if (this.enableAccessControl) {
alertInfo();
}
this.getStatus(); this.getStatus();
}, },
methods: { methods: {
...@@ -311,23 +323,6 @@ export default { ...@@ -311,23 +323,6 @@ export default {
} }
}); });
}, },
getAccessControl () {
const params = {
requestProject: 'integral-mall',
};
request.get('/api-auth/get-login-user-info', { params }).then(res => {
if (res.data.errorCode === 0) {
if (res.data.result.enableAccessControl) {
this.enableAccessControl = true;
} else {
this.enableAccessControl = false;
}
window.localStorage.setItem('enableAccessControl', this.enableAccessControl);
} else {
this.$message.error(res.data.message);
}
});
},
getSearchList () { getSearchList () {
this.currentPage = 1; this.currentPage = 1;
this.getList(); this.getList();
...@@ -458,7 +453,31 @@ export default { ...@@ -458,7 +453,31 @@ export default {
} }
}); });
}, },
multipleClose (row) {
if (!row && this.selectList.length < 1) {
this.$message.error('未选择任何自提点,不能操作批量失效');
return;
}
const len = row ? 1 : this.selectList.length;
this.$confirm(`您已选择${len}个自提点,是否确认操作批量失效?操作后这些自提点将不能用于门店自提商品的自提`, '提示', {
type: 'warning',
}).then(_ => {
this.loading = true;
let data = {};
if (row) {
data = { integralMallPickUpPointIdList: [row.integralMallPickUpPointId] };
} else {
const integralMallPickUpPointIdList = this.selectList.map(item => item.integralMallPickUpPointId);
data = { integralMallPickUpPointIdList };
}
request.post('/api-integral-mall/unvalid-pick-up-point', data).then(res => {
this.$message.success('失效成功');
this.getList();
}).finally(_ => {
this.loading = false;
});
});
},
// 新增 // 新增
addStore () { addStore () {
this.$router.push({ name: 'addDeliver', query: { integralMallPickUpPointId: '-1' } }); this.$router.push({ name: 'addDeliver', query: { integralMallPickUpPointId: '-1' } });
...@@ -467,6 +486,12 @@ export default { ...@@ -467,6 +486,12 @@ export default {
goAdd (item) { goAdd (item) {
this.$router.push({ name: 'editDeliver', query: { integralMallPickUpPointId: item.integralMallPickUpPointId } }); this.$router.push({ name: 'editDeliver', query: { integralMallPickUpPointId: item.integralMallPickUpPointId } });
}, },
open (row) {
request.post('/api-integral-mall/valid-pick-up-point', { integralMallPickUpPointId: row.integralMallPickUpPointId }).then(res => {
this.$message.success('启用成功,该自提点可用于门店自提商品的自提');
this.getList();
});
},
// 导出数据 // 导出数据
exportData () { exportData () {
const params = { const params = {
......
...@@ -215,38 +215,42 @@ ...@@ -215,38 +215,42 @@
</el-radio> </el-radio>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="买家自提时段" required /> <el-form-item label="买家自提时段" required>
<div style="margin-top:-45px;"> <div class="timeRangeList">
<el-form-item <!-- <div class="tips" style="margin-left: 0;">
v-for="(v, i) in form.timeRangeList" 当自提时间段的开始时间小于当前时间时,用户可选,因为商家需要在此开始时间之前备好货品
:key="i" </div> -->
:prop="'timeRangeList.' + i + '.timeRange'" <el-form-item
:rules="[{ validator: validateTime, trigger: 'change' }]" v-for="(v, i) in form.timeRangeList"
> :key="i"
<el-time-picker :prop="'timeRangeList.' + i + '.timeRange'"
:clearable="clearableBtn" :rules="[{ validator: validateTime, trigger: 'change' }]"
class="w-280" >
format="HH:mm" <el-time-picker
is-range :clearable="clearableBtn"
v-model="v.timeRange" class="w-280"
range-separator="至" format="HH:mm"
start-placeholder="开始时间" is-range
end-placeholder="结束时间" v-model="v.timeRange"
placeholder="选择时间范围" range-separator="至"
@change="value => limitTimeSelect(i, value)" start-placeholder="开始时间"
@focus="value => blurLimitTimeSelect(i, value)" end-placeholder="结束时间"
/> placeholder="选择时间范围"
<el-button v-if="i" type="text" @click="deleteTime(i)"> @change="value => limitTimeSelect(i, value)"
删除 @focus="value => blurLimitTimeSelect(i, value)"
</el-button> />
<span v-if="!i" style="font-size:12px;color:#909399;line-height:12px;margin-left:10px;">请使用24小时制输入时间,格式如11:00至14:30</span> <el-button v-if="i" type="text" @click="deleteTime(i)">
</el-form-item> 删除
<p> </el-button>
<el-button type="text" style="margin:0px 0 10px 170px" @click="addTime"> <span v-if="!i" style="font-size:12px;color:#909399;line-height:12px;margin-left:10px;">请使用24小时制输入时间,格式如11:00至14:30</span>
添加时间段 </el-form-item>
</el-button> <p>
</p> <el-button type="text" style="margin:0px 0 10px 170px" @click="addTime">
</div> 添加时间段
</el-button>
</p>
</div>
</el-form-item>
</div> </div>
</div> </div>
<div class="confim-btn" :style="{ width: fixedWidth + 'px' }"> <div class="confim-btn" :style="{ width: fixedWidth + 'px' }">
...@@ -828,7 +832,7 @@ export default { ...@@ -828,7 +832,7 @@ export default {
}, },
// 检测是否开启 erp商品兑换接口 // 检测是否开启 erp商品兑换接口
getErpGoodsFlag () { getErpGoodsFlag () {
request.get('/api-integral-mall/get-erp-config').then(res => { request.get('/api-integral-mall/get-config').then(res => {
if (res.data.errorCode === 0) { if (res.data.errorCode === 0) {
const result = res.data.result || {}; const result = res.data.result || {};
this.$store.commit('mutations_erpGoodsFlag', result.goodsStockSync || 0); this.$store.commit('mutations_erpGoodsFlag', result.goodsStockSync || 0);
...@@ -837,10 +841,11 @@ export default { ...@@ -837,10 +841,11 @@ export default {
} }
}); });
}, },
}, },
}; };
</script> </script>
<style scoped> <style lang="scss" scoped>
.section { .section {
background: #fff; background: #fff;
margin: 24px; margin: 24px;
...@@ -898,6 +903,13 @@ export default { ...@@ -898,6 +903,13 @@ export default {
/* .time-range .el-date-editor .el-range__close-icon { /* .time-range .el-date-editor .el-range__close-icon {
display: none !important; display: none !important;
} */ } */
.timeRangeList {
margin-top: 5px;
/deep/ .el-form-item{
margin-bottom:22px;
margin-left: 0;
}
}
</style> </style>
<style> <style>
.shop-content .dm-store__inputtag--total { .shop-content .dm-store__inputtag--total {
......
...@@ -615,7 +615,7 @@ export default { ...@@ -615,7 +615,7 @@ export default {
}, },
// 检测是否开启 erp商品兑换接口 // 检测是否开启 erp商品兑换接口
getErpGoodsFlag () { getErpGoodsFlag () {
request.get('/api-integral-mall/get-erp-config').then(res => { request.get('/api-integral-mall/get-config').then(res => {
if (res.data.errorCode === 0) { if (res.data.errorCode === 0) {
const result = res.data.result || {}; const result = res.data.result || {};
this.$store.commit('mutations_erpGoodsFlag', result.goodsStockSync || 0); this.$store.commit('mutations_erpGoodsFlag', result.goodsStockSync || 0);
......
...@@ -178,11 +178,7 @@ export default { ...@@ -178,11 +178,7 @@ export default {
.w-280 { .w-280 {
width: 280px; width: 280px;
} }
.section {
background: #fff;
margin: 24px;
padding: 24px;
}
.header-top { .header-top {
/* margin: 15px 0 22px 0; */ /* margin: 15px 0 22px 0; */
} }
......
...@@ -218,10 +218,8 @@ input:focus { ...@@ -218,10 +218,8 @@ input:focus {
.pagination{ .pagination{
float:right; float:right;
} }
.w-260{
width:260px; .user-header-pop {
}
.user-header-pop {
min-width: 95px; min-width: 95px;
} }
.el-popover.user-header-pop { .el-popover.user-header-pop {
...@@ -261,6 +259,11 @@ input:focus { ...@@ -261,6 +259,11 @@ input:focus {
.mall-content-title h3 i:hover{ .mall-content-title h3 i:hover{
color:#909399; color:#909399;
} }
.section {
background: #fff;
margin: 24px;
padding: 24px;
}
/*编辑按钮*/ /*编辑按钮*/
.el-icon-edit{ .el-icon-edit{
...@@ -346,21 +349,6 @@ input[type="number"] { ...@@ -346,21 +349,6 @@ input[type="number"] {
-moz-appearance: textfield; -moz-appearance: textfield;
} }
/* .el-input__inner{
line-height:0px!important;
}
.el-input__inner::-webkit-input-placeholder {
line-height:normal!important;
}
::-moz-placeholder {
line-height:normal!important;
}
:-ms-input-placeholder {
line-height:normal!important;
} */
.icon-xinxixianshi{ .icon-xinxixianshi{
color: #909399; color: #909399;
font-size: 14px; font-size: 14px;
...@@ -374,4 +362,69 @@ input[type="number"] { ...@@ -374,4 +362,69 @@ input[type="number"] {
fill: currentColor; fill: currentColor;
overflow: hidden; overflow: hidden;
} }
/** 宽度*/
.w-260{
width:260px;
}
.w-280 {
width: 280px;
}
.w-300 {
width: 300px;
}
.w-140 {
width: 140px;
}
.w-160 {
width: 160px;
}
.w-100 {
width: 100px;
}
.w-180 {
width: 180px;
}
/** 提示 */
.infoTips {
display: flex;
padding: 5px 16px;
align-items: baseline;
color: #606266;
background: #e6f7ff;
border-radius: 2px;
margin-bottom: 20px;
width: fit-content;
}
.infoTipsIcon {
width: 12px;
color:#1890FF;
font-size: 12px;
margin-right: 9px;
}
.infoTipsContent {
line-height: 22px;
font-size: 12px;
color:#303133 ;
}
.infoTips_waring{
background: #FCF6F1;
color: #FA8C16;
}
/** 搜索条件 */
.search-wrap{
display: flex;
justify-content: space-around;
align-items: flex-start;
margin-bottom: 20px;
}
.table-page-search-wrapper{
flex: 1;
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.tips-content {
position: absolute;
left: -10px;
}
\ No newline at end of file
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