Merge pull request 'fix : 修改专项资金' (#295) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/295
This commit is contained in:
2024-06-06 14:59:03 +00:00
3 changed files with 43 additions and 5 deletions

View File

@@ -50,7 +50,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<div v-if="formData.taskId">
<div v-if="data.taskId">
<baseTitle title="审核意见"></baseTitle>
<el-form-item prop="auditOpinion">
<el-input
@@ -72,8 +72,7 @@
</div>
</div>
</el-form>
<opinion v-if="data.taskId" :formData="data.formData" :taskId="data.taskId"></opinion>
<opinion v-if="data.taskId" :formData="data.formData" :taskId="data.taskId" v-model:value="formData.auditOpinion"></opinion>
</div>
</template>

View File

@@ -510,6 +510,11 @@ const getDetailInfo = async () => {
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
if(res.data.formData.specialFund===null&&res.data.formData.isSpecialFund===null){
res.data.formData.isSpecialFund=false
}else if(res.data.formData.specialFund&&res.data.formData.isSpecialFund===null){
res.data.formData.isSpecialFund=true
}
formData.value = res.data.formData
loading.value = false
}

View File

@@ -35,11 +35,12 @@
<script setup lang="jsx">
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
import {ElNotification} from "element-plus";
import {ElMessageBox, ElNotification} from "element-plus";
import {addFund, resubmitFund, getFundDetail,getFundProcess} from "@/api/special-fund";
import {useRouter} from "vue-router";
import {useTagsView} from '@/stores/tagsview.js'
import {useProcessStore} from '@/stores/processStore.js';
import {downloadFile,deleteFile} from "@/api/project-demand";
const tagsViewStore = useTagsView()
const router = useRouter()
@@ -91,6 +92,7 @@ const tableConfig = reactive({
return (
<div>
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
<el-button type="primary" link onClick={() => handleDelete(row)}>删除</el-button>
</div>
)
}
@@ -103,7 +105,39 @@ const rules = reactive({
fundAmount: [{required: true, message: '请输入金额', trigger: 'blur'}],
introduce: [{required: true, message: '请输入介绍', trigger: 'blur'}],
})
const handleDownload = (row) => {
downloadFile(row.fileId).then(res => {
const blob = new Blob([res])
let a = document.createElement('a')
a.href = URL.createObjectURL(blob)
a.download = row.originalFileName
a.click()
})
}
const handleDelete = (row) => {
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteFile(row.fileId).then(res => {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
formData.value.files.splice(formData.value.files.findIndex((item) => item.id === row.fileId), 1);
}
});
}).catch(() => {
ElNotification({
title: '提示',
message: '用户取消删除! ',
type: 'warning'
})
})
}
const compositeParam = (item) => {
let tag = ''
if (routerName.value === 'Fund/add' || routerName.value === 'Fund/edit') {