|
@@ -1,22 +1,33 @@
|
|
|
<template>
|
|
|
<div class="renewal-rate-detail-content">
|
|
|
- <el-dialog :visible.sync="showRenewalRateDetailDlg" title="续约率详情" :close-on-click-modal="false" :modal-append-to-body="false" @close="cancelHandle" width="860px" v-dialogDrag center>
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="showRenewalRateDetailDlg"
|
|
|
+ title="续约率详情"
|
|
|
+ top="5vh"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :modal-append-to-body="false"
|
|
|
+ @close="cancelHandle"
|
|
|
+ width="1000px"
|
|
|
+ v-dialogDrag
|
|
|
+ center
|
|
|
+ >
|
|
|
<div>
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
- <el-tab-pane label="续约合同" name="first"></el-tab-pane>
|
|
|
- <el-tab-pane label="到期合同" name="second"></el-tab-pane>
|
|
|
+ <el-tab-pane label="续约合同" name="续约合同"></el-tab-pane>
|
|
|
+ <el-tab-pane label="到期合同" name="到期合同"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
- <p>共有续约合同 xx 份,续约总金额 xx 元</p>
|
|
|
+ <p v-if="activeName === '续约合同'">共有续约合同 {{ RenewalDataFormSon.RenewalContractTotal }} 份,续约总金额 {{ RenewalDataFormSon.RenewalContractMoney }} 元</p>
|
|
|
+ <p v-if="activeName === '到期合同'">共有到期合同 {{ RenewalDataFormSon.ExpireRenewalContractTotal }} 份,到期总金额 {{ RenewalDataFormSon.ExpireRenewalContractMoney }} 元</p>
|
|
|
<div class="table-wrap">
|
|
|
- <el-table v-if="tableData" :data="tableData" max-height="600" border style="width: 100%; margin-bottom: 20px">
|
|
|
+ <el-table :data="RenewalDataFormSon.List" max-height="600" border style="width: 100%; margin-bottom: 20px">
|
|
|
<el-table-column label="公司名称" prop="CompanyName" align="center">
|
|
|
<template slot-scope="{ row }">
|
|
|
<span class="editsty" @click="goCompanyHandle(row)">{{ row.CompanyName }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="SellerName" label="所属销售"> </el-table-column>
|
|
|
- <el-table-column align="center" prop="Money" label="合同金额"> </el-table-column>
|
|
|
+ <el-table-column align="center" prop="SellerName" label="所属销售" width="100"> </el-table-column>
|
|
|
+ <el-table-column align="center" prop="Money" label="合同金额" width="130"> </el-table-column>
|
|
|
<el-table-column label="合同期限" prop="StartDate" align="center">
|
|
|
<template slot-scope="{ row }">
|
|
|
<span>{{ row.StartDate }} ~ {{ row.EndDate }}</span>
|
|
@@ -53,7 +64,7 @@ export default {
|
|
|
default: false,
|
|
|
type: Boolean,
|
|
|
},
|
|
|
- renewalRateDetailType: {
|
|
|
+ renewalRateDetailForm: {
|
|
|
default: "",
|
|
|
type: String,
|
|
|
},
|
|
@@ -64,42 +75,43 @@ export default {
|
|
|
pageSize: 10,
|
|
|
total: 0,
|
|
|
tableData: [],
|
|
|
- activeName: "first",
|
|
|
+ activeName: "续约合同",
|
|
|
+ RenewalDataFormSon: {},
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
- renewalRateDetailType: {
|
|
|
+ showRenewalRateDetailDlg: {
|
|
|
handler(val) {
|
|
|
- console.log(val);
|
|
|
+ if (val) {
|
|
|
+ this.getTableData();
|
|
|
+ }
|
|
|
},
|
|
|
- deep:true
|
|
|
+ deep: true,
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
cancelHandle() {
|
|
|
this.pageNo = 1;
|
|
|
+ this.activeName = "续约合同";
|
|
|
this.tableData = [];
|
|
|
+ this.pageNo = 1;
|
|
|
+ this.pageSize = 10;
|
|
|
+ this.total = 0;
|
|
|
this.$emit("update:showRenewalRateDetailDlg", false);
|
|
|
- this.$emit("update:renewalRateDetailType", '');
|
|
|
+ this.$emit("update:renewalRateDetailForm", {});
|
|
|
},
|
|
|
- getTableData() {
|
|
|
- dataMainInterface
|
|
|
- .collectDetailList({
|
|
|
- StartDate: this.StartDate,
|
|
|
- EndDate: this.EndDate,
|
|
|
- SellerIds: this.SellerIds,
|
|
|
- CompanyStatus: this.customStatus,
|
|
|
- UserId: OldUserId,
|
|
|
- CurrentIndex: this.pageNo,
|
|
|
- PageSize: this.pageSize,
|
|
|
- CollectionType: this.collectionType ? this.collectionType + "" : "",
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.Ret !== 200) return;
|
|
|
- const { Paging, List } = res.Data;
|
|
|
- this.total = Paging.Totals;
|
|
|
- this.tableData = List;
|
|
|
- });
|
|
|
+ async getTableData() {
|
|
|
+ let params = {
|
|
|
+ ...this.renewalRateDetailForm,
|
|
|
+ PageSize: this.pageSize,
|
|
|
+ CurrentIndex: this.pageNo,
|
|
|
+ ContractDataType: this.activeName,
|
|
|
+ };
|
|
|
+ const res = await dataMainInterface.incrementalCompanyContractPercentageList(params);
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ this.RenewalDataFormSon = res.Data;
|
|
|
+ this.total = res.Data.Paging.Totals;
|
|
|
+ }
|
|
|
},
|
|
|
// 分页
|
|
|
handleCurrentChange(page) {
|
|
@@ -117,7 +129,10 @@ export default {
|
|
|
window.open(href, "_blank");
|
|
|
},
|
|
|
// 头部的点击事件
|
|
|
- handleClick() {},
|
|
|
+ handleClick() {
|
|
|
+ this.pageNo = 1;
|
|
|
+ this.getTableData();
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|