MrShi
2025-04-11 3a45da15c947c2d478a44a51bd0f926647b1b841
company/src/components/enterprise/OperaInsuranceApplyAddWindow.vue
@@ -168,10 +168,10 @@
    <confirmJobType ref="confirmJobType" @result="getUser" />
    <!--    查看详单    -->
    <detailsPolicyholder ref="detailsPolicyholder" @success="successEvent" />
    <!--    直保投保详情    -->
<!--    &lt;!&ndash;    直保投保详情    &ndash;&gt;
    <OperaInsuranceApplyDetails ref="OperaInsuranceApplyDetails" />
    <!--    委托投保详情    -->
    <OperaWtbApplyShopWindow ref="OperaWtbApplyShopWindow" />
    &lt;!&ndash;    委托投保详情    &ndash;&gt;
    <OperaWtbApplyShopWindow ref="OperaWtbApplyShopWindow" />-->
  </GlobalWindow>
</template>
@@ -179,28 +179,30 @@
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import selectEmployees from '@/components/enterprise/selectEmployees'
import addEmployee from '@/components/enterprise/addEmployee'
import addEmployee from '@/components/enterprise/addEmployeeWithDu'
import importEmployees from '@/components/enterprise/importEmployees'
import confirmJobType from '@/components/enterprise/confirmJobType'
import detailsPolicyholder from '@/components/business/detailsPolicyholder'
import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
import OperaWtbApplyShopWindow from '@/components/business/OperaWtbApplyShopWindow'
import { all, getNewVersion } from '@/api/business/solutions'
import { mapState } from 'vuex'
import { create, getCountCyclePriceVO, getDetail, findList, updateData } from '@/api/business/insuranceApply'
import { create, getCountCyclePriceVO, getDetail, findList } from '@/api/business/insuranceApply'
import { UTable, UTableColumn } from 'umy-ui'
// Vue.component(UTable.name, UTable);
// Vue.component(UTableColumn.name, UTableColumn);
export default {
  name: 'OperaInsuranceApplyAddWindowNew',
  extends: BaseOpera,
  components: {
    GlobalWindow, selectEmployees, addEmployee, importEmployees, confirmJobType, detailsPolicyholder, UTable, UTableColumn
    ,  OperaWtbApplyShopWindow, OperaInsuranceApplyDetails
    GlobalWindow,
    selectEmployees,
    addEmployee,
    importEmployees,
    confirmJobType,
    detailsPolicyholder,
    UTable,
    UTableColumn
  },
  data () {
    return {
      sumFee:0,
      sumFee: 0,
      form: {
        id: null,
        ID: null,
@@ -240,7 +242,7 @@
    // 监听tableData的变化
    tableData: {
      deep: true,
      handler(newVal, oldVal) {
      handler (newVal, oldVal) {
        // 数据变化时的处理逻辑
        this.getSummaries2()
        console.log(this.tableData.length)
@@ -262,15 +264,9 @@
        solutionId: this.form.solutionId
      }).then(res => {
        console.log(res)
        this.visible = false
        if (this.item.type == 1) {
          this.$emit('success', 1, { id: res })
          this.$refs.OperaWtbApplyShopWindow.open('委托投保详情', { id: res })
        } else {
          this.$emit('success', 1, { id: res })
          this.$refs.OperaInsuranceApplyDetails.open('投保详情', { id: res })
        }
        this.$emit('success', 1, { id: res,godetail:true,type:this.item.type})
        this.$tip.apiSuccess('操作成功')
        this.visible = false
        // this.$emit('success','委托投保详情', { id: res })
      })
        .catch(e => {
@@ -364,7 +360,7 @@
          })
          sums[index] = total.toFixed(2)
          // }
        }else {
        } else {
          sums[index] = ''
        }
      })
@@ -372,8 +368,8 @@
      return sums
    },
    getSummaries2 () {
      this.sumFee = 0;
      if(this.tableData&&this.tableData.length){
      this.sumFee = 0
      if (this.tableData && this.tableData.length) {
        this.tableData.forEach((column, index) => {
          this.sumFee = parseFloat(this.sumFee) + parseFloat(column.fee)
        })
@@ -412,9 +408,9 @@
          let price = 0
          // if (this.item && this.item.type != 1) {
            this.tableData.forEach(item => {
              price = price + item.fee
            })
          this.tableData.forEach(item => {
            price = price + item.fee
          })
          // }
          this.$refs.detailsPolicyholder.open('投保详情单', {
            companyName: this.userInfo.company.name,
@@ -481,7 +477,7 @@
        this.$message.warning('请先选择保险方案')
        return
      }
      this.$refs.addEmployee.open('添加员工', { arr: this.tableData, price: this.price })
      this.$refs.addEmployee.open('添加员工', { arr: this.tableData, price: this.price, solutionId: this.form.solutionId })
    },
    uploadUser () {
      if (!this.form.solutionId) {
@@ -492,7 +488,7 @@
    },
    // 切换方案
    changeSolution (e) {
      this.sumFee =0;
      this.sumFee = 0
      this.form.applyEndTime = ''
      this.form.applyStartTime = ''
      if (!this.form.id) {
@@ -536,7 +532,7 @@
        })
      this.tableData.forEach(item => {
        // if (this.item.type != 0) {
          item.fee = this.price
        item.fee = this.price
        // }
      })
    },