工作组统计

This commit is contained in:
shenyanpei
2021-11-23 11:06:30 +08:00
parent a017489a21
commit 13b7c6db5d
@@ -7,10 +7,10 @@
<el-input v-model="formQuery.name" size="small" placeholder="请输入项目名称"></el-input>
</el-form-item>
<el-form-item label="支出金额">
<el-input v-model="formQuery.money" size="small" placeholder="请输入支出金额"></el-input>
<el-input v-model="formQuery.cost" size="small" placeholder="请输入支出金额"></el-input>
</el-form-item>
<el-form-item label="用途">
<el-input v-model="formQuery.use" size="small" placeholder="请输入用途">
<el-input v-model="formQuery.purposes" size="small" placeholder="请输入用途">
</el-input>
</el-form-item>
<el-form-item>
@@ -61,25 +61,23 @@
</el-table-column>
<el-table-column
align="center"
prop="money"
prop="cost"
label="支出金额">
</el-table-column>
<el-table-column
align="center"
prop="use"
prop="purposes"
label="用途">
</el-table-column>
<el-table-column
align="center"
prop="annex"
show-overflow-tooltip
prop="annexs"
label="详细附件">
<template slot-scope="scope">
<span v-if="scope.row.annex.length === 0">{{ '-' }}</span>
<span v-for="res in scope.row.annex" :key="res.id" style="color: #409EFF;">
<span v-if="scope.row.annexs === null || ''">{{ '-' }}</span>
<span v-for="res in JSON.parse(scope.row.annexs)" :key="res.id" style="color: #409EFF;" @click="previews(res.id)">
{{ res.name }} {{ ';'}}
</span>
<!--<el-button size="mini" type="primary" @click="fileDetail(scope.row)"></el-button>-->
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right">
@@ -119,15 +117,13 @@
</el-input>
</el-form-item>
<el-form-item label="支出金额">
<el-input v-model="formShowData.money" type="text" placeholder="请填写"></el-input>
<el-input v-model="formShowData.cost" type="text" placeholder="请填写"></el-input>
</el-form-item>
<el-form-item label="用途">
<el-input v-model="formShowData.use" type="text" placeholder="请填写">
<el-input v-model="formShowData.purposes" type="text" placeholder="请填写">
</el-input>
</el-form-item>
<el-form-item label="详细附件">
<el-input v-model="formShowData.annex" type="text">
</el-input>
<el-upload
:disabled="acceptShow"
multiple
@@ -139,6 +135,7 @@
:before-upload="handleBeforeUpload"
:before-remove="handleBeforeRemove"
:on-success="handleOnsuccess"
:on-preview="handleOnPreview"
>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
@@ -153,18 +150,6 @@
</el-drawer>
<el-dialog
:visible.sync="annexDialog"
width="30%"
:before-close="handleClose">
<el-upload
:action="''"
name="file"
:file-list="annexList"
:on-preview="handleOnPreview"
>
</el-upload>
</el-dialog>
<!-- <div>
&lt;!&ndash; 导入弹框 &ndash;&gt;
@@ -192,8 +177,8 @@ export default {
loading: false,
formQuery: {
name: '',
money: '',
use: '',
cost: '',
purposes: '',
current: 1,
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
@@ -204,9 +189,9 @@ export default {
formShowData: {
id: '',
name: '',
money: '',
use: '',
annex: ''
cost: '',
purposes: '',
annexs: ''
},
drawerTable: false,
@@ -240,6 +225,7 @@ export default {
//新增方法
dataAdd() {
this.drawerTitle = '新增'
this.annexList = []
this.formShowData = {}
this.drawerTable = true
},
@@ -257,6 +243,7 @@ export default {
this.$refs['formShowData'].validate((valid) => {
if (valid) {
this.submitLoading = true
this.formShowData.annexs = JSON.stringify(this.annexList)
if (this.drawerTitle === '新增') {
exportAdd(this.formShowData).then(res=>{
if (res.ok) {
@@ -337,14 +324,16 @@ export default {
}
},
editRowOne(item) {
this.annexList = []
this.drawerTitle = '编辑'
this.formShowData = {
id: item.id,
name: item.name,
money: item.money,
use: item.use,
annex: item.annex
cost: item.cost,
purposes: item.purposes,
annexs: item.annexs
}
this.annexList = JSON.parse(this.formShowData.annexs)
this.drawerTable = true
},
deleteRowOne(val) {
@@ -385,30 +374,32 @@ export default {
this.getTableData()
},
/** 附件详情 */
fileDetail(val) {
/* fileDetail(val) {
this.tableFile = val
this.annexList = this.tableFile.annex
this.annexList = this.tableFile.annexs
this.annexDialog = true
this.acceptShow = true
},
},*/
// 文件上传成功
handleOnsuccess(res, file, fileList) {
if (res.ok) {
if (this.annexList !== undefined) {
console.log(this.annexList)
if (this.annexList !== undefined ) {
this.newDataList = this.annexList
this.newDataList.push({
id: res.data.attId,
name: res.data.standName
name: res.data.standName,
allName: res.data.name
})
} else {
this.newDataList.push({
id: res.data.attId,
name: res.data.standName
name: res.data.standName,
allName: res.data.name
})
}
this.tableFile.annex = this.newDataList
this.annexList = this.newDataList
this.$message({
showClose: true,
message: res.message,
@@ -425,7 +416,6 @@ export default {
this.annexList.splice(index,1)
}
})
this.tableFile.annex = this.annexList
},
// 文件上传限制条件
handleBeforeUpload(file) {
@@ -459,6 +449,13 @@ export default {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
/** 点击对应附件进行下载*/
previews(val) {
let attId = val
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
}
}
}
</script>