打印机字段修改

This commit is contained in:
duan
2024-10-18 11:16:44 +08:00
parent b80ce77096
commit 9c97a912a7
12 changed files with 214 additions and 78 deletions

View File

@@ -61,19 +61,23 @@
<view class="table-scroll">
<table cellspacing="0">
<thead>
<tr style="background-color: #aebad2;color: #fff;" height='80'>
<th>排名</th>
<th>商品名称</th>
<th>数量</th>
<tr style="background-color: #aebad2;color: #fff;" height='41'>
<th style="width: 540rpx;">商品名称</th>
<th style="width: 215rpx;">总数量</th>
<th>金额</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in tableList" :key="item.productId">
<td>{{++index}}</td>
<td>{{item.productName}}</td>
<td>{{item.num}}</td>
<td>{{item.salesAmount}}</td>
<td style="width: 500rpx;padding-left: 16rpx;">
<image v-if="index==0" src="../pageTable/index/images/1.png" style="width: 22rpx;height: 30rpx;" mode=""></image>
<image v-else-if="index==1" src="../pageTable/index/images/2.png" style="width: 22rpx;height: 30rpx;" mode=""></image>
<image v-else-if="index==2" src="../pageTable/index/images/3.png" style="width: 22rpx;height: 30rpx;" mode=""></image>
<span v-else>{{index}}</span>
&nbsp;&nbsp;{{item.productName}}
</td>
<td style="padding-left: 16rpx;">{{item.num}}</td>
<td style="padding-left: 16rpx;">{{item.salesAmount}}</td>
</tr>
</tbody>
</table>
@@ -222,21 +226,24 @@
return `${y}-${m}-${d}`
}
</script>
<style scoped lang="less">
<style>
page {
background-color: #f9f9f9;
background: #f6f6f6;
}
</style>
<style scoped lang="less">
.time-wrapper {
display: flex;
justify-content: space-around;
background-color: #fff;
padding-bottom: 20rpx;
padding-bottom: 16rpx;
padding-top: 16rpx;
background-color: #fff;
.timelistbox {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
.time-item {
font-size: 28rpx;
@@ -248,9 +255,9 @@
width: 40rpx;
height: 3rpx;
background-color: #318AFE;
position: absolute;
left: 16rpx;
bottom: 0;
// position: absolute;
// left: 16rpx;
// bottom: 0;
}
}
@@ -267,6 +274,7 @@
background-size: 694rpx 320rpx;
padding: 48rpx 28rpx;
.df;
justify-content: space-between;
flex-wrap: wrap;
>view {
@@ -291,31 +299,32 @@
.table-scroll table {
table-layout: fixed;
width: calc(100% - 10rpx);
// width: calc(100% - 10rpx);
}
.table-scroll thead {
display: table-row;
background-color: bisque;
font-size: 24rpx;
height: 82rpx;
}
.table-scroll tbody {
overflow-y: scroll;
overflow-x: hidden;
display: block;
width: 1040rpx;
// width: 1040rpx;
width: 100%;
// width: calc(100% );
}
.table-scroll th,
td {
height: 80rpx;
height: 82rpx;
overflow: hidden;
text-overflow: ellipsis;
min-width: 250rpx;
border: 1.2rpx solid #7E9BD4;
width: 250rpx;
// border: 0.7rpx solid red;
border: 0.7rpx solid rgba(126, 155, 212, 0.27);
}
.bottombtn {

View File

@@ -2,8 +2,7 @@
<view class="table-scroll">
<table cellspacing="0">
<thead>
<tr style="background-color: #aebad2;color: #fff;" height='80'>
<th>排名</th>
<tr style="background-color: #aebad2;color: #fff;" height='41'>
<th>商品名称</th>
<th>数量</th>
<th>金额</th>
@@ -11,10 +10,9 @@
</thead>
<tbody>
<tr v-for="(item,index) in tableList" :key="item.productId">
<td>{{++index}}</td>
<td>{{item.productName}}</td>
<td>{{item.num}}</td>
<td>{{item.salesAmount}}</td>
<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>
@@ -57,36 +55,35 @@
.table-scroll {
overflow-x: scroll;
white-space: nowrap;
margin: 0 28rpx;
margin: 32rpx 28rpx;
margin-right: 30rpx;
border-radius: 30rpx 30rpx 0 0;
}
.table-scroll table {
table-layout: fixed;
width: calc(100% - 10rpx);
}
.table-scroll thead {
display: table-row;
background-color: bisque;
font-size: 24rpx;
}
.table-scroll tbody {
overflow-y: scroll;
overflow-x: hidden;
display: block;
width: 1040rpx;
width: 100%;
}
.table-scroll th,
td {
height: 80rpx;
height: 82rpx;
overflow: hidden;
text-overflow: ellipsis;
min-width: 250rpx;
border: 2rpx solid #7E9BD4;
width: 250rpx;
border: 0.7rpx solid rgba(126, 155, 212, 0.27);
}
</style>