<template>
|
<div>
|
<el-dialog title="总公司已审批通过" :visible.sync="show" center width="1000px">
|
<el-table
|
v-loading="listLoading"
|
:data="tableData"
|
border
|
fit
|
highlight-current-row
|
size="small"
|
@current-change="handleCheckbox"
|
>
|
<el-table-column label=" " width="40">
|
<template slot-scope="scope">
|
<el-checkbox v-model="scope.row.checked"></el-checkbox>
|
</template>
|
</el-table-column>
|
<el-table-column label=" " type="index" align="center" width="40px"> </el-table-column>
|
<el-table-column prop="balanceaccount" label="收款对公账号" width="140"> </el-table-column>
|
<el-table-column prop="balancefictitiousaccount" label="结算虚拟号" width="180"> </el-table-column>
|
<el-table-column prop="enterprisename" label="总公司企业工商登记名"> </el-table-column>
|
<el-table-column prop="organizationcode" label="总公司组织机构代码" width="180"> </el-table-column>
|
<el-table-column prop="reditcode" label="总公司统一社会信用代码" width="180"> </el-table-column>
|
</el-table>
|
<pagination
|
v-show="total > 1"
|
:total="total"
|
:page.sync="listQuery.currentPage"
|
:limit.sync="listQuery.pageSize"
|
@pagination="initTable"
|
/>
|
<span slot="footer" class="dialog-footer">
|
<el-button @click="show = false" size="mini">返回</el-button>
|
<el-button type="primary" size="mini" @click="handleSubmit">确定</el-button>
|
</span>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
import { qryHeadOfficeEnpList } from '@/api/area/enterprise'
|
import Pagination from '@/components/Pagination'
|
export default {
|
props: ['showDialog'],
|
components: { Pagination },
|
data: function() {
|
return {
|
form: {
|
enterprisename: '',
|
organizationcode: '',
|
reditcode: '',
|
},
|
// 分页
|
tableData: [],
|
listLoading: true,
|
total: 0,
|
listQuery: {
|
currentPage: 1,
|
pageSize: 500
|
}
|
}
|
},
|
created() {
|
this.initTable()
|
},
|
computed: {
|
show: {
|
get() {
|
return this.showDialog
|
},
|
set(newVal) {
|
this.$emit('update:showDialog', newVal)
|
}
|
}
|
},
|
methods: {
|
async initTable() {
|
let params = {}
|
Object.assign(params, this.listQuery)
|
let res = await qryHeadOfficeEnpList(params)
|
this.tableData = res.result.records
|
this.total = res.result.total
|
this.tableData.forEach(item => {
|
item.checked = false
|
})
|
this.listLoading = false
|
},
|
handleSubmit() {
|
this.$emit('setInputValue', this.form)
|
this.show = false
|
},
|
handleCheckbox(row) {
|
if (row !== null) {
|
this.tableData.forEach((item, index) => {
|
if (item.reditcode !== row.reditcode) {
|
this.$set(this.tableData[index], 'checked', false)
|
} else {
|
this.$set(this.tableData[index], 'checked', true)
|
this.form.enterprisename = item.enterprisename
|
this.form.organizationcode = item.organizationcode
|
this.form.reditcode = item.reditcode
|
}
|
})
|
}
|
}
|
}
|
}
|
</script>
|
|
<style scoped></style>
|