jiangping
2024-05-16 a4945c89ee72aa8b6f2c0a75653a3256a2b30b4f
company/src/components/enterprise/OperaInsuranceApplyAddWindow.vue
@@ -137,9 +137,9 @@
      </el-table-column>
    </el-table>
    <div class="info" v-if="item">
      <span v-if="item.specialAgreement">{{item.specialAgreement}}</span>
      <span v-if="item.specialInfo">{{item.specialInfo}}</span>
      <span v-if="item.ortherInfo">{{item.ortherInfo}}</span>
      <span v-if="item.specialAgreement"  v-html="item.specialAgreement"></span>
      <span v-if="item.specialInfo" v-html="item.specialInfo"> </span>
      <span v-if="item.ortherInfo" v-html="item.ortherInfo"></span>
    </div>
    <!--    选择员工    -->
    <selectEmployees ref="selectEmployees" @result="getValue" />
@@ -174,7 +174,8 @@
export default {
  name: 'OperaInsuranceApplyAddWindow',
  extends: BaseOpera,
  components: { GlobalWindow, selectEmployees, addEmployee,importEmployees, confirmJobType, detailsPolicyholder
  components: {
    GlobalWindow, selectEmployees, addEmployee, importEmployees, confirmJobType, detailsPolicyholder
    // ,  OperaWtbApplyShopWindow, OperaInsuranceApplyDetails
  },
  data () {
@@ -227,25 +228,25 @@
        applyStartTime: this.form.applyStartTime,
        applyEndTime: this.form.applyEndTime,
        solutionId: this.form.solutionId
      }).then(res=> {
      }).then(res => {
        console.log(res)
        this.visible = false
        if (this.item.type == 1) {
          // this.$refs.OperaWtbApplyShopWindow.open('委托投保详情', { id: res })
          this.$emit('success', 1,{ id: res })
          this.$emit('success', 1, { id: res })
        } else {
          // this.$refs.OperaInsuranceApplyDetails.open('投保详情', { id: res })
          this.$emit('success', 1,{ id: res })
          this.$emit('success', 1, { id: res })
        }
        this.$tip.apiSuccess('操作成功')
        // this.$emit('success','委托投保详情', { id: res })
      })
          .catch(e => {
            this.$tip.apiFailed(e)
          })
          .finally(() => {
            this.isWorking = false
          })
        .catch(e => {
          this.$tip.apiFailed(e)
        })
        .finally(() => {
          this.isWorking = false
        })
      // } else {
      //     updateData({
      //         id: this.form.id,
@@ -295,25 +296,25 @@
    // 获取投保详情
    getDetails () {
      findList({ applyId: this.form.id })
          .then(res => {
            res.forEach(item => {
              console.log(item)
              item.idCard = item.idcardNo
              item.fee = ''
              if (this.type === 1) {
                item.duName = ''
                item.duId = ''
                item.worktypeId = ''
                item.workTypeName = ''
              }
            })
            this.tableData = res
        .then(res => {
          res.forEach(item => {
            console.log(item)
            item.idCard = item.idcardNo
            item.fee = ''
            if (this.type === 1) {
              // item.duName = ''
              // item.duId = ''
              // item.worktypeId = ''
              // item.workTypeName = ''
            }
          })
          this.tableData = res
        })
      getDetail(this.form.id)
          .then(res => {
            // this.form.solutionId = res.solutionId
            this.changeSolution1(res.solutionId)
          })
        .then(res => {
          // this.form.solutionId = res.solutionId
          this.changeSolution1(res.solutionId)
        })
    },
    getSummaries (param) {
      const { columns, data } = param
@@ -322,9 +323,9 @@
        if (index === 0) {
          sums[index] = '总价'
        } else if (index === 7) {
          if(this.item || this.item.type == 1){
            sums[index] = "-"
          }else{
          if (this.item || this.item.type == 1) {
            sums[index] = '-'
          } else {
            let total = 0
            this.tableData.forEach(item => {
              total += item.fee
@@ -464,8 +465,8 @@
        if (item.id === e) {
          // this.price = item.price
          this.item = item
          if(this.item && this.item.type==1){
            this.item.fee=0
          if (this.item && this.item.type == 1) {
            this.item.fee = 0
          }
          this.updatePickerOptions()
        }
@@ -477,21 +478,23 @@
    // 切换方案
    changeSolution1 (e) {
      getNewVersion(e)
          .then(res => {
            this.form.solutionId = res.id
            this.company.forEach(item => {
              if (item.id === res.id) {
                // this.price = item.price
                this.item = item
                if(this.item && this.item.type==1){
                  this.item.fee=0
                }
                this.updatePickerOptions()
        .then(res => {
          this.form.solutionId = res.id
          this.company.forEach(item => {
            if (item.id === res.id) {
              // this.price = item.price
              this.item = item
              if (this.item && this.item.type == 1) {
                this.item.fee = 0
              }
            })
              this.updatePickerOptions()
            }
          })
        })
      this.tableData.forEach(item => {
        item.fee = this.price
        if(this.item.type != 0){
          item.fee = this.price
        }
      })
    },
    dele (index) {
@@ -526,9 +529,9 @@
    // 查询全部方案
    getCompany () {
      all({})
          .then(res => {
            this.company = res
          })
        .then(res => {
          this.company = res
        })
    },
    getAgeByIdCard (idCard) {
      const sexAndAge = {}