分销商品添加移除功能,删除无用接口
parent
c6874acb1b
commit
1fe7c050a4
|
@ -346,14 +346,16 @@ export function getDistGoodsList (params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 选择分销商品
|
* 绑定、解绑分销商品
|
||||||
* @param distributionGoodsId 分销商品id
|
* @param distributionGoodsId 分销商品id
|
||||||
|
* @param checked 分销商品id,true为绑定,false为解绑
|
||||||
*/
|
*/
|
||||||
export function selectDistGoods (distributionGoodsId) {
|
export function selectDistGoods (params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/buyer/distributionGoods/checked/${distributionGoodsId}`,
|
url: `/buyer/distributionGoods/checked/${params.distributionGoodsId}`,
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
needToken: true
|
needToken: true,
|
||||||
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -457,7 +459,8 @@ export function memberMsgList (params) {
|
||||||
* 设置消息为已读
|
* 设置消息为已读
|
||||||
* @param {String} messageId 消息id
|
* @param {String} messageId 消息id
|
||||||
*/
|
*/
|
||||||
export function readMemberMsg (id) {
|
|
||||||
|
export function readMemberMsg (id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/buyer/member/message/${id}`,
|
url: `/buyer/member/message/${id}`,
|
||||||
method: Method.PUT,
|
method: Method.PUT,
|
||||||
|
@ -468,7 +471,7 @@ export function memberMsgList (params) {
|
||||||
* 删除会员消息
|
* 删除会员消息
|
||||||
* @param {String} messageId 消息id
|
* @param {String} messageId 消息id
|
||||||
*/
|
*/
|
||||||
export function delMemberMsg (id) {
|
export function delMemberMsg (id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/buyer/member/message/${id}`,
|
url: `/buyer/member/message/${id}`,
|
||||||
method: Method.DELETE,
|
method: Method.DELETE,
|
||||||
|
|
|
@ -47,7 +47,8 @@
|
||||||
<span> ¥{{ row.commission | unitPrice }}</span>
|
<span> ¥{{ row.commission | unitPrice }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="{ row }" slot="action">
|
<template slot-scope="{ row }" slot="action">
|
||||||
<Button type="primary" size="small" style="margin-right: 5px" @click="fenxiao(row)">分销商品</Button>
|
<Button type="success" size="small" style="margin-right: 5px" @click="fenxiao(row)">分销商品</Button>
|
||||||
|
<Button type="error" size="small" @click="selectGoods(row.id, false)">取消选择</Button>
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
<div class="page-size">
|
<div class="page-size">
|
||||||
|
@ -74,7 +75,7 @@
|
||||||
<span> ¥{{ row.commission | unitPrice }}</span>
|
<span> ¥{{ row.commission | unitPrice }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="{ row }" slot="action">
|
<template slot-scope="{ row }" slot="action">
|
||||||
<Button type="primary" size="small" style="margin-right: 5px" @click="selectGoods(row.id)">选择商品</Button>
|
<Button type="primary" size="small" style="margin-right: 5px" @click="selectGoods(row.id, true)">选择商品</Button>
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
<div class="page-size">
|
<div class="page-size">
|
||||||
|
@ -158,7 +159,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {distribution, applyDistribution, distCash, distCashHistory, getDistOrderList, getDistGoodsList, selectDistGoods} from '@/api/member.js'
|
import {distribution, applyDistribution, distCash, distCashHistory, getDistGoodsList, selectDistGoods} from '@/api/member.js'
|
||||||
import { IDCard } from '@/plugins/RegExp.js';
|
import { IDCard } from '@/plugins/RegExp.js';
|
||||||
import vueQr from 'vue-qr';
|
import vueQr from 'vue-qr';
|
||||||
export default {
|
export default {
|
||||||
|
@ -187,7 +188,7 @@ export default {
|
||||||
{title: '商品名称', slot: 'name', width: 400},
|
{title: '商品名称', slot: 'name', width: 400},
|
||||||
{title: '商品价格', slot: 'price'},
|
{title: '商品价格', slot: 'price'},
|
||||||
{title: '佣金', slot: 'commission'},
|
{title: '佣金', slot: 'commission'},
|
||||||
{title: '操作', slot: 'action', width: 120}
|
{title: '操作', slot: 'action', minWidth: 120}
|
||||||
],
|
],
|
||||||
logColumns: [ // 日志表头
|
logColumns: [ // 日志表头
|
||||||
{title: '编号', slot: 'sn'},
|
{title: '编号', slot: 'sn'},
|
||||||
|
@ -262,9 +263,6 @@ export default {
|
||||||
} else if (tab === 'goodsUncheck') {
|
} else if (tab === 'goodsUncheck') {
|
||||||
this.params.checked = false
|
this.params.checked = false
|
||||||
this.getGoodsData()
|
this.getGoodsData()
|
||||||
} else if (tab === 'order') {
|
|
||||||
this.orderParams.pageNumber = 1
|
|
||||||
this.getOrderData()
|
|
||||||
} else if (tab === 'log') {
|
} else if (tab === 'log') {
|
||||||
this.logParams.pageNumber = 1
|
this.logParams.pageNumber = 1
|
||||||
this.getLog()
|
this.getLog()
|
||||||
|
@ -278,10 +276,14 @@ export default {
|
||||||
this.logParams.pageNumber = val;
|
this.logParams.pageNumber = val;
|
||||||
this.getLog()
|
this.getLog()
|
||||||
},
|
},
|
||||||
selectGoods (id) { // 选择商品
|
selectGoods (id, checked) { // 选择商品
|
||||||
selectDistGoods(id).then(res => {
|
let params = {
|
||||||
|
distributionGoodsId: id,
|
||||||
|
checked: checked
|
||||||
|
}
|
||||||
|
selectDistGoods(params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success('分销商品选择成功,请在已选商品中查看')
|
this.$Message.success('操作成功!')
|
||||||
this.getGoodsData()
|
this.getGoodsData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -296,11 +298,6 @@ export default {
|
||||||
if (res.success) this.goodsData = res.result
|
if (res.success) this.goodsData = res.result
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getOrderData () { // 订单数据
|
|
||||||
getDistOrderList(this.orderParams).then(res => {
|
|
||||||
if (res.success) this.goodsData = res.result
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getLog () { // 提现历史
|
getLog () { // 提现历史
|
||||||
distCashHistory(this.logParams).then(res => {
|
distCashHistory(this.logParams).then(res => {
|
||||||
if (res.success) this.logData = res.result
|
if (res.success) this.logData = res.result
|
||||||
|
|
|
@ -259,13 +259,14 @@ export default new Router({
|
||||||
{
|
{
|
||||||
path: 'Favorites',
|
path: 'Favorites',
|
||||||
name: 'Favorites',
|
name: 'Favorites',
|
||||||
component: Favorites
|
component: Favorites,
|
||||||
|
meta: {title: '我的收藏'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'Distribution',
|
path: 'Distribution',
|
||||||
name: 'Distribution',
|
name: 'Distribution',
|
||||||
component: Distribution,
|
component: Distribution,
|
||||||
meta: {title: '我的投诉'}
|
meta: {title: '分销推荐'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'Point',
|
path: 'Point',
|
||||||
|
|
Loading…
Reference in New Issue