|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
|
<div v-loading="fullscreenLoading">
|
|
|
- <el-dialog top="35vh" width="400px" title="合同下载" :visible.sync="contractVisible">
|
|
|
- <el-button type="primary">主要按钮</el-button>
|
|
|
- <el-button type="primary">主要按钮</el-button>
|
|
|
+ <el-dialog top="35vh" width="240px" title="合同下载" :visible.sync="contractVisible">
|
|
|
+ <el-button @click="DownGroupContractFile(hetonggroupId,1)" type="primary">合同一</el-button>
|
|
|
+ <el-button @click="DownGroupContractFile(hetonggroupId,2)" type="primary">合同二</el-button>
|
|
|
</el-dialog>
|
|
|
<el-dialog top="35vh" width="400px" title="团组清单下载" :visible.sync="groupVisible">
|
|
|
<el-date-picker
|
|
@@ -157,9 +157,8 @@
|
|
|
@click="handleEdit(scope.$index, scope.row)"><i class="el-icon-edit"></i></el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
- @click="contracton"
|
|
|
title="合同下载"
|
|
|
- ><i class="el-icon-document"></i></el-button>
|
|
|
+ @click="contracton(scope.row)"><i class="el-icon-document"></i></el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
title="删除"
|
|
@@ -267,11 +266,9 @@ export default {
|
|
|
customertypeoptions:[],
|
|
|
customerleveloptions:[],
|
|
|
contractVisible:false,
|
|
|
+ hetonggroupId:0,
|
|
|
}
|
|
|
},
|
|
|
- contracton(){
|
|
|
- this.contractVisible=true
|
|
|
- },
|
|
|
activated() {
|
|
|
if(!this.$route.meta.isBack){
|
|
|
// 如果isBack是false,表明需要获取新数据,否则就不再请求,直接使用缓存的数据
|
|
@@ -321,6 +318,41 @@ export default {
|
|
|
}
|
|
|
console.log(that.count)
|
|
|
})
|
|
|
+ },
|
|
|
+ //合同下载
|
|
|
+ DownGroupContractFile(val,vals){
|
|
|
+ var url = "/api/Groups/DownGroupContractFile"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer '
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ groupId:val,
|
|
|
+ fileType:vals,
|
|
|
+ userId:that.userid,
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message:res.data.msg ,
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ window.open(res.data.data.url);
|
|
|
+ that.contractVisible=false;
|
|
|
+ }else{
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ that.contractVisible=false;
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ contracton(val){
|
|
|
+ this.hetonggroupId=0;
|
|
|
+ this.hetonggroupId=val.id;
|
|
|
+ this.contractVisible=true
|
|
|
},
|
|
|
//每页条数改变时触发 选择一页显示多少行
|
|
|
handleSizeChange(val) {
|