Commit d0e2efaf by 李伟康

```

feat(earlyWarningManager): 新增门店展业时间线接口并完善策略中心功能

- 新增 getStrategyMerchantTimeline 接口用于查询门店展业时间线
- 配置策略相关API的请求路由和axios实例映射
- 重构MultipleStaff组件的数据传递方式,移除computed依赖注入
- 完善AddStrategy组件的provide/inject数据传递机制
- 在BusinessOverview组件中集成展业时间线获取功能
- 更新商户信息测试数据
```
1 parent 89091d3f
...@@ -470,4 +470,12 @@ export function getStrategyStaffList (data = {}) { ...@@ -470,4 +470,12 @@ export function getStrategyStaffList (data = {}) {
export function getRecordPageListByCondition (data = {}) { export function getRecordPageListByCondition (data = {}) {
data.method = "dj.api.strategy.monitor.getRecordPageListByCondition" data.method = "dj.api.strategy.monitor.getRecordPageListByCondition"
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
}
/**
* (查询门店展业时间线)
*/
export function getStrategyMerchantTimeline (data = {}) {
data.method = "dj.api.strategy.merchant.timeline"
return request(data, RequestMethods.POST)
} }
\ No newline at end of file \ No newline at end of file
...@@ -30,7 +30,9 @@ const request = ( ...@@ -30,7 +30,9 @@ const request = (
apiName = "dj.smartcarlife" apiName = "dj.smartcarlife"
} else if (params.method.includes("risk.manage.api")) { } else if (params.method.includes("risk.manage.api")) {
apiName = "riskmanage" apiName = "riskmanage"
}else { } else if (params.method.includes("dj.api.strategy")) {
apiName = "strategy"
} else {
// console.log(params.method.split(".api")) // console.log(params.method.split(".api"))
apiName = params.method.split(".api")[0] apiName = params.method.split(".api")[0]
} }
...@@ -52,7 +54,8 @@ const request = ( ...@@ -52,7 +54,8 @@ const request = (
"dj.businessSchool": "axios6", "dj.businessSchool": "axios6",
script: "axios7", script: "axios7",
staff: "axios9", staff: "axios9",
riskmanage:"axios10", riskmanage: "axios10",
strategy: 'axios_strategy'
} }
const baseApiName = mappingName[apiName] const baseApiName = mappingName[apiName]
// console.log(baseApiName, "baseApiName") // console.log(baseApiName, "baseApiName")
...@@ -88,7 +91,7 @@ const request = ( ...@@ -88,7 +91,7 @@ const request = (
clue: "sha1", clue: "sha1",
script: "sha1", script: "sha1",
staff: "sha1", staff: "sha1",
riskmanage:'sha1' riskmanage: 'sha1'
} }
// console.log(signWay[apiName], "baseApiName") // console.log(signWay[apiName], "baseApiName")
const secret = baseConfig[baseApiName].secret const secret = baseConfig[baseApiName].secret
......
...@@ -85,14 +85,8 @@ import multipleMixin from "./multipleMixin"; ...@@ -85,14 +85,8 @@ import multipleMixin from "./multipleMixin";
export default { export default {
name: "MultipleStaff", name: "MultipleStaff",
mixins: [multipleMixin], mixins: [multipleMixin],
inject: ['GET_POSITION_TYPE_LIST'],
mounted () { mounted () {
}, },
computed: {
positionTypeList () {
return this.GET_POSITION_TYPE_LIST()
}
},
data () { data () {
return { return {
dialogConfig: { dialogConfig: {
...@@ -131,9 +125,16 @@ export default { ...@@ -131,9 +125,16 @@ export default {
methods: { methods: {
beforeSearchFn () { beforeSearchFn () {
return new Promise((resolve) => { return new Promise((resolve) => {
let { positionTypeList } = this let { positionTypeList, merchantList, merchantInfo } = this,
merchantIdList = []
if (merchantList.length) merchantIdList = merchantList.map(item => item.id)
else merchantIdList = [merchantInfo.merchantId]
console.log(merchantIdList , merchantList , merchantInfo)
this.searchFormSearch = { this.searchFormSearch = {
positionTypeList positionTypeList,
merchantIdList,
sceneType: 0
} }
resolve() resolve()
}) })
......
...@@ -388,6 +388,8 @@ export default { ...@@ -388,6 +388,8 @@ export default {
provide () { provide () {
return { return {
GET_POSITION_TYPE_LIST: () => this.positionTypeList, GET_POSITION_TYPE_LIST: () => this.positionTypeList,
GET_MERCHANT_LIST: () => this.merchantList,
GET_BIZ: () => this.biz
} }
}, },
mounted () { mounted () {
......
...@@ -9,7 +9,13 @@ export default { ...@@ -9,7 +9,13 @@ export default {
default: () => { } default: () => { }
} }
}, },
inject: ['deepClone'], inject: [
'deepClone',
'GET_POSITION_TYPE_LIST',
'GET_MERCHANT_INFO',
'GET_MERCHANT_LIST',
'GET_BIZ'
],
computed: { computed: {
dialogShow: { dialogShow: {
get () { get () {
...@@ -24,6 +30,18 @@ export default { ...@@ -24,6 +30,18 @@ export default {
}, },
count () { count () {
return this.chooseList.length return this.chooseList.length
},
positionTypeList () {
return this.GET_POSITION_TYPE_LIST()
},
merchantInfo () {
return this.GET_MERCHANT_INFO()
},
merchantList () {
return this.GET_MERCHANT_LIST()
},
biz () {
return this.GET_BIZ()
} }
}, },
watch: { watch: {
......
...@@ -40,12 +40,16 @@ ...@@ -40,12 +40,16 @@
<script> <script>
import ScrollXView from '../ScrollXView.vue'; import ScrollXView from '../ScrollXView.vue';
import StopBusiness from './StopBusiness.vue'; import StopBusiness from './StopBusiness.vue';
import {
getStrategyMerchantTimeline
} from '@/api/earlyWarningManager';
export default { export default {
components: { components: {
ScrollXView, ScrollXView,
StopBusiness StopBusiness
}, },
name: 'BusinessOverview', name: 'BusinessOverview',
inject: ['GET_MERCHANT_INFO'],
data () { data () {
return { return {
stopBusinessVisible: false, stopBusinessVisible: false,
...@@ -75,12 +79,27 @@ export default { ...@@ -75,12 +79,27 @@ export default {
businessOverviewText () { businessOverviewText () {
let { status } = this.businessOverviewDetail let { status } = this.businessOverviewDetail
return status == 0 ? '展业中' : '停止展业' return status == 0 ? '展业中' : '停止展业'
},
merchantInfo () {
return this.GET_MERCHANT_INFO()
} }
}, },
mounted () {
this.getStrategyMerchantTimeline()
},
methods: { methods: {
openStopBusinessDialog () { openStopBusinessDialog () {
this.stopBusinessVisible = true this.stopBusinessVisible = true
},
async getStrategyMerchantTimeline () {
let { merchantId } = this.merchantInfo,
data = await getStrategyMerchantTimeline({
merchantId,
bizs: 1, //业务类型(1.延保 2.轻改 3.权益)
sceneType: 0 //业务场景(0.会员权益,1.精品升级)
})
console.log(data, 'BusinessOverview/index.vue(查询门店展业时间线)')
} }
} }
}; };
......
...@@ -64,8 +64,8 @@ export default { ...@@ -64,8 +64,8 @@ export default {
qualityDetailList: [], qualityDetailList: [],
currentNum: 0, currentNum: 0,
merchantInfo: { merchantInfo: {
merchantName: 'AA', merchantName: '明明崇文4s店A',
merchantId: 123 merchantId: 44211227
}, },
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/'
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!