Commit 67c8ac45 by 李伟康

提交

1 parent 3f88eedd
......@@ -6,8 +6,7 @@
* @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js
* @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 => {
return http_sop({
......@@ -58,4 +57,13 @@ const refreshInst = params => {
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'
import journeyTable from './index/table.vue'
import dataView from './index/dataView.vue'
import { exportFn } from '@/common/constant'
import dayjs from 'dayjs'
export default {
mixins: [combiFormConfig],
components: {
......@@ -90,8 +91,25 @@ export default {
},
mounted () {
this.getList()
this.getFindMerchantStaffList()
},
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 () {
this.$apis.journeyConfig.byGroupIdSop({ groupId: 'M153312087', pageNumber: 1 }).then(res => {
this.journeyList = res.list || []
......@@ -124,6 +142,11 @@ export default {
el = viewType == 1 ? $refs.dataView : $refs.table,
tempParams = this.getSelectInputParams(),
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 = {
...searchForm,
...tempParams
......@@ -133,7 +156,11 @@ export default {
})
},
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.searchFormData = this.$options.data.call(this).searchFormData
this.FormKey = Date.now()
......
......@@ -68,7 +68,7 @@ export default {
},
{
label: '跟进人',
name: 'c',
name: 'sopFollowUpPersonPhone',
type: 'select',
labelWidth: 56,
optionList: [],
......@@ -77,7 +77,7 @@ export default {
},
{
label: '进入旅程时间',
name: 'd',
name: 'time',
type: 'datePicker',
labelWidth: 72,
isClear: true,
......
......@@ -144,15 +144,15 @@ export default {
const stageList = this.stageList,
arr = []
for (let k of stageList) {
// if (k.value) {
params.sopJourneyStage = k.value
const { list } = await this.$apis.journey.getCustomersList(params)
list.length && list.map(e => e.day = dayjs().diff(dayjs(e.sopJourneyStageEnterTime), 'day'))
arr.push({
title: k.label,
list
})
// }
if (k.value) {
params.sopJourneyStage = k.value
const { list } = await this.$apis.journey.getCustomersList(params)
list.length && list.map(e => e.day = dayjs().diff(dayjs(e.sopJourneyStageEnterTime), 'day'))
arr.push({
title: k.label,
list
})
}
}
this.viewList = splitArrayIntoChunks(arr, 4)
this.dataViewLoading = false
......
......@@ -261,9 +261,14 @@ export default {
},
getCustomersDetail (row) {
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.stageIndex = this.stageList.findIndex(i => i.label == this.userInfo.sopJourneyStage)
console.log(this.stageIndex)
console.log(JSON.parse(JSON.stringify(res)))
})
},
editStage (index) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!