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> <!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 \ 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 @@ ...@@ -10,21 +10,21 @@
</head> </head>
<body> <body>
<div id="app"></div> <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/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/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/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/lib/elementUI/index.2.5.4.js"></script>
<!-- 组件引用cdn --> <!-- 组件引用cdn -->
<script src="//web-1251519181.file.myqcloud.com/components/header.2.0.30.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/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/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/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/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/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/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> --> <!-- <script src="//web-1251519181.cos.ap-shanghai.myqcloud.com/components/space.2.0.00.js"></script> -->
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </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 @@ ...@@ -24,6 +24,9 @@
<el-option label="已下架" :value="1"></el-option> <el-option label="已下架" :value="1"></el-option>
</el-select> </el-select>
</div> </div>
<div class="search-item">
<el-checkbox v-model="showSelfStatus" label="仅看本人" border @change="getListCurr" v-if="showFlag"></el-checkbox>
</div>
</div> </div>
<div class="fr"> <div class="fr">
<div class="search-item"> <div class="search-item">
...@@ -37,8 +40,8 @@ ...@@ -37,8 +40,8 @@
</div> </div>
</div> </div>
<el-table ref="multipleTable" :data="tableDate" style="width: 100%" v-loading="loading" @sort-change="sortChange" @selection-change="handleSelectAll"> <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 type="selection" width="50" :selectable="selectInit"> </el-table-column>
<el-table-column label="礼品信息" min-width="220px"> <el-table-column label="礼品信息" min-width="260px">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="gift-info"> <div class="gift-info">
<!-- <p v-if="scope.row.cardType === 2" style="display:inline-block"> <!-- <p v-if="scope.row.cardType === 2" style="display:inline-block">
...@@ -63,17 +66,17 @@ ...@@ -63,17 +66,17 @@
<el-table-column prop="integralCost" label="积分费用" sortable="custom" min-width="110px"> <el-table-column prop="integralCost" label="积分费用" sortable="custom" min-width="110px">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <editInfo :popoverType='1' :popoverNum="scope.row.integralCost"><editInfo> --> <!-- <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="cashCost" label="现金费用" sortable="custom" min-width="110px"> <el-table-column prop="cashCost" label="现金费用" sortable="custom" min-width="110px">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="sortCost" label="库存" sortable="custom"> <el-table-column prop="sortCost" label="库存" sortable="custom">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="sortTimes" label="兑换次数" sortable="custom" min-width="110px"> <el-table-column prop="sortTimes" label="兑换次数" sortable="custom" min-width="110px">
...@@ -88,9 +91,12 @@ ...@@ -88,9 +91,12 @@
<p>{{ getSeconds(scope.row.createTime) }}</p> <p>{{ getSeconds(scope.row.createTime) }}</p>
</template> </template>
</el-table-column> </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"> <el-table-column prop="sort" label="序号" sortable="custom" min-width="140px" :render-header="renderHeader">
<template slot-scope="scope"> <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"> <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> <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> <span class="operate-span" @click="editNumSubmit(scope.row)">确定</span>
...@@ -102,18 +108,21 @@ ...@@ -102,18 +108,21 @@
<el-table-column label="操作" min-width="180px"> <el-table-column label="操作" min-width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<el-button type="text" @click="getLink(scope.row)">推广</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" @click="deleteList(scope.row, 1)">下架</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" @click="deleteList(scope.row, 2)">上架</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-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> <p style="line-height:1.5;padding: 10px 10px 20px;">确定删除该商品吗?</p>
<div style="text-align: right; margin: 0"> <div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button> <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> <el-button type="primary" size="mini" @click="deleteList(scope.row, 0, scope.$index)">确定</el-button>
</div> </div>
<el-button slot="reference" type="text">删除</el-button> <el-button slot="reference" type="text" v-if="scope.row.canEdit">删除</el-button>
</el-popover> </el-popover> -->
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -160,6 +169,9 @@ export default { ...@@ -160,6 +169,9 @@ export default {
shelf: '', //上下架状态 shelf: '', //上下架状态
goodsType: '', //批量操作 goodsType: '', //批量操作
tableDate: [], tableDate: [],
showSelfStatus: false,
showFlag: false,
openFlag: true,
currentPage: 1, currentPage: 1,
pageSizes: [20, 40, 60, 80], pageSizes: [20, 40, 60, 80],
pageSize: 20, pageSize: 20,
...@@ -198,12 +210,23 @@ export default { ...@@ -198,12 +210,23 @@ export default {
this.sortColumn = this.couponListObj.sortColumn; this.sortColumn = this.couponListObj.sortColumn;
localStorage.removeItem('couponListObj'); //使用完就清除缓存 localStorage.removeItem('couponListObj'); //使用完就清除缓存
} }
this.getStatus();
this.getList(); this.getList();
}, },
methods: { methods: {
renderHeader(h, { column, $index }, index) { 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' }, '')])]); 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) { goRecord(item) {
this.$router.push({ name: 'couponExchange', query: { integralMallProId: item.integralMallProId } }); this.$router.push({ name: 'couponExchange', query: { integralMallProId: item.integralMallProId } });
...@@ -216,7 +239,8 @@ export default { ...@@ -216,7 +239,8 @@ export default {
sortType: this.sortType, sortType: this.sortType,
sortColumn: this.sortColumn, sortColumn: this.sortColumn,
giftName: this.searchValue, giftName: this.searchValue,
shelf: this.shelf ? this.shelf : -1 //上架状态 shelf: this.shelf ? this.shelf : -1, //上架状态
showSelfFlag: this.showSelfStatus ? 1 : 0
}; };
this.loading = true; this.loading = true;
request.post('/api-integral-mall/page-cards', qs.stringify(params)).then(res => { request.post('/api-integral-mall/page-cards', qs.stringify(params)).then(res => {
...@@ -380,7 +404,7 @@ export default { ...@@ -380,7 +404,7 @@ export default {
}, },
// 新增礼品 // 新增礼品
addCoupon() { 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) { goAdd(item) {
...@@ -394,7 +418,7 @@ export default { ...@@ -394,7 +418,7 @@ export default {
sortColumn: this.sortColumn sortColumn: this.sortColumn
}; };
window.localStorage.setItem('couponListObj', JSON.stringify(this.couponListObj)); 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) { editNumber(item) {
...@@ -448,6 +472,9 @@ export default { ...@@ -448,6 +472,9 @@ export default {
this.editInfoModal.mallProId = item.integralMallProId; this.editInfoModal.mallProId = item.integralMallProId;
this.editInfoModal.dialogVisible = true; this.editInfoModal.dialogVisible = true;
},
selectInit(row, index) {
return row.canEdit;
} }
}, },
components: { components: {
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
</div> </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"> <el-dialog :visible.sync="dialogVisibleImg">
<img width="100%" :src="dialogEnlargeImageUrl" alt="" /> <img width="100%" :src="dialogEnlargeImageUrl" alt="" />
</el-dialog> </el-dialog>
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
</div> </div>
</el-form-item> --> </el-form-item> -->
<el-form-item label="展现门店" required style="position:relative"> <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> <span v-if="sendChildData.storeType === 1" class="store-tip">若选中的门店分组下有新增的门店,系统不会默认选中此新增门店,请重新确认选择并保存礼品</span>
</el-form-item> </el-form-item>
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
</div> </div>
<div class="confim-btn" :style="{ width: fixedWidth + 'px' }"> <div class="confim-btn" :style="{ width: fixedWidth + 'px' }">
<el-form-item class="fix-btn"> <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-button size="small" @click="goBack">返回</el-button>
</el-form-item> </el-form-item>
</div> </div>
...@@ -268,10 +268,11 @@ export default { ...@@ -268,10 +268,11 @@ export default {
memberGradeList: [], //会员等级 memberGradeList: [], //会员等级
// 门店控件 // 门店控件
sendChildData: { sendChildData: {
storeType: 0, storeType: 1,
storeGroupIds: '', storeGroupIds: '',
storeIds: [] storeIds: []
}, },
openFlag: false,
monthOptions: Array.from(Array(31), (v, k) => (k + 1).toString()), monthOptions: Array.from(Array(31), (v, k) => (k + 1).toString()),
weekOptions: ['1', '2', '3', '4', '5', '6', '7'], weekOptions: ['1', '2', '3', '4', '5', '6', '7'],
couponRules: { couponRules: {
...@@ -290,7 +291,9 @@ export default { ...@@ -290,7 +291,9 @@ export default {
costValue: '', //礼品成本 costValue: '', //礼品成本
costValueStatus: true, costValueStatus: true,
couponCardStock: '', //优惠券库存 couponCardStock: '', //优惠券库存
couponStatus: false //卡券状态 couponStatus: false, //卡券状态
canEdit: true,
groupIdDisableList: []
// 人群筛选器 // 人群筛选器
// // 可传参数 // // 可传参数
// // projectName: 'integral-mall', // 当前项目名 // // projectName: 'integral-mall', // 当前项目名
...@@ -306,6 +309,7 @@ export default { ...@@ -306,6 +309,7 @@ export default {
}; };
}, },
created() { created() {
this.getOpenStatus();
window.onbeforeunload = function(e) { window.onbeforeunload = function(e) {
// var storage = window.localStorage; // var storage = window.localStorage;
// storage.clear('couponListObj'); // storage.clear('couponListObj');
...@@ -318,11 +322,13 @@ export default { ...@@ -318,11 +322,13 @@ export default {
}; };
this.getSelectGroupData(val); this.getSelectGroupData(val);
this.mallProId = this.$route.query.giftId; this.mallProId = this.$route.query.giftId;
this.canEdit = Boolean(this.$route.query.canEdit);
this.coupCardId = this.$route.query.coupCardId; this.coupCardId = this.$route.query.coupCardId;
if (this.mallProId !== '-1') { // if (this.mallProId !== '-1') {
this.getInfo(); // // this.getInfo();
} // this.getDisGroupList();
// }
this.getMemberGradeList(); //会员等级列表\ this.getMemberGradeList(); //会员等级列表\
}, },
...@@ -330,6 +336,24 @@ export default { ...@@ -330,6 +336,24 @@ export default {
refashData() { refashData() {
this.refash = !this.refash; 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() { getMemberGradeList() {
request.post('/api-integral-mall/load-grade').then(res => { request.post('/api-integral-mall/load-grade').then(res => {
...@@ -398,9 +422,19 @@ export default { ...@@ -398,9 +422,19 @@ export default {
} else { } else {
this.uploadStatus = true; this.uploadStatus = true;
} }
this.sendChildData.storeType = res.data.result.showStore || 0; this.sendChildData.storeType = Number(res.data.result.showStore);
if (this.sendChildData.storeType === 1) { 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) { } else if (this.sendChildData.storeType === 2) {
let list = []; let list = [];
if (res.data.result.storeInfo) { if (res.data.result.storeInfo) {
...@@ -514,7 +548,7 @@ export default { ...@@ -514,7 +548,7 @@ export default {
// this.sendChildData.storeGroupIds = val.storeGroupIds || ''; // this.sendChildData.storeGroupIds = val.storeGroupIds || '';
// this.sendChildData.storeIds = val.storeIds || []; // this.sendChildData.storeIds = val.storeIds || [];
this.sendChildData = { this.sendChildData = {
storeType: val.storeType || 0, storeType: val.storeType || 1,
storeGroupIds: val.storeGroupIds || '', storeGroupIds: val.storeGroupIds || '',
storeIds: val.storeIds || [] storeIds: val.storeIds || []
}; };
......
...@@ -33,6 +33,9 @@ ...@@ -33,6 +33,9 @@
<el-option label="虚拟礼品" :value="2"></el-option> <el-option label="虚拟礼品" :value="2"></el-option>
</el-select> </el-select>
</div> </div>
<div class="search-item">
<el-checkbox v-model="showSelfStatus" label="仅看本人" border @change="getListCurr" v-if="showFlag"></el-checkbox>
</div>
</div> </div>
<div class="fr"> <div class="fr">
<div class="search-item"> <div class="search-item">
...@@ -46,8 +49,8 @@ ...@@ -46,8 +49,8 @@
</div> </div>
</div> </div>
<el-table ref="multipleTable" :data="tableDate" style="width: 100%" v-loading="loading" @sort-change="sortChange" @selection-change="handleSelectAll"> <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 type="selection" width="50" :selectable="selectInit"> </el-table-column>
<el-table-column label="礼品信息" min-width="340px"> <el-table-column label="礼品信息" min-width="300px">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="gift-info"> <div class="gift-info">
<img :src="scope.row.mainImageUrl" alt="" /> <img :src="scope.row.mainImageUrl" alt="" />
...@@ -60,17 +63,17 @@ ...@@ -60,17 +63,17 @@
</el-table-column> </el-table-column>
<el-table-column prop="integralCost" label="积分费用" sortable="custom" min-width="110px"> <el-table-column prop="integralCost" label="积分费用" sortable="custom" min-width="110px">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="cashCost" label="现金费用" sortable="custom" min-width="110px"> <el-table-column prop="cashCost" label="现金费用" sortable="custom" min-width="110px">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="sortCost" label="库存" sortable="custom"> <el-table-column prop="sortCost" label="库存" sortable="custom">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="sortTimes" label="兑换次数" sortable="custom" min-width="110px"> <el-table-column prop="sortTimes" label="兑换次数" sortable="custom" min-width="110px">
...@@ -87,9 +90,12 @@ ...@@ -87,9 +90,12 @@
<p>{{ getSeconds(scope.row.createTime) }}</p> <p>{{ getSeconds(scope.row.createTime) }}</p>
</template> </template>
</el-table-column> </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"> <el-table-column prop="sort" label="序号" sortable="custom" min-width="140px" :render-header="renderHeader">
<template slot-scope="scope"> <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"> <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> <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> <span class="operate-span" @click="editNumSubmit(scope.row)">确定</span>
...@@ -101,19 +107,22 @@ ...@@ -101,19 +107,22 @@
<el-table-column label="操作" min-width="220px"> <el-table-column label="操作" min-width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<el-button type="text" @click="getLink(scope.row)">推广</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'" @click="getCouponList(scope.row.integralMallProId)">券码</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" @click="deleteList(scope.row, 1)">下架</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" @click="deleteList(scope.row, 2)">上架</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-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> <p style="line-height:1.5;padding: 10px 10px 20px;">确定删除该商品吗?</p>
<div style="text-align: right; margin: 0"> <div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button> <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> <el-button type="primary" size="mini" @click="deleteList(scope.row, 0, scope.$index)">确定</el-button>
</div> </div>
<el-button slot="reference" type="text">删除</el-button> <el-button slot="reference" type="text" v-if="scope.row.canEdit">删除</el-button>
</el-popover> </el-popover> -->
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -166,6 +175,9 @@ export default { ...@@ -166,6 +175,9 @@ export default {
giftType: '', //商品类型 giftType: '', //商品类型
sortColumn: '', sortColumn: '',
sortType: '', sortType: '',
showSelfStatus: false,
showFlag: false,
openFlag: false,
tableDate: [ tableDate: [
{ {
giftName: '1111' giftName: '1111'
...@@ -230,12 +242,23 @@ export default { ...@@ -230,12 +242,23 @@ export default {
this.sortColumn = this.giftListObj.sortColumn; this.sortColumn = this.giftListObj.sortColumn;
localStorage.removeItem('giftListObj'); //使用完就清除缓存 localStorage.removeItem('giftListObj'); //使用完就清除缓存
} }
this.getStatus();
this.getList(); this.getList();
}, },
methods: { methods: {
renderHeader(h, { column, $index }, index) { 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' }, '')])]); 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) { goRecord(item) {
if (item.cardType === 2) { if (item.cardType === 2) {
...@@ -258,7 +281,8 @@ export default { ...@@ -258,7 +281,8 @@ export default {
giftName: this.searchValue.trim(), giftName: this.searchValue.trim(),
giftType: this.giftType ? this.giftType : -1, giftType: this.giftType ? this.giftType : -1,
shelf: this.shelf ? this.shelf : -1, //上架状态 shelf: this.shelf ? this.shelf : -1, //上架状态
goodsType: this.goodsType //商品类型 goodsType: this.goodsType, //商品类型
showSelfFlag: this.showSelfStatus ? 1 : 0
}; };
this.loading = true; this.loading = true;
request.post('/api-integral-mall/page-gift', qs.stringify(params)).then(res => { request.post('/api-integral-mall/page-gift', qs.stringify(params)).then(res => {
...@@ -481,7 +505,7 @@ export default { ...@@ -481,7 +505,7 @@ export default {
sortColumn: this.sortColumn sortColumn: this.sortColumn
}; };
window.localStorage.setItem('giftListObj', JSON.stringify(this.giftListObj)); window.localStorage.setItem('giftListObj', JSON.stringify(this.giftListObj));
this.$router.push({ name: '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) { editNumber(item) {
...@@ -637,6 +661,9 @@ export default { ...@@ -637,6 +661,9 @@ export default {
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
}); });
},
selectInit(row, index) {
return row.canEdit;
} }
}, },
components: { components: {
...@@ -670,11 +697,11 @@ export default { ...@@ -670,11 +697,11 @@ export default {
.info-name { .info-name {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
width: 72%; width: 60%;
} }
.pro-ellipsis { .pro-ellipsis {
color: #303133; color: #303133;
height: 36px; height: 54px;
line-height: 18px; line-height: 18px;
/* width: 230px; */ /* width: 230px; */
font-size: 14px; font-size: 14px;
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
</div> </div>
</el-form-item> --> </el-form-item> -->
<el-form-item label="展现门店" required style="position:relative"> <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> <span v-if="sendChildData.storeType === 1" class="store-tip">若选中的门店分组下有新增的门店,系统不会默认选中此新增门店,请重新确认选择并保存礼品</span>
</el-form-item> </el-form-item>
<el-form-item label="限兑"> <el-form-item label="限兑">
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
</div> </div>
<div class="confim-btn" :style="{ width: fixedWidth + 'px' }"> <div class="confim-btn" :style="{ width: fixedWidth + 'px' }">
<el-form-item class="fix-btn"> <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-button @click="cancelGoodsForm" size="small">返回</el-button>
</el-form-item> </el-form-item>
</div> </div>
...@@ -395,10 +395,12 @@ export default { ...@@ -395,10 +395,12 @@ export default {
weekOptions: ['1', '2', '3', '4', '5', '6', '7'], weekOptions: ['1', '2', '3', '4', '5', '6', '7'],
// 门店控件 // 门店控件
sendChildData: { sendChildData: {
storeType: 0, storeType: 1,
storeGroupIds: '', storeGroupIds: '',
storeIds: [] storeIds: []
}, },
// sendChildData: {}, // 向子元素传递的对象
openFlag: true,
stockDisabled: false, //spu库存是否可输入 stockDisabled: false, //spu库存是否可输入
refash: false, refash: false,
giftProStandardJson: [], //规格列表 giftProStandardJson: [], //规格列表
...@@ -428,8 +430,9 @@ export default { ...@@ -428,8 +430,9 @@ export default {
dialogVisible: false, dialogVisible: false,
integralMallProId: '' integralMallProId: ''
}, },
textStock: 0 //文本券码库存数 textStock: 0, //文本券码库存数
canEdit: true,
groupIdDisableList: []
// // 人群筛选器 // // 人群筛选器
// // 可传参数 // // 可传参数
// // projectName: 'integral-mall', // 当前项目名 // // projectName: 'integral-mall', // 当前项目名
...@@ -444,13 +447,15 @@ export default { ...@@ -444,13 +447,15 @@ export default {
// responseParams: [] //回显的数据 // responseParams: [] //回显的数据
}; };
}, },
created() { mounted() {
this.getOpenStatus();
window.onbeforeunload = function(e) { window.onbeforeunload = function(e) {
// var storage = window.localStorage; // var storage = window.localStorage;
// storage.clear('giftListObj'); // storage.clear('giftListObj');
localStorage.removeItem('giftListObj'); localStorage.removeItem('giftListObj');
}; };
this.giftType = Number(this.$route.query.type); //列表上实物是1虚拟是0 this.giftType = Number(this.$route.query.type); //列表上实物是1虚拟是0
this.canEdit = Boolean(this.$route.query.canEdit);
this.mallProId = this.$route.query.giftId; this.mallProId = this.$route.query.giftId;
if (this.$route.query.proReferId !== '-1') { if (this.$route.query.proReferId !== '-1') {
//编辑 //编辑
...@@ -472,7 +477,12 @@ export default { ...@@ -472,7 +477,12 @@ export default {
this.refundTypeStatus = this.giftForm.changeType === 5 ? true : false; this.refundTypeStatus = this.giftForm.changeType === 5 ? true : false;
} }
if (this.mallProId !== '-1') { if (this.mallProId !== '-1') {
this.getInfo(); // setTimeout(() => {
// this.groupIdDisableList = this.$refs.selectTree.getDisGroupList;
// }, 1000);
// this.getDisGroupList();
// this.getInfo();
// this.getDisGroupList();
this.editChangeTypeStatus = true; this.editChangeTypeStatus = true;
} else { } else {
if (this.giftType === 0) { if (this.giftType === 0) {
...@@ -481,22 +491,45 @@ export default { ...@@ -481,22 +491,45 @@ export default {
this.mallProId === '-1'; this.mallProId === '-1';
} }
} }
// if (this.giftForm.changeType === 5) {
// this.refundTypeStatus = true;
// }
let val = { let val = {
storeType: 0, storeType: 0,
storeGroupIds: '', storeGroupIds: '',
storeIds: [] storeIds: []
}; };
this.getSelectGroupData(val); this.getSelectGroupData(val);
},
mounted: function() {
this.$nextTick(function() { this.$nextTick(function() {
window.addEventListener('scroll', this.onScroll, true); window.addEventListener('scroll', this.onScroll, true);
}); });
}, },
// mounted: function() {
// this.$nextTick(function() {
// window.addEventListener('scroll', this.onScroll, true);
// });
// // this.getGroupList();
// },
methods: { 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() { getCardInfo() {
let params = { let params = {
...@@ -686,10 +719,18 @@ export default { ...@@ -686,10 +719,18 @@ export default {
} }
this.giftForm.timeRangeList = timeRangeList; 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) { 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) { } else if (this.sendChildData.storeType === 2) {
let list = []; let list = [];
if (res.data.result.storeInfo) { if (res.data.result.storeInfo) {
...@@ -828,6 +869,7 @@ export default { ...@@ -828,6 +869,7 @@ export default {
getSpuStock(val) { getSpuStock(val) {
this.giftForm.virtualStock = val; this.giftForm.virtualStock = val;
}, },
// 礼品字数限制 // 礼品字数限制
goodsLimit(value) { goodsLimit(value) {
this.$nextTick(() => { this.$nextTick(() => {
......
...@@ -82,7 +82,8 @@ export default { ...@@ -82,7 +82,8 @@ export default {
let params = { let params = {
integralMallProRefundId: this.agreeRefundModal.integralMallProRefundId, integralMallProRefundId: this.agreeRefundModal.integralMallProRefundId,
refundMoney: this.agreeRefundModal.refundMoney, refundMoney: this.agreeRefundModal.refundMoney,
refundPoint: this.agreeRefundModal.refundPoint refundPoint: this.agreeRefundModal.refundPoint,
proId: this.agreeRefundModal.proId
}; };
this.submitLoading = true; this.submitLoading = true;
request.get('/api-integral-mall/agree-refund', { params }).then(res => { request.get('/api-integral-mall/agree-refund', { params }).then(res => {
......
...@@ -52,6 +52,7 @@ export default { ...@@ -52,6 +52,7 @@ export default {
if (valid) { if (valid) {
let params = { let params = {
integralMallProRefundId: this.refundModal.integralMallProRefundId, integralMallProRefundId: this.refundModal.integralMallProRefundId,
proId: this.refundModal.proId,
reason: this.refundForm.reason reason: this.refundForm.reason
}; };
this.submitLoading = true; this.submitLoading = true;
......
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
<div class="search-item"> <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> <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>
<div class="search-item">
<el-checkbox v-model="showSelfStatus" label="仅看本人" border @change="handleInputSearch" v-if="showFlag"></el-checkbox>
</div>
</div> </div>
<div class="fr"> <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> <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 { ...@@ -184,7 +187,9 @@ export default {
}, },
integralMallProId: '', integralMallProId: '',
requestProject: 'integral-mall', requestProject: 'integral-mall',
placement: 'top-start' placement: 'top-start',
showSelfStatus: false,
showFlag: false
}; };
}, },
watch: { watch: {
...@@ -194,10 +199,21 @@ export default { ...@@ -194,10 +199,21 @@ export default {
} }
}, },
created() { created() {
this.getStatus();
this.integralMallProId = this.$route.query.integralMallProId; this.integralMallProId = this.$route.query.integralMallProId;
this.getList(); this.getList();
}, },
methods: { 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) { handleClick(tab) {
this.orderStatus = tab.name; this.orderStatus = tab.name;
...@@ -326,7 +342,8 @@ export default { ...@@ -326,7 +342,8 @@ export default {
beginTime: this.beginTime, beginTime: this.beginTime,
endTime: this.endTime, endTime: this.endTime,
sortType: this.sortType, sortType: this.sortType,
integralMallProId: this.integralMallProId ? this.integralMallProId : '' integralMallProId: this.integralMallProId ? this.integralMallProId : '',
showSelfFlag: this.showSelfStatus ? 1 : 0
}; };
this.loading = true; this.loading = true;
request.post('/api-integral-mall/page-undeliver', qs.stringify(params)).then(res => { request.post('/api-integral-mall/page-undeliver', qs.stringify(params)).then(res => {
......
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
<div class="operate-top"> <div class="operate-top">
<div class="fl"> <div class="fl">
<div class="search-item"> <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>
<div class="search-item"> <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="2"></el-option>
<el-option label="在线发货(虚拟商品)" :value="3"></el-option> <el-option label="在线发货(虚拟商品)" :value="3"></el-option>
<el-option label="门店自提" :value="4"></el-option> <el-option label="门店自提" :value="4"></el-option>
...@@ -29,7 +29,10 @@ ...@@ -29,7 +29,10 @@
</el-select> </el-select>
</div> </div>
<div class="search-item"> <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> </div>
<div class="fr"> <div class="fr">
...@@ -348,7 +351,9 @@ export default { ...@@ -348,7 +351,9 @@ export default {
shopIntegralMallProExchangeId: '', //门店自提订单id shopIntegralMallProExchangeId: '', //门店自提订单id
writeOffCode: '', //核销码 writeOffCode: '', //核销码
submitLoading: false, //门店自提确认按钮 submitLoading: false, //门店自提确认按钮
giftOrderObj: {} //缓存数据 giftOrderObj: {}, //缓存数据
showSelfStatus: false,
showFlag: false
}; };
}, },
watch: { watch: {
...@@ -359,6 +364,7 @@ export default { ...@@ -359,6 +364,7 @@ export default {
}, },
created() { created() {
this.getNumber(); this.getNumber();
this.getStatus();
this.integralMallProId = this.$route.query.integralMallProId; this.integralMallProId = this.$route.query.integralMallProId;
if (localStorage.getItem('giftOrderObj')) { if (localStorage.getItem('giftOrderObj')) {
this.giftOrderObj = JSON.parse(localStorage.getItem('giftOrderObj')); this.giftOrderObj = JSON.parse(localStorage.getItem('giftOrderObj'));
...@@ -371,6 +377,7 @@ export default { ...@@ -371,6 +377,7 @@ export default {
this.pageType = this.giftOrderObj.pageType; //1、代表优惠券订单列表 2、礼品订单 this.pageType = this.giftOrderObj.pageType; //1、代表优惠券订单列表 2、礼品订单
this.beginTime = this.giftOrderObj.beginTime; this.beginTime = this.giftOrderObj.beginTime;
this.endTime = this.giftOrderObj.endTime; this.endTime = this.giftOrderObj.endTime;
this.showSelfStatus = this.giftOrderObj.showSelfStatus;
if (this.beginTime) { if (this.beginTime) {
this.dateValue[0] = this.beginTime; this.dateValue[0] = this.beginTime;
...@@ -386,6 +393,16 @@ export default { ...@@ -386,6 +393,16 @@ export default {
this.getList(); this.getList();
}, },
methods: { 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) { handleClick(tab) {
this.orderStatus = tab.name; this.orderStatus = tab.name;
...@@ -467,7 +484,8 @@ export default { ...@@ -467,7 +484,8 @@ export default {
beginTime: this.beginTime, beginTime: this.beginTime,
endTime: this.endTime, endTime: this.endTime,
sortType: this.sortType, sortType: this.sortType,
integralMallProId: this.integralMallProId ? this.integralMallProId : '' integralMallProId: this.integralMallProId ? this.integralMallProId : '',
showSelfFlag: this.showSelfStatus ? 1 : 0
}; };
this.loading = true; this.loading = true;
...@@ -761,7 +779,8 @@ export default { ...@@ -761,7 +779,8 @@ export default {
beginTime: this.beginTime, beginTime: this.beginTime,
endTime: this.endTime, endTime: this.endTime,
sortType: this.sortType, sortType: this.sortType,
integralMallProId: this.integralMallProId ? this.integralMallProId : '' integralMallProId: this.integralMallProId ? this.integralMallProId : '',
showSelfStatus: this.showSelfStatus
}; };
window.localStorage.setItem('giftOrderObj', JSON.stringify(this.giftOrderObj)); window.localStorage.setItem('giftOrderObj', JSON.stringify(this.giftOrderObj));
this.$router.push({ name: 'orderDetail', query: { integralMallProExchangeId: item.integralMallProExchangeId } }); this.$router.push({ name: 'orderDetail', query: { integralMallProExchangeId: item.integralMallProExchangeId } });
......
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
<div class="search-item"> <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> <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>
<div class="search-item">
<el-checkbox v-model="showSelfStatus" label="仅看本人" border @change="getListCurr" v-if="showFlag"></el-checkbox>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -38,7 +41,7 @@ ...@@ -38,7 +41,7 @@
<el-tab-pane label="退款关闭" name="2" class="goods-table-content"> </el-tab-pane> <el-tab-pane label="退款关闭" name="2" class="goods-table-content"> </el-tab-pane>
<div class="goods-list-content"> <div class="goods-list-content">
<el-table :data="tableData" ref="multipleTable" style="width: 100%" @sort-change="sortChange" v-loading="loading"> <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"> <el-table-column label="礼品信息" min-width="300px">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="gift-info"> <div class="gift-info">
...@@ -185,14 +188,16 @@ export default { ...@@ -185,14 +188,16 @@ export default {
//退款关闭 //退款关闭
refundModal: { refundModal: {
dialogVisible: false, dialogVisible: false,
integralMallProRefundId: '' //退款id integralMallProRefundId: '', //退款id
proId: ''
}, },
// 同意退款 // 同意退款
agreeRefundModal: { agreeRefundModal: {
dialogVisible: false, dialogVisible: false,
integralMallProRefundId: '', //退款id integralMallProRefundId: '', //退款id
refundMoney: '', refundMoney: '',
refundPoint: '' refundPoint: '',
proId: ''
}, },
deliverdModal: { deliverdModal: {
//发货 //发货
...@@ -209,13 +214,26 @@ export default { ...@@ -209,13 +214,26 @@ export default {
shopDialogVisible: false, //门店自提 shopDialogVisible: false, //门店自提
shopIntegralMallProExchangeId: '', //门店自提订单id shopIntegralMallProExchangeId: '', //门店自提订单id
writeOffCode: '', //核销码 writeOffCode: '', //核销码
submitLoading: false //门店自提确认按钮 submitLoading: false, //门店自提确认按钮
showSelfStatus: false,
showFlag: false
}; };
}, },
created() { created() {
this.getStatus();
this.getList(); this.getList();
}, },
methods: { 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切换
// tab切换 // tab切换
handleClick(tab) { handleClick(tab) {
...@@ -276,7 +294,8 @@ export default { ...@@ -276,7 +294,8 @@ export default {
sort: this.sortType, sort: this.sortType,
startTime: this.startTime, startTime: this.startTime,
endTime: this.endTime, endTime: this.endTime,
status: this.status === '-1' ? '' : this.status status: this.status === '-1' ? '' : this.status,
showSelfFlag: this.showSelfStatus ? 1 : 0
}; };
this.loading = true; this.loading = true;
request.post('/api-integral-mall/page-refunds', qs.stringify(params)).then(res => { request.post('/api-integral-mall/page-refunds', qs.stringify(params)).then(res => {
...@@ -296,8 +315,9 @@ export default { ...@@ -296,8 +315,9 @@ export default {
}, },
// 关闭退款 // 关闭退款
handleCloseRefund(item) { handleCloseRefund(item) {
this.refundModal.dialogVisible = true;
this.refundModal.integralMallProRefundId = item.integralMallProRefundId; this.refundModal.integralMallProRefundId = item.integralMallProRefundId;
this.refundModal.proId = item.proId;
this.refundModal.dialogVisible = true;
}, },
// 同意退款 // 同意退款
handleArgeeRefund(item) { handleArgeeRefund(item) {
...@@ -305,6 +325,7 @@ export default { ...@@ -305,6 +325,7 @@ export default {
this.agreeRefundModal.refundPoint = item.maxRefundPoints; this.agreeRefundModal.refundPoint = item.maxRefundPoints;
this.agreeRefundModal.integralMallProRefundId = item.integralMallProRefundId; this.agreeRefundModal.integralMallProRefundId = item.integralMallProRefundId;
this.agreeRefundModal.refundType = item.refundType; this.agreeRefundModal.refundType = item.refundType;
this.agreeRefundModal.proId = item.proId;
this.agreeRefundModal.dialogVisible = true; this.agreeRefundModal.dialogVisible = true;
}, },
// 发货 // 发货
......
...@@ -94,6 +94,7 @@ import request from '../../service/request.js'; ...@@ -94,6 +94,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 {
data() { data() {
return { return {
...@@ -111,13 +112,43 @@ export default { ...@@ -111,13 +112,43 @@ export default {
dialogVisible: false, dialogVisible: false,
selectIdList: [], //复选框选中的数据的id selectIdList: [], //复选框选中的数据的id
list: [{ timeRange: [] }] //初始数据 list: [{ timeRange: [] }] //初始数据
} },
enableAccessControl: false
}; };
}, },
created() { 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(); this.getStatus();
}, },
methods: { 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() { getSearchList() {
this.currentPage = 1; this.currentPage = 1;
this.getList(); this.getList();
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
</div> </div>
<div class="confim-btn" :style="{ width: fixedWidth + 'px' }"> <div class="confim-btn" :style="{ width: fixedWidth + 'px' }">
<el-form-item class="fix-btn" style="margin-left:32px;"> <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-button size="small" @click="goBack">返回</el-button>
</el-form-item> </el-form-item>
</div> </div>
...@@ -108,6 +108,7 @@ ...@@ -108,6 +108,7 @@
import request from '../../service/request.js'; 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 { confirmInfo } from '../../utils/user.js';
export default { export default {
data() { data() {
...@@ -222,7 +223,8 @@ export default { ...@@ -222,7 +223,8 @@ export default {
isAdd: true, isAdd: true,
storeWidgetKey: '', //传递的门店的KeyId storeWidgetKey: '', //传递的门店的KeyId
integralMallPickUpPointId: '-1', //自提点id integralMallPickUpPointId: '-1', //自提点id
clearableBtn: false clearableBtn: false,
enableAccessControl: false
}; };
}, },
created() { created() {
...@@ -388,6 +390,15 @@ export default { ...@@ -388,6 +390,15 @@ export default {
this.storeWidgetKey = this.uuid; 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) { async submitForm(form) {
if (this.integralMallPickUpPointId === '-1') { if (this.integralMallPickUpPointId === '-1') {
let flag = await this.$refs.storeGroup.isStoreSave(); let flag = await this.$refs.storeGroup.isStoreSave();
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancelSubmit('pickedModal')">取 消</el-button> <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> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
import request from '../../service/request.js'; import request from '../../service/request.js';
// import copy from '../../utils/clone.js'; // import copy from '../../utils/clone.js';
import getInputVal from '../../utils/common.js'; import getInputVal from '../../utils/common.js';
import { confirmInfo } from '../../utils/user.js';
export default { export default {
props: { props: {
pickedForm: { pickedForm: {
...@@ -166,7 +167,8 @@ export default { ...@@ -166,7 +167,8 @@ export default {
orderTimeHours: [{ required: true, message: '请输入时间', trigger: 'blur' }, { validator: orderTimeHoursValidator, trigger: 'blur' }] orderTimeHours: [{ required: true, message: '请输入时间', trigger: 'blur' }, { validator: orderTimeHoursValidator, trigger: 'blur' }]
}, },
submitLoading: false, submitLoading: false,
clearableBtn: false clearableBtn: false,
enableAccessControl: false
}; };
}, },
// created() { // created() {
...@@ -291,6 +293,15 @@ export default { ...@@ -291,6 +293,15 @@ export default {
this.pickedModal.timeRangeList[index].timeRange = null; 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) { submit(pickedModal) {
this.$refs[pickedModal].validate(valid => { this.$refs[pickedModal].validate(valid => {
if (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