fix: 优化

This commit is contained in:
admin 2024-09-13 17:22:27 +08:00
parent 3b2f785c73
commit d3bb88e173
3 changed files with 6 additions and 3 deletions

View File

@ -31,7 +31,7 @@ const tableTitleList = reactive([
function getList(params:any) {
FinanceApi.getRevenuePaymentPage(params).then((res:any) => {
if (res.code === 200) {
state.summary = res.data.map(item => {return {...item, paymentName: ['', '现金支付', '银行卡支付', '线上支付(微信)', '支付宝', '其他'][item.paymentMethod]}});
state.summary = res.data.map(item => {return {...item, paymentName: ['', '现金', '转账', '微信', '支付宝', '其他'][item.paymentMethod]}});
let paymentPrice = 0;
let revenuePrice = 0;
res.data.forEach((item:any) => {

View File

@ -24,13 +24,15 @@ import { formatDate } from '@/utils';
const props = defineProps<{
show: boolean,
}>()
const beforeTime = ref(null)
const emit = defineEmits(['handleDialog', 'handleOk']);
const handleClose = () => {
emit('handleDialog', false)
}
const handleOk = () => {
emit('handleOk', {startTime: state.startTime, endTime: state.endTime})
emit('handleOk', {startTime: state.startTime || beforeTime.value, endTime: state.endTime || beforeTime.value})
emit('handleDialog', false)
}
@ -42,6 +44,7 @@ const state = reactive({
const handleChangeDate = (v: any) => {
const time1 = v.range.before;
const time2 = v.range.after;
beforeTime.value = time1
if (time1 && time2) {
const date1 = new Date(time1);
const date2 = new Date(time2);

View File

@ -42,7 +42,7 @@
key: "payTotalPrice",
},
{
name: "未金额/元",
name: "未金额/元",
key: "unPayTotalPrice",
},
]);