Browse Source

完善客户查询--推送财务数据

master
yunuo970428 3 years ago
parent
commit
0486d969b9
  1. 9
      anrui-buscenter/anrui-buscenter-ui/src/api/dictcommons/dictcommons.js
  2. 29
      anrui-buscenter/anrui-buscenter-ui/src/api/jichuxinxi/crmcustomer.js
  3. 89
      anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehuchaxun/kehuchaxun.vue
  4. 266
      anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehuchaxun/vehicleSelect.vue

9
anrui-buscenter/anrui-buscenter-ui/src/api/dictcommons/dictcommons.js

@ -18,3 +18,12 @@ export function fetchBySid(sid) {
method: 'get'
})
}
// 获取下拉框
export function typeValues(data) {
return request({
url: '/portal/v1/dictcommons/typeValues',
method: 'get',
params: data
})
}

29
anrui-buscenter/anrui-buscenter-ui/src/api/jichuxinxi/crmcustomer.js

@ -69,7 +69,7 @@ export function deleteBySids(data) {
})
}
// 推送财务数据
// 推送财务数据--是否确定车架号选择否
export function sendFinCustomer(data) {
return request({
url: '/crm/v1/crmcustomertemp/sendFinCustomer',
@ -81,6 +81,33 @@ export function sendFinCustomer(data) {
})
}
// 推送财务数据--是否确定车架号选择是
export function sendFinCustomerTrue(data) {
return request({
url: '/crm/v1/crmcustomertemp/sendFinCustomerTrue',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 推送财务数据--是否确定车架号选择是,选择车辆
export function vehicleCrmList(data) {
return request({
url: '/base/v1/basevehicle/vehicleCrmList',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// Pc端分页查询中介单位(经销商)
export function getPcDistributorList(data) {
return request({

89
anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehuchaxun/kehuchaxun.vue

@ -107,9 +107,38 @@
</div>
</div>
</div>
<kehudanganInfo v-show="viewState ==4" ref="Info" @handleReturn="resetState"/>
<yixiangchexinglook v-show="viewState ==3" ref="divYiXiang" @handleReturn="resetState"/>
<genjinlook v-show="viewState ==2" ref="divGenJin" @handleReturn="resetState"/>
<kehudanganInfo v-show="viewState == 4" ref="Info" @handleReturn="resetState"/>
<yixiangchexinglook v-show="viewState == 3" ref="divYiXiang" @handleReturn="resetState"/>
<genjinlook v-show="viewState == 2" ref="divGenJin" @handleReturn="resetState"/>
<vehicleSelect v-show="viewState == 5" ref="divVehicle" @doback="resetState"/>
<el-dialog :visible.sync="dialogVisible" width="40%" :close-on-click-modal="false" :show-close="false">
<el-form class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="8" class="tleftb">
<span>是否确定车架号</span>
</el-col>
<el-col :span="16">
<el-form-item>
<el-radio-group v-model="isTerminal">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item>
<span>若能确定车架号,则选择是,进入选择车架号页面选定车架号若暂时确定不了,则选择否则直接推送客户名称+手机号码的客户信息到财务系统,款项操作再次客户名下进行</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="handleConfirm">确定</el-button>
<el-button size="small" @click="handleColse">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
@ -122,6 +151,7 @@ import ButtonBar from '@/components/ButtonBar'
import kehudanganInfo from '../../kehuguanli/kehudangan/kehudanganinfo.vue'
import yixiangchexinglook from './yixiangchexinglook'
import genjinlook from './genjinlook'
import vehicleSelect from './vehicleSelect'
export default {
name: 'kehuchaxun',
@ -131,11 +161,14 @@ export default {
ButtonBar,
kehudanganInfo,
yixiangchexinglook,
genjinlook
genjinlook,
vehicleSelect
},
data() {
return {
btndisabled: false,
isTerminal: '',
dialogVisible: false,
btnList: [
{
type: 'primary',
@ -159,6 +192,7 @@ export default {
tableKey: 0,
list: [],
sids: [],
multipleSelection: [],
merType: [],
induslevel: [],
FormLoading: false,
@ -276,10 +310,47 @@ export default {
//
handleSelectionChange(row) {
const aa = []
const bb = []
row.forEach((element) => {
aa.push(element.sid)
bb.push({
sid: element.sid,
name: element.name,
mobile: element.mobile
})
})
this.sids = aa
this.multipleSelection = bb
},
handleConfirm() {
if (this.isTerminal === '') {
this.$message({ showClose: true, type: 'error', message: '是否确定车架号请选择是或否' })
return
}
if (this.isTerminal === '1') {
this.viewState = 5
this.handleColse()
this.$refs['divVehicle'].showData(this.multipleSelection[0].name, this.multipleSelection[0].sid)
}
if (this.isTerminal === '0') {
const tip = '已经创建:(' + this.multipleSelection[0].name + ':' + this.multipleSelection[0].mobile + ')的金蝶客户,请到金蝶系统中进行处理。'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '关闭',
type: 'warning'
}).then(() => {
sendFinCustomer(this.sids).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '推送成功' })
this.handleColse()
}
})
})
}
},
handleColse() {
this.dialogVisible = false
this.isTerminal = ''
},
//
handleCheck(row) {
@ -308,15 +379,11 @@ export default {
})
},
toPush() {
if (this.sids.length === 0) {
if (this.sids.length === 0 || this.sids.length > 1) {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行推送财务数据的操作' })
} else {
sendFinCustomer(this.sids).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '推送成功' })
}
})
return
}
this.dialogVisible = true
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)

266
anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehuchaxun/vehicleSelect.vue

@ -0,0 +1,266 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>选择车辆页面</div>
<div>
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="库存状态:" class="searchlist">
<el-select v-model="listQuery.params.vehicleState" placeholder="请选择" filterable clearable>
<el-option v-for="item in vehicleState_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="车型:" class="searchlist">
<el-input v-model="listQuery.params.vehicleAlias" placeholder="" clearable style="width: 150px"/>
</el-form-item>
<el-form-item label="配置:" class="searchlist">
<el-input v-model="listQuery.params.configName" placeholder="" clearable style="width: 150px"/>
</el-form-item>
<el-form-item label="车架号:" class="searchlist">
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable style="width: 150px"/>
</el-form-item>
<el-form-item label="颜色:" class="searchlist">
<el-select v-model="listQuery.params.carColorKey" placeholder="请选择" filterable clearable>
<el-option v-for="item in bodyColor_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="存放地点:" class="searchlist">
<el-input v-model="listQuery.params.location" placeholder="" clearable style="width: 150px"/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">车辆列表</div>
</div>
<div class="">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column width="50" type="selection" align="center"/>
<el-table-column width="80" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="库存状态" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vehicleStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="品牌" align="center">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="车型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vehicleAlias }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="颜色" align="center">
<template slot-scope="scope">
<span>{{ scope.row.carColor }}</span>
</template>
</el-table-column>
<el-table-column label="存放地点" align="center">
<template slot-scope="scope">
<span>{{ scope.row.location }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import { sendFinCustomerTrue, vehicleCrmList } from '@/api/jichuxinxi/crmcustomer'
import { typeValues, getPathSidByUserSid } from '@/api/dictcommons/dictcommons'
export default {
name: 'vehicleSelect',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
vehicleState_list: [],
bodyColor_list: [],
userName: '',
userSid: '',
listQuery: {
current: 1,
size: 5,
params: {
vehicleState: '',
vehicleAlias: '',
configName: '',
vinNo: '',
carColorKey: '',
location: '',
createOrgSid: '',
orgSidPath: ''
},
total: 0
}
}
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
init() {
this.shujuzidian()
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => {
if (resp.success) {
this.listQuery.params.createOrgSid = resp.data
this.getList()
}
})
},
shujuzidian() {
typeValues({ type: 'vehicleState' }).then((res) => {
if (res.success) {
this.vehicleState_list = res.data
}
})
typeValues({ type: 'bodyColor' }).then((res) => {
if (res.success) {
this.bodyColor_list = res.data
}
})
},
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
handleReturn() {
this.$emit('doback')
},
//
getList() {
this.listLoading = true
this.listQuery.params.orgSidPath = window.sessionStorage.getItem('orgSidPath')
vehicleCrmList(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery = {
current: 1,
size: 5,
params: {
vehicleState: '',
vehicleAlias: '',
configName: '',
vinNo: '',
carColorKey: '',
location: '',
createOrgSid: '',
orgSidPath: ''
},
total: 0
}
this.init()
},
handleSelectionChange(row) {
this.sids = []
const aa = []
row.forEach((element) => {
aa.push({
name: this.userName,
sid: this.userSid,
vinNo: element.vinNo
})
})
this.sids = aa
},
showData(userName, userSid) {
this.listQuery.current = 1
this.listQuery.total = 0
this.listQuery.size = 5
this.userName = userName
this.userSid = userSid
this.init()
},
//
AddUpdateReturn() {
if (this.sids.length > 0) {
var aa = ''
for (var i = 0; i < this.sids.length; i++) {
if (i === 0) {
aa = aa + 1 + '.' + this.sids[i].name + this.sids[i].vinNo + ';'
} else {
aa = aa + parseInt(i + 1) + '.' + this.sids[i].name + this.sids[i].vinNo + ';'
}
}
const tip = '你已选择' + this.sids.length + '台车,我们会在金蝶创建:' + aa.slice(0, aa.length - 1) + '的客户信息,请相关人员进行账务处理!'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '关闭',
type: 'warning'
}).then(() => {
sendFinCustomerTrue(this.sids).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '推送成功' })
}
})
})
} else {
this.$notify({
title: '提示',
message: '请选择至少一条车型记录!',
type: 'error',
duration: 2000
})
}
}
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save