jiangping
2025-06-09 2a86bc17a8c096eee2a445bc109663649369dbc6
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<template>
    <TableLayout :permissions="['business:settleclaims:query']">
        <!-- 搜索表单 -->
        <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
            <el-form-item label="报案号" prop="code" >
                <el-input v-model="searchForm.code" clearable placeholder="请输入" style="width: 150px" @keypress.enter.native="search"></el-input>
            </el-form-item>
          <el-form-item label="报案人" prop="informantName">
            <el-input v-model="searchForm.informantName" clearable placeholder="请输入" style="width: 150px" @keypress.enter.native="search"></el-input>
          </el-form-item>
            <el-form-item label="出险人姓名" prop="memberName">
                <el-input v-model="searchForm.memberName" clearable placeholder="请输入" style="width: 150px" @keypress.enter.native="search"></el-input>
            </el-form-item>
            <el-form-item label="出险人身份证" prop="memberIdcardNo">
                <el-input v-model="searchForm.memberIdcardNo" clearable placeholder="请输入" style="width: 150px" @keypress.enter.native="search"></el-input>
            </el-form-item>
            <el-form-item label="保险方案" prop="baseSolutionId">
                <el-select v-model="searchForm.baseSolutionId"  clearable filterable placeholder="请选择" style="width: 150px" @change="search">
                    <el-option
                        v-for="item in solutionList"
                        :key="item.baseId"
                        :label="item.name"
                        :value="item.baseId">
                    </el-option>
                </el-select>
            </el-form-item>
          <el-form-item label="保单号" prop="applyCode">
            <el-input v-model="searchForm.applyCode" clearable placeholder="请输入" style="width: 150px" @keypress.enter.native="search"></el-input>
          </el-form-item>
             <el-form-item label="案件状态" prop="status">
                <el-select v-model="searchForm.status" clearable placeholder="请选择" style="width: 150px" @change="search">
                    <el-option label="暂存中" value="0"></el-option>
                    <el-option label="已报案" value="1"></el-option>
<!--                    <el-option label="待立案" value="2"></el-option>-->
                    <el-option label="已立案" value="3"></el-option>
                    <el-option label="立案退回" value="4"></el-option>
<!--                    <el-option label="待受理" value="5"></el-option>-->
                    <el-option label="拒绝受理" value="6"></el-option>
                    <el-option label="商议待审批" value="7"></el-option>
                    <el-option label="商议审批拒绝" value="8"></el-option>
                    <el-option label="已受理" value="9"></el-option>
                    <el-option label="待核赔" value="10"></el-option>
                    <el-option label="已核赔" value="11"></el-option>
                    <el-option label="待结案" value="12"></el-option>
                    <el-option label="已结案" value="13"></el-option>
                    <el-option label="已撤案" value="14"></el-option>
                </el-select>
            </el-form-item>
          <el-form-item label="报案时间" prop="createDateStr">
            <el-date-picker
                style="width: 150px"
                clearable
                v-model="searchForm.createDateStr"
                @change="search"
                type="date"
                placeholder="请选择"
                value-format="yyyy-MM-dd" >
            </el-date-picker>
          </el-form-item>
            <section>
                <el-button type="primary" @click="search">搜索</el-button>
                <el-button @click="reset">重置</el-button>
            </section>
        </el-form>
        <!-- 表格和分页 -->
        <template v-slot:table-wrap>
            <ul class="toolbar" v-if="userInfo.type === 1">
                <li><el-button type="primary" @click="$refs.onlineReporting.open('提交报案')">在线报案</el-button></li>
            </ul>
            <el-table
                v-loading="isWorking.search"
                :data="tableData.list"
                stripe>
<!--                <el-table-column label="序号" width="80px">-->
<!--                    <template slot-scope="scope">-->
<!--                        <span>{{scope.$index + 1}}</span>-->
<!--                    </template>-->
<!--                </el-table-column>-->
                <el-table-column prop="code" label="报案号" min-width="100px"></el-table-column>
                <el-table-column prop="informantName" label="报案人" min-width="100px"></el-table-column>
                <el-table-column prop="createDate" label="报案时间" min-width="150px"></el-table-column>
                <el-table-column prop="memberName" label="出险人" min-width="100px"></el-table-column>
                <el-table-column prop="memberIdcardNo" label="身份证号" min-width="180px"></el-table-column>
                <el-table-column prop="duName" label="用人遣单位" min-width="180px"></el-table-column>
                <el-table-column prop="applyCode" label="保单号" min-width="100px"></el-table-column>
                <el-table-column prop="solutionName" label="保险方案" min-width="180px"></el-table-column>
                <el-table-column prop="money" label="赔付金额(元)" min-width="100px">
                    <template slot-scope="{row}">
                        <span style="color: #f95601;cursor: pointer" v-if="[11,12,13].includes(row.status)" :title="'主赔付:'+(row.hpAccount||0) +'元 其他赔付:'+(row.hpOtherAccount||0) +'元'">{{(row.hpAccount||0) +(row.hpOtherAccount ||0 ) }}</span>
                        <span v-else>-</span>
                    </template>
                </el-table-column>
              <el-table-column prop="statusName" label="案件状态" min-width="100px">
                <template slot-scope="{row}">
                  <span :class="'settle-status'+row.status">{{row.statusName}}</span>
                </template>
              </el-table-column>
 
<!--                <el-table-column prop="baoxianStartTime" label="保险生效起期" min-width="100px"></el-table-column>-->
<!--                <el-table-column prop="isRisk" label="是否风险案件" min-width="100px">-->
<!--                  <template slot-scope="{row}"> <span style="color: red" v-if="row.isRisk === 1">风险案件</span></template>-->
<!--                </el-table-column>-->
<!--                <el-table-column prop="createDate" label="报案时间" min-width="100px"></el-table-column>-->
                <el-table-column
                    v-if="containPermissions(['business:settleclaims:update', 'business:settleclaims:delete'])"
                    label="操作"
                    min-width="200"
                    fixed="right">
                    <template slot-scope="{row}">
                        <el-button
                            type="text"
                            @click="$refs.operaSettleClaimsWindow.open('报案理赔详情', row.id)"
                            v-if="row.status !== 0">
                            查看详情
                        </el-button>
                        <el-button
                            type="text"
                            @click="$refs.onlineReporting.open('编辑报案', row.id)"
                            v-if="[0,1,2,4,5,7].includes(row.status) && userInfo.type === 1">
                            编辑
                        </el-button>
                        <el-button
                            type="text"
                            @click="revoke(row.id)"
                            v-if="[1,2,3,4,5,9,7,10].includes(row.status) && userInfo.type === 1">
                            撤销
                        </el-button>
                        <el-button type="text" @click="deleRow(row.id)" v-if="row.status === 0">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <pagination
                @size-change="handleSizeChange"
                @current-change="handlePageChange"
                :pagination="tableData.pagination">
            </pagination>
        </template>
        <!-- 详情 -->
        <OperaSettleClaimsWindow ref="operaSettleClaimsWindow" @success="handlePageChange"/>
        <!--    在线报案    -->
        <onlineReporting ref="onlineReporting" @success="handlePageChange" />
    </TableLayout>
</template>
 
<script>
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaSettleClaimsWindow from '@/components/business/OperaSettleClaimsWindow'
import onlineReporting from '@/components/enterprise/onlineReporting'
import { all as solutionAll } from '@/api/business/solutions'
import { returnSettle } from '@/api/business/settleRisk'
import { pageAll as companyAll } from '@/api/business/company'
import { dele } from '@/api/business/settleClaims'
import { mapState } from 'vuex'
export default {
  name: 'SettleClaims',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaSettleClaimsWindow, onlineReporting },
  data () {
    return {
      // 搜索
      solutionList: [],
      companyList: [],
      searchForm: {
        baseSolutionId: '',
        companyId: '',
        duName: '',
        createDateStr: null,
        memberName: '',
        applyCode: null,
        memberIdcardNo: '',
        status: '',
        informantName: ''
      }
    }
  },
  computed: {
    ...mapState(['userInfo'])
  },
  created () {
    this.config({
      module: '理赔申请表',
      api: '/business/settleClaims',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.search()
    this.loadSelectList()
  },
  methods: {
    // 撤销
    revoke (id) {
      this.$confirm('撤销后,案件直接结束,无法继续进行理赔操作!', '是否撤销报案?', {
        confirmButtonText: '确定撤销',
        cancelButtonText: '我再想想',
        type: 'warning'
      }).then(() => {
        returnSettle({ id })
          .then(res => {
            this.search()
          })
      }).catch(() => {
 
      })
    },
    loadSelectList () {
      solutionAll({ dataType: 0 }).then(res => {
        this.solutionList = res
      }).catch(err => {
      })
    },
    deleRow (id) {
      this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        dele(id)
          .then(res => {
            this.$message.success('删除成功')
            this.search()
          })
      }).catch(() => {
 
      })
    }
 
  }
}
</script>