<!--
|
* @Descripttion:
|
* @version:
|
* @Author: Pengjiantian
|
* @Date: 2019-08-26 15:08:09
|
* @LastEditors: PengJianTian
|
* @LastEditTime: 2019-12-10 11:05:42
|
-->
|
<template>
|
<div id="area">
|
<el-container>
|
<el-main>
|
<el-form label-position="right" ref="form" :model="form" id="search-form">
|
<el-row :gutter="20">
|
<el-col :md="8" :lg="6">
|
<el-form-item label="统一社会信用码" prop="unifiedsocialcreditcode">
|
<el-input v-model.trim="form.unifiedsocialcreditcode" placeholder="请输入"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :md="8" :lg="6">
|
<el-form-item label="合作方名称" prop="companybusinessregistration">
|
<el-input v-model.trim="form.companybusinessregistration" placeholder="请输入"></el-input>
|
</el-form-item>
|
</el-col>
|
<search-select
|
v-model="form.flowstatuArray"
|
prop="flowstatus"
|
code-no="FlowStatus"
|
label="合作方状态"
|
></search-select>
|
<search-select
|
v-model="form.phaseNoArray"
|
v-if="showFormMore"
|
prop="PhaseNo"
|
code-no="FlowPhase"
|
label="当前流程阶段"
|
></search-select>
|
<search-select
|
v-model="form.cooperationmodeArray"
|
v-if="showFormMore"
|
prop="cooperationmode"
|
code-no="CooperationMode"
|
label="合作模式"
|
></search-select>
|
<search-select
|
v-model="form.channelareanameArray"
|
v-if="showFormMore"
|
prop="channelareaname"
|
code-no="channelarea"
|
label="合作方归属地区"
|
></search-select>
|
<el-col :md="8" :lg="6" v-if="showFormMore">
|
<el-form-item label="当前申请人" prop="curinputuser">
|
<el-input v-model.trim="form.inputUser" placeholder="请输入"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :md="8" :lg="6" style="flex: 1;display:flex;justify-content:flex-end">
|
<el-form-item :class="showFormMore?'pull-right':'pull-left'">
|
<el-button class="search-btn" @click="handleFormReset">重置</el-button>
|
<el-button class="search-btn" type="primary" @click="handleSubmit" style="margin-left:22px">搜索</el-button>
|
<el-button type="text" @click="handleFormMore" class="from-buttons">
|
{{ formMoreText }}
|
<i :class="showFormMore?'el-icon-arrow-up':'el-icon-arrow-down'"></i>
|
</el-button>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
<el-row>
|
<el-button
|
type="primary"
|
class="add-btn"
|
size="small"
|
icon="el-icon-circle-plus-outline"
|
@click="showAddDialog = true"
|
>新增申请</el-button
|
>
|
</el-row>
|
<el-row>
|
<el-table
|
v-loading="listLoading"
|
:data="tableData"
|
fit
|
stripe
|
highlight-current-row
|
max-height="530"
|
style="width: 100%;margin-top: 30px;"
|
>
|
<el-table-column label=" " type="index" align="center" width="50px"> </el-table-column>
|
<el-table-column prop="unifiedsocialcreditcode" label="统一社会信用码" width="180"> </el-table-column>
|
<el-table-column prop="companybusinessregistration" label="合作方名称" width="180"> </el-table-column>
|
<el-table-column prop="flowstatus" label="合作方状态" width="100"> </el-table-column>
|
<el-table-column prop="phasename" label="当前流程阶段" width="180"> </el-table-column>
|
<el-table-column prop="cooperationmode" label="合作模式" width="180"> </el-table-column>
|
<el-table-column prop="channelareaname" label="合作方归属地区" width="180"> </el-table-column>
|
<el-table-column prop="inputdate" label="准入时间" width="180"> </el-table-column>
|
<el-table-column prop="inputuser" label="准入人" width="180"> </el-table-column>
|
<el-table-column prop="takeouttime" label="准出时间" width="180"> </el-table-column>
|
<el-table-column prop="takeoutusername" label="准出人" width="180"> </el-table-column>
|
<el-table-column prop="lastupdatetime" label="上次修改时间" width="180"> </el-table-column>
|
<el-table-column prop="lastupdateuser" label="上次修改用户" width="180"> </el-table-column>
|
<el-table-column prop="curinputuser" label="当前申请人" width="180"> </el-table-column>
|
<el-table-column label="申请管理" fixed="right" width="150">
|
<!-- <template slot-scope="scope">
|
<el-button v-if="scope.row.opertion.detail" type="text" size="small" @click="handleDetails(scope.row)"
|
>详情</el-button
|
>
|
<el-button
|
v-if="scope.row.opertion.cancelApply"
|
type="text"
|
size="small"
|
@click="handleCancel(scope.row)"
|
>取消申请</el-button
|
>
|
</template> -->
|
<template slot-scope="scope">
|
<!-- style="margin:0 20px 0 0" -->
|
<!-- 默认显示第一个 -->
|
<el-button
|
type="text"
|
@click="handler(scope.row,scope.row.btns[0])"
|
>{{scope.row.btns[0]}}</el-button>
|
<!-- 只有两个按钮时默认显示 -->
|
<el-button
|
type="text"
|
@click="handler(scope.row,scope.row.btns[1])"
|
v-if="scope.row.btns.length === 2"
|
>{{scope.row.btns[1]}}</el-button>
|
<el-popover
|
:ref="scope.$index"
|
placement="bottom"
|
@show="scope.row.isSwitch=true;$set(tableData,scope.$index,scope.row)"
|
@hide="scope.row.isSwitch=false;$set(tableData,scope.$index,scope.row)"
|
trigger="hover"
|
popper-class="custom_popper"
|
v-if="scope.row.btns.length !== 2"
|
>
|
<div style="text-align: center; margin: 2px 0">
|
<el-button
|
type="text"
|
style="padding:0"
|
v-for="(item,index) in scope.row.btns"
|
:key="index"
|
v-show="index!=0"
|
@click="scope._self.$refs[scope.$index].doClose();handler(scope.row,item)"
|
>{{item}}</el-button>
|
</div>
|
<!-- 只有一个按钮时置灰 -->
|
<el-button style="margin-left:20px" type="text" slot="reference" :disabled="scope.row.btns.length<2">
|
更多
|
<i style="font-size:14px"
|
:class="[{'el-icon-arrow-down':!scope.row.isSwitch && scope.row.btns.length>2},{'el-icon-arrow-up':scope.row.isSwitch}]"
|
></i>
|
</el-button>
|
</el-popover>
|
</template>
|
</el-table-column>
|
</el-table>
|
<pagination
|
v-show="total > 0"
|
:total="total"
|
:page.sync="listQuery.currentPage"
|
:limit.sync="listQuery.pageSize"
|
@pagination="initTable"
|
/>
|
</el-row>
|
</el-main>
|
</el-container>
|
<add-dialog :show-dialog.sync="showAddDialog"></add-dialog>
|
<OperateSuccessTip :content="contentTip.cancel" v-if="isShowCancel"/>
|
</div>
|
</template>
|
|
<script>
|
import Pagination from '@/components/Pagination'
|
import {
|
qryChannelAdmitInList,
|
qryEnpDetailParams,
|
channelTakeOut,
|
channelCancelApply,
|
channelRecallApply,
|
addChannelChangeApply,
|
channelApplyAgain
|
} from '@/api/area/partner'
|
import AddDialog from './AddDialog'
|
import SearchSelect from './SearchSelect'
|
import OperateSuccessTip from '@/views/area/components/operateSuccessTip'
|
export default {
|
components: { SearchSelect, Pagination, AddDialog,OperateSuccessTip },
|
data: function() {
|
return {
|
showAddDialog: false,
|
form: {
|
unifiedsocialcreditcode: '',
|
companybusinessregistration: '',
|
flowstatuArray: [],
|
phaseNoArray: [],
|
cooperationmodeArray: [],
|
channelareanameArray: [],
|
inputUser: '',
|
},
|
formMoreText: '展开',
|
showFormMore: false,
|
// 分页
|
listLoading: true,
|
tableData: [],
|
total: 0,
|
listQuery: {
|
currentPage: 1,
|
pageSize: 10
|
},
|
powerControl:{
|
addApply: false, // 新增申请
|
qryChannelAdmitInDetailAndDeal: false, // 继续处理
|
qryChannelAdmitInDetail: false, // 详情
|
addChannelChangeApply: false, // 变更申请
|
channelCancelApply: false, // 取消申请
|
channelRecallApply: false, // 撤回申请
|
channelApplyAgain: false, // 重新申请
|
channelTakeOut: false, // 准出
|
},
|
isShowCancel: false, // 取消成功展示
|
contentTip: {
|
cancel: '取消成功'
|
}
|
}
|
},
|
created() {
|
this.initTable()
|
},
|
mounted() {
|
if (this.window.location.host.indexOf('236') != -1 || this.window.location.host.indexOf('localhost') != -1) {
|
this.powerControl.addApply = this.window.top._server_addChannelLoan = true
|
this.powerControl.qryChannelAdmitInDetailAndDeal = this.window.top._server_qryChannelAdmitInDetailAndDeal = true
|
this.powerControl.qryChannelAdmitInDetail = this.window.top._server_qryChannelAdmitInDetail = true
|
this.powerControl.addChannelChangeApply = this.window.top._server_addChannelChangeApply = true
|
this.powerControl.channelCancelApply = this.window.top._server_channelCancelApply = true
|
this.powerControl.channelRecallApply = this.window.top._server_channelRecallApply = true
|
this.powerControl.channelApplyAgain = this.window.top._server_channelApplyAgain = true
|
this.powerControl.channelTakeOut = this.window.top._server_channelTakeOut = true
|
} else {
|
this.powerControl.addApply = this.window.top._server_addChannelLoan
|
this.powerControl.qryChannelAdmitInDetailAndDeal = this.window.top._server_qryChannelAdmitInDetailAndDeal
|
this.powerControl.qryChannelAdmitInDetail = this.window.top._server_qryChannelAdmitInDetail
|
this.powerControl.addChannelChangeApply = this.window.top._server_addChannelChangeApply
|
this.powerControl.channelCancelApply = this.window.top._server_channelCancelApply
|
this.powerControl.channelRecallApply = this.window.top._server_channelRecallApply
|
this.powerControl.channelApplyAgain = this.window.top._server_channelApplyAgain
|
this.powerControl.channelTakeOut = this.window.top._server_channelTakeOut
|
}
|
},
|
methods: {
|
initTable() {
|
this.listLoading = true
|
let params = Object.assign(this.listQuery, this.form)
|
qryChannelAdmitInList(params).then(res => {
|
res.result.records.map(item => {
|
for (let key in item) {
|
if (item[key] === '') {
|
item[key] = '--'
|
}
|
}
|
})
|
this.tableData = res.result.records
|
this.showBtn(this.tableData)
|
this.total = res.result.total
|
this.listLoading = false
|
})
|
},
|
handleFormMore() {
|
this.showFormMore = !this.showFormMore
|
this.showFormMore ? (this.formMoreText = '收起') : (this.formMoreText = '展开')
|
},
|
handleSubmit() {
|
this.listQuery.currentPage = 1
|
this.initTable()
|
},
|
handleFormReset() {
|
this.form.unifiedsocialcreditcode = ''
|
this.form.companybusinessregistration = ''
|
this.form.flowstatuArray = []
|
this.form.phaseNoArray = []
|
this.form.cooperationmodeArray = []
|
this.form.channelareanameArray = []
|
this.form.inputUser = ''
|
// this.$refs['form'].resetFields()
|
},
|
// 列表更多处理
|
// 处理列表各种操作管理
|
handler(row, key) {
|
switch (key) {
|
case '继续处理':
|
this.handleContinue(row)
|
break
|
case '详情':
|
this.handleDetails(row)
|
break
|
case '变更申请':
|
this.handleChangeDetails(row)
|
break
|
case '取消申请':
|
this.handleCancel(row)
|
break
|
case '撤回申请':
|
this.handleWithdrawal(row)
|
break
|
case '重新申请':
|
this.handleReset(row)
|
break
|
case '准出':
|
this.handleTakeOut(row)
|
break
|
default:
|
break
|
}
|
},
|
// 排序展示列表需要的按钮
|
showBtn(array) {
|
// 给每一行数据天年btns属性
|
array.forEach(val => {
|
val.btns = []
|
val.opertion.continueApply==1 && this.powerControl.qryChannelAdmitInDetailAndDeal ?val.btns.push('继续处理'):''
|
val.opertion.detail==1 && this.powerControl.qryChannelAdmitInDetail ?val.btns.push('详情'):''
|
val.opertion.changeRequest==1 && this.powerControl.addChannelChangeApply?val.btns.push('变更申请'):''
|
val.opertion.cancelApply==1 && this.powerControl.channelCancelApply ?val.btns.push('取消申请'):''
|
val.opertion.withdrawalApply==1 && this.powerControl.channelRecallApply ?val.btns.push('撤回申请'):''
|
val.opertion.repeatApply==1 && this.powerControl.channelApplyAgain ?val.btns.push('重新申请'):''
|
val.opertion.prompt==1 && this.powerControl.channelTakeOut ?val.btns.push('准出'):''
|
});
|
},
|
|
|
// 重新申请
|
async handleReset(row) {
|
let confirm = await this.$confirm(`请确认是否重新申请"${row.companybusinessregistration}"的申请信息!`, '重新申请确认', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
customClass: 'par_messages_box',
|
confirmButtonClass: 'par_messages_box_confirm',
|
cancelButtonClass: 'par_messages_box_cancel',
|
center: true
|
})
|
.then(() => {
|
return true
|
})
|
.catch(() => {})
|
if (confirm) {
|
let params = {
|
queryType: 1, // 0-详情,1-继续处理
|
unifiedsocialcreditcode: row.unifiedsocialcreditcode
|
}
|
let res = await qryEnpDetailParams(params)
|
let resetParams = {
|
ftserialno: res.result.ftserialno,
|
objectType: res.result.objectType,
|
objectno: res.result.objectno,
|
serialno: res.result.serialno,
|
queryType: 1
|
}
|
channelApplyAgain(resetParams).then(res => {
|
if (res.code === '00') {
|
this.$message.success('重新申请成功!')
|
this.initTable()
|
this.handleContinue(row)
|
}
|
})
|
}
|
},
|
// 继续处理
|
async handleContinue(row) {
|
let params = {
|
queryType: 1, // 0-详情,1-继续处理
|
unifiedsocialcreditcode: row.unifiedsocialcreditcode
|
}
|
row.phaseno = row.phaseno === '4000' ? '0010' : row.phaseno
|
let res = await qryEnpDetailParams(params)
|
let partnerParams = {
|
phaseno: row.phaseno,
|
serialno: res.result.serialno,
|
objectno: res.result.objectno,
|
objectType: res.result.objectType,
|
ftserialno: res.result.ftserialno,
|
unifiedsocialcreditcode: row.unifiedsocialcreditcode,
|
pageType: 'update',
|
addState: '01',
|
}
|
this.$store.commit('SET_partnerParams', partnerParams)
|
this.$router.push({ path: '/area/partner/update/info' })
|
},
|
// 打开详情
|
async handleDetails(row) {
|
let params = {
|
queryType: 0, // 0-详情,1-继续处理
|
unifiedsocialcreditcode: row.unifiedsocialcreditcode
|
}
|
let res = await qryEnpDetailParams(params)
|
let partnerParams = {
|
serialno: res.result.serialno,
|
objectno: res.result.objectno,
|
objectType: res.result.objectType,
|
ftserialno: res.result.ftserialno,
|
unifiedsocialcreditcode: row.unifiedsocialcreditcode,
|
pageType: 'details',
|
mainTain: '',
|
phaseno: '1000' // 任意
|
}
|
this.$store.commit('SET_partnerParams', partnerParams)
|
this.$router.push({ path: '/area/partner/details/info', query: { ...partnerParams } })
|
},
|
// 撤回申请
|
async handleWithdrawal(row) {
|
let confirm = await this.$confirm(`请确认是否撤回"${row.companybusinessregistration}"的申请信息!`, '撤回申请确认', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
customClass: 'par_messages_box',
|
confirmButtonClass: 'par_messages_box_confirm',
|
cancelButtonClass: 'par_messages_box_cancel',
|
center: true
|
})
|
.then(() => {
|
return true
|
})
|
.catch(() => {})
|
if (confirm) {
|
let params = {
|
queryType: 1, // 0-详情,1-继续处理
|
unifiedsocialcreditcode: row.unifiedsocialcreditcode
|
}
|
let res = await qryEnpDetailParams(params)
|
let takeoutParams = {
|
ftserialno: res.result.ftserialno,
|
objecttype: res.result.objectType,
|
objectno: res.result.objectno,
|
serialno: res.result.serialno
|
}
|
channelRecallApply(takeoutParams).then(res => {
|
if (res.code === '00') {
|
this.$message.success('撤回成功!')
|
this.initTable()
|
}
|
})
|
}
|
},
|
// 准出
|
async handleTakeOut(row) {
|
let confirm = await this.$confirm(`请确认是否准出"${row.companybusinessregistration}"的申请信息!`, '准出确认', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
customClass: 'par_messages_box',
|
confirmButtonClass: 'par_messages_box_confirm',
|
cancelButtonClass: 'par_messages_box_cancel',
|
center: true
|
})
|
.then(() => {
|
return true
|
})
|
.catch(() => {})
|
if (confirm) {
|
let params = {
|
queryType: 1, // 0-详情,1-继续处理
|
unifiedsocialcreditcode: row.unifiedsocialcreditcode
|
}
|
let res = await qryEnpDetailParams(params)
|
let takeoutParams = {
|
ftserialno: res.result.ftserialno,
|
objectType: res.result.objectType,
|
objectno: res.result.objectno,
|
serialno: res.result.serialno
|
}
|
channelTakeOut(takeoutParams).then(res => {
|
if (res.code === '00') {
|
this.$message.success('准出成功!')
|
this.initTable()
|
}
|
})
|
}
|
},
|
// 变更申请
|
async handleChangeDetails(row) {
|
let confirm = await this.$confirm(`请确认是否变更"${row.companybusinessregistration}"的申请信息!`, '变更申请确认', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
customClass: 'par_messages_box',
|
confirmButtonClass: 'par_messages_box_confirm',
|
cancelButtonClass: 'par_messages_box_cancel',
|
center: true
|
})
|
.then(() => {
|
return true
|
})
|
.catch(() => {
|
return false
|
})
|
if (confirm) {
|
let params = {
|
unifiedsocialcreditcode: row.unifiedsocialcreditcode
|
}
|
this.listLoading = true
|
let res = await addChannelChangeApply(params)
|
let partnerParams = {
|
serialno: res.result.serialNo,
|
objectno: res.result.objectno,
|
objectType: res.result.objecttype,
|
ftserialno: res.result.ftSerialNo,
|
unifiedsocialcreditcode: row.unifiedsocialcreditcode,
|
pageType: 'update',
|
likePhaseno: true
|
}
|
this.$store.commit('SET_partnerParams', partnerParams)
|
this.listLoading = false
|
this.$router.push({ path: '/area/partner/update/info' })
|
}
|
},
|
// 取消申请
|
async handleCancel(row) {
|
let confirm = await this.$confirm(`请确认是否取消"${row.companybusinessregistration}"的申请信息!`, '取消申请确认', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
customClass: 'par_messages_box',
|
confirmButtonClass: 'par_messages_box_confirm',
|
cancelButtonClass: 'par_messages_box_cancel',
|
center: true
|
})
|
.then(() => {
|
return true
|
})
|
.catch(() => {
|
return false
|
})
|
if (confirm) {
|
let params = {
|
queryType: 1, // 0-详情,1-继续处理
|
unifiedsocialcreditcode: row.unifiedsocialcreditcode
|
}
|
let res = await qryEnpDetailParams(params)
|
let takeoutParams = {
|
ftserialno: res.result.ftserialno,
|
objectType: res.result.objectType,
|
objectno: res.result.objectno,
|
serialno: res.result.serialno
|
}
|
channelCancelApply(takeoutParams).then(res => {
|
if (res.code === '00') {
|
// this.$message.success('取消成功!')
|
if (timer) {
|
clearTimeout(timer)
|
}
|
this.isShowCancel = !this.isShowCancel
|
let timer = setTimeout(() => {
|
this.isShowCancel = !this.isShowCancel
|
clearTimeout(timer)
|
this.initTable()
|
},1000)
|
}
|
})
|
}
|
}
|
}
|
}
|
</script>
|
|
<style lang="stylus">
|
#area
|
.el-dropdown-link
|
cursor pointer
|
color #409EFF
|
.el-dropdown-link
|
cursor pointer
|
color #409EFF
|
.el-icon-arrow-down
|
font-size 12px
|
// messagesBox样式
|
.par_messages_box.el-message-box--center
|
width 458px
|
height 173px
|
.el-message-box__header
|
padding-top 40px
|
.el-message-box__title
|
// font-family PingFangSC-Medium,PingFangSC
|
font-size 18px
|
font-width bold
|
height 25px
|
line-height 25px
|
.el-message-box__headerbtn
|
top 20px
|
right 20px
|
background rgba(245,245,245,1)
|
.el-message-box__content
|
.el-message-box__message
|
p
|
height 20px
|
line-height 20px
|
font-size 14px
|
font-weight 400
|
color rgba(101,101,101,1)
|
// font-family PingFangSC-Medium,PingFangSC
|
.el-message-box__btns
|
padding-top 30px
|
.par_messages_box_confirm
|
margin-left 40px
|
background-color rgba(0,129,240,1)
|
border-radius 4px
|
color rgba(255,255,255,1)
|
.par_messages_box_cancel
|
border-radius 4px
|
border:1px solid rgba(204,204,204,1)
|
color rgba(85,85,85,1)
|
.par_messages_box_cancel,.par_messages_box_confirm
|
padding 0
|
width 120px
|
height 30px
|
span
|
font-size 14px
|
height 20px
|
font-weight 400
|
line-height 20px
|
</style>
|