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 = {}) {
export function getRecordPageListByCondition (data = {}) {
data.method = "dj.api.strategy.monitor.getRecordPageListByCondition"
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
......@@ -30,7 +30,9 @@ const request = (
apiName = "dj.smartcarlife"
} else if (params.method.includes("risk.manage.api")) {
apiName = "riskmanage"
}else {
} else if (params.method.includes("dj.api.strategy")) {
apiName = "strategy"
} else {
// console.log(params.method.split(".api"))
apiName = params.method.split(".api")[0]
}
......@@ -52,7 +54,8 @@ const request = (
"dj.businessSchool": "axios6",
script: "axios7",
staff: "axios9",
riskmanage:"axios10",
riskmanage: "axios10",
strategy: 'axios_strategy'
}
const baseApiName = mappingName[apiName]
// console.log(baseApiName, "baseApiName")
......@@ -88,7 +91,7 @@ const request = (
clue: "sha1",
script: "sha1",
staff: "sha1",
riskmanage:'sha1'
riskmanage: 'sha1'
}
// console.log(signWay[apiName], "baseApiName")
const secret = baseConfig[baseApiName].secret
......
......@@ -85,14 +85,8 @@ import multipleMixin from "./multipleMixin";
export default {
name: "MultipleStaff",
mixins: [multipleMixin],
inject: ['GET_POSITION_TYPE_LIST'],
mounted () {
},
computed: {
positionTypeList () {
return this.GET_POSITION_TYPE_LIST()
}
},
data () {
return {
dialogConfig: {
......@@ -131,9 +125,16 @@ export default {
methods: {
beforeSearchFn () {
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 = {
positionTypeList
positionTypeList,
merchantIdList,
sceneType: 0
}
resolve()
})
......
......@@ -388,6 +388,8 @@ export default {
provide () {
return {
GET_POSITION_TYPE_LIST: () => this.positionTypeList,
GET_MERCHANT_LIST: () => this.merchantList,
GET_BIZ: () => this.biz
}
},
mounted () {
......
......@@ -9,7 +9,13 @@ export default {
default: () => { }
}
},
inject: ['deepClone'],
inject: [
'deepClone',
'GET_POSITION_TYPE_LIST',
'GET_MERCHANT_INFO',
'GET_MERCHANT_LIST',
'GET_BIZ'
],
computed: {
dialogShow: {
get () {
......@@ -24,6 +30,18 @@ export default {
},
count () {
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: {
......
......@@ -40,12 +40,16 @@
<script>
import ScrollXView from '../ScrollXView.vue';
import StopBusiness from './StopBusiness.vue';
import {
getStrategyMerchantTimeline
} from '@/api/earlyWarningManager';
export default {
components: {
ScrollXView,
StopBusiness
},
name: 'BusinessOverview',
inject: ['GET_MERCHANT_INFO'],
data () {
return {
stopBusinessVisible: false,
......@@ -75,12 +79,27 @@ export default {
businessOverviewText () {
let { status } = this.businessOverviewDetail
return status == 0 ? '展业中' : '停止展业'
},
merchantInfo () {
return this.GET_MERCHANT_INFO()
}
},
mounted () {
this.getStrategyMerchantTimeline()
},
methods: {
openStopBusinessDialog () {
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 {
qualityDetailList: [],
currentNum: 0,
merchantInfo: {
merchantName: 'AA',
merchantId: 123
merchantName: '明明崇文4s店A',
merchantId: 44211227
},
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!