Commit 362fa669 by 前端

Merge branch 'master' into 'develop'

Master

See merge request !5
2 parents 2e52e763 8c98b957
const url = '/rop-scrm-wwbench/router'
export default {
/**统计我的待办数据 */
getTaskData (data = {}) {
getTaskData(data = {}) {
data.method = 'scrm.api.wwbench.user.task.list.count'
return window.$HTTP({
url,
......@@ -9,9 +9,9 @@ export default {
})
},
/** 查询我的待办 */
getTasksList (data = {}) {
getTasksList(data = {}) {
data.method = 'scrm.api.wwbench.user.task.list.get'
data.taskTypes = [3, 4, 5, 6, 8]
data.taskTypes = [3, 4, 5, 6, 8, 9]
return window.$HTTP({
url,
data,
......@@ -19,7 +19,7 @@ export default {
})
},
/**更新待办状态 */
updateTasks (data = {}) {
updateTasks(data = {}) {
data.method = 'scrm.api.wwbench.user.task.list.update'
return window.$HTTP({
url,
......
......@@ -2,7 +2,7 @@ import { Notify, Dialog } from 'vant'
import { wwbenchApi, ssoApi, sopApi } from '@/api'
const { subsystemInfo, text } = window.$fetchConfig
export default {
data () {
data() {
return {
statusEnum: {
0: '去处理',
......@@ -17,6 +17,7 @@ export default {
5: '客户资料完善',
6: '营销sop-任务',
8: '线索跟进-任务',
9: '招揽跟进-任务'
},
userInfo: {},
accountList: [],
......@@ -39,7 +40,8 @@ export default {
{ text: '客户群群发', value: 4 },
{ text: '客户资料完善', value: 5 },
{ text: '营销sop', value: 6 },
{ text: '线索跟进', value: 8 }
{ text: '线索跟进', value: 8 },
{ text: '招揽跟进', value: 9 }
],
list: [
{
......@@ -65,11 +67,11 @@ export default {
tasksFlag: false
}
},
mounted () {
mounted() {
this.init()
},
methods: {
init () {
init() {
this.userInfo = this.getLocalStorage('dj_scrm_userInfo')
let accountList = this.getLocalStorage('dj_scrm_accountList')
if (accountList) {
......@@ -83,7 +85,7 @@ export default {
this.getTaskData()
this.initDate()
},
getTaskData () {
getTaskData() {
wwbenchApi.getTaskData().then(data => {
let sum = Number(data.finishTaskCount + data.unFinishTaskCount) || 0
let num = Math.round(Number((Number(data.finishTaskCount) / sum) * 100)) || 0
......@@ -92,7 +94,7 @@ export default {
this.taskCountData = data
})
},
initDate () {
initDate() {
let { dateRangeFormat } = this
let now = new Date()
let minDate = new Date(new Date().setDate(now.getDate() - 30))
......@@ -106,7 +108,7 @@ export default {
endDate
})
},
onConfirmCalendar (e) {
onConfirmCalendar(e) {
let { dateRangeFormat } = this
let [start, end] = e
let startDate = start.format(dateRangeFormat)
......@@ -119,7 +121,7 @@ export default {
endDate
})
},
changeType (e, target) {
changeType(e, target) {
let { dateRange } = this
let [startDate, endDate] = dateRange.split('-')
this[target] = e
......@@ -129,7 +131,7 @@ export default {
endDate
})
},
getTasksList ({ startDate = '', endDate = '' }) {
getTasksList({ startDate = '', endDate = '' }) {
this.showLoading()
let { status, taskType } = this
if (startDate) startDate = `${startDate.replace(/\./g, '-')} 00:00:00`
......@@ -151,7 +153,7 @@ export default {
this.tasksFlag = true
})
},
changeAccount (id) {
changeAccount(id) {
console.log(id)
let { accountList } = this
try {
......@@ -177,10 +179,10 @@ export default {
})
}
},
click (e) {
click(e) {
let { status, id, taskType } = e
if (status == 2 && (taskType != 6 || taskType != 8)) return
if (taskType == 6 || taskType == 8) {
if (taskType == 6 || taskType == 8 || taskType == 9) {
this.jump(e)
} else {
wwbenchApi.updateTasks({ id }).then(res => {
......@@ -197,7 +199,7 @@ export default {
})
}
},
jump (e) {
jump(e) {
let { taskId, taskType } = e
let sessionId = this.getSessionId()
let { corpId } = this.getLocalStorage('dj_scrm_corpId')
......@@ -206,13 +208,18 @@ export default {
2: 'customerGroup/mass',
5: 'customer/information',
6: 'home',
8: 'clew/detail'
8: 'clew/detail',
9: 'solicit'
}[taskType]
let { path } = subsystemInfo[{
5: 'customer',
6: 'sop',
8: 'clew'
}[taskType]]
let { path } =
subsystemInfo[
{
5: 'customer',
6: 'sop',
8: 'clew',
9: 'customer'
}[taskType]
]
if (link) {
if (!['prod', 'production'].includes(process.env.NODE_ENV)) path = '/dj-scrm-wx-work-main-lwk/#/'
let url = `${path}${link}?sessionId=${sessionId}&corpId=${corpId}`
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!