This commit is contained in:
=
2026-04-07 10:41:17 +08:00
parent fc1da7c37c
commit 0902cd4613
3 changed files with 136 additions and 3 deletions
@@ -40,6 +40,8 @@ layout("/layouts/platform.html"){
<el-card shadow="never" class="mt10">
<table-tool label="预算分配">
<el-button @click="showBatchAllocateDialog" size="small" type="primary" :loading="formLoading">一键分配
</el-button>
<el-button @click="doAllocateRecord" size="small" type="primary" :loading="formLoading">季度记录生成
</el-button>
@@ -95,6 +97,20 @@ layout("/layouts/platform.html"){
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<el-dialog title="一键分配所有工会额度" :visible.sync="batchAllocateDialogVisible" width="500px">
<el-form :model="batchAllocateForm" label-width="120px">
<el-form-item label="统一分配额度">
<el-input-number v-model="batchAllocateForm.allocateMoney" :min="0" :precision="2"
style="width: 100%" placeholder="请输入每个工会的分配额度">
</el-input-number>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="batchAllocateDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="doBatchAllocate" :loading="formLoading">确 定</el-button>
</span>
</el-dialog>
</template>
</guava>
</div>
@@ -119,6 +135,10 @@ layout("/layouts/platform.html"){
{prop: 'allocateMoney', label: '分配额度'},
],
quarterlyList: [],
batchAllocateDialogVisible: false,
batchAllocateForm: {
allocateMoney: 0
}
}
},
methods: {
@@ -176,6 +196,39 @@ layout("/layouts/platform.html"){
})
})
},
showBatchAllocateDialog() {
if (this.tableData.length === 0) {
this.$message.warning('当前没有可分配的工会记录,请先生成季度记录')
return
}
this.batchAllocateForm = {
allocateMoney: 0
}
this.batchAllocateDialogVisible = true
},
doBatchAllocate() {
if (!this.batchAllocateForm.allocateMoney || this.batchAllocateForm.allocateMoney <= 0) {
this.$message.warning('请输入有效的分配额度')
return
}
const quarter = this.$moment().quarter()
this.formLoading = true
this.$axios.post("/platform/outlay/outlayManage/unionAllocate/doBatchAllocate", {
allocateMoney: this.batchAllocateForm.allocateMoney,
quarterly: quarter,
year: this.pageForm.year
}).then((resp) => {
if (resp.code === 0) {
this.$message.success(resp.msg)
this.batchAllocateDialogVisible = false
this.doSearch()
}
}).finally(() => {
this.formLoading = false
})
},
},
created() {
this.$businessTool.listUnion().then((data) => {