|
|
|
|
@ -1,59 +1,58 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<xy-dialog
|
|
|
|
|
ref="dialog"
|
|
|
|
|
:is-show.sync="isShow"
|
|
|
|
|
type="form"
|
|
|
|
|
:title="type === 'add' ? '新增实际使用金额' : '编辑实际使用金额'"
|
|
|
|
|
:form="form"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
@submit="submit"
|
|
|
|
|
>
|
|
|
|
|
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '新增实际使用金额' : '编辑实际使用金额'"
|
|
|
|
|
:form="form" :rules="rules" @submit="submit">
|
|
|
|
|
<template v-slot:reason>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label"><span style="color: red; font-weight: 600; padding-right: 4px">*</span>事由:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.reason" clearable placeholder="请输入事由" style="width: 300px"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:plan_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red; font-weight: 600; padding-right: 4px"
|
|
|
|
|
>*</span
|
|
|
|
|
>
|
|
|
|
|
<span style="color: red; font-weight: 600; padding-right: 4px">*</span>
|
|
|
|
|
资金来源:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<div class="planTitle" @click="$refs.actualPicker.isShow=true">{{form.plan_title}}</div>
|
|
|
|
|
<!-- <el-input
|
|
|
|
|
v-model="form.plan_title"
|
|
|
|
|
disabled
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请输入备注"
|
|
|
|
|
style="width: 300px"
|
|
|
|
|
@click="$refs.actualPicker.isShow=true"
|
|
|
|
|
></el-input> -->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:use_money>
|
|
|
|
|
|
|
|
|
|
<template v-slot:money>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label"><span style="color: red; font-weight: 600; padding-right: 4px"
|
|
|
|
|
>*</span
|
|
|
|
|
>使用金额 :</div>
|
|
|
|
|
<div class="xy-table-item-label"><span style="color: red; font-weight: 600; padding-right: 4px">*</span>金额:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.use_money"
|
|
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请输入备注"
|
|
|
|
|
style="width: 300px"
|
|
|
|
|
></el-input>
|
|
|
|
|
<el-input v-model="form.money" clearable placeholder="请输入金额" style="width: 300px"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<!-- <template v-slot:use_money>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label"><span style="color: red; font-weight: 600; padding-right: 4px">*</span>已使用金额:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.use_money" clearable placeholder="请输入已使用金额" style="width: 300px"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template> -->
|
|
|
|
|
</xy-dialog>
|
|
|
|
|
<actualPicker ref="actualPicker" @refresh="getPlanId"></actualPicker>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { editorActual, detailActual } from "@/api/budget/actual";
|
|
|
|
|
import {
|
|
|
|
|
editorActual,
|
|
|
|
|
detailActual
|
|
|
|
|
} from "@/api/budget/actual";
|
|
|
|
|
import actualPicker from "@/components/PlanPicker/actualPicker.vue"
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
@ -65,25 +64,31 @@ export default {
|
|
|
|
|
id: "",
|
|
|
|
|
type: "",
|
|
|
|
|
form: {
|
|
|
|
|
reason: '',
|
|
|
|
|
plan_id: '',
|
|
|
|
|
use_money:'',
|
|
|
|
|
money: '',
|
|
|
|
|
// use_money: '',
|
|
|
|
|
plan_title: ''
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
plan_id: [
|
|
|
|
|
{
|
|
|
|
|
reason: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "请填写事由",
|
|
|
|
|
}],
|
|
|
|
|
plan_id: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "请选择资金来源",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
use_money: [
|
|
|
|
|
{
|
|
|
|
|
}],
|
|
|
|
|
money:[{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "请填写使用金额",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
message: "请填写金额",
|
|
|
|
|
}],
|
|
|
|
|
// use_money: [{
|
|
|
|
|
// required: true,
|
|
|
|
|
// message: "请填写已使用金额",
|
|
|
|
|
// }],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
show() {
|
|
|
|
|
@ -94,8 +99,11 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
init() {
|
|
|
|
|
this.form = {
|
|
|
|
|
reason: '',
|
|
|
|
|
plan_id: '',
|
|
|
|
|
use_money:''
|
|
|
|
|
money:'',
|
|
|
|
|
// use_money: '',
|
|
|
|
|
plan_title: ''
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
setForm(key = [], value = []) {
|
|
|
|
|
@ -112,7 +120,9 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getDetail() {
|
|
|
|
|
const res = await detailActual({ id: this.id });
|
|
|
|
|
const res = await detailActual({
|
|
|
|
|
id: this.id
|
|
|
|
|
});
|
|
|
|
|
this.$integrateData(this.form, res);
|
|
|
|
|
this.form.plan_title = res.plan ? res.plan.name : ''
|
|
|
|
|
},
|
|
|
|
|
@ -138,10 +148,9 @@ export default {
|
|
|
|
|
editorActual(this.form).then((res) => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message:
|
|
|
|
|
this.type === "add"
|
|
|
|
|
? "新增实际使用金额"
|
|
|
|
|
: "编辑实际使用金额" + "成功",
|
|
|
|
|
message: this.type === "add" ?
|
|
|
|
|
"新增资金调节记录" :
|
|
|
|
|
"编辑资金调节记录" + "成功",
|
|
|
|
|
});
|
|
|
|
|
this.isShow = false;
|
|
|
|
|
this.$emit("refresh");
|
|
|
|
|
@ -170,9 +179,11 @@ export default {
|
|
|
|
|
.xy-table-item-label {
|
|
|
|
|
width: 180px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-input__inner {
|
|
|
|
|
text-align: left;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .planTitle {
|
|
|
|
|
width: 300px;
|
|
|
|
|
display: flex;
|
|
|
|
|
@ -190,6 +201,7 @@ export default {
|
|
|
|
|
outline: 0;
|
|
|
|
|
padding: 0 15px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.img__delete {
|
|
|
|
|
transform: scale(0.8, 0.8);
|
|
|
|
|
|
|
|
|
|
|