feat(账单列表): 修复因为缺失数据导致的报错不显示
This commit is contained in:
parent
e1fd24328e
commit
d75ba843a3
@ -11,18 +11,18 @@
|
|||||||
custom-class="drawer-auto-layout"
|
custom-class="drawer-auto-layout"
|
||||||
>
|
>
|
||||||
<div class="team-bill-content">
|
<div class="team-bill-content">
|
||||||
|
|
||||||
<div class="blockquote">代理</div>
|
<div class="blockquote">代理</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<user-table-exhibit :user-profile="row.ownUserProfile" :query-details="true" />
|
<user-table-exhibit
|
||||||
|
:user-profile="row.ownUserProfile"
|
||||||
|
:query-details="true"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="blockquote">账单信息</div>
|
<div class="blockquote">账单信息</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="flex-b bill-row">
|
<div class="flex-b bill-row">
|
||||||
<div class="left bill-col nowrap-ellipsis">
|
<div class="left bill-col nowrap-ellipsis">ID: {{ row.id }}</div>
|
||||||
ID: {{ row.id }}
|
|
||||||
</div>
|
|
||||||
<div class="right bill-col nowrap-ellipsis">
|
<div class="right bill-col nowrap-ellipsis">
|
||||||
区域: {{ row.regionName }}
|
区域: {{ row.regionName }}
|
||||||
</div>
|
</div>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
账单归属: {{ row.billBelong }}
|
账单归属: {{ row.billBelong }}
|
||||||
</div>
|
</div>
|
||||||
<div class="left bill-col nowrap-ellipsis">
|
<div class="left bill-col nowrap-ellipsis">
|
||||||
账单标题: {{ row.billTitle }}
|
账单标题: {{ row.billTitle }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -70,15 +70,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="row.settleResult.policy.policyType === 'SALARY_DIAMOND'" class="flex-b bill-row">
|
<!-- <div
|
||||||
|
v-if="row.settleResult.policy.policyType === 'SALARY_DIAMOND'"
|
||||||
|
class="flex-b bill-row"
|
||||||
|
>
|
||||||
<div class="left bill-col nowrap-ellipsis">
|
<div class="left bill-col nowrap-ellipsis">
|
||||||
团队已兑换钻石: {{ row.settleResult.redeemedDiamondsSalary || 0 }}
|
团队已兑换钻石:
|
||||||
|
{{ row.settleResult.redeemedDiamondsSalary || 0 }}
|
||||||
</div>
|
</div>
|
||||||
<div class="right bill-col nowrap-ellipsis">
|
<div class="right bill-col nowrap-ellipsis">
|
||||||
团队剩余钻石: {{ row.settleResult.remainingDiamondsSalary || 0 }}
|
团队剩余钻石:
|
||||||
|
{{ row.settleResult.remainingDiamondsSalary || 0 }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="row.remarks" class="bill-row">
|
<div v-if="row.remarks" class="bill-row">
|
||||||
@ -96,7 +100,8 @@
|
|||||||
:timestamp="item.createTime"
|
:timestamp="item.createTime"
|
||||||
>
|
>
|
||||||
<div class="remark">
|
<div class="remark">
|
||||||
<span class="nickname">{{ item.createBackUserName }}:</span> {{ item.remark }}
|
<span class="nickname">{{ item.createBackUserName }}:</span>
|
||||||
|
{{ item.remark }}
|
||||||
</div>
|
</div>
|
||||||
</el-timeline-item>
|
</el-timeline-item>
|
||||||
</el-timeline>
|
</el-timeline>
|
||||||
@ -110,7 +115,10 @@
|
|||||||
<div class="bank-card-item back-blue">
|
<div class="bank-card-item back-blue">
|
||||||
<div class="card-info flex-b">
|
<div class="card-info flex-b">
|
||||||
<div class="card-icon">
|
<div class="card-icon">
|
||||||
<img src="https://img.sugartimeapp.com/avatar/57800817-7e89-4ba5-9640-4697a5a61048.png" alt="">
|
<img
|
||||||
|
src="https://img.sugartimeapp.com/avatar/57800817-7e89-4ba5-9640-4697a5a61048.png"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="profile">
|
<div class="profile">
|
||||||
<div class="card-no ellipsis-nowrap">
|
<div class="card-no ellipsis-nowrap">
|
||||||
@ -126,11 +134,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="row.settleResult">
|
<!-- <div v-if="row.settleResult">
|
||||||
<div class="blockquote">政策</div>
|
<div class="blockquote">政策</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="policy">
|
<div class="policy">
|
||||||
<div v-for="(item, index) in row.settleResult.policy.policy" :key="index" class="policy-row">
|
<div
|
||||||
|
v-for="(item, index) in row.settleResult.policy.policy"
|
||||||
|
:key="index"
|
||||||
|
class="policy-row"
|
||||||
|
>
|
||||||
<div class="title blockquote">Lv.{{ item.level }}</div>
|
<div class="title blockquote">Lv.{{ item.level }}</div>
|
||||||
<div class="policy-content flex-l flex-wrap">
|
<div class="policy-content flex-l flex-wrap">
|
||||||
<div class="policy-block">
|
<div class="policy-block">
|
||||||
@ -161,16 +173,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { teamBillStatusMap } from '@/constant/team-type'
|
import { teamBillStatusMap } from "@/constant/team-type";
|
||||||
export default {
|
export default {
|
||||||
name: 'TeamBillDetailsDrawer',
|
name: "TeamBillDetailsDrawer",
|
||||||
props: {
|
props: {
|
||||||
row: {
|
row: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -180,91 +191,89 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
teamBillStatusMap: teamBillStatusMap()
|
teamBillStatusMap: teamBillStatusMap()
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.$emit('close')
|
this.$emit("close");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scope.d lang="scss">
|
||||||
|
.team-bill-content {
|
||||||
|
padding: 0px 10px;
|
||||||
|
.content {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.remark {
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
word-wrap: break-word;
|
||||||
|
.nickname {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bill-row {
|
||||||
|
padding: 10px 0px;
|
||||||
|
> .bill-col {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.policy {
|
||||||
|
.policy-row {
|
||||||
|
color: #333333;
|
||||||
|
.title {
|
||||||
|
padding: 5px 15px !important;
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
.policy-content {
|
||||||
|
text-align: center;
|
||||||
|
.policy-block {
|
||||||
|
border: 1px solid #ffffff;
|
||||||
|
width: 33.33%;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #f1f2f3;
|
||||||
|
.label {
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bank-card-list {
|
||||||
|
.back-green {
|
||||||
|
background-image: linear-gradient(to left, #018aa8 0%, #00b39f 100%);
|
||||||
|
}
|
||||||
|
.back-blue {
|
||||||
|
background-image: linear-gradient(to left, #2d61cf 0%, #3893e6 100%);
|
||||||
|
}
|
||||||
|
.bank-card-item {
|
||||||
|
color: #ffffff;
|
||||||
|
margin-bottom: 0.2rem;
|
||||||
|
border-radius: 0.2rem;
|
||||||
|
padding: 10px;
|
||||||
|
.card-info {
|
||||||
|
.card-icon {
|
||||||
|
height: 50px;
|
||||||
|
width: 50px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.profile {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0px 10px;
|
||||||
|
.payee {
|
||||||
|
padding: 5px 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</style>
|
||||||
<style scope.d lang="scss">
|
|
||||||
.team-bill-content {
|
|
||||||
padding: 0px 10px;
|
|
||||||
.content {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.remark {
|
|
||||||
width: 100%;
|
|
||||||
overflow: auto;
|
|
||||||
word-wrap: break-word;
|
|
||||||
.nickname {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.bill-row {
|
|
||||||
padding: 10px 0px;
|
|
||||||
>.bill-col {
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.policy {
|
|
||||||
.policy-row {
|
|
||||||
color: #333333;
|
|
||||||
.title {
|
|
||||||
padding: 5px 15px !important;
|
|
||||||
background-color: transparent !important;
|
|
||||||
}
|
|
||||||
.policy-content {
|
|
||||||
text-align: center;
|
|
||||||
.policy-block {
|
|
||||||
border: 1px solid #FFFFFF;
|
|
||||||
width: 33.33%;
|
|
||||||
padding: 10px;
|
|
||||||
background-color: #F1F2F3;
|
|
||||||
.label {
|
|
||||||
padding-bottom: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.bank-card-list {
|
|
||||||
.back-green {
|
|
||||||
background-image: linear-gradient(to left, #018AA8 0%, #00B39F 100%);
|
|
||||||
}
|
|
||||||
.back-blue {
|
|
||||||
background-image: linear-gradient(to left, #2D61CF 0%, #3893E6 100%);
|
|
||||||
}
|
|
||||||
.bank-card-item {
|
|
||||||
color: #FFFFFF;
|
|
||||||
margin-bottom: .2rem;
|
|
||||||
border-radius: .2rem;
|
|
||||||
padding: 10px;
|
|
||||||
.card-info {
|
|
||||||
.card-icon {
|
|
||||||
height: 50px;
|
|
||||||
width: 50px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.profile {
|
|
||||||
width: 100%;
|
|
||||||
padding: 0px 10px;
|
|
||||||
.payee {
|
|
||||||
padding: 5px 0px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
|
|
||||||
<div class="filter-item" style="width: 120px;">
|
<div class="filter-item" style="width: 120px;">
|
||||||
<sys-origin-permission-select
|
<sys-origin-permission-select
|
||||||
v-model="listQuery.sysOrigin"
|
v-model="listQuery.sysOrigin"
|
||||||
@ -54,7 +53,11 @@
|
|||||||
</el-select> -->
|
</el-select> -->
|
||||||
|
|
||||||
<div class="filter-item">
|
<div class="filter-item">
|
||||||
<account-input v-model="listQuery.ownUserId" :sys-origin="listQuery.sysOrigin" placeholder="代理ID" />
|
<account-input
|
||||||
|
v-model="listQuery.ownUserId"
|
||||||
|
:sys-origin="listQuery.sysOrigin"
|
||||||
|
placeholder="代理ID"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="filter-item">
|
<div class="filter-item">
|
||||||
@ -100,27 +103,56 @@
|
|||||||
fit
|
fit
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-table-column type="index" width="50" label="No" />
|
<el-table-column type="index" width="50" label="No" />
|
||||||
<el-table-column label="代理" align="left" show-overflow-tooltip min-width="220">
|
<el-table-column
|
||||||
|
label="代理"
|
||||||
|
align="left"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="220"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<user-table-exhibit :user-profile="scope.row.ownUserProfile" :query-details="true" />
|
<user-table-exhibit
|
||||||
|
:user-profile="scope.row.ownUserProfile"
|
||||||
|
:query-details="true"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="区域" align="left" prop="regionName" show-overflow-tooltip min-width="100" />
|
<el-table-column
|
||||||
<el-table-column label="归属" prop="billBelong" align="center" show-overflow-tooltip min-width="80" />
|
label="区域"
|
||||||
|
align="left"
|
||||||
|
prop="regionName"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="100"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="归属"
|
||||||
|
prop="billBelong"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="80"
|
||||||
|
/>
|
||||||
<!-- <el-table-column label="状态" align="left" show-overflow-tooltip min-width="80">
|
<!-- <el-table-column label="状态" align="left" show-overflow-tooltip min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div>{{ teamBillStatusMap[scope.row.status].name }}</div>
|
<div>{{ teamBillStatusMap[scope.row.status].name }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
|
|
||||||
<el-table-column v-if="listQuery.status === 'SETTLED' && listQuery.status !== 'PRE_CREATION'" label="工资" align="left" show-overflow-tooltip min-width="220">
|
<el-table-column
|
||||||
|
v-if="
|
||||||
|
listQuery.status === 'SETTLED' && listQuery.status !== 'PRE_CREATION'
|
||||||
|
"
|
||||||
|
label="工资"
|
||||||
|
align="left"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="220"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div class="settled-row">
|
<div class="settled-row">
|
||||||
<div class="col ">
|
<div class="col ">
|
||||||
成员/代理: {{ scope.row.settleResult.memberSalary }}/{{ scope.row.settleResult.ownSalary }}
|
成员/代理: {{ scope.row.settleResult.memberSalary }}/{{
|
||||||
|
scope.row.settleResult.ownSalary
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
合计: {{ scope.row.settleResult.totalSalary }}
|
合计: {{ scope.row.settleResult.totalSalary }}
|
||||||
@ -144,15 +176,35 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
|
|
||||||
<el-table-column align="center" label="备注" show-overflow-tooltip min-width="60">
|
<!-- <el-table-column
|
||||||
|
align="center"
|
||||||
|
label="备注"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="60"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div class="settled-row settled-row-min"> <el-link @click.native="clickInternalRemarks(scope.row)">{{ scope.row.internalRemarks.length }}</el-link></div>
|
<div class="settled-row settled-row-min">
|
||||||
|
<el-link @click.native="clickInternalRemarks(scope.row)">{{
|
||||||
|
scope.row.internalRemarks ? scope.row.internalRemarks.length : 0
|
||||||
|
}}</el-link>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
|
|
||||||
<el-table-column label="修改人" prop="updateUserNickname" align="center" show-overflow-tooltip min-width="80" />
|
<el-table-column
|
||||||
|
label="修改人"
|
||||||
|
prop="updateUserNickname"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="80"
|
||||||
|
/>
|
||||||
|
|
||||||
<el-table-column label="时间" align="center" show-overflow-tooltip min-width="200">
|
<el-table-column
|
||||||
|
label="时间"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="200"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div>创建: {{ scope.row.createTime | dateFormat }}</div>
|
<div>创建: {{ scope.row.createTime | dateFormat }}</div>
|
||||||
<div>修改: {{ scope.row.updateTime | dateFormat }}</div>
|
<div>修改: {{ scope.row.updateTime | dateFormat }}</div>
|
||||||
@ -166,8 +218,14 @@
|
|||||||
<i class="el-icon-more" />
|
<i class="el-icon-more" />
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item @click.native="clickQueryDetails(scope.row)">详情</el-dropdown-item>
|
<el-dropdown-item @click.native="clickQueryDetails(scope.row)"
|
||||||
<el-dropdown-item :disabled="scope.row.status === 'PRE_CREATION'" @click.native="clickInternalRemarks(scope.row)">内部备注</el-dropdown-item>
|
>详情</el-dropdown-item
|
||||||
|
>
|
||||||
|
<!-- <el-dropdown-item
|
||||||
|
:disabled="scope.row.status === 'PRE_CREATION'"
|
||||||
|
@click.native="clickInternalRemarks(scope.row)"
|
||||||
|
>内部备注</el-dropdown-item
|
||||||
|
> -->
|
||||||
<!-- <el-dropdown-item :disabled="scope.row.status === 'PRE_CREATION'" @click.native="clickRemarks(scope.row)">对外备注</el-dropdown-item> -->
|
<!-- <el-dropdown-item :disabled="scope.row.status === 'PRE_CREATION'" @click.native="clickRemarks(scope.row)">对外备注</el-dropdown-item> -->
|
||||||
<!-- <el-dropdown-item v-if="settleBillStatus.includes(scope.row.status)" :disabled="scope.row.status === 'PRE_CREATION'" @click.native="clickSettle(scope.row)">结算账单</el-dropdown-item>
|
<!-- <el-dropdown-item v-if="settleBillStatus.includes(scope.row.status)" :disabled="scope.row.status === 'PRE_CREATION'" @click.native="clickSettle(scope.row)">结算账单</el-dropdown-item>
|
||||||
<el-dropdown-item v-if="closeBillStatus.includes(scope.row.status)" :disabled="scope.row.status === 'PRE_CREATION'" @click.native="clickStatusChange(scope.row, 'CLOSE')">关闭订单</el-dropdown-item>
|
<el-dropdown-item v-if="closeBillStatus.includes(scope.row.status)" :disabled="scope.row.status === 'PRE_CREATION'" @click.native="clickStatusChange(scope.row, 'CLOSE')">关闭订单</el-dropdown-item>
|
||||||
@ -180,7 +238,14 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<div v-if="listQuery.lastId" class="load-more">
|
<div v-if="listQuery.lastId" class="load-more">
|
||||||
<span v-if="notData">已加载全部</span>
|
<span v-if="notData">已加载全部</span>
|
||||||
<el-button v-else size="mini" :disabled="loadMoreLoading" :loading="loadMoreLoading" @click="clickLoadMore">加载更多</el-button>
|
<el-button
|
||||||
|
v-else
|
||||||
|
size="mini"
|
||||||
|
:disabled="loadMoreLoading"
|
||||||
|
:loading="loadMoreLoading"
|
||||||
|
@click="clickLoadMore"
|
||||||
|
>加载更多</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-drawer
|
<el-drawer
|
||||||
@ -234,13 +299,19 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="drawer-footer">
|
<div class="drawer-footer">
|
||||||
<el-button :disabled="importLoading" @click="exportConditionClose">取 消</el-button>
|
<el-button :disabled="importLoading" @click="exportConditionClose"
|
||||||
<el-button type="primary" :loading="importLoading" :disabled="importLoading" @click="handleExcel()">确 定</el-button>
|
>取 消</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:loading="importLoading"
|
||||||
|
:disabled="importLoading"
|
||||||
|
@click="handleExcel()"
|
||||||
|
>确 定</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
@ -248,13 +319,13 @@
|
|||||||
<details-drawer
|
<details-drawer
|
||||||
v-if="billDetailsVisible"
|
v-if="billDetailsVisible"
|
||||||
:row="thatRow"
|
:row="thatRow"
|
||||||
@close="billDetailsVisible=false"
|
@close="billDetailsVisible = false"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<team-bill-internal-remark
|
<team-bill-internal-remark
|
||||||
v-if="teamBillInternalRemarkVisible"
|
v-if="teamBillInternalRemarkVisible"
|
||||||
:row="thatRow"
|
:row="thatRow"
|
||||||
@close="teamBillInternalRemarkVisible=false"
|
@close="teamBillInternalRemarkVisible = false"
|
||||||
@addRemarks="addRemarks"
|
@addRemarks="addRemarks"
|
||||||
@revemoRemarks="revemoRemarks"
|
@revemoRemarks="revemoRemarks"
|
||||||
/>
|
/>
|
||||||
@ -262,14 +333,14 @@
|
|||||||
<team-bill-remark
|
<team-bill-remark
|
||||||
v-if="teamBillRemarkVisible"
|
v-if="teamBillRemarkVisible"
|
||||||
:row="thatRow"
|
:row="thatRow"
|
||||||
@close="teamBillRemarkVisible=false"
|
@close="teamBillRemarkVisible = false"
|
||||||
@success="teamBillRemarkSuccess"
|
@success="teamBillRemarkSuccess"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<team-bill-settle
|
<team-bill-settle
|
||||||
v-if="teamBillSettleVisible"
|
v-if="teamBillSettleVisible"
|
||||||
:row="thatRow"
|
:row="thatRow"
|
||||||
@close="teamBillSettleVisible=false"
|
@close="teamBillSettleVisible = false"
|
||||||
@success="teamBillSettleSUccess"
|
@success="teamBillSettleSUccess"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -277,45 +348,55 @@
|
|||||||
v-if="teamBillStatusVisible"
|
v-if="teamBillStatusVisible"
|
||||||
:status="teamBillChangeStatus"
|
:status="teamBillChangeStatus"
|
||||||
:bill-id="thatRow.id"
|
:bill-id="thatRow.id"
|
||||||
@close="teamBillStatusVisible=false"
|
@close="teamBillStatusVisible = false"
|
||||||
@success="teamBillStatusSuccess"
|
@success="teamBillStatusSuccess"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<team-details-drawer
|
<team-details-drawer
|
||||||
v-if="teamDetailsDrawerVisible"
|
v-if="teamDetailsDrawerVisible"
|
||||||
:team-id="thatRow.teamProfile.id"
|
:team-id="thatRow.teamProfile.id"
|
||||||
@close="teamDetailsDrawerVisible=false"
|
@close="teamDetailsDrawerVisible = false"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listTeamBillTable, excelAnchorBill } from '@/api/team'
|
import { listTeamBillTable, excelAnchorBill } from "@/api/team";
|
||||||
import { pickerOptions } from '@/constant/el-const'
|
import { pickerOptions } from "@/constant/el-const";
|
||||||
import { billCyclePolicyTypes, teamBillStatus, teamBillStatusMap } from '@/constant/team-type'
|
import {
|
||||||
|
billCyclePolicyTypes,
|
||||||
|
teamBillStatus,
|
||||||
|
teamBillStatusMap
|
||||||
|
} from "@/constant/team-type";
|
||||||
|
|
||||||
import TeamBillRemark from './team-bill-remark'
|
import TeamBillRemark from "./team-bill-remark";
|
||||||
import DetailsDrawer from './details-drawer'
|
import DetailsDrawer from "./details-drawer";
|
||||||
import TeamBillInternalRemark from './team-bill-internal-remark'
|
import TeamBillInternalRemark from "./team-bill-internal-remark";
|
||||||
import TeamBillSettle from './team-bill-settle'
|
import TeamBillSettle from "./team-bill-settle";
|
||||||
import TeamBillStatus from './team-bill-status'
|
import TeamBillStatus from "./team-bill-status";
|
||||||
import TeamDetailsDrawer from './../components/TeamDetailsDrawer'
|
import TeamDetailsDrawer from "./../components/TeamDetailsDrawer";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { TeamDetailsDrawer, DetailsDrawer, TeamBillInternalRemark, TeamBillRemark, TeamBillSettle, TeamBillStatus },
|
components: {
|
||||||
|
TeamDetailsDrawer,
|
||||||
|
DetailsDrawer,
|
||||||
|
TeamBillInternalRemark,
|
||||||
|
TeamBillRemark,
|
||||||
|
TeamBillSettle,
|
||||||
|
TeamBillStatus
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
const commonRules = [
|
const commonRules = [
|
||||||
{ required: true, message: '必填字段不可为空', trigger: 'blur' }
|
{ required: true, message: "必填字段不可为空", trigger: "blur" }
|
||||||
]
|
];
|
||||||
return {
|
return {
|
||||||
importLoading: false,
|
importLoading: false,
|
||||||
teamDetailsDrawerVisible: false,
|
teamDetailsDrawerVisible: false,
|
||||||
teamBillChangeStatus: '',
|
teamBillChangeStatus: "",
|
||||||
teamBillStatusVisible: false,
|
teamBillStatusVisible: false,
|
||||||
closeBillStatus: ['PAY_OUT', 'HANG_UP'],
|
closeBillStatus: ["PAY_OUT", "HANG_UP"],
|
||||||
hangUpBillStatus: ['PAY_OUT', 'CLOSE'],
|
hangUpBillStatus: ["PAY_OUT", "CLOSE"],
|
||||||
settleBillStatus: ['PAY_OUT', 'HANG_UP'],
|
settleBillStatus: ["PAY_OUT", "HANG_UP"],
|
||||||
teamBillSettleVisible: false,
|
teamBillSettleVisible: false,
|
||||||
teamBillRemarkVisible: false,
|
teamBillRemarkVisible: false,
|
||||||
teamBillInternalRemarkVisible: false,
|
teamBillInternalRemarkVisible: false,
|
||||||
@ -327,23 +408,23 @@ export default {
|
|||||||
thatRow: {},
|
thatRow: {},
|
||||||
pickerOptions,
|
pickerOptions,
|
||||||
listQuery: {
|
listQuery: {
|
||||||
id: '',
|
id: "",
|
||||||
sysOrigin: '',
|
sysOrigin: "",
|
||||||
teamId: '',
|
teamId: "",
|
||||||
status: '',
|
status: "",
|
||||||
settleType: '',
|
settleType: "",
|
||||||
region: '',
|
region: "",
|
||||||
startTime: '',
|
startTime: "",
|
||||||
endTime: '',
|
endTime: "",
|
||||||
lastId: '',
|
lastId: "",
|
||||||
limit: ''
|
limit: ""
|
||||||
},
|
},
|
||||||
excelQuery: {
|
excelQuery: {
|
||||||
sysOrigin: '',
|
sysOrigin: "",
|
||||||
billStatusStr: '',
|
billStatusStr: "",
|
||||||
billStatusList: [],
|
billStatusList: [],
|
||||||
region: '',
|
region: "",
|
||||||
monthDate: ''
|
monthDate: ""
|
||||||
},
|
},
|
||||||
exportQueryRules: {
|
exportQueryRules: {
|
||||||
billStatusList: commonRules,
|
billStatusList: commonRules,
|
||||||
@ -354,8 +435,8 @@ export default {
|
|||||||
list: [],
|
list: [],
|
||||||
notData: false,
|
notData: false,
|
||||||
loadMoreLoading: false,
|
loadMoreLoading: false,
|
||||||
rangeDate: ''
|
rangeDate: ""
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
rangeDate: {
|
rangeDate: {
|
||||||
@ -363,156 +444,160 @@ export default {
|
|||||||
deep: true,
|
deep: true,
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
if (newVal && newVal.length > 0) {
|
if (newVal && newVal.length > 0) {
|
||||||
this.listQuery.startTime = newVal[0]
|
this.listQuery.startTime = newVal[0];
|
||||||
this.listQuery.endTime = newVal[1]
|
this.listQuery.endTime = newVal[1];
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.listQuery.startTime = ''
|
this.listQuery.startTime = "";
|
||||||
this.listQuery.endTime = ''
|
this.listQuery.endTime = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.listQuery.status = teamBillStatus[0].value
|
this.listQuery.status = teamBillStatus[0].value;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
renderData(isReset, loadMore) {
|
renderData(isReset, loadMore = false) {
|
||||||
const that = this
|
const that = this;
|
||||||
if (!that.listQuery.sysOrigin) {
|
if (!that.listQuery.sysOrigin) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
if (isReset === true) {
|
if (isReset === true) {
|
||||||
that.list = []
|
that.list = [];
|
||||||
that.notData = false
|
that.notData = false;
|
||||||
that.listQuery.lastId = ''
|
that.listQuery.lastId = "";
|
||||||
}
|
}
|
||||||
that.loadMoreLoading = loadMore
|
that.loadMoreLoading = loadMore;
|
||||||
that.listLoading = !loadMore
|
that.listLoading = !loadMore;
|
||||||
listTeamBillTable(that.listQuery).then(res => {
|
listTeamBillTable(that.listQuery)
|
||||||
that.listLoading = false
|
.then(res => {
|
||||||
that.loadMoreLoading = false
|
that.listLoading = false;
|
||||||
const { body } = res
|
that.loadMoreLoading = false;
|
||||||
const list = body || []
|
const { body } = res;
|
||||||
that.notData = list.length <= 0
|
const list = body || [];
|
||||||
if (!that.notData) {
|
that.notData = list.length <= 0;
|
||||||
that.list = that.list.concat(list)
|
if (!that.notData) {
|
||||||
that.listQuery.lastId = that.list[that.list.length - 1].id
|
that.list = that.list.concat(list);
|
||||||
}
|
that.listQuery.lastId = that.list[that.list.length - 1].id;
|
||||||
}).catch(er => {
|
}
|
||||||
that.listLoading = false
|
})
|
||||||
that.loadMoreLoading = false
|
.catch(er => {
|
||||||
})
|
that.listLoading = false;
|
||||||
|
that.loadMoreLoading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.renderData(true)
|
this.renderData(true);
|
||||||
},
|
},
|
||||||
clickLoadMore() {
|
clickLoadMore() {
|
||||||
const that = this
|
const that = this;
|
||||||
that.loadMoreLoading = true
|
that.loadMoreLoading = true;
|
||||||
that.renderData(false, true)
|
that.renderData(false, true);
|
||||||
},
|
},
|
||||||
editTeamProfile(row) {
|
editTeamProfile(row) {
|
||||||
this.thatRow = row
|
this.thatRow = row;
|
||||||
this.teamEditVisible = true
|
this.teamEditVisible = true;
|
||||||
},
|
},
|
||||||
tableSelectable(row) {
|
tableSelectable(row) {
|
||||||
return row.role !== 'OWN'
|
return row.role !== "OWN";
|
||||||
},
|
},
|
||||||
changeSysOrigin(val) {
|
changeSysOrigin(val) {
|
||||||
this.handleSearch()
|
this.handleSearch();
|
||||||
// this.$refs.regionSelectPolicy.clearValue()
|
// this.$refs.regionSelectPolicy.clearValue()
|
||||||
// this.listQuery.region = ''
|
// this.listQuery.region = ''
|
||||||
},
|
},
|
||||||
onLoadPermissionSysOrigin(val) {
|
onLoadPermissionSysOrigin(val) {
|
||||||
const that = this
|
const that = this;
|
||||||
that.renderData()
|
that.renderData();
|
||||||
},
|
},
|
||||||
clickQueryDetails(row) {
|
clickQueryDetails(row) {
|
||||||
this.thatRow = row
|
this.thatRow = row;
|
||||||
this.billDetailsVisible = true
|
this.billDetailsVisible = true;
|
||||||
},
|
},
|
||||||
clickInternalRemarks(row) {
|
clickInternalRemarks(row) {
|
||||||
this.thatRow = row
|
this.thatRow = row;
|
||||||
this.teamBillInternalRemarkVisible = true
|
this.teamBillInternalRemarkVisible = true;
|
||||||
},
|
},
|
||||||
addRemarks(remarks) {
|
addRemarks(remarks) {
|
||||||
this.thatRow.internalRemarks.push(remarks)
|
this.thatRow.internalRemarks.push(remarks);
|
||||||
},
|
},
|
||||||
revemoRemarks(index) {
|
revemoRemarks(index) {
|
||||||
this.thatRow.internalRemarks.splice(index, 1)
|
this.thatRow.internalRemarks.splice(index, 1);
|
||||||
},
|
},
|
||||||
clickRemarks(row) {
|
clickRemarks(row) {
|
||||||
this.thatRow = row
|
this.thatRow = row;
|
||||||
this.teamBillRemarkVisible = true
|
this.teamBillRemarkVisible = true;
|
||||||
},
|
},
|
||||||
teamBillRemarkSuccess(res) {
|
teamBillRemarkSuccess(res) {
|
||||||
const that = this
|
const that = this;
|
||||||
that.$opsMessage.success()
|
that.$opsMessage.success();
|
||||||
if (res) {
|
if (res) {
|
||||||
that.thatRow.remarks = res.remarks
|
that.thatRow.remarks = res.remarks;
|
||||||
that.teamBillRemarkVisible = false
|
that.teamBillRemarkVisible = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clickSettle(row) {
|
clickSettle(row) {
|
||||||
const that = this
|
const that = this;
|
||||||
that.thatRow = row
|
that.thatRow = row;
|
||||||
that.teamBillSettleVisible = true
|
that.teamBillSettleVisible = true;
|
||||||
},
|
},
|
||||||
clickStatusChange(row, status) {
|
clickStatusChange(row, status) {
|
||||||
const that = this
|
const that = this;
|
||||||
that.thatRow = row
|
that.thatRow = row;
|
||||||
that.teamBillStatusVisible = true
|
that.teamBillStatusVisible = true;
|
||||||
that.teamBillChangeStatus = status
|
that.teamBillChangeStatus = status;
|
||||||
},
|
},
|
||||||
teamBillStatusSuccess(form) {
|
teamBillStatusSuccess(form) {
|
||||||
this.teamBillStatusVisible = false
|
this.teamBillStatusVisible = false;
|
||||||
this.thatRow.status = form.status
|
this.thatRow.status = form.status;
|
||||||
},
|
},
|
||||||
clickBillShare(row) {
|
clickBillShare(row) {
|
||||||
this.$opsMessage.fail('还没有实现')
|
this.$opsMessage.fail("还没有实现");
|
||||||
},
|
},
|
||||||
clickQueryTeamDetails(row) {
|
clickQueryTeamDetails(row) {
|
||||||
this.thatRow = row
|
this.thatRow = row;
|
||||||
this.teamDetailsDrawerVisible = true
|
this.teamDetailsDrawerVisible = true;
|
||||||
},
|
},
|
||||||
teamBillSettleSUccess(form) {
|
teamBillSettleSUccess(form) {
|
||||||
this.list = this.list.filter(item => form.id !== item.id)
|
this.list = this.list.filter(item => form.id !== item.id);
|
||||||
this.teamBillSettleVisible = false
|
this.teamBillSettleVisible = false;
|
||||||
this.$opsMessage.success()
|
this.$opsMessage.success();
|
||||||
},
|
},
|
||||||
clickExcel() {
|
clickExcel() {
|
||||||
this.excelQuery.sysOrigin = this.listQuery.sysOrigin
|
this.excelQuery.sysOrigin = this.listQuery.sysOrigin;
|
||||||
this.dialogExcelVisible = true
|
this.dialogExcelVisible = true;
|
||||||
},
|
},
|
||||||
exportConditionClose() {
|
exportConditionClose() {
|
||||||
if (this.importLoading) {
|
if (this.importLoading) {
|
||||||
this.$opsMessage.warn('正在执行导出, 请稍等~')
|
this.$opsMessage.warn("正在执行导出, 请稍等~");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.dialogExcelVisible = false
|
this.dialogExcelVisible = false;
|
||||||
},
|
},
|
||||||
handleExcel() {
|
handleExcel() {
|
||||||
const that = this
|
const that = this;
|
||||||
that.excelQuery.billStatusStr = that.excelQuery.billStatusList.join(',')
|
that.excelQuery.billStatusStr = that.excelQuery.billStatusList.join(",");
|
||||||
|
|
||||||
that.$refs.exportQuery.validate(valid => {
|
that.$refs.exportQuery.validate(valid => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
console.error('error submit!!')
|
console.error("error submit!!");
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
that.importLoading = true
|
that.importLoading = true;
|
||||||
excelAnchorBill(that.excelQuery, 'AnchorWorkDetails').then(res => {
|
excelAnchorBill(that.excelQuery, "AnchorWorkDetails")
|
||||||
that.importLoading = false
|
.then(res => {
|
||||||
this.dialogExcelVisible = false
|
that.importLoading = false;
|
||||||
}).catch(er => {
|
this.dialogExcelVisible = false;
|
||||||
that.importLoading = false
|
})
|
||||||
this.dialogExcelVisible = false
|
.catch(er => {
|
||||||
this.$opsMessage.fail('下载失败!')
|
that.importLoading = false;
|
||||||
})
|
this.dialogExcelVisible = false;
|
||||||
})
|
this.$opsMessage.fail("下载失败!");
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.load-more {
|
.load-more {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user