nidapeng
2024-04-03 788a8db820cddeef9d99ecf408716f2a0d3c3217
提交一把
已添加1个文件
已修改11个文件
451 ■■■■■ 文件已修改
company/src/api/business/applyChange.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/api/business/insuranceApply.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/api/business/unionChange.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/ApplyChangeDetails.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/InsuranceDetails.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/InsuranceDetailsWtb.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OpearaUnionApply.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OpearaUnionChange.vue 391 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaWtbApplyShopWindow.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/business/unionChange.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/api/business/applyChange.js
@@ -6,6 +6,11 @@
        trim: true
    })
}
export function listAll (data) {
    return request.post('/business/applyChange/list', data, {
        trim: true
    })
}
export function getChangeMemberListOnlineSignLink (data) {
    return request.post('business/applyChange/getChangeMemberListOnlineSignLink', data, {
        trim: true
company/src/api/business/insuranceApply.js
@@ -6,6 +6,11 @@
        trim: true
    })
}
export function findAllApply(data) {
    return request.post('/business/insuranceApply/findListByDTO', data, {
        trim: true
    })
}
// ä¿®æ”¹
export function updateById (data) {
company/src/api/business/unionChange.js
@@ -12,6 +12,10 @@
    return request.post('/business/unionChange/create', data)
}
export function merge (data) {
    return request.post('/business/unionChange/merge', data)
}
// ä¿®æ”¹
export function updateById (data) {
    return request.post('/business/unionChange/updateById', data)
company/src/components/business/ApplyChangeDetails.vue
@@ -80,6 +80,9 @@
<!--            <el-button type="danger"  :loading="isWorking.export" @click="check(1)">审核不通过</el-button>-->
            <el-button @click="visible=false">取消</el-button>
        </template>
        <template v-else-if="type==2" v-slot:footer>
            <el-button @click="visible=false">返回</el-button>
        </template>
        <template v-else v-slot:footer>
            <el-button type="primary"  :loading="isWorking.export" @click="exportComFilesDo">企业证件</el-button>
            <el-button type="primary"  :loading="isWorking.export" @click="exportDetail">导出详单</el-button>
company/src/components/business/InsuranceDetails.vue
@@ -86,7 +86,7 @@
<!--            <el-button type="danger"  :loading="isWorking.export" @click="check(1)">审核不通过</el-button>-->
            <el-button @click="visible=false">取消</el-button>
        </template>
        <template v-if="type==2" v-slot:footer>
        <template v-else-if="type==2" v-slot:footer>
            <el-button @click="visible=false">返回</el-button>
        </template>
        <template v-else v-slot:footer>
@@ -94,6 +94,7 @@
            <el-button type="primary"  :loading="isWorking.export" @click="exportDetail">导出详单</el-button>
            <el-button @click="visible=false">取消</el-button>
        </template>
      </div>
    </GlobalWindow>
</template>
company/src/components/business/InsuranceDetailsWtb.vue
@@ -64,6 +64,9 @@
<!--            <el-button type="danger"  :loading="isWorking.export" @click="check(1)">审核不通过</el-button>-->
            <el-button @click="visible=false">取消</el-button>
        </template>
      <template v-else-if="type==2" v-slot:footer>
        <el-button @click="visible=false">返回</el-button>
      </template>
        <template v-else v-slot:footer>
            <el-button type="primary"  :loading="isWorking.export" @click="exportDetail">导出详单</el-button>
            <el-button @click="visible=false">取消</el-button>
company/src/components/business/OpearaUnionApply.vue
@@ -107,7 +107,7 @@
        <selectApplicationForm ref="selectApplicationForm" @success="getValue" />
        <!--    æŠ•保员工名单    -->
        <employeeList ref="employeeList" />
      <InsuranceDetails ref="InsuranceDetails" @success="successEvent" />
      <InsuranceDetails ref="InsuranceDetails" @success="getValue" />
    </GlobalWindow>
</template>
@@ -117,11 +117,11 @@
import selectApplicationForm from '@/components/business/selectApplicationForm'
import employeeList from '@/components/business/employeeList'
import { all } from '@/api/business/solutions'
import { fetchList } from '@/api/business/insuranceApply'
import { findAllApply } from '@/api/business/insuranceApply'
import InsuranceDetails from '@/components/business/InsuranceDetails'
import { merge } from '@/api/business/unionApply'
export default {
  name: 'factoryChange',
  name: 'OpearaUnionApply',
  extends: BaseOpera,
  components: { GlobalWindow, InsuranceDetails,selectApplicationForm, employeeList },
  data () {
@@ -251,16 +251,12 @@
      this.getList()
    },
    getList () {
      fetchList({
        capacity: 10,
        page: this.currentPage,
        model: {
      findAllApply({
          baseSolutionId: this.form.baseSolutionId,
          status: 23
        }
      }).then(res => {
        this.list = res.records
        this.total = res.total
        this.list = res
        this.total=this.list ?this.list.length:0
        this.$nextTick(() => {
          if (this.$refs.table && this.$refs.table.doLayout) {
            this.$refs.table.doLayout()
company/src/components/business/OpearaUnionChange.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,391 @@
<template>
  <GlobalWindow
      :title="title"
      width="100%"
      text="加减保申请"
      :visible.sync="visible"
      :confirm-working="isWorking"
      @confirm="confirm"
  >
    <div class="list">
      <el-form :inline="true" ref="form" :model="form" :rules="rules" class="demo-form-inline">
        <el-form-item label=" " prop="unionApplyId" >
          <div style=" display: flex; flex-direction: column;">
            <el-button type="primary" size="small" @click="selectBaoxiandan"> é€‰æ‹©ä¿é™©å•</el-button>
            <span style="color: #F95601; font-size: 14px;">(1. è¯·é€‰æ‹©ä¿é™©å•后进行操作)</span>
          </div>
        </el-form-item>
        <el-form-item label="批单生效起期:" prop="applyDate" style="margin-left: 40px">
          <div style="display: flex; flex-direction: column;">
            <el-date-picker
                v-model="form.applyDate"
                type="date"
                format="yyyy å¹´ MM æœˆ dd æ—¥"
                value-format="yyyy-MM-dd" />
            <span style="color: #F95601; font-size: 14px;">(2. æ¬¡æ—¥ç”Ÿæ•ˆæŠ•保请于17:30前提交,超时提交以保险单为准)</span>
          </div>
        </el-form-item>
        <el-form-item label="费用" v-if="model">
          <span>{{model.price}}元</span>
          <span v-if="model.timeUnit === 0">/天</span>
          <span v-if="model.timeUnit === 1">/半月</span>
          <span v-if="model.timeUnit === 2">/月</span>
          <span v-if="model.timeUnit === 3">/å¹´</span>
          <span>/人</span>
        </el-form-item>
        <el-form-item label="投保年龄" v-if="item">
          <span>{{model.minAge}} è‡³ {{model.maxAge}}</span>
        </el-form-item>
      </el-form>
    </div>
    <div style="display: block;margin:0 0 30px 30px " v-if="model">
      <div style="display: inline-block;width: 300px">保险方案:{{model.solutionName}}</div>
      <div style="display: inline-block">保单号:{{model.code}}</div>
    </div>
    <el-table
        :data="list"
        border
        ref="multipleTable"
        @row-click="rowselect"
        @selection-change="handleSelectionChange"
        style="width: 100%;margin-bottom: 15px;">
      <el-table-column
          type="selection"
          width="55">
      </el-table-column>
      <el-table-column label="序号" width="80px">
        <template slot-scope="scope">
          <span>{{scope.$index + 1}}</span>
        </template>
      </el-table-column>
      <el-table-column
          prop="companyName"
          label="被保险人">
      </el-table-column>
      <el-table-column
          prop="applyStartTime"
          label="期望保险生效起期">
      </el-table-column>
      <el-table-column
          prop="addNum"
          label="加保人数">
      </el-table-column>
      <el-table-column
          prop="delNum"
          label="减保人数">
      </el-table-column>
      <el-table-column
          prop="fee"
          label="费用变更">
      </el-table-column>
      <el-table-column  label="操作">
        <template slot-scope="{row}">
          <el-button type="text" @click="checkDetial(row)">查看名单</el-button>
          <!--                    <el-button type="text" style="color: #ff0000;">删除</el-button>-->
        </template>
      </el-table-column>
    </el-table>
    <div style="color: #F95601; font-size: 14px;width: 100%;text-align: left">(3. è¯·å…ˆé€‰æ‹©è‡³å°‘一条申请后提交投保申请)</div>
    <div class="info" v-if="model">
      <span v-if="model.specialAgreement">{{model.specialAgreement}}</span>
      <span v-if="model.specialInfo">{{model.specialInfo}}</span>
      <span v-if="model.ortherInfo">{{model.ortherInfo}}</span>
    </div>
    <!--    é€‰æ‹©ç”³è¯·å•    -->
    <ApplyChangeDetails ref="ApplyChangeDetails" @success="getValue" />
    <el-dialog
        title="选择保险单"
        :visible.sync="visibleSelect"
        width="70%"
        :modal="true"
        :show-close="false"
        append-to-body
        center>
      <div class="desc_item_from">
        <el-table
            ref="multipleTable1"
            v-loading="isWorking.search"
            :data="tableData.list"
            @row-click="rowselect1"
            row-key="id"
            @selection-change="handleSelectionChange1"
            stripe
        >
         <el-table-column
            type="selection"
            width="55">
        </el-table-column>
          <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="状态" min-width="100px">
            <template slot-scope="{row}">
              <span :class="'union-apply-status'+row.status"  >{{ row.statusInfo}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="code" label="保单号" min-width="100px"></el-table-column>
          <el-table-column prop="solutionName" label="保险方案" min-width="100px"></el-table-column>
          <el-table-column prop="insureNum" label="投保人数" min-width="100px"></el-table-column>
          <el-table-column prop="fee" label="总费用(元)" min-width="100px"></el-table-column>
          <el-table-column prop="createDate" label="提交时间" min-width="100px"></el-table-column>
        </el-table>
        <div class="desc_item_from_page">
          <el-pagination
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              :page-size="10"
              layout="total, prev, pager, next, jumper"
              :total="tableTotal">
          </el-pagination>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="selectDo()">ç¡®  å®š</el-button>
                <el-button @click="model=null;visibleSelect=false">取 æ¶ˆ</el-button>
            </span>
    </el-dialog>
  </GlobalWindow>
</template>
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import selectApplicationForm from '@/components/business/selectApplicationForm'
import { listAll } from '@/api/business/applyChange'
import { merge } from '@/api/business/unionChange'
import ApplyChangeDetails from '@/components/business/ApplyChangeDetails'
import { fetchList as pageUnionList } from '@/api/business/unionApply'
import {getDetail} from "@/api/business/insuranceApply";
export default {
  name: 'add_subtract_entrust',
  extends: BaseOpera,
  components: { GlobalWindow, ApplyChangeDetails,selectApplicationForm },
  data () {
    return {
      form: {
        unionApplyId: null,
        applyIds: [],
        applyDate: null,
        businessType: 0
      },
      visibleSelect:false,
      solutions: [],
      currentPage:0,
      list: [],
      tableData:[],
      tableTotal:0,
      endTime: '',
      item: null,
      model: null,
      time: [],
      // éªŒè¯è§„则
      rules: {
        unionApplyId: [
          { required: true, message: '请选择保险单' }
        ],
        applyDate: [
          { required: true, message: '请选择保险生效起期' }
        ]
      }
    }
  },
  created () {
    this.config({
      api: '/business/insuranceApply',
      'field.id': 'id'
    })
  },
  methods: {
    rowselect(row){
      this.$refs.multipleTable.toggleRowSelection(row,true);
    },
    rowselect1(row){
      this.$refs.multipleTable1.toggleRowSelection(row,true);
    },
    checkDetial(row){
      getDetail(row.applyId).then(res => {
        // this.apply = res
        this.$refs.ApplyChangeDetails.open('加减保人员名单',res, row,2)
      }).catch(err => {
      })
    },
    handleSelectionChange(rows){
      this.form.applyIds = []
      // å‡è®¾å–出 id å­—段
      rows.forEach(item => {
        const id = item.id
        if ( this.form.applyIds.indexOf(id) === -1) {
          this.form.applyIds.push(id)
        }
      })
    },
    handleSelectionChange1 (rows) {
      console.log(rows)
      if (rows.length > 1) {
        // clearSelection ç”¨äºŽå¤šé€‰è¡¨æ ¼ï¼Œæ¸…空用户的选择
        this.$refs.multipleTable1.clearSelection();
        this.$refs.multipleTable1.toggleRowSelection(rows[rows.length-1]);
      }
     if (rows.length >= 1) {
        // é€‰ä¸­çš„行对像放进数组,方便后续对数据进行操作
        this.model =rows[rows.length-1]
      } else if (rows.length === 0) {
        this.model = null
      }
    },
    selectDo(){
      if(!this.model){
        this.$tip.apiFailed({
          type: 'error',
          message: '请选择至少一条申请记录进行操作'
        })
        return
      }
      this.visibleSelect=false
      this.form.unionApplyId = this.model.id
      this.getList();
    },
    confirm () {
      this.$refs.form.validate((valid) => {
        // debugger
        if (!valid) {
          return
        }
        if(this.form.applyIds == null || this.form.applyIds.length ===0){
          this.$tip.apiFailed({
            type: 'error',
            message: '请选择至少一条申请记录进行投保申请!!'
          })
          return;
        }
        this.$confirm('确认提交,请仔细核对信息。', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning',
          center: true
        }).then(() => {
          merge(this.form)
              .then(response => {
                this.$message({
                  type: 'success',
                  message: '提交成功!'
                })
                this.visible = false
                this.$emit('success')
              }).catch(err => {
            this.$tip.apiFailed(err)
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '取消'
          })
        })
      })
    },
    open (title, target) {
      this.title = title
      this.model= null
      this.list= []
      this.visibleSelect=false
      this.tableData=[]
      this.tableTotal=0
      this.item= null
      if (target) {
        this.$nextTick(() => {
          this.$refs.form.resetFields()
        })
      } else {
        this.$nextTick(() => {
          this.$refs.form.resetFields()
          this.form[this.configData['field.id']] = null
        })
      }
      // this.getUnionApplyList()
      this.visible = true
    },
    getValue(){
    },
    selectBaoxiandan(){
      this.currentPage = 1
      this.visibleSelect=true
      this.$refs.multipleTable.clearSelection();
      this.getUnionApplyList()
    },
    getUnionApplyList(){
      pageUnionList({
        capacity: 10,
        page: this.currentPage,
        model: {
          status: 3,
        }
      }).then(res => {
        this.tableData.list = res.records
        this.tableTotal = res.total
        this.$nextTick(() => {
          console.log(this.$refs.multipleTable1)
          if (this.$refs.multipleTable1 && this.$refs.multipleTable1.doLayout) {
            this.$refs.multipleTable1.doLayout()
          }
        })
      })
    },
    getList () {
      listAll({
          solutionType:1,
          unionApplyId: this.model.id,
          status: 7
      }).then(res => {
        this.list = res
        this.$nextTick(() => {
          if (this.$refs.multipleTable && this.$refs.multipleTable.doLayout) {
            this.$refs.multipleTable.doLayout()
          }
        })
      })
    },
    handleCurrentChange (val) {
      this.currentPage = val
      this.getUnionApplyList()
    }
  }
}
</script>
<style lang="scss" scoped>
.list {
  width: 100%;
}
.btns {
  width: 100%;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  .btns_item {
    display: flex;
    align-items: center;
  }
}
.submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}
.desc_item_cate {
  width: 100%;
  margin-bottom: 10px;
}
.info {
  margin-top: 30px;
  width: 100%;
  font-size: 14px;
  color: black;
}
</style>
company/src/components/business/OperaWtbApplyShopWindow.vue
@@ -439,9 +439,9 @@
          :title="signTitle"
          :visible.sync="visiblePhone"
          width="500px"
          :modal="false"
          :show-close="false"
          :close-on-click-modal="false"
          :modal="true"
          :show-close="true"
          append-to-body
          center>
        <el-form :model="form" ref="form" :rules="rules">
          <el-form-item label="手机号" prop="phone">
company/src/views/business/unionChange.vue
@@ -32,8 +32,8 @@
        </el-form>
        <!-- è¡¨æ ¼å’Œåˆ†é¡µ -->
        <template v-slot:table-wrap>
            <ul class="toolbar" v-permissions="['business:insurance:create']">
                <li><el-button type="primary" @click="$refs.add_subtract_entrust.open('加减保申请')" v-permissions="['business:insurance:create']">提交申请</el-button></li>
            <ul class="toolbar" v-permissions="['business:unionchange:create']">
                <li><el-button type="primary" @click="$refs.OpearaUnionChange.open('加减保申请')" v-permissions="['business:unionchange:create']">提交申请</el-button></li>
            </ul>
            <el-table
                v-loading="isWorking.search"
@@ -76,7 +76,7 @@
            </pagination>
        </template>
        <!--    æäº¤ç”³è¯·    -->
        <add_subtract_entrust ref="add_subtract_entrust" />
        <OpearaUnionChange ref="OpearaUnionChange" />
    </TableLayout>
</template>
@@ -84,11 +84,11 @@
    import BaseTable from '@/components/base/BaseTable'
    import TableLayout from '@/layouts/TableLayout'
    import Pagination from '@/components/common/Pagination'
    import add_subtract_entrust from '@/components/business/add_subtract_entrust'
    import OpearaUnionChange from '@/components/business/OpearaUnionChange'
    export default {
        name: 'unionChange',
        extends: BaseTable,
        components: { TableLayout, Pagination, add_subtract_entrust },
        components: { TableLayout, Pagination, OpearaUnionChange },
        data () {
            return {
                // æœç´¢
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -1554,7 +1554,7 @@
            }else if(model.getSolutionType()!=null && model.getSolutionType() ==1){
                queryWrapper.eq(Solutions::getShopId,loginUserInfo.getCompanyId());
            }else{
                queryWrapper.apply("((t1.type=0 and exists(select cs.id from company_solution cs where cs.isdeleted=0 and cs.company_id=t1.company_id and cs.shop_id="+loginUserInfo.getCompanyId()+")) or (" +
                queryWrapper.apply("((t2.type=0 and exists(select cs.id from company_solution cs where cs.isdeleted=0 and cs.company_id=t1.company_id and cs.shop_id="+loginUserInfo.getCompanyId()+")) or (" +
                        "t2.type=1 and t2.shop_id="+loginUserInfo.getCompanyId()+"))") ;
            }
        }else{
server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
@@ -292,6 +292,7 @@
    @Override
    @Transactional(rollbackFor = {BusinessException.class,Exception.class})
    public Integer merge(SaveUnionChangeDTO saveUnionChangeDTO){
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(!user.getType().equals(Constants.TWO)){
@@ -312,7 +313,7 @@
                        .eq(ApplyChange::getIsdeleted, Constants.ZERO)
                        .eq(InsuranceApply::getUnionApplyId,saveUnionChangeDTO.getUnionApplyId())
                        .eq(ApplyChange::getStatus,Constants.ApplyChangeStatus.CHECHED_PASSED.getKey())
                        .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())
                        .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.WTB_DONE.getKey())
                        .eq(ApplyChange::getType,saveUnionChangeDTO.getBusinessType())
                        .in(ApplyChange::getId,saveUnionChangeDTO.getApplyIds())
                        .isNull(ApplyChange::getUnionChangeId)