jiangping
2024-06-20 ad5c2bf44c99d299cbb5b8182675aec514d55a57
company/src/views/enterprise/insuranceApply.vue
@@ -44,7 +44,7 @@
        <!-- 表格和分页 -->
        <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"
@@ -69,6 +69,7 @@
                  </template>
                </el-table-column>
                <el-table-column prop="insureNum" label="投保人数"></el-table-column>
                <el-table-column prop="guaranteeNum" label="在保人数"></el-table-column>
                <el-table-column label="投保时长(天)">
                    <template slot-scope="{row}">
                        <span>{{(row.serviceDays - row.loseEfficacyDays) < 0 ? `-` : row.serviceDays - row.loseEfficacyDays}}</span>
@@ -106,18 +107,17 @@
            </pagination>
        </template>
        <!--    新增投保    -->
        <OperaInsuranceApplyWindow ref="OperaInsuranceApplyWindow" @success="handlePageChange" />
        <OperaInsuranceApplyAddWindow ref="OperaInsuranceApplyAddWindow" @success="result" />
        <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'
@@ -125,7 +125,7 @@
export default {
  name: 'InsuranceApply',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaInsuranceApplyWindow, OperaInsuranceApplyDetails,OperaWtbApplyShopWindow },
  components: { TableLayout, Pagination, OperaInsuranceApplyAddWindow, OperaInsuranceApplyDetails,OperaWtbApplyShopWindow },
  data () {
    return {
      // 搜索
@@ -155,6 +155,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 })