|
@@ -1,211 +1,197 @@
|
|
<template>
|
|
<template>
|
|
<div class="manage">
|
|
<div class="manage">
|
|
- <div class="add-container">
|
|
|
|
|
|
+ <div class="add-container">
|
|
<el-button type="primary" @click="append('INCOME')">增加收入</el-button>
|
|
<el-button type="primary" @click="append('INCOME')">增加收入</el-button>
|
|
</div>
|
|
</div>
|
|
<el-card class="right-card">
|
|
<el-card class="right-card">
|
|
- <el-table
|
|
|
|
- :data="manageData"
|
|
|
|
- style="width: 100%"
|
|
|
|
- :row-class-name="tableRowClassName">
|
|
|
|
- <el-table-column type="expand">
|
|
|
|
|
|
+ <el-table :data="manageData" style="width: 100%" :row-class-name="tableRowClassName">
|
|
|
|
+ <!-- <el-table-column type="expand">
|
|
<template slot-scope="props">
|
|
<template slot-scope="props">
|
|
<el-form label-position="left" inline class="demo-table-expand">
|
|
<el-form label-position="left" inline class="demo-table-expand">
|
|
<el-form-item label="备注">
|
|
<el-form-item label="备注">
|
|
<span>{{ props.row.remark ? props.row.remark : '无' }}</span>
|
|
<span>{{ props.row.remark ? props.row.remark : '无' }}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="接收部门">
|
|
<el-form-item label="接收部门">
|
|
- <span>{{ props.row.toDepartment.name ? props.row.toDepartment.name : '无' }}</span>
|
|
|
|
|
|
+ <span>{{ props.row.toDepartment.name ? props.row.toDepartment.name : '无' }}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="接受项目">
|
|
<el-form-item label="接受项目">
|
|
- <span>{{ props.row.toProject.name ? props.row.toProject.name : '无' }}</span>
|
|
|
|
|
|
+ <span>{{ props.row.toProject.name ? props.row.toProject.name : '无' }}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</template>
|
|
</template>
|
|
|
|
+ </el-table-column> -->
|
|
|
|
+ <el-table-column label="收入状态">
|
|
|
|
+ <template slot-scope="props">
|
|
|
|
+ <span>{{ props.row.incomeStatus == 'INVOICE' ? '开票/应收' : props.row.incomeStatus == 'ARRIVAL' ? '到账' : '内部核算' }}</span>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- label="收入状态">
|
|
|
|
- <template slot-scope="props">
|
|
|
|
- <span>{{ props.row.incomeStatus == 'INVOICE' ? '开票/应收' : props.row.incomeStatus == 'ARRIVAL' ? '到账' : '内部核算' }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- label="归属部门"
|
|
|
|
- prop="department.name">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- label="归属项目"
|
|
|
|
- prop="project.name">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- label="产品"
|
|
|
|
- prop="product.name">
|
|
|
|
|
|
+ <el-table-column label="归属部门" prop="department.name"></el-table-column>
|
|
|
|
+ <el-table-column label="归属项目" prop="project.name"></el-table-column>
|
|
|
|
+ <el-table-column label="产品" prop="product.name"></el-table-column>
|
|
|
|
+ <el-table-column label="接收部门" prop="toDepartment.name"></el-table-column>
|
|
|
|
+ <el-table-column label="接受项目" prop="toProject.name"></el-table-column>
|
|
|
|
+ <el-table-column label="备注" prop="remark"></el-table-column>
|
|
|
|
+ <el-table-column label="金额">
|
|
|
|
+ <template slot-scope="props">
|
|
|
|
+ <span>{{ props.row.type == 'COST' ? '-' + props.row.amount : '+' + props.row.amount }}</span>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- label="金额">
|
|
|
|
- <template slot-scope="props">
|
|
|
|
- <span>{{ props.row.type == 'COST' ? '-' + props.row.amount : '+' + props.row.amount }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
<el-table-column label="操作" width="80">
|
|
<el-table-column label="操作" width="80">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button
|
|
|
|
- size="mini"
|
|
|
|
- @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
|
|
|
|
|
+ <el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
|
<!--
|
|
<!--
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="danger"
|
|
type="danger"
|
|
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
|
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
|
- -->
|
|
|
|
|
|
+ -->
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
- </el-card>
|
|
|
|
- <el-dialog :title="type == 'INCOME' ? '收入' : '成本'" :visible.sync="dialogFormVisible">
|
|
|
|
|
|
+ </el-card>
|
|
|
|
+ <el-dialog :title="type == 'INCOME' ? '收入' : '成本'" :visible.sync="dialogFormVisible">
|
|
<el-form :model="form" ref="form">
|
|
<el-form :model="form" ref="form">
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="发生时间"
|
|
|
|
+ prop="happenTime"
|
|
|
|
+ :label-width="formLabelWidth"
|
|
|
|
+ :rules="[{ required: true, message: '名称不能为空'}]"
|
|
|
|
+ >
|
|
|
|
+ <!--<el-input v-model="form.happenTime" autocomplete="off" placeholder="请输入格式2019/00/00"></el-input>-->
|
|
|
|
+ <el-date-picker v-model="form.happenTime" type="date" placeholder="选择日期"></el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="金额"
|
|
|
|
+ prop="amount"
|
|
|
|
+ :label-width="formLabelWidth"
|
|
|
|
+ :rules="[
|
|
|
|
+ { required: true, message: '编码不能为空'},
|
|
|
|
+ // { type: 'float', message: '金额必须为数字值'}
|
|
|
|
+ ]"
|
|
|
|
+ >
|
|
|
|
+ <el-input style="width: 35%;" v-model="form.amount" autocomplete="off"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="收入状态"
|
|
|
|
+ prop="incomeStatus"
|
|
|
|
+ :label-width="formLabelWidth"
|
|
|
|
+ :rules="[{ required: true, message: '状态不能为空'}]"
|
|
|
|
+ >
|
|
|
|
+ <el-select v-model="form.incomeStatus" placeholder="请选择状态值">
|
|
|
|
+ <el-option key label="无" value></el-option>
|
|
|
|
+ <el-option label="开票/应收" value="INVOICE"></el-option>
|
|
|
|
+ <el-option label="到账" value="ARRIVAL"></el-option>
|
|
|
|
+ <el-option label="内部核算" value="INTERNAL"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
|
|
+ <el-form-item label="归属产品" prop="productId" :label-width="formLabelWidth">
|
|
|
|
+ <el-select v-model="form.productId" placeholder="请选择产品">
|
|
|
|
+ <el-option key label="无" value></el-option>
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in productSelectData"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="归属项目" prop="projectId" :label-width="formLabelWidth">
|
|
<el-form-item label="归属项目" prop="projectId" :label-width="formLabelWidth">
|
|
<el-select v-model="form.projectId" placeholder="请选择项目">
|
|
<el-select v-model="form.projectId" placeholder="请选择项目">
|
|
- <el-option
|
|
|
|
- key=""
|
|
|
|
- label="无"
|
|
|
|
- value="">
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ <el-option key label="无" value></el-option>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in projectSelectData"
|
|
v-for="item in projectSelectData"
|
|
:key="item.id"
|
|
:key="item.id"
|
|
:label="item.name"
|
|
:label="item.name"
|
|
- :value="item.id">
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="归属产品" prop="productId" :label-width="formLabelWidth">
|
|
|
|
- <el-select v-model="form.productId" placeholder="请选择产品">
|
|
|
|
- <el-option
|
|
|
|
- key=""
|
|
|
|
- label="无"
|
|
|
|
- value="">
|
|
|
|
- </el-option>
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in productSelectData"
|
|
|
|
- :key="item.id"
|
|
|
|
- :label="item.name"
|
|
|
|
- :value="item.id">
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="收入状态" prop="incomeStatus" :label-width="formLabelWidth" :rules="[{ required: true, message: '状态不能为空'}]">
|
|
|
|
- <el-select v-model="form.incomeStatus" placeholder="请选择状态值">
|
|
|
|
- <el-option
|
|
|
|
- key=""
|
|
|
|
- label="无"
|
|
|
|
- value="">
|
|
|
|
- </el-option>
|
|
|
|
- <el-option label="开票/应收" value="INVOICE"></el-option>
|
|
|
|
- <el-option label="到账" value="ARRIVAL"></el-option>
|
|
|
|
- <el-option label="内部核算" value="INTERNAL"></el-option>
|
|
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="金额" prop="amount" :label-width="formLabelWidth" :rules="[
|
|
|
|
- { required: true, message: '编码不能为空'},
|
|
|
|
- { type: 'number', message: '排序必须为数字值'}
|
|
|
|
- ]">
|
|
|
|
- <el-input style="width: 30%;" v-model.number="form.amount" autocomplete="off"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="来源部门" prop="toDeptId" :label-width="formLabelWidth">
|
|
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
|
|
+ <el-form-item label="来源部门" prop="toDeptId" :label-width="formLabelWidth">
|
|
<el-select v-model="form.toDeptId" placeholder="请选择部门">
|
|
<el-select v-model="form.toDeptId" placeholder="请选择部门">
|
|
- <el-option
|
|
|
|
- key=""
|
|
|
|
- label="无"
|
|
|
|
- value="">
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ <el-option key label="无" value></el-option>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in teamSelectData"
|
|
v-for="item in teamSelectData"
|
|
:key="item.id"
|
|
:key="item.id"
|
|
:label="item.name"
|
|
:label="item.name"
|
|
- :value="item.id">
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="来源项目" prop="toProjectId" :label-width="formLabelWidth">
|
|
|
|
|
|
+ <el-form-item label="来源项目" prop="toProjectId" :label-width="formLabelWidth">
|
|
<el-select v-model="form.toProjectId" placeholder="请选择项目">
|
|
<el-select v-model="form.toProjectId" placeholder="请选择项目">
|
|
- <el-option
|
|
|
|
- key=""
|
|
|
|
- label="无"
|
|
|
|
- value="">
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ <el-option key label="无" value></el-option>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in projectSelectData"
|
|
v-for="item in projectSelectData"
|
|
:key="item.id"
|
|
:key="item.id"
|
|
:label="item.name"
|
|
:label="item.name"
|
|
- :value="item.id">
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="发生时间" prop="happenTime" :label-width="formLabelWidth" :rules="[{ required: true, message: '名称不能为空'}]">
|
|
|
|
- <!--<el-input v-model="form.happenTime" autocomplete="off" placeholder="请输入格式2019/00/00"></el-input>-->
|
|
|
|
- <el-date-picker
|
|
|
|
- v-model="form.happenTime"
|
|
|
|
- type="date"
|
|
|
|
- placeholder="选择日期">
|
|
|
|
- </el-date-picker>
|
|
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="归属部门" prop="deptId" :label-width="formLabelWidth" >
|
|
|
|
|
|
+
|
|
|
|
+ <el-form-item label="归属部门" prop="deptId" :label-width="formLabelWidth">
|
|
<el-select v-model="form.deptId" placeholder="请选择部门" ref="select" @change="getName">
|
|
<el-select v-model="form.deptId" placeholder="请选择部门" ref="select" @change="getName">
|
|
- <el-option
|
|
|
|
- key=""
|
|
|
|
- label="无"
|
|
|
|
- value="">
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ <el-option key label="无" value></el-option>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in teamSelectData"
|
|
v-for="item in teamSelectData"
|
|
:key="item.id"
|
|
:key="item.id"
|
|
:label="item.name"
|
|
:label="item.name"
|
|
- :value="item.id">
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="添加备注" prop="remark" :label-width="formLabelWidth">
|
|
<el-form-item label="添加备注" prop="remark" :label-width="formLabelWidth">
|
|
<el-input type="textarea" :rows="2" v-model="form.remark" autocomplete="off"></el-input>
|
|
<el-input type="textarea" :rows="2" v-model="form.remark" autocomplete="off"></el-input>
|
|
- </el-form-item>
|
|
|
|
|
|
+ </el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button @click="resetForm('form')">取 消</el-button>
|
|
<el-button @click="resetForm('form')">取 消</el-button>
|
|
<el-button type="primary" @click="submitForm('form')">确 定</el-button>
|
|
<el-button type="primary" @click="submitForm('form')">确 定</el-button>
|
|
</div>
|
|
</div>
|
|
- </el-dialog>
|
|
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getTeamSelect, getProjectSelect, getProductSelect, getCostTeamSelect, getCostTypeSelect, addManage, getManageList, setManage } from '@/api/manageApi'
|
|
|
|
|
|
+import {
|
|
|
|
+ getTeamSelect,
|
|
|
|
+ getProjectSelect,
|
|
|
|
+ getProductSelect,
|
|
|
|
+ getCostTeamSelect,
|
|
|
|
+ getCostTypeSelect,
|
|
|
|
+ addManage,
|
|
|
|
+ getManageList,
|
|
|
|
+ setManage
|
|
|
|
+} from "@/api/manageApi";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- type: '',
|
|
|
|
|
|
+ type: "",
|
|
dialogFormVisible: false,
|
|
dialogFormVisible: false,
|
|
addFlag: false,
|
|
addFlag: false,
|
|
- id: '',
|
|
|
|
|
|
+ id: "",
|
|
form: {
|
|
form: {
|
|
- deptId: '',
|
|
|
|
- projectId: '',
|
|
|
|
- costTypeId: '',
|
|
|
|
- companyId: '',
|
|
|
|
- companyType: '',
|
|
|
|
- happenTime: '',
|
|
|
|
- incomeStatus: '',
|
|
|
|
- productId: '',
|
|
|
|
- toProjectId: '',
|
|
|
|
- remark: '',
|
|
|
|
- amount: '',
|
|
|
|
- toDeptId: '',
|
|
|
|
- deptName: '',
|
|
|
|
- code: '',
|
|
|
|
- name: '',
|
|
|
|
- status: 'NORMAL',
|
|
|
|
- sort: ''
|
|
|
|
|
|
+ deptId: "",
|
|
|
|
+ projectId: "",
|
|
|
|
+ costTypeId: "",
|
|
|
|
+ companyId: "",
|
|
|
|
+ companyType: "",
|
|
|
|
+ happenTime: "",
|
|
|
|
+ incomeStatus: "",
|
|
|
|
+ productId: "",
|
|
|
|
+ toProjectId: "",
|
|
|
|
+ remark: "",
|
|
|
|
+ amount: "",
|
|
|
|
+ toDeptId: "",
|
|
|
|
+ deptName: "",
|
|
|
|
+ code: "",
|
|
|
|
+ name: "",
|
|
|
|
+ status: "NORMAL",
|
|
|
|
+ sort: ""
|
|
},
|
|
},
|
|
- formLabelWidth: '120px',
|
|
|
|
|
|
+ formLabelWidth: "120px",
|
|
teamSelectData: [],
|
|
teamSelectData: [],
|
|
projectSelectData: [],
|
|
projectSelectData: [],
|
|
productSelectData: [],
|
|
productSelectData: [],
|
|
@@ -213,63 +199,64 @@ export default {
|
|
costTypeSelectData: [],
|
|
costTypeSelectData: [],
|
|
manageData: [],
|
|
manageData: [],
|
|
companyData: []
|
|
companyData: []
|
|
- }
|
|
|
|
|
|
+ };
|
|
},
|
|
},
|
|
- created () {
|
|
|
|
|
|
+ created() {
|
|
// 获取部门下拉框
|
|
// 获取部门下拉框
|
|
getTeamSelect().then(res => {
|
|
getTeamSelect().then(res => {
|
|
this.teamSelectData = res.data.data;
|
|
this.teamSelectData = res.data.data;
|
|
- })
|
|
|
|
|
|
+ });
|
|
// 获取项目下拉框
|
|
// 获取项目下拉框
|
|
getProjectSelect().then(res => {
|
|
getProjectSelect().then(res => {
|
|
this.projectSelectData = res.data.data;
|
|
this.projectSelectData = res.data.data;
|
|
- })
|
|
|
|
|
|
+ });
|
|
//获取产品下拉框
|
|
//获取产品下拉框
|
|
getProductSelect().then(res => {
|
|
getProductSelect().then(res => {
|
|
this.productSelectData = res.data.data;
|
|
this.productSelectData = res.data.data;
|
|
- })
|
|
|
|
|
|
+ });
|
|
//获取经营列表
|
|
//获取经营列表
|
|
getManageList({
|
|
getManageList({
|
|
- type: 'INCOME'
|
|
|
|
|
|
+ type: "INCOME"
|
|
}).then(res => {
|
|
}).then(res => {
|
|
this.manageData = res.data.data;
|
|
this.manageData = res.data.data;
|
|
- })
|
|
|
|
|
|
+ console.log(res.data.data)
|
|
|
|
+ });
|
|
//获取单位下拉
|
|
//获取单位下拉
|
|
getCostTeamSelect().then(res => {
|
|
getCostTeamSelect().then(res => {
|
|
this.costTeamSelectData = res.data.data;
|
|
this.costTeamSelectData = res.data.data;
|
|
- })
|
|
|
|
|
|
+ });
|
|
//获取成本类型下拉
|
|
//获取成本类型下拉
|
|
getCostTypeSelect().then(res => {
|
|
getCostTypeSelect().then(res => {
|
|
this.costTypeSelectData = res.data.data;
|
|
this.costTypeSelectData = res.data.data;
|
|
- })
|
|
|
|
|
|
+ });
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- tableRowClassName({row, rowIndex}) {
|
|
|
|
- if (row.type === 'COST') {
|
|
|
|
- return 'cost-row';
|
|
|
|
|
|
+ tableRowClassName({ row, rowIndex }) {
|
|
|
|
+ if (row.type === "COST") {
|
|
|
|
+ return "cost-row";
|
|
} else {
|
|
} else {
|
|
- return 'income-row';
|
|
|
|
|
|
+ return "income-row";
|
|
}
|
|
}
|
|
- return '';
|
|
|
|
|
|
+ return "";
|
|
},
|
|
},
|
|
//获取部门名称
|
|
//获取部门名称
|
|
- getName (val) {
|
|
|
|
|
|
+ getName(val) {
|
|
let obj = {};
|
|
let obj = {};
|
|
- obj = this.teamSelectData.find((item)=>{
|
|
|
|
|
|
+ obj = this.teamSelectData.find(item => {
|
|
return item.id === val;
|
|
return item.id === val;
|
|
});
|
|
});
|
|
- let getName = ''
|
|
|
|
|
|
+ let getName = "";
|
|
this.form.deptName = obj.name;
|
|
this.form.deptName = obj.name;
|
|
},
|
|
},
|
|
// 添加
|
|
// 添加
|
|
- append (type) {
|
|
|
|
|
|
+ append(type) {
|
|
this.type = type;
|
|
this.type = type;
|
|
this.dialogFormVisible = true;
|
|
this.dialogFormVisible = true;
|
|
- this.addFlag = true
|
|
|
|
|
|
+ this.addFlag = true;
|
|
},
|
|
},
|
|
// 编辑
|
|
// 编辑
|
|
handleEdit(index, row) {
|
|
handleEdit(index, row) {
|
|
- console.log(row)
|
|
|
|
|
|
+ console.log(row);
|
|
//回显赋值
|
|
//回显赋值
|
|
this.type = row.type;
|
|
this.type = row.type;
|
|
this.form.deptId = row.department.id;
|
|
this.form.deptId = row.department.id;
|
|
@@ -297,28 +284,28 @@ export default {
|
|
if (valid) {
|
|
if (valid) {
|
|
this.form.happenTime = new Date(this.form.happenTime) * 1;
|
|
this.form.happenTime = new Date(this.form.happenTime) * 1;
|
|
this.form.type = this.type;
|
|
this.form.type = this.type;
|
|
- if(this.addFlag) {
|
|
|
|
|
|
+ if (this.addFlag) {
|
|
addManage(this.form).then(res => {
|
|
addManage(this.form).then(res => {
|
|
- console.log(res)
|
|
|
|
|
|
+ console.log(res);
|
|
//获取经营列表
|
|
//获取经营列表
|
|
getManageList({
|
|
getManageList({
|
|
- type: 'INCOME'
|
|
|
|
|
|
+ type: "INCOME"
|
|
}).then(res => {
|
|
}).then(res => {
|
|
this.manageData = res.data.data;
|
|
this.manageData = res.data.data;
|
|
- })
|
|
|
|
|
|
+ });
|
|
this.$refs[formName].resetFields();
|
|
this.$refs[formName].resetFields();
|
|
- })
|
|
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
this.form.id = this.id;
|
|
this.form.id = this.id;
|
|
setManage(this.form).then(res => {
|
|
setManage(this.form).then(res => {
|
|
//获取经营列表
|
|
//获取经营列表
|
|
getManageList({
|
|
getManageList({
|
|
- type: 'INCOME'
|
|
|
|
|
|
+ type: "INCOME"
|
|
}).then(res => {
|
|
}).then(res => {
|
|
this.manageData = res.data.data;
|
|
this.manageData = res.data.data;
|
|
- })
|
|
|
|
|
|
+ });
|
|
this.$refs[formName].resetFields();
|
|
this.$refs[formName].resetFields();
|
|
- })
|
|
|
|
|
|
+ });
|
|
}
|
|
}
|
|
this.dialogFormVisible = false;
|
|
this.dialogFormVisible = false;
|
|
} else {
|
|
} else {
|
|
@@ -327,45 +314,45 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 取消
|
|
// 取消
|
|
- resetForm (formName) {
|
|
|
|
|
|
+ resetForm(formName) {
|
|
this.$refs[formName].resetFields();
|
|
this.$refs[formName].resetFields();
|
|
this.dialogFormVisible = false;
|
|
this.dialogFormVisible = false;
|
|
- }
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scope>
|
|
<style scope>
|
|
- .manage {
|
|
|
|
- padding: 20px;
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- }
|
|
|
|
- .add-container {
|
|
|
|
- float: right;
|
|
|
|
- margin-bottom: 20px;
|
|
|
|
- }
|
|
|
|
- .right-card {
|
|
|
|
- width: 100%;
|
|
|
|
- margin: 0 auto;
|
|
|
|
- }
|
|
|
|
- .demo-table-expand {
|
|
|
|
- font-size: 0;
|
|
|
|
- }
|
|
|
|
- .demo-table-expand label {
|
|
|
|
- width: 90px;
|
|
|
|
- color: #99a9bf;
|
|
|
|
- }
|
|
|
|
- .demo-table-expand .el-form-item {
|
|
|
|
- margin-right: 0;
|
|
|
|
- margin-bottom: 0;
|
|
|
|
- width: 50%;
|
|
|
|
- }
|
|
|
|
- .el-table .cost-row {
|
|
|
|
- color: green;
|
|
|
|
- }
|
|
|
|
|
|
+.manage {
|
|
|
|
+ padding: 20px;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+}
|
|
|
|
+.add-container {
|
|
|
|
+ float: right;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+}
|
|
|
|
+.right-card {
|
|
|
|
+ width: 100%;
|
|
|
|
+ margin: 0 auto;
|
|
|
|
+}
|
|
|
|
+.demo-table-expand {
|
|
|
|
+ font-size: 0;
|
|
|
|
+}
|
|
|
|
+.demo-table-expand label {
|
|
|
|
+ width: 90px;
|
|
|
|
+ color: #99a9bf;
|
|
|
|
+}
|
|
|
|
+.demo-table-expand .el-form-item {
|
|
|
|
+ margin-right: 0;
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
+ width: 50%;
|
|
|
|
+}
|
|
|
|
+.el-table .cost-row {
|
|
|
|
+ color: green;
|
|
|
|
+}
|
|
|
|
|
|
- .el-table .income-row {
|
|
|
|
- color: red;
|
|
|
|
- }
|
|
|
|
|
|
+.el-table .income-row {
|
|
|
|
+ color: red;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|
|
|
|
|