下单退款相关更新

This commit is contained in:
GaoHao
2025-03-15 18:30:27 +08:00
parent c2135c6119
commit 994cf8bf2b
54 changed files with 682 additions and 2408 deletions

View File

@@ -35,11 +35,9 @@
</template>
<script setup>
import { getCurrentInstance, ref } from 'vue';
import { getCurrentInstance, ref, reactive } from 'vue';
import { onShow } from '@dcloudio/uni-app';
import {
summaryTrade,
} from '@/http/yskApi/requestAll.js';
import dayjs from 'dayjs' //时间格式库
import datePickerview from './my-date-pickerview.vue'
@@ -47,17 +45,25 @@
let selected = ref('today')
let showAll = ref(false);
let $list = []
let list = ref()
const pageData = reactive({
list: [
{payType: '微信小程序', key:'wechatPayAmount', payAmount: 0},
{payType: '支付宝小程序', key:'aliPayAmount', payAmount: 0},
{payType: '主扫收款', key:'scanPayAmount', payAmount: 0},
{payType: '收款码收款', key:'', payAmount: 0},
{payType: '现金收款', key:'cashPayAmount', payAmount: 0},
{payType: '充值收款', key:'rechargeAmount', payAmount: 0},
],
})
function toggleShowAll() {
showAll.value = !showAll.value
setList()
}
function setList() {
list.value = showAll.value ? $list : $list.slice(0, 4)
list.value = showAll.value ? pageData.list : pageData.list.slice(0, 4)
}
let list = ref()
const emit = defineEmits(['totalRevenue'])
const timeList = [{
label: '今天',
@@ -90,7 +96,12 @@
})
}
});
/**
* 获取统计数据
* @param {Object} start
* @param {Object} end
*/
function getlist(start, end) {
let startTime, endTime;
if (selected.value == 'today') {
@@ -123,15 +134,30 @@
beginDate: startTime,
endDate: endTime,
}).then((res) => {
$list = res.sale.payCount
for (var key in res) {
pageData.list.map(item=>{
if(item.key == key) {
item.payAmount = res[key]
}
})
}
setList()
emit('totalRevenue', res.sale.incomeAmountAll)
let incomeAmountAll = 0;
pageData.list.map(item=>{
incomeAmountAll += (item.payAmount||0)
})
emit('totalRevenue', incomeAmountAll)
})
}
/**
* 日期筛选确认
* @param {Object} e
*/
function datePickerConfirm(e) {
getlist(e.start, e.end)
}
// 获取当前时间
function getdate() {
const dt = new Date();
@@ -143,6 +169,7 @@
const ss = (dt.getSeconds() + "").padStart(2, "0");
return `${y}-${m}-${d}`;
}
// 获取昨天时间
const formatTime = () => {
let strDate = getdate()

View File

@@ -272,7 +272,7 @@
});
onLoad((options) => {
shopName.value = uni.getStorageSync('shopName');
shopName.value = uni.getStorageSync('shopInfo').shopName;
});
// 启动加载

View File

@@ -85,14 +85,18 @@
>{{item.name}}</view>
</view>
<view class="extend_content">
<view class="preview">
<view class="preview" v-if="vdata.extendInfo.autoKey != 'ticket_logo'">
<view class="index_bg"><up-image v-if="'index_bg' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
<view class="my_bg"><up-image v-if="'my_bg' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
<view class="bg"><up-image v-if="'member_bg' == vdata.extendInfo.autoKey" :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/'+vdata.extendInfo.autoKey+'.png'" ></up-image></view>
<view class="member_bg"><up-image v-if="'member_bg' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
<view class="shopinfo_bg"><up-image v-if="'shopinfo_bg' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
<view class="shopinfo_bg_f" v-if="'shopinfo_bg' == vdata.extendInfo.autoKey"></view>
<view class="bg"><up-image v-if="vdata.extendInfo.autoKey" :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/'+vdata.extendInfo.autoKey+'.png'" ></up-image></view>
<view class="bg" v-if="vdata.extendInfo.autoKey" ><up-image :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/'+vdata.extendInfo.autoKey+'.png'" ></up-image></view>
</view>
<view class="preview" v-else style="width: 359rpx;height: 232rpx">
<view class="bg ticket_logo" v-if="vdata.extendInfo.autoKey == 'ticket_logo'" ><up-image :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/'+vdata.extendInfo.autoKey+'.png'" ></up-image></view>
<view class="ticket_logo img" ><up-image v-if="'ticket_logo' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
</view>
<view class="extend_img">
<view class="extend_title">{{vdata.extendInfo.name}}背景图片</view>
@@ -418,7 +422,7 @@ let showMap = () => {
display: flex;
margin-top: 32rpx;
.preview{
width: 146rpx;
min-width: 146rpx;
height: 342rpx;
position: relative;
margin-right: 32rpx;
@@ -445,7 +449,7 @@ let showMap = () => {
}
::v-deep .member_bg .u-image,::v-deep .member_bg .u-image__image{
width: 134rpx!important;
width: 34rpx!important;
height: 63rpx!important;
position: absolute;
top: 22rpx;
@@ -461,6 +465,19 @@ let showMap = () => {
position: absolute;
top: 0;
}
::v-deep .bg.ticket_logo,::v-deep .bg.ticket_logo .u-image,::v-deep .bg.ticket_logo .u-image__image{
width: 359rpx!important;
height: 232rpx!important;
position: absolute;
top: 0;
}
::v-deep .ticket_logo.img .u-image,::v-deep .ticket_logo.img .u-image__image{
width: 96rpx!important;
height: 50rpx!important;
position: absolute;
top: 0;
left: 10rpx;
}
.shopinfo_bg_f{
width: 146rpx;