MrShi
2024-01-29 7e7d01bc2c64ef12429845c4130d449439d4be33
Mr.Shi
已添加1个文件
已修改5个文件
279 ■■■■ 文件已修改
company/.env.development 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/api/business/insuranceApply.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaInsuranceApplyWindow.vue 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/OperaInsuranceApplyWindow.vue 100 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/applyReturn.vue 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/enterprise/insuranceApply.vue 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/.env.development
@@ -13,6 +13,6 @@
# VUE_APP_API = 'http://192.168.0.134:10023/'
VUE_APP_API = 'http://localhost:10023/'
#VUE_APP_API = 'http://localhost:10023/'
# VUE_APP_API = 'http://192.168.0.134:10023/'
company/src/api/business/insuranceApply.js
@@ -42,6 +42,11 @@
    return request.post('/business/insuranceApply/getCountCyclePriceVO', data)
}
// ç”³è¯·è®°å½•状态处理
export function applyOpt (data) {
    return request.post('/business/insuranceApply/applyOpt', data)
}
export function exportDetailExcel (data) {
    return request.post('/business/insuranceApply/exportDetailExcel', data, {
        trim: true,
@@ -59,3 +64,13 @@
        trim: true
    })
}
// åˆ—表查询
export function findList (data) {
    return request.post('/business/applyDetail/findList', data)
}
// ä¿®æ”¹
export function updateData (data) {
    return request.post('/business/insuranceApply/updateData', data)
}
company/src/components/business/OperaInsuranceApplyWindow.vue
@@ -15,16 +15,27 @@
                        <span>提交时间:{{ model.createDate }}</span>
                    </div>
                  <div class="desc_item_label_right">
                    <el-button type="primary" @click="$refs.InsuranceDetails.open('投保详情单',model,0)">导出详单</el-button>
                    <el-button v-if="model.status == 2 ||model.status == 3 ||model.status == 5  ||model.status == 7 ||model.status == 8  "  type="primary"  @click="viewToubaodan">查看投保单</el-button>
                    <el-button v-if="model.status == 5  "  type="primary"  @click="viewBaoxiandan">查看保险单</el-button>
                    <el-button v-if="model.status == 10 " type="primary"  @click="$refs.OperaInsuranceApplyCheckWindow.open('上传投保单',model,2)">上传投保单</el-button>
                    <el-button v-if="model.status == 3 "  type="primary"  @click="$refs.OperaInsuranceApplyCheckWindow.open('上传保险单',model,3)">上传保险单</el-button>
                    <el-button v-if="model.status == 2 "  type="primary"  @click="goSign">企业签章</el-button>
                    <el-button  v-if="model.status == 6 || model.status == 7|| model.status == 8" type="primary"  @click="$refs.OperaInsuranceApplyCheckWindow.open('驳回退回申请',model,5)">驳回退回申请</el-button>
                    <el-button v-if="model.status == 0 "  type="primary" @click="$refs.InsuranceDetails.open('投保审核',model,1)">投保审核</el-button>
                    <el-button v-if="model.status != 5 && model.status != 4 && model.status != 1" type="danger"  @click="$refs.OperaInsuranceApplyCheckWindow.open('退回投保',model,1)">退回投保</el-button>
                    <el-button v-if="model.status == 5 "  type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.open('修改保险单',model,4)">修改保险单</el-button>
                      <template v-if="userInfo.type === 1">
                          <el-button v-if="[0, 2, 3, 10].includes(model.status)" type="danger" @click="$refs.applyReturn.open('申请退回', {id: dataId})">申请退回</el-button>
                          <el-button v-if="model.status == 4" type="primary" @click="$refs.OperaInsuranceApply.open('投保申请', {id: dataId})">再次投保</el-button>
                          <el-button type="primary" @click="$refs.InsuranceDetails.open('投保详情单',model,0)">导出详单</el-button>
                          <el-button v-if="[2, 3, 5, 7, 8].includes(model.status)" type="primary" @click="viewToubaodan">查看投保单</el-button>
                          <el-button v-if="model.status == 5" type="primary" @click="viewBaoxiandan">查看保险单</el-button>
                          <el-button v-if="model.status == 2" type="primary" @click="goSign">签署投保单</el-button>
                      </template>
                        <template v-else>
                            <el-button type="primary" @click="$refs.InsuranceDetails.open('投保详情单',model,0)">导出详单</el-button>
                            <el-button v-if="[2, 3, 5, 7, 8].includes(model.status)" type="primary" @click="viewToubaodan">查看投保单</el-button>
                            <el-button v-if="model.status == 5" type="primary" @click="viewBaoxiandan">查看保险单</el-button>
                            <el-button v-if="model.status == 10" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('上传投保单',model,2)">上传投保单</el-button>
                            <el-button v-if="model.status == 3" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('上传保险单',model,3)">上传保险单</el-button>
                            <el-button  v-if="model.status == 6 || model.status == 7|| model.status == 8" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('驳回退回申请',model,5)">驳回退回申请</el-button>
                            <el-button v-if="model.status == 0" type="primary" @click="$refs.InsuranceDetails.open('投保审核',model,1)">投保审核</el-button>
                            <el-button v-if="model.status != 5 && model.status != 4 && model.status != 1" type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.open('退回投保',model,1)">退回投保</el-button>
                            <el-button v-if="model.status == 5" type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.open('修改保险单',model,4)">修改保险单</el-button>
                        </template>
                  </div>
                </div>
                <div class="desc_item_from">
@@ -201,7 +212,10 @@
        </div>
        <InsuranceDetails ref="InsuranceDetails" @success="successEvent" />
        <OperaInsuranceApplyCheckWindow ref="OperaInsuranceApplyCheckWindow" @success="successEvent" />
        <!--    é€€å›žæŠ•保    -->
        <!--    ä¼ä¸šç”³è¯·é€€å›ž    -->
        <applyReturn ref="applyReturn" @success="successEvent" />
        <!--    æ–°å¢žæŠ•保    -->
        <OperaInsuranceApply ref="OperaInsuranceApply" @success="successEvent" />
    </GlobalWindow>
</template>
@@ -210,12 +224,16 @@
import GlobalWindow from '@/components/common/GlobalWindow'
import InsuranceDetails from '@/components/business/InsuranceDetails'
import OperaInsuranceApplyCheckWindow from '@/components/business/OperaInsuranceApplyCheckWindow'
import applyReturn from '@/components/enterprise/applyReturn'
import {getDetail, getSignLink} from "@/api/business/insuranceApply";
import OperaInsuranceApply from '@/components/enterprise/OperaInsuranceApplyWindow'
import { mapState } from 'vuex'
import {all as solutionAll} from "@/api/business/solutions";
export default {
  name: 'OperaInsuranceApplyWindow',
  extends: BaseOpera,
  components: { GlobalWindow, InsuranceDetails ,OperaInsuranceApplyCheckWindow},
  components: { GlobalWindow, InsuranceDetails ,OperaInsuranceApplyCheckWindow, applyReturn, OperaInsuranceApply },
  data () {
    return {
      // è¡¨å•数据
@@ -263,12 +281,19 @@
          'field.id': 'id'
      })
  },
    computed: {
      ...mapState(['userInfo'])
    },
  methods: {
     open(title,target){
       this.visible=true;
       this.dataId=target.id
      this.getDetail()
        this.visible = true;
        this.title = title
        this.dataId = target.id
        this.getDetail()
     },
      handleClick(e) {
         console.log(e)
      },
    goSign(){
      getSignLink(this.dataId).then(res => {
          window.open(res)
company/src/components/enterprise/OperaInsuranceApplyWindow.vue
@@ -142,7 +142,7 @@
import importEmployees from '@/components/enterprise/importEmployees'
import confirmJobType from '@/components/enterprise/confirmJobType'
import { all } from '@/api/business/solutions'
import { create, getCountCyclePriceVO } from '@/api/business/insuranceApply'
import { create, getCountCyclePriceVO, getDetail, findList, updateData } from '@/api/business/insuranceApply'
export default {
  name: 'OperaInsuranceApplyWindow',
  extends: BaseOpera,
@@ -151,6 +151,7 @@
    return {
      form: {
          id: null,
          ID: null,
          solutionId: '',
          applyStartTime: '',
          applyEndTime: ''
@@ -187,14 +188,35 @@
          this.form.solutionId = ''
          this.form.applyStartTime = ''
          this.form.applyEndTime = ''
          this.$nextTick(() => {
              this.$refs.form.resetFields()
              this.form[this.configData['field.id']] = null
          })
          this.visible = true
          if (target && target.id) {
              this.form.id = target.id
              this.getDetails()
          } else {
              this.$nextTick(() => {
                  this.$refs.form.resetFields()
                  this.form[this.configData['field.id']] = null
              })
          }
          this.getCompany()
          this.visible = true
          this.updatePickerOptions()
      },
        // èŽ·å–æŠ•ä¿è¯¦æƒ…
        getDetails() {
            findList({ applyId: this.form.id })
                .then(res => {
                    res.forEach(item => {
                        item.idCard = item.idcardNo
                        item.fee = ''
                    })
                    this.tableData = res
                })
            getDetail(this.form.id)
                .then(res => {
                    this.form.solutionId = res.solutionId
                    this.changeSolution1(res.solutionId)
                })
        },
        getSummaries(param) {
            const { columns, data } = param
            const sums = []
@@ -245,22 +267,42 @@
                        item.idcardNo = item.idCard
                    })
                    this.isWorking = true
                    create({
                        applyDetailList: arr,
                        applyStartTime: this.form.applyStartTime,
                        applyEndTime: this.form.applyEndTime,
                        solutionId: this.form.solutionId
                    }).then(() => {
                        this.visible = false
                        this.$tip.apiSuccess('操作成功')
                        this.$emit('success')
                    })
                    .catch(e => {
                        this.$tip.apiFailed(e)
                    })
                    .finally(() => {
                        this.isWorking = false
                    })
                    if (!this.form.id) {
                        create({
                            applyDetailList: arr,
                            applyStartTime: this.form.applyStartTime,
                            applyEndTime: this.form.applyEndTime,
                            solutionId: this.form.solutionId
                        }).then(() => {
                            this.visible = false
                            this.$tip.apiSuccess('操作成功')
                            this.$emit('success')
                        })
                            .catch(e => {
                                this.$tip.apiFailed(e)
                            })
                            .finally(() => {
                                this.isWorking = false
                            })
                    } else {
                        updateData({
                            id: this.form.id,
                            applyDetailList: arr,
                            applyStartTime: this.form.applyStartTime,
                            applyEndTime: this.form.applyEndTime,
                            solutionId: this.form.solutionId
                        }).then(() => {
                            this.visible = false
                            this.$tip.apiSuccess('操作成功')
                            this.$emit('success')
                        }).catch(e => {
                            this.$tip.apiFailed(e)
                        })
                        .finally(() => {
                            this.isWorking = false
                        })
                    }
                }
            })
        },
@@ -328,6 +370,7 @@
      },
      // åˆ‡æ¢æ–¹æ¡ˆ
      changeSolution(e) {
          this.tableData = []
          this.company.forEach(item => {
              if (item.id === e) {
                  // this.price = item.price
@@ -339,6 +382,19 @@
              item.fee = this.price
          })
      },
        // åˆ‡æ¢æ–¹æ¡ˆ
        changeSolution1(e) {
            this.company.forEach(item => {
                if (item.id === e) {
                    // this.price = item.price
                    this.item = item
                    this.updatePickerOptions()
                }
            })
            this.tableData.forEach(item => {
                item.fee = this.price
            })
        },
      dele(index) {
          this.tableData.splice(index, 1)
      },
company/src/components/enterprise/applyReturn.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,72 @@
<template>
    <GlobalWindow
        :title="title"
        width="40%"
        :visible.sync="visible"
        :confirm-working="isWorking"
        @confirm="confirm"
    >
        <el-form ref="form" :model="form" label-width="130px">
            <el-form-item label="填写申请说明">
                <el-input type="textarea" v-model="form.remark"></el-input>
            </el-form-item>
        </el-form>
    </GlobalWindow>
</template>
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import { applyOpt } from '@/api/business/insuranceApply'
    export default {
        name: 'applyReturn',
        extends: BaseOpera,
        components: { GlobalWindow },
        data () {
            return {
                // è¡¨å•数据
                form: {
                    id: null,
                    remark: ''
                }
            }
        },
        created () {
            this.config({
                api: '/business/insurance',
                'field.id': 'id'
            })
        },
        methods: {
            open (title, target) {
                this.title = title
                this.visible = true
                this.$nextTick(() => {
                    this.$refs.form.resetFields()
                    this.form[this.configData['field.id']] = null
                })
                this.$nextTick(() => {
                    for (const key in this.form) {
                        this.form[key] = target[key]
                    }
                })
            },
            confirm() {
                this.isWorking = true
                applyOpt({ applyId: this.form.id, optIllustration: this.form.remark, optType: 1 })
                    .then(res => {
                        this.visible = false
                        this.$tip.apiSuccess('操作成功')
                        this.$emit('success')
                    })
                    .catch(e => {
                        this.$tip.apiFailed(e)
                    })
                    .finally(() => {
                        this.isWorking = false
                    })
            }
        }
    }
</script>
company/src/views/enterprise/insuranceApply.vue
@@ -2,12 +2,16 @@
    <TableLayout :permissions="['business:insuranceapply:query']">
        <!-- æœç´¢è¡¨å• -->
        <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
            <el-form-item label="状态" prop="status">
                <el-select v-model="searchForm.status" placeholder="请选择" @change="search">
            <el-form-item label="状态" prop="statusCollect">
                <el-select v-model="searchForm.statusCollect" placeholder="请选择" @change="search">
                    <el-option label="待审批" value="0"></el-option>
                    <el-option label="待签署" value="2"></el-option>
                    <el-option label="已签署" value="3"></el-option>
                    <el-option label="已撤销" value="7"></el-option>
                    <el-option label="待出单" value="1"></el-option>
                    <el-option label="待签章" value="7"></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-select>
            </el-form-item>
            <el-form-item label="保险方案" prop="baseSolutionId">
@@ -51,14 +55,7 @@
                        <span>{{scope.$index + 1}}</span>
                    </template>
                </el-table-column>
                <el-table-column prop="status" label="状态">
                    <template slot-scope="{row}">
                        <span v-if="row.status === 0">待审批</span>
                        <span v-if="row.status === 2">待签署</span>
                        <span v-if="row.status === 3">已签署</span>
                        <span v-if="row.status === 4">已撤销</span>
                    </template>
                </el-table-column>
                <el-table-column prop="statusInfo" label="状态"></el-table-column>
                <el-table-column prop="solutionsName" label="保险方案"></el-table-column>
                <el-table-column prop="insureNum" label="投保人数"></el-table-column>
                <el-table-column prop="serviceDays" label="投保时长(天)"></el-table-column>
@@ -73,7 +70,7 @@
                    fixed="right"
                >
                    <template slot-scope="{row}">
                        <el-button type="text" @click="$refs.operaInsuranceApplyWindow.open('编辑投保申请信息表', row)" icon="el-icon-edit" v-permissions="['business:insuranceapply:update']">查看详情</el-button>
                        <el-button type="text" @click="$refs.OperaInsuranceApplyDetails.open('投保详情', { id: row.id })" v-permissions="['business:insuranceapply:update']">查看详情</el-button>
                    </template>
                </el-table-column>
            </el-table>
@@ -85,7 +82,9 @@
            </pagination>
        </template>
        <!--    æ–°å¢žæŠ•保    -->
        <OperaInsuranceApplyWindow ref="OperaInsuranceApplyWindow" @sucess="handlePageChange" />
        <OperaInsuranceApplyWindow ref="OperaInsuranceApplyWindow" @success="handlePageChange" />
        <!--    æŠ•保详情    -->
        <OperaInsuranceApplyDetails ref="OperaInsuranceApplyDetails" @success="handlePageChange" />
    </TableLayout>
</template>
@@ -94,11 +93,13 @@
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaInsuranceApplyWindow from '@/components/enterprise/OperaInsuranceApplyWindow'
import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
import { all as solutionAll} from '@/api/business/solutions'
export default {
    name: 'InsuranceApply',
    extends: BaseTable,
    components: { TableLayout, Pagination, OperaInsuranceApplyWindow },
    components: { TableLayout, Pagination, OperaInsuranceApplyWindow, OperaInsuranceApplyDetails },
    data () {
        return {
            // æœç´¢
@@ -106,7 +107,7 @@
                createTimeS: '',
                createTimeE: '',
                baseSolutionId: '',
                status: '2'
                statusCollect: ''
            },
            solutionList:[]
        }