|
@@ -1,29 +1,16 @@
|
|
|
<template>
|
|
|
<div class="tenant">
|
|
|
<div class="content">
|
|
|
- <byTable
|
|
|
- :source="sourceList.data"
|
|
|
- :pagination="sourceList.pagination"
|
|
|
- :config="config"
|
|
|
- :loading="loading"
|
|
|
- :selectConfig="selectConfig"
|
|
|
- highlight-current-row
|
|
|
- :statConfig="statConfig"
|
|
|
- :action-list="[
|
|
|
+ <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
|
|
|
+ highlight-current-row :statConfig="statConfig" :action-list="[
|
|
|
{
|
|
|
text: '创建合同',
|
|
|
action: () => newContract(),
|
|
|
},
|
|
|
- ]"
|
|
|
- @get-list="getList"
|
|
|
- >
|
|
|
+ ]" @get-list="getList">
|
|
|
<template #code="{ item }">
|
|
|
<div style="width: 100%">
|
|
|
- <a
|
|
|
- style="color: #409eff; cursor: pointer; word-break: break-all"
|
|
|
- @click="openDetails(item)"
|
|
|
- >{{ item.code }}</a
|
|
|
- >
|
|
|
+ <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="openDetails(item)">{{ item.code }}</a>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #amount="{ item }">
|
|
@@ -41,38 +28,23 @@
|
|
|
<div>
|
|
|
<el-popover :width="520" trigger="hover">
|
|
|
<template #reference>
|
|
|
- <a
|
|
|
- style="color: #409eff; cursor: pointer; word-break: break-all"
|
|
|
- >{{ moneyFormat(item.sumClaimMoney, 4) }}</a
|
|
|
- >
|
|
|
+ <a style="color: #409eff; cursor: pointer; word-break: break-all">{{ moneyFormat(item.sumClaimMoney, 4) }}</a>
|
|
|
</template>
|
|
|
<template #default>
|
|
|
- <div
|
|
|
- style="width: 100%; padding: 10px"
|
|
|
- v-if="
|
|
|
+ <div style="width: 100%; padding: 10px" v-if="
|
|
|
item.claimContractList && item.claimContractList.length > 0
|
|
|
- "
|
|
|
- >
|
|
|
- <div
|
|
|
- v-for="(record, index) in item.claimContractList"
|
|
|
- :key="index"
|
|
|
- style="background: #f1f1f1; border-radius: 2px"
|
|
|
- :style="{
|
|
|
+ ">
|
|
|
+ <div v-for="(record, index) in item.claimContractList" :key="index" style="background: #f1f1f1; border-radius: 2px" :style="{
|
|
|
'margin-bottom':
|
|
|
index !== item.claimContractList.length - 1
|
|
|
? '20px'
|
|
|
: '0px',
|
|
|
- }"
|
|
|
- :class="{ 'act-class': record.id === currentId }"
|
|
|
- @mouseenter="handleMoveEnter(record)"
|
|
|
- >
|
|
|
- <div
|
|
|
- style="
|
|
|
+ }" :class="{ 'act-class': record.id === currentId }" @mouseenter="handleMoveEnter(record)">
|
|
|
+ <div style="
|
|
|
display: flex;
|
|
|
justify-content: space-around;
|
|
|
padding: 5px 0;
|
|
|
- "
|
|
|
- >
|
|
|
+ ">
|
|
|
<div style="color: #333333">
|
|
|
<div style="color: #999999; margin-bottom: 4px">
|
|
|
认领金额:
|
|
@@ -127,10 +99,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #buyCorporationId="{ item }">
|
|
|
- <div
|
|
|
- style="cursor: pointer; color: #409eff; word-break: break-all"
|
|
|
- @click="handleClickName(item)"
|
|
|
- >
|
|
|
+ <div style="cursor: pointer; color: #409eff; word-break: break-all" @click="handleClickName(item)">
|
|
|
{{ item.buyCorporationName }}
|
|
|
</div>
|
|
|
</template>
|
|
@@ -142,18 +111,11 @@
|
|
|
<template #footer>
|
|
|
<el-button @click="openPrint = false" size="large">取消</el-button>
|
|
|
<el-button v-print="printObj" size="large">打印</el-button>
|
|
|
- <el-button type="primary" @click="clickDownload()" size="large"
|
|
|
- >下载PDF</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="合同详情"
|
|
|
- v-if="openDetailsDialog"
|
|
|
- v-model="openDetailsDialog"
|
|
|
- width="1100"
|
|
|
- >
|
|
|
+ <el-dialog title="合同详情" v-if="openDetailsDialog" v-model="openDetailsDialog" width="1100">
|
|
|
<ContractDetails :contractId="currentContractId"></ContractDetails>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -575,7 +537,7 @@ const getDict = () => {
|
|
|
const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
loading.value = true;
|
|
|
- getTotal()
|
|
|
+ getTotal();
|
|
|
proxy.post("/contract/page", sourceList.value.pagination).then((res) => {
|
|
|
sourceList.value.data = res.rows;
|
|
|
sourceList.value.pagination.total = res.total;
|
|
@@ -584,73 +546,74 @@ const getList = async (req) => {
|
|
|
}, 200);
|
|
|
});
|
|
|
};
|
|
|
-const statConfig = ref(
|
|
|
- [{
|
|
|
- label: "合计",
|
|
|
- data: [],
|
|
|
- }]
|
|
|
-)
|
|
|
+const statConfig = ref([
|
|
|
+ {
|
|
|
+ label: "合计",
|
|
|
+ data: [],
|
|
|
+ },
|
|
|
+]);
|
|
|
getDict();
|
|
|
if (route.query.code) {
|
|
|
sourceList.value.pagination.keyword = route.query.code;
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
getList();
|
|
|
-})
|
|
|
+});
|
|
|
const getTotal = () => {
|
|
|
- proxy.post("/contract/getHeadCustomerStatistics",sourceList.value.pagination).then((res) => {
|
|
|
- statConfig.value = [
|
|
|
- {
|
|
|
- label: "合计",
|
|
|
- data: [],
|
|
|
- },
|
|
|
- ];
|
|
|
- statConfig.value[0].data.push({
|
|
|
- label: "合计",
|
|
|
- data: [
|
|
|
- {
|
|
|
- label: "数量",
|
|
|
- num: res.sumQuantity,
|
|
|
- color: "rgb(171 0 255)",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "金额",
|
|
|
- num: res.sumAmount.toFixed(2),
|
|
|
- color: "rgb(171 0 255)",
|
|
|
- },
|
|
|
+ proxy
|
|
|
+ .post("/contract/getHeadCustomerStatistics", sourceList.value.pagination)
|
|
|
+ .then((res) => {
|
|
|
+ statConfig.value = [
|
|
|
{
|
|
|
- label: "到账金额",
|
|
|
- num: res.sumArrivalAmount.toFixed(2),
|
|
|
- color: "rgb(171 0 255)",
|
|
|
+ label: "合计",
|
|
|
+ data: [],
|
|
|
},
|
|
|
- ],
|
|
|
- });
|
|
|
- for (let i = 0; i < res.list.length; i++) {
|
|
|
+ ];
|
|
|
statConfig.value[0].data.push({
|
|
|
- label: res.list[i].sellCorporationName,
|
|
|
+ label: "合计",
|
|
|
data: [
|
|
|
{
|
|
|
label: "数量",
|
|
|
- num: res.list[i].sumQuantity,
|
|
|
- color: "blue",
|
|
|
+ num: res.sumQuantity,
|
|
|
+ color: "rgb(171 0 255)",
|
|
|
},
|
|
|
{
|
|
|
label: "金额",
|
|
|
- num: res.list[i].sumAmount.toFixed(2),
|
|
|
- color: "blue",
|
|
|
+ num: res.sumAmount.toFixed(2),
|
|
|
+ color: "rgb(171 0 255)",
|
|
|
},
|
|
|
{
|
|
|
label: "到账金额",
|
|
|
- num: res.list[i].sumClaimMoney.toFixed(2),
|
|
|
- color: "blue",
|
|
|
+ num: res.sumArrivalAmount.toFixed(2),
|
|
|
+ color: "rgb(171 0 255)",
|
|
|
},
|
|
|
],
|
|
|
});
|
|
|
-
|
|
|
- }
|
|
|
- console.log(statConfig.value)
|
|
|
- console.log(res);
|
|
|
- });
|
|
|
+ for (let i = 0; i < res.list.length; i++) {
|
|
|
+ statConfig.value[0].data.push({
|
|
|
+ label: res.list[i].sellCorporationName,
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ label: "数量",
|
|
|
+ num: res.list[i].sumQuantity,
|
|
|
+ color: "blue",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "金额",
|
|
|
+ num: res.list[i].sumAmount.toFixed(2),
|
|
|
+ color: "blue",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "到账金额",
|
|
|
+ num: res.list[i].sumClaimMoney.toFixed(2),
|
|
|
+ color: "blue",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ });
|
|
|
+ }
|
|
|
+ console.log(statConfig.value);
|
|
|
+ console.log(res);
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
const newContract = () => {
|