|
@@ -41,6 +41,38 @@
|
|
@click="handleDelete">删 除
|
|
@click="handleDelete">删 除
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template slot-scope="{disabled,size}" slot="startCodeSearch">
|
|
|
|
+ <search-query :datalist="startCodeData"
|
|
|
|
+ :selectValue="query.startCode"
|
|
|
|
+ :filterable="true"
|
|
|
|
+ :clearable="true"
|
|
|
|
+ :remote="true"
|
|
|
|
+ :buttonIf="false"
|
|
|
|
+ :forParameter="{key:'id',label:'code',value:'code'}"
|
|
|
|
+ @corpFocus="startCodeDatafun"
|
|
|
|
+ @remoteMethod="startCodeDatafun"
|
|
|
|
+ @corpChange="corpChange($event,'startCode')">
|
|
|
|
+ </search-query>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot-scope="{disabled,size}" slot="endCodeSearch">
|
|
|
|
+ <search-query :datalist="endCodeData"
|
|
|
|
+ :selectValue="query.endCode"
|
|
|
|
+ :filterable="true"
|
|
|
|
+ :clearable="true"
|
|
|
|
+ :remote="true"
|
|
|
|
+ :buttonIf="false"
|
|
|
|
+ :forParameter="{key:'id',label:'code',value:'code'}"
|
|
|
|
+ @corpFocus="endCodeDatafun"
|
|
|
|
+ @remoteMethod="endCodeDatafun"
|
|
|
|
+ @corpChange="corpChange($event,'endCode')">
|
|
|
|
+ </search-query>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot-scope="{disabled,size}" slot="isYearMothSearch">
|
|
|
|
+ <el-checkbox v-model="query.isYearMoth" :true-label="1" :false-label="0" @change="isYearMothfun" ></el-checkbox>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot-scope="{disabled,size}" slot="isBalanceSearch">
|
|
|
|
+ <el-checkbox v-model="query.isBalance" :true-label="1" :false-label="0" ></el-checkbox>
|
|
|
|
+ </template>
|
|
<template slot-scope="{disabled,size}" slot="isForeignDetermineSearch">
|
|
<template slot-scope="{disabled,size}" slot="isForeignDetermineSearch">
|
|
<el-checkbox v-model="isForeignDetermine" @change="isForeignDeterminefun" ></el-checkbox>
|
|
<el-checkbox v-model="isForeignDetermine" @change="isForeignDeterminefun" ></el-checkbox>
|
|
</template>
|
|
</template>
|
|
@@ -57,14 +89,26 @@ import {
|
|
fingenlegRemove,
|
|
fingenlegRemove,
|
|
fingenlegInitialization
|
|
fingenlegInitialization
|
|
} from "@/api/iosBasicData/fingenleg";
|
|
} from "@/api/iosBasicData/fingenleg";
|
|
|
|
+import {accountsList} from "@/api/iosBasicData/accounts";
|
|
import {mapGetters} from "vuex";
|
|
import {mapGetters} from "vuex";
|
|
|
|
+import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
|
|
|
|
+import {CurrentMonth, dateFormat, defaultDate4} from "@/util/date";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
|
+ components: {SearchQuery},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
form: {},
|
|
form: {},
|
|
- query: {},
|
|
|
|
|
|
+ query: {
|
|
|
|
+ isYearMoth:0,
|
|
|
|
+ isBalance:0,
|
|
|
|
+ accyear:defaultDate4(), // 默认当年
|
|
|
|
+ startDate:CurrentMonth(new Date(),'yyyy-MM'), // 开始日期
|
|
|
|
+ endDate:dateFormat(new Date(),'yyyy-MM'), // 结束日期
|
|
|
|
+ },
|
|
isForeignDetermine:false, // 是否外币
|
|
isForeignDetermine:false, // 是否外币
|
|
|
|
+ startCodeData:[], // 开始科目数据
|
|
|
|
+ endCodeData:[], // 结束科目数据
|
|
loading: true,
|
|
loading: true,
|
|
page: {
|
|
page: {
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
@@ -80,38 +124,45 @@ import {
|
|
searchShow: true,
|
|
searchShow: true,
|
|
searchMenuSpan: 6,
|
|
searchMenuSpan: 6,
|
|
border: true,
|
|
border: true,
|
|
- index: true,
|
|
|
|
|
|
+ index: false,
|
|
viewBtn: true,
|
|
viewBtn: true,
|
|
selection: true,
|
|
selection: true,
|
|
dialogClickModal: false,
|
|
dialogClickModal: false,
|
|
menu:false,
|
|
menu:false,
|
|
- expand:true,
|
|
|
|
|
|
+ rowKey:'id',
|
|
|
|
+ rowParentKey:'pid',
|
|
|
|
+ defaultExpandAll:true,
|
|
column: [
|
|
column: [
|
|
{
|
|
{
|
|
label: "年",
|
|
label: "年",
|
|
prop: "accyear",
|
|
prop: "accyear",
|
|
- width:'50',
|
|
|
|
|
|
+ width:'80',
|
|
|
|
+ index:1,
|
|
overHidden:true,
|
|
overHidden:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "月",
|
|
label: "月",
|
|
prop: "accmonth",
|
|
prop: "accmonth",
|
|
width:'40',
|
|
width:'40',
|
|
|
|
+ index:2,
|
|
overHidden:true,
|
|
overHidden:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "科目代码",
|
|
label: "科目代码",
|
|
prop: "accCode",
|
|
prop: "accCode",
|
|
|
|
+ index:3,
|
|
overHidden:true,
|
|
overHidden:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "科目名称",
|
|
label: "科目名称",
|
|
prop: "fullName",
|
|
prop: "fullName",
|
|
|
|
+ index:4,
|
|
overHidden:true,
|
|
overHidden:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: "方向",
|
|
|
|
- prop: "dc",
|
|
|
|
|
|
+ label: "科目方向",
|
|
|
|
+ prop: "accDc",
|
|
|
|
+ index:5,
|
|
type: 'select',
|
|
type: 'select',
|
|
dicData:[
|
|
dicData:[
|
|
{
|
|
{
|
|
@@ -127,9 +178,46 @@ import {
|
|
{
|
|
{
|
|
label: "摘要",
|
|
label: "摘要",
|
|
prop: "descr",
|
|
prop: "descr",
|
|
|
|
+ index:6,
|
|
overHidden:true,
|
|
overHidden:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
|
|
+ label: "开始科目",
|
|
|
|
+ prop: "startCode",
|
|
|
|
+ overHidden:true,
|
|
|
|
+ search:true,
|
|
|
|
+ hide:true,
|
|
|
|
+ searchslot:true,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "结束科目",
|
|
|
|
+ prop: "endCode",
|
|
|
|
+ overHidden:true,
|
|
|
|
+ search:true,
|
|
|
|
+ hide:true,
|
|
|
|
+ searchslot:true,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "开始日期",
|
|
|
|
+ prop: "startDate",
|
|
|
|
+ search:true,
|
|
|
|
+ overHidden:true,
|
|
|
|
+ hide:true,
|
|
|
|
+ type: "month",
|
|
|
|
+ format: "yyyy-MM",
|
|
|
|
+ valueFormat: "yyyy-MM",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "结束日期",
|
|
|
|
+ prop: "endDate",
|
|
|
|
+ search:true,
|
|
|
|
+ overHidden:true,
|
|
|
|
+ hide:true,
|
|
|
|
+ type: "month",
|
|
|
|
+ format: "yyyy-MM",
|
|
|
|
+ valueFormat: "yyyy-MM",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
label: "币种",
|
|
label: "币种",
|
|
prop: "curCode",
|
|
prop: "curCode",
|
|
hide:true,
|
|
hide:true,
|
|
@@ -146,6 +234,24 @@ import {
|
|
overHidden:true,
|
|
overHidden:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
|
|
+ label: "无发生额显示本月本年累计",
|
|
|
|
+ prop: "isYearMoth",
|
|
|
|
+ hide:true,
|
|
|
|
+ search:true,
|
|
|
|
+ searchslot:true,
|
|
|
|
+ searchLabelWidth:'160',
|
|
|
|
+ searchSpan:4,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "无余额无发生显示",
|
|
|
|
+ prop: "isBalance",
|
|
|
|
+ hide:true,
|
|
|
|
+ search:true,
|
|
|
|
+ searchslot:true,
|
|
|
|
+ searchLabelWidth:'120',
|
|
|
|
+ searchSpan:4,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
label: "显示外币",
|
|
label: "显示外币",
|
|
prop: "isForeignDetermine",
|
|
prop: "isForeignDetermine",
|
|
hide:true,
|
|
hide:true,
|
|
@@ -156,18 +262,39 @@ import {
|
|
{
|
|
{
|
|
label: "本期借方金额",
|
|
label: "本期借方金额",
|
|
prop: "amountDr",
|
|
prop: "amountDr",
|
|
|
|
+ index:7,
|
|
|
|
+ width:'100',
|
|
overHidden:true,
|
|
overHidden:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "本期贷方金额",
|
|
label: "本期贷方金额",
|
|
prop: "amountCr",
|
|
prop: "amountCr",
|
|
|
|
+ index:8,
|
|
|
|
+ width:'100',
|
|
overHidden:true,
|
|
overHidden:true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "本期余额",
|
|
label: "本期余额",
|
|
prop: "amountBlc",
|
|
prop: "amountBlc",
|
|
|
|
+ index:9,
|
|
overHidden:true,
|
|
overHidden:true,
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "方向",
|
|
|
|
+ prop: "dc",
|
|
|
|
+ index:10,
|
|
|
|
+ type: 'select',
|
|
|
|
+ dicData:[
|
|
|
|
+ {
|
|
|
|
+ label:'借方',
|
|
|
|
+ value:'D'
|
|
|
|
+ },{
|
|
|
|
+ label:'贷方',
|
|
|
|
+ value:'C'
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ overHidden:true,
|
|
|
|
+ },
|
|
|
|
|
|
]
|
|
]
|
|
},
|
|
},
|
|
@@ -196,8 +323,52 @@ import {
|
|
this.option = await this.getColumnData(this.getColumnName(329), this.optionBack);
|
|
this.option = await this.getColumnData(this.getColumnName(329), this.optionBack);
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 下拉监听
|
|
|
|
+ corpChange(value,name){
|
|
|
|
+ this.$set(this.query,name,value)
|
|
|
|
+ },
|
|
|
|
+ // 获取科目类型数据
|
|
|
|
+ startCodeDatafun(code){
|
|
|
|
+ accountsList(1,10,{code,isDetail:1}).then(res=>{
|
|
|
|
+ this.startCodeData = res.data.data.records
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ endCodeDatafun(code){
|
|
|
|
+ accountsList(1,10,{code,isDetail:1}).then(res=>{
|
|
|
|
+ this.endCodeData = res.data.data.records
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 无发生额显示本月本年累计 点击
|
|
|
|
+ isYearMothfun(){
|
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.query))
|
|
|
|
+ if (this.query.isYearMoth) {
|
|
|
|
+ this.findObject(this.option.column, "amountDr").label = '本年借方金额'
|
|
|
|
+ this.findObject(this.option.column, "amountDr").prop = 'amountYearDr'
|
|
|
|
+ this.findObject(this.option.column, "amountCr").label = '本年贷方金额'
|
|
|
|
+ this.findObject(this.option.column, "amountCr").prop = 'amountYearCr'
|
|
|
|
+ if (this.isForeignDetermine) {
|
|
|
|
+ this.findObject(this.option.column, "amountDrUsd").label = '本年借方外币金额'
|
|
|
|
+ this.findObject(this.option.column, "amountDrUsd").prop = 'amountYearDrUsd'
|
|
|
|
+ this.findObject(this.option.column, "amountCrUsd").label = '本年贷方外币金额'
|
|
|
|
+ this.findObject(this.option.column, "amountCrUsd").prop = 'amountYearCrUsd'
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ this.findObject(this.option.column, "amountYearDr").label = '本期借方金额'
|
|
|
|
+ this.findObject(this.option.column, "amountYearDr").prop = 'amountDr'
|
|
|
|
+ this.findObject(this.option.column, "amountYearCr").label = '本期贷方金额'
|
|
|
|
+ this.findObject(this.option.column, "amountYearCr").prop = 'amountCr'
|
|
|
|
+ if (this.isForeignDetermine) {
|
|
|
|
+ this.findObject(this.option.column, "amountYearDrUsd").label = '本期借方外币金额'
|
|
|
|
+ this.findObject(this.option.column, "amountYearDrUsd").prop = 'amountDrUsd'
|
|
|
|
+ this.findObject(this.option.column, "amountYearCrUsd").label = '本期贷方外币金额'
|
|
|
|
+ this.findObject(this.option.column, "amountYearCrUsd").prop = 'amountCrUsd'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.query = JSON.parse(JSON.stringify(obj))
|
|
|
|
+ },
|
|
// 是否外币点击
|
|
// 是否外币点击
|
|
isForeignDeterminefun(){
|
|
isForeignDeterminefun(){
|
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.query))
|
|
if (this.isForeignDetermine) {
|
|
if (this.isForeignDetermine) {
|
|
this.option.column.push(
|
|
this.option.column.push(
|
|
{
|
|
{
|
|
@@ -225,14 +396,29 @@ import {
|
|
index:14,
|
|
index:14,
|
|
overHidden: true,
|
|
overHidden: true,
|
|
})
|
|
})
|
|
|
|
+ if (this.query.isYearMoth) {
|
|
|
|
+ this.findObject(this.option.column, "amountDrUsd").label = '本年借方外币金额'
|
|
|
|
+ this.findObject(this.option.column, "amountDrUsd").prop = 'amountYearDrUsd'
|
|
|
|
+ this.findObject(this.option.column, "amountCrUsd").label = '本年贷方外币金额'
|
|
|
|
+ this.findObject(this.option.column, "amountCrUsd").prop = 'amountYearCrUsd'
|
|
|
|
+ }
|
|
|
|
+ this.query = JSON.parse(JSON.stringify(obj))
|
|
}else {
|
|
}else {
|
|
- this.option = this.optionBack
|
|
|
|
|
|
+ this.option = JSON.parse(JSON.stringify(this.optionBack))
|
|
|
|
+ this.query = JSON.parse(JSON.stringify(obj))
|
|
|
|
+ if (this.query.isYearMoth) {
|
|
|
|
+ this.findObject(this.option.column, "amountDr").label = '本年借方金额'
|
|
|
|
+ this.findObject(this.option.column, "amountDr").prop = 'amountYearDr'
|
|
|
|
+ this.findObject(this.option.column, "amountCr").label = '本年贷方金额'
|
|
|
|
+ this.findObject(this.option.column, "amountCr").prop = 'amountYearCr'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 初始入账
|
|
// 初始入账
|
|
initializationfun(){
|
|
initializationfun(){
|
|
fingenlegInitialization().then(res=>{
|
|
fingenlegInitialization().then(res=>{
|
|
- console.log(res,211)
|
|
|
|
|
|
+ this.page.currentPage = 1;
|
|
|
|
+ this.onLoad(this.page, this.query);
|
|
})
|
|
})
|
|
},
|
|
},
|
|
rowSave(row, done, loading) {
|
|
rowSave(row, done, loading) {
|
|
@@ -309,7 +495,13 @@ import {
|
|
done();
|
|
done();
|
|
},
|
|
},
|
|
searchReset() {
|
|
searchReset() {
|
|
- this.query = {};
|
|
|
|
|
|
+ this.query = {
|
|
|
|
+ isYearMoth:0,
|
|
|
|
+ isBalance:0,
|
|
|
|
+ accyear:defaultDate4(), // 默认当年
|
|
|
|
+ startDate:CurrentMonth(new Date(),'yyyy-MM'), // 开始日期
|
|
|
|
+ endDate:dateFormat(new Date(),'yyyy-MM'), // 结束日期
|
|
|
|
+ };
|
|
this.onLoad(this.page);
|
|
this.onLoad(this.page);
|
|
},
|
|
},
|
|
searchChange(params, done) {
|
|
searchChange(params, done) {
|
|
@@ -335,11 +527,24 @@ import {
|
|
this.onLoad(this.page, this.query);
|
|
this.onLoad(this.page, this.query);
|
|
},
|
|
},
|
|
onLoad(page, params = {}) {
|
|
onLoad(page, params = {}) {
|
|
|
|
+ if (this.query.startDate.split('-')[0] != this.query.endDate.split('-')[0]) {
|
|
|
|
+ return this.$message.warning('开始日期和结束日期请选择同一年')
|
|
|
|
+ }
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- fingenlegList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
|
|
|
|
|
|
+ fingenlegList(page.currentPage, page.pageSize, {
|
|
|
|
+ ...Object.assign(params, this.query),
|
|
|
|
+ startDate:Number(this.query.startDate.split('-')[1]),
|
|
|
|
+ endDate:Number(this.query.endDate.split('-')[1]),
|
|
|
|
+ }).then(res => {
|
|
const data = res.data.data;
|
|
const data = res.data.data;
|
|
this.page.total = data.total;
|
|
this.page.total = data.total;
|
|
- this.data = data.records;
|
|
|
|
|
|
+ this.data = data.records.map(item=>{
|
|
|
|
+ item.children = item.finGenlegs.map((ite,inde)=>{
|
|
|
|
+ ite.id = Number(inde) + 1
|
|
|
|
+ return ite
|
|
|
|
+ })
|
|
|
|
+ return item
|
|
|
|
+ })
|
|
this.loading = false;
|
|
this.loading = false;
|
|
this.selectionClear();
|
|
this.selectionClear();
|
|
});
|
|
});
|