Commit df200abc by 王志慧

Merge branch 'SAAS-V4.37.0' of http://192.168.3.233:8090/saas_plus/dj-car-life-s…

…ystem into SAAS-V4.37.0
2 parents bed674fd 8ad932b3
/*
* @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)
}
......@@ -272,18 +272,26 @@ export default {
},
mounted() {
var params = { currentPage: 1, pageSize: 100, merchantIdName: "" }
getMerchantList(params)
.then((res) => {
this.getBaseData(res.list)
})
.catch(() => {
this.getBaseData([])
})
var params = { currentPage: 1, pageSize: 2000, merchantIdName: "" }
this.getBaseData()
getMerchantList(params).then((res) => {
this.getSetMerchant(res.list || [])
})
},
methods: {
getBaseData(res) {
getSetMerchant(res) {
this.showFormData.forEach((item, index) => {
if (item.type === "select" && item.name === "merchantId") {
res.unshift({
merchantNo: "",
merchantName: "全部"
})
this.$set(this.showFormData[index], "optionList", res)
}
})
},
getBaseData() {
const allOpt = {
id: "",
label: "全部"
......@@ -303,13 +311,6 @@ export default {
this.baseData[item.optionsName]
)
}
if (item.type === "select" && item.name === "merchantId") {
res.unshift({
merchantNo: "",
merchantName: "全部"
})
this.$set(this.showFormData[index], "optionList", res)
}
})
},
handleReset() {
......
......@@ -34,14 +34,7 @@
<script>
import { Util, deepClone } from "@/common/util"
import {
CONTENT_TYPE_OPTIONS,
SCENE_OPTIONS,
CHANNEL_OPTIONS,
STATUS_OPTIONS,
STATUS_ENUM
} from "./constant"
import { getStatisticsList, exportStatisticsList } from "@api/contentManager"
import { getStatisticsList, exportStatisticsList,getMerchantList } from "@api/contentManager"
export default {
name: "contentManagerList",
data() {
......@@ -62,13 +55,12 @@ export default {
pickerOptions: "beforeRangePickerOptions"
},
{
label: "所属门店",
name: "type",
label: "可见门店",
name: "merchantId",
type: "select",
optionList: [],
optionId: "id",
optionLabel: "label",
optionsName: "contentTypeOptions"
optionId: "merchantNo",
optionLabel: "merchantName"
}
],
// 基本数据
......@@ -110,7 +102,7 @@ export default {
},
mounted() {
var params = { currentPage: 1, pageSize: 100, merchantIdName: "" }
var params = { currentPage: 1, pageSize: 2000, merchantIdName: "" }
getMerchantList(params)
.then((res) => {
this.getBaseData(res.list)
......@@ -126,21 +118,16 @@ export default {
id: "",
label: "全部"
}
this.baseData = {
contentTypeOptions: deepClone(CONTENT_TYPE_OPTIONS),
sceneOptions: deepClone(SCENE_OPTIONS),
channelOptions: deepClone(CHANNEL_OPTIONS),
statuslOptions: deepClone(STATUS_OPTIONS)
}
this.showFormData.forEach((item, index) => {
if (item.type === "select" && this.baseData[item.optionsName]) {
this.baseData[item.optionsName].unshift(allOpt)
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
// if (item.type === "select" && this.baseData[item.optionsName]) {
// this.baseData[item.optionsName].unshift(allOpt)
// this.$set(
// this.showFormData[index],
// "optionList",
// this.baseData[item.optionsName]
// )
// }
if (item.type === "select" && item.name === "merchantId") {
res.unshift({
merchantNo: "",
......@@ -154,6 +141,7 @@ export default {
for (const key in this.searchForm) {
this.searchForm[key] = ""
}
this.searchForm.goodsType = 0
this.realSearchForm = {}
this.$refs.contentTable.refreshTable(true, true)
},
......
......@@ -37,6 +37,7 @@
</div>
<d2-table
ref="recordTable"
:get-list-api="getListApi"
:table-data="tableData"
:search-form="searchFormSearch"
:table-params="tableParams"
......@@ -50,32 +51,28 @@
<script>
import { Util, deepClone } from "@/common/util"
import { permeabilityDetail } from "@/api/permeation.js"
import { mapActions, mapState } from "vuex"
import { dfBalanceMonthStatListStatYear } from "@api/balanceStatistics"
import { rangePickerOptions_year_2023 } from "@/common/format"
import dayjs from "dayjs"
export default {
name: "DetailDialog",
components: {},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
pickerOption: rangePickerOptions_year_2023,
getListApi: permeabilityDetail,
countObj: {},
searchForm: {
statYear: "",
merchantId: ""
},
searchForm: {},
searchFormSearch: {},
searchSelectObj: {},
showFormData: [
{
label: "员工姓名",
name: "putStatus",
name: "staffName",
type: "input"
},
{
label: "填报日期",
name: "putStatus",
name: "createdDate",
type: "datePicker"
}
],
......@@ -89,15 +86,15 @@ export default {
tableColumns: [
{
label: "员工名称",
prop: "statMonth"
prop: "staffName"
},
{
label: "填报交付数",
prop: "statMonth"
prop: "deliveryCount"
},
{
label: "填报时间",
prop: "statMonth"
prop: "createdDate"
}
]
},
......@@ -110,46 +107,62 @@ export default {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => {}
merchantId: {
type: String,
default: ""
}
},
computed: {},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
const nowDate = new Date()
this.searchForm.statYear = nowDate.getFullYear().toString()
if (this.recordInfo) {
// this.searchForm.merchantId = this.recordInfo.merchantId
}
// this.getList()
this.searchForm.merchantId = this.merchantId
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
...mapActions("d2admin/user", ["actionSetDownloadList"]),
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch = this.getParams()
resolve()
})
},
chooseYear() {
this.getList()
getParams() {
this.searchFormSearch = deepClone(this.searchForm)
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
},
getList() {
var params = deepClone(this.searchForm)
dfBalanceMonthStatListStatYear(params).then((res) => {
this.tableData = res
})
handleExport() {
var params = this.getParams()
params.method =
"dj.api.smartcarlife.permeability.report.detail.exportAsync"
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() {
this.$emit("dialogClose")
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!