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) {
data.method = `${path2}carUploadRecord.downloadNum.add`
return request(data, "post")
}
/** 获取转化人员数据 */
export function getSellerListApi(data) {
data.method = `${path2}staff.page.info`
return request(data, "post")
}
......@@ -14,6 +14,14 @@
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }">
</el-cascader>
</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>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
......@@ -223,6 +231,11 @@
</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">
<span>{{ scope.row.directSalesFlag != null ? saleFlagTextObj[scope.row.directSalesFlag] : "-" }}</span>
</template>
</el-table-column>
<el-table-column label="二级流量方" align="center" width="170" prop="merchantName">
<template slot-scope="scope">
<span>{{ scope.row.subShopMerchantName || "-" }}</span>
......@@ -339,8 +352,10 @@ import {
waitinputorderCount,
orderImport,
getServiceStore,
cancelDivideAccountsAPI
cancelDivideAccountsAPI,
getSellerListApi
} from "@api/order"
import { getBrandList } from "@/api/shopConfig.js"
import { getDiversionMerchantRef, listShop4sByRef } from "@api/merchant"
import { manageTypeList, BaseData, zyVoucherStatusOpt } from "@/common/constants"
import { mapActions, mapState, mapMutations } from "vuex"
......@@ -355,6 +370,24 @@ export default {
chooseRuleDialog,
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() {
return {
userInfo: this.$store.state.d2admin.user.info,
......@@ -471,7 +504,12 @@ export default {
// this.baseData.storeIdList = []
this.getAllServiceStore()
}
this.sellerList = []
this.currentPage = 1
this.staffName = ''
this.getSellerList()
this.searchForm.merchantId = ""
this.searchForm.sellerUserId = ""
this.getOptionsList()
}
},
......@@ -610,6 +648,28 @@ export default {
label: "商品类目",
name: "goodsType",
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: {
......@@ -635,6 +695,9 @@ export default {
goodsType: '',
secondaryGoodsType: '',
thirdLevelGoodsType: '',
sellerUserId: '',
brandIdList: [],
directSalesFlag: ''
},
baseData: {
orderStatusList: [
......@@ -777,7 +840,13 @@ export default {
}
],
zyVoucherStatusOpt: Util.deepClone(zyVoucherStatusOpt),
productTypeList: []
productTypeList: [],
saleFlagList: [
{ confId: "0", confValue: "非直营" },
{ confId: "1", confValue: "直营" }
],
brandList: [],
sellerList: []
},
tableData: [],
total: 0,
......@@ -792,7 +861,14 @@ export default {
ruleVisible: false,
recordInfo: null,
ruleInfoVisible: false,
tempGoodsType: []
tempGoodsType: [],
saleFlagTextObj: {
0: '非直营',
1: '直营'
},
sellerList: [],
pageSize: 20,
currentPage: 1
}
},
computed: {
......@@ -818,6 +894,8 @@ export default {
(item) => !itemName.includes(item.name)
)
}
this.getBrandList()
this.getSellerList()
getParkStore({}).then((res) => {
res.forEach((item) => {
item.merchantId = item.merchantNo
......@@ -1014,7 +1092,11 @@ export default {
provinceId: '',
invoiceStatus: '',
zyVoucherStatus: '',
profitAllocationStatus: ''
profitAllocationStatus: '',
salesType: "",
sellerUserId: "",
brandIdList: [],
directSalesFlag: ""
}
this.tempGoodsType = []
// this.baseData.storeIdList = []
......@@ -1032,6 +1114,61 @@ export default {
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: merchantId
......@@ -1049,7 +1186,7 @@ export default {
this.showFormData[index].optionLabel
] !== "全部"
) {
if (item.optionsName != 'parkServiceList') { // 服务对接由于是多选不应该添加全部选项
if (item.optionsName != 'parkServiceList' && item.optionsName != "brandList") { // 服务对接主营品牌由于是多选不应该添加全部选项
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
......@@ -1064,6 +1201,12 @@ export default {
}
})
},
getBrandList() {
getBrandList({}).then((res) => {
this.baseData.brandList = res
this.getOptionsList()
})
},
getParams() {
const params = Util.deepClone(this.searchForm)
const form = this.searchForm
......@@ -1133,6 +1276,13 @@ export default {
})
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.method = "dj.api.smartcarlife.ordermanage.export.async"
let eventParams = deepClone({ ...params })
......@@ -1154,6 +1304,20 @@ export default {
params.pageNum = 1
params.method = "dj.api.smartcarlife.order.residentEquity.export.async"
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
const list = [
...this.dowloadList,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!