Commit 3175df41 by 李伟康

```

feat(earlyWarningManager): 新增门店详情查询接口并优化策略中心功能

- 新增 getStrategyMerchantDetail 接口用于查询门店详情
- 优化 MultipleCourse 组件,添加搜索前置处理函数和调整样式
- 修改 MultipleRecording 组件,更新标签显示内容和字段映射
- 调整 MultipleStaff 组件,修改搜索字段和参数获取逻辑
- 统一使用 paramsInfo 替代 merchantInfo 进行数据注入
- 优化 OverviewList 组件,调整布局和数据显示逻辑
- 更新 StaffOverview 组件,完善员工时长统计功能
- 优化 StoreSignboardInfo 组件,添加门店详情查询功能
- 调整 StrategyDetail 组件的界面展示结构
```
1 parent 78916ed4
Showing 23 changed files with 575 additions and 292 deletions
......@@ -604,4 +604,12 @@ export function queryStrategyTaskDetailById (data = {}) {
export function getStrategyMerchantListWarningInfo (data = {}) {
data.method = "dj.api.strategy.merchant.list.warningInfo"
return request(data, RequestMethods.POST)
}
/**
查询门店详情
*/
export function getStrategyMerchantDetail (data = {}) {
data.method = "dj.api.strategy.find.merchant.detail"
return request(data, RequestMethods.POST)
}
\ No newline at end of file
......@@ -47,6 +47,7 @@
:pagerCount="5"
@setTableFinishFun="setTableFinishFun"
@selectionTable="selectionTable"
:before-search-fn="beforeSearchFn"
>
<template #titleHtml="scope">
<el-tooltip
......@@ -216,6 +217,7 @@ export default {
searchForm: {
title: ''
},
searchFormSearch:{},
tableParams: {
listName: "list",
mutiSelectUniqueKey: "courseId",
......@@ -316,8 +318,8 @@ export default {
.dot {
display: inline-block;
width: 8px;
height: 8px;
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
......
......@@ -74,7 +74,7 @@
:key="ind"
@close="remove(i,ind)"
disable-transitions
>{{ i.id }}</el-tag>
>{{ i.chooseContent }}</el-tag>
</template>
</div>
</el-scrollbar>
......@@ -104,11 +104,17 @@ export default {
}
},
targetId: 'id',
formatTag: (e) => {
return {
...e,
chooseContent: `${e.employeeName} ${e.startTime}`
}
},
getListApi: getRecordAllPageListByCondition,
searchForm: {
staffName: '',
receptionDate: '',
businessType: 0
businessType: 1
},
searchFormSearch: {},
tableParams: {
......@@ -123,7 +129,7 @@ export default {
},
{
label: "接待时间",
prop: "receptionStartTime",
prop: "startTime",
minWidth: 90
},
{
......@@ -133,7 +139,7 @@ export default {
},
{
label: "车型",
prop: "carBrand",
prop: "carModel",
minWidth: 90
},
{
......@@ -156,19 +162,13 @@ export default {
}
},
methods: {
beforeSearchFn () {
return new Promise((resolve) => {
this.searchFormSearch = this.getParams()
resolve()
})
},
getParams () {
let { merchantId } = this.merchantInfo,
let { merchantIds } = this.paramsInfo,
params = this.deepClone(this.searchForm)
if (params.receptionDate) {
params.receptionDate = dayjs(params.receptionDate).format("YYYY-MM-DD")
}
params.merchantId = merchantId
params.merchantId = merchantIds[0]
console.log(JSON.parse(JSON.stringify(params)))
return params
},
......
......@@ -19,7 +19,7 @@
size="small"
class="search-input"
clearable
v-model="searchForm.name"
v-model="searchForm.staffName"
></el-input>
<el-button
type="primary"
......@@ -97,7 +97,9 @@ export default {
},
targetId: 'staffUuid',
getListApi: getStrategyStaffList,
searchForm: {},
searchForm: {
staffName: ''
},
tableParams: {
listName: "list",
mutiSelectUniqueKey: "staffUuid",
......@@ -131,15 +133,16 @@ export default {
methods: {
beforeSearchFn () {
return new Promise((resolve) => {
let { positionTypeList, merchantList, merchantInfo } = this,
let { positionTypeList, merchantList, paramsInfo: { merchantIds } } = this,
{ staffName } = this.searchForm,
merchantIdList = []
if (merchantList.length) merchantIdList = merchantList.map(item => item.id)
else merchantIdList = [merchantInfo.merchantId]
if (merchantList.length) merchantIdList = merchantList.map(item => item.merchantId)
else merchantIdList = merchantIds
this.searchFormSearch = {
positionTypeList,
merchantIdList,
sceneType: 0
sceneType: 0,
staffName
}
resolve()
})
......
......@@ -65,8 +65,7 @@ const STRATEGY_FORM_1 = [
componentName: 'recordingTag',
key: 'recordingList',
tagKey: 'id',
tagNameKey: 'name'
tagNameKey: 'chooseContent'
},
{
label: '执行周期',
......
......@@ -208,7 +208,7 @@ import {
} from '@/api/earlyWarningManager'
export default {
name: 'AddStrategy',
inject: ['GET_MERCHANT_INFO'],
inject: ['GET_PARAMS_INFO'],
components: {
MultipleStaff,
MultipleCourse,
......@@ -295,8 +295,8 @@ export default {
}
]
},
merchantInfo () {
return this.GET_MERCHANT_INFO()
paramsInfo () {
return this.GET_PARAMS_INFO()
},
formRules () {
const { strategyType } = this
......@@ -459,7 +459,7 @@ export default {
},
confirm () {
try {
let { merchantInfo, formData, strategyType, merchantList, biz } = this,
let { paramsInfo, formData, strategyType, merchantList, biz } = this,
{ title,
subTitle,
content,
......@@ -486,16 +486,18 @@ export default {
pushType,
},
courseList,
recordingList
}
if (merchantList.length) params.merchantList = merchantList
else params.merchantList = [merchantInfo]
else params.merchantList = paramsInfo.merchantIds
if (dateRange.length) {
let [startDate, endDate] = dateRange
params.strategyInfo.startDate = dayjs(startDate).format('YYYY-MM-DD') + ' 00:00:00'
params.strategyInfo.endDate = dayjs(endDate).format('YYYY-MM-DD') + ' 23:59:59'
}
if (pushType == 0 && pushTime) params.strategyInfo.startDate = dayjs(pushTime).format('YYYY-MM-DD HH:mm:ss')
if (strategyType == 3) {
if (pushType == 0 && pushTime) params.strategyInfo.startDate = dayjs(pushTime).format('YYYY-MM-DD HH:mm:ss')
if (pushType == 1) params.strategyInfo.startDate = dayjs().format('YYYY-MM-DD HH:mm:ss')
}
if (staffList_1.length) staffList = [...staffList, ...staffList_1]
if (staffList && staffList.length) {
params.staffList = staffList.map(e => {
......@@ -507,6 +509,15 @@ export default {
}
})
}
if (recordingList && recordingList.length) {
params.recordingList = recordingList.map(e => {
return {
recordingId: e.id,
receptionStaffName: e.employeeName,
receptionDate: e.startTime
}
})
}
console.log(params)
const data = await batchCreateStrategy(params)
if (data) {
......
......@@ -12,7 +12,7 @@ export default {
inject: [
'deepClone',
'GET_POSITION_TYPE_LIST',
'GET_MERCHANT_INFO',
'GET_PARAMS_INFO',
'GET_MERCHANT_LIST',
'GET_BIZ'
],
......@@ -34,8 +34,8 @@ export default {
positionTypeList () {
return this.GET_POSITION_TYPE_LIST()
},
merchantInfo () {
return this.GET_MERCHANT_INFO()
paramsInfo () {
return this.GET_PARAMS_INFO()
},
merchantList () {
return this.GET_MERCHANT_LIST()
......@@ -109,6 +109,7 @@ export default {
this.handleSearch()
},
handleSearch () {
this.multipleTable().page.currentPage = 1
this.multipleTable().refreshTable()
},
setTableFinishFun (data, listIndex) {
......@@ -131,6 +132,9 @@ export default {
},
selectionTable (list, listIndex) {
this.$nextTick(() => {
if (this.formatTag) list = list.map(e => {
return this.formatTag(e)
})
this.pageChooseList[listIndex] = list
let { pageChooseList } = this,
chooseList = []
......
......@@ -46,7 +46,7 @@ export default {
default: dayjs().format("YYYY-MM-DD")
}
},
inject: ['GET_MERCHANT_INFO'],
inject: ['GET_PARAMS_INFO'],
computed: {
dialogShow: {
......@@ -66,8 +66,8 @@ export default {
}
}
},
merchantInfo () {
return this.GET_MERCHANT_INFO()
paramsInfo () {
return this.GET_PARAMS_INFO()
},
},
......@@ -98,10 +98,10 @@ export default {
submit () {
this.$refs.form.validate(async (valid) => {
if (valid) {
const { merchantId } = this.merchantInfo,
const { merchantIds } = this.paramsInfo,
{ nodeDate } = this.formData,
data = await stopBusiness({
merchantId,
merchantId: merchantIds[0],
sceneType: 0,
bizs: 1,
nodeDate: dayjs(nodeDate).format("YYYY-MM-DD HH:mm:ss")
......
......@@ -42,6 +42,7 @@
</template>
<script>
import { init } from 'echarts';
import ScrollXView from '../ScrollXView.vue';
import StopBusiness from './StopBusiness.vue';
import {
......@@ -54,7 +55,7 @@ export default {
StopBusiness
},
name: 'BusinessOverview',
inject: ['GET_MERCHANT_INFO'],
inject: ['GET_PARAMS_INFO'],
data () {
return {
stopBusinessVisible: false,
......@@ -67,8 +68,8 @@ export default {
let { status } = this.businessOverviewDetail
return status == 0 ? '展业中' : '停止展业'
},
merchantInfo () {
return this.GET_MERCHANT_INFO()
paramsInfo () {
return this.GET_PARAMS_INFO()
},
minDate () {
let nodeDate = '',
......@@ -79,17 +80,20 @@ export default {
}
},
mounted () {
this.getStrategyMerchantTimeline()
},
methods: {
init(){
this.getStrategyMerchantTimeline()
},
openStopBusinessDialog () {
this.stopBusinessVisible = true
},
async getStrategyMerchantTimeline () {
let { merchantId } = this.merchantInfo,
let { merchantIds } = this.paramsInfo,
data = await getStrategyMerchantTimeline({
merchantId,
merchantId: merchantIds[0],
bizs: 1, //业务类型(1.延保 2.轻改 3.权益)
sceneType: 0 //业务场景(0.会员权益,1.精品升级)
})
......
......@@ -13,7 +13,7 @@
@click="handleTargetConfig(item)"
>历史兜底目标</el-button>
</div>
<div class="content flex">
<div class="content">
<template v-for="(i,idx) in item.list">
<div
class="item"
......@@ -21,8 +21,10 @@
:style="{width: `calc(100% / ${item.list.length})`}"
>
<div class="label">{{ i.label }}</div>
<div class="value">{{ i.value || 123 }}</div>
<div class="sub-value">兜底目标80%</div>
<div class="value">{{ viewData[i.key] == null ?'-' : viewData[i.key]}}</div>
<template v-if="i.subKey">
<div class="sub-value">兜底目标{{ viewData[i.subKey] }}</div>
</template>
</div>
</template>
</div>
......@@ -42,63 +44,114 @@ const overviewList = [
title: '整车延保',
list: [
{
label: '成交数'
label: '成交数',
key: 'vehicleWarrantyDealCount',
},
{
label: '渗透率'
label: '渗透率',
key: 'vehicleWarrantyPenetrationRate',
subKey: 'vehicleWarrantyPenetrationBottomTarget'
},
{
label: '转化率'
label: '转化率',
key: 'vehicleWarrantyConversionRate',
subKey: 'vehicleWarrantyConversionBottomTarget'
}
]
},
{
title: '安心包',
list: [
{ label: '成交数' },
{ label: '渗透率' },
{ label: '转化率' }
{
label: '成交数',
key: 'safetyPackageDealCount'
},
{
label: '渗透率',
key: 'safetyPackagePenetrationRate',
subKey: 'safetyPackagePenetrationBottomTarget'
},
{
label: '转化率',
key: 'safetyPackageConversionRate',
subKey: 'safetyPackageConversionBottomTarget'
}
],
},
{
title: '电池',
list: [
{ label: '成交数' },
{ label: '渗透率' },
{ label: '转化率' }
{
label: '成交数',
key: 'batteryWarrantyDealCount'
},
{
label: '渗透率',
key: 'batteryWarrantyPenetrationRate',
subKey: 'batteryWarrantyPenetrationBottomTarget'
},
{
label: '转化率',
key: 'batteryWarrantyConversionRate',
subKey: 'batteryWarrantyConversionBottomTarget'
}
],
},
{
title: '轮胎',
list: [
{ label: '成交数' },
{ label: '渗透率' },
{ label: '转化率' }
{
label: '成交数',
key: 'tireWarrantyDealCount'
},
{
label: '渗透率',
key: 'tireWarrantyPenetrationRate',
subKey: 'tireWarrantyPenetrationBottomTarget'
},
{
label: '转化率',
key: 'tireWarrantyConversionRate',
subKey: 'tireWarrantyConversionBottomTarget'
}
],
}
]
export default {
name: 'OverViewList',
components: { HistoryTarget },
inject:['deepClone'],
inject: ['deepClone'],
props: {
hasEHi: {
type: Boolean,
default: false
},
viewData: {
type: Object,
default () {
return {}
}
}
},
data () {
return {
historyTargetVisible: false
}
},
computed: {
overviewList () {
let { hasEHi } = this,
list = this.deepClone(overviewList)
if (hasEHi) list.map(e => {
e.list.push({ label: '生态系数' })
list = this.deepClone(overviewList)
if (hasEHi) list.map((e,index) => {
e.list.push({
label: '生态系数',
key: {
0: 'vehicleWarrantyEcoCoefficient',
1: 'safetyPackageEcoCoefficient',
2: 'batteryWarrantyEcoCoefficient',
3: 'tireWarrantyEcoCoefficient'
}[index]
})
})
return list
......@@ -128,39 +181,41 @@ export default {
box-sizing: border-box;
gap: 15px;
.overview-item {
padding-bottom: 15px;
padding-bottom: 7px;
border-bottom: 1px solid #e5e5e5;
.content {
display: flex;
align-items: stretch;
.item {
.label {
color: #666666;
font-size: 12px;
line-height: 15px;
font-size: 14px;
line-height: 16px;
}
.value {
color: #2a58ad;
font-size: 16px;
font-size: 20px;
font-weight: 500;
margin-top: 4px;
line-height: 16px;
line-height: 20px;
}
.sub-value {
color: #999999;
font-size: 11px;
font-size: 13px;
margin-top: 4px;
line-height: 13px;
line-height: 15px;
}
}
}
}
.clear-border{
.clear-border {
border: none;
padding-bottom: 0;
}
.title {
color: #222222;
font-size: 13px;
font-size: 15px;
font-weight: 500;
margin-bottom: 14px;
line-height: 16px;
......
......@@ -15,10 +15,10 @@
>
<el-form-item
label="人员姓名:"
prop="name"
prop="staffName"
>
<el-input
v-model="formData.name"
v-model="formData.staffName"
class="input-width"
placeholder="请输入人员姓名"
maxlength="20"
......@@ -26,10 +26,10 @@
</el-form-item>
<el-form-item
label="手机号:"
prop="phone"
prop="staffPhone"
>
<el-input
v-model="formData.phone"
v-model="formData.staffPhone"
class="input-width"
placeholder="请输入手机号"
maxlength="11"
......@@ -41,7 +41,7 @@
<script>
import {
getStrategyStaffList,
addStrategyStaff,
} from "@api/earlyWarningManager"
import { Validator } from "@/common/validator"
......@@ -53,6 +53,7 @@ export default {
default: false
},
},
inject: ['GET_PARAMS_INFO'],
computed: {
dialogShow: {
get () {
......@@ -62,6 +63,9 @@ export default {
this.close()
}
},
paramsInfo () {
return this.GET_PARAMS_INFO()
},
},
mounted () {
......@@ -69,12 +73,12 @@ export default {
data () {
return {
formData: {
name: '',
phone: ''
staffName: '',
staffPhone: ''
},
formRules: {
name: [{ required: true, message: '请输入人员姓名', trigger: 'blur' }],
phone: [
staffName: [{ required: true, message: '请输入人员姓名', trigger: 'blur' }],
staffPhone: [
{ required: true, message: "请输入手机号码", trigger: "blur" },
{
required: true,
......@@ -104,7 +108,19 @@ export default {
submit () {
this.$refs.form.validate(async (valid) => {
if (valid) {
this.close()
const { merchantIds } = this.paramsInfo,
{ staffPhone, staffName } = this.formData,
data = await addStrategyStaff({
staffLabel: 0,
staffName,
staffPhone,
merchantId: merchantIds[0],
})
if (data) {
this.$emit('refresh')
this.$message.success('操作成功')
this.close()
} else this.$message.error('操作失败')
}
})
}
......
......@@ -33,11 +33,11 @@ export default {
this.close()
}
},
merchantInfo () {
return this.GET_MERCHANT_INFO()
paramsInfo () {
return this.GET_PARAMS_INFO()
}
},
inject: ['GET_MERCHANT_INFO'],
inject: ['GET_PARAMS_INFO'],
watch: {
visible: {
handler (val) {
......@@ -71,10 +71,10 @@ export default {
this.$emit('dialogClose')
},
async getStrategyMerchantAnalysisEmployeeHistory () {
let { merchantId } = this.merchantInfo,
let { merchantIds } = this.paramsInfo,
data = await getStrategyMerchantAnalysisEmployeeHistory({
bizs: 1,
merchantId
merchantId: merchantIds[0]
})
console.log(data)
......
......@@ -67,7 +67,14 @@
:key="index"
>
<div class="label">{{ item.label }}:</div>
<div class="value">{{ item.value }}</div>
<div class="value">
<template v-if="staffDurationInfo[item.key] == null">
-
</template>
<template v-else>
{{ staffDurationInfo[item.key] }} {{ item.unit }}
</template>
</div>
</div>
</template>
</div>
......@@ -78,7 +85,7 @@
:src="`${IMG_URL}staff.webp`"
class="bg"
>
<div class="top-view flex">
<div class="top-view">
<template v-for="(i,index) in topView">
<div
class="top-view-item"
......@@ -131,7 +138,7 @@
</div>
<div class="staff-overview-item right">
<div class="content">
<over-view-list></over-view-list>
<over-view-list :viewData="viewData"></over-view-list>
</div>
<template v-for="(item,index) in rightWarningInfoList">
<EarlyWarningTips
......@@ -148,6 +155,7 @@
<add-staff
:visible.sync="addStaffVisible"
@dialogClose="addStaffVisible = false"
@refresh="getStrategyStaffListAnalysis"
></add-staff>
</div>
</template>
......@@ -159,7 +167,9 @@ import ScrollXView from '../ScrollXView.vue';
import AddStaff from './AddStaff.vue';
import OverViewList from '../OverViewList.vue';
import {
getStrategyStaffListAnalysis
getStrategyStaffListAnalysis,
getStrategyStaffSummaryDuration,
getStrategyMerchantAnalysisGoodsSummaryWithWarn
} from '@/api/earlyWarningManager';
export default {
name: 'StaffOverview',
......@@ -170,7 +180,7 @@ export default {
ScrollXView,
AddStaff
},
inject: ['IMG_URL', 'GET_MERCHANT_INFO'],
inject: ['IMG_URL', 'GET_PARAMS_INFO', 'GET_HARMONY'],
data () {
return {
topView: [
......@@ -196,18 +206,22 @@ export default {
rightWarningInfoList: new Array(3),
historyVisible: false,
addStaffVisible: false,
staffDurationInfo: {},
formList: [
{
label: '驻店时长',
value: '直营'
key: 'stayDuration',
unit: '天'
},
{
label: '总学习时长',
value: '直营'
key: 'studyDuration',
unit: 'h'
},
{
label: '学习率',
value: '直营'
key: 'studyRate',
unit: '%'
},
],
summaryList: [
......@@ -260,18 +274,24 @@ export default {
},
]
},
]
],
viewData:{}
}
},
computed: {
merchantInfo () {
return this.GET_MERCHANT_INFO()
paramsInfo () {
return this.GET_PARAMS_INFO()
},
isHarmony () {
return this.GET_HARMONY()
}
},
mounted () {
this.getStrategyStaffListAnalysis()
},
methods: {
init () {
this.getStrategyStaffListAnalysis()
},
disabledStaff (item) {
this.$confirm("对员工进行禁用操作后,对应的账户无法再使用;历史已产生的业务数据不受影响。", "提示", {
confirmButtonText: "确定",
......@@ -283,32 +303,40 @@ export default {
}).catch(() => {
})
},
getParams () {
let { merchantId } = this.merchantInfo,
params = {
merchantIds: [merchantId],
bizs: 1, //业务类型(1.延保 2.轻改 3.权益)
sceneType: 0,//业务场景(0.会员权益,1.精品升级)
cycleType: 4,
startTime: '2025-01-01',
endTime: '2025-12-31'
}
return params
},
async getStrategyStaffListAnalysis () {
let params = this.getParams(),
let params = this.paramsInfo,
data = await getStrategyStaffListAnalysis(params)
this.staffTimelineIList = data
if (data && data.length) this.getStrategyStaffSummaryDuration(data[0])
if (data && data.length) {
this.getStrategyStaffSummaryDuration(data[0])
this.getStrategyMerchantAnalysisGoodsSummaryWithWarn(data[0])
}
console.log(data, 'StaffOverview/index.vue(查询驻店员工列表)')
},
async getStrategyStaffSummaryDuration (item) {
let params = this.getParams(),
data = await getStrategyStaffSummaryDuration({
async getStrategyMerchantAnalysisGoodsSummaryWithWarn (item) {
if (!this.isHarmony) { //是否鸿蒙 是才查商品
const summaryGoodsData = await getStrategyMerchantAnalysisGoodsSummaryWithWarn({
...params,
staffUuids: item.staffId,
staffUuids: [item.staffId]
})
console.log(data, 'StaffOverview/index.vue(查询驻店员工驻店时长)')
this.viewData = summaryGoodsData || {}
console.log(summaryGoodsData, 'SummaryOverview/index.vue(查询门店商品销售情况)')
}
},
async getStrategyStaffSummaryDuration (item) {
try {
let params = this.paramsInfo,
data = await getStrategyStaffSummaryDuration({
...params,
staffUuids: [item.staffId],
staffPhone: item.staffPhone
})
this.staffDurationInfo = data
console.log(data, 'StaffOverview/index.vue(查询驻店员工驻店时长)')
} catch (error) {
console.log(error)
}
}
}
}
......@@ -334,6 +362,7 @@ export default {
}
}
.staff-box {
min-height: 64px;
.timeline-content {
width: calc(100% - 108px);
}
......@@ -460,32 +489,34 @@ export default {
height: 100%;
}
.top-view {
height: 83px;
height: 82px;
border-radius: 8px;
background: #ffffffcc;
position: relative;
z-index: 2;
gap: 2px;
box-sizing: border-box;
padding: 14px;
padding: 12px 14px;
display: flex;
align-items: stretch;
&-item {
.label {
color: #666666;
font-size: 13px;
line-height: 16px;
font-size: 14px;
line-height: 17px;
}
.value {
color: #2a58ad;
font-size: 18px;
font-size: 20px;
font-weight: 600;
margin-top: 4px;
line-height: 18px;
margin-top: 2px;
line-height: 20px;
}
.sub-value {
color: #999999;
font-size: 11px;
margin-top: 4px;
line-height: 13px;
font-size: 14px;
margin-top: 2px;
line-height: 17px;
}
}
}
......@@ -524,21 +555,21 @@ export default {
justify-content: center;
.label {
color: #666666;
font-size: 12px;
font-size: 13px;
.num {
display: none;
}
}
.value {
color: #2a58ad;
font-size: 15px;
font-size: 20px;
font-weight: 500;
margin-top: 4px;
margin-top: 2px;
}
.sub-value {
color: #999999;
font-size: 11px;
margin-top: 4px;
font-size: 13px;
margin-top: 2px;
}
}
}
......@@ -546,10 +577,9 @@ export default {
height: 54px;
margin-bottom: 6px;
.summary-item {
width: 95px;
min-width: 95px;
.label {
font-size: 10px;
.num {
display: block;
color: #2a58ad;
......@@ -561,9 +591,6 @@ export default {
.value {
display: none;
}
.sub-value {
font-size: 10px;
}
}
}
}
......
......@@ -15,14 +15,15 @@
required
>
<el-select
v-model="merchantId"
v-model="currentMerchantId"
class="select"
filterable
>
<el-option
v-for="item in merchantList"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.merchantId"
:label="item.merchantName"
:value="item.merchantId"
></el-option>
</el-select>
</el-form-item>
......@@ -31,6 +32,7 @@
</template>
<script>
import { listShop4sByRef } from "@api/merchant"
export default {
name: "ChangeMerchantDialog",
props: {
......@@ -38,6 +40,7 @@ export default {
type: Boolean,
default: false
},
merchantId: [String, Number]
},
computed: {
dialogShow: {
......@@ -45,7 +48,7 @@ export default {
return this.visible
},
set (val) {
this.$emit('dialogClose')
this.close()
}
},
},
......@@ -53,7 +56,10 @@ export default {
visible: {
handler (val) {
if (val) {
this.currentMerchantId = this.merchantId
this.getMerchantList()
}
},
immediate: true,
deep: true
......@@ -70,18 +76,21 @@ export default {
width: "640px"
}
},
merchantId: '1',
merchantList: [
{ label: '门店1', value: '1' },
{
label: '门店2', value: '2'
}
]
merchantList: [],
currentMerchantId:''
}
},
methods: {
close () {
this.$emit('dialogClose')
},
async getMerchantList () {
const data = await listShop4sByRef({})
this.merchantList = data
},
async submit () {
this.$emit('changeMerchant')
if(this.currentMerchantId != this.merchantId) this.$emit('changeMerchant', this.currentMerchantId)
this.close()
}
}
}
......
......@@ -7,8 +7,8 @@
:time-range-options="timeRangeOptions"
:date-range.sync="dateRange"
:date-format="dateFormat"
@time-range-change="handleTimeRangeChange"
@date-range-change="handleDateRangeChange"
ref="calendarCustom"
/>
</div>
<div class="merchant-info flex">
......@@ -19,7 +19,7 @@
>
</div>
<div class="info ">
<div class="name text-hide">{{merchantInfo.merchantName}}</div>
<div class="name text-hide">{{merchantDetailInfo.merchantName}}</div>
<div class="control flex">
<div class="scene flex">
<img
......@@ -55,13 +55,13 @@
slot="content"
class="tooltip-content-max"
>
<div>{{ item.value}}</div>
<div>{{ merchantDetailInfo[item.key]}}</div>
</div>
<span class="text-hide value">{{ item.value}}</span>
<span class="text-hide value">{{ merchantDetailInfo[item.key] || '-'}}</span>
</el-tooltip>
</template>
<template v-else>
<div class="value text-hide">{{ item.value }}</div>
<div class="value text-hide">{{ merchantDetailInfo[item.key] || '-' }}</div>
</template>
</div>
</template>
......@@ -70,6 +70,7 @@
:visible="merchantVisible"
@dialogClose="merchantVisible = false"
@changeMerchant="changeMerchant"
:merchantId="merchantDetailInfo.merchantNo"
></change-merchant-dialog>
</div>
</template>
......@@ -77,19 +78,19 @@
<script type='text/ecmascript-6'>
import ChangeMerchantDialog from './ChangeMerchantDialog.vue';
import CalendarCustom from '../../../compoments/clendarCustom.vue';
import {
getStrategyMerchantDetail
} from '@/api/earlyWarningManager'
export default {
name: 'StoreSignboardInfo',
components: {
ChangeMerchantDialog,
CalendarCustom
},
inject: ['IMG_URL'],
inject: ['IMG_URL', 'GET_PARAMS_INFO'],
data () {
return {
merchantVisible: false,
merchantInfo: {
merchantName: '山东世纪奔腾汽车销售服务有限公司'
},
timeRangeType: { label: '周', value: 2 }, // 当前选中的时间范围类型
timeRangeOptions: [
{ label: '周', value: 2 },
......@@ -104,67 +105,84 @@ export default {
formList: [
{
label: '主营品牌',
value: '鸿蒙智行/阿维塔',
key: 'carBrandText',
tooltip: true
},
{
label: '线上运营',
value: '谢万新/叶雪',
key: 'onlineOperatorText',
tooltip: true
},
{
label: '区域运营',
value: '叶雪',
key: 'areaOperatorText',
tooltip: true
},
{
label: '运营模式',
value: '直营'
key: 'directSalesFlagText'
},
{
label: '所属服务商',
value: '海南慧保咨询服务有限责任公司郑州市分嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟公司',
key: 'mainServiceMerchantName',
className: 'fit-width'
}
]
],
merchantDetailInfo: {},
}
},
computed: {
paramsInfo () {
return this.GET_PARAMS_INFO()
}
},
mounted () {
},
methods: {
changeMerchant (e) {
},
// 处理时间范围类型变化
handleTimeRangeChange (type, dateRange) {
// type 是字符串(label),需要转换为对象格式
if (typeof type === 'string') {
const option = this.timeRangeOptions.find(opt => opt.label === type);
if (option) {
this.timeRangeType = { label: option.label, value: option.value };
} else {
console.warn('未找到匹配的时间范围类型:', type);
}
} else if (typeof type === 'object' && type !== null) {
// 如果已经是对象,直接使用
this.timeRangeType = type;
}
if (dateRange) {
this.dateRange = {
startTime: dateRange.startDate,
endTime: dateRange.endDate
}
}
console.log('切换时间范围类型:', this.timeRangeType, this.dateRange);
init () {
this.getStrategyMerchantDetail()
},
// 处理日期范围变化
handleDateRangeChange (dateRange) {
this.dateRange = {
startTime: dateRange.startDate,
endTime: dateRange.endDate
};
console.log('日期范围变化:', this.dateRange);
this.$nextTick(() => {
let { value } = this.$refs.calendarCustom.value
this.$emit('dateChange', {
startTime: dateRange.startDate,
endTime: dateRange.endDate,
cycleType: value
})
})
},
async getStrategyMerchantDetail (merchantNo = '') {
let { merchantIds } = this.paramsInfo,
data = await getStrategyMerchantDetail({
businessType: 1,
merchantNo: merchantNo || merchantIds[0]
})
data.directSalesFlagText = {
0: '非直营',
1: '直营'
}[data.directSalesFlag] || '-'
if (data.carBrandResponses && data.carBrandResponses.length) {
let carBrandText = []
data.carBrandResponses.map(e => {
if (e.children && e.children.length) e.children.map(i => {
carBrandText.push(`${e.label}-${i.label}`)
})
else carBrandText.push(e.label)
})
data.carBrandText = carBrandText.join('/')
}
if (data.onlineOperator && data.onlineOperator.length) data.onlineOperatorText = data.onlineOperator.map(e => e.username).join('/')
if (data.areaOperator && data.areaOperator.length) data.areaOperatorText = data.areaOperator.map(e => e.username).join('/')
this.merchantDetailInfo = data
},
changeMerchant (e) {
this.$emit('changeMerchant', e)
// this.getStrategyMerchantDetail(e)
}
}
}
</script>
......@@ -258,4 +276,9 @@ export default {
}
}
}
::v-deep .el-tooltip__popper {
max-height: 50vh;
overflow-y: auto;
}
</style>
\ No newline at end of file
......@@ -56,7 +56,9 @@
</template>
</div>
<div class="block">
<div class="block-title">业绩情况</div>
<div class="block-title">
业绩情况
</div>
<div class="business-box">
<img
src="@/assets/strategy/detail-bg.webp"
......@@ -89,7 +91,9 @@
</div>
</div>
<div class="block">
<div class="block-title">录音情况</div>
<div class="block-title">
录音情况
</div>
<div class="recording-box">
<div class="left">
<div class="recording-title">
......
import dayjs from "dayjs"
const STRATEGYTYPEOPTIONS = {
0: '学习',
1: '优秀案例分享',
......@@ -7,67 +8,59 @@ const STRATEGYTYPEOPTIONS = {
5: '强力促销',
6: '最终盘点与低客单产品购入',
}
const DATE_RANGE = {
label: '执行周期',
format: (val) => {
let { startDate, endDate } = val
return `${dayjs(startDate).format('YYYY-MM-DD')}至 ${dayjs(endDate).format('YYYY-MM-DD')}`
}
}
const TITLE = {
label: '标题',
key: 'title',
}
const CREATED = {
label: '操作人',
key: 'createdBy',
}
const CREATED_DATE = {
label: '操作时间',
key: 'createdDate',
}
const STRATEGY_FORM_01 = [
{
label: '标题',
key: 'title',
},
{
label: '执行周期',
key: 'dateRange',
},
{
label: '操作人',
key: 'dateRange',
},
{
label: '操作时间',
key: 'dateRange',
},
TITLE,
DATE_RANGE,
CREATED,
CREATED_DATE
]
const STRATEGY_FORM_2456 = [
{
label: '操作人',
key: 'dateRange',
},
{
label: '执行周期',
key: 'dateRange',
},
CREATED,
DATE_RANGE,
{
label: '执行人',
key: 'dateRange',
format: (val) => {
let { executePersons } = val
return executePersons.map(item => item.username).join('、')
},
hide: (val) => {
let { strategyType } = val
return [5, 6].includes(strategyType)
}
},
{
label: '操作时间',
key: 'dateRange',
},
CREATED_DATE
]
const STRATEGY_FORM_3 = [
{
label: '操作人',
key: 'dateRange',
},
{
label: '标题',
key: 'title',
},
{
label: '操作时间',
key: 'dateRange',
},
CREATED,
TITLE,
CREATED_DATE,
{
label: '副标题',
key: 'title',
key: 'subTitle',
class: 'bespread',
},
{
label: '执行时间',
key: 'dateRange',
key: 'startDate',
},
]
......
......@@ -24,7 +24,7 @@
v-if="!item.hide || !item.hide(detailInfo)"
>
<div class="label">{{ item.label }}:</div>
<div class="vlaue">
<div class="value">
<template v-if="item.format">{{ item.format(detailInfo) }}</template>
<template v-else>{{ detailInfo[item.key] || '-' }}</template>
</div>
......@@ -41,13 +41,13 @@
<div class="order-info">
<template v-for="(item,index) in orderFormList">
<div
class="info-item"
class="info-item flex"
:key="index"
>
<div class="label">{{ item.label }}:</div>
<div class="vlaue">
<div class="value">
<template v-if="item.format">{{ item.format(detailInfo) }}</template>
<template v-else>{{ detailInfo[item.key] || '-' }}</template>
<template v-else>{{ detailInfo[item.key] != null ? detailInfo[item.key] : '-' }}</template>
</div>
</div>
</template>
......@@ -67,11 +67,19 @@
</div>
<d2-table
ref="secondBeforeTable"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:tableData="detailInfo.taskStrategyIssueList"
:hasPage="false"
>
<template #statusHtml="scope">
<div class="online-status">
<span :class="['dot',{un:scope.scope.readStatus == 0}]"></span>
{{ {
0: '未查看',
1: '已查看'
}[scope.scope.readStatus] }}
</div>
</template>
</d2-table>
</div>
</template>
......@@ -101,11 +109,9 @@ import StudyView from './StudyView.vue';
import dayjs from 'dayjs';
import {
batchCreateStrategy
queryStrategyStudyDetailById,
queryStrategyTaskDetailById
} from '@/api/earlyWarningManager'
import {
getReclistWithPageV2,
} from "@api/resident"
export default {
name: 'StrategyDetail',
components: {
......@@ -116,9 +122,9 @@ export default {
type: Boolean,
default: false
},
strategyId: {
type: String,
default: ''
item: {
type: Object,
default: () => ({})
}
},
data () {
......@@ -126,38 +132,42 @@ export default {
size: 'small',
viewKey: Date.now(),
detailInfo: {
strategyType: 3,
content: '尤其是刚上线的产品,很难通过产品的内部体系来实现快速的用户增长,所以会更加依赖于分享来达到广泛的传播,获取目标用户。所以监听用户的截图操作,提示用户进行分享,既缩短了以前分享截图的操作路径,避免了在之前长路径中的行为流失(比如截图完成后忘记分享或觉得麻烦放弃分享等等),也让用户觉得更加贴心。下面我们会从不同维度来分析一下APP的社交...'
},
getListApi: getReclistWithPageV2,
searchFormSearch: {},
tableParams: {
listName: "list",
tableColumns: [
{
label: "员工姓名",
prop: "licensePlate",
prop: "staffName",
minWidth: 180
},
{
label: "员工手机号",
prop: "vin",
prop: "phone",
minWidth: 160
},
{
label: "员工类型",
prop: "vin",
minWidth: 160
minWidth: 160,
formatter: item => {
//0:驻店人员,6:飞行督导,9:2.1区域运营
return {
0: "驻店人员",
6: "飞行督导",
9: "区域运营"
}[item.userPosition]
}
},
{
label: "状态",
prop: "vin",
minWidth: 160
minWidth: 160,
addHtml: 'statusHtml'
},
{
label: "查看时间",
prop: "vin",
minWidth: 160
minWidth: 160,
formatter: item => {
return item.readTime ? dayjs(item.readTime).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
]
},
......@@ -178,7 +188,7 @@ export default {
? STRATEGY_FORM_2456 :
[0, 1].includes(strategyType)
? STRATEGY_FORM_01
: STRATEGY_FORM_3
: STRATEGY_FORM_3 || []
return [
{
label: '执行策略',
......@@ -190,7 +200,7 @@ export default {
{
label: '策略说明',
class: 'bespread',
key: ''
key: 'description'
}
]
},
......@@ -199,22 +209,27 @@ export default {
list = [
{
label: '订单总数',
key: ''
key: 'orderTotalCount'
},
{
label: '订单总额',
key: ''
key: 'orderTotalAmount',
format: item => {
return item.orderTotalAmount == null ? '-' : `${item.orderTotalAmount}元`
}
}
]
if (strategyType == 5) list.push({
label: '优惠总金额',
key: ''
format: item => {
return item.discountTotalAmount == null ? '-' : `${item.discountTotalAmount}元`
}
})
return list
},
},
watch: {
dialogVisible: {
dialogShow: {
handler (val) {
if (val) this.init()
},
......@@ -226,8 +241,25 @@ export default {
},
methods: {
init () {
const { strategyType, id } = this.item,
targetName = [0, 1].includes(strategyType) ? 'queryStrategyStudyDetailById' : 'queryStrategyTaskDetailById'
this[targetName](id)
this.viewKey = Date.now()
},
async queryStrategyStudyDetailById (id) {
const data = await queryStrategyStudyDetailById({
id
})
this.detailInfo = data
console.log(data, 'data')
},
async queryStrategyTaskDetailById (strategyId) {
const data = await queryStrategyTaskDetailById({
strategyId
})
this.detailInfo = data
console.log(data, 'data')
},
close () {
this.$emit('update:dialogVisible', false)
},
......@@ -288,6 +320,7 @@ export default {
.value {
color: #333333;
width: calc(100% - 150px);
line-height: 19px;
}
}
......@@ -322,6 +355,9 @@ export default {
color: #333333;
font-size: 14px;
line-height: 20px;
p {
margin: 0 !important;
}
}
}
&-title {
......@@ -333,6 +369,23 @@ export default {
margin: 16px 0;
}
}
.online-status {
display: flex;
justify-content: center;
align-items: center;
.dot {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
background: #2cca74;
}
.un {
background: #eb4e4e;
}
}
}
.footer {
padding: 14px 0;
......
......@@ -202,7 +202,7 @@ export default {
font-size: 16px;
font-weight: 500;
line-height: 22px;
width: 169px;
max-width: calc(100% - 106px);
}
}
&-date {
......@@ -224,6 +224,8 @@ export default {
text-overflow: ellipsis;
word-break: break-all;
line-height: 1.5;
white-space: normal;
width: fit-content;
}
.content {
margin-top: 8px;
......
......@@ -28,7 +28,13 @@ const STRATEGY_01 = [
STAFF_FORMAT('学习人员'),
{
label: '学习内容',
className: 'two-line-ellipsis'
className: 'two-line-ellipsis',
format: (val) => {
let { courseList, recordingList, strategyType } = val
return strategyType == 1 ?
recordingList.map(item => `《${item.receptionStaffName}${item.receptionDate}》`).join('\t') :
courseList.map(item => `《${item.courseName}》`).join('\t')
}
},
DATE_RANGE
]
......
......@@ -18,7 +18,7 @@
:isLast="index == list.length - 1"
:class="[{first:index == 0},{last:index == list.length - 1}]"
@toDetail="toDetail"
@refresh="refresh"
@refresh="getStrategyList"
></strategy-item>
</template>
</el-scrollbar>
......@@ -46,7 +46,7 @@ export default {
StrategyDetail
},
name: 'StrategyList',
inject: ['GET_MERCHANT_INFO'],
inject: ['GET_PARAMS_INFO'],
data () {
return {
list: [],
......@@ -56,23 +56,26 @@ export default {
}
},
computed: {
merchantInfo () {
return this.GET_MERCHANT_INFO()
paramsInfo () {
return this.GET_PARAMS_INFO()
},
},
mounted () {
this.getStrategyList()
},
methods: {
init(){
this.getStrategyList()
},
toDetail (item) {
this.currentItem = item
this.strategyDetailVisible = true
},
async getStrategyList () {
let { merchantId } = this.merchantInfo,
let { merchantIds } = this.paramsInfo,
data = await getStrategyList({
merchantId,
merchantId: merchantIds[0],
biz: 1,
pageNum: 1,
pageSize: 999999
......
<template>
<div class="layout">
<el-scrollbar class="left">
<store-signboard-info @requireInterface="requireInterface"></store-signboard-info>
<store-signboard-info
@dateChange="dateChange"
@changeMerchant="changeMerchant"
ref="storeSignboardInfo"
></store-signboard-info>
<business-overview ref="businessOverview"></business-overview>
<summary-overview ref="summaryOverview"></summary-overview>
<staff-overview ref="staffOverview"></staff-overview>
</el-scrollbar>
<div class="right">
<strategy-list @openReceptionDialog="openReceptionDialog"></strategy-list>
<strategy-list
@openReceptionDialog="openReceptionDialog"
ref="strategyList"
></strategy-list>
</div>
<quality-detail
......@@ -38,6 +45,9 @@ import StaffOverview from './components/StaffOverview/index.vue';
import { deepClone } from "@/common/util"
import qualityDetail from '@/views/residentManage/components/qualityDetail'
import newQualityDetail from '@/views/residentManage/components/newQualityDetail'
import {
getStrategyBusinessAnalysisStoreSpecialBrand
} from '@/api/earlyWarningManager'
export default {
components: {
StrategyList,
......@@ -53,8 +63,9 @@ export default {
provide () {
return {
IMG_URL: this.IMG_URL,
GET_MERCHANT_INFO: () => this.merchantInfo,
deepClone
deepClone,
GET_PARAMS_INFO: () => this.paramsInfo,
GET_HARMONY: () => this.isHarmony
}
},
data () {
......@@ -63,13 +74,32 @@ export default {
isQualityVisible: false,
qualityDetailList: [],
currentNum: 0,
merchantInfo: {
merchantName: '明明崇文4s店A',
merchantId: 44211227
paramsInfo: {
bizs: 1,
sceneType: 0,
merchantIds: []
},
isHarmony: false,
IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/storeSignboard/'
}
},
computed: {
storeSignboardInfoRef () {
return this.$refs.storeSignboardInfo
},
summaryOverviewRef () {
return this.$refs.summaryOverview
},
staffOverviewRef () {
return this.$refs.staffOverview
},
businessOverviewRef () {
return this.$refs.businessOverview
},
strategyListRef () {
return this.$refs.strategyList
}
},
// 在beforeDestroy钩子中移除事件监听
beforeDestroy () {
window.removeEventListener('popstate', this.preventBack)
......@@ -86,12 +116,19 @@ export default {
if (merchantNo) {
console.log('接收到的 merchantNo:', merchantNo);
// 可以根据 merchantNo 更新 merchantInfo 或进行其他操作
// this.merchantInfo.merchantId = merchantNo;
this.paramsInfo.merchantIds = [44211227 || merchantNo]
this.$nextTick(() => this.init())
}
history.pushState(null, null, document.URL)
window.addEventListener('popstate', this.preventBack)
},
methods: {
init () {
this.storeSignboardInfoRef.init()
this.businessOverviewRef.init()
this.strategyListRef.init()
},
preventBack () {
if (this.isQualityVisible || this.isNewQualityVisible) {
this.closeReceptionDialog()
......@@ -100,8 +137,13 @@ export default {
}
this.$router.go(-1)
},
requireInterface (e) {
console.log('请求接口', '参数:', e)
async requireInterface (flag = false) {
if (flag) {
const data = await getStrategyBusinessAnalysisStoreSpecialBrand(params)
this.isHarmony = data
}
this.summaryOverviewRef.init()
this.staffOverviewRef.init()
},
openReceptionDialog ({ list, row, currentNum }) {
this.currentNum = currentNum
......@@ -121,6 +163,25 @@ export default {
this.isQualityVisible = false
this.isNewQualityVisible = false
},
dateChange (e) {
console.log(this.paramsInfo)
this.paramsInfo = {
...this.paramsInfo,
// ...e
cycleType: 4,
startTime: '2001-01-01',
endTime: '2026-01-01'
}
this.requireInterface()
},
changeMerchant (e) {
this.paramsInfo = {
...this.paramsInfo,
merchantIds: [e]
}
this.requireInterface(true)
this.init()
}
}
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!