Commit a403acd2 by 前端

渗透报表

1 parent 3a7180a1
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-03-14 13:42:35
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-03-15 09:56:24
* @FilePath: \dj-car-life-system\src\api\permeation.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import request from "./request"
//获取所有主营品牌列表
export function brandList(data) {
data.method = "dj.api.smartcarlife.common.car.brand.list"
return request(data)
}
// 查询4s店列表
export function listShop4sByRef(data) {
data.method = "dj.api.scenemerchantref.listShop4sByRef"
return request(data)
}
//渗透率报表(分页)
export function permeabilityList(data) {
data.method = "dj.api.smarcarlife.permeability.report.page"
return request(data)
}
//渗透率报表导出
export function permeabilityExport(data) {
data.method = "dj.api.smartcarlife.permeability.report.exportAsync"
return request(data)
}
//渗透率报表填报明细列表(分页)
export function permeabilityDetail(data) {
data.method = "dj.api.smarcarlife.permeability.report.detail.page"
return request(data)
}
//渗透率报表详情导出
export function permeabilityDetailExport(data) {
data.method = "dj.api.smartcarlife.permeability.report.detail.exportAsync"
return request(data)
}
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
</div> </div>
<d2-table <d2-table
ref="recordTable" ref="recordTable"
:get-list-api="getListApi"
:table-data="tableData" :table-data="tableData"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
...@@ -50,32 +51,28 @@ ...@@ -50,32 +51,28 @@
<script> <script>
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { permeabilityDetail } from "@/api/permeation.js"
import { mapActions, mapState } from "vuex" import { mapActions, mapState } from "vuex"
import { dfBalanceMonthStatListStatYear } from "@api/balanceStatistics" import dayjs from "dayjs"
import { rangePickerOptions_year_2023 } from "@/common/format"
export default { export default {
name: "DetailDialog", name: "DetailDialog",
components: {}, components: {},
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, getListApi: permeabilityDetail,
pickerOption: rangePickerOptions_year_2023,
countObj: {}, countObj: {},
searchForm: { searchForm: {},
statYear: "",
merchantId: ""
},
searchFormSearch: {}, searchFormSearch: {},
searchSelectObj: {}, searchSelectObj: {},
showFormData: [ showFormData: [
{ {
label: "员工姓名", label: "员工姓名",
name: "putStatus", name: "staffName",
type: "input" type: "input"
}, },
{ {
label: "填报日期", label: "填报日期",
name: "putStatus", name: "createdDate",
type: "datePicker" type: "datePicker"
} }
], ],
...@@ -89,15 +86,15 @@ export default { ...@@ -89,15 +86,15 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "员工名称", label: "员工名称",
prop: "statMonth" prop: "staffName"
}, },
{ {
label: "填报交付数", label: "填报交付数",
prop: "statMonth" prop: "deliveryCount"
}, },
{ {
label: "填报时间", label: "填报时间",
prop: "statMonth" prop: "createdDate"
} }
] ]
}, },
...@@ -110,46 +107,62 @@ export default { ...@@ -110,46 +107,62 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
recordInfo: { merchantId: {
type: Object, type: String,
default: () => {} default: ""
} }
}, },
computed: {}, computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() { mounted() {
const nowDate = new Date() this.searchForm.merchantId = this.merchantId
this.searchForm.statYear = nowDate.getFullYear().toString()
if (this.recordInfo) {
// this.searchForm.merchantId = this.recordInfo.merchantId
}
// this.getList()
}, },
methods: { methods: {
...mapActions({ ...mapActions("d2admin/user", ["actionSetDownloadList"]),
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = this.getParams()
resolve() resolve()
}) })
}, },
getParams() {
chooseYear() { this.searchFormSearch = deepClone(this.searchForm)
this.getList() if (this.searchFormSearch.createdDate) {
this.searchFormSearch.reportStartDate = dayjs(
this.searchFormSearch.createdDate[0]
).format("YYYY-MM-DD")
this.searchFormSearch.reportEndDate = dayjs(
this.searchFormSearch.createdDate[1]
).format("YYYY-MM-DD")
}
return this.searchFormSearch
}, },
handleExport() {
getList() { var params = this.getParams()
var params = deepClone(this.searchForm) params.method =
dfBalanceMonthStatListStatYear(params).then((res) => { "dj.api.smartcarlife.permeability.report.detail.exportAsync"
this.tableData = res const list = [
}) ...this.dowloadList,
{
name: "dowloadList",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
handleReset() {
this.searchForm = {
merchantId: this.merchantId
}
this.$refs.recordTable.refreshTable()
}, },
handleClose() { handleClose() {
this.$emit("dialogClose") this.$emit("dialogClose")
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!