179 lines
6.1 KiB
HTML
179 lines
6.1 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<style>
|
|
.text {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.item {
|
|
margin-bottom: 18px;
|
|
}
|
|
|
|
.clearfix:before,
|
|
.clearfix:after {
|
|
display: table;
|
|
content: "";
|
|
}
|
|
|
|
.clearfix:after {
|
|
clear: both
|
|
}
|
|
|
|
.box-card {
|
|
width: 700px;
|
|
}
|
|
</style>
|
|
|
|
<div id="app" v-cloak>
|
|
<guava>
|
|
<el-card shadow="never" style="width: 40%;margin: 0 auto">
|
|
<h3 slot="header" style="color: rgb(24, 103, 176); ">设置年度费用额度</h3>
|
|
<div style="padding-bottom: 50px;">
|
|
<vi-title class="mt10" title="校工会预算设置"></vi-title>
|
|
<el-row :gutter="20">
|
|
<el-col :span="24">
|
|
<el-input :disabled="schoolDisabled" :placeholder="this.schoolInput"
|
|
clearable placeholder="校工会"
|
|
style="width:400px" v-model="formData.schoolMoney">
|
|
<template slot="prepend">校工会</template>
|
|
</el-input>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
<vi-title class="mt20" title="分工会预算设置"></vi-title>
|
|
<el-row :gutter="20">
|
|
<el-col :span="24">
|
|
<el-input :disabled="unionDisabled" :placeholder="this.unionInput"
|
|
clearable placeholder="分工会"
|
|
style="width:400px" v-model="formData.union_avg">
|
|
<template slot="prepend">分工会</template>
|
|
</el-input>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
<vi-title class="mt20" title="社团预算设置"></vi-title>
|
|
<el-row :gutter="20">
|
|
<el-col :span="24">
|
|
<el-input :disabled="clubDisabled" placeholder="基础人数"
|
|
clearable
|
|
style="width:400px" v-model="formData.clubExceedNum">
|
|
<template slot="prepend">基础人数</template>
|
|
</el-input>
|
|
</el-col>
|
|
<el-col :span="24" class="mt10">
|
|
<el-input :disabled="clubDisabled" placeholder="每人费用"
|
|
clearable
|
|
style="width:400px" v-model="formData.club_avg">
|
|
<template slot="prepend">每人费用</template>
|
|
</el-input>
|
|
</el-col>
|
|
|
|
<el-col :span="24" class="mt10">
|
|
<el-input clearable style="width:400px" v-model="formData.clubLeastMoney"
|
|
placeholder="基础额度">
|
|
<template slot="prepend">基础额度
|
|
</template>
|
|
</el-input>
|
|
</el-col>
|
|
<el-col :span="24" class="mt10">
|
|
<el-input clearable style="width:400px" v-model="formData.clubAtMostMoney"
|
|
placeholder="最高限额">
|
|
<template slot="prepend">最高限额
|
|
</template>
|
|
</el-input>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
<el-row class="mt20" type="flex" justify="end">
|
|
<el-button @click="set" type="primary" v-loading="loading">确认</el-button>
|
|
</el-row>
|
|
</div>
|
|
</el-card>
|
|
</guava>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
|
var vue = new Vue({
|
|
el: "#app",
|
|
data() {
|
|
return {
|
|
loading: "",
|
|
schoolDisabled: false,
|
|
unionDisabled: false,
|
|
schoolInput: "",
|
|
unionInput: "",
|
|
clubDisabled: false,
|
|
clubInput: "",
|
|
union: 2,
|
|
club: 3,
|
|
formData: {},
|
|
formRules: {
|
|
schoolMoney: [{
|
|
required: true,
|
|
message: '请选择是否启用',
|
|
trigger: ['blur', 'change']
|
|
}],
|
|
avglocalUnion: [{
|
|
required: true,
|
|
message: '请选择是否启用',
|
|
trigger: ['blur', 'change']
|
|
}],
|
|
avgAssociation: [{
|
|
required: true,
|
|
message: '请选择是否启用',
|
|
trigger: ['blur', 'change']
|
|
}],
|
|
}
|
|
}
|
|
|
|
},
|
|
methods: {
|
|
|
|
// 回显
|
|
async echo() {
|
|
const {data} = await $.get("/platform/jf/costsSet/costsSet/echo")
|
|
if (data) {
|
|
this.formData = data
|
|
}
|
|
},
|
|
|
|
// 设置是否
|
|
async set() {
|
|
const confirm = await this.$confirm('设置年度费用将清空前一次设置的预算是否继续!!!!', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
})
|
|
if (confirm === "confirm") {
|
|
this.loading = true;
|
|
const resp = await $.post("/platform/jf/costsSet/costsSet/set", this.formData)
|
|
if (resp.code == 0) {
|
|
this.loading = false;
|
|
this.$notify({
|
|
title: '成功',
|
|
message: '操作成功',
|
|
type: 'success'
|
|
});
|
|
} else {
|
|
this.$notify.error({
|
|
title: '错误',
|
|
message: '操作失败'
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
this.echo();
|
|
}
|
|
});
|
|
|
|
</script>
|
|
|
|
<!--#
|
|
}
|
|
#--> |