|
@@ -10,7 +10,7 @@
|
|
|
@click.stop="addMainProject">复制新单
|
|
|
</el-button>
|
|
|
<el-button class="el-button--small-yh add-customer-btn" type="primary"
|
|
|
- @click.stop="editMainProject"
|
|
|
+ @click.stop="editFinance "
|
|
|
>{{this.id?"确认修改" :"确认新增"}}
|
|
|
</el-button>
|
|
|
</div>
|
|
@@ -42,8 +42,7 @@
|
|
|
@selection-change="selectionChange"
|
|
|
@current-change="currentChange"
|
|
|
@size-change="sizeChange"
|
|
|
- @refresh-change="refreshChange"
|
|
|
- @on-load="onLoad">
|
|
|
+ @refresh-change="refreshChange">
|
|
|
<template slot="menuLeft">
|
|
|
<el-button type="primary"
|
|
|
size="small"
|
|
@@ -88,13 +87,14 @@
|
|
|
|
|
|
<script>
|
|
|
import option from "./configuration/detailsPage.json";
|
|
|
+ import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
form: {},
|
|
|
option: option,
|
|
|
- parentId:0,
|
|
|
+ id:'',
|
|
|
dataList: [],
|
|
|
page: {
|
|
|
pageSize: 10,
|
|
@@ -268,7 +268,13 @@
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
-
|
|
|
+ if (this.$route.query.id) {
|
|
|
+ this.id = BigInt(this.$route.query.id);//字符串转数字 超长用BigInt
|
|
|
+ getDetail(this.id).then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ // dataList
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
option.height = window.innerHeight - 640 ;
|
|
@@ -289,8 +295,20 @@
|
|
|
refreshChange() {
|
|
|
console.log('1')
|
|
|
},
|
|
|
- onLoad(page, params = {}) {
|
|
|
- this.page.total = 1;
|
|
|
+ editFinance(){
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
+ if(valid){
|
|
|
+ const params = {
|
|
|
+ ...this.form,
|
|
|
+ billType:"收费"
|
|
|
+ }
|
|
|
+ editFinance(params).then(res =>{
|
|
|
+ if(res.data.success){
|
|
|
+ this.$message.success("操作成功!")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
backToList(){
|
|
|
this.$router.$avueRouter.closeTag();
|