This commit is contained in:
GaoHao
2025-03-10 17:26:39 +08:00
parent 490c513f48
commit cc97b6acca
26 changed files with 258 additions and 305 deletions

View File

@@ -1,22 +1,4 @@
<template>
<!-- <view class="table-scroll">
<table cellspacing="0">
<thead>
<tr style="background-color: #aebad2;color: #fff;" height='41'>
<th>商品名称</th>
<th>数量</th>
<th>金额</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in tableList" :key="item.productId">
<td style="padding-left: 16rpx;">{{item.productName}}</td>
<td style="padding-left: 16rpx;">{{item.num}}</td>
<td style="padding-left: 16rpx;">{{item.salesAmount}}</td>
</tr>
</tbody>
</table>
</view> -->
<template>
<view class="color-333 u-font-28 bg-gray default-box-padding" >
<scroll-view :scroll-x="true" class="bg-fff table u-text-center">
@@ -36,40 +18,36 @@
</view>
</view>
</scroll-view>
<!-- <view style="height: 100px;"></view> -->
</view>
</template>
</template>
<script setup>
import {
onMounted,
ref
} from 'vue';
import {
summaryTrade,
dateProduct
} from '@/http/yskApi/requestAll.js';
import { onMounted, ref } from 'vue';
import { productSaleDate } from '@/api/summary.js'
let tableList = ref([])
let props = defineProps({
day: {
type: Number
}
})
onMounted(() => {
gettableData()
})
// 获取表格数据
/**
* 获取销售数据
*/
function gettableData() {
dateProduct({
shopId: uni.getStorageSync('shopId'),
productSaleDate({
day: props.day,
page: 0,
size: 50
}).then((res) => {
tableList.value = res.productList.content
tableList.value = res.productList.records
})
}
</script>