|
@@ -6,7 +6,7 @@
|
|
|
</div>
|
|
|
<div class="ps-title">PS:"请规范录入,未规范录入,造成公司损失或影响提成计算,需承担责任"</div>
|
|
|
</div>
|
|
|
- <hr style='background-color:#5555; height:1px; border:none;' />
|
|
|
+ <hr style='background-color:#5555; height:1px; border:none;margin: 8px 0;' />
|
|
|
<div>
|
|
|
<el-form :model="delegationInfo" label-width="100px" class="demo-ruleForm">
|
|
|
<div style="display: flex;flex-wrap: wrap;">
|
|
@@ -212,7 +212,8 @@
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div style="width:770px;">
|
|
|
- <el-form-item label="邮件截图:" prop="attendees" label-width="160px">
|
|
|
+ <el-form-item label="邮件截图:" label-width="160px">
|
|
|
+ <span style="display: inline-block;position: absolute;left: -82px;color: red;">*</span>
|
|
|
<!-- <el-upload
|
|
|
ref="Emailscreenshotref"
|
|
|
:action="Emailscreenshoturl"
|
|
@@ -238,10 +239,11 @@
|
|
|
:on-change="handleChange"
|
|
|
:on-remove="handleRemove"
|
|
|
:on-preview="handlePreview"
|
|
|
+ :before-remove="beforeRemove"
|
|
|
name="files"
|
|
|
>
|
|
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
|
- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
|
|
|
+ <!-- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> -->
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -291,7 +293,8 @@
|
|
|
<el-form-item>
|
|
|
<div style="text-align: right;">
|
|
|
<el-button type="primary" @click="addBtn">保存</el-button>
|
|
|
- <el-button v-if="btnPermissions" type="primary">确认</el-button>
|
|
|
+ <el-button v-if="btnPermissions&&confirmTheInvitation==0" @click="OfficialActivitiesInviteOperation(1)" type="primary">复核确认</el-button>
|
|
|
+ <el-button v-if="btnPermissions&&confirmTheInvitation==1" @click="OfficialActivitiesInviteOperation(0)" type="primary">取消确认</el-button>
|
|
|
<el-button @click="returnbtn">取消</el-button>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
@@ -304,6 +307,7 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ confirmTheInvitation:0,
|
|
|
title: "新增公务出访客户资料",
|
|
|
token: '',
|
|
|
userId: 0,
|
|
@@ -412,6 +416,9 @@ export default {
|
|
|
{ required: true, message: '该信息为必填信息', trigger: 'blur' },
|
|
|
{ required: true, message: '该信息为必填信息', trigger: 'change' },
|
|
|
],
|
|
|
+ fileList: [
|
|
|
+ { required: true, message: '该信息为必填信息', trigger: 'change' },
|
|
|
+ ],
|
|
|
},
|
|
|
uploadURL: "http://localhost:5256/api/Resource/UploadOfficialActivities",
|
|
|
uploadFiles1: [],
|
|
@@ -639,12 +646,12 @@ export default {
|
|
|
that.OpOfficialActivitiesDto.area = dataList.area;
|
|
|
that.OpOfficialActivitiesDto.field = dataList.field;
|
|
|
that.OpOfficialActivitiesDto.reqSample = dataList.reqSample;
|
|
|
-
|
|
|
+ that.confirmTheInvitation=dataList.confirmTheInvitation
|
|
|
// that.fileList
|
|
|
+ that.fileList=[]
|
|
|
for(let i=0;i<dataList.screenshotOfMailUrls.length;i++){
|
|
|
that.fileList.push({'name':dataList.screenshotOfMailUrls[i].split('/')[7],'url':dataList.screenshotOfMailUrls[i]})
|
|
|
}
|
|
|
- console.log(that.fileList);
|
|
|
}
|
|
|
|
|
|
})
|
|
@@ -654,6 +661,11 @@ export default {
|
|
|
this.$message.error("请选择团组名称");
|
|
|
return;
|
|
|
}
|
|
|
+ if(this.fileList.length<=0){
|
|
|
+ this.$message.error("请先选取邮件截图");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.submitUpload();
|
|
|
const that = this;
|
|
|
that.OpOfficialActivitiesDto.createUserId = that.userId
|
|
|
that.OpOfficialActivitiesDto.diId = that.DiId
|
|
@@ -881,18 +893,63 @@ export default {
|
|
|
console.log(fileList);
|
|
|
this.fileList = fileList
|
|
|
},
|
|
|
+ //删除文件
|
|
|
+ beforeRemove(file,fileList){
|
|
|
+ if(file && file.status=="success"){
|
|
|
+ return this.$confirm('此文件已上传至服务器此操作将永久删除该文件, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ // this.$message({
|
|
|
+ // type: 'success',
|
|
|
+ // message: '删除成功!'
|
|
|
+ // });
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ });
|
|
|
+ reject(false)
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
// 删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。function(file, fileList)
|
|
|
handleRemove(file, fileList) {
|
|
|
this.fileList = fileList
|
|
|
+ if (file && file.status=="success") {
|
|
|
+ var that = this;
|
|
|
+ var url = "/api/Resource/OfficialActivitiesDelFile"
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ id:that.id,
|
|
|
+ fileName:file.name
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message.success(res.data.msg);
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
//点击文件列表中已上传的文件
|
|
|
handlePreview(file){
|
|
|
console.log(file);
|
|
|
window.open(file.url);
|
|
|
},
|
|
|
+
|
|
|
//上传服务器
|
|
|
submitUpload() {
|
|
|
// console.log(this.id);
|
|
|
+ var verdict=false
|
|
|
if(this.id==undefined){
|
|
|
this.id==0
|
|
|
}
|
|
@@ -907,12 +964,17 @@ export default {
|
|
|
const formData = new FormData()
|
|
|
// 你可以使用FormData.append来添加键/值对到表单里面;
|
|
|
this.fileList.forEach((file) => {
|
|
|
- formData.append('files', file.raw);
|
|
|
+ if(file.raw!=undefined){
|
|
|
+ verdict=true;
|
|
|
+ formData.append('files', file.raw);
|
|
|
+ }
|
|
|
})
|
|
|
formData.append('id', this.Emailscreenshotdata.id);
|
|
|
formData.append('diId', this.Emailscreenshotdata.diId);
|
|
|
formData.append('currUserId', this.Emailscreenshotdata.currUserId);
|
|
|
-
|
|
|
+ if(!verdict){
|
|
|
+ return
|
|
|
+ }
|
|
|
var that = this;
|
|
|
var url = "/api/Resource/OfficialActivitiesUploadFiles"
|
|
|
this.$axios({
|
|
@@ -926,11 +988,37 @@ export default {
|
|
|
if (res.data.code == 200) {
|
|
|
that.$message.success(res.data.msg);
|
|
|
that.fileList = []
|
|
|
+ for(let i=0;i<res.data.data.fileUrls.length;i++){
|
|
|
+ that.fileList.push({'name':res.data.data.fileUrls[i].split('/')[7],'url':res.data.data.fileUrls[i]})
|
|
|
+ }
|
|
|
} else {
|
|
|
that.$message.error(res.data.msg);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ //确认邀请
|
|
|
+ OfficialActivitiesInviteOperation(val){
|
|
|
+ var that = this;
|
|
|
+ var url = "/api/Resource/OfficialActivitiesInviteOperation"
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ id:that.id,
|
|
|
+ type:val
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.QueryOfficialActivitiesById()
|
|
|
+ that.$message.success(res.data.msg);
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
mounted() {
|