|
@@ -38,20 +38,8 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: '费用名称',
|
|
|
- prop: 'chargeType',
|
|
|
- format(val) {
|
|
|
- if (val == '1') {
|
|
|
- return '物业费';
|
|
|
- } else if (val == '2') {
|
|
|
- return '水费';
|
|
|
- } else if (val == '3') {
|
|
|
- return '电费';
|
|
|
- } else if (val == '4') {
|
|
|
- return '车位费';
|
|
|
- } else if (val == '5') {
|
|
|
- return '二次供水费';
|
|
|
- }
|
|
|
- }
|
|
|
+ prop: 'chargeName',
|
|
|
+ width: '200'
|
|
|
},
|
|
|
{
|
|
|
label: '计费日期',
|
|
@@ -103,43 +91,33 @@ export default {
|
|
|
submit() {
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- let isValid = true;
|
|
|
let billList = this.tabList.map((item, index) => {
|
|
|
- if (!!item.sumTotle) {
|
|
|
- return {
|
|
|
- amount: item.sumTotle,
|
|
|
- billId: item.id
|
|
|
- };
|
|
|
- } else {
|
|
|
- isValid = false;
|
|
|
- }
|
|
|
+ return {
|
|
|
+ amount: item.amount,
|
|
|
+ billId: item.id
|
|
|
+ };
|
|
|
});
|
|
|
let installData = {
|
|
|
payType: this.formData.payType,
|
|
|
remark: this.formData.remark,
|
|
|
billList: billList
|
|
|
};
|
|
|
- if (!isValid) {
|
|
|
- this.$message.error('实收金额必填');
|
|
|
- return;
|
|
|
- } else {
|
|
|
- var loading = this.$loading();
|
|
|
- this.$http
|
|
|
- .post('/sc-charge/charge/bill/payee', installData)
|
|
|
- .then(({ status, msg }) => {
|
|
|
- if (status == 0) {
|
|
|
- this.$message.success(msg);
|
|
|
- this.params.callback();
|
|
|
- this.$emit('close');
|
|
|
- } else {
|
|
|
- this.$message.error(msg);
|
|
|
- }
|
|
|
- loading.close();
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- loading.close();
|
|
|
- });
|
|
|
- }
|
|
|
+ var loading = this.$loading();
|
|
|
+ this.$http
|
|
|
+ .post('/sc-charge/charge/bill/payee', installData)
|
|
|
+ .then(({ status, msg }) => {
|
|
|
+ if (status == 0) {
|
|
|
+ this.$message.success(msg);
|
|
|
+ this.params.callback();
|
|
|
+ this.$emit('close');
|
|
|
+ } else {
|
|
|
+ this.$message.error(msg);
|
|
|
+ }
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -151,9 +129,6 @@ export default {
|
|
|
this.$http
|
|
|
.post('/sc-charge/charge/bill/findUserBillDetailList', ids)
|
|
|
.then((res) => {
|
|
|
- res.map((item) => {
|
|
|
- item.sumTotle = '';
|
|
|
- });
|
|
|
this.tabList = res;
|
|
|
})
|
|
|
.catch(() => {
|
|
@@ -161,7 +136,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
typeTimeTransition(start, end) {
|
|
|
- let text = '';
|
|
|
+ let text = '';
|
|
|
if (!!end) {
|
|
|
let f = start.slice(5, 7),
|
|
|
l = end.slice(5, 7);
|