Commit f26f0330 by 萱草

强刷和sku删除添加问题优化

parent 9946ce44
<!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.f7c2ec7ff37695e8cc4e9433da186a59.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.35.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.12.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.41.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.13.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.file.myqcloud.com/components/store-card.2.0.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.a4762ca4bf21a128c7b4.js></script><script type=text/javascript src=./static/js/app.1428fec6ba0da0fc1429.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.477d43b8f6e175ab71244365bd61c69b.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.35.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.12.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.41.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.13.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.file.myqcloud.com/components/store-card.2.0.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.be8aabf13848b6ca3aa7.js></script><script type=text/javascript src=./static/js/app.2874bc572e49f39020e0.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.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -4,38 +4,71 @@
<div class="wechat-url" style="margin-bottom:30px;">
<p style="font-weight: 600;margin-bottom:15px">页面链接</p>
<div style="display:flex;align-items: center">
<el-input type="textarea" :rows="2" v-model="modalData.pageUrl" disabled> </el-input>
<a href="javaScript:void(0)" style="width:40px;margin-left:20px" v-clipboard:copy="modalData.pageUrl" v-clipboard:success="onCopy" v-clipboard:error="onError">
复制
</a>
<el-input type="textarea" :rows="2" v-model="modalData.pageUrl" disabled></el-input>
<a href="javaScript:void(0)" style="width:40px;margin-left:20px" v-clipboard:copy="modalData.pageUrl" v-clipboard:success="onCopy" v-clipboard:error="onError">复制</a>
</div>
</div>
<div class="wechat-img-box" v-loading="modalData.loading">
<p style="font-weight: 600;margin-bottom:15px">小程序二维码</p>
<img :src="modalData.imgUrl" class="wechat-img" style="width:140px;height:140px;" />
</div>
<div class="wechat-force">
<el-button class="force-button" type="text" @click="force">重新生成</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
// import request from '../../../service/request.js';
import request from '../service/request';
export default {
props: {
modalData: {
type: Object
},
integralMallProId: {
type: String,
default() {
return '';
}
}
},
data() {
return {
// loading:true,
forceIntegralMallProId: ''
};
},
watch: {
integralMallProId: function(value) {
this.forceIntegralMallProId = value;
}
},
methods: {
onCopy(e) {
this.$message.success('复制成功');
},
onError(e) {
this.$message.error('复制失败');
},
force() {
let params = {
integralMallProId: this.forceIntegralMallProId,
type: 'gift',
isForce: '1'
};
this.modalData.show = true;
request.get('/api-integral-mall/get-qRCode', { params }).then(res => {
if (res.data.errorCode === 0) {
this.modalData.show = true;
this.modalData.pageUrl = res.data.result.page;
this.modalData.imgUrl = res.data.result.url;
this.modalData.loading = false;
} else {
this.$message.error(res.data.message);
}
});
}
}
};
......@@ -49,4 +82,16 @@ export default {
width: 200px;
height: 200px;
}
.wechat-force {
margin: 30px auto 50px;
text-align: center;
}
.force-button {
background-color: #1890ff;
color: #fff;
border-color: #1890ff;
font-size: 14px;
line-height: 14px;
padding: 8px 15px;
}
</style>
......@@ -147,7 +147,7 @@
</div>
<!-- 推广 -->
<eqCode :modalData="modalData"></eqCode>
<eqCode :modalData="modalData" :integralMallProId="integralMallProId"></eqCode>
<!-- 调整积分费用 -->
<editInfo :editInfoModal="editInfoModal" @getList="getList"></editInfo>
<!-- <stockModal :intergralModal="intergralModal" @getList="getList"></stockModal> -->
......@@ -205,7 +205,8 @@ export default {
packageDialog: false,
packageData: {
integralMallProId: ''
}
},
integralMallProId: ''
};
},
created() {
......@@ -301,6 +302,7 @@ export default {
// 商品链接
getLink(item) {
this.modalData.loading = true;
this.integralMallProId = item.integralMallProId;
let params = {
integralMallProId: item.integralMallProId,
type: 'card'
......
......@@ -350,46 +350,34 @@ export default {
list.push(item.valueList);
}
}
list.push([
{
valueName: '',
valueId: ''
}
]);
list.push([
{
valueName: '',
valueId: ''
}
]);
list.push([
{
valueName: '',
valueId: ''
}
]);
list.push([
{
valueName: '',
valueId: ''
}
]);
list.push([
{
valueName: '',
valueId: ''
}
]);
list.push([
{
valueName: '',
valueId: ''
}
]);
let len = 6;
while (len--) {
list.push([{ valueName: '', valueId: '' }]);
}
} else {
list = [];
}
this.skuList = copy(this.combine(copy(list)));
// 获取有效的valueId转换成xxx-xxx的字符串
const getKey = arr => {
return arr
.filter(i => i.valueId !== '')
.map(i => i.valueId)
.join('-');
};
// 以valueId字符串为唯一标识符的数据原本
let map = (this.skuList || []).reduce((map, el) => {
if (Array.isArray(el)) {
let key = getKey(el);
key && map.set(key, el);
}
return map;
}, new Map());
let skuList = copy(this.combine(copy(list)));
this.skuList = skuList.map(el => {
// 如果新的skuList中的valueId key在数据原本中存在,为保留之前填充的值,需返回旧数据
let key = getKey(el);
return map.get(key) || el;
});
},
// 表格里面的图片上传成功
tableUploadSuccess(response, file, fileList, item2) {
......
......@@ -3,7 +3,9 @@
<div class="mall-content-section">
<div class="mall-content-title">
<el-breadcrumb separator="/">
<el-breadcrumb-item :to="{ path: '' }"><a href="/report/#/memberSummary">首页</a></el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '' }">
<a href="/report/#/memberSummary">首页</a>
</el-breadcrumb-item>
<el-breadcrumb-item>积分商城</el-breadcrumb-item>
<el-breadcrumb-item>商品</el-breadcrumb-item>
<el-breadcrumb-item>礼品</el-breadcrumb-item>
......@@ -15,11 +17,11 @@
<div class="section">
<!-- <div class="page-info">
<h3><i class="el-icon-info"></i>优惠券已支持主图和图文详情,如需再发布以“微信兑换券”来配送的礼品,请直接前往优惠券中设置</h3>
</div> -->
</div>-->
<div class="operate-top">
<div class="fl">
<div class="search-item">
<el-input v-model="searchValue" placeholder="请输入礼品名称/编码进行搜索" prefix-icon="el-icon-search" clearable class="w-280" @keyup.enter.native="getSearchList" @clear="getSearchList"> </el-input>
<el-input v-model="searchValue" placeholder="请输入礼品名称/编码进行搜索" prefix-icon="el-icon-search" clearable class="w-280" @keyup.enter.native="getSearchList" @clear="getSearchList"></el-input>
</div>
<div class="search-item">
<el-select v-model="shelf" placeholder="上下架状态" clearable class="w-140" @change="getListCurr">
......@@ -56,13 +58,16 @@
</div>
<div v-loading="loading">
<el-table ref="multipleTable" :data="tableDate" style="width: 100%" @sort-change="sortChange" @selection-change="handleSelectAll">
<el-table-column type="selection" width="50" :selectable="selectInit"> </el-table-column>
<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="" />
<img :src="scope.row.mainImageUrl" alt />
<div class="info-name">
<p class="pro-ellipsis intergral-edit">{{ scope.row.proName }}<i class="el-icon-edit" @click="editProName(scope.row)"></i></p>
<p class="pro-ellipsis intergral-edit">
{{ scope.row.proName }}
<i class="el-icon-edit" @click="editProName(scope.row)"></i>
</p>
<p class="category-ellipsis">编码:{{ scope.row.proCode }}</p>
</div>
</div>
......@@ -70,17 +75,26 @@
</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')" v-if="scope.row.canEdit"></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" v-if="scope.row.canEdit" @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 && scope.row.canEdit" @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">
......@@ -102,9 +116,12 @@
</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" v-if="scope.row.canEdit" @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>
<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="editNumCancel(scope.row)">取消</span>
</div>
......@@ -129,7 +146,7 @@
<el-button type="primary" size="mini" @click="deleteList(scope.row, 0, scope.$index)">确定</el-button>
</div>
<el-button slot="reference" type="text" v-if="scope.row.canEdit">删除</el-button>
</el-popover> -->
</el-popover>-->
</div>
</template>
</el-table-column>
......@@ -144,7 +161,7 @@
</el-table>
<div class="pagination-conteiner" v-show="tableDate.length > 0">
<div class="pagination">
<dm-pagination v-if="total != 0" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="pageSizes" :page-size="pageSize" layout="total, sizes, prev, pager, next" :total="total"> </dm-pagination>
<dm-pagination v-if="total != 0" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="pageSizes" :page-size="pageSize" layout="total, sizes, prev, pager, next" :total="total"></dm-pagination>
</div>
</div>
</div>
......@@ -153,7 +170,7 @@
<!-- 修改礼品名称 -->
<editName :editInfoModal="editInfoModal" @getList="getList"></editName>
<!-- 推广 -->
<eqCode :modalData="modalData"></eqCode>
<eqCode :modalData="modalData" :integralMallProId="integralMallProId"></eqCode>
<!-- 新增礼品 -->
<selectType :addModalData="addModalData"></selectType>
<!-- 调整积分费用 -->
......@@ -231,7 +248,8 @@ export default {
},
couponListSearch: '',
couponCurrentPage: 1,
couponPageSize: 20
couponPageSize: 20,
integralMallProId: ''
};
},
created() {
......@@ -343,6 +361,7 @@ export default {
// 商品链接
getLink(item) {
this.modalData.loading = true;
this.integralMallProId = item.integralMallProId;
let params = {
integralMallProId: item.integralMallProId,
type: 'gift'
......
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