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
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
<!--
 * @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>