|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<template>
|
|
|
|
|
<a-drawer title="添加手动生成账单" :width="820" :visible="isVisibleDrawer" :body-style="{ paddingBottom: '80px' }" @close="onClose">
|
|
|
|
|
<a-drawer title="添加手动生成账单" :width="920" :visible="isVisibleDrawer" :body-style="{ paddingBottom: '80px' }" @close="onClose">
|
|
|
|
|
<div class="drawer-content">
|
|
|
|
|
<div style="display: flex">
|
|
|
|
|
<div class="inner-content">
|
|
|
|
@ -21,20 +21,22 @@
|
|
|
|
|
<span style="font-weight: 600">收费标准</span>
|
|
|
|
|
</template>
|
|
|
|
|
</a-table>
|
|
|
|
|
<a-form-model title="基础信息" :rules="rules" :model="form" ref="ruleForm">
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-form-model title="基础信息" :rules="rules" :model="form" ref="ruleForm">
|
|
|
|
|
<a-col :span="24">
|
|
|
|
|
<a-form-model-item label="账单名称" prop="name">
|
|
|
|
|
<a-input v-model="form.name"></a-input>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-form-model>
|
|
|
|
|
<a-form-model title="基础信息" :model="formTime" :rules="rulesTime" ref="ruleForm">
|
|
|
|
|
<a-col :span="24">
|
|
|
|
|
<a-form-model-item label="选择时间" prop="selTime">
|
|
|
|
|
<a-range-picker v-model="selTime" @change="timeChange" value-format="YYYY-MM-DD HH:mm:ss"></a-range-picker>
|
|
|
|
|
<a-range-picker v-model="formTime.selTime" @change="timeChange" value-format="YYYY-MM-DD HH:mm:ss"></a-range-picker>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-form-model>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-form-model>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -99,20 +101,43 @@ export default {
|
|
|
|
|
tableData: [],
|
|
|
|
|
columns: [
|
|
|
|
|
{title: "费用名称", dataIndex: "name"},
|
|
|
|
|
{title: "计费方式", dataIndex: "billingType"},
|
|
|
|
|
{title: "计量方式", dataIndex: "calculateType"},
|
|
|
|
|
{title: "计量单价", dataIndex: "calculateUnit",
|
|
|
|
|
customRender: function (calculateUnit) {
|
|
|
|
|
return (calculateUnit*1).toFixed(2)
|
|
|
|
|
{title: "计费方式", dataIndex: "billingType",
|
|
|
|
|
customRender: function (billingType) {
|
|
|
|
|
switch(billingType) {
|
|
|
|
|
case 1: return '单价*计量方式';
|
|
|
|
|
case 2: return '固定金额';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{title: "计量方式", dataIndex: "calculateType",
|
|
|
|
|
customRender: function (calculateType) {
|
|
|
|
|
switch(calculateType) {
|
|
|
|
|
case 1: return '建筑面积';
|
|
|
|
|
case 2: return '使用面积';
|
|
|
|
|
case 3: return '公摊面积';
|
|
|
|
|
case 5: return '仪表用量';
|
|
|
|
|
case 6: return '房屋数分摊';
|
|
|
|
|
case 7: return '房屋建筑面积分摊';
|
|
|
|
|
case 8: return '房屋在住人口分摊';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{title: "计量单价", dataIndex: "calculateUnit",
|
|
|
|
|
customRender: function (calculateUnit) {
|
|
|
|
|
return (calculateUnit*1).toFixed(2)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{title: "备注", dataIndex: "remarks"},
|
|
|
|
|
],
|
|
|
|
|
rules: {
|
|
|
|
|
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
|
|
|
|
|
selTime: [{ required: true, message: "请选择时间", trigger: "blur" }],
|
|
|
|
|
},
|
|
|
|
|
selTime: []
|
|
|
|
|
rulesTime: {
|
|
|
|
|
selTime: [{ required: true, message: "请选择时间", trigger: "change" }],
|
|
|
|
|
},
|
|
|
|
|
formTime: {
|
|
|
|
|
selTime: []
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -150,8 +175,8 @@ export default {
|
|
|
|
|
this.form.chargesIds = data;
|
|
|
|
|
},
|
|
|
|
|
timeChange(val) {
|
|
|
|
|
this.form.billDateStart = this.selTime[0];
|
|
|
|
|
this.form.billDateEnd = this.selTime[1];
|
|
|
|
|
this.form.billDateStart = this.formTime.selTime[0];
|
|
|
|
|
this.form.billDateEnd = this.formTime.selTime[1];
|
|
|
|
|
},
|
|
|
|
|
success(){
|
|
|
|
|
this.$emit('success')
|
|
|
|
@ -166,7 +191,7 @@ export default {
|
|
|
|
|
billDateEnd: '',
|
|
|
|
|
};
|
|
|
|
|
this.checkedKeys = [];
|
|
|
|
|
this.selTime = []
|
|
|
|
|
this.formTime.selTime = []
|
|
|
|
|
},
|
|
|
|
|
onSubmit() {
|
|
|
|
|
manuallyGenerateBills(this.form).then(res => {
|
|
|
|
|