困难帮扶移植

This commit is contained in:
=
2026-02-05 09:19:06 +08:00
parent 26486ef737
commit a71e169656
12 changed files with 1269 additions and 501 deletions
@@ -42,6 +42,7 @@ layout("/layouts/platform.html"){
<el-card shadow="never" class="mt10">
<table-tool :app="this" label="审批列表">
<el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button>
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
<el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button>
@@ -117,7 +118,7 @@ layout("/layouts/platform.html"){
return {
pageForm: {
year: this.$moment().format("YYYY"),
audit: false
audit: "false"
},
tableColumns: [
{ prop: "loginName", label: "受助人工号", sortable: true },
@@ -135,7 +136,6 @@ layout("/layouts/platform.html"){
unions: [],
units: [],
// 审核相关
formData: {},
showApprovalForm: false
}
@@ -143,6 +143,11 @@ layout("/layouts/platform.html"){
components: {
'info': INFO,
},
computed: {
hasUnapprovedItems() {
return this.tableData.some(item => item.taskState === 10);
}
},
methods: {
openView(row) {
this.$refs.guava.edit(() => {
@@ -150,6 +155,81 @@ layout("/layouts/platform.html"){
this.$refs.infoRef.onOpen(row)
})
},
allAudit() {
if (this.pageForm.audit !== "false" || !this.tableData || this.tableData.length === 0) {
this.$message.warning('没有待审核的数据!');
return;
}
const message = '确定要一键审核这 ' + this.tableData.length + ' 条记录吗?';
this.$confirm(message, '批量审核确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.batchApprove(this.tableData);
}).catch(() => {
});
},
async batchApprove(items) {
const loading = this.$loading({
lock: true,
text: '正在批量审核...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let successCount = 0;
let failCount = 0;
try {
for (let i = 0; i < items.length; i++) {
const item = items[i];
try {
await this.approveSingleItem(item);
successCount++;
} catch (error) {
failCount++;
}
}
loading.close();
if (failCount > 0) {
this.$message({
message: '批量审核完成:成功 ' + successCount + ' 条,失败 ' + failCount + ' 条',
type: 'warning'
});
} else {
this.$message({
message: '批量审核完成:成功 ' + successCount + ' 条',
type: 'success'
});
}
this.doSearch();
} catch (error) {
loading.close();
this.$message.error('批量审核过程中发生错误');
}
},
approveSingleItem(item) {
return new Promise((resolve, reject) => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
processTaskId: item.taskId,
tf_opinion: '审核通过',
submitType: 1
})
}).then((res) => {
if (res.code === 0) {
resolve(res);
} else {
reject(res);
}
}).catch((error) => {
reject(error);
});
});
},
openAudit(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = true
@@ -64,7 +64,7 @@ layout("/layouts/platform.html"){
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="250px">
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">
@@ -42,9 +42,11 @@ layout("/layouts/platform.html"){
<el-card shadow="never" class="mt10">
<table-tool label="数据列表">
<el-button @click="exportAllApply" size="mini" type="primary">导出申请表(压缩包)</el-button>
<el-button @click="exportSummaryXlsx" size="mini" type="primary">导出汇总表(excel)</el-button>
<el-button @click="exportSummaryDocx" size="mini" type="primary">导出汇总表(word)</el-button>
<el-button type="primary" size="small" @click="importMoney">导入实际金额</el-button>
<el-button @click="exportYearPayRecord" size="small" icon="el-icon-download" type="primary">导出补助金额</el-button>
<el-button @click="exportAllApply" size="small" type="primary">导出申请表(压缩包)</el-button>
<el-button @click="exportSummaryXlsx" size="small" type="primary">导出汇总表(excel)</el-button>
<el-button @click="exportSummaryDocx" size="small" type="primary">导出汇总表(word)</el-button>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
@@ -77,6 +79,14 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
</el-table>
<el-dialog title="人员导入" :visible.sync="importDialog" width="50%" :close-on-click-modal="false" :close-on-press-escape="false">
<file-import
ref="viewImport"
temp_url="/platform/difficultHelp/reading/downloadTemplate"
post_url="/platform/difficultHelp/reading/importMoney"
@flush="successImport"
></file-import>
</el-dialog>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
@@ -109,17 +119,27 @@ layout("/layouts/platform.html"){
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
{ prop: "applyTime", label: "申请时间", sortable: true },
{ prop: "applyCount", label: "申请次数", sortable: true },
{ prop: "taskName", label: "当前节点" },
{ prop: "instanceState", label: "流程状态" }
{ prop: "money", label: "实际金额", sortable: true },
// { prop: "taskName", label: "当前节点" },
// { prop: "instanceState", label: "流程状态" }
],
unions: [],
units: []
units: [],
importDialog: false,
}
},
components: {
'info': INFO
'info': INFO,
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue?v=" + new Date().getTime())
},
methods: {
importMoney() {
this.importDialog = true
},
successImport() {
this.importDialog = false
this.pageData()
},
openView(row) {
this.$refs.guava.view(() => {
this.$refs.infoRef.onOpen(row)
@@ -164,6 +184,9 @@ layout("/layouts/platform.html"){
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
}
},
exportYearPayRecord(){
this.$downLoad('/platform/difficultHelp/reading/exportYearPayRecord', this.pageForm)
},
exportAllApply() {
this.$downLoad('/platform/difficultHelp/reading/doExportAllApply', this.pageForm)
},
@@ -42,6 +42,7 @@ layout("/layouts/platform.html"){
<el-card shadow="never" class="mt10">
<table-tool :app="this" label="审批列表">
<el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button>
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
<el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button>
@@ -49,6 +50,7 @@ layout("/layouts/platform.html"){
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%">
<el-table-column :reserve-selection="true" type="selection" width="55"></el-table-column>
<el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column>
<el-table-column
@@ -79,6 +81,21 @@ layout("/layouts/platform.html"){
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<el-dialog title="设置审核信息" :visible.sync="dialogVisible" width="30%" center>
<el-form :model="formData" ref="formData" label-width="100px">
<el-form-item label="级别" prop="level" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<dict-select v-model="formData.level" code="DIFFICULT_LEVEL" style="width: 100%" placeholder="请选择级别"></dict-select>
</el-form-item>
<el-form-item label="审核金额" prop="money" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input-number placeholder="请输入金额" v-model="formData.money" style="width: 100%" :precision="2" :min="0"></el-input-number>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submitAudit">确 定</el-button>
</span>
</el-dialog>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
@@ -130,7 +147,7 @@ layout("/layouts/platform.html"){
return {
pageForm: {
year: this.$moment().format("YYYY"),
audit: false
audit: "false"
},
tableColumns: [
{ prop: "loginName", label: "受助人工号", sortable: true },
@@ -148,12 +165,17 @@ layout("/layouts/platform.html"){
unions: [],
units: [],
// 审核相关
formData: {
level: '',
money: 0,
tf_opinion: "",
},
showApprovalForm: false
showApprovalForm: false,
auditForm: {
level: '',
money: 0
},
dialogVisible: false
}
},
components: {
@@ -166,6 +188,101 @@ layout("/layouts/platform.html"){
this.$refs.infoRef.onOpen(row)
})
},
allAudit() {
const selectedRows = this.$refs.table.selection;
if (selectedRows.length === 0) {
this.$message.warning('请至少选择一条记录进行审核!');
return;
}
this.dialogVisible = true;
},
submitAudit() {
this.$refs.formData.validate((valid) => {
if (valid) {
const selectedRows = this.$refs.table.selection;
const message = '确定要审核这 ' + selectedRows.length + ' 条记录吗?';
this.$confirm(message, '批量审核确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.batchApprove(selectedRows);
this.dialogVisible = false;
}).catch(() => {
});
} else {
this.$message.error('请填写完整的审核信息!');
}
});
},
async batchApprove(items) {
const loading = this.$loading({
lock: true,
text: '正在批量审核...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let successCount = 0;
let failCount = 0;
try {
for (let i = 0; i < items.length; i++) {
const item = items[i];
try {
await this.approveSingleItem(item);
successCount++;
} catch (error) {
failCount++;
}
}
loading.close();
if (failCount > 0) {
this.$message({
message: '批量审核完成:成功 ' + successCount + ' 条,失败 ' + failCount + ' 条',
type: 'warning'
});
} else {
this.$message({
message: '批量审核完成:成功 ' + successCount + ' 条',
type: 'success'
});
}
this.doSearch();
} catch (error) {
loading.close();
this.$message.error('批量审核过程中发生错误');
}
},
approveSingleItem(item) {
return new Promise((resolve, reject) => {
this.$axios.post("/platform/difficultHelp/schoolUnionApproval/save", {
data: JSON.stringify({
...this.formData,
id: item.id
})
}).then((saveRes) => {
if (saveRes.code !== 0) {
throw new Error(saveRes.msg || '保存失败');
}
return this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
processTaskId: item.taskId,
tf_opinion: '审核通过',
submitType: 1,
})
});
}).then((taskRes) => {
if (taskRes.code === 0) {
resolve(taskRes);
} else {
throw new Error(taskRes.msg || '审批失败');
}
}).catch((error) => {
reject(error);
});
});
},
openAudit(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = true
@@ -42,6 +42,7 @@ layout("/layouts/platform.html"){
<el-card shadow="never" class="mt10">
<table-tool :app="this" label="审批列表">
<el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button>
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
<el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button>
@@ -117,7 +118,7 @@ layout("/layouts/platform.html"){
return {
pageForm: {
year: this.$moment().format("YYYY"),
audit: false
audit: "false"
},
tableColumns: [
{ prop: "loginName", label: "受助人工号", sortable: true },
@@ -135,7 +136,6 @@ layout("/layouts/platform.html"){
unions: [],
units: [],
// 审核相关
formData: {},
showApprovalForm: false
}
@@ -150,6 +150,81 @@ layout("/layouts/platform.html"){
this.$refs.infoRef.onOpen(row)
})
},
allAudit() {
if (this.pageForm.audit !== "false" || !this.tableData || this.tableData.length === 0) {
this.$message.warning('没有待审核的数据!');
return;
}
const message = '确定要一键审核这 ' + this.tableData.length + ' 条记录吗?';
this.$confirm(message, '批量审核确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.batchApprove(this.tableData);
}).catch(() => {
});
},
async batchApprove(items) {
const loading = this.$loading({
lock: true,
text: '正在批量审核...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let successCount = 0;
let failCount = 0;
try {
for (let i = 0; i < items.length; i++) {
const item = items[i];
try {
await this.approveSingleItem(item);
successCount++;
} catch (error) {
failCount++;
}
}
loading.close();
if (failCount > 0) {
this.$message({
message: '批量审核完成:成功 ' + successCount + ' 条,失败 ' + failCount + ' 条',
type: 'warning'
});
} else {
this.$message({
message: '批量审核完成:成功 ' + successCount + ' 条',
type: 'success'
});
}
this.doSearch();
} catch (error) {
loading.close();
this.$message.error('批量审核过程中发生错误');
}
},
approveSingleItem(item) {
return new Promise((resolve, reject) => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
processTaskId: item.taskId,
tf_opinion: '审核通过',
submitType: 1
})
}).then((res) => {
if (res.code === 0) {
resolve(res);
} else {
reject(res);
}
}).catch((error) => {
reject(error);
});
});
},
openAudit(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = true