Commit 4a0ba9fa by damodmg

3.0权限代码合并

parent ac4e30dd
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.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><title>积分商城</title><link href=./static/css/app.6f4a2bc4c84851a03af3d14e1b17f54f.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.30.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.05.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.06.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.26.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.bf93010d9b9b1322a27b.js></script><script type=text/javascript src=./static/js/app.a8c8919e53c57af8b13c.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.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><title>积分商城</title><link href=./static/css/app.73613e52dafd6433cfec18cf9b523f62.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.30.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.17.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.06.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.26.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.3c5834cc437c7b2d524e.js></script><script type=text/javascript src=./static/js/app.2abe2385b6e3d3f8ebf7.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -10,21 +10,21 @@
</head>
<body>
<div id="app"></div>
<!-- 库引用cdn -->
<script src='//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js'></script>
<script src="//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js"></script>
<script src="//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js"></script>
<script src="//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js"></script>
<!-- 组件引用cdn -->
<script src="//web-1251519181.file.myqcloud.com/components/header.2.0.30.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.11.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js"></script>
<script src='//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.05.js'></script>
<script src='//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.17.js'></script>
<script src="//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js"></script>
<!-- <script src="//web-1251519181.file.myqcloud.com/components/member-info.1.0.01.js"></script> -->
<script src="//web-1251519181.file.myqcloud.com/components/card.2.0.06.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/export-excel.2.0.11.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/people.2.0.26.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js"></script>
<!-- <script src="//web-1251519181.cos.ap-shanghai.myqcloud.com/components/space.2.0.00.js"></script> -->
<!-- built files will be auto injected -->
</body>
......
// import Vue from 'vue';
import { Notification, MessageBox } from 'element-ui';
export const alertInfo = () => {
Notification({
title: '温馨提示',
type: 'warning',
message: '在此页面进行修改、删除等操作将更改本商户下所有的配置 请谨慎进行'
});
};
export const confirmInfo = (fn, type) => {
MessageBox.confirm(' 在此页面进行修改、删除等操作将更改本商户下所有的配置 是否确认修改!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
fn(type);
})
.catch(() => {
//
});
};
......@@ -24,6 +24,9 @@
<el-option label="已下架" :value="1"></el-option>
</el-select>
</div>
<div class="search-item">
<el-checkbox v-model="showSelfStatus" label="仅看本人" border @change="getListCurr" v-if="showFlag"></el-checkbox>
</div>
</div>
<div class="fr">
<div class="search-item">
......@@ -37,8 +40,8 @@
</div>
</div>
<el-table ref="multipleTable" :data="tableDate" style="width: 100%" v-loading="loading" @sort-change="sortChange" @selection-change="handleSelectAll">
<el-table-column type="selection" width="50"> </el-table-column>
<el-table-column label="礼品信息" min-width="220px">
<el-table-column type="selection" width="50" :selectable="selectInit"> </el-table-column>
<el-table-column label="礼品信息" min-width="260px">
<template slot-scope="scope">
<div class="gift-info">
<!-- <p v-if="scope.row.cardType === 2" style="display:inline-block">
......@@ -63,17 +66,17 @@
<el-table-column prop="integralCost" label="积分费用" sortable="custom" min-width="110px">
<template slot-scope="scope">
<!-- <editInfo :popoverType='1' :popoverNum="scope.row.integralCost"><editInfo> -->
<p class="intergral-edit">{{ scope.row.integralCost }}积分<i class="el-icon-edit" @click="handleTable(scope.row, 1)"></i></p>
<p class="intergral-edit">{{ scope.row.integralCost }}积分<i class="el-icon-edit" @click="handleTable(scope.row, 1)" v-if="scope.row.canEdit"></i></p>
</template>
</el-table-column>
<el-table-column prop="cashCost" label="现金费用" sortable="custom" min-width="110px">
<template slot-scope="scope">
<p class="intergral-edit">{{ scope.row.cashCost }}<i class="el-icon-edit" @click="handleTable(scope.row, 2)"></i></p>
<p class="intergral-edit">{{ scope.row.cashCost }}<i class="el-icon-edit" @click="handleTable(scope.row, 2)" v-if="scope.row.canEdit"></i></p>
</template>
</el-table-column>
<el-table-column prop="sortCost" label="库存" sortable="custom">
<template slot-scope="scope">
<p class="intergral-edit">{{ scope.row.virtualStock }}<i class="el-icon-edit" @click="handleTable(scope.row, 3)"></i></p>
<p class="intergral-edit">{{ scope.row.virtualStock }}<i class="el-icon-edit" @click="handleTable(scope.row, 3)" v-if="scope.row.canEdit"></i></p>
</template>
</el-table-column>
<el-table-column prop="sortTimes" label="兑换次数" sortable="custom" min-width="110px">
......@@ -88,9 +91,12 @@
<p>{{ getSeconds(scope.row.createTime) }}</p>
</template>
</el-table-column>
<el-table-column prop="creatorName" label="创建人" min-width="110px" v-if="openFlag">
<template slot-scope="scope">{{ scope.row.creatorName ? scope.row.creatorName : '--' }}</template>
</el-table-column>
<el-table-column prop="sort" label="序号" sortable="custom" min-width="140px" :render-header="renderHeader">
<template slot-scope="scope">
<p v-if="!scope.row.editStatus" class="edit-number intergral-edit">{{ scope.row.sort }}<i class="el-icon-edit" @click="editNumber(scope.row)"></i></p>
<p v-if="!scope.row.editStatus" class="edit-number intergral-edit">{{ scope.row.sort }}<i class="el-icon-edit" @click="editNumber(scope.row)" v-if="scope.row.canEdit"></i></p>
<div v-if="scope.row.editStatus">
<el-input v-if="scope.row.editStatus" v-model="scope.row.sort" placeholder="" size="mini" class="w-180" @blur="value => limitSort(value, scope.row)" style="width:60px"></el-input>
<span class="operate-span" @click="editNumSubmit(scope.row)">确定</span>
......@@ -102,18 +108,21 @@
<el-table-column label="操作" min-width="180px">
<template slot-scope="scope">
<div>
<el-button type="text" @click="getLink(scope.row)">推广</el-button>
<el-button type="text" v-if="scope.row.status === 2" @click="deleteList(scope.row, 1)">下架</el-button>
<el-button type="text" v-if="scope.row.status === 1" @click="deleteList(scope.row, 2)">上架</el-button>
<el-button type="text" @click="getLink(scope.row)" v-if="scope.row.canEdit">推广</el-button>
<el-button type="text" v-if="scope.row.status === 2 && scope.row.canEdit" @click="deleteList(scope.row, 1)">下架</el-button>
<el-button type="text" v-if="scope.row.status === 1 && scope.row.canEdit" @click="deleteList(scope.row, 2)">上架</el-button>
<el-button type="text" @click="goAdd(scope.row)">编辑</el-button>
<el-popover placement="top" width="160" v-model="scope.row.visible2" style="margin-left:8px">
<dm-delete @confirm="deleteList(scope.row, 0, scope.$index)" tips="确定删除该商品吗?">
<el-button type="text" v-if="scope.row.canEdit">删除</el-button>
</dm-delete>
<!-- <el-popover placement="top" width="160" v-model="scope.row.visible2" style="margin-left:8px">
<p style="line-height:1.5;padding: 10px 10px 20px;">确定删除该商品吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteList(scope.row, 0, scope.$index)">确定</el-button>
</div>
<el-button slot="reference" type="text">删除</el-button>
</el-popover>
<el-button slot="reference" type="text" v-if="scope.row.canEdit">删除</el-button>
</el-popover> -->
</div>
</template>
</el-table-column>
......@@ -160,6 +169,9 @@ export default {
shelf: '', //上下架状态
goodsType: '', //批量操作
tableDate: [],
showSelfStatus: false,
showFlag: false,
openFlag: true,
currentPage: 1,
pageSizes: [20, 40, 60, 80],
pageSize: 20,
......@@ -198,12 +210,23 @@ export default {
this.sortColumn = this.couponListObj.sortColumn;
localStorage.removeItem('couponListObj'); //使用完就清除缓存
}
this.getStatus();
this.getList();
},
methods: {
renderHeader(h, { column, $index }, index) {
return h('span', {}, [h('span', {}, '序号'), h('el-popover', { props: { placement: 'top-start', width: '200', trigger: 'hover', content: '礼品在小程序端的展示排序,序号越大,排序越靠前。' } }, [h('i', { slot: 'reference', class: 'iconfont icon-xinxixianshi' }, '')])]);
},
getStatus() {
request.post('/api-integral-mall/is-show-self ').then(res => {
if (res.data.errorCode === 0) {
this.showFlag = res.data.result.showFlag;
this.openFlag = res.data.result.openFlag;
} else {
this.$message.error(res.data.message);
}
});
},
//跳转到兑换记录
goRecord(item) {
this.$router.push({ name: 'couponExchange', query: { integralMallProId: item.integralMallProId } });
......@@ -216,7 +239,8 @@ export default {
sortType: this.sortType,
sortColumn: this.sortColumn,
giftName: this.searchValue,
shelf: this.shelf ? this.shelf : -1 //上架状态
shelf: this.shelf ? this.shelf : -1, //上架状态
showSelfFlag: this.showSelfStatus ? 1 : 0
};
this.loading = true;
request.post('/api-integral-mall/page-cards', qs.stringify(params)).then(res => {
......@@ -380,7 +404,7 @@ export default {
},
// 新增礼品
addCoupon() {
this.$router.push({ name: 'couponInfo', query: { giftId: '-1', coupCardId: '-1' } });
this.$router.push({ name: 'couponInfo', query: { giftId: '-1', coupCardId: '-1', canEdit: true } });
},
// 编辑
goAdd(item) {
......@@ -394,7 +418,7 @@ export default {
sortColumn: this.sortColumn
};
window.localStorage.setItem('couponListObj', JSON.stringify(this.couponListObj));
this.$router.push({ name: 'couponInfo', query: { giftId: item.integralMallProId, coupCardId: item.proReferId } });
this.$router.push({ name: 'couponInfo', query: { giftId: item.integralMallProId, coupCardId: item.proReferId, canEdit: item.canEdit } });
},
//编辑序号
editNumber(item) {
......@@ -448,6 +472,9 @@ export default {
this.editInfoModal.mallProId = item.integralMallProId;
this.editInfoModal.dialogVisible = true;
},
selectInit(row, index) {
return row.canEdit;
}
},
components: {
......
......@@ -61,7 +61,7 @@
<i class="el-icon-plus"></i>
</el-upload>
</div>
<p style="font-size: 12px; color: rgb(144, 147, 153);line-height:18px;margin-top:10px">图片宽度≥700px,≤1500px,图片宽高比1:1,单张图片大小不超过 2 MB。</p>
<p style="font-size: 12px; color: rgb(144, 147, 153);line-height:18px;margin-top:10px">图片宽度≥700px,≤1500px图片宽高比1:1,单张图片大小不超过 2 MB。</p>
<el-dialog :visible.sync="dialogVisibleImg">
<img width="100%" :src="dialogEnlargeImageUrl" alt="" />
</el-dialog>
......@@ -113,7 +113,7 @@
</div>
</el-form-item> -->
<el-form-item label="展现门店" required style="position:relative">
<vue-gic-store-linkage :disabled="isInfo" :msg="sendChildData" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage>
<vue-gic-store-linkage :disabled="isInfo" :msg="sendChildData" @getDisGroupList="getDisGroupList" :openFlag="openFlag" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage>
<span v-if="sendChildData.storeType === 1" class="store-tip">若选中的门店分组下有新增的门店,系统不会默认选中此新增门店,请重新确认选择并保存礼品</span>
</el-form-item>
......@@ -183,7 +183,7 @@
</div>
<div class="confim-btn" :style="{ width: fixedWidth + 'px' }">
<el-form-item class="fix-btn">
<el-button type="primary" size="small" @click="submitForm('couponForm')">保存</el-button>
<el-button type="primary" size="small" @click="submitForm('couponForm')" :disabled="!canEdit">保存</el-button>
<el-button size="small" @click="goBack">返回</el-button>
</el-form-item>
</div>
......@@ -268,10 +268,11 @@ export default {
memberGradeList: [], //会员等级
// 门店控件
sendChildData: {
storeType: 0,
storeType: 1,
storeGroupIds: '',
storeIds: []
},
openFlag: false,
monthOptions: Array.from(Array(31), (v, k) => (k + 1).toString()),
weekOptions: ['1', '2', '3', '4', '5', '6', '7'],
couponRules: {
......@@ -290,7 +291,9 @@ export default {
costValue: '', //礼品成本
costValueStatus: true,
couponCardStock: '', //优惠券库存
couponStatus: false //卡券状态
couponStatus: false, //卡券状态
canEdit: true,
groupIdDisableList: []
// 人群筛选器
// // 可传参数
// // projectName: 'integral-mall', // 当前项目名
......@@ -306,6 +309,7 @@ export default {
};
},
created() {
this.getOpenStatus();
window.onbeforeunload = function(e) {
// var storage = window.localStorage;
// storage.clear('couponListObj');
......@@ -318,11 +322,13 @@ export default {
};
this.getSelectGroupData(val);
this.mallProId = this.$route.query.giftId;
this.canEdit = Boolean(this.$route.query.canEdit);
this.coupCardId = this.$route.query.coupCardId;
if (this.mallProId !== '-1') {
this.getInfo();
}
// if (this.mallProId !== '-1') {
// // this.getInfo();
// this.getDisGroupList();
// }
this.getMemberGradeList(); //会员等级列表\
},
......@@ -330,6 +336,24 @@ export default {
refashData() {
this.refash = !this.refash;
},
getOpenStatus() {
request.post('/api-integral-mall/is-show-self ').then(res => {
if (res.data.errorCode === 0) {
this.openFlag = res.data.result.openFlag;
if (this.openFlag) {
this.sendChildData.storeType = 1;
}
} else {
this.$message.error(res.data.message);
}
});
},
getDisGroupList(arr) {
this.groupIdDisableList = arr;
if (this.mallProId !== '-1') {
this.getInfo();
}
},
// 获取会员等级
getMemberGradeList() {
request.post('/api-integral-mall/load-grade').then(res => {
......@@ -398,9 +422,19 @@ export default {
} else {
this.uploadStatus = true;
}
this.sendChildData.storeType = res.data.result.showStore || 0;
this.sendChildData.storeType = Number(res.data.result.showStore);
if (this.sendChildData.storeType === 1) {
this.sendChildData.storeGroupIds = res.data.result.storeGroupIds || '';
let arr = res.data.result.storeGroupIds.split(',');
for (let i = 0; i < arr.length; i++) {
if (this.groupIdDisableList.indexOf(arr[i]) !== -1) {
//存在
// console.log('不可删除的');
arr.splice(i, 1);
i--;
}
}
this.sendChildData.storeGroupIds = arr.join(',');
// this.sendChildData.storeGroupIds = res.data.result.storeGroupIds || '';
} else if (this.sendChildData.storeType === 2) {
let list = [];
if (res.data.result.storeInfo) {
......@@ -514,7 +548,7 @@ export default {
// this.sendChildData.storeGroupIds = val.storeGroupIds || '';
// this.sendChildData.storeIds = val.storeIds || [];
this.sendChildData = {
storeType: val.storeType || 0,
storeType: val.storeType || 1,
storeGroupIds: val.storeGroupIds || '',
storeIds: val.storeIds || []
};
......
......@@ -33,6 +33,9 @@
<el-option label="虚拟礼品" :value="2"></el-option>
</el-select>
</div>
<div class="search-item">
<el-checkbox v-model="showSelfStatus" label="仅看本人" border @change="getListCurr" v-if="showFlag"></el-checkbox>
</div>
</div>
<div class="fr">
<div class="search-item">
......@@ -46,8 +49,8 @@
</div>
</div>
<el-table ref="multipleTable" :data="tableDate" style="width: 100%" v-loading="loading" @sort-change="sortChange" @selection-change="handleSelectAll">
<el-table-column type="selection" width="50"> </el-table-column>
<el-table-column label="礼品信息" min-width="340px">
<el-table-column type="selection" width="50" :selectable="selectInit"> </el-table-column>
<el-table-column label="礼品信息" min-width="300px">
<template slot-scope="scope">
<div class="gift-info">
<img :src="scope.row.mainImageUrl" alt="" />
......@@ -60,17 +63,17 @@
</el-table-column>
<el-table-column prop="integralCost" label="积分费用" sortable="custom" min-width="110px">
<template slot-scope="scope">
<p class="intergral-edit">{{ scope.row.integralCost }}积分<i class="el-icon-edit" @click="handleTable(scope.row, 'cash')"></i></p>
<p class="intergral-edit">{{ scope.row.integralCost }}积分<i class="el-icon-edit" @click="handleTable(scope.row, 'cash')" v-if="scope.row.canEdit"></i></p>
</template>
</el-table-column>
<el-table-column prop="cashCost" label="现金费用" sortable="custom" min-width="110px">
<template slot-scope="scope">
<p class="intergral-edit">{{ scope.row.cashCost }}<i class="el-icon-edit" @click="handleTable(scope.row, 'cash')"></i></p>
<p class="intergral-edit">{{ scope.row.cashCost }}<i class="el-icon-edit" v-if="scope.row.canEdit" @click="handleTable(scope.row, 'cash')"></i></p>
</template>
</el-table-column>
<el-table-column prop="sortCost" label="库存" sortable="custom">
<template slot-scope="scope">
<p class="intergral-edit">{{ scope.row.virtualStock }}<i class="el-icon-edit" v-if="scope.row.giftType === 1" @click="handleTable(scope.row, 'stock')"></i></p>
<p class="intergral-edit">{{ scope.row.virtualStock }}<i class="el-icon-edit" v-if="scope.row.giftType === 1 && scope.row.canEdit" @click="handleTable(scope.row, 'stock')"></i></p>
</template>
</el-table-column>
<el-table-column prop="sortTimes" label="兑换次数" sortable="custom" min-width="110px">
......@@ -87,9 +90,12 @@
<p>{{ getSeconds(scope.row.createTime) }}</p>
</template>
</el-table-column>
<el-table-column prop="creatorName" label="创建人" min-width="110px" v-if="openFlag">
<template slot-scope="scope">{{ scope.row.creatorName ? scope.row.creatorName : '--' }}</template>
</el-table-column>
<el-table-column prop="sort" label="序号" sortable="custom" min-width="140px" :render-header="renderHeader">
<template slot-scope="scope">
<p v-if="!scope.row.editStatus" class="edit-number intergral-edit">{{ scope.row.sort }}<i class="el-icon-edit" @click="editNumber(scope.row)"></i></p>
<p v-if="!scope.row.editStatus" class="edit-number intergral-edit">{{ scope.row.sort }}<i class="el-icon-edit" v-if="scope.row.canEdit" @click="editNumber(scope.row)"></i></p>
<div v-if="scope.row.editStatus">
<el-input v-if="scope.row.editStatus" v-model="scope.row.sort" placeholder="" size="mini" class="w-180" @blur="value => limitSort(value, scope.row)" style="width:60px"></el-input>
<span class="operate-span" @click="editNumSubmit(scope.row)">确定</span>
......@@ -101,19 +107,22 @@
<el-table-column label="操作" min-width="220px">
<template slot-scope="scope">
<div>
<el-button type="text" @click="getLink(scope.row)">推广</el-button>
<el-button type="text" v-if="scope.row.changeType === '5'" @click="getCouponList(scope.row.integralMallProId)">券码</el-button>
<el-button type="text" v-if="scope.row.status === 2" @click="deleteList(scope.row, 1)">下架</el-button>
<el-button type="text" v-if="scope.row.status === 1" @click="deleteList(scope.row, 2)">上架</el-button>
<el-button type="text" @click="getLink(scope.row)" v-if="scope.row.canEdit">推广</el-button>
<el-button type="text" v-if="scope.row.changeType === '5' && scope.row.canEdit" @click="getCouponList(scope.row.integralMallProId)">券码</el-button>
<el-button type="text" v-if="scope.row.status === 2 && scope.row.canEdit" @click="deleteList(scope.row, 1)">下架</el-button>
<el-button type="text" v-if="scope.row.status === 1 && scope.row.canEdit" @click="deleteList(scope.row, 2)">上架</el-button>
<el-button type="text" @click="goAdd(scope.row)">编辑</el-button>
<el-popover placement="top" width="160" v-model="scope.row.visible2" style="margin-left:8px">
<dm-delete @confirm="deleteList(scope.row, 0, scope.$index)" tips="确定删除该商品吗?">
<el-button type="text" v-if="scope.row.canEdit">删除</el-button>
</dm-delete>
<!-- <el-popover placement="top" width="160" v-model="scope.row.visible2" style="margin-left:8px">
<p style="line-height:1.5;padding: 10px 10px 20px;">确定删除该商品吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteList(scope.row, 0, scope.$index)">确定</el-button>
</div>
<el-button slot="reference" type="text">删除</el-button>
</el-popover>
<el-button slot="reference" type="text" v-if="scope.row.canEdit">删除</el-button>
</el-popover> -->
</div>
</template>
</el-table-column>
......@@ -166,6 +175,9 @@ export default {
giftType: '', //商品类型
sortColumn: '',
sortType: '',
showSelfStatus: false,
showFlag: false,
openFlag: false,
tableDate: [
{
giftName: '1111'
......@@ -230,12 +242,23 @@ export default {
this.sortColumn = this.giftListObj.sortColumn;
localStorage.removeItem('giftListObj'); //使用完就清除缓存
}
this.getStatus();
this.getList();
},
methods: {
renderHeader(h, { column, $index }, index) {
return h('span', {}, [h('span', {}, '序号'), h('el-popover', { props: { placement: 'top-start', width: '200', trigger: 'hover', content: '礼品在小程序端的展示排序,序号越大,排序越靠前。' } }, [h('i', { slot: 'reference', class: 'iconfont icon-xinxixianshi' }, '')])]);
},
getStatus() {
request.post('/api-integral-mall/is-show-self ').then(res => {
if (res.data.errorCode === 0) {
this.showFlag = res.data.result.showFlag;
this.openFlag = res.data.result.openFlag;
} else {
this.$message.error(res.data.message);
}
});
},
//跳转到兑换记录
goRecord(item) {
if (item.cardType === 2) {
......@@ -258,7 +281,8 @@ export default {
giftName: this.searchValue.trim(),
giftType: this.giftType ? this.giftType : -1,
shelf: this.shelf ? this.shelf : -1, //上架状态
goodsType: this.goodsType //商品类型
goodsType: this.goodsType, //商品类型
showSelfFlag: this.showSelfStatus ? 1 : 0
};
this.loading = true;
request.post('/api-integral-mall/page-gift', qs.stringify(params)).then(res => {
......@@ -481,7 +505,7 @@ export default {
sortColumn: this.sortColumn
};
window.localStorage.setItem('giftListObj', JSON.stringify(this.giftListObj));
this.$router.push({ name: 'giftInfo', query: { type: item.giftType, giftId: item.integralMallProId, proReferId: item.proReferId } });
this.$router.push({ name: 'giftInfo', query: { type: item.giftType, giftId: item.integralMallProId, proReferId: item.proReferId, canEdit: item.canEdit } });
},
//编辑序号
editNumber(item) {
......@@ -637,6 +661,9 @@ export default {
this.$message.error(res.data.message);
}
});
},
selectInit(row, index) {
return row.canEdit;
}
},
components: {
......@@ -670,11 +697,11 @@ export default {
.info-name {
display: inline-block;
vertical-align: top;
width: 72%;
width: 60%;
}
.pro-ellipsis {
color: #303133;
height: 36px;
height: 54px;
line-height: 18px;
/* width: 230px; */
font-size: 14px;
......
......@@ -127,7 +127,7 @@
</div>
</el-form-item> -->
<el-form-item label="展现门店" required style="position:relative">
<vue-gic-store-linkage :disabled="isInfo" :msg="sendChildData" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage>
<vue-gic-store-linkage :disabled="isInfo" @getDisGroupList="getDisGroupList" :msg="sendChildData" :openFlag="openFlag" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage>
<span v-if="sendChildData.storeType === 1" class="store-tip">若选中的门店分组下有新增的门店,系统不会默认选中此新增门店,请重新确认选择并保存礼品</span>
</el-form-item>
<el-form-item label="限兑">
......@@ -268,7 +268,7 @@
</div>
<div class="confim-btn" :style="{ width: fixedWidth + 'px' }">
<el-form-item class="fix-btn">
<el-button type="primary" @click="submitGoodsForm('giftForm')" size="small" :loading="submitLoading">保存</el-button>
<el-button type="primary" @click="submitGoodsForm('giftForm')" size="small" :loading="submitLoading" :disabled="!canEdit">保存</el-button>
<el-button @click="cancelGoodsForm" size="small">返回</el-button>
</el-form-item>
</div>
......@@ -395,10 +395,12 @@ export default {
weekOptions: ['1', '2', '3', '4', '5', '6', '7'],
// 门店控件
sendChildData: {
storeType: 0,
storeType: 1,
storeGroupIds: '',
storeIds: []
},
// sendChildData: {}, // 向子元素传递的对象
openFlag: true,
stockDisabled: false, //spu库存是否可输入
refash: false,
giftProStandardJson: [], //规格列表
......@@ -428,8 +430,9 @@ export default {
dialogVisible: false,
integralMallProId: ''
},
textStock: 0 //文本券码库存数
textStock: 0, //文本券码库存数
canEdit: true,
groupIdDisableList: []
// // 人群筛选器
// // 可传参数
// // projectName: 'integral-mall', // 当前项目名
......@@ -444,13 +447,15 @@ export default {
// responseParams: [] //回显的数据
};
},
created() {
mounted() {
this.getOpenStatus();
window.onbeforeunload = function(e) {
// var storage = window.localStorage;
// storage.clear('giftListObj');
localStorage.removeItem('giftListObj');
};
this.giftType = Number(this.$route.query.type); //列表上实物是1虚拟是0
this.canEdit = Boolean(this.$route.query.canEdit);
this.mallProId = this.$route.query.giftId;
if (this.$route.query.proReferId !== '-1') {
//编辑
......@@ -472,7 +477,12 @@ export default {
this.refundTypeStatus = this.giftForm.changeType === 5 ? true : false;
}
if (this.mallProId !== '-1') {
this.getInfo();
// setTimeout(() => {
// this.groupIdDisableList = this.$refs.selectTree.getDisGroupList;
// }, 1000);
// this.getDisGroupList();
// this.getInfo();
// this.getDisGroupList();
this.editChangeTypeStatus = true;
} else {
if (this.giftType === 0) {
......@@ -481,22 +491,45 @@ export default {
this.mallProId === '-1';
}
}
// if (this.giftForm.changeType === 5) {
// this.refundTypeStatus = true;
// }
let val = {
storeType: 0,
storeGroupIds: '',
storeIds: []
};
this.getSelectGroupData(val);
},
mounted: function() {
this.$nextTick(function() {
window.addEventListener('scroll', this.onScroll, true);
});
},
// mounted: function() {
// this.$nextTick(function() {
// window.addEventListener('scroll', this.onScroll, true);
// });
// // this.getGroupList();
// },
methods: {
getOpenStatus() {
request.post('/api-integral-mall/is-show-self ').then(res => {
if (res.data.errorCode === 0) {
this.openFlag = res.data.result.openFlag;
if (this.openFlag) {
this.sendChildData.storeType = 1;
}
} else {
this.$message.error(res.data.message);
}
});
},
getDisGroupList(arr) {
this.groupIdDisableList = arr;
if (this.mallProId !== '-1') {
this.getInfo();
}
},
// 获取卡券详情
getCardInfo() {
let params = {
......@@ -686,10 +719,18 @@ export default {
}
this.giftForm.timeRangeList = timeRangeList;
}
this.sendChildData.storeType = res.data.result.showStore;
this.sendChildData.storeType = Number(res.data.result.showStore);
// console.log('获取子组件的值', this.groupIdDisableList);
if (this.sendChildData.storeType === 1) {
this.sendChildData.storeGroupIds = res.data.result.storeGroupIds;
let arr = res.data.result.storeGroupIds.split(',');
for (let i = 0; i < arr.length; i++) {
if (this.groupIdDisableList.indexOf(arr[i]) !== -1) {
//存在
arr.splice(i, 1);
i--;
}
}
this.sendChildData.storeGroupIds = arr.join(',');
} else if (this.sendChildData.storeType === 2) {
let list = [];
if (res.data.result.storeInfo) {
......@@ -828,6 +869,7 @@ export default {
getSpuStock(val) {
this.giftForm.virtualStock = val;
},
// 礼品字数限制
goodsLimit(value) {
this.$nextTick(() => {
......
......@@ -82,7 +82,8 @@ export default {
let params = {
integralMallProRefundId: this.agreeRefundModal.integralMallProRefundId,
refundMoney: this.agreeRefundModal.refundMoney,
refundPoint: this.agreeRefundModal.refundPoint
refundPoint: this.agreeRefundModal.refundPoint,
proId: this.agreeRefundModal.proId
};
this.submitLoading = true;
request.get('/api-integral-mall/agree-refund', { params }).then(res => {
......
......@@ -52,6 +52,7 @@ export default {
if (valid) {
let params = {
integralMallProRefundId: this.refundModal.integralMallProRefundId,
proId: this.refundModal.proId,
reason: this.refundForm.reason
};
this.submitLoading = true;
......
......@@ -29,6 +29,9 @@
<div class="search-item">
<el-input v-model.trim="searchValue" style="width:260px;" placeholder="请输入会员/卡券/订单进行搜索" prefix-icon="el-icon-search" clearable @keyup.enter.native="handleInputSearch(searchValue)" @clear="handleInputSearch(searchValue)"> </el-input>
</div>
<div class="search-item">
<el-checkbox v-model="showSelfStatus" label="仅看本人" border @change="handleInputSearch" v-if="showFlag"></el-checkbox>
</div>
</div>
<div class="fr">
<el-button @click="exportExcel" v-if="integralMallProId" type="primary"><i class="iconfont icon-icon_yunxiazai" style="margin-right:5px"></i>导出订单</el-button>
......@@ -184,7 +187,9 @@ export default {
},
integralMallProId: '',
requestProject: 'integral-mall',
placement: 'top-start'
placement: 'top-start',
showSelfStatus: false,
showFlag: false
};
},
watch: {
......@@ -194,10 +199,21 @@ export default {
}
},
created() {
this.getStatus();
this.integralMallProId = this.$route.query.integralMallProId;
this.getList();
},
methods: {
getStatus() {
request.post('/api-integral-mall/is-show-self ').then(res => {
if (res.data.errorCode === 0) {
this.showFlag = res.data.result.showFlag;
// this.openFlag = res.data.result.openFlag;
} else {
this.$message.error(res.data.message);
}
});
},
// tab切换
handleClick(tab) {
this.orderStatus = tab.name;
......@@ -326,7 +342,8 @@ export default {
beginTime: this.beginTime,
endTime: this.endTime,
sortType: this.sortType,
integralMallProId: this.integralMallProId ? this.integralMallProId : ''
integralMallProId: this.integralMallProId ? this.integralMallProId : '',
showSelfFlag: this.showSelfStatus ? 1 : 0
};
this.loading = true;
request.post('/api-integral-mall/page-undeliver', qs.stringify(params)).then(res => {
......
......@@ -18,10 +18,10 @@
<div class="operate-top">
<div class="fl">
<div class="search-item">
<el-date-picker class="date-picker" @change="changeTime" v-model="dateValue" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<el-date-picker class="date-picker" @change="changeTime" v-model="dateValue" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width:360px;"></el-date-picker>
</div>
<div class="search-item">
<el-select v-model="changeType" placeholder="配送方式" clearable @change="getListCurr" style="width:160px;">
<el-select v-model="changeType" placeholder="配送方式" clearable @change="getListCurr" style="width:140px;">
<el-option label="物流发货" :value="2"></el-option>
<el-option label="在线发货(虚拟商品)" :value="3"></el-option>
<el-option label="门店自提" :value="4"></el-option>
......@@ -29,7 +29,10 @@
</el-select>
</div>
<div class="search-item">
<el-input style="width:260px;" v-model.trim="searchValue" placeholder="请输入会员/商品/订单进行搜索" prefix-icon="el-icon-search" clearable @keyup.enter.native="handleInputSearch(searchValue)" @clear="handleInputSearch(searchValue)"> </el-input>
<el-input style="width:240px;" v-model.trim="searchValue" placeholder="请输入会员/商品/订单搜索" prefix-icon="el-icon-search" clearable @keyup.enter.native="handleInputSearch(searchValue)" @clear="handleInputSearch(searchValue)"> </el-input>
</div>
<div class="search-item">
<el-checkbox v-model="showSelfStatus" label="仅看本人" border @change="getListCurr" v-if="showFlag"></el-checkbox>
</div>
</div>
<div class="fr">
......@@ -348,7 +351,9 @@ export default {
shopIntegralMallProExchangeId: '', //门店自提订单id
writeOffCode: '', //核销码
submitLoading: false, //门店自提确认按钮
giftOrderObj: {} //缓存数据
giftOrderObj: {}, //缓存数据
showSelfStatus: false,
showFlag: false
};
},
watch: {
......@@ -359,6 +364,7 @@ export default {
},
created() {
this.getNumber();
this.getStatus();
this.integralMallProId = this.$route.query.integralMallProId;
if (localStorage.getItem('giftOrderObj')) {
this.giftOrderObj = JSON.parse(localStorage.getItem('giftOrderObj'));
......@@ -371,6 +377,7 @@ export default {
this.pageType = this.giftOrderObj.pageType; //1、代表优惠券订单列表 2、礼品订单
this.beginTime = this.giftOrderObj.beginTime;
this.endTime = this.giftOrderObj.endTime;
this.showSelfStatus = this.giftOrderObj.showSelfStatus;
if (this.beginTime) {
this.dateValue[0] = this.beginTime;
......@@ -386,6 +393,16 @@ export default {
this.getList();
},
methods: {
getStatus() {
request.post('/api-integral-mall/is-show-self ').then(res => {
if (res.data.errorCode === 0) {
this.showFlag = res.data.result.showFlag;
// this.openFlag = res.data.result.openFlag;
} else {
this.$message.error(res.data.message);
}
});
},
// tab切换
handleClick(tab) {
this.orderStatus = tab.name;
......@@ -467,7 +484,8 @@ export default {
beginTime: this.beginTime,
endTime: this.endTime,
sortType: this.sortType,
integralMallProId: this.integralMallProId ? this.integralMallProId : ''
integralMallProId: this.integralMallProId ? this.integralMallProId : '',
showSelfFlag: this.showSelfStatus ? 1 : 0
};
this.loading = true;
......@@ -761,7 +779,8 @@ export default {
beginTime: this.beginTime,
endTime: this.endTime,
sortType: this.sortType,
integralMallProId: this.integralMallProId ? this.integralMallProId : ''
integralMallProId: this.integralMallProId ? this.integralMallProId : '',
showSelfStatus: this.showSelfStatus
};
window.localStorage.setItem('giftOrderObj', JSON.stringify(this.giftOrderObj));
this.$router.push({ name: 'orderDetail', query: { integralMallProExchangeId: item.integralMallProExchangeId } });
......
......@@ -29,6 +29,9 @@
<div class="search-item">
<el-input class="w-340" v-model.trim="searchValue" placeholder="请输入商品/会员/订单/退款编号进行搜索" prefix-icon="el-icon-search" clearable @keyup.enter.native="handleInputSearch(searchValue)" @clear="handleInputSearch(searchValue)"> </el-input>
</div>
<div class="search-item">
<el-checkbox v-model="showSelfStatus" label="仅看本人" border @change="getListCurr" v-if="showFlag"></el-checkbox>
</div>
</div>
</div>
</div>
......@@ -38,7 +41,7 @@
<el-tab-pane label="退款关闭" name="2" class="goods-table-content"> </el-tab-pane>
<div class="goods-list-content">
<el-table :data="tableData" ref="multipleTable" style="width: 100%" @sort-change="sortChange" v-loading="loading">
<el-table-column type="selection" width="40"> </el-table-column>
<el-table-column type="selection" width="50"> </el-table-column>
<el-table-column label="礼品信息" min-width="300px">
<template slot-scope="scope">
<div class="gift-info">
......@@ -185,14 +188,16 @@ export default {
//退款关闭
refundModal: {
dialogVisible: false,
integralMallProRefundId: '' //退款id
integralMallProRefundId: '', //退款id
proId: ''
},
// 同意退款
agreeRefundModal: {
dialogVisible: false,
integralMallProRefundId: '', //退款id
refundMoney: '',
refundPoint: ''
refundPoint: '',
proId: ''
},
deliverdModal: {
//发货
......@@ -209,13 +214,26 @@ export default {
shopDialogVisible: false, //门店自提
shopIntegralMallProExchangeId: '', //门店自提订单id
writeOffCode: '', //核销码
submitLoading: false //门店自提确认按钮
submitLoading: false, //门店自提确认按钮
showSelfStatus: false,
showFlag: false
};
},
created() {
this.getStatus();
this.getList();
},
methods: {
getStatus() {
request.post('/api-integral-mall/is-show-self ').then(res => {
if (res.data.errorCode === 0) {
this.showFlag = res.data.result.showFlag;
// this.openFlag = res.data.result.openFlag;
} else {
this.$message.error(res.data.message);
}
});
},
// tab切换
// tab切换
handleClick(tab) {
......@@ -276,7 +294,8 @@ export default {
sort: this.sortType,
startTime: this.startTime,
endTime: this.endTime,
status: this.status === '-1' ? '' : this.status
status: this.status === '-1' ? '' : this.status,
showSelfFlag: this.showSelfStatus ? 1 : 0
};
this.loading = true;
request.post('/api-integral-mall/page-refunds', qs.stringify(params)).then(res => {
......@@ -296,8 +315,9 @@ export default {
},
// 关闭退款
handleCloseRefund(item) {
this.refundModal.dialogVisible = true;
this.refundModal.integralMallProRefundId = item.integralMallProRefundId;
this.refundModal.proId = item.proId;
this.refundModal.dialogVisible = true;
},
// 同意退款
handleArgeeRefund(item) {
......@@ -305,6 +325,7 @@ export default {
this.agreeRefundModal.refundPoint = item.maxRefundPoints;
this.agreeRefundModal.integralMallProRefundId = item.integralMallProRefundId;
this.agreeRefundModal.refundType = item.refundType;
this.agreeRefundModal.proId = item.proId;
this.agreeRefundModal.dialogVisible = true;
},
// 发货
......
......@@ -94,6 +94,7 @@ import request from '../../service/request.js';
// import getInputVal from '../../../utils/common.js';
// import stockModal from '../../../components/getSkuList';
import pickedAuto from './pickedAuto';
import { alertInfo } from '../../utils/user.js';
export default {
data() {
return {
......@@ -111,13 +112,43 @@ export default {
dialogVisible: false,
selectIdList: [], //复选框选中的数据的id
list: [{ timeRange: [] }] //初始数据
}
},
enableAccessControl: false
};
},
created() {
this.getAccessControl();
// export const alertInfo = () => {
// Notification({
// title: '温馨提示',
// type: 'warning',
// message: '在此页面进行修改、删除等操作将更改本商户下所有的配置 请谨慎进行'
// });
// }
this.enableAccessControl = localStorage.getItem('enableAccessControl') == 'false' ? false : true;
if (this.enableAccessControl) {
alertInfo();
}
this.getStatus();
},
methods: {
getAccessControl() {
let 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() {
this.currentPage = 1;
this.getList();
......
......@@ -93,7 +93,7 @@
</div>
<div class="confim-btn" :style="{ width: fixedWidth + 'px' }">
<el-form-item class="fix-btn" style="margin-left:32px;">
<el-button type="primary" size="small" :loading="submitLoading" @click="submitForm('form')">保存</el-button>
<el-button type="primary" size="small" :loading="submitLoading" @click="handleSubmit('form')">保存</el-button>
<el-button size="small" @click="goBack">返回</el-button>
</el-form-item>
</div>
......@@ -108,6 +108,7 @@
import request from '../../service/request.js';
import getInputVal from '../../utils/common.js';
// import stockModal from '../../../components/getSkuList';
import { confirmInfo } from '../../utils/user.js';
export default {
data() {
......@@ -222,7 +223,8 @@ export default {
isAdd: true,
storeWidgetKey: '', //传递的门店的KeyId
integralMallPickUpPointId: '-1', //自提点id
clearableBtn: false
clearableBtn: false,
enableAccessControl: false
};
},
created() {
......@@ -388,6 +390,15 @@ export default {
this.storeWidgetKey = this.uuid;
},
//保存
handleSubmit(form) {
// 根据标志来判断是不是权限商户
this.enableAccessControl = localStorage.getItem('enableAccessControl') == 'false' ? false : true;
if (this.enableAccessControl) {
confirmInfo(this.submitForm, form);
} else {
this.submitForm(form);
}
},
async submitForm(form) {
if (this.integralMallPickUpPointId === '-1') {
let flag = await this.$refs.storeGroup.isStoreSave();
......
......@@ -52,7 +52,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelSubmit('pickedModal')">取 消</el-button>
<el-button type="primary" :loading="submitLoading" @click="submit('pickedModal')">确 定</el-button>
<el-button type="primary" :loading="submitLoading" @click="handleSubmit('pickedModal')">确 定</el-button>
</div>
</el-dialog>
</template>
......@@ -62,6 +62,7 @@
import request from '../../service/request.js';
// import copy from '../../utils/clone.js';
import getInputVal from '../../utils/common.js';
import { confirmInfo } from '../../utils/user.js';
export default {
props: {
pickedForm: {
......@@ -166,7 +167,8 @@ export default {
orderTimeHours: [{ required: true, message: '请输入时间', trigger: 'blur' }, { validator: orderTimeHoursValidator, trigger: 'blur' }]
},
submitLoading: false,
clearableBtn: false
clearableBtn: false,
enableAccessControl: false
};
},
// created() {
......@@ -291,6 +293,15 @@ export default {
this.pickedModal.timeRangeList[index].timeRange = null;
}
},
handleSubmit(pickedModal) {
// 根据标志来判断是不是权限商户
this.enableAccessControl = localStorage.getItem('enableAccessControl') == 'false' ? false : true;
if (this.enableAccessControl) {
confirmInfo(this.submit, pickedModal);
} else {
this.submit(pickedModal);
}
},
submit(pickedModal) {
this.$refs[pickedModal].validate(valid => {
if (valid) {
......
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