|
@@ -194,21 +194,15 @@
|
|
|
@click="submitUpload2">上传</el-button>
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
- <div style="width: 33%;display: flex;">
|
|
|
- <div style="width: 10%;">
|
|
|
- 发票:
|
|
|
- </div>
|
|
|
- <div style="width: 90%;">
|
|
|
- <el-upload :file-list="uploadFiles3" ref="upload3" :on-success="upLoadSuccess3"
|
|
|
- :on-error="upLoadError3" :before-remove="beforeRemove3" :on-change="onChange3" :limit="1"
|
|
|
- :on-exceed="exceed3" :action="uploadURL" :headers="headers3" :auto-upload="false">
|
|
|
- <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
|
- <el-button style="margin-left: 10px;" size="small" type="success"
|
|
|
- @click="submitUpload3">上传</el-button>
|
|
|
- </el-upload>
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
+ <div style="width: 33%;">
|
|
|
+ 发票:
|
|
|
+ <el-upload :file-list="uploadFiles3" ref="upload3" :on-success="upLoadSuccess3" :on-error="upLoadError3"
|
|
|
+ :before-remove="beforeRemove3" :on-change="onChange3" :limit="1" :on-exceed="exceed3"
|
|
|
+ :action="uploadURL" :headers="headers3" :auto-upload="false">
|
|
|
+ <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
|
+ <el-button style="margin-left: 10px;" size="small" type="success"
|
|
|
+ @click="submitUpload3">上传</el-button>
|
|
|
+ </el-upload>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -295,16 +289,42 @@ export default {
|
|
|
Authorization: 'Bearer ' + this.token
|
|
|
},
|
|
|
data: {
|
|
|
- diid: that.diId
|
|
|
+ diid: that.DiId
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
|
that.deleFile = res.data.data.deleFile;
|
|
|
+ that.deleFile.forEach(function (item) {
|
|
|
+ if (item.kind == 1) {
|
|
|
+ that.uploadFiles1.push({
|
|
|
+ name: item.fileName,
|
|
|
+ url: 'http://localhost:5256/Office/GrpFile/团组增减款项相关文件/',
|
|
|
+ id: item.id
|
|
|
+ });
|
|
|
+ } else if (item.kind == 2) {
|
|
|
+ that.uploadFiles2.push({
|
|
|
+ name: item.fileName,
|
|
|
+ url: 'http://localhost:5256/Office/GrpFile/团组增减款项相关文件/',
|
|
|
+ id: item.id
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else if (item.kind == 3) {
|
|
|
+ that.uploadFiles3.push({
|
|
|
+ name: item.fileName,
|
|
|
+ url: 'http://localhost:5256/Office/GrpFile/团组增减款项相关文件/',
|
|
|
+ id: item.id
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ console.log(that.uploadFiles1)
|
|
|
+ console.log(that.uploadFiles2)
|
|
|
+ console.log(that.uploadFiles3)
|
|
|
+
|
|
|
that.delegationInfoList = res.data.data.delegation;
|
|
|
that.OfficialFormList = res.data.data.setData;
|
|
|
if (that.OfficialFormList.length != 0) {
|
|
|
-
|
|
|
that.OpOfficialActivitiesDto.officialForm = that.OfficialFormList[0].id
|
|
|
}
|
|
|
for (let index = 0; index < that.delegationInfoList.length; index++) {
|
|
@@ -366,9 +386,6 @@ export default {
|
|
|
that.OpOfficialActivitiesDto.trip = dataList.trip
|
|
|
that.OpOfficialActivitiesDto.createUserId = dataList.createUserId
|
|
|
that.OpOfficialActivitiesDto.remark = dataList.remark
|
|
|
-
|
|
|
- var DeleFileList = res.data.data.deleFile;
|
|
|
- console.log(DeleFileList)
|
|
|
}
|
|
|
|
|
|
})
|
|
@@ -429,8 +446,30 @@ export default {
|
|
|
upLoadError1(response, file, fileList) {
|
|
|
console.log("项目添加失败");
|
|
|
},
|
|
|
+ //取消文件时的钩子
|
|
|
beforeRemove1(file, fileList) {
|
|
|
-
|
|
|
+ const that = this;
|
|
|
+ var url = "/api/Resource/DelloadOfficialActivities"
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ Id: file.id,
|
|
|
+ DeleteUserId: that.userId
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
onChange1(file, fileList) {
|
|
|
|
|
@@ -457,7 +496,28 @@ export default {
|
|
|
console.log("项目添加失败");
|
|
|
},
|
|
|
beforeRemove2(file, fileList) {
|
|
|
-
|
|
|
+ const that = this;
|
|
|
+ var url = "/api/Resource/DelloadOfficialActivities"
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ Id: file.id,
|
|
|
+ DeleteUserId: that.userId
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
onChange2(file, fileList) {
|
|
|
|
|
@@ -483,10 +543,28 @@ export default {
|
|
|
console.log("项目添加失败");
|
|
|
},
|
|
|
beforeRemove3(file, fileList) {
|
|
|
-
|
|
|
- },
|
|
|
- onChange3(file, fileList) {
|
|
|
-
|
|
|
+ const that = this;
|
|
|
+ var url = "/api/Resource/DelloadOfficialActivities"
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ Id: file.id,
|
|
|
+ DeleteUserId: that.userId
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
},
|
|
|
|