Browse Source

业务管理--修改销售订单、客户管理相关页面的右上角按钮,客户-意向车型新增编辑功能

master
Zhao Qiqi 3 years ago
parent
commit
c49b8caf40
  1. 7
      anrui-buscenter/anrui-buscenter-ui/src/api/jichuxinxi/crmvehicle.js
  2. 122
      anrui-buscenter/anrui-buscenter-ui/src/components/ButtonBar/index.vue
  3. 151
      anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/cheliangxuqiu/cheliangxuqiu.vue
  4. 92
      anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/cheliangxuqiu/cheliangxuqiuAdd.vue
  5. 31
      anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/cheliangxuqiu/cheliangxuqiuinfo.vue
  6. 143
      anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehudangan/kehudangan.vue
  7. 94
      anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehugenjinjilu/genjinjiluguanli.vue
  8. 13
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/relation/xuanzekehuAdd.vue
  9. 48
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanAdd.vue
  10. 88
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/xiaoshouzhengce.vue

7
anrui-buscenter/anrui-buscenter-ui/src/api/jichuxinxi/crmvehicle.js

@ -1,5 +1,6 @@
import request from '@/utils/request' import request from '@/utils/request'
// Pc端客户的意向车型接口
// Pc端客户基础信息条件分页查询数据的列表 // Pc端客户基础信息条件分页查询数据的列表
export function pagerList(data) { export function pagerList(data) {
return request({ return request({
@ -48,12 +49,12 @@ export function UpdatePcCrmVehicleInfo(data) {
}) })
} }
// 回显 // 回显 已改
export function getPcVehicleInfoBySid(data, user) { export function getPcVehicleInfoBySid(data, user) {
return request({ return request({
url: '/crm/v1/crmvehicledemand/fetchSid/' + data, url: '/crm/v1/crmvehicledemand/initVisitDemands/' + data,
method: 'get', method: 'get',
data: data // data: data
}) })
} }

122
anrui-buscenter/anrui-buscenter-ui/src/components/ButtonBar/index.vue

@ -0,0 +1,122 @@
<template>
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 按钮部分开始 :icon="item.icon"-->
<div>
<el-button v-for="item in btnList" :key="item.btnKey" :type="item.type" :size="item.size" :disabled="btndisabled" @click="btnHandle(item.btnKey)">
<svg-icon :iconClass="item.icon"/>{{ item.btnLabel }}
</el-button>
</div>
<!--end 按钮部分结束-->
</div>
<!--标题按钮部分结束-->
</template>
<script>
export default {
name: 'ButtonBar',
props: {
viewTitle: String,
btndisabled: { type: Boolean, default: false }
},
data() {
return {
currentPath: this.$route.path,
userSid: this.$store.getters.userInfo ? this.$store.getters.userInfo.userSid : '',
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'primary',
size: 'small',
icon: 'edit',
btnKey: 'toEdit',
btnLabel: '编辑'
},
{
type: 'primary',
size: 'small',
icon: 'submit',
btnKey: 'doSubmit',
btnLabel: '提交'
},
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'success',
size: 'small',
icon: 'Import',
btnKey: 'doImport',
btnLabel: '导入'
},
{
type: 'success',
size: 'small',
icon: 'export',
btnKey: 'build',
btnLabel: '导出'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
]
}
},
created: function() {
this.initPermission()
},
methods: {
initPermission() {
console.log('*******************当前路径 ' + this.currentPath)
console.log('*******************当前用户 ' + this.userSid)
const params = {
currentPath: this.currentPath,
userSid: this.userSid
}
// req
// .buttonPermission(params)
// .then(resp => {
// if (resp.success) {
// this.btnList = resp.data
// }
// })
// .catch(e => {
// console.log('' + e)
// })
},
btnHandle(btnKey) {
this.$emit('btnhandle', btnKey)
},
setButtonList(value) {
this.btnList = value
}
}
}
</script>
<style scoped>
.svg-icon {
width: 1.2em;
height: 1.2em;
vertical-align: -0.16em;
fill: currentColor;
overflow: hidden;
margin-right: 3px;
}
</style>

151
anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/cheliangxuqiu/cheliangxuqiu.vue

@ -1,25 +1,28 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div v-show="viewState ==1"> <div v-show="viewState ==1">
<div class="tab-header webtop"> <button-bar :view-title=" this.customerName + '客户-意向车型'" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div>{{ this.customerName }}客户-意向车型</div> <!-- <div class="tab-header webtop">-->
<div> <!-- <div>{{ this.customerName }}客户-意向车型</div>-->
<el-button v-show="btnVisible" type="primary" size="small" icon="el-icon-plus" @click="handleCreate()">新增 <!-- <div>-->
</el-button> <!-- <el-button v-show="btnVisible" type="primary" size="small" icon="el-icon-plus" @click="handleCreate()">新增-->
<!-- <el-button type="primary" size="small" @click="handleUpdate()">编辑</el-button> --> <!-- </el-button>-->
<el-button v-show="btnVisible" type="danger" size="small" icon="el-icon-delete" @click="handleDelete()">删除 <!-- &lt;!&ndash; <el-button type="primary" size="small" @click="handleUpdate()">编辑</el-button> &ndash;&gt;-->
</el-button> <!-- <el-button v-show="btnVisible" type="danger" size="small" icon="el-icon-delete" @click="handleDelete()">删除-->
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button> <!-- </el-button>-->
</div> <!-- <el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>-->
</div> <!-- </div>-->
<!-- </div>-->
<div class="webcon"> <div class="webcon">
<div class="searchcon"> <div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> <el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header"> <el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header">
<el-form-item label="品牌"> <el-form-item label="品牌">
<el-select v-model="listQuery.params.brandName" class="addinputw" placeholder="请选择" @change="changePinPai" style="width:200px"> <el-select v-model="listQuery.params.brandName" class="addinputw" placeholder="请选择"
<el-option v-for="(item, index) in brand_list" :key="index" :label="item.brandName" :value="item.sid"/> @change="changePinPai" style="width:200px">
<el-option v-for="(item, index) in brand_list" :key="index" :label="item.brandName"
:value="item.sid"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="车型"> <el-form-item label="车型">
@ -107,18 +110,18 @@
</div> </div>
</div> </div>
</div> </div>
<cheliangxuqiuAdd v-show="viewState ==2" ref="divadd" @handleReturn="handleReturn_copy"/> <cheliangxuqiuAdd v-show="viewState == 2 || viewState == 3 " ref="divadd" @handleReturn="handleReturn_copy"/>
<cheliangxuqiuinfo v-show="viewState ==3" ref="divinfo" @handleReturn="handleReturn_copy"/> <cheliangxuqiuinfo v-show="viewState == 4" ref="divinfo" @handleReturn="handleReturn_copy"/>
</div> </div>
</template> </template>
<script> <script>
import { pagerList, delBySids } from '@/api/jichuxinxi/crmvehicle' import {delBySids, pagerList} from '@/api/jichuxinxi/crmvehicle'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import { getNamesDownBySid, getPinpai, getSelectDown } from '@/api/dictcommons/basemanufacturer' import ButtonBar from '@/components/ButtonBar'
import {getSelectDown, loginDetails} from '@/api/dictcommons/basemanufacturer'
import {typeValues} from '@/api/dictcommons/shujuzidian' import {typeValues} from '@/api/dictcommons/shujuzidian'
import { loginDetails } from '@/api/dictcommons/basemanufacturer'
import {getStorage} from '@/utils/auth' import {getStorage} from '@/utils/auth'
import cheliangxuqiuAdd from './cheliangxuqiuAdd' import cheliangxuqiuAdd from './cheliangxuqiuAdd'
import cheliangxuqiuinfo from './cheliangxuqiuinfo' import cheliangxuqiuinfo from './cheliangxuqiuinfo'
@ -130,17 +133,48 @@ export default {
cheliangxuqiuAdd, cheliangxuqiuAdd,
cheliangxuqiuinfo, cheliangxuqiuinfo,
Pagination, Pagination,
pageye pageye,
ButtonBar,
}, },
data() { data() {
return { return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'primary',
size: 'small',
icon: 'edit',
btnKey: 'toEdit',
btnLabel: '编辑'
},
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
viewState: 1, viewState: 1,
btnVisible: false, btnVisible: false,
customerSid: '', customerSid: '',
customerName: '', customerName: '',
isSearchShow: false, isSearchShow: false,
searchxianshitit: '隐藏查询条件', searchxianshitit: '隐藏查询条件',
btndisabled: false,
tableKey: 0, tableKey: 0,
sids: [], sids: [],
list: [], list: [],
@ -173,11 +207,33 @@ export default {
temp: {} // temp: {} //
} }
}, },
mounted() {
this.$refs["btnbar"].setButtonList(this.btnList)
},
created() { created() {
// //
// //
}, },
methods: { methods: {
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'toEdit':
this.toEdit()
break
case 'doDel':
this.doDel()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
// //
clicksearchShow() { clicksearchShow() {
this.isSearchShow = !this.isSearchShow this.isSearchShow = !this.isSearchShow
@ -298,7 +354,6 @@ export default {
const aa = [] const aa = []
const bb = [] const bb = []
const cc = [] const cc = []
console.log('112233', row)
row.forEach((element) => { row.forEach((element) => {
aa.push(element.sid) aa.push(element.sid)
}) })
@ -313,35 +368,35 @@ export default {
console.log('勾选记录', this.sids) console.log('勾选记录', this.sids)
}, },
// //
handleCreate() { toAdd() {
this.viewState = 2 this.viewState = 2
this.$refs.divadd.openCreate(this.stateId) this.$refs.divadd.openCreate(this.stateId)
}, },
// //
handleUpdate() { toEdit() {
if (this.sids.length === 1) { if (this.sids.length === 1) {
this.$refs.divadd.openUpdate(this.sids[0], this.stateId, () => { this.viewState = 3
}) this.$refs['divadd'].openUpdate(this.sids[0])
// this.$refs.divadd.openUpdate(this.sids[0], this.stateId, () => {
// })
} else if (this.sids.length > 1) { } else if (this.sids.length > 1) {
this.$notify({ this.$message({
title: '提示', showClose: true,
message: '不能选中多个修改!', message: '不能选中多个修改!',
type: 'info', type: 'error'
duration: 2000 });
})
} else { } else {
this.$notify({ this.$message({
title: '提示', showClose: true,
message: '没有选择信息!', message: '请选择一条信息!',
type: 'error', type: 'error'
duration: 2000 });
})
return return
} }
}, },
// //
handleCheck(row) { handleCheck(row) {
this.viewState = 3 this.viewState = 4
this.$refs['divinfo'].openinfo(row.sid, this.stateId) this.$refs['divinfo'].openinfo(row.sid, this.stateId)
}, },
// ------------------ // ------------------
@ -352,7 +407,7 @@ export default {
return pageindex return pageindex
}, },
// //
handleReturn() { doClose() {
this.btnVisible = false this.btnVisible = false
if (this.upLevel == '0') { if (this.upLevel == '0') {
this.$emit('handleReturn') this.$emit('handleReturn')
@ -398,7 +453,7 @@ export default {
this.getList() this.getList()
}, },
// ID // ID
handleDelete() { doDel() {
if (this.sids.length == 0) { if (this.sids.length == 0) {
this.$message({ this.$message({
showClose: true, showClose: true,
@ -415,21 +470,19 @@ export default {
}).then(() => { }).then(() => {
if (this.sids.length > 0) { if (this.sids.length > 0) {
delBySids(this.sids).then((response) => { delBySids(this.sids).then((response) => {
console.log('3455', response)
if (response.code === '200') { if (response.code === '200') {
this.$notify({ this.$message({
title: '提示', showClose: true,
message: '删除成功', message: '删除成功',
type: 'success', type: 'success'
duration: 2000 });
})
this.getList() this.getList()
} else { } else {
this.$notify({ this.$message({
title: '删除失败', showClose: true,
message: response.msg, message: '删除失败',
type: 'error' type: 'error'
}) });
} }
}) })
} }

92
anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/cheliangxuqiu/cheliangxuqiuAdd.vue

@ -24,8 +24,10 @@
<el-col :span="4" class="el-form-item-right"> 品牌</el-col> <el-col :span="4" class="el-form-item-right"> 品牌</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item> <el-form-item>
<el-select v-model="temp.brandSid" style="width:50%" placeholder="请选择" @change="changePinPai"> <el-select v-model="temp.brandSid" :disabled="stateId == '1'" style="width:50%" placeholder="请选择"
<el-option v-for="(item, index) in brand_list" :key="index" :label="item.brandName" :value="item.sid"/> @change="changePinPai">
<el-option v-for="(item, index) in brand_list" :key="index" :label="item.brandName"
:value="item.sid"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -40,7 +42,7 @@
<div class="vehicle"> <div class="vehicle">
<span>{{ temp.modelName }}</span> <span>{{ temp.modelName }}</span>
<div> <div>
<el-button type="primary" size="small" @click="handSelect">车型选择</el-button> <el-button type="primary" size="small" v-show="this.stateId !== '1'" @click="handSelect">车型选择</el-button>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
@ -62,20 +64,23 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <!-- <el-row>-->
<el-col :span="4" class="el-form-item-right"> 选装内容</el-col> <!-- <el-col :span="4" class="el-form-item-right"> 选装内容</el-col>-->
<el-col :span="20"> <!-- <el-col :span="20">-->
<el-form-item> <!-- <el-form-item>-->
<el-input v-model="temp.changeOptions" placeholder="" style="width:81%" clearable/> <!-- <el-input v-model="temp.changeOptions" placeholder="" style="width:81%" clearable/>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
</el-row> <!-- </el-row>-->
<el-row> <el-row>
<el-col :span="4" class="el-form-item-right">销售指导价(万元)</el-col> <el-col :span="4" class="el-form-item-right">销售指导价(万元)</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="saleReferencePrice"> <el-form-item>
<el-input v-model="temp.saleReferencePrice" maxlength="20" placeholder="" style="width:50%" clearable readonly/> <span>{{ temp.saleReferencePrice }}</span>
</el-form-item> </el-form-item>
<!-- <el-form-item prop="saleReferencePrice">-->
<!-- <el-input v-model="" maxlength="20" placeholder="" style="width:50%" clearable readonly/>-->
<!-- </el-form-item>-->
</el-col> </el-col>
<el-col :span="4" class="el-form-item-right">车型报价</el-col> <el-col :span="4" class="el-form-item-right">车型报价</el-col>
<el-col :span="8"> <el-col :span="8">
@ -106,8 +111,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- 选择贷款后展示的金融需求 -->
<div v-if="this.ifdictKey"> <div v-if="this.ifdictKey">
<div class="title" style="40px">金融需求</div> <div class="title">金融需求</div>
<el-form ref="dataForm" :model="crmFindemandVo_copy" label-position="right" label-width="190px" :rules="rules"> <el-form ref="dataForm" :model="crmFindemandVo_copy" label-position="right" label-width="190px" :rules="rules">
<el-row> <el-row>
<el-col :span="4" class="el-form-item-right"> <el-col :span="4" class="el-form-item-right">
@ -126,7 +132,8 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item> <el-form-item>
<el-select v-model="crmFindemandVo_copy.managementName" placeholder="请选择" style="width:50%"> <el-select v-model="crmFindemandVo_copy.managementName" placeholder="请选择" style="width:50%">
<el-option v-for="(item, index) in supplier" :key="item.sid" :label="item.bankName" :value="item.bankName"/> <el-option v-for="(item, index) in supplier" :key="item.sid" :label="item.manageName"
:value="item.manageName"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -306,37 +313,38 @@ export default {
// this.postHuoquyonghu() // this.postHuoquyonghu()
this.getPathSid() this.getPathSid()
}, },
openUpdate(sid, user, checkin, showed) { openUpdate(sid) {
this.stateId = '1'
// this.kehusid = sid // this.kehusid = sid
this.stateId = sid // this.stateId = sid
this.userSidL = user // this.userSidL = user
this.enter = checkin // this.enter = checkin
if (this.stateId !== '0') { getPcVehicleInfoBySid(sid).then((response) => {
getPcVehicleInfoBySid(this.stateId, this.userSidL).then((response) => {
if (response.code === '200') { if (response.code === '200') {
// this.$refs['dataForm'].clearValidate() // this.temp = response.data
this.temp = response.data // this.temp.brandSid = response.data.brand
this.crmFindemandVo_copy = this.temp.crmFindemandVo // this.aseTypeBox = [this.temp.purchaseMethod]
this.aseTypeBox = [this.temp.purchaseMethod] // if (this.temp.purchaseMethodValue == '') {
if (this.temp.purchaseMethodValue == '贷款') { // this.ifdictKey = true
this.ifdictKey = true // this.crmFindemandVo_copy = response.data.crmFindemandVo
} else { // } else {
this.ifdictKey = false // this.ifdictKey = false
} // }
if (this.temp.crmFindemandVo.loanSubjectType !== '') {
this.principal.forEach((e) => {
if (e.dictValue == this.temp.crmFindemandVo.loanSubjectType) { // if (this.temp.crmFindemandVo.loanSubjectType !== '') {
this.loanSubjectType = [e.dictKey] // this.principal.forEach((e) => {
} // if (e.dictValue == this.temp.crmFindemandVo.loanSubjectType) {
}) // this.loanSubjectType = [e.dictKey]
} // }
this.getCheXingName(response.data.brandSid) // })
if (showed && typeof showed === 'function') { // }
showed() // this.getCheXingName(response.data.brandSid)
} // if (showed && typeof showed === 'function') {
// showed()
// }
} }
}) })
}
this.init() this.init()
}, },
openCreate(sid, checkin) { openCreate(sid, checkin) {

31
anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/cheliangxuqiu/cheliangxuqiuinfo.vue

@ -8,7 +8,7 @@
</div> </div>
</div> </div>
<div class="listconadd"> <div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="right" label-width="190px" class="formadd" :rules="rules"> <el-form ref="dataForm" :model="temp" label-position="right" class="formadd" :rules="rules">
<div class="title">车型详情</div> <div class="title">车型详情</div>
<el-row> <el-row>
<el-col :span="4" class="el-form-item-right"> <el-col :span="4" class="el-form-item-right">
@ -48,14 +48,14 @@
{{ temp.otherConfig }} {{ temp.otherConfig }}
</el-col> </el-col>
</el-row> </el-row>
<el-row> <!-- <el-row>-->
<el-col :span="4" class="el-form-item-right"> <!-- <el-col :span="4" class="el-form-item-right">-->
选装内容 <!-- 选装内容-->
</el-col> <!-- </el-col>-->
<el-col :span="20" class="el-form-item-left"> <!-- <el-col :span="20" class="el-form-item-left">-->
{{ temp.changeOptions }} <!-- {{ temp.changeOptions }}-->
</el-col> <!-- </el-col>-->
</el-row> <!-- </el-row>-->
<el-row> <el-row>
<el-col :span="4" class="el-form-item-right"> <el-col :span="4" class="el-form-item-right">
销售参考价 销售参考价
@ -94,8 +94,7 @@
</el-row> </el-row>
<div v-if="this.ifdictKey"> <div v-if="this.ifdictKey">
<div class="title">金融需求</div> <div class="title">金融需求</div>
<el-form ref="dataForm" :model="crmFindemandVo_copy" label-position="right" label-width="190px" <el-form ref="dataForm" :model="crmFindemandVo_copy" label-position="right">
:rules="rules">
<el-row> <el-row>
<el-col :span="4" class="el-form-item-right"> <el-col :span="4" class="el-form-item-right">
贷款主体类型 贷款主体类型
@ -237,6 +236,16 @@ export default {
</script> </script>
<style scoped> <style scoped>
.el-form-item-right { .el-form-item-right {
font-size: 14px;
font-weight: 700;
color: #606266;
line-height: 3 !important;
text-align: right;
}
.el-form-item-left {
font-size: 14px;
color: #606266;
line-height: 3 !important; line-height: 3 !important;
text-align: right; text-align: right;
} }

143
anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehudangan/kehudangan.vue

@ -1,18 +1,20 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div v-show="viewState ==1"> <div v-show="viewState ==1">
<div class="tab-header webtop"> <button-bar view-title="客户管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div>客户管理</div> <!-- <div class="tab-header webtop">-->
<div> <!-- <div>客户管理</div>-->
<el-button type="primary" size="small" icon="el-icon-plus" @click="handleCreate()">新增</el-button> <!-- <div>-->
<el-button type="primary" size="small" icon="el-icon-edit" @click="handleUpdate()">编辑</el-button> <!-- <el-button type="primary" size="small" icon="el-icon-plus" @click="handleCreate()">新增</el-button>-->
<el-button type="success" size="small" icon="el-icon-user" @click="handleGenjin()">客户跟进</el-button> <!-- <el-button type="primary" size="small" icon="el-icon-edit" @click="handleUpdate()">编辑</el-button>-->
<el-button type="success" size="small" icon="el-icon-user" @click="handleZiliao()">客户档案</el-button> <!-- <el-button type="success" size="small" icon="el-icon-user" @click="handleGenjin()">客户跟进</el-button>-->
<!-- <el-button type="danger" size="small" @click="handleDelete()">删除</el-button>--> <!-- <el-button type="success" size="small" icon="el-icon-user" @click="handleZiliao()">客户档案</el-button>-->
<el-button type="success" size="small">导入</el-button> <!-- &lt;!&ndash; <el-button type="danger" size="small" @click="handleDelete()">删除</el-button>&ndash;&gt;-->
<el-button type="success" size="small" @click="handleDaoChu()">导出</el-button> <!-- <el-button type="success" size="small">导入</el-button>-->
<el-button type="info" size="small" icon="el-icon-close">关闭</el-button> <!-- <el-button type="success" size="small" @click="handleDaoChu()">导出</el-button>-->
</div> <!-- <el-button type="info" size="small" icon="el-icon-close">关闭</el-button>-->
<!-- </div>-->
<!-- </div>-->
<!--登记类型弹窗--> <!--登记类型弹窗-->
<el-dialog <el-dialog
title="客户登记-类型" title="客户登记-类型"
@ -38,7 +40,7 @@
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div>
<div class="webcon"> <div class="webcon">
<div class="searchcon"> <div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> <el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
@ -147,6 +149,7 @@ import {deleteBySids, pagerList} from '@/api/jichuxinxi/crmcustomer'
import {typeValues} from '@/api/dictcommons/shujuzidian' import {typeValues} from '@/api/dictcommons/shujuzidian'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import kehudanganAdd from './kehudanganAdd.vue' import kehudanganAdd from './kehudanganAdd.vue'
import kehudanganInfo from './kehudanganinfo.vue' import kehudanganInfo from './kehudanganinfo.vue'
import genjinjiluguanli from '@/views/kehuguanli/kehugenjinjilu/genjinjiluguanli.vue' import genjinjiluguanli from '@/views/kehuguanli/kehugenjinjilu/genjinjiluguanli.vue'
@ -158,6 +161,7 @@ export default {
components: { components: {
Pagination, Pagination,
pageye, pageye,
ButtonBar,
kehudanganAdd, kehudanganAdd,
kehudanganInfo, kehudanganInfo,
genjinjiluguanli, genjinjiluguanli,
@ -166,6 +170,65 @@ export default {
}, },
data() { data() {
return { return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'primary',
size: 'small',
icon: 'edit',
btnKey: 'toEdit',
btnLabel: '编辑'
},
{
type: 'success',
size: 'small',
icon: 'user',
btnKey: 'toGenjin',
btnLabel: '客户跟进'
},
{
type: 'success',
size: 'small',
icon: 'user',
btnKey: 'toZiliao',
btnLabel: '客户档案'
},
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'success',
size: 'small',
icon: 'Import',
btnKey: 'doImport',
btnLabel: '导入'
},
{
type: 'success',
size: 'small',
icon: 'export',
btnKey: 'build',
btnLabel: '导出'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
upLevel: '0', upLevel: '0',
dialogVisible: false, // dialogVisible: false, //
formLabelWidth: '110px', formLabelWidth: '110px',
@ -213,12 +276,46 @@ export default {
// ------------------------------------ // ------------------------------------
} }
}, },
mounted() {
this.$refs["btnbar"].setButtonList(this.btnList)
},
created() { created() {
// //
this.init() this.init()
// //
}, },
methods: { methods: {
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'toEdit':
this.toEdit()
break
case 'toGenjin':
this.toGenjin()
break
case 'toZiliao':
this.toZiliao()
break
case 'doDel':
this.doDel()
break
case 'doImport':
this.doImport()
break
case 'export':
this.export()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
// //
clicksearchShow() { clicksearchShow() {
this.isSearchShow = !this.isSearchShow this.isSearchShow = !this.isSearchShow
@ -281,7 +378,7 @@ export default {
this.getList() this.getList()
}, },
// //
handleCreate() { toAdd() {
this.dialogVisible = true this.dialogVisible = true
}, },
handleOpen() { handleOpen() {
@ -334,7 +431,7 @@ export default {
console.log('勾选记录', this.sids) console.log('勾选记录', this.sids)
}, },
// //
handleUpdate() { toEdit() {
if (this.sids.length === 1) { if (this.sids.length === 1) {
this.dialogStatus = 'update' this.dialogStatus = 'update'
this.viewState = 3 this.viewState = 3
@ -357,7 +454,7 @@ export default {
} }
}, },
// //
handleGenjin() { toGenjin() {
if (this.sids.length === 1) { if (this.sids.length === 1) {
this.dialogStatus = 'update' this.dialogStatus = 'update'
this.viewState = 5 this.viewState = 5
@ -380,7 +477,7 @@ export default {
} }
}, },
// //
handleZiliao() { toZiliao() {
if (this.sids.length === 1) { if (this.sids.length === 1) {
this.dialogStatus = 'update' this.dialogStatus = 'update'
this.viewState = 7 this.viewState = 7
@ -408,7 +505,7 @@ export default {
this.$refs['Info'].openInfo(row.sid) this.$refs['Info'].openInfo(row.sid)
}, },
// ID // ID
handleDelete() { doDel() {
if (this.sids.length) { if (this.sids.length) {
const sids = this.sids.toString() const sids = this.sids.toString()
deleteBySids(sids).then((response) => { deleteBySids(sids).then((response) => {
@ -437,9 +534,13 @@ export default {
}) })
return return
} }
},
//
doImport(){
}, },
// //
handleDaoChu() { export() {
// basefinbankExportExcel(this.sids).then((res) => { // basefinbankExportExcel(this.sids).then((res) => {
// const blob = new Blob([res], { // const blob = new Blob([res], {
// type: 'application/vnd.ms-excel', // type: 'application/vnd.ms-excel',
@ -525,6 +626,10 @@ export default {
this.customerTypeList.visitWay = bb.name this.customerTypeList.visitWay = bb.name
this.customerTypeList.visitWayKey = bb.vaule this.customerTypeList.visitWayKey = bb.vaule
}, },
doClose(){
this.$store.dispatch('tagsView/delView', this.$route);
this.$router.go(-1)
}
} }
} }
</script> </script>

94
anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehugenjinjilu/genjinjiluguanli.vue

@ -1,25 +1,28 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div v-show="viewState == 1"> <div v-show="viewState == 1">
<div class="tab-header webtop"> <button-bar view-title="客户跟进记录" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div>客户跟进记录</div> <!-- <div class="tab-header webtop">-->
<div> <!-- <div>客户跟进记录</div>-->
<el-button v-show="btnVisible" type="primary" size="small" icon="el-icon-plus" @click="handleCreate()">新增 <!-- <div>-->
</el-button> <!-- <el-button v-show="btnVisible" type="primary" size="small" icon="el-icon-plus" @click="handleCreate()">新增-->
<el-button v-show="btnVisible" type="primary" size="small" icon="" @click="handleUpdate()">编辑</el-button> <!-- </el-button>-->
<!-- <el-button type="danger" size="small" @click="handleDelete()">删除</el-button> --> <!-- <el-button v-show="btnVisible" type="primary" size="small" icon="" @click="handleUpdate()">编辑</el-button>-->
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button> <!-- &lt;!&ndash; <el-button type="danger" size="small" @click="handleDelete()">删除</el-button> &ndash;&gt;-->
</div> <!-- <el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>-->
</div> <!-- </div>-->
<!-- </div>-->
<div class="webcon"> <div class="webcon">
<div class="searchcon"> <div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> <el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item class="formItem" label="跟进时间"> <el-form-item class="formItem" label="跟进时间">
<el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.start_follow_time" clearable style="width: 160px;" type="date" placeholder="开始日期"/> <el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.start_follow_time" clearable
style="width: 160px;" type="date" placeholder="开始日期"/>
<div class="line"></div> <div class="line"></div>
<el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.end_follow_time" clearable style="width: 160px;" type="date" placeholder="结束日期"/> <el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.end_follow_time" clearable
style="width: 160px;" type="date" placeholder="结束日期"/>
</el-form-item> </el-form-item>
<el-form-item label="跟进形式"> <el-form-item label="跟进形式">
<el-select v-model="listQuery.params.follow_form" class="addinputw" placeholder="请输入" @change="getXingshi"> <el-select v-model="listQuery.params.follow_form" class="addinputw" placeholder="请输入" @change="getXingshi">
@ -118,9 +121,10 @@
</template> </template>
<script> <script>
import { pagerList, del } from '@/api/jichuxinxi/crmvisit' import {del, pagerList} from '@/api/jichuxinxi/crmvisit'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import genjinjiluAdd from './genjinjiliAdd.vue' import genjinjiluAdd from './genjinjiliAdd.vue'
import {typeValues} from '@/api/dictcommons/shujuzidian' import {typeValues} from '@/api/dictcommons/shujuzidian'
import genjinjiluInfo from './genjinjiluinfo.vue' import genjinjiluInfo from './genjinjiluinfo.vue'
@ -134,12 +138,44 @@ export default {
components: { components: {
Pagination, Pagination,
pageye, pageye,
ButtonBar,
genjinjiluAdd, genjinjiluAdd,
genjinjiluInfo, genjinjiluInfo,
cheliangxuqiu cheliangxuqiu
}, },
data() { data() {
return { return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'primary',
size: 'small',
icon: 'edit',
btnKey: 'toEdit',
btnLabel: '编辑'
},
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
viewState: 1, viewState: 1,
btnVisible: false, btnVisible: false,
upLevel: '1', upLevel: '1',
@ -182,11 +218,33 @@ export default {
dialogFormVisible: false dialogFormVisible: false
} }
}, },
mounted() {
this.$refs["btnbar"].setButtonList(this.btnList)
},
created() { created() {
// //
this.init() this.init()
}, },
methods: { methods: {
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'toEdit':
this.toEdit()
break
case 'doDel':
this.doDel()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
// //
clicksearchShow() { clicksearchShow() {
this.isSearchShow = !this.isSearchShow this.isSearchShow = !this.isSearchShow
@ -279,7 +337,7 @@ export default {
this.getList() this.getList()
}, },
// //
handleCreate() { toAdd() {
this.viewState = 2 this.viewState = 2
this.$refs['addAndUpdate'].openCreate(this.Kehu_Name, this.kehu_uesrsid) this.$refs['addAndUpdate'].openCreate(this.Kehu_Name, this.kehu_uesrsid)
}, },
@ -292,7 +350,7 @@ export default {
this.sids = aa this.sids = aa
}, },
// //
handleUpdate() { toEdit() {
if (this.sids.length === 1) { if (this.sids.length === 1) {
this.dialogStatus = 'update' this.dialogStatus = 'update'
this.viewState = 3 this.viewState = 3
@ -334,7 +392,7 @@ export default {
this.$refs.openCheXu.cheLiang(this.kehu_uesrsid, this.upLevel, this.Kehu_Name, '02') this.$refs.openCheXu.cheLiang(this.kehu_uesrsid, this.upLevel, this.Kehu_Name, '02')
}, },
// ID // ID
handleDelete() { doDel() {
del(this.sids).then((response) => { del(this.sids).then((response) => {
if (response.code === '200') { if (response.code === '200') {
this.$notify({ this.$notify({
@ -361,6 +419,10 @@ export default {
type: 'warning' type: 'warning'
}) })
}, },
doClose() {
this.$store.dispatch('tagsView/delView', this.$route);
this.$router.go(-1)
},
// //
dataCreated() { dataCreated() {
this.getList() this.getList()

13
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/relation/xuanzekehuAdd.vue

@ -508,7 +508,6 @@
Customeryou: '', Customeryou: '',
checkin: '', // checkin: '', //
kehusid: '', kehusid: '',
customerType: '',
YongHuid: [], YongHuid: [],
visible: false, visible: false,
stateId: 0, stateId: 0,
@ -649,6 +648,7 @@
openCreate(customerTypeList, showed) { openCreate(customerTypeList, showed) {
this.resetTemp() this.resetTemp()
this.temp.customerType = customerTypeList.customerType this.temp.customerType = customerTypeList.customerType
this.temp.customerTypeKey = customerTypeList.customerTypeKey
this.temp.visitWay = customerTypeList.visitWay this.temp.visitWay = customerTypeList.visitWay
this.temp.visitWayKey = customerTypeList.visitWayKey this.temp.visitWayKey = customerTypeList.visitWayKey
this.$refs['dataForm'].clearValidate() this.$refs['dataForm'].clearValidate()
@ -663,21 +663,12 @@
this.temp.certificateType='营业执照' this.temp.certificateType='营业执照'
this.temp.certificateTypeKey='02' this.temp.certificateTypeKey='02'
} }
typeValues({type: 'customerType'}).then((res) => { typeValues({psid: customerTypeList.psid, type: this.customerClass}).then((res) => {
if (res.code === '200') {
this.customerType_list = res.data
this.customerType_list.forEach((e) => {
if (e.dictValue == this.temp.customerType) {
typeValues({psid: e.sid, type: this.customerClass}).then((res)=>{
if (res.code === '200') { if (res.code === '200') {
this.merClass = res.data this.merClass = res.data
} }
}) })
} }
})
}
})
}
if (showed && typeof showed === 'function') { if (showed && typeof showed === 'function') {
showed() showed()
} }

48
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanAdd.vue

@ -683,10 +683,17 @@
:value="item.dictKey"/> :value="item.dictKey"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label-width="formLabelWidth" class="diaForm" label="客户类型"> <el-form-item label="客户类型" :label-width="formLabelWidth" class="diaForm">
<el-radio v-model="customerTypeList.customerType" label="个人">个人</el-radio> <el-radio-group v-model="customerTypeList.customerType">
<el-radio v-model="customerTypeList.customerType" label="企业">企业</el-radio> <el-radio v-for="item in merType" :key="item.dictKey" :label="item.dictValue"
@change="customerTypeChange">{{ item.dictValue }}
</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
<!-- <el-form-item :label-width="formLabelWidth" class="diaForm" label="客户类型">-->
<!-- <el-radio v-model="customerTypeList.customerType" label="个人">个人</el-radio>-->
<!-- <el-radio v-model="customerTypeList.customerType" label="企业">企业</el-radio>-->
<!-- </el-form-item>-->
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button class="el-button-sure" type="primary" @click="handleOpen()"> </el-button> <el-button class="el-button-sure" type="primary" @click="handleOpen()"> </el-button>
@ -916,6 +923,7 @@ export default {
payType_list: [], payType_list: [],
guaKaoCompanyList: [], guaKaoCompanyList: [],
visitWay_list: [], visitWay_list: [],
merType:[],
tableKey: 0, tableKey: 0,
tableKey2: 1, tableKey2: 1,
tableKey3: 2, tableKey3: 2,
@ -928,7 +936,9 @@ export default {
customerTypeList: { customerTypeList: {
visitWay: '', // visitWay: '', //
visitWayKey: '', visitWayKey: '',
customerType: ''// customerType: '', //
customerTypeKey: '',//
psid:''
}, },
temp: { temp: {
affiliatedCompany: '', // affiliatedCompany: '', //
@ -1101,6 +1111,13 @@ export default {
methods: { methods: {
// ========== ========== // ========== ==========
getType() { getType() {
dictType({
type: 'customerType'
}).then((res) => {
if (res.code === '200') {
this.merType = res.data
}
})
// payType invoiceType // payType invoiceType
dictType({ dictType({
type: 'purchaseType ', type: 'purchaseType ',
@ -1801,6 +1818,13 @@ export default {
openCustomerCreate() { openCustomerCreate() {
this.customerVisible = true this.customerVisible = true
}, },
//
customerTypeChange(val) {
const choosetItem = this.merType.filter((item) => item.dictValue == val)
this.customerTypeList.customerTypeKey = choosetItem[0].dictKey
this.customerTypeList.psid = choosetItem[0].sid
console.log('name:', this.customerTypeList.customerType, 'key:', this.customerTypeList.customerTypeKey,'sid',this.customerTypeList.psid)
},
// //
handleOpen() { handleOpen() {
if (this.customerTypeList.visitWay !== '' && this.customerTypeList.customerType !== '') { if (this.customerTypeList.visitWay !== '' && this.customerTypeList.customerType !== '') {
@ -1812,7 +1836,9 @@ export default {
this.customerTypeList = { this.customerTypeList = {
visitWay: '', visitWay: '',
visitWayKey: '', visitWayKey: '',
customerType: '' customerType: '',
customerTypeKey: '',
psid:'',
} }
}) })
} else { } else {
@ -2221,14 +2247,14 @@ export default {
moreConfig: modelData.otherConfig, // moreConfig: modelData.otherConfig, //
specialConfig: '', specialConfig: '',
finalPrice: '', finalPrice: '',
type: type, // // type: type, //
} }
const countList = { const countList = {
customerSid: this.temp.customerSid, //sid customerSid: this.temp.customerSid, //sid
modelConfigSid: this.temp.busSalesOrderModel.modelConfigSid, //sid modelConfigSid: this.temp.busSalesOrderModel.modelConfigSid, //sid
modelSid: this.temp.busSalesOrderModel.modelSid, //sid modelSid: this.temp.busSalesOrderModel.modelSid, //sid
staffSid: window.sessionStorage.getItem('staffSid'), //sid staffSid: window.sessionStorage.getItem('staffSid'), //sid
type: 1, // // type: 1, //
} }
const caigouCount = { const caigouCount = {
configSid: this.temp.busSalesOrderModel.modelConfigSid, // sid configSid: this.temp.busSalesOrderModel.modelConfigSid, // sid
@ -2263,14 +2289,14 @@ export default {
moreConfig: modelData.otherConfig, // moreConfig: modelData.otherConfig, //
specialConfig: '', specialConfig: '',
finalPrice: '', finalPrice: '',
type: type, // // type: type, //
} }
const countList = { const countList = {
customerSid: this.temp.customerSid, //sid customerSid: this.temp.customerSid, //sid
modelConfigSid: this.temp.busSalesOrderModel.modelConfigSid, //sid modelConfigSid: this.temp.busSalesOrderModel.modelConfigSid, //sid
modelSid: this.temp.busSalesOrderModel.modelSid, //sid modelSid: this.temp.busSalesOrderModel.modelSid, //sid
staffSid: window.sessionStorage.getItem('staffSid'), //sid staffSid: window.sessionStorage.getItem('staffSid'), //sid
type: 2, // // type: 2, //
} }
const caigouCount = { const caigouCount = {
configSid: this.temp.busSalesOrderModel.modelConfigSid, // sid configSid: this.temp.busSalesOrderModel.modelConfigSid, // sid
@ -2305,7 +2331,7 @@ export default {
moreConfig: modelData.moreConfig, // moreConfig: modelData.moreConfig, //
specialConfig: '', specialConfig: '',
finalPrice: '', finalPrice: '',
type: 3, // // type: 3, //
} }
// //
const countList = { const countList = {
@ -2313,7 +2339,7 @@ export default {
modelConfigSid: this.temp.busSalesOrderModel.modelConfigSid, //sid modelConfigSid: this.temp.busSalesOrderModel.modelConfigSid, //sid
modelSid: this.temp.busSalesOrderModel.modelSid, //sid modelSid: this.temp.busSalesOrderModel.modelSid, //sid
staffSid: window.sessionStorage.getItem('staffSid'), //sid staffSid: window.sessionStorage.getItem('staffSid'), //sid
type: 3, // // type: 3, //
} }
const caigouCount = { const caigouCount = {
configSid: this.temp.busSalesOrderModel.modelConfigSid, // sid configSid: this.temp.busSalesOrderModel.modelConfigSid, // sid

88
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/xiaoshouzhengce.vue

@ -1,15 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div v-show="viewState == 1"> <div v-show="viewState == 1">
<div class="tab-header webtop"> <button-bar view-title="销售政策管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div>销售政策管理</div>
<div>
<el-button type="primary" icon="el-icon-plus" size="small" @click="handleCreate()">新增</el-button>
<el-button type="primary" size="small">提交</el-button>
<el-button type="danger" icon="el-icon-delete" size="small" @click="handleDelete()">删除</el-button>
<el-button type="info" icon="el-icon-close" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="webcon"> <div class="webcon">
<div class="searchcon"> <div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> <el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
@ -129,6 +121,7 @@
import {deleteBySids, selectSalesOrderList, typeValues} from '@/api/jichuxinxi/salepolicy' import {deleteBySids, selectSalesOrderList, typeValues} from '@/api/jichuxinxi/salepolicy'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import xiaoshouzhengceAdd from './xiaoshouzhengceAdd' import xiaoshouzhengceAdd from './xiaoshouzhengceAdd'
import xiaoshouzhengceInfo from './xiaoshouzhengceInfo' import xiaoshouzhengceInfo from './xiaoshouzhengceInfo'
@ -138,11 +131,43 @@ export default {
components: { components: {
Pagination, Pagination,
pageye, pageye,
ButtonBar,
xiaoshouzhengceAdd, xiaoshouzhengceAdd,
xiaoshouzhengceInfo, xiaoshouzhengceInfo,
}, },
data() { data() {
return { return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'primary',
size: 'small',
icon: 'submit',
btnKey: 'doSubmit',
btnLabel: '提交'
},
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
disabled: false, // disabled: false, //
isSearchShow: false, isSearchShow: false,
searchxianshitit: '显示查询条件', searchxianshitit: '显示查询条件',
@ -181,6 +206,9 @@ export default {
nodeState: '' nodeState: ''
} }
}, },
mounted() {
this.$refs["btnbar"].setButtonList(this.btnList)
},
created() { created() {
// //
this.init() this.init()
@ -188,6 +216,25 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doSubmit':
this.doSubmit()
break
case 'doDel':
this.doDel()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
// //
clicksearchShow() { clicksearchShow() {
this.isSearchShow = !this.isSearchShow this.isSearchShow = !this.isSearchShow
@ -239,7 +286,7 @@ export default {
}) })
}, },
// //
handleCreate() { toAdd() {
this.viewState = 2 this.viewState = 2
this.$refs['divadd'].showAdd() this.$refs['divadd'].showAdd()
}, },
@ -332,7 +379,7 @@ export default {
console.log('选择订单类型', this.billType) console.log('选择订单类型', this.billType)
}, },
// ID // ID
handleDelete() { doDel() {
if (this.sids.length > 0) { if (this.sids.length > 0) {
const tip = '请确认是否删除所选记录?' const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', { this.$confirm(tip, '提示', {
@ -360,21 +407,20 @@ export default {
}) })
}) })
} else { } else {
this.$notify({ this.$message({
title: '提示', showClose: true,
message: '没有选择资方信息!!', message: '请选择至少一条记录!',
type: 'error', type: 'error'
duration: 2000 });
})
return return
} }
}, },
handleReturn() { doClose() {
this.$store.dispatch('tagsView/delView', this.$route); this.$store.dispatch('tagsView/delView', this.$route);
this.$router.go(-1) this.$router.go(-1)
} },
// //
// handleSubmit(row) { doSubmit(row) {
// // if (this.sids.length == 1) { // // if (this.sids.length == 1) {
// this.$confirm('', '', { // this.$confirm('', '', {
// confirmButtonText: '', // confirmButtonText: '',
@ -430,7 +476,7 @@ export default {
// // type: 'error', // // type: 'error',
// // }) // // })
// // } // // }
// }, },
} }
} }
</script> </script>

Loading…
Cancel
Save