zhaoxiaoqiang1
2026-01-04 f1d30d03186c79ca2cbcfe60d6d2ce7d73fba97b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<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>