MrShi
2025-03-26 cfdafcf22dbd868c9876d37efbd92b97ba014bef
company/src/views/enterprise/insuranceApply.vue
@@ -44,60 +44,79 @@
        <!-- 表格和分页 -->
        <template v-slot:table-wrap>
            <ul class="toolbar" v-permissions="['business:dispatchunit:create']">
                <li><el-button type="primary" @click="$refs.OperaInsuranceApplyWindow.open('投保申请', {type: ''})">投保申请</el-button></li>
                <li><el-button type="primary" @click="$refs.OperaInsuranceApplyAddWindow.open('投保申请', {type: ''})">投保申请</el-button></li>
            </ul>
            <el-table
                v-loading="isWorking.search"
                :data="tableData.list"
                stripe
          <el-table
              v-loading="isWorking.search"
              :data="tableData.list"
              stripe
          >
            <el-table-column label="序号"  align="center" width="80px" fixed>
              <template slot-scope="scope">
                <span>{{scope.$index + 1}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="statusInfo"   align="center"  fixed label="状态">
              <template slot-scope="{row}">
                <span :class="'apply-status'+row.status" >{{row.statusInfo}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="solutionsName" fixed label="保险方案" align="center" min-width="150"></el-table-column>
            <el-table-column label="类型" fixed  align="center">
              <template slot-scope="{row}">
                <span style="color: #00BA92" v-if="row.solutionType == 1">委托投保</span>
                <span style="color: #F95601;"  v-else>直接投保</span>
              </template>
            </el-table-column>
            <el-table-column label="保单号" fixed>
              <template slot-scope="{row}">
                <span>{{row.code ? row.code : '-'}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="insureNum" align="center" label="投保人数"  >
              <template slot-scope="{row}">
                <span>{{(row.insureNum||0)}} 人</span>
              </template>
            </el-table-column>
            <el-table-column prop="guaranteeNum"  align="center" label="在保人数"  >
              <template slot-scope="{row}">
                <span>{{(row.guaranteeNum||0)}} 人</span>
              </template>
            </el-table-column>
            <el-table-column label="投保时长">
              <template slot-scope="{row}">
                <span>{{(row.serviceDays - row.loseEfficacyDays) < 0 ? `-` : (row.serviceDays - row.loseEfficacyDays+'天')}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="currentFee" label="已产生费用"  align="center">
              <template slot-scope="{row}">
                <span>{{row.currentFee!=null?row.currentFee+' 元': '-'}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="fee" label="总费用"  align="center">
              <template slot-scope="{row}">
                <span>{{row.fee!=null?row.fee+' 元': '-'}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="createDate" label="提交日期" align="center" min-width="150"></el-table-column>
            <el-table-column prop="startTime" label="投保生效日期" align="center" min-width="150"></el-table-column>
            <el-table-column prop="endTime" label="投保失效日期"  align="center" min-width="150"></el-table-column>
            <el-table-column
                v-if="containPermissions(['business:insuranceapply:update', 'business:insuranceapply:delete'])"
                label="操作"
                min-width="150"
                fixed="right"
                align="center"
            >
                <el-table-column label="序号" width="80px">
                    <template slot-scope="scope">
                        <span>{{scope.$index + 1}}</span>
                    </template>
                </el-table-column>
                <el-table-column prop="statusInfo" label="状态">
                  <template slot-scope="{row}">
                    <span :class="'apply-status'+row.status" >{{row.statusInfo}}</span>
                  </template>
                </el-table-column>
                <el-table-column prop="solutionsName" label="保险方案"></el-table-column>
                <el-table-column label="类型">
                  <template slot-scope="{row}">
                    <span style="color: #00BA92" v-if="row.solutionType == 1">委托投保</span>
                    <span style="color: #F95601;"  v-else>直接投保</span>
                  </template>
                </el-table-column>
                <el-table-column prop="insureNum" label="投保人数"></el-table-column>
                <el-table-column label="投保时长(天)">
                    <template slot-scope="{row}">
                        <span>{{(row.serviceDays - row.loseEfficacyDays) < 0 ? `-` : row.serviceDays - row.loseEfficacyDays}}</span>
                    </template>
                </el-table-column>
              <el-table-column prop="currentFee" label="已产生费用">
                <template slot-scope="{row}">
                  <span>{{row.currentFee!=null?row.currentFee: '-'}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="fee" label="总费用(元)">
                <template slot-scope="{row}">
                  <span>{{row.fee!=null?row.fee: '-'}}</span>
                </template>
              </el-table-column>
                <el-table-column prop="createDate" label="提交日期"></el-table-column>
                <el-table-column prop="startTime" label="投保生效日期"></el-table-column>
                <el-table-column prop="endTime" label="投保失效日期"></el-table-column>
                <el-table-column
                    v-if="containPermissions(['business:insuranceapply:update', 'business:insuranceapply:delete'])"
                    label="操作"
                    min-width="120"
                    fixed="right"
                >
                    <template slot-scope="{row}">
                        <el-button type="text" @click="godetail(row)" v-permissions="['business:insuranceapply:update']">查看详情</el-button>
                    </template>
                </el-table-column>
            </el-table>
              <template slot-scope="{row}">
                <el-button type="text" @click="godetail(row)" v-permissions="['business:insuranceapply:update']">查看详情</el-button>
                <el-button type="text" @click="$refs.OperaApplyChangeMonthWindow.open('加减保月度费用统计',row)" v-permissions="['business:applychange:query']">加减保费用</el-button>
                <!--                        <template v-if="row.statusCollect === 2">-->
                <!--                            <el-button type="text" @click="$refs.additionSubtractionApplication.open('加减保申请', { id: row.id })">加减保申请</el-button>-->
                <!--                        </template>-->
              </template>
            </el-table-column>
          </el-table>
            <pagination
                @size-change="handleSizeChange"
                @current-change="handlePageChange"
@@ -106,26 +125,27 @@
            </pagination>
        </template>
        <!--    新增投保    -->
        <OperaInsuranceApplyWindow ref="OperaInsuranceApplyWindow" @success="handlePageChange" />
        <OperaInsuranceApplyAddWindow ref="OperaInsuranceApplyAddWindow" @success="result" />
        <OperaApplyChangeMonthWindow ref="OperaApplyChangeMonthWindow" @success="handlePageChange" />
        <OperaWtbApplyShopWindow ref="OperaWtbApplyShopWindow" @success="handlePageChange" />
        <!--    投保详情    -->
        <OperaInsuranceApplyDetails ref="OperaInsuranceApplyDetails" @success="handlePageChange" />
    </TableLayout>
</template>
<script>
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaInsuranceApplyWindow from '@/components/enterprise/OperaInsuranceApplyWindow'
import OperaInsuranceApplyAddWindow from '@/components/enterprise/OperaInsuranceApplyAddWindow'
import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
import OperaWtbApplyShopWindow from '@/components/business/OperaWtbApplyShopWindow'
import OperaApplyChangeMonthWindow from '@/components/business/OperaApplyChangeMonthWindow'
import { all as solutionAll } from '@/api/business/solutions'
export default {
  name: 'InsuranceApply',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaInsuranceApplyWindow, OperaInsuranceApplyDetails,OperaWtbApplyShopWindow },
  components: { TableLayout, Pagination,OperaApplyChangeMonthWindow, OperaInsuranceApplyAddWindow, OperaInsuranceApplyDetails,OperaWtbApplyShopWindow },
  data () {
    return {
      // 搜索
@@ -155,6 +175,17 @@
          this.$refs.searchForm.resetFields()
          this.search()
      },
    result(flag,param){
      console.log(flag,param)
      if(param && param.godetail && param.id){
        if (param.type == 1) {
          this.$refs.OperaWtbApplyShopWindow.open('委托投保详情', { id: param.id })
        } else {
          this.$refs.OperaInsuranceApplyDetails.open('投保详情', { id: param.id })
        }
      }
      this.handlePageChange()
    },
    godetail (row) {
      if (row.solutionType == 1) {
        this.$refs.OperaWtbApplyShopWindow.open('委托投保详情', { id: row.id })