|
@@ -21,6 +21,7 @@
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-button v-if="panduanbtn" @click="ExportGroupZip" type="primary">下载票据</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="billUploading-content">
|
|
<div class="billUploading-content">
|
|
<div class="billUploading-content-table">
|
|
<div class="billUploading-content-table">
|
|
@@ -35,6 +36,9 @@
|
|
<el-table-column
|
|
<el-table-column
|
|
label="操作"
|
|
label="操作"
|
|
width="180">
|
|
width="180">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button size="mini" @click="DeleteGroupFile(scope.row)" type="danger" icon="el-icon-delete"></el-button>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
@@ -44,15 +48,18 @@
|
|
action="http://132.232.92.186:8888/api/Groups/CommonSaveFile"
|
|
action="http://132.232.92.186:8888/api/Groups/CommonSaveFile"
|
|
:on-preview="handlePreview"
|
|
:on-preview="handlePreview"
|
|
:on-remove="handleRemove"
|
|
:on-remove="handleRemove"
|
|
|
|
+ :on-success="handleSuccess"
|
|
:before-remove="beforeRemove"
|
|
:before-remove="beforeRemove"
|
|
multiple
|
|
multiple
|
|
- :limit="3"
|
|
|
|
|
|
+ :limit="9"
|
|
:data="datas"
|
|
:data="datas"
|
|
:on-exceed="handleExceed"
|
|
:on-exceed="handleExceed"
|
|
:file-list="fileList"
|
|
:file-list="fileList"
|
|
name="files">
|
|
name="files">
|
|
- <el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
|
|
|
+ <div style="display: flex;">
|
|
|
|
+ <el-button style="margin-right: 10px;" size="small" type="primary">点击上传</el-button>
|
|
|
|
+ <div slot="tip" class="el-upload__tip">选择文件上传,且不超过20M。</div>
|
|
|
|
+ </div>
|
|
</el-upload>
|
|
</el-upload>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -63,6 +70,7 @@ export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
DiId:'',
|
|
DiId:'',
|
|
|
|
+ userId:'',
|
|
datas:{},
|
|
datas:{},
|
|
fileList: [
|
|
fileList: [
|
|
// {name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'},
|
|
// {name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'},
|
|
@@ -71,7 +79,8 @@ export default {
|
|
delegationInfoList:[],
|
|
delegationInfoList:[],
|
|
Ctable:'',
|
|
Ctable:'',
|
|
Ctablelist:[],
|
|
Ctablelist:[],
|
|
- tableData:[]
|
|
|
|
|
|
+ tableData:[],
|
|
|
|
+ panduanbtn:false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
@@ -134,8 +143,11 @@ export default {
|
|
handlePreview(file) {
|
|
handlePreview(file) {
|
|
console.log(file);
|
|
console.log(file);
|
|
},
|
|
},
|
|
|
|
+ handleSuccess(file){
|
|
|
|
+ this.QueryGroupModelFile();
|
|
|
|
+ },
|
|
handleExceed(files, fileList) {
|
|
handleExceed(files, fileList) {
|
|
- this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
|
|
|
|
|
|
+ this.$message.warning(`当前限制选择 9 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
|
|
},
|
|
},
|
|
beforeRemove(file, fileList) {
|
|
beforeRemove(file, fileList) {
|
|
return this.$confirm(`确定移除 ${ file.name }?`);
|
|
return this.$confirm(`确定移除 ${ file.name }?`);
|
|
@@ -170,7 +182,7 @@ export default {
|
|
ctable: that.Ctable,
|
|
ctable: that.Ctable,
|
|
diid: that.DiId,
|
|
diid: that.DiId,
|
|
cid:0,
|
|
cid:0,
|
|
- userid:that.userId
|
|
|
|
|
|
+ userid:that.panduanuserid(that.userId)
|
|
}
|
|
}
|
|
}).then(function (res) {
|
|
}).then(function (res) {
|
|
if(res.data.code==200){
|
|
if(res.data.code==200){
|
|
@@ -183,12 +195,90 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ //下载票据
|
|
|
|
+ ExportGroupZip(){
|
|
|
|
+ var url = "/api/Groups/ExportGroupZip"
|
|
|
|
+ var that = this
|
|
|
|
+ this.$axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: url,
|
|
|
|
+ headers: {
|
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
|
+ },
|
|
|
|
+ data:{
|
|
|
|
+ diid: that.DiId,
|
|
|
|
+ }
|
|
|
|
+ }).then(function (res) {
|
|
|
|
+ if(res.data.code==200){
|
|
|
|
+ window.open(res.data.data.url)
|
|
|
|
+ that.$message({
|
|
|
|
+ message:res.data.msg ,
|
|
|
|
+ type: 'success',
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ that.$message({
|
|
|
|
+ message:res.data.msg ,
|
|
|
|
+ type: 'warning',
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //删除
|
|
|
|
+ DeleteGroupFile(row){
|
|
|
|
+ this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ var url = "/api/Groups/DeleteGroupFile"
|
|
|
|
+ var that = this
|
|
|
|
+ this.$axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: url,
|
|
|
|
+ headers: {
|
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
|
+ },
|
|
|
|
+ data:{
|
|
|
|
+ id: row.id,
|
|
|
|
+ userId: that.userId,
|
|
|
|
+ }
|
|
|
|
+ }).then(function (res) {
|
|
|
|
+ if(res.data.code==200){
|
|
|
|
+ that.$message({
|
|
|
|
+ message:res.data.msg ,
|
|
|
|
+ type: 'success',
|
|
|
|
+ });
|
|
|
|
+ that.QueryGroupModelFile();
|
|
|
|
+ }else{
|
|
|
|
+ that.$message({
|
|
|
|
+ message:res.data.msg ,
|
|
|
|
+ type: 'warning',
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '已取消删除'
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ //panduan
|
|
|
|
+ panduanuserid(val){
|
|
|
|
+ if(val==187||val==21||val==22){
|
|
|
|
+ this.panduanbtn=true;
|
|
|
|
+ return -1
|
|
|
|
+ }else{
|
|
|
|
+ this.panduanbtn=false;
|
|
|
|
+ return val
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
mounted(){
|
|
mounted(){
|
|
this.token = JSON.parse(localStorage.getItem('userinif')).token;
|
|
this.token = JSON.parse(localStorage.getItem('userinif')).token;
|
|
this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
|
|
this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
|
|
this.GetGroupNameList();
|
|
this.GetGroupNameList();
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -208,10 +298,7 @@ export default {
|
|
color: #606266;
|
|
color: #606266;
|
|
font-size: 15px;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
-
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
.billUploading-head {
|
|
.billUploading-head {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
@@ -226,6 +313,5 @@ export default {
|
|
}
|
|
}
|
|
.billUploading-content-upload{
|
|
.billUploading-content-upload{
|
|
width: 38%;
|
|
width: 38%;
|
|
-
|
|
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|