|
@@ -13,10 +13,22 @@
|
|
|
@sort-change="onSortChange"
|
|
|
>
|
|
|
<template #actions="{ row }">
|
|
|
- <m-button type="primary" text @click="onDetails(row)">查看明细</m-button>
|
|
|
+ <!-- <m-button type="primary" text @click="onDetails(row)">查看明细</m-button> -->
|
|
|
+ <m-button
|
|
|
+ v-if="!majorOrganization"
|
|
|
+ type="primary"
|
|
|
+ text
|
|
|
+ @click="onClaim(row)"
|
|
|
+ :disabled="+row.amount === 0"
|
|
|
+ >
|
|
|
+ 分润
|
|
|
+ </m-button>
|
|
|
+ <m-button v-else type="primary" text @click="onClaimByDept(row)" >专业部门分配</m-button>
|
|
|
</template>
|
|
|
</m-table>
|
|
|
- <SharingClaimDetails ref="sharingClaimDetailsRefs" />
|
|
|
+ <!-- <SharingClaimDetails ref="sharingClaimDetailsRefs" /> -->
|
|
|
+ <SharingClaimDetailsClaim ref="sharingClaimDetailsClaimRefs" @success="getPage"></SharingClaimDetailsClaim>
|
|
|
+ <SharingClaimDetailsClaimByDept ref="sharingClaimDetailsClaimByDeptRefs" @success="getPage"></SharingClaimDetailsClaimByDept>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -28,12 +40,15 @@ import {
|
|
|
// getCustomerProfitSharingClaimAdd,
|
|
|
getAccessOrganization
|
|
|
} from '@/api/salary'
|
|
|
-import SharingClaimDetails from './sharingClaimDetails.vue'
|
|
|
+// import SharingClaimDetails from './sharingClaimDetails.vue'
|
|
|
+import SharingClaimDetailsClaim from './sharingClaimDetailsClaim.vue'
|
|
|
+import SharingClaimDetailsClaimByDept from './sharingClaimDetailsClaimByDept.vue'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
export default {
|
|
|
name: 'salaryClaimSharing',
|
|
|
components: {
|
|
|
- SharingClaimDetails
|
|
|
+ SharingClaimDetailsClaimByDept,
|
|
|
+ SharingClaimDetailsClaim
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
@@ -50,6 +65,7 @@ export default {
|
|
|
{ label: '客户编号', prop: 'customerId', align: 'center', width: 120 },
|
|
|
{ label: '一级科目编码/名称', prop: 'oneLevelSubject' },
|
|
|
{ label: '二级科目编码/名称', prop: 'twoLevelSubject' },
|
|
|
+ { label: '总金额', prop: 'amount' },
|
|
|
// { label: '金额', prop: 'amount' },
|
|
|
// { label: '员工分润比例', prop: 'employeeProfitSharingRatio', align: 'center', width: 140 },
|
|
|
{ label: '管户层级标识', prop: 'customerLevelIdentifier', width: 140 },
|
|
@@ -118,6 +134,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
+ },
|
|
|
+ majorOrganization () {
|
|
|
+ return this.organizationItems.find(e => e.organizationNo === this.queryValues.manageOrganizationNo)?.majorOrganization ?? false
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -173,17 +192,20 @@ export default {
|
|
|
this.$message.error(error)
|
|
|
}
|
|
|
},
|
|
|
- onDetails (item) {
|
|
|
- this.$refs.sharingClaimDetailsRefs.open({
|
|
|
- month: this.queryValues.month,
|
|
|
- majorOrganization: this.organizationItems.find(e => e.organizationNo === this.queryValues.manageOrganizationNo)?.majorOrganization ?? false,
|
|
|
- manageOrganizationNo: item.organizationNo,
|
|
|
- ...item
|
|
|
- })
|
|
|
- },
|
|
|
- // onClaim (item) {
|
|
|
- // this.$refs.sharingClaimEditRefs.open(item)
|
|
|
+ // onDetails (item) {
|
|
|
+ // this.$refs.sharingClaimDetailsRefs.open({
|
|
|
+ // month: this.queryValues.month,
|
|
|
+ // majorOrganization: this.organizationItems.find(e => e.organizationNo === this.queryValues.manageOrganizationNo)?.majorOrganization ?? false,
|
|
|
+ // manageOrganizationNo: item.organizationNo,
|
|
|
+ // ...item
|
|
|
+ // })
|
|
|
// },
|
|
|
+ onClaim (item) {
|
|
|
+ this.$refs.sharingClaimDetailsClaimRefs.open(item)
|
|
|
+ },
|
|
|
+ onClaimByDept (item) {
|
|
|
+ this.$refs.sharingClaimDetailsClaimByDeptRefs.open(item)
|
|
|
+ },
|
|
|
// async onSubmit (query) {
|
|
|
// this.$refs.claimFormRef.setLoading(true)
|
|
|
// const submitApi = this.isDept ? getCustomerProfitSharingClaimDeptAdd : getCustomerProfitSharingClaimAdd
|