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 { ...@@ -272,18 +272,26 @@ export default {
}, },
mounted() { mounted() {
var params = { currentPage: 1, pageSize: 100, merchantIdName: "" } var params = { currentPage: 1, pageSize: 2000, merchantIdName: "" }
getMerchantList(params) this.getBaseData()
.then((res) => { getMerchantList(params).then((res) => {
this.getBaseData(res.list) this.getSetMerchant(res.list || [])
}) })
.catch(() => {
this.getBaseData([])
})
}, },
methods: { 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 = { const allOpt = {
id: "", id: "",
label: "全部" label: "全部"
...@@ -303,13 +311,6 @@ export default { ...@@ -303,13 +311,6 @@ export default {
this.baseData[item.optionsName] this.baseData[item.optionsName]
) )
} }
if (item.type === "select" && item.name === "merchantId") {
res.unshift({
merchantNo: "",
merchantName: "全部"
})
this.$set(this.showFormData[index], "optionList", res)
}
}) })
}, },
handleReset() { handleReset() {
......
...@@ -34,14 +34,7 @@ ...@@ -34,14 +34,7 @@
<script> <script>
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { import { getStatisticsList, exportStatisticsList,getMerchantList } from "@api/contentManager"
CONTENT_TYPE_OPTIONS,
SCENE_OPTIONS,
CHANNEL_OPTIONS,
STATUS_OPTIONS,
STATUS_ENUM
} from "./constant"
import { getStatisticsList, exportStatisticsList } from "@api/contentManager"
export default { export default {
name: "contentManagerList", name: "contentManagerList",
data() { data() {
...@@ -62,13 +55,12 @@ export default { ...@@ -62,13 +55,12 @@ export default {
pickerOptions: "beforeRangePickerOptions" pickerOptions: "beforeRangePickerOptions"
}, },
{ {
label: "所属门店", label: "可见门店",
name: "type", name: "merchantId",
type: "select", type: "select",
optionList: [], optionList: [],
optionId: "id", optionId: "merchantNo",
optionLabel: "label", optionLabel: "merchantName"
optionsName: "contentTypeOptions"
} }
], ],
// 基本数据 // 基本数据
...@@ -110,7 +102,7 @@ export default { ...@@ -110,7 +102,7 @@ export default {
}, },
mounted() { mounted() {
var params = { currentPage: 1, pageSize: 100, merchantIdName: "" } var params = { currentPage: 1, pageSize: 2000, merchantIdName: "" }
getMerchantList(params) getMerchantList(params)
.then((res) => { .then((res) => {
this.getBaseData(res.list) this.getBaseData(res.list)
...@@ -126,21 +118,16 @@ export default { ...@@ -126,21 +118,16 @@ export default {
id: "", id: "",
label: "全部" 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) => { this.showFormData.forEach((item, index) => {
if (item.type === "select" && this.baseData[item.optionsName]) { // if (item.type === "select" && this.baseData[item.optionsName]) {
this.baseData[item.optionsName].unshift(allOpt) // this.baseData[item.optionsName].unshift(allOpt)
this.$set( // this.$set(
this.showFormData[index], // this.showFormData[index],
"optionList", // "optionList",
this.baseData[item.optionsName] // this.baseData[item.optionsName]
) // )
} // }
if (item.type === "select" && item.name === "merchantId") { if (item.type === "select" && item.name === "merchantId") {
res.unshift({ res.unshift({
merchantNo: "", merchantNo: "",
...@@ -154,6 +141,7 @@ export default { ...@@ -154,6 +141,7 @@ export default {
for (const key in this.searchForm) { for (const key in this.searchForm) {
this.searchForm[key] = "" this.searchForm[key] = ""
} }
this.searchForm.goodsType = 0
this.realSearchForm = {} this.realSearchForm = {}
this.$refs.contentTable.refreshTable(true, true) this.$refs.contentTable.refreshTable(true, true)
}, },
......
...@@ -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!