From 9dc6e13e7aea2e6e6f8e32fdd2152d4ce9cb76a1 Mon Sep 17 00:00:00 2001
From: nidapeng <jp@doumee.com>
Date: 星期五, 29 三月 2024 18:08:33 +0800
Subject: [PATCH] 提交一把
---
company/src/components/business/OperaWtbApplyShopWindow.vue | 3 +
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java | 30 +++++++-------
server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java | 13 ++++++
company/src/components/common/UploadFile.vue | 35 ++++++++++++-----
company/src/components/business/OperaSolutionsWindow.vue | 18 ++++++++
5 files changed, 72 insertions(+), 27 deletions(-)
diff --git a/company/src/components/business/OperaSolutionsWindow.vue b/company/src/components/business/OperaSolutionsWindow.vue
index b123011..c48dbfe 100644
--- a/company/src/components/business/OperaSolutionsWindow.vue
+++ b/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
diff --git a/company/src/components/business/OperaWtbApplyShopWindow.vue b/company/src/components/business/OperaWtbApplyShopWindow.vue
index 96f358a..9273804 100644
--- a/company/src/components/business/OperaWtbApplyShopWindow.vue
+++ b/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 => {
diff --git a/company/src/components/common/UploadFile.vue b/company/src/components/common/UploadFile.vue
index 03d73b0..9218330 100644
--- a/company/src/components/common/UploadFile.vue
+++ b/company/src/components/common/UploadFile.vue
@@ -1,6 +1,7 @@
<template>
<div>
<el-upload
+ ref="uploadFileBtn"
class="upload-demo"
:accept="uploadData.fileTyp"
:action="uploadImgUrl"
@@ -11,8 +12,8 @@
:on-error="uploadError"
: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>
+ <el-button size="small" type="primary" >鐐瑰嚮涓婁紶</el-button>
+ <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: () => {}
@@ -28,40 +33,50 @@
tipsLabel: '',
customStyle: {
type: String,
- default: 'width: 190px; height: 190px;'
+ default: 'width: 190px; height: 190px;'
},
uploadData: Object
},
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
// this.fileList = [{name: data.originname, url: data.url }]
this.$message.success('涓婁紶鎴愬姛')
- this.$emit('uploadSuccess', { fileurl: data.imgaddr, fileurlFull: data.url, name: data.originname })
+ 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 {
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
index 34c9fa3..e352d37 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
+++ b/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;
}
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
index dea6695..82c40bd 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
+++ b/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"));
- model.setFanganFile(f);//鏂规纭涔�
+ 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;
}
--
Gitblit v1.9.3