<template>
|
<div class="enterprise">
|
<el-dialog :visible.sync="visible" :close-on-click-modal='false' @close="closeDialog" center>
|
<el-form ref="form" :model="form" label-width="120px" inline size="small">
|
<el-form-item label="企业工商登记名" style="margin-right:30px">
|
<el-input v-model="form.enterprisenameLike"></el-input>
|
</el-form-item>
|
<el-form-item label="">
|
<el-button type="primary" @click="handleSearch(form)">查询</el-button>
|
</el-form-item>
|
</el-form>
|
<el-table stripe highlight-current-row :data="enterpriseData" :header-cell-style="{background:'#f5f5f5',color:'#222222'}">
|
<el-table-column label="" width="50">
|
<template slot-scope="scope">
|
<el-radio v-model="enterprise" :label="scope.$index" @change="getCurrentRow(scope.row,scope.$index)"> </el-radio>
|
</template>
|
</el-table-column>
|
<el-table-column prop="reditcode" label="社会统一信用代码"></el-table-column>
|
<el-table-column prop="enterprisename" label="企业工商登记名"></el-table-column>
|
</el-table>
|
<el-pagination
|
background
|
@size-change="handleSizeChange"
|
@current-change="handleCurrentChange"
|
:current-page.sync="currentPage"
|
:page-sizes="[10, 20, 30, 40, 50]"
|
:page-size="10"
|
layout="prev, pager, next, sizes, jumper"
|
:total="total"
|
></el-pagination>
|
<span slot="footer" class="dialog-footer">
|
<el-button plain @click="closeDialog">返回</el-button>
|
<el-button type="primary" @click="submit">确定</el-button>
|
</span>
|
</el-dialog>
|
</div>
|
</template>
|
<script>
|
import {
|
qryEntInfoList
|
} from '@/api/product'
|
export default {
|
props: ['enterpriseVisible'],
|
data () {
|
return {
|
currentPage:1,
|
total:0,
|
enterpriseData:[],
|
selEnterpriseData:'',
|
enterprise:'',
|
form:{
|
currentPage:1,
|
pageSize:10,
|
flowstatus:"1000",
|
enterpriseaccesstype:"01",
|
enterprisenameLike:''
|
}
|
}
|
},
|
computed: {
|
visible:{
|
get(){
|
return this.enterpriseVisible
|
},
|
set(){},
|
}
|
},
|
created () {
|
this.qryEntInfoList()
|
},
|
methods: {
|
async qryEntInfoList(){
|
const { result } = await qryEntInfoList(this.form)
|
const { records, total } = result
|
this.enterpriseData = records
|
this.total = total
|
},
|
// 模糊查询
|
handleSearch(form){
|
this.qryEntInfoList();
|
},
|
//设置每页多少条
|
handleSizeChange(val) {
|
this.form.pageSize = val;
|
this.qryEntInfoList();
|
},
|
//查询当前页
|
handleCurrentChange(val) {
|
this.enterprise = ''
|
this.form.currentPage = val;
|
this.qryEntInfoList();
|
},
|
// 获取当前选中行
|
getCurrentRow(row,index){
|
this.enterprise = index
|
this.selEnterpriseData = row
|
},
|
closeDialog(){
|
this.$emit('closeEnterprise',false)
|
},
|
submit(){
|
this.$emit('sendEnterpriseData',this.selEnterpriseData)
|
this.$emit('closeEnterprise',false)
|
}
|
}
|
}
|
</script>
|
<style lang="stylus">
|
.enterprise
|
.el-dialog
|
width auto
|
max-width calc(100% - 180px)
|
min-width 850px
|
max-height 100%
|
overflow hidden
|
margin 0 !important
|
position absolute
|
left 50%
|
top 50%
|
transform translate(-50%,-50%)
|
.el-dialog__header
|
padding 0
|
.el-dialog__body
|
padding 20px
|
.el-dialog__footer
|
padding 0 20px 20px
|
.el-button
|
width: 120px
|
font-size: 14px
|
line-height: 20px
|
padding: 5px 0
|
</style>
|