nidapeng
2024-03-29 9dc6e13e7aea2e6e6f8e32fdd2152d4ce9cb76a1
提交一把
已修改5个文件
91 ■■■■ 文件已修改
company/src/components/business/OperaSolutionsWindow.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaWtbApplyShopWindow.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/common/UploadFile.vue 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaSolutionsWindow.vue
@@ -95,6 +95,9 @@
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="上传方案确认书:" prop="fanganFile" v-if="form.type =='1'">
            <UploadFile   :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList1" @uploadSuccess="editFanganFile" />
          </el-form-item>
            <el-form-item label="接收文件邮箱" prop="email">
                <el-input v-model="form.email" placeholder="请输入" v-trim/>
            </el-form-item>
@@ -157,10 +160,11 @@
import { all as allWorktype } from '@/api/business/worktype'
import { solutionsId } from '@/api/business/solutions'
import { pageAll as shopList } from '@/api/business/company'
import UploadFile from "@/components/common/UploadFile";
export default {
  name: 'OperaSolutionsWindow',
  extends: BaseOpera,
  components: { GlobalWindow },
  components: { GlobalWindow ,UploadFile},
  data () {
    var validType = (rule, value, callback) => {
      if (this.form.validType === 0 && !value) {
@@ -192,6 +196,8 @@
        ortherInfo: '',
        signKeyword: '',
        validTypeNum: '',
        fileList1:[],
        fanganFile:null,
        worktypeIdList: [{ worktypeId: '' }]
      },
      // 验证规则
@@ -236,6 +242,9 @@
    })
  },
  methods: {
    editFanganFile(data){
      this.form.fanganFile=data
    },
    // 切换公司
    getAllWorktype1 () {
      this.form.worktypeIdList = [{ worktypeId: '' }]
@@ -287,7 +296,10 @@
      this.form.insureCycleUnit = ''
      this.form.validTypeNum = ''
      this.visible = true
      this.form.fanganFile=null
      this.form.fileList1= new Array();
      this.form.worktypeIdList = [{ worktypeId: '' }]
      // this.$refs['$upload'].clearFiles()//初始化导入组件
      this.allCompany()
      this.allShops()
      // 新建
@@ -305,6 +317,10 @@
            for (const key in this.form) {
              this.form[key] = res[key]
            }
            if(this.form.fanganFile && this.form.fanganFile.fileurl){
              this.form.fileList1= [{url: this.form.fanganFile.fileurlFull, name:this.form.fanganFile.name}];
            }
            console.log(this.form.fileList1)
            this.form.worktypeIdList = res.worktypeList.map(item => {
              return {
                worktypeId: item.worktypeId
company/src/components/business/OperaWtbApplyShopWindow.vue
@@ -612,6 +612,7 @@
        if(this.form.type===0){
          getSignTBQRSLink(this.form).then(res => {
            setTimeout(() => {
              this.visiblePhone=false
              window.open(res)
            }, 500)
          }).catch(err => {
@@ -620,6 +621,7 @@
        } else if (flag === 1) {
          getMemberListOnlineSignLink(this.form).then(res => {
            setTimeout(() => {
              this.visiblePhone=false
              window.open(res)
            }, 500)
          }).catch(err => {
@@ -628,6 +630,7 @@
        } else if (flag === 2) {
          getSignLink(this.dataId).then(res => {
            setTimeout(() => {
              this.visiblePhone=false
              window.open(res)
            }, 500)
          }).catch(err => {
company/src/components/common/UploadFile.vue
@@ -1,6 +1,7 @@
<template>
  <div>
    <el-upload
      ref="uploadFileBtn"
      class="upload-demo"
      :accept="uploadData.fileTyp"
      :action="uploadImgUrl"
@@ -12,7 +13,7 @@
      :before-upload="beforeFileUpload"
      :file-list="fileList">
    <el-button size="small" type="primary">点击上传</el-button>
    <div slot="tip" class="el-upload__tip">只能上传{{ uploadData.fileType }}文件,且不超过5mb</div>
    <div style="display: inline-block"  slot="tip" class="el-upload__tip">(只能上传{{ uploadData.fileType }}文件,且不超过5mb)</div>
  </el-upload>
  </div>
@@ -21,6 +22,10 @@
<script>
export default {
  props: {
    fileList:{
      type: Array,
      default: () => []
    },
    file: {
      type: Object,
      default: () => {}
@@ -34,17 +39,26 @@
  },
  data() {
    return {
      fileList:null,
      // fileList:[],
      uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/upload?folder='+this.uploadData.folder
    }
  },
  watch: {
    fileList (nv,ov) {
      if(this.fileList ==null){
        this.fileList = new Array();
      }
     // alert(this.fileList)
    }
  },
  methods: {
    removes() {
      this.$emit('remove')
    },
    // 上传图片
    handleExceed(){},
    handleExceed(){
      this.$message.error('只允许上传1个文件,请删除已传文件,重试!')
    },
    handleFileSuccess(res, file) {
      if (res.code == 200) {
        let { data } = res
@@ -52,16 +66,17 @@
        this.$message.success('上传成功')
        this.$emit('uploadSuccess', { fileurl: data.imgaddr, fileurlFull: data.url, name: data.originname })
      } else {
        this.$tip.apiFailed('上传失败')
        this.$message.apiFailed('上传失败')
      }
      this.$emit('uploadEnd')
    },
    uploadError() {
      this.$tip.apiFailed('上传失败')
      this.$message.apiFailed('上传失败')
      this.$emit('endUpload')
    },
    // // 拦截
    beforeFileUpload(file) {
      this.$emit('uploadBegin')
      return true
    }
@@ -81,7 +96,7 @@
  cursor: pointer;
  position: relative;
  width: $image-width;
  height: $image-width;
  height: auto;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -515,7 +515,7 @@
        InsuranceApply update = new InsuranceApply();
        update.setEditDate(new Date());
        update.setEditor(model.getCreator());
        update.setStatus(Constants.InsuranceApplyStatus.WTB_UPLOAD.getKey());
        update.setStatus(Constants.InsuranceApplyStatus.WTB_COMPANY_APPLY_SIGNATURE.getKey());
        update.setCheckDate(update.getEditDate());
        update.setCheckInfo("企业完成签署方案确认书");
        update.setCheckUserId(model.getCreator());
@@ -771,10 +771,10 @@
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                    continue;
                }
                uploadSignedFileDo(model,fileUrl,path+fileUrl);
                return;
//                return;
            }
        }
        //委托保 企业签署投保确认书
@@ -799,10 +799,10 @@
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                    continue;
                }
                uploadFAQRSSignedFileDo(model,fileUrl,path+fileUrl);
                return;
//                return;
            }
        }
@@ -828,10 +828,10 @@
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                    continue;
                }
                uploadApplyMemberListSignedFileDo(model,fileUrl,path+fileUrl);
                return;
//                return;
            }
        }
        
@@ -858,10 +858,10 @@
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                    continue;
                }
                uploadTBSQSSignedFileDo(model,fileUrl,path+fileUrl);
                return;
//                return;
            }
        }
        
@@ -890,10 +890,10 @@
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                    continue;
                }
                uploadChangeSignedFileDo(model,fileUrl,path+fileUrl);
                return;
//                return;
            }
        }
@@ -920,10 +920,10 @@
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                    continue;
                }
                uploadChangeMemberListSignedFileDo(model,fileUrl,path+fileUrl);
                return;
//                return;
            }
        }
@@ -947,10 +947,10 @@
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                    continue;
                }
                uploadUnionApplySignedFileDo(model,fileUrl,path+fileUrl);
                return;
//                return;
            }
        }
server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
@@ -1,5 +1,6 @@
package com.doumee.service.business.impl;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.LoginUserInfo;
@@ -37,6 +38,8 @@
@Service
public class SolutionsServiceImpl implements SolutionsService {
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
    @Autowired
    private MultifileMapper multifileMapper;
    @Autowired
@@ -98,6 +101,8 @@
            file.setObjId(solutions.getId());
            file.setObjType(Constants.MultiFile.SOLUTIONS_CONFIRMATION_LATTER.getKey());
            file.setType(Constants.formatIntegerNum(file.getType()));
            multifileMapper.insert(file);
           file.setObjId(newModel.getId());
            multifileMapper.insert(file);
        }
        return solutions.getId();
@@ -246,6 +251,8 @@
                file.setObjType(Constants.MultiFile.SOLUTIONS_CONFIRMATION_LATTER.getKey());
                file.setType(Constants.formatIntegerNum(file.getType()));
                multifileMapper.insert(file);
                file.setObjId(newModel.getId());
                multifileMapper.insert(file);
            }
        }
@@ -339,7 +346,11 @@
                .eq(Multifile::getObjType,Constants.MultiFile.SOLUTIONS_CONFIRMATION_LATTER.getKey())
                .eq(Multifile::getIsdeleted,Constants.ZERO)
                .last("limit 1"));
        if(f!=null && StringUtils.isNotBlank(f.getFileurl())){
            String url = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+systemDictDataBiz.queryByCode(Constants.OSS,Constants.APPLY_FILE).getCode()+f.getFileurl();
            f.setFileurlFull(url);
        model.setFanganFile(f);//方案确认书
        }
        return model;
    }