|
@@ -31,12 +31,24 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button @click="onQuery">近30天</el-button>
|
|
|
- <el-button @click="onQuery">本月</el-button>
|
|
|
- <el-button @click="onQuery">上月</el-button>
|
|
|
- <el-button @click="onQuery">近一年</el-button>
|
|
|
- <el-button @click="onQuery">去年</el-button>
|
|
|
- <el-button @click="onQuery">今年</el-button>
|
|
|
+ <el-button @click="clickBtn(1)" :class="{ btnBck: selectBtn === 1 }"
|
|
|
+ >近30天</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="clickBtn(2)" :class="{ btnBck: selectBtn === 2 }"
|
|
|
+ >本月</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="clickBtn(3)" :class="{ btnBck: selectBtn === 3 }"
|
|
|
+ >上月</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="clickBtn(4)" :class="{ btnBck: selectBtn === 4 }"
|
|
|
+ >近一年</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="clickBtn(5)" :class="{ btnBck: selectBtn === 5 }"
|
|
|
+ >去年</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="clickBtn(6)" :class="{ btnBck: selectBtn === 6 }"
|
|
|
+ >今年</el-button
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -52,19 +64,19 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="one-row-item other" style="margin-right: 15px">
|
|
|
- <div class="label">新增(人)</div>
|
|
|
+ <div class="label">新增客户(人)</div>
|
|
|
<div class="value">
|
|
|
{{ allData.customerSituation.customerAddCount }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="one-row-item other" style="margin-right: 15px">
|
|
|
- <div class="label">报价(人)</div>
|
|
|
+ <div class="label">报价客户(人)</div>
|
|
|
<div class="value">
|
|
|
{{ allData.customerSituation.saleQuotationCustomerCount }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="one-row-item other">
|
|
|
- <div class="label">成交(人)</div>
|
|
|
+ <div class="label">成交客户(人)</div>
|
|
|
<div class="value">
|
|
|
{{ allData.customerSituation.contractCustomerCount }}
|
|
|
</div>
|
|
@@ -117,6 +129,7 @@
|
|
|
</div>
|
|
|
<div>
|
|
|
<div class="child-value color-blue">
|
|
|
+ CNY
|
|
|
{{
|
|
|
moneyFormat(
|
|
|
allData.saleSituation.quotationAddStatistics.sumAmount,
|
|
@@ -139,9 +152,10 @@
|
|
|
</div>
|
|
|
<div>
|
|
|
<div class="child-value color-blue">
|
|
|
+ CNY
|
|
|
{{
|
|
|
moneyFormat(
|
|
|
- allData.saleSituation.quotationAddStatistics.sumAmount,
|
|
|
+ allData.saleSituation.contractAddStatistics.sumAmount,
|
|
|
2
|
|
|
)
|
|
|
}}
|
|
@@ -161,6 +175,7 @@
|
|
|
</div>
|
|
|
<div>
|
|
|
<div class="child-value color-blue">
|
|
|
+ CNY
|
|
|
{{
|
|
|
moneyFormat(
|
|
|
allData.saleSituation.claimAddStatistics.sumAmount,
|
|
@@ -201,6 +216,7 @@
|
|
|
</div>
|
|
|
<div>
|
|
|
<div class="child-value color-blue">
|
|
|
+ CNY
|
|
|
{{
|
|
|
moneyFormat(
|
|
|
allData.saleAddSituation.quotationAddStatistics
|
|
@@ -224,6 +240,7 @@
|
|
|
</div>
|
|
|
<div>
|
|
|
<div class="child-value color-blue">
|
|
|
+ CNY
|
|
|
{{
|
|
|
moneyFormat(
|
|
|
allData.saleAddSituation.contractAddStatistics
|
|
@@ -247,6 +264,7 @@
|
|
|
</div>
|
|
|
<div>
|
|
|
<div class="child-value color-blue">
|
|
|
+ CNY
|
|
|
{{
|
|
|
moneyFormat(
|
|
|
allData.saleAddSituation.claimAddStatistics.sumAmount,
|
|
@@ -309,8 +327,9 @@
|
|
|
</div>
|
|
|
<div class="text">订单数</div>
|
|
|
</div>
|
|
|
- <div>
|
|
|
+ <div style="margin-right: 15px">
|
|
|
<div class="child-value color-blue">
|
|
|
+ CNY
|
|
|
{{
|
|
|
moneyFormat(
|
|
|
allData.purchaseStatistics.purchaseOrder.purchaseAmount,
|
|
@@ -322,8 +341,13 @@
|
|
|
</div>
|
|
|
<div>
|
|
|
<div class="child-value color-blue">
|
|
|
+ CNY
|
|
|
{{
|
|
|
- allData.purchaseStatistics.purchaseOrder.purchasePayAmount
|
|
|
+ moneyFormat(
|
|
|
+ allData.purchaseStatistics.purchaseOrder
|
|
|
+ .purchasePayAmount,
|
|
|
+ 2
|
|
|
+ )
|
|
|
}}
|
|
|
</div>
|
|
|
<div class="text">已付款</div>
|
|
@@ -358,6 +382,7 @@
|
|
|
<script setup>
|
|
|
import TitleInfo from "@/components/TitleInfo/index.vue";
|
|
|
import useUserStore from "@/store/modules/user";
|
|
|
+import moment from "moment";
|
|
|
|
|
|
const titleList = [
|
|
|
"客户情况",
|
|
@@ -369,7 +394,7 @@ const titleList = [
|
|
|
"流程统计",
|
|
|
];
|
|
|
const userList = ref([]);
|
|
|
-const selectUser = ref([]);
|
|
|
+const selectUser = ref(["all"]);
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const loading = ref(false);
|
|
|
const queryForm = reactive({
|
|
@@ -436,13 +461,69 @@ const onQuery = () => {
|
|
|
}
|
|
|
getData();
|
|
|
};
|
|
|
+
|
|
|
const changeUser = (val) => {
|
|
|
selectUser.value = val.includes("all") ? ["all"] : val;
|
|
|
queryForm.userIds = val.includes("all") ? [] : val;
|
|
|
onQuery();
|
|
|
};
|
|
|
+
|
|
|
+const selectBtn = ref(1);
|
|
|
+const clickBtn = (val) => {
|
|
|
+ selectBtn.value = val;
|
|
|
+ let today = new Date();
|
|
|
+ let startDate = null;
|
|
|
+ let endDate = null;
|
|
|
+ let year = null;
|
|
|
+ let month = null;
|
|
|
+ switch (val) {
|
|
|
+ case 1:
|
|
|
+ startDate = new Date(today);
|
|
|
+ startDate.setDate(today.getDate() - 29);
|
|
|
+ endDate = new Date(today);
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ year = today.getFullYear();
|
|
|
+ month = today.getMonth();
|
|
|
+ startDate = new Date(year, month, 1);
|
|
|
+ endDate = new Date(year, month + 1, 0);
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ year = today.getFullYear();
|
|
|
+ month = today.getMonth() - 1;
|
|
|
+ startDate = new Date(year, month, 1);
|
|
|
+ endDate = new Date(year, month + 1, 0);
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ year = today.getFullYear();
|
|
|
+ startDate = new Date(year - 1, today.getMonth(), today.getDate());
|
|
|
+ endDate = new Date(year, today.getMonth(), today.getDate());
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ year = today.getFullYear();
|
|
|
+ startDate = new Date(year - 1, 0, 1);
|
|
|
+ endDate = new Date(year, 11, 31);
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ year = today.getFullYear();
|
|
|
+ startDate = new Date(year, 0, 1);
|
|
|
+ endDate = new Date(year, 11, 31);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ startDate = new Date(today);
|
|
|
+ startDate.setDate(today.getDate() - 29);
|
|
|
+ endDate = new Date(today);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ queryForm.timeArr = [
|
|
|
+ moment(startDate).format("yyyy-MM-DD"),
|
|
|
+ moment(endDate).format("yyyy-MM-DD"),
|
|
|
+ ];
|
|
|
+ onQuery();
|
|
|
+};
|
|
|
+
|
|
|
getDict();
|
|
|
-getData();
|
|
|
+clickBtn(1);
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -546,4 +627,8 @@ getData();
|
|
|
color: #0084ff;
|
|
|
}
|
|
|
}
|
|
|
+.btnBck {
|
|
|
+ background: #0084ff;
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
</style>
|