|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <m-dialog title="分润明细" ref="dialog" width="1280px">
|
|
|
+ <m-dialog title="分润明细" ref="dialog" width="1360px">
|
|
|
<m-table
|
|
|
clearHeader
|
|
|
shadow="never"
|
|
@@ -12,36 +12,55 @@
|
|
|
@page-change="onPageChange"
|
|
|
@sort-change="onSortChange"
|
|
|
>
|
|
|
+ <template #alreadyDistributedRatio="{ row }">
|
|
|
+ {{ row.alreadyDistributedRatio * 100 }} %
|
|
|
+ </template>
|
|
|
+ <template #employeeProfitSharingRatio="{ row }">
|
|
|
+ {{ row.employeeProfitSharingRatio * 100 }} %
|
|
|
+ </template>
|
|
|
<template #actions="{ row }">
|
|
|
- <!-- <m-button type="primary" text @click="onDetails(row)">查看明细</m-button> -->
|
|
|
- <m-button type="primary" text @click="onClaim(row)" >分润认领</m-button>
|
|
|
- <m-button type="primary" text @click="onClaim(row)" >专业部门分配</m-button>
|
|
|
+ <m-button
|
|
|
+ v-if="!majorOrganization"
|
|
|
+ type="primary"
|
|
|
+ text
|
|
|
+ @click="onClaim(row)"
|
|
|
+ :disabled="row.alreadyDistributedRatio * 100 >= maxRatio"
|
|
|
+ >
|
|
|
+ {{ row.alreadyDistributedRatio * 100 >= maxRatio ? '已分完' : '分润'}}
|
|
|
+ </m-button>
|
|
|
+ <m-button v-else type="primary" text @click="onClaimByDept(row)" >专业部门分配</m-button>
|
|
|
</template>
|
|
|
</m-table>
|
|
|
- <SharingClaimDetailsClaim ref="sharingClaimDetailsClaimRefs"></SharingClaimDetailsClaim>
|
|
|
+ <SharingClaimDetailsClaim ref="sharingClaimDetailsClaimRefs" @success="getPage"></SharingClaimDetailsClaim>
|
|
|
+ <SharingClaimDetailsClaimByDept ref="sharingClaimDetailsClaimByDeptRefs" @success="getPage"></SharingClaimDetailsClaimByDept>
|
|
|
</m-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- getProfitSharingClaim
|
|
|
+ getProfitSharingClaim,
|
|
|
+ getClaimRatioMax
|
|
|
} from '@/api/salary'
|
|
|
import SharingClaimDetailsClaim from './sharingClaimDetailsClaim'
|
|
|
+import SharingClaimDetailsClaimByDept from './sharingClaimDetailsClaimByDept.vue'
|
|
|
export default {
|
|
|
name: 'sharingClaimDetails',
|
|
|
components: {
|
|
|
- SharingClaimDetailsClaim
|
|
|
+ SharingClaimDetailsClaim,
|
|
|
+ SharingClaimDetailsClaimByDept
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
headers: [
|
|
|
{ label: '机构名称', prop: 'organizationName', sortable: false },
|
|
|
- { label: '数据日期', prop: 'dataDate', width: 120 },
|
|
|
- { label: '客户编号', prop: 'customerId', align: 'center', width: 120 },
|
|
|
+ { label: '数据日期', prop: 'dataDate', width: 105 },
|
|
|
+ { label: '客户编号', prop: 'customerId', align: 'center', width: 105 },
|
|
|
{ label: '一级科目编码/名称', prop: 'oneLevelSubject', width: 180 },
|
|
|
{ label: '二级科目编码/名称', prop: 'twoLevelSubject', width: 180 },
|
|
|
- { label: '金额', prop: 'amount' },
|
|
|
- { label: '员工分润比例', prop: 'employeeProfitSharingRatio', align: 'center', width: 140 },
|
|
|
+ { label: '认领金额', prop: 'amount', align: 'center', width: 105 },
|
|
|
+ { label: '认领比例', prop: 'employeeProfitSharingRatio', align: 'center', width: 105 },
|
|
|
+ { label: '分润金额', prop: 'residualAmount', align: 'center', width: 105 },
|
|
|
+ { label: '分润比例', prop: 'alreadyDistributedRatio', align: 'center', width: 105 },
|
|
|
{ label: '管户层级标识', prop: 'customerLevelIdentifier', width: 140 },
|
|
|
{ label: '客户类别标识', prop: 'customerCategoryIdentifier', width: 140 },
|
|
|
{ label: '统一认证号1', prop: 'unifiedCertificationNumber1', width: 150 },
|
|
@@ -66,17 +85,30 @@ export default {
|
|
|
twoLevelSubject: null,
|
|
|
customerLevelIdentifier: null,
|
|
|
customerCategoryIdentifier: null
|
|
|
- }
|
|
|
+ },
|
|
|
+ majorOrganization: false, // 是否是专业机构分润
|
|
|
+ maxRatio: 0 // 最大可分润比例
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- open (item) {
|
|
|
+ async open (item) {
|
|
|
+ this.majorOrganization = item.majorOrganization
|
|
|
Object.keys(this.searchValues).forEach(key => {
|
|
|
this.searchValues[key] = item[key]
|
|
|
})
|
|
|
this.$refs.dialog.open()
|
|
|
+ this.loading = true
|
|
|
+ await this.getRatioMax()
|
|
|
this.getPage()
|
|
|
},
|
|
|
+ async getRatioMax () {
|
|
|
+ try {
|
|
|
+ const { data } = await getClaimRatioMax()
|
|
|
+ this.maxRatio = data
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error(error)
|
|
|
+ }
|
|
|
+ },
|
|
|
async getPage () {
|
|
|
this.loading = true
|
|
|
try {
|
|
@@ -87,7 +119,6 @@ export default {
|
|
|
},
|
|
|
...this.searchValues
|
|
|
})
|
|
|
- // this.majorOrganization = this.organizationItems.find(e => e.organizationNo === this.searchValues.manageOrganizationNo).majorOrganization
|
|
|
this.items = data.records
|
|
|
this.total = data.total
|
|
|
} catch (error) {
|
|
@@ -97,7 +128,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onClaim (item) {
|
|
|
- this.$refs.sharingClaimDetailsClaimRefs.open(item)
|
|
|
+ this.$refs.sharingClaimDetailsClaimRefs.open({
|
|
|
+ ...item,
|
|
|
+ maxRatio: this.maxRatio
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onClaimByDept (item) {
|
|
|
+ this.$refs.sharingClaimDetailsClaimByDeptRefs.open({
|
|
|
+ ...item,
|
|
|
+ maxRatio: this.maxRatio
|
|
|
+ })
|
|
|
},
|
|
|
onPageChange (index) {
|
|
|
this.pageInfo.current = index
|