立即支付分成
This commit is contained in:
parent
db3d5319ed
commit
a8b5cbe62d
|
@ -53,3 +53,11 @@ export function listBonusByBill(billId) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 支付分成
|
||||||
|
export function payBonus(id) {
|
||||||
|
return request({
|
||||||
|
url: `/ss/bonus/${id}/pay`,
|
||||||
|
method: 'put'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -224,3 +224,14 @@ export const DeviceOnlineStatus = {
|
||||||
ONLINE: "1", // 在线
|
ONLINE: "1", // 在线
|
||||||
OFFLINE: "0", // 离线
|
OFFLINE: "0", // 离线
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const BonusStatus = {
|
||||||
|
UN_DIVIDEND: "1", // 未出账
|
||||||
|
WAIT_DIVIDE: "2", // 待分成
|
||||||
|
DIVIDEND: "3", // 已分成
|
||||||
|
|
||||||
|
// 允许支付的状态
|
||||||
|
canPay() {
|
||||||
|
return [this.WAIT_DIVIDE]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -106,24 +106,18 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</template>
|
</template>
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<!-- <template slot-scope="scope">-->
|
<template slot-scope="scope">
|
||||||
<!-- <el-button-->
|
<el-button
|
||||||
<!-- size="mini"-->
|
size="mini"
|
||||||
<!-- type="text"-->
|
type="text"
|
||||||
<!-- icon="el-icon-edit"-->
|
icon="el-icon-wallet"
|
||||||
<!-- @click="handleUpdate(scope.row)"-->
|
@click="handlePay(scope.row)"
|
||||||
<!-- v-hasPermi="['ss:bonus:edit']"-->
|
v-hasPermi="['ss:bonus:pay']"
|
||||||
<!-- >修改</el-button>-->
|
v-show="BonusStatus.canPay().includes(scope.row.status)"
|
||||||
<!-- <el-button-->
|
>立即支付</el-button>
|
||||||
<!-- size="mini"-->
|
</template>
|
||||||
<!-- type="text"-->
|
</el-table-column>
|
||||||
<!-- icon="el-icon-delete"-->
|
|
||||||
<!-- @click="handleDelete(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['ss:bonus:remove']"-->
|
|
||||||
<!-- >删除</el-button>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
@ -195,9 +189,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listBonus, getBonus, delBonus, addBonus, updateBonus } from "@/api/ss/bonus";
|
import { listBonus, getBonus, delBonus, addBonus, updateBonus, payBonus } from '@/api/ss/bonus'
|
||||||
import { $showColumns, $view } from '@/utils/mixins'
|
import { $showColumns, $view } from '@/utils/mixins'
|
||||||
import { BonusArrivalType, SmUserType, views } from '@/utils/constants'
|
import { BonusArrivalType, BonusStatus, SmUserType, views } from '@/utils/constants'
|
||||||
import UserLink from '@/components/Business/SmUser/UserLink.vue'
|
import UserLink from '@/components/Business/SmUser/UserLink.vue'
|
||||||
|
|
||||||
// 默认排序字段
|
// 默认排序字段
|
||||||
|
@ -208,14 +202,6 @@ const defaultSort = {
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Bonus",
|
name: "Bonus",
|
||||||
computed: {
|
|
||||||
BonusArrivalType() {
|
|
||||||
return BonusArrivalType
|
|
||||||
},
|
|
||||||
SmUserType() {
|
|
||||||
return SmUserType
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: { UserLink },
|
components: { UserLink },
|
||||||
mixins: [$showColumns, $view],
|
mixins: [$showColumns, $view],
|
||||||
dicts: ['bonus_status', 'bonus_arrival_type'],
|
dicts: ['bonus_status', 'bonus_arrival_type'],
|
||||||
|
@ -231,7 +217,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
// 字段列表
|
// 字段列表
|
||||||
columns: [
|
columns: [
|
||||||
{key: 'id', visible: true, label: '分成编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
{key: 'id', visible: false, label: '分成编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
{key: 'billNo', visible: true, label: '订单编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "180"},
|
{key: 'billNo', visible: true, label: '订单编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "180"},
|
||||||
{key: 'status', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'status', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'arrivalName', visible: true, label: '收款方', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'arrivalName', visible: true, label: '收款方', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
@ -241,9 +227,9 @@ export default {
|
||||||
{key: 'waitAmount', visible: true, label: '待分金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'waitAmount', visible: true, label: '待分金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'payedAmount', visible: true, label: '已分金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'payedAmount', visible: true, label: '已分金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'refundAmount', visible: true, label: '退款金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'refundAmount', visible: true, label: '退款金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'prePayTime', visible: true, label: '预计分成时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "180"},
|
{key: 'prePayTime', visible: true, label: '预计分成', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
{key: 'payTime', visible: true, label: '实际分成时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "180"},
|
{key: 'payTime', visible: true, label: '实际分成', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
{key: 'createTime', visible: true, label: '创建时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "180"},
|
{key: 'createTime', visible: true, label: '创建时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
],
|
],
|
||||||
// 排序方式
|
// 排序方式
|
||||||
orderSorts: ['ascending', 'descending', null],
|
orderSorts: ['ascending', 'descending', null],
|
||||||
|
@ -319,6 +305,17 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
BonusStatus() {
|
||||||
|
return BonusStatus
|
||||||
|
},
|
||||||
|
BonusArrivalType() {
|
||||||
|
return BonusArrivalType
|
||||||
|
},
|
||||||
|
SmUserType() {
|
||||||
|
return SmUserType
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
...this.queryParams,
|
...this.queryParams,
|
||||||
|
@ -336,6 +333,20 @@ export default {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handlePay(row) {
|
||||||
|
this.$confirm(`是否确认支付【订单编号】${row.billNo}【收款方】${row.arrivalName}的分成?`, {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
payBonus(row.id).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$message.success("支付分成成功");
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
/** 当排序按钮被点击时触发 **/
|
/** 当排序按钮被点击时触发 **/
|
||||||
onSortChange(column) {
|
onSortChange(column) {
|
||||||
if (column.order == null) {
|
if (column.order == null) {
|
||||||
|
|
|
@ -114,6 +114,9 @@
|
||||||
<el-tab-pane label="收入订单" lazy>
|
<el-tab-pane label="收入订单" lazy>
|
||||||
<recharge :query="{mchId: detail.userId}" :view="views.mch"/>
|
<recharge :query="{mchId: detail.userId}" :view="views.mch"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="分成记录" lazy>
|
||||||
|
<bonus :query="{arrivalId: detail.userId, arrivalTypes: BonusArrivalType.userList()}" :view="views.user"/>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane label="提现列表" lazy>
|
<el-tab-pane label="提现列表" lazy>
|
||||||
<withdraw :query="{userId: detail.userId}" :view="views.user"/>
|
<withdraw :query="{userId: detail.userId}" :view="views.user"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
@ -164,17 +167,21 @@ import BooleanTag from '@/components/BooleanTag/index.vue'
|
||||||
import Withdraw from '@/views/system/withdraw/index.vue'
|
import Withdraw from '@/views/system/withdraw/index.vue'
|
||||||
import RealName from '@/views/ss/realName/index.vue'
|
import RealName from '@/views/ss/realName/index.vue'
|
||||||
import UserConfigDialog from '@/views/system/smUser/components/UserConfigDialog.vue'
|
import UserConfigDialog from '@/views/system/smUser/components/UserConfigDialog.vue'
|
||||||
import { SmUserType } from '@/utils/constants'
|
import { BonusArrivalType, SmUserType } from '@/utils/constants'
|
||||||
import ReceiveBill from '@/views/ss/receiveBill/index.vue'
|
import ReceiveBill from '@/views/ss/receiveBill/index.vue'
|
||||||
import Risk from '@/views/ss/risk/index.vue'
|
import Risk from '@/views/ss/risk/index.vue'
|
||||||
import UserDailyRechargeReport from '@/views/system/smUser/components/UserDailyRechargeReport.vue'
|
import UserDailyRechargeReport from '@/views/system/smUser/components/UserDailyRechargeReport.vue'
|
||||||
|
import Bonus from '@/views/ss/bonus/index.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'User/:userId',
|
name: 'User/:userId',
|
||||||
mixins: [$view, $serviceType],
|
mixins: [$view, $serviceType],
|
||||||
components: { UserDailyRechargeReport, Risk, ReceiveBill, UserConfigDialog, RealName, Withdraw, BooleanTag, Recharge, Device, Suit, Account, RecordBalance, Store, Access, UserRechargeReport, UserAccount, UserDevice, LineChart},
|
components: { Bonus, UserDailyRechargeReport, Risk, ReceiveBill, UserConfigDialog, RealName, Withdraw, BooleanTag, Recharge, Device, Suit, Account, RecordBalance, Store, Access, UserRechargeReport, UserAccount, UserDevice, LineChart},
|
||||||
dicts: ['sm_user_type', 'service_type', 'withdraw_service_type'],
|
dicts: ['sm_user_type', 'service_type', 'withdraw_service_type'],
|
||||||
computed: {
|
computed: {
|
||||||
|
BonusArrivalType() {
|
||||||
|
return BonusArrivalType
|
||||||
|
},
|
||||||
SmUserType() {
|
SmUserType() {
|
||||||
return SmUserType
|
return SmUserType
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user