101 lines
2.3 KiB
TypeScript
101 lines
2.3 KiB
TypeScript
import request from '@/utils/request';
|
|
import { AxiosPromise } from 'axios';
|
|
|
|
export type cashlist = {
|
|
'residentId': string;
|
|
'residentName': string;
|
|
'houseName': string;
|
|
'phone': string;
|
|
};
|
|
|
|
/**
|
|
* 查询住户列表
|
|
* @returns {*}
|
|
* @param data
|
|
*/
|
|
export const cashQuery = (data: { residentName?: string; queryType: number }): AxiosPromise<cashlist[]> => {
|
|
return request({
|
|
url: '/cash/residentList',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
export type billlistType = {
|
|
needPayAmount: string; // 需要支付金额
|
|
actualAccount: string; // 实际支付金额
|
|
singleDiscountAmount: string; // 单笔优惠金额
|
|
'villageId': string;
|
|
'residentId': string;
|
|
'houseId': string;
|
|
'detailsId': string;
|
|
'houseName': string;
|
|
'parkingId': string;
|
|
'parkingName': string;
|
|
'billId': string;
|
|
'chargeTypeName': string;
|
|
'chargeItemName': string;
|
|
'billingType': string;
|
|
'formula': string;
|
|
'fixedPrice': string;
|
|
'startDate': string;
|
|
'endDate': string;
|
|
'money': string;
|
|
'payStatus': string;
|
|
'remark': string;
|
|
amount: string;
|
|
residentName: string;
|
|
};
|
|
|
|
/**
|
|
* 查询账单列表
|
|
* @returns {*}
|
|
* @param data
|
|
*/
|
|
export const billQuery = (data: { residentId?: string; payStatus: '0' | '1' }): AxiosPromise<billlistType[]> => {
|
|
return request({
|
|
url: '/cash/billList',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
};
|
|
export const billEdit = (data: { 'detailsId': string[]; 'payType': string; 'payStatus': string }): AxiosPromise<billlistType[]> => {
|
|
return request({
|
|
url: '/cash/billEdit',
|
|
method: 'post',
|
|
data: data,
|
|
|
|
});
|
|
};
|
|
|
|
// 打印票据
|
|
export const billPrint = (data: { 'detailsIds': string[]; 'residentId': string }): AxiosPromise<BillPrintType> => {
|
|
return request({
|
|
url: '/cash/print',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
export type BillPrintType = {
|
|
'totalAccount': string;
|
|
'residentName': string;
|
|
'detailsList': {
|
|
'detailsId': string;
|
|
'chargeItemName': string;
|
|
'billName': string;
|
|
'detailsTime': string;
|
|
'useCount': string;
|
|
'account': string;
|
|
'payType': string;
|
|
'singleDiscountAmount': string;
|
|
'actualAccount': string;
|
|
'remark': string;
|
|
}[];
|
|
'printDate': string;
|
|
totalDiscountAmount: string;
|
|
totalActualAccount: string;
|
|
'HouseName': string;
|
|
'title': string;
|
|
};
|