Commit 67c8ac45 by 李伟康

提交

1 parent 3f88eedd
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
* @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js * @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
import { http_sop } from '@/main' import { http_sop, http } from '@/main'
//查询模板实例客户分页列表 //查询模板实例客户分页列表
const getCustomersList = params => { const getCustomersList = params => {
return http_sop({ return http_sop({
...@@ -58,4 +57,13 @@ const refreshInst = params => { ...@@ -58,4 +57,13 @@ const refreshInst = params => {
sign: false sign: false
}) })
} }
export default { getCustomersList, getCustomersDetail, stageUpdate, exportExcel, refreshInst }
/**获取跟进员工 */
const getFindMerchantStaffList = (params) => {
params.method = 'merchants.api.open.findMerchantStaffList'
return http({
url: 'http://rop-merchant.dev.glsx.com.cn/rop-merchants/router',
data: params
})
}
export default { getCustomersList, getCustomersDetail, stageUpdate, exportExcel, refreshInst, getFindMerchantStaffList }
...@@ -74,6 +74,7 @@ import { combiFormConfig } from './index/config' ...@@ -74,6 +74,7 @@ import { combiFormConfig } from './index/config'
import journeyTable from './index/table.vue' import journeyTable from './index/table.vue'
import dataView from './index/dataView.vue' import dataView from './index/dataView.vue'
import { exportFn } from '@/common/constant' import { exportFn } from '@/common/constant'
import dayjs from 'dayjs'
export default { export default {
mixins: [combiFormConfig], mixins: [combiFormConfig],
components: { components: {
...@@ -90,8 +91,25 @@ export default { ...@@ -90,8 +91,25 @@ export default {
}, },
mounted () { mounted () {
this.getList() this.getList()
this.getFindMerchantStaffList()
}, },
methods: { methods: {
getFindMerchantStaffList () {
const { merchantId } = this.$globalState.session
this.$apis.journey.getFindMerchantStaffList({
merchantNo: merchantId,
staffLabelFlag: true
}).then(res => {
console.log(res)
let optionList = []
res && res.length && res.map(e => optionList.push({
confId: e.staffPhone,
confName: e.staffName
}))
this.searchFormData.find(e => e.name == 'sopFollowUpPersonPhone').optionList = optionList
})
},
getList () { getList () {
this.$apis.journeyConfig.byGroupIdSop({ groupId: 'M153312087', pageNumber: 1 }).then(res => { this.$apis.journeyConfig.byGroupIdSop({ groupId: 'M153312087', pageNumber: 1 }).then(res => {
this.journeyList = res.list || [] this.journeyList = res.list || []
...@@ -124,6 +142,11 @@ export default { ...@@ -124,6 +142,11 @@ export default {
el = viewType == 1 ? $refs.dataView : $refs.table, el = viewType == 1 ? $refs.dataView : $refs.table,
tempParams = this.getSelectInputParams(), tempParams = this.getSelectInputParams(),
searchForm = JSON.parse(JSON.stringify(this.searchForm)) searchForm = JSON.parse(JSON.stringify(this.searchForm))
if (searchForm.time) {
searchForm.sopJourneyEnterTimeBegin = dayjs(searchForm.time[0]).format('YYYY-MM-DD')
searchForm.sopJourneyEnterTimeEnd = dayjs(searchForm.time[1]).format('YYYY-MM-DD')
}
delete searchForm.time
this.tableSearchForm = { this.tableSearchForm = {
...searchForm, ...searchForm,
...tempParams ...tempParams
...@@ -133,7 +156,11 @@ export default { ...@@ -133,7 +156,11 @@ export default {
}) })
}, },
handleReset () { handleReset () {
// this.searchForm = this.$options.data.call(this).searchForm const { journeyList } = this
this.searchForm = {
sopJourneyStage: '',
sopJourneyId: journeyList[0].instId
}
this.searchSelectObj = this.$options.data.call(this).searchSelectObj this.searchSelectObj = this.$options.data.call(this).searchSelectObj
// this.searchFormData = this.$options.data.call(this).searchFormData // this.searchFormData = this.$options.data.call(this).searchFormData
this.FormKey = Date.now() this.FormKey = Date.now()
......
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
}, },
{ {
label: '跟进人', label: '跟进人',
name: 'c', name: 'sopFollowUpPersonPhone',
type: 'select', type: 'select',
labelWidth: 56, labelWidth: 56,
optionList: [], optionList: [],
...@@ -77,7 +77,7 @@ export default { ...@@ -77,7 +77,7 @@ export default {
}, },
{ {
label: '进入旅程时间', label: '进入旅程时间',
name: 'd', name: 'time',
type: 'datePicker', type: 'datePicker',
labelWidth: 72, labelWidth: 72,
isClear: true, isClear: true,
......
...@@ -144,15 +144,15 @@ export default { ...@@ -144,15 +144,15 @@ export default {
const stageList = this.stageList, const stageList = this.stageList,
arr = [] arr = []
for (let k of stageList) { for (let k of stageList) {
// if (k.value) { if (k.value) {
params.sopJourneyStage = k.value params.sopJourneyStage = k.value
const { list } = await this.$apis.journey.getCustomersList(params) const { list } = await this.$apis.journey.getCustomersList(params)
list.length && list.map(e => e.day = dayjs().diff(dayjs(e.sopJourneyStageEnterTime), 'day')) list.length && list.map(e => e.day = dayjs().diff(dayjs(e.sopJourneyStageEnterTime), 'day'))
arr.push({ arr.push({
title: k.label, title: k.label,
list list
}) })
// } }
} }
this.viewList = splitArrayIntoChunks(arr, 4) this.viewList = splitArrayIntoChunks(arr, 4)
this.dataViewLoading = false this.dataViewLoading = false
......
...@@ -261,9 +261,14 @@ export default { ...@@ -261,9 +261,14 @@ export default {
}, },
getCustomersDetail (row) { getCustomersDetail (row) {
this.$apis.journey.getCustomersDetail({ oneId: row.oneId, sopJourneyId: row.sopJourneyId, orgId: row.orgId }).then(res => { this.$apis.journey.getCustomersDetail({ oneId: row.oneId, sopJourneyId: row.sopJourneyId, orgId: row.orgId }).then(res => {
res.carMaintenanceInsurances.map(e => {
e.carBuyDate = e.carBuyDate ? dayjs(e.carBuyDate).format('YYYY-MM-DD') : ''
e.carPreviousMaintenanceDate = e.carPreviousMaintenanceDate ? dayjs(e.carPreviousMaintenanceDate).format('YYYY-MM-DD') : ''
e.carCpyInsEndTime = e.carCpyInsEndTime ? dayjs(e.carCpyInsEndTime).format('YYYY-MM-DD') : ''
})
this.userInfo = res this.userInfo = res
this.stageIndex = this.stageList.findIndex(i => i.label == this.userInfo.sopJourneyStage) this.stageIndex = this.stageList.findIndex(i => i.label == this.userInfo.sopJourneyStage)
console.log(this.stageIndex) console.log(JSON.parse(JSON.stringify(res)))
}) })
}, },
editStage (index) { editStage (index) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!