jiangping
2025-06-17 78a173f85f8a4666d83cf8d900f04dd9f8e3e127
company/src/components/business/InsuranceDetails.vue
@@ -10,54 +10,65 @@
          <div class="top">
            {{title}}
          </div>
            <div class="box_header">
                <div class="box_header_item">
                    <div class="box_header_item_label">投保企业</div>
                    <div class="box_header_item_val">{{ model.companyName }}</div>
                </div>
                <div class="box_header_item">
                    <div class="box_header_item_label">保险方案</div>
                    <div class="box_header_item_val">{{ model.solutionsName }}</div>
                </div>
                <div class="box_header_item">
                    <div class="box_header_item_label">保险生效起期</div>
                    <div class="box_header_item_val">{{ model.startTime }}</div>
                </div>
                <div class="box_header_item">
                    <div class="box_header_item_label">保险生效止期</div>
                    <div class="box_header_item_val">{{model.endTime}}</div>
                </div>
                <div class="box_header_item">
                    <div class="box_header_item_label">投保人数</div>
                    <div class="box_header_item_val">{{ model.insureNum }}</div>
                </div>
                <div class="box_header_item">
                    <div class="box_header_item_label">总费用(元)</div>
                    <div class="box_header_item_val">{{model.fee}}</div>
                </div>
          <div class="box_table">
            <div class="box_table_head">
              <div class="box_table_head_item">{{model.solutionType == 1?'被保险人':'投保企业'}}</div>
              <div class="box_table_head_item">保险方案</div>
              <div class="box_table_head_item">{{ getApplyTimeTitle(0,model.solutionType,model)}}</div>
              <div class="box_table_head_item">{{ getApplyTimeTitle(1,model.solutionType,model)}}</div>
              <div class="box_table_head_item">在保/投保人数</div>
              <div class="box_table_head_item">总费用(元)</div>
            </div>
            <div class="box_table_content "  >
              <div class="box_table_content_item box_table_content_header">{{ model.companyName }}</div>
              <div class="box_table_content_item box_table_content_header">{{ model.solutionsName }}</div>
              <div class="box_table_content_item box_table_content_header">{{ model.startTime }}</div>
              <div class="box_table_content_item box_table_content_header">{{ model.endTime }}</div>
              <div class="box_table_content_item box_table_content_header">{{ model.guaranteeNum }} / {{ model.insureNum }}</div>
              <div class="box_table_content_item box_table_content_header">{{model.fee!=null?model.fee:'-'}}</div>
            </div>
          </div>
            <div class="box_table">
                <div class="box_table_head">
                    <div class="box_table_head_item">序号</div>
                    <div class="box_table_head_item">员工姓名</div>
                    <div class="box_table_head_item">身份证号</div>
                    <div class="box_table_head_item">派遣单位</div>
                    <div class="box_table_head_item">所属工种</div>
                  <div class="box_table_head_item">所属工种</div>
<!--                  <div class="box_table_head_item">性别</div>-->
                  <div class="box_table_head_item">备注</div>
                </div>
                <div class="box_table_content" v-for="(item, index) in detailList" :key="index">
                    <div class="box_table_content_item">{{index + 1}}</div>
                    <div class="box_table_content_item">{{ item.memberName }}</div>
                    <div class="box_table_content_item">{{ item.idcardNo }}</div>
                    <div class="box_table_content_item">{{ item.duName }}</div>
                    <div class="box_table_content_item">{{item.workTypeName}}</div>
                  <div class="box_table_content_item">{{item.workTypeName}}</div>
                  <div class="box_table_content_item" style="align-items: baseline; cursor: pointer; " :title="item.remark" >{{item.remark}}</div>
<!--                  <div class="box_table_content_item">{{ item.sex==0?"男":"女" }}</div>-->
                </div>
            </div>
          <div class="box_table" v-if="type==1" style="border-top: 0px solid #b4bbc5;" >
            <div class="box_table_head">
              <div class="box_table_head_item5">备注</div>
              <div class="box_table_head_item5">
                    <input v-model="form.checkInfo" style="width: 100%;height: 45px;border: 0px;outline: none;" placeholder="请输入" v-trim/>
              </div>
            </div>
          </div>
        </div>
        <template v-slot:footer>
            <el-button type="primary">企业证件</el-button>
        <template v-if="type==1" v-slot:footer>
            <el-button type="primary"  :loading="isWorking.export" @click="check(0)">提交通过</el-button>
<!--            <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>
            <el-button>取消</el-button>
            <el-button @click="visible=false">取消</el-button>
        </template>
    </GlobalWindow>
</template>
@@ -65,8 +76,9 @@
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import {exportDetailExcel, getDetailList} from "@/api/business/insuranceApply";
    import {all as solutionAll} from "@/api/business/solutions";
    import {check, exportDetailExcel, getDetailList} from "@/api/business/insuranceApply";
    import {exportComFiles} from "@/api/business/company";
    // import {all as solutionAll} from "@/api/business/solutions";
    export default {
        name: 'InsuranceDetails',
        extends: BaseOpera,
@@ -74,16 +86,18 @@
        data () {
            return {
                model:{},
              type:0,
               detailList:[],
                // 表单数据
                form: {
                    id: null,
                    editDate: ''
                    dealBackApply:0,
                    checkInfo: ''
                },
                // 验证规则
                rules: {
                },
                reverse: true,
                reverse: false,
                tableData: []
            }
        },
@@ -94,24 +108,29 @@
            })
        },
        methods: {
            open(title,target){
            open(title,target,type){
              this.title=title
              this.visible=true
              this.model = target
              this.type=type
              this.form.id=target.id
              this.form.checkInfo=''
              this.getDetailListDo()
            },
           getDetailListDo(){
              getDetailList({applyId: this.model.id}).then(res => {
              getDetailList({applyId: this.model.id,
                isExcel:1}).then(res => {
                this.detailList = res
              }).catch(err => {
              })
            },
          exportDetail(){
            this.$dialog.exportConfirm('确认导出吗?')
            this.$dialog.exportConfirm('确认导出详单吗?')
                .then(() => {
                  this.isWorking = true
                  exportDetailExcel({ id: this.model.id })
                  exportDetailExcel({
                      isExcel:1,
                      id: this.model.id })
                      .then(response => {
                        this.download(response)
                      })
@@ -121,6 +140,40 @@
                      })
                      .finally(() => {
                        this.isWorking = false
                      })
                })
                .catch(() => {
                })
          },
          check(type){
            this.form.dealBackApply = type;
            this.$dialog.messageConfirm('确认进行该操作吗?')
                .then(() => {
                  this.isWorking = true
                  check(this.form)
                      .then(response => {
                        this.visible = false
                        this.$emit('success')
                      }).catch(err => {
                    this.$tip.apiFailed(err)
                  })
                })
                .catch(() => {
                })
          },
          exportComFilesDo(){
            this.$dialog.exportConfirm('确认导出企业证件吗?')
                .then(() => {
                  this.isWorking = true
                  exportComFiles({ id: this.model.companyId })
                      .then(response => {
                        this.download(response)
                      })
                      .catch(e => {
                        console.log(e)
                        this.$message.error('数据下载失败!')
                      })
                })
                .catch(() => {
@@ -152,7 +205,7 @@
           flex-wrap: wrap;
           border-top: 1px solid #b4bbc5;
           border-left: 1px solid #b4bbc5;
            font-size: 24px;
            font-size: 14px;
            font-weight: bold;
            text-align: center;
          padding: 15px;
@@ -196,6 +249,7 @@
        }
        .box_table {
            width: 100%;
            border-top: 1px solid #b4bbc5;
            border-left: 1px solid #b4bbc5;
            box-sizing: border-box;
            .box_table_head {
@@ -215,17 +269,56 @@
                    border-bottom: 1px solid #b4bbc5;
                    box-sizing: border-box;
                    &:nth-child(1) {
                        flex: 0.5;
                        //flex: 0.5;
                    }
                }
              .box_table_head_item5 {
                flex: 1;
                height: 50px;
                background: #f2f2f2;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 14px;
                color: black;
                border-right: 1px solid #b4bbc5;
                border-bottom: 1px solid #b4bbc5;
                box-sizing: border-box;
                &:nth-child(2) {
                   flex: 5;
                }
              }
              .box_form_item {
                flex: 1;
                height: 50px;
                background: #ffffff;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 14px;
                color: black;
                border-right: 1px solid #b4bbc5;
                border-bottom: 1px solid #b4bbc5;
                box-sizing: border-box;
                &:nth-child(1) {
                  //flex: 0.5;
                }
              }
            }
            .box_table_content {
                width: 100%;
                display: flex;
                align-items: center;
                .box_table_content_item {
                    flex: 1;
                    height: 50px;
                .box_table_content_header{
                  border-bottom: 0px solid #b4bbc5 !important;
                }
              .box_table_content_item {
                //white-space: nowrap;
                overflow: hidden;
                //text-overflow: ellipsis;
                flex: 1;
                height: 50px;
                padding: 10px;
                    background: #ffffff;
                    display: flex;
                    align-items: center;
@@ -236,8 +329,15 @@
                    border-bottom: 1px solid #b4bbc5;
                    box-sizing: border-box;
                    &:nth-child(1) {
                        flex: 0.5;
                       // flex: 0.5;
                    }
                span{
                  width: 100%;
                  white-space: nowrap;
                  word-wrap: break-word;
                  text-overflow: ellipsis;
                  overflow: hidden;
                }
                }
            }
        }