Browse Source

缴费方式

wangxinyao
lingxiao 2 years ago
parent
commit
5bf9f143ad
2 changed files with 350 additions and 189 deletions
  1. +38
    -2
      src/views/property/pay.vue
  2. +312
    -187
      src/views/reportform/financial.vue

+ 38
- 2
src/views/property/pay.vue View File

@ -213,6 +213,18 @@
<br />
<br />
</div>
<div style="text-align: center" v-if="queryParams.chargetype !== 1">
<span class="word-title">其他缴费月数:</span>
<el-input-number
v-model="fewMonths2"
style="width: 26%"
@change="monthNumChange2"
size="small"
:min="1"
/>
<br />
<br />
</div>
<div style="text-align: center">
<span class="word-title">缴费方式:</span>
<el-select
@ -357,7 +369,7 @@
</mailTable>
</div>
<div id="data">
<ReceiptPrinting :data="receiptDetails" />
<ReceiptPrinting v-if="receiptDetails && receiptDetails.contracttab && receiptDetails.contracttab.serialnumber" :data="receiptDetails" />
</div>
</div>
</template>
@ -484,7 +496,8 @@ export default {
},
handleQuery() {
this.resetFees()
this.fewMonths = 0
this.fewMonths = 0;
this.fewMonths2 = undefined;
switch (this.queryParams.chargetype) {
case 1:
getPropertyTab(this.queryParams).then((res) => {
@ -517,12 +530,14 @@ export default {
}
},
handleClick(tab, event) {
this.fewMonths2 = undefined;
this.queryParams.chargetype = parseInt(this.activeName)
this.queryParams.contracttab = {}
this.queryParams.phone1 = undefined
this.queryParams.contact = undefined
this.queryParams.constructionarea = undefined
this.queryParams.unitprice = undefined
this.resetFees()
},
resetFees() {
@ -613,6 +628,26 @@ export default {
this.queryParams.enddate = newEndTime
this.getCountMoney()
},
//
monthNumChange2(value) {
this.fewMonths2 = value
var pattern = /^[1-9][0-9]*$/ //
if (!pattern.test(this.fewMonths2)) { //
this.fewMonths2 = undefined
this.msgError('输入的月数必须为正整数')
return
}
let endTime = this.createBeginDate(this.queryParams.begindate,parseInt(this.fewMonths2))
let newEndTime = moment(endTime).add(this.fewDays,'d').format('YYYY-MM-DD')
this.queryParams.enddate = newEndTime
if (this.queryParams.chargetype === 2) {
this.queryParams.contracttab.chargedexpense = this.fewMonths2*12
}else{
this.queryParams.contracttab.chargedexpense = this.fewMonths2*80
}
},
//
daysNumChange(value) {
this.fewDays = value
@ -644,6 +679,7 @@ export default {
} else {
this.queryParams.contracttab.chargedexpense = value
}
this.fewMonths2 = undefined
},
getTableData(arg) {
this.receiptDetails=arg;


+ 312
- 187
src/views/reportform/financial.vue View File

@ -1,48 +1,53 @@
<template>
<div class="app-container">
<el-form ref="queryForm"
:model="queryParams"
:inline="true">
<el-form-item v-if="pid == 110"
label="项目名">
<el-select v-model="cid"
size="small"
placeholder="请选择">
<el-option v-for="item in cidList"
:key="item.cid"
:label="item.descr"
:value="item.cid" />
<el-form ref="queryForm" :model="queryParams" :inline="true">
<el-form-item v-if="pid == 110" label="项目名">
<el-select v-model="cid" size="small" placeholder="请选择">
<el-option
v-for="item in cidList"
:key="item.cid"
:label="item.descr"
:value="item.cid"
/>
</el-select>
</el-form-item>
<el-form-item label="缴费类型">
<el-select ref="headerSearchSelect"
v-model="queryParams.chargetype"
clearable
style="width:100px"
size="small">
<el-option v-for="item in feesType"
:key="item.value"
:value="item.value"
:label="item.label" />
<el-select
ref="headerSearchSelect"
v-model="queryParams.chargetype"
clearable
style="width:100px"
size="small"
>
<el-option
v-for="item in feesType"
:key="item.value"
:value="item.value"
:label="item.label"
/>
</el-select>
</el-form-item>
<el-form-item label="开始日期">
<el-date-picker v-model="queryParams.start"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择"
clearable
size="small"
style="width:134px" />
<el-date-picker
v-model="queryParams.start"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择"
clearable
size="small"
style="width:134px"
/>
</el-form-item>
<el-form-item label="终止日期">
<el-date-picker v-model="queryParams.end"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择"
clearable
size="small"
style="width:134px" />
<el-date-picker
v-model="queryParams.end"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择"
clearable
size="small"
style="width:134px"
/>
</el-form-item>
<!-- <el-form-item label="日期">
<el-date-picker v-model="queryParams.date"
@ -54,30 +59,38 @@
style="width:134px" />
</el-form-item> -->
<el-form-item label="楼栋">
<el-input v-model.trim="queryParams.buildingid"
placeholder="请输入"
clearable
size="small"
style="width:85px" />
<el-input
v-model.trim="queryParams.buildingid"
placeholder="请输入"
clearable
size="small"
style="width:85px"
/>
</el-form-item>
<el-form-item label="物业编号">
<el-input v-model.trim="queryParams.propertyid"
placeholder="请输入"
clearable
size="small"
style="width:114px" />
<el-input
v-model.trim="queryParams.propertyid"
placeholder="请输入"
clearable
size="small"
style="width:114px"
/>
</el-form-item>
<el-form-item label="费用合计类型">
<el-select ref="headerSearchSelect"
v-model="queryParams.type"
clearable
style="width:100px"
@change="changeTotalType"
size="small">
<el-option v-for="item in totalTypes"
:key="item.key"
:value="item.key"
:label="item.name" />
<el-select
ref="headerSearchSelect"
v-model="queryParams.type"
clearable
style="width:100px"
@change="changeTotalType"
size="small"
>
<el-option
v-for="item in totalTypes"
:key="item.key"
:value="item.key"
:label="item.name"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="合计日期">
@ -90,38 +103,58 @@
style="width:134px" />
</el-form-item> -->
<el-form-item>
<el-button type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery">搜索</el-button>
<el-button type="primary"
icon="el-icon-download"
size="mini"
@click="handleExport">导出</el-button>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button
type="primary"
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-form-item>
<el-form-item>
<strong v-if="!queryParams.type">费用合计</strong>
<strong v-else-if="queryParams.type == 'current'">当年费用合计</strong>
<strong v-else-if="queryParams.type == 'arrearage'">陈欠费用合计</strong>{{count}}
<strong v-else-if="queryParams.type == 'current'"
>当年费用合计</strong
>
<strong v-else-if="queryParams.type == 'arrearage'"
>陈欠费用合计</strong
>{{ count }}
</el-form-item>
</el-form>
<el-table v-loading="loading"
:data="dataList"
border>
<el-table-column v-for="item in headers"
:key="item"
align="center"
:label="getColumnName(item)"
:show-overflow-tooltip="true"
width="130px">
<el-table v-loading="loading" :data="dataList" border>
<el-table-column
v-for="item in headers"
:key="item"
align="center"
:label="getColumnName(item)"
:show-overflow-tooltip="true"
width="130px"
>
<template slot-scope="scope">
<span v-if="item === 'cid'">{{ getValue(scope.row[item]) }}</span>
<span v-else-if="item === 'chargetime'"> {{ parseTime(scope.row[item]) }} </span>
<span v-else-if="item === 'chargetype'"> {{ parseType(scope.row[item]) }} </span>
<span v-else-if="item === 'status'"> {{ scope.row[item] === 0 ? '已缴费' : '未缴费' }} </span>
<span v-else-if="item === 'createtime'"> {{ parseTime(scope.row[item]) }} </span>
<span v-else-if="item === 'lastmodifytime'"> {{ parseTime(scope.row[item]) }} </span>
<span v-else-if="item === 'chargetime'">
{{ parseTime(scope.row[item]) }}
</span>
<span v-else-if="item === 'chargetype'">
{{ parseType(scope.row[item]) }}
</span>
<span v-else-if="item === 'status'">
{{ scope.row[item] === 0 ? "已缴费" : "未缴费" }}
</span>
<span v-else-if="item === 'createtime'">
{{ parseTime(scope.row[item]) }}
</span>
<span v-else-if="item === 'lastmodifytime'">
{{ parseTime(scope.row[item]) }}
</span>
<span v-else>{{ scope.row[item] }}</span>
</template>
</el-table-column>
@ -136,58 +169,58 @@
</template>
</el-table-column> -->
</el-table>
<pagination v-show="total>0"
:total="total"
:page.sync="queryParams.index"
:limit.sync="queryParams.size"
@pagination="getList" />
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.index"
:limit.sync="queryParams.size"
@pagination="getList"
/>
<!-- 添加或修改配置对话框 -->
<el-dialog :title="title"
:visible.sync="open"
width="680px">
<el-form ref="form"
:model="form"
label-width="100px">
<el-dialog :title="title" :visible.sync="open" width="680px">
<el-form ref="form" :model="form" label-width="100px">
<el-col :span="12">
<el-form-item :label="getColumnName('propertyid')">
<el-input v-model="form['propertyid']"
placeholder="请输入"
readonly />
<el-input
v-model="form['propertyid']"
placeholder="请输入"
readonly
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="getColumnName('chargeby')">
<el-input v-model.number="form['chargeby']"
placeholder="请输入" />
<el-input v-model.number="form['chargeby']" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="getColumnName('chargestartdate')">
<el-date-picker v-model="form.chargestartdate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择终止日期" />
<el-date-picker
v-model="form.chargestartdate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择终止日期"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="getColumnName('chargeenddate')">
<el-date-picker v-model="form.chargeenddate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择终止日期" />
<el-date-picker
v-model="form.chargeenddate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择终止日期"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="getColumnName('chargedexpense')">
<el-input v-model="form['chargedexpense']"
placeholder="请输入" />
<el-input v-model="form['chargedexpense']" placeholder="请输入" />
</el-form-item>
</el-col>
</el-form>
<div slot="footer"
class="dialog-footer">
<el-button type="primary"
@click="submitForm"> </el-button>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
@ -195,10 +228,10 @@
</template>
<script>
import { getChargeTab, updateFinancial } from '@/api/property/pay'
import { exportFinancialList, getStatistic } from '@/api/reportform'
import { getChargeTab, updateFinancial } from "@/api/property/pay";
import { exportFinancialList, getStatistic } from "@/api/reportform";
export default {
name: 'FinancialReport',
name: "FinancialReport",
data() {
return {
//
@ -218,17 +251,17 @@ export default {
buildingid: undefined,
propertyid: undefined,
chargetype: 1,
type: '',
type: "",
year: null
},
feesType: [
{ value: 1, label: '物业费' },
{ value: 2, label: '电梯卡费' },
{ value: 3, label: '车位费' },
{ value: 4, label: '其它费用' }
{ value: 1, label: "物业费" },
{ value: 2, label: "电梯卡费" },
{ value: 3, label: "车位费" },
{ value: 4, label: "其它费用" }
],
//
title: '',
title: "",
//
open: false,
form: {},
@ -238,127 +271,219 @@ export default {
cid: null,
totalTypes: [
{
key: '',
name: '总合计'
key: "",
name: "总合计"
},
{
key: 'current',
name: '当年'
key: "current",
name: "当年"
},
{
key: 'arrearage',
name: '陈欠'
key: "arrearage",
name: "陈欠"
}
],
totalTypeNums: {},
count: null
}
};
},
created() {
this.pid = sessionStorage.getItem('p') || ''
this.cidList = JSON.parse(localStorage.getItem('cid'))
if (this.pid == 110) this.cid = this.cidList[0].cid
this.getList()
this.getStatistic()
this.pid = sessionStorage.getItem("p") || "";
this.cidList = JSON.parse(localStorage.getItem("cid"));
if (this.pid == 110) this.cid = this.cidList[0].cid;
this.getList();
this.getStatistic();
},
methods: {
/** 查询角色列表 */
getList() {
this.loading = true
this.loading = true;
getChargeTab({
...this.queryParams,
cid: this.pid == 110 ? this.cid : ''
cid: this.pid == 110 ? this.cid : ""
})
.then((res) => {
.then(res => {
// this.dataList = res.data.data
this.dataList = res.data.items
this.dataList = res.data.items;
// this.user = res.data.user
this.loading = false
if (this.dataList.length < 1) {
return false
}
this.total = res.data.total
this.loading = false;
// if (this.dataList.length < 1) {
// return false;
// }
this.total = res.data.total;
if (this.queryParams.chargetype === 1) {
this.headers = Object.keys(this.dataList[0]).filter(
(item) => item !== 'accesscardid' && item !== 'carportid'
)
// this.headers = Object.keys(this.dataList[0]).filter(
// item => item !== "accesscardid" && item !== "carportid"
// );
this.headers = [
"serialnumber",
"cid",
"chargenr",
"chargetype",
"status",
"propertyid",
"chargestartdate",
"chargeenddate",
"chargeway",
"chargableexpense",
"chargedexpense",
"info",
"chargetime",
"chargeby",
"createtime",
"lastmodifyby",
"lastmodifytime",
"arrearage",
// "accesscardid",
"arrearage_date",
// "carportid",
];
} else if (this.queryParams.chargetype === 2) {
this.headers = Object.keys(this.dataList[0]).filter(
(item) => item !== 'propertyid' && item !== 'carportid'
)
// this.headers = Object.keys(this.dataList[0]).filter(
// item => item !== "propertyid" && item !== "carportid"
// );
this.headers = [
"serialnumber",
"cid",
"chargenr",
"chargetype",
"status",
// "propertyid",
"chargestartdate",
"chargeenddate",
"chargeway",
"chargableexpense",
"chargedexpense",
"info",
"chargetime",
"chargeby",
"createtime",
"lastmodifyby",
"lastmodifytime",
"arrearage",
"accesscardid",
"arrearage_date",
// "carportid",
];
} else if (this.queryParams.chargetype === 3) {
this.headers = Object.keys(this.dataList[0]).filter(
(item) => item !== 'propertyid' && item !== 'accesscardid'
)
// this.headers = Object.keys(this.dataList[0]).filter(
// item => item !== "propertyid" && item !== "accesscardid"
// );
this.headers = [
"serialnumber",
"cid",
"chargenr",
"chargetype",
"status",
// "propertyid",
"chargestartdate",
"chargeenddate",
"chargeway",
"chargableexpense",
"chargedexpense",
"info",
"chargetime",
"chargeby",
"createtime",
"lastmodifyby",
"lastmodifytime",
"arrearage",
// "accesscardid",
"arrearage_date",
"carportid",
];
} else {
this.headers = Object.keys(this.dataList[0]).filter(
(item) =>
item !== 'propertyid' &&
item !== 'accesscardid' &&
item !== 'carportid'
)
// this.headers = Object.keys(this.dataList[0]).filter(
// item =>
// item !== "propertyid" &&
// item !== "accesscardid" &&
// item !== "carportid"
// );
this.headers = [
"serialnumber",
"cid",
"chargenr",
"chargetype",
"status",
// "propertyid",
"chargestartdate",
"chargeenddate",
"chargeway",
"chargableexpense",
"chargedexpense",
"info",
"chargetime",
"chargeby",
"createtime",
"lastmodifyby",
"lastmodifytime",
"arrearage",
// "accesscardid",
"arrearage_date",
// "carportid",
];
}
})
.catch(() => {
this.loading = false
})
this.loading = false;
});
},
parseType(arg) {
let temp
this.feesType.forEach((item) => {
let temp;
this.feesType.forEach(item => {
if (item.value === arg) {
temp = item.label
return temp
temp = item.label;
return temp;
}
})
return temp
});
return temp;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.index = 1
this.getList()
this.getStatistic()
this.queryParams.index = 1;
this.getList();
this.getStatistic();
},
/** 重置按钮操作 */
handleExport() {
delete this.queryParams.index
delete this.queryParams.size
exportFinancialList(this.queryParams).then((res) => {
location.href = `${process.env.VUE_APP_BASE_API}/${res.data}`
})
delete this.queryParams.index;
delete this.queryParams.size;
exportFinancialList(this.queryParams).then(res => {
location.href = `${process.env.VUE_APP_BASE_API}/${res.data}`;
});
},
handleUpdate(data) {
this.open = true
this.form = data
this.open = true;
this.form = data;
},
/** 提交按钮 */
submitForm: function () {
this.form.chargedexpense = parseFloat(this.form.chargedexpense)
updateFinancial(this.form).then((response) => {
submitForm: function() {
this.form.chargedexpense = parseFloat(this.form.chargedexpense);
updateFinancial(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess('修改成功')
this.open = false
this.getList()
this.msgSuccess("修改成功");
this.open = false;
this.getList();
} else {
this.msgError(response.msg)
this.msgError(response.msg);
}
})
});
},
/** 获取当年和陈欠缴费数据接口 */
getStatistic() {
getStatistic({
cid: this.pid == 110 ? this.cid : '',
cid: this.pid == 110 ? this.cid : "",
...this.queryParams
}).then((res) => {
this.count = res.data.count
})
}).then(res => {
this.count = res.data.count;
});
},
changeTotalType(e) {
this.getStatistic()
this.getStatistic();
},
changeDate() {
this.getStatistic()
this.getStatistic();
}
}
}
};
</script>

Loading…
Cancel
Save