MrShi
2025-03-26 cfdafcf22dbd868c9876d37efbd92b97ba014bef
company/src/components/business/OperaInsuranceApplyWindow.vue
@@ -11,7 +11,7 @@
                <div class="desc_item_label" v-if="userInfo.type === 1 &&(model.statusCollect === 2 || model.statusCollect === 3)">
                    <div class="desc_item_label_left">
                        <span>保险到期还有 <b style="color: #F95601;">{{model.loseEfficacyDays ? model.loseEfficacyDays : '-'}}</b> 天</span>
                        <el-button type="primary" v-if="model.statusCollect === 2 || model.statusCollect === 3" @click="$refs.OperaInsuranceApply.open('续保', { id: dataId, type: 1 })">一键续保</el-button>
                        <el-button type="primary" v-if="model.statusCollect === 2 || model.statusCollect === 3" @click="goYjxb">一键续保</el-button>
                        <el-button type="primary" v-if="model.statusCollect === 2" @click="$refs.additionSubtractionApplication.open('加减保申请', { id: dataId })">加减保申请</el-button>
                        <el-button type="primary" v-if="model.statusCollect === 2" @click="$refs.factoryChange.open('更换派遣单位申请', { id: dataId })">更换派遣单位申请</el-button>
                    </div>
@@ -29,7 +29,7 @@
<!--                          $refs.operaverifyPhoneNumberWindew.open('验证手机号')-->
                        <el-button v-if="model.status == 2" type="primary" :disabled="loading" :loading="loading" @click="goSign()">签署投保单</el-button>
                        <el-button v-if="model.status == 5" type="primary" @click="viewBaoxiandan">查看保险单</el-button>
                        <el-button v-if="model.status == 4" type="primary" @click="$refs.OperaInsuranceApply.open('投保申请', {id: dataId})">再次投保</el-button>
                        <el-button v-if="model.status == 4" type="primary" @click="$refs.operaInsuranceApplyAddWindow.open('投保申请', {id: dataId})">再次投保</el-button>
                        <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="closeOrder">关闭订单</el-button>
                      </template>
@@ -77,10 +77,11 @@
                            align="center"
                            label="投保人数">
                        </el-table-column>
                      <el-table-column prop="guaranteeNum"  align="center" label="在保人数" ></el-table-column>
                        <el-table-column
                            prop="serviceDays"
                            align="center"
                            label="在保时长(天)">
                            label="保单时长(天)">
                        </el-table-column>
                        <el-table-column
                            prop="currentFee"
@@ -194,6 +195,8 @@
                            <el-button type="primary" style="width: 80px;" @click="search">查询</el-button>
                            <el-button @click="resetting" style="width: 80px;">重置</el-button>
                            <el-button type="primary" style="width: 80px;" @click="exportExcel" v-if="activeName === '0'">导出名单</el-button>
                          <el-button type="primary" style="width: 100px;" @click="$refs.OperaApplyChangeMonthWindow.open('加减保费用月度统计',model)" v-if="activeName === '1'">费用统计查询</el-button>
                        </el-form-item>
                    </el-form>
                </div>
@@ -222,7 +225,7 @@
                            label="性别">
                            <template slot-scope="{row}">
                                <span v-if="row.sex === 0">男</span>
                                <span v-else>女</span>
                              <span  v-if="row.sex === 1">女</span>
                            </template>
                        </el-table-column>
                        <el-table-column
@@ -264,6 +267,12 @@
                            <span>{{row.fee!=null?row.fee: '-'}}</span>
                          </template>
                        </el-table-column>
                      <el-table-column
                          :key="Math.random()"
                          prop="remark"
                          align="center"
                          label="备注">
                      </el-table-column>
                    </el-table>
                    <el-table
                        :data="list1"
@@ -288,7 +297,7 @@
                                <span :class="'change-status'+row.status" v-if="row.status === 5 || row.status === 8">已退回</span>
                                <span :class="'change-status'+row.status" v-if="row.status === 6">已关闭</span>
                                <span :class="'change-status'+row.status" v-if="row.status === 7">待出单</span>
                                <span :class="'change-status'+row.status" v-if="row.status === 9">投保中</span>
                                <span :class="'change-status'+row.status" v-if="row.status === 9">批改申请中</span>
                            </template>
                        </el-table-column>
                        <el-table-column
@@ -301,13 +310,19 @@
                            :key="Math.random()"
                            prop="addNum"
                            align="center"
                            label="增加人数(人)">
                            label="增加人数">
                          <template scope="{row}">
                            {{row.addNum||0}} 人
                          </template>
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="delNum"
                            align="center"
                            label="减少人数(人)">
                            label="减少人数 ">
                          <template scope="{row}">
                            {{row.delNum||0}} 人
                          </template>
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
@@ -319,7 +334,28 @@
                            :key="Math.random()"
                            prop="applyStartTime"
                            align="center"
                            label="批单生效起期">
                            label="批增生效日期">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="delValidTime"
                            align="center"
                            label="批减生效日期">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="fee"
                            align="center"
                            label="费用变更">
                          <template scope="{row}">
                            {{row.fee||0}}元
                          </template>
                        </el-table-column>
                      <el-table-column
                          :key="Math.random()"
                          prop="remark"
                          align="center"
                          label="备注">
                        </el-table-column>
                        <el-table-column
                            align="center"
@@ -352,7 +388,7 @@
                                <span :class="'change-status'+row.status" v-if="row.status === 5 || row.status === 8">已退回</span>
                                <span :class="'change-status'+row.status" v-if="row.status === 6">已关闭</span>
                              <span :class="'change-status'+row.status" v-if="row.status === 7">待出单</span>
                              <span :class="'change-status'+row.status" v-if="row.status === 9">投保中</span>
                              <span :class="'change-status'+row.status" v-if="row.status === 9">批改申请中</span>
                            </template>
                        </el-table-column>
                        <el-table-column
@@ -366,6 +402,9 @@
                            prop="changeNum"
                            align="center"
                            label="更换派遣单位人数">
                          <template scope="{row}">
                            {{row.changeNum||0}} 人
                          </template>
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
@@ -378,6 +417,12 @@
                            prop="applyStartTime"
                            align="center"
                            label="批单生效起期">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="remark"
                            align="center"
                            label="备注">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
@@ -399,7 +444,7 @@
                    </div>
                </div>
                <div class="desc_item_review">
                    <div class="desc_item_review_label">审核流程</div>
                    <div class="desc_item_review_label">操作记录</div>
                  <el-timeline :reverse="reverse">
                    <el-timeline-item
                        v-for="(activity, index) in activities"
@@ -425,17 +470,19 @@
        <!--    企业申请退回    -->
        <applyReturn ref="applyReturn" @success="successEvent" />
        <!--    新增投保    -->
        <OperaInsuranceApply ref="OperaInsuranceApply" @success="successEvent" />
        <OperaInsuranceApplyAddWindow ref="operaInsuranceApplyAddWindow" @success="result" />
        <!--    加减保申请    -->
        <additionSubtractionApplication ref="additionSubtractionApplication" @success="successEvent" />
        <additionSubtractionApplication ref="additionSubtractionApplication" @success="successChangeEvent" />
        <!--    更换派遣单位申请    -->
        <factoryChange ref="factoryChange" @success="successEvent" />
        <factoryChange ref="factoryChange" @success="successChangeUnitEvent" />
        <!-- 加减保详情 -->
        <OperaApplyChangeDetailWindow ref="OperaApplyChangeDetailWindow" @success="successEvent"/>
        <!-- 更换派遣单位详情 -->
        <OperaApplyChangeUnitDetailWindow ref="OperaApplyChangeUnitDetailWindow" @success="successEvent"/>
        <!--    验证手机号    -->
        <operaverifyPhoneNumberWindew ref="operaverifyPhoneNumberWindew" @success="goSign" />
        <OperaPdfViewerWindow ref="OperaPdfViewerWindow" />
        <OperaApplyChangeMonthWindow ref="OperaApplyChangeMonthWindow" />
        <template v-slot:footer>
            <el-button @click="visible=false">返回</el-button>
        </template>
@@ -451,29 +498,32 @@
import factoryChange from '@/components/enterprise/factoryChange'
import operaverifyPhoneNumberWindew from '@/components/business/operaverifyPhoneNumberWindew'
import OperaApplyChangeDetailWindow from '@/components/business/OperaApplyChangeDetailWindow'
import OperaApplyChangeMonthWindow from '@/components/business/OperaApplyChangeMonthWindow'
import OperaApplyChangeUnitDetailWindow from '@/components/business/OperaApplyChangeUnitDetailWindow'
import applyReturn from '@/components/enterprise/applyReturn'
import { getDetail, getSignLink, applyDetailPage, applyChagneDetailPage, exportExcel, applyChagneDetailExcel, applyOpt } from "@/api/business/insuranceApply";
import { findListByDTO } from "@/api/business/dispatchUnit";
import { fetchList } from "@/api/business/applyChange";
import { findListByDTO as worktypeFindListByDTO } from "@/api/business/worktype";
import OperaInsuranceApply from '@/components/enterprise/OperaInsuranceApplyWindow'
import { getDetail, getSignLink, applyDetailPage,  exportExcel, applyChagneDetailExcel, applyOpt } from '@/api/business/insuranceApply'
import { findListByDTO } from '@/api/business/dispatchUnit'
import { fetchList } from '@/api/business/applyChange'
import { findListByDTO as worktypeFindListByDTO } from '@/api/business/worktype'
import OperaInsuranceApplyAddWindow from '@/components/enterprise/OperaInsuranceApplyAddWindow'
import { mapState } from 'vuex'
import OperaPdfViewerWindow from '@/components/business/OperaPdfViewerWindow'
export default {
  name: 'OperaInsuranceApplyWindow1',
  extends: BaseOpera,
  components: {
      GlobalWindow,
    OperaPdfViewerWindow,
      InsuranceDetails,
      OperaInsuranceApplyCheckWindow,
      applyReturn,
      OperaInsuranceApply,
      additionSubtractionApplication,
      factoryChange,
    OperaApplyChangeMonthWindow,
      OperaApplyChangeDetailWindow,
      OperaApplyChangeUnitDetailWindow,
    OperaInsuranceApplyAddWindow,
      operaverifyPhoneNumberWindew
  },
  data () {
@@ -532,7 +582,7 @@
    },
  methods: {
     open(title,target){
        this.visible = true;
      this.visible = true
        this.title = title
        this.model = {}
        this.dataId = null
@@ -554,6 +604,17 @@
        this.getDW()
        this.getGZ()
     },
    result(flag,param){
      console.log(flag,param)
      if(param && param.godetail && param.id){
        this.open('委托保详情',{id:param.id})
      }else{
        this.successEvent()
      }
    },
    goYjxb(){
      this.$refs.operaInsuranceApplyAddWindow.open('续保', {id: this.dataId,type: 1 })
    },
      // 关闭订单
      closeOrder () {
          this.$confirm('确认关闭此订单吗?', '提示', {
@@ -569,7 +630,7 @@
              })
          }).catch(() => {
          });
      })
      },
      // 派遣单位
      getDW() {
@@ -697,9 +758,9 @@
                 this.$nextTick(() => {
                     console.log(this.$refs.table)
                     if (this.$refs.table && this.$refs.table.doLayout) {
                         this.$refs.table.doLayout();
              this.$refs.table.doLayout()
                     }
                 });
          })
             })
         } else {
             fetchList({
@@ -722,9 +783,9 @@
                 this.$nextTick(() => {
                     console.log(this.$refs.table)
                     if (this.$refs.table && this.$refs.table.doLayout) {
                         this.$refs.table.doLayout();
              this.$refs.table.doLayout()
                     }
                 });
          })
             })
         }
      },
@@ -752,18 +813,20 @@
    viewToubaodan(){
       if(this.model.toubaodanSignedFile && this.model.toubaodanSignedFile.fileurlFull){
         setTimeout(() => {
           window.open(this.model.toubaodanSignedFile.fileurlFull)
         }, 500);
          this.$refs.OperaPdfViewerWindow.open('查看投保单', this.model.toubaodanSignedFile.fileurlFull)
          // window.open(this.model.toubaodanSignedFile.fileurlFull)
        }, 500)
       } else if(this.model.toubaodanFile && this.model.toubaodanFile.fileurlFull){
         setTimeout(() => {
           window.open(this.model.toubaodanFile.fileurlFull)
          this.$refs.OperaPdfViewerWindow.open('查看投保单', this.model.toubaodanFile.fileurlFull)
          // window.open(this.model.toubaodanFile.fileurlFull)
             },500)
       }
    },
    viewBaoxiandan(){
      if(this.model.baoxiandanFile && this.model.baoxiandanFile.fileurlFull){
        window.open(this.model.baoxiandanFile.fileurlFull)
        this.$refs.OperaPdfViewerWindow.open('查看保险单', this.model.baoxiandanFile.fileurlFull)
        // window.open(this.model.baoxiandanFile.fileurlFull)
      }
    },
    handleSizeChange(val){
@@ -788,6 +851,14 @@
      }).catch(err => {
      })
    },
    successChangeEvent (param) {
      this.$refs.OperaApplyChangeDetailWindow.open('加减保详情',param)
      this.successEvent()
    },
    successChangeUnitEvent (param) {
      this.$refs.OperaApplyChangeUnitDetailWindow.open('更换派遣单位详情', param)
      this.successEvent()
    },
    successEvent(){
       // this.visible=false
      this.getDetail()