Commit 3175df41 by 李伟康

```

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

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