Commit 37b5bcbc by 张立顺

Merge branch 'SAAS+V5.5.0' of http://192.168.3.233:8090/saas_plus/dj-car-life-sy…

…stem into SAAS+V5.5.0
2 parents b0c15a12 55a650d5
...@@ -196,3 +196,9 @@ export function downloadNumAdd(data) { ...@@ -196,3 +196,9 @@ export function downloadNumAdd(data) {
data.method = `${path2}carUploadRecord.downloadNum.add` data.method = `${path2}carUploadRecord.downloadNum.add`
return request(data, "post") return request(data, "post")
} }
/** 获取转化人员数据 */
export function getSellerListApi(data) {
data.method = `${path2}staff.page.info`
return request(data, "post")
}
...@@ -14,6 +14,14 @@ ...@@ -14,6 +14,14 @@
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }"> :props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }">
</el-cascader> </el-cascader>
</template> </template>
<template slot="sellerSelect">
<el-select v-model="searchForm.sellerUserId" remote reserve-keyword
placeholder="请选择转化人员" @visible-change="visibleChange" :remote-method="remoteMethod"
v-el-select-loadmore="interestsLoadmore" style="width: 100%" filterable>
<el-option v-for="(subItem, subIndex) in sellerList" :key="subIndex"
:label="subItem.staffName" :value="subItem.uuid" />
</el-select>
</template>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch" size="small" type="primary">
...@@ -223,6 +231,11 @@ ...@@ -223,6 +231,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="流量方" align="center" width="170" prop="merchantName" /> <el-table-column label="流量方" align="center" width="170" prop="merchantName" />
<el-table-column label="运营模式" align="center" width="170" prop="merchantName">
<template slot-scope="scope">
<span>{{ scope.row.directSalesFlag != null ? saleFlagTextObj[scope.row.directSalesFlag] : "-" }}</span>
</template>
</el-table-column>
<el-table-column label="二级流量方" align="center" width="170" prop="merchantName"> <el-table-column label="二级流量方" align="center" width="170" prop="merchantName">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.subShopMerchantName || "-" }}</span> <span>{{ scope.row.subShopMerchantName || "-" }}</span>
...@@ -339,8 +352,10 @@ import { ...@@ -339,8 +352,10 @@ import {
waitinputorderCount, waitinputorderCount,
orderImport, orderImport,
getServiceStore, getServiceStore,
cancelDivideAccountsAPI cancelDivideAccountsAPI,
getSellerListApi
} from "@api/order" } from "@api/order"
import { getBrandList } from "@/api/shopConfig.js"
import { getDiversionMerchantRef, listShop4sByRef } from "@api/merchant" import { getDiversionMerchantRef, listShop4sByRef } from "@api/merchant"
import { manageTypeList, BaseData, zyVoucherStatusOpt } from "@/common/constants" import { manageTypeList, BaseData, zyVoucherStatusOpt } from "@/common/constants"
import { mapActions, mapState, mapMutations } from "vuex" import { mapActions, mapState, mapMutations } from "vuex"
...@@ -355,6 +370,24 @@ export default { ...@@ -355,6 +370,24 @@ export default {
chooseRuleDialog, chooseRuleDialog,
ruleInfoDialog ruleInfoDialog
}, },
directives: {
"el-select-loadmore": {
bind(el, binding) {
setTimeout(() => {
const SELECTWRAP_DOM = el.querySelector(
".el-select-dropdown .el-select-dropdown__wrap"
)
SELECTWRAP_DOM.addEventListener("scroll", function () {
const condition =
this.scrollHeight - this.scrollTop <= this.clientHeight
if (condition) {
binding.value()
}
})
}, 1000)
}
}
},
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
...@@ -471,7 +504,12 @@ export default { ...@@ -471,7 +504,12 @@ export default {
// this.baseData.storeIdList = [] // this.baseData.storeIdList = []
this.getAllServiceStore() this.getAllServiceStore()
} }
this.sellerList = []
this.currentPage = 1
this.staffName = ''
this.getSellerList()
this.searchForm.merchantId = "" this.searchForm.merchantId = ""
this.searchForm.sellerUserId = ""
this.getOptionsList() this.getOptionsList()
} }
}, },
...@@ -610,6 +648,28 @@ export default { ...@@ -610,6 +648,28 @@ export default {
label: "商品类目", label: "商品类目",
name: "goodsType", name: "goodsType",
addHtml: "goodsCascader" addHtml: "goodsCascader"
}, {
label: "转化人员",
name: 'sellerUserId',
addHtml: "sellerSelect"
}, {
label: "主营品牌",
name: "brandIdList",
type: "select",
multiple: true,
collapseTags: true,
optionList: [],
optionId: "id",
optionLabel: "label",
optionsName: "brandList",
}, {
label: "运营模式",
name: "directSalesFlag",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "saleFlagList"
} }
], ],
searchForm: { searchForm: {
...@@ -635,6 +695,9 @@ export default { ...@@ -635,6 +695,9 @@ export default {
goodsType: '', goodsType: '',
secondaryGoodsType: '', secondaryGoodsType: '',
thirdLevelGoodsType: '', thirdLevelGoodsType: '',
sellerUserId: '',
brandIdList: [],
directSalesFlag: ''
}, },
baseData: { baseData: {
orderStatusList: [ orderStatusList: [
...@@ -777,7 +840,13 @@ export default { ...@@ -777,7 +840,13 @@ export default {
} }
], ],
zyVoucherStatusOpt: Util.deepClone(zyVoucherStatusOpt), zyVoucherStatusOpt: Util.deepClone(zyVoucherStatusOpt),
productTypeList: [] productTypeList: [],
saleFlagList: [
{ confId: "0", confValue: "非直营" },
{ confId: "1", confValue: "直营" }
],
brandList: [],
sellerList: []
}, },
tableData: [], tableData: [],
total: 0, total: 0,
...@@ -792,7 +861,14 @@ export default { ...@@ -792,7 +861,14 @@ export default {
ruleVisible: false, ruleVisible: false,
recordInfo: null, recordInfo: null,
ruleInfoVisible: false, ruleInfoVisible: false,
tempGoodsType: [] tempGoodsType: [],
saleFlagTextObj: {
0: '非直营',
1: '直营'
},
sellerList: [],
pageSize: 20,
currentPage: 1
} }
}, },
computed: { computed: {
...@@ -818,6 +894,8 @@ export default { ...@@ -818,6 +894,8 @@ export default {
(item) => !itemName.includes(item.name) (item) => !itemName.includes(item.name)
) )
} }
this.getBrandList()
this.getSellerList()
getParkStore({}).then((res) => { getParkStore({}).then((res) => {
res.forEach((item) => { res.forEach((item) => {
item.merchantId = item.merchantNo item.merchantId = item.merchantNo
...@@ -1014,7 +1092,11 @@ export default { ...@@ -1014,7 +1092,11 @@ export default {
provinceId: '', provinceId: '',
invoiceStatus: '', invoiceStatus: '',
zyVoucherStatus: '', zyVoucherStatus: '',
profitAllocationStatus: '' profitAllocationStatus: '',
salesType: "",
sellerUserId: "",
brandIdList: [],
directSalesFlag: ""
} }
this.tempGoodsType = [] this.tempGoodsType = []
// this.baseData.storeIdList = [] // this.baseData.storeIdList = []
...@@ -1032,6 +1114,61 @@ export default { ...@@ -1032,6 +1114,61 @@ export default {
this.getOptionsList() this.getOptionsList()
}) })
}, },
// 获取转化人员数据
remoteMethod(query) {
this.staffName = query
this.currentPage = 1
this.sellerList = []
this.getSellerList() // 请求接口
},
visibleChange(data) {
// 获取焦点重新渲染下拉框数据
if (data) {
if (this.staffName) {
this.staffName = ""
this.currentPage = 1
this.sellerList = []
this.getSellerList()
}
}
},
// 获取更多转化人员
interestsLoadmore() {
setTimeout(() => {
this.currentPage = this.currentPage + 1
if (this.allPages < this.currentPage) {
this.currentPage = this.allPages
return
}
this.getSellerList()
}, 10)
},
getSellerList() {
let merchantIds = this.searchForm.yqMerchantIds
getSellerListApi({
yqMerchantIdList: merchantIds,
scene: 0,
staffName: this.staffName,
currentPage: this.currentPage,
pageSize: this.pageSize
}).then(res => {
this.allPages = res.pages
let arr = this.sellerList.concat(res.list)
this.sellerList = this.unique(arr)
if (this.sellerList?.findIndex(val => val.uuid == '' && val.staffName == '全部') < 0 && !this.staffName) {
this.sellerList.unshift({
uuid: '',
staffName: '全部'
})
}
})
},
unique(arr) {
const res = new Map()
return arr.filter(
(a) => !res.has(a.uuid) && res.set(a.uuid, 1)
)
},
getDiversionMerchantRef(merchantId) { getDiversionMerchantRef(merchantId) {
getDiversionMerchantRef({ getDiversionMerchantRef({
merchantId: merchantId merchantId: merchantId
...@@ -1049,7 +1186,7 @@ export default { ...@@ -1049,7 +1186,7 @@ export default {
this.showFormData[index].optionLabel this.showFormData[index].optionLabel
] !== "全部" ] !== "全部"
) { ) {
if (item.optionsName != 'parkServiceList') { // 服务对接由于是多选不应该添加全部选项 if (item.optionsName != 'parkServiceList' && item.optionsName != "brandList") { // 服务对接主营品牌由于是多选不应该添加全部选项
const temp = {} const temp = {}
temp[this.showFormData[index].optionId] = '' temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部' temp[this.showFormData[index].optionLabel] = '全部'
...@@ -1064,6 +1201,12 @@ export default { ...@@ -1064,6 +1201,12 @@ export default {
} }
}) })
}, },
getBrandList() {
getBrandList({}).then((res) => {
this.baseData.brandList = res
this.getOptionsList()
})
},
getParams() { getParams() {
const params = Util.deepClone(this.searchForm) const params = Util.deepClone(this.searchForm)
const form = this.searchForm const form = this.searchForm
...@@ -1133,6 +1276,13 @@ export default { ...@@ -1133,6 +1276,13 @@ export default {
}) })
delete params.yqMerchantIds delete params.yqMerchantIds
} }
if (params.brandIdList && params.brandIdList.length > 0) {
params.brandIdList.forEach((item, index) => {
const brandName = `brandIdList[${index}]`
params[brandName] = item
})
delete params.brandIdList
}
params.pageNum = 1 params.pageNum = 1
params.method = "dj.api.smartcarlife.ordermanage.export.async" params.method = "dj.api.smartcarlife.ordermanage.export.async"
let eventParams = deepClone({ ...params }) let eventParams = deepClone({ ...params })
...@@ -1154,6 +1304,20 @@ export default { ...@@ -1154,6 +1304,20 @@ export default {
params.pageNum = 1 params.pageNum = 1
params.method = "dj.api.smartcarlife.order.residentEquity.export.async" params.method = "dj.api.smartcarlife.order.residentEquity.export.async"
let eventParams = deepClone({ ...params }) let eventParams = deepClone({ ...params })
if (eventParams.yqMerchantIds && eventParams.yqMerchantIds.length > 0) {
eventParams.yqMerchantIds.forEach((item, index) => {
const merchantName = `yqMerchantIds[${index}]`
eventParams[merchantName] = item
})
delete eventParams.yqMerchantIds
}
if (eventParams.brandIdList && eventParams.brandIdList.length > 0) {
eventParams.brandIdList.forEach((item, index) => {
const brandName = `brandIdList[${index}]`
eventParams[brandName] = item
})
delete eventParams.brandIdList
}
if (eventParams?.zyVoucherStatus == 1) eventParams.status = 13 if (eventParams?.zyVoucherStatus == 1) eventParams.status = 13
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!