戴余标 2 years ago
parent 3939ac8238
commit 4db8e9c1fe

@ -4,5 +4,5 @@ const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, { module.exports = merge(prodEnv, {
NODE_ENV: '"development"', NODE_ENV: '"development"',
BASE_API: '"http://localhost/index.php/"', BASE_API: '"/api/"',
}) })

@ -11,7 +11,7 @@ module.exports = {
assetsPublicPath: '/', assetsPublicPath: '/',
proxyTable: { proxyTable: {
'/api': { '/api': {
target: 'http://192.168.50.39:8088', target: 'http://192.168.31.226:8088',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
@ -19,7 +19,7 @@ module.exports = {
} }
}, },
'/file': { '/file': {
target: 'http://192.168.50.39:8088/', target: 'http://192.168.31.226:8088/',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/file': '' '^/file': ''

@ -102,6 +102,12 @@
:selection-list="[detail]" :selection-list="[detail]"
:dialog-visible.sync="allocDialogShow" :dialog-visible.sync="allocDialogShow"
@handle="handleCallBack" /> @handle="handleCallBack" />
<get-handle
:crm-type="crmType"
:pool_id="pool_id"
:selection-list="[detail]"
:dialog-visible.sync="getDialogShow"
@handle="handleCallBack" />
<deal-status-handle <deal-status-handle
:value="detail.dealStatus" :value="detail.dealStatus"
:crm-type="crmType" :crm-type="crmType"
@ -141,6 +147,7 @@ import {
import { crmInvoiceDeleteIdsAPI } from '@/api/crm/invoice' import { crmInvoiceDeleteIdsAPI } from '@/api/crm/invoice'
import TransferHandle from './SelectionHandle/TransferHandle' // import TransferHandle from './SelectionHandle/TransferHandle' //
import AllocHandle from './SelectionHandle/AllocHandle' // import AllocHandle from './SelectionHandle/AllocHandle' //
import GetHandle from './SelectionHandle/GetHandle' //
import DealStatusHandle from './SelectionHandle/DealStatusHandle' // import DealStatusHandle from './SelectionHandle/DealStatusHandle' //
import PutPoolHandle from './SelectionHandle/PutPoolHandle' // import PutPoolHandle from './SelectionHandle/PutPoolHandle' //
@ -149,6 +156,7 @@ export default {
components: { components: {
TransferHandle, TransferHandle,
AllocHandle, AllocHandle,
GetHandle,
DealStatusHandle, DealStatusHandle,
PutPoolHandle PutPoolHandle
}, },
@ -188,6 +196,7 @@ export default {
moreTypes: [], // moreTypes: [], //
transferDialogShow: false, // transferDialogShow: false, //
allocDialogShow: false, // allocDialogShow: false, //
getDialogShow: false, //
dealStatusShow: false, // dealStatusShow: false, //
putPoolShow: false // putPoolShow: false //
} }
@ -230,7 +239,7 @@ export default {
showTransfer() { showTransfer() {
if ( if (
this.crmType === 'customer' || this.crmType === 'customer' ||
this.crmType === 'visit' || this.crmType === 'visit' ||
this.isSeas this.isSeas
) { ) {
return false return false
@ -315,7 +324,6 @@ export default {
type == 'unlock' || type == 'unlock' ||
type == 'start' || type == 'start' ||
type == 'disable' || type == 'disable' ||
type == 'get' ||
type == 'cancel' type == 'cancel'
) { ) {
var message = '' var message = ''
@ -352,6 +360,9 @@ export default {
} else if (type == 'alloc') { } else if (type == 'alloc') {
// //
this.allocDialogShow = true this.allocDialogShow = true
} else if (type == 'get') {
//
this.getDialogShow = true
} else if (type == 'deal_status') { } else if (type == 'deal_status') {
// //
this.dealStatusShow = true this.dealStatusShow = true

@ -88,6 +88,12 @@
:selection-list="selectionList" :selection-list="selectionList"
:dialog-visible.sync="allocDialogShow" :dialog-visible.sync="allocDialogShow"
@handle="handleCallBack" /> @handle="handleCallBack" />
<get-handle
:crm-type="crmType"
:pool_id="pool_id"
:selection-list="selectionList"
:dialog-visible.sync="getDialogShow"
@handle="handleCallBack" />
<deal-status-handle <deal-status-handle
:crm-type="crmType" :crm-type="crmType"
:selection-list="selectionList" :selection-list="selectionList"
@ -169,6 +175,7 @@ import SceneCreate from './SceneForm/SceneCreate'
import TransferHandle from './SelectionHandle/TransferHandle' // import TransferHandle from './SelectionHandle/TransferHandle' //
import TeamsHandle from './SelectionHandle/TeamsHandle' // import TeamsHandle from './SelectionHandle/TeamsHandle' //
import AllocHandle from './SelectionHandle/AllocHandle' // import AllocHandle from './SelectionHandle/AllocHandle' //
import GetHandle from './SelectionHandle/GetHandle' //
import DealStatusHandle from './SelectionHandle/DealStatusHandle' // import DealStatusHandle from './SelectionHandle/DealStatusHandle' //
import PutPoolHandle from './SelectionHandle/PutPoolHandle' // import PutPoolHandle from './SelectionHandle/PutPoolHandle' //
@ -184,6 +191,7 @@ export default {
TransferHandle, TransferHandle,
TeamsHandle, TeamsHandle,
AllocHandle, AllocHandle,
GetHandle,
SceneCreate, SceneCreate,
SceneSet, SceneSet,
DealStatusHandle, DealStatusHandle,
@ -232,6 +240,7 @@ export default {
teamsDialogShow: false, // teamsDialogShow: false, //
teamsType: '', // teamsType: '', //
allocDialogShow: false, // allocDialogShow: false, //
getDialogShow: false, //
dealStatusShow: false, // dealStatusShow: false, //
putPoolShow: false // putPoolShow: false //
@ -400,8 +409,7 @@ export default {
type == 'lock' || type == 'lock' ||
type == 'unlock' || type == 'unlock' ||
type == 'start' || type == 'start' ||
type == 'disable' || type == 'disable'
type == 'get'
) { ) {
var message = '' var message = ''
if (type == 'transform') { if (type == 'transform') {
@ -437,6 +445,9 @@ export default {
// //
this.teamsType = 'delete' this.teamsType = 'delete'
this.teamsDialogShow = true this.teamsDialogShow = true
} else if (type == 'get') {
//
this.getDialogShow = true
} else if (type == 'alloc') { } else if (type == 'alloc') {
// //
this.allocDialogShow = true this.allocDialogShow = true

@ -0,0 +1,176 @@
<template>
<el-dialog
v-loading="loading"
:visible.sync="visible"
:append-to-body="true"
:close-on-click-modal="false"
title="领取"
width="400px"
@close="handleCancel">
<div class="handle-box">
<flexbox
class="handle-item"
align="stretch">
<div
class="handle-item-name"
style="margin-top: 8px;">审批人</div>
<xh-user-cell
:value="usersList"
class="handle-item-content"
@value-change="userChage"/>
</flexbox>
</div>
<span
slot="footer"
class="dialog-footer">
<el-button @click.native="handleCancel">取消</el-button>
<el-button
v-debounce="handleConfirm"
type="primary">保存</el-button>
</span>
</el-dialog>
</template>
<script>
import { XhUserCell } from '@/components/CreateCom'
import { crmCustomerReceiveAPI } from '@/api/crm/customer'
export default {
/** 客户管理 的 勾选后的 公海分配 操作*/
name: 'GetHandle',
components: {
XhUserCell
},
mixins: [],
props: {
dialogVisible: {
type: Boolean,
required: true,
default: false
},
/** 没有值就是全部类型 有值就是当个类型 */
crmType: {
type: String,
default: ''
},
pool_id: [String, Number],
/** 转移数据 */
selectionList: {
type: Array,
default: () => {
return []
}
}
},
data() {
return {
loading: true,
visible: false,
usersList: []
}
},
computed: {},
watch: {
dialogVisible: {
handler(val) {
this.visible = val
if (!val) {
this.usersList = []
}
},
deep: true,
immediate: true
}
},
mounted() {
this.visible = this.dialogVisible
},
methods: {
/**
* 取消选择
*/
handleCancel() {
this.visible = false
this.$emit('update:dialogVisible', false)
},
/** 负责人更改 */
userChage(data) {
this.usersList = data.value
},
handleConfirm() {
//
if (this.usersList.length === 0) {
// this.$message.error('')
this.loading = true
crmCustomerReceiveAPI({
customer_id: this.selectionList.map(item => item.customer_id),
pool_id: this.pool_id
})
.then(res => {
this.$message({
type: 'success',
message: '操作成功'
})
this.loading = false
this.$emit('handle', {
type: 'alloc'
})
this.handleCancel()
})
.catch(() => {
this.loading = false
})
this.handleCancel()
} else {
this.loading = true
crmCustomerReceiveAPI({
customer_id: this.selectionList.map(item => item.customer_id),
pool_id: this.pool_id,
check_user_id: this.usersList[0].id
})
.then(res => {
this.$message({
type: 'success',
message: '操作成功'
})
this.loading = false
this.$emit('handle', {
type: 'alloc'
})
this.handleCancel()
})
.catch(() => {
this.loading = false
})
this.handleCancel()
}
}
}
}
</script>
<style lang="scss" scoped>
.handle-box {
color: #333;
font-size: 12px;
}
.handle-item {
padding-bottom: 15px;
.handle-item-name {
flex-shrink: 0;
width: 90px;
}
.handle-item-content {
flex: 1;
}
}
.handle-bar {
position: relative;
margin-top: 10px;
height: 30px;
button {
float: right;
margin-right: 10px;
}
}
</style>

@ -34,11 +34,12 @@
<div id="sales-funnel" /> <div id="sales-funnel" />
<flexbox justify="center" class="info-box"> <flexbox justify="center" class="info-box">
<flexbox direction="column" class="info-item"> <flexbox direction="column" class="info-item">
<div class="label">赢单单数</div> <!-- <button id="btn-win" class="btn-num" style="color: #6ca2ff;" @click="getView()"></button> -->
<button class="btn-num" style="color: #6ca2ff;" @click="pushView()"></button>
<div class="value">{{ funnelData.winSingle }}</div> <div class="value">{{ funnelData.winSingle }}</div>
</flexbox> </flexbox>
<flexbox direction="column" class="info-item"> <flexbox direction="column" class="info-item">
<div class="label">输单单数</div> <button class="btn-num" @click="pushView()"></button>
<div class="value">{{ funnelData.loseSingle }}</div> <div class="value">{{ funnelData.loseSingle }}</div>
</flexbox> </flexbox>
</flexbox> </flexbox>
@ -129,7 +130,6 @@ export default {
businessOptions: [], businessOptions: [],
businessId: null, businessId: null,
businessName: '', businessName: '',
funnelData: {} funnelData: {}
} }
}, },
@ -138,6 +138,9 @@ export default {
this.getBusinessStatusList() this.getBusinessStatusList()
}, },
methods: { methods: {
pushView() {
this.$router.push('/crm/business')
},
initChart() { initChart() {
this.chartObj = echarts.init(document.getElementById('sales-funnel')) this.chartObj = echarts.init(document.getElementById('sales-funnel'))
this.chartObj.setOption(this.chartOption, true) this.chartObj.setOption(this.chartOption, true)
@ -145,6 +148,10 @@ export default {
this.$emit('chart-click', params, this.dataList[params.dataIndex]) this.$emit('chart-click', params, this.dataList[params.dataIndex])
}) })
}, },
// getView() {
// console.log('aa' + this.dataList)
// this.$emit('chart-click', [], this.dataList[1])
// },
/** /**
* 获取统计数据 * 获取统计数据
*/ */
@ -227,7 +234,11 @@ export default {
height: 322px; height: 322px;
margin-top: 10px; margin-top: 10px;
} }
.btn-num {
color: #ff7474;
background: none;
border: none;
}
.sales-funnel { .sales-funnel {
position: relative; position: relative;
.card-title-left .icon { .card-title-left .icon {

Loading…
Cancel
Save