
26 changed files with 1238 additions and 94 deletions
@ -0,0 +1,20 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
url: '/riskcenter/v1/loanhomevisitprep/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
visit: function(data) { |
|||
return request({ |
|||
url: '/riskcenter/v1/loanhomevisitprep/visit', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
} |
@ -0,0 +1,35 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
url: '/riskcenter/v1/loanparameter/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
saveOrUpdate: function(data) { |
|||
return request({ |
|||
url: '/riskcenter/v1/loanparameter/saveOrUpdate', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
fetchBySid: function(data) { |
|||
return request({ |
|||
url: '/riskcenter/v1/loanparameter/fetchDetailsBySid/' + data, |
|||
method: 'get' |
|||
}) |
|||
}, |
|||
deleteBySids: function(data) { |
|||
return request({ |
|||
url: '/riskcenter/v1/loanparameter/deleteBySids', |
|||
method: 'DELETE', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
} |
|||
} |
@ -0,0 +1,335 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!-- Start 列表页面 --> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="家访准备管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<div class="main-content"> |
|||
<div class="switch_btn"> |
|||
<el-button :class="{btn_style:viewState === 1}">待准备</el-button> |
|||
<el-button class="" @click="handleClick">已准备</el-button> |
|||
</div> |
|||
<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" class="tab-header"> |
|||
<el-form-item label="分公司"> |
|||
<el-input v-model="listQuery.params.useOrgName" clearable placeholder="" class="addinputw"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="销售部门"> |
|||
<el-input v-model="listQuery.params.saleDeptName" clearable placeholder="" class="addinputw"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="销售专员"> |
|||
<el-input v-model="listQuery.params.staffName" clearable placeholder="" class="addinputw"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="订单日期"> |
|||
<el-date-picker v-model="listQuery.params.orderStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.orderEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
</el-form-item> |
|||
<el-form-item label="买卖合同编号"> |
|||
<el-input v-model="listQuery.params.contractNo" clearable placeholder="" class="addinputw"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="贷款人"> |
|||
<el-input v-model="listQuery.params.loanPeoName" clearable placeholder="" class="addinputw"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="资方"> |
|||
<el-input v-model="listQuery.params.capitalName" clearable placeholder="" class="addinputw"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="金融产品"> |
|||
<el-input v-model="listQuery.params.policyName" clearable placeholder="" class="addinputw"></el-input> |
|||
</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> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed width="50" type="selection" align="center"/> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center"/> |
|||
<el-table-column label="操作" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看订单</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="订单日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.createDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="分公司" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.useOrgName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售部门" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.orgName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售专员" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.staffName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="买卖合同编号" align="center" min-width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.contractNo }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="台数" align="center" width="80"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.vehCount }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="贷款人" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.borrowerName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="手机号码" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.mobile }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="资方" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.bankName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="金融产品" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.policyName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="合同" align="center" width="80"> |
|||
<template slot-scope="scope"> |
|||
<span class="bluezi">下载</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End 列表页面 --> |
|||
<!-- 已选择列表 --> |
|||
<thehomevisitisready v-show="viewState == 2" ref="divSelect" @doback="resetState"/> |
|||
<!-- 查看销售订单 --> |
|||
<saleOrder v-show="viewState == 3" ref="divSale" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/homevisitpreparation/homevisitpreparation' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import thehomevisitisready from './thehomevisitisready' |
|||
import saleOrder from '@/components/publicPage/salesOrder' |
|||
|
|||
export default { |
|||
name: 'HomeVisitToBePrepared', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
thehomevisitisready, |
|||
saleOrder |
|||
}, |
|||
data() { |
|||
return { |
|||
viewState: 1, |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: '', |
|||
btnKey: 'tobeSelect', |
|||
btnLabel: '准备完毕' |
|||
}, |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: '', |
|||
btnKey: 'toContract', |
|||
btnLabel: '生成合同' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
// 查询条件 ----------- |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], |
|||
listLoading: false, |
|||
listQuery: { |
|||
params: { |
|||
capitalName: '', |
|||
contractNo: '', |
|||
loanPeoName: '', |
|||
menuUrl: '', |
|||
orderEndDate: '', |
|||
orderStartDate: '', |
|||
orgSidPath: '', |
|||
policyName: '', |
|||
saleDeptName: '', |
|||
staffName: '', |
|||
type: '1', |
|||
useOrgName: '', |
|||
userSid: '' |
|||
}, |
|||
current: 1, |
|||
size: 10, |
|||
total: 0 |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'tobeSelect': |
|||
this.tobeSelect() |
|||
break |
|||
case 'toContract': |
|||
this.toContract() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach((element) => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.listQuery.params.menuUrl = this.$route.path |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
req.listPage(this.listQuery).then((response) => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
tobeSelect() { |
|||
if (this.sids.length === 1) { |
|||
req.visit({ sid: this.sids[0] }).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '操作成功' }) |
|||
this.getList() |
|||
} |
|||
}) |
|||
} else { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' }) |
|||
return |
|||
} |
|||
}, |
|||
toContract() {}, |
|||
handleLook(row) { |
|||
this.viewState = 3 |
|||
this.$refs['divSale'].showInfo(row.saleOrderSid) |
|||
}, |
|||
handleClick() { |
|||
this.viewState = 2 |
|||
this.$refs['divSelect'].getList() |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
handleReset() { |
|||
this.listQuery = { |
|||
params: { |
|||
capitalName: '', |
|||
contractNo: '', |
|||
loanPeoName: '', |
|||
menuUrl: '', |
|||
orderEndDate: '', |
|||
orderStartDate: '', |
|||
orgSidPath: '', |
|||
policyName: '', |
|||
saleDeptName: '', |
|||
staffName: '', |
|||
type: '1', |
|||
useOrgName: '', |
|||
userSid: '' |
|||
}, |
|||
current: 1, |
|||
size: 10, |
|||
total: 0 |
|||
} |
|||
this.getList() |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.btn_style { |
|||
background-color: #018ad2; |
|||
color: white; |
|||
font-weight: 600; |
|||
} |
|||
</style> |
@ -0,0 +1,283 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!-- Start 列表页面 --> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="家访准备管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<div class="main-content"> |
|||
<div class="switch_btn"> |
|||
<el-button class="" @click="handleClick">待准备</el-button> |
|||
<el-button :class="{btn_style:viewState === 1}">已准备</el-button> |
|||
</div> |
|||
<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" class="tab-header"> |
|||
<el-form-item label="分公司"> |
|||
<el-input v-model="listQuery.params.useOrgName" clearable placeholder="" class="addinputw"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="销售部门"> |
|||
<el-input v-model="listQuery.params.saleDeptName" clearable placeholder="" class="addinputw"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="销售专员"> |
|||
<el-input v-model="listQuery.params.staffName" clearable placeholder="" class="addinputw"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="订单日期"> |
|||
<el-date-picker v-model="listQuery.params.orderStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.orderEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
</el-form-item> |
|||
<el-form-item label="买卖合同编号"> |
|||
<el-input v-model="listQuery.params.contractNo" clearable placeholder="" class="addinputw"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="贷款人"> |
|||
<el-input v-model="listQuery.params.loanPeoName" clearable placeholder="" class="addinputw"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="资方"> |
|||
<el-input v-model="listQuery.params.capitalName" clearable placeholder="" class="addinputw"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="金融产品"> |
|||
<el-input v-model="listQuery.params.policyName" clearable placeholder="" class="addinputw"></el-input> |
|||
</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> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;"> |
|||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center"/> |
|||
<el-table-column label="操作" align="center" width="180"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini">下载合同</el-button> |
|||
<el-button type="primary" size="mini" @click="lookSale(scope.row)">查看订单</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="订单日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.createDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="分公司" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.useOrgName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售部门" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.orgName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售专员" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.staffName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="买卖合同编号" align="center" min-width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.contractNo }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="台数" align="center" width="80"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.vehCount }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="贷款人" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.borrowerName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="手机号码" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.mobile }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="资方" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.bankName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="金融产品" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.policyName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End 列表页面 --> |
|||
<!-- 查看销售订单 --> |
|||
<salesOrder v-show="viewState == 2" ref="divSale" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/homevisitpreparation/homevisitpreparation' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import salesOrder from '@/components/publicPage/salesOrder' |
|||
|
|||
export default { |
|||
name: 'TheHomeVisitIsReady', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
salesOrder |
|||
}, |
|||
data() { |
|||
return { |
|||
viewState: 1, |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
// 查询条件 ----------- |
|||
tableKey: 0, |
|||
list: [], |
|||
listLoading: false, |
|||
listQuery: { |
|||
params: { |
|||
capitalName: '', |
|||
contractNo: '', |
|||
loanPeoName: '', |
|||
menuUrl: '', |
|||
orderEndDate: '', |
|||
orderStartDate: '', |
|||
orgSidPath: '', |
|||
policyName: '', |
|||
saleDeptName: '', |
|||
staffName: '', |
|||
type: '2', |
|||
useOrgName: '', |
|||
userSid: '' |
|||
}, |
|||
current: 1, |
|||
size: 10, |
|||
total: 0 |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'tobeSelect': |
|||
this.tobeSelect() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.listQuery.params.menuUrl = this.$route.path |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
req.listPage(this.listQuery).then((response) => { |
|||
console.log('列表查询结果:', response) |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
handleClick() { |
|||
this.$parent.resetState() |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
handleReset() { |
|||
this.listQuery = { |
|||
params: { |
|||
capitalName: '', |
|||
contractNo: '', |
|||
loanPeoName: '', |
|||
menuUrl: '', |
|||
orderEndDate: '', |
|||
orderStartDate: '', |
|||
orgSidPath: '', |
|||
policyName: '', |
|||
saleDeptName: '', |
|||
staffName: '', |
|||
type: '2', |
|||
useOrgName: '', |
|||
userSid: '' |
|||
}, |
|||
current: 1, |
|||
size: 10, |
|||
total: 0 |
|||
} |
|||
this.getList() |
|||
}, |
|||
lookSale(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divSale'].showInfo({ sid: row.saleOrderSid }) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.btn_style { |
|||
background-color: #018ad2; |
|||
color: white; |
|||
font-weight: 600; |
|||
} |
|||
</style> |
@ -0,0 +1,268 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="风控参数设置" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<!--Start查询列表部分--> |
|||
<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="参数编码"> |
|||
<el-input v-model="listQuery.params.parameterNo" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="参数名称"> |
|||
<el-input v-model="listQuery.params.parameterName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">参数列表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange"> |
|||
<el-table-column type="selection" align="center" width="50"/> |
|||
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center"/> |
|||
<el-table-column prop="parameterNo" label="参数编码" align="center"/> |
|||
<el-table-column prop="parameterName" label="参数名称" align="center"/> |
|||
<el-table-column prop="parameterValue" label="参数值" align="center"/> |
|||
<el-table-column prop="remarks" label="备注" align="center"/> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<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> |
|||
<!--End查询列表部分--> |
|||
</div> |
|||
</div> |
|||
<!--新增及修改 --> |
|||
<riskcontrolparameterAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/riskcontrolparameter/riskcontrolparameter' |
|||
import { getOrgSidByPath } from '@/api/Common/dictcommons' |
|||
import riskcontrolparameterAdd from './riskcontrolparameterAdd' |
|||
|
|||
export default { |
|||
name: 'RiskControlParameter', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
riskcontrolparameterAdd |
|||
}, |
|||
data() { |
|||
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: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
userSid: '', |
|||
parameterNo: '', |
|||
parameterName: '', |
|||
menuUrl: '', |
|||
orgPath: '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
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 |
|||
} |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.listQuery.params.menuUrl = this.$route.path |
|||
req.listPage(this.listQuery).then(response => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
userSid: '', |
|||
parameterNo: '', |
|||
parameterName: '', |
|||
menuUrl: '', |
|||
orgPath: '' |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
toAdd() { |
|||
this.viewState = 2 |
|||
this.$refs['divAdd'].showAdd() |
|||
}, |
|||
toEdit(row) { |
|||
if (this.sids.length === 1) { |
|||
this.viewState = 3 |
|||
this.$refs['divAdd'].showEdit(this.sids[0]) |
|||
} else { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑操作' }) |
|||
} |
|||
}, |
|||
doDel() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) |
|||
return |
|||
} |
|||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
req.deleteBySids(this.sids).then(resp => { |
|||
if (resp.success) { |
|||
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|||
} |
|||
this.getList() |
|||
loading.close() |
|||
}).catch(e => { |
|||
loading.close() |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
}, |
|||
// 修改、编辑、详情返回列表页面 |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,124 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="24"> |
|||
<div class="span-sty"><span>参数编码</span></div> |
|||
<el-form-item><el-input v-model="formobj.parameterNo" class="addinputInfo addinputw" clearable placeholder=""/></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty"><span>参数名称</span></div> |
|||
<el-form-item><el-input v-model="formobj.parameterName" class="addinputInfo addinputw" clearable placeholder=""/></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty"><span>参数值</span></div> |
|||
<el-form-item><el-input v-model="formobj.parameterValue" class="addinputInfo addinputw" clearable placeholder=""/></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty"><span>备注</span></div> |
|||
<el-form-item><el-input v-model="formobj.remarks" class="addinputInfo addinputw" clearable placeholder=""/></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/riskcontrolparameter/riskcontrolparameter' |
|||
|
|||
export default { |
|||
name: 'RiskControlParameterAdd', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
submitdisabled: false, |
|||
formobj: { |
|||
sid: '', |
|||
remarks: '', |
|||
userSid: '', |
|||
parameterNo: '', |
|||
parameterName: '', |
|||
parameterValue: '', |
|||
orgPath: '' |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
methods: { |
|||
showAdd() { |
|||
this.viewTitle = '【新增】风控参数' |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
|||
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
}, |
|||
showEdit(sid) { |
|||
this.viewTitle = '【编辑】风控参数' |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
req.fetchBySid(sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
} |
|||
}) |
|||
}, |
|||
saveOrUpdate() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.saveOrUpdate(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
sid: '', |
|||
remarks: '', |
|||
userSid: '', |
|||
parameterNo: '', |
|||
parameterName: '', |
|||
parameterValue: '', |
|||
orgPath: '' |
|||
} |
|||
this.submitdisabled = false |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
</style> |
Loading…
Reference in new issue