535 lines
12 KiB
Vue
535 lines
12 KiB
Vue
<template>
|
||
<div>
|
||
<div class="analysis-cell cell-enter" @tap="toggleShow" :class="{ 'active': item.show }"
|
||
:style="activeCellStyleStr">
|
||
<div class="shop-title title-slide" :class="'theme-' + provinceCode">
|
||
<span> {{ (i > 8 ? i + 1 : '0' + (i + 1)) + ' ' + item.SHOPNAME }}</span>
|
||
<p>
|
||
<span v-show="item.UNACCOUNT_SIGN">¥</span>
|
||
<span class="cell-price price-highlight" :style="priceStyleStr">{{
|
||
item.UNACCOUNT_SIGN
|
||
? $util.fmoney(item.CASHPAY_TOTAL, 2) : '无结账信息' }}</span>
|
||
<image src="/static/images/effective/true.png" mode="aspectFit" class="" v-if='item.SHOWDEAL_SIGN'>
|
||
</image>
|
||
<!-- <text class="uni-icon uni-icon-checkmarkempty" v-if='item.SHOWDEAL_SIGN'></text> -->
|
||
|
||
</p>
|
||
</div>
|
||
<p v-if="item.detail.length > 0" style="line-height: 1.2;" class="tags-container">
|
||
<span v-for="(child, index) in item.detail" :key="index" class="atribute-tag">{{ child }} </span>
|
||
</p>
|
||
</div>
|
||
<div class="analysis-detail" v-if="item.show">
|
||
<div class="detail-unit" v-for="(unit, o) in item.ShopEndAccountList" :key="o">
|
||
<div class="uni-inline-flex">
|
||
<span class="detail-title">结账时间:</span>
|
||
<div style="flex: 1;text-align: left;">
|
||
<div style="font-size: 24rpx;">起 {{ unit.ENDACCOUNT_STARTDATE }}</div>
|
||
<div style="font-size: 24rpx;">止 {{ unit.ENDACCOUNT_DATE }}</div>
|
||
</div>
|
||
<span style="color:#EE7941;margin-right:50rpx;padding-top: 20rpx;font-size: 24rpx;">{{
|
||
getHour(unit.ENDACCOUNT_STARTDATE, unit.ENDACCOUNT_DATE) }}小时</span>
|
||
</div>
|
||
<block v-if="unit.DESCRIPTION_DATE">
|
||
|
||
<div class="detail-title" style="font-size: 24rpx;">日结校验:{{ unit.DESCRIPTION_DATE }}</div>
|
||
<p><span class="detail-title" style="font-size: 24rpx;">{{ unit.DESCRIPTION_STAFF }}:</span><span>{{
|
||
unit.DIFFERENCE_REASON
|
||
}}</span>
|
||
</p>
|
||
</block>
|
||
<block v-if="unit.APPROVE_DATE">
|
||
<div><span class="detail-title" style="font-size: 24rpx;">日结审核:{{ unit.APPROVE_DATE }}</span></div>
|
||
<p><span class="detail-title" style="font-size: 24rpx;">{{ unit.APPROVE_STAFF }}:</span><span>{{
|
||
unit.APPROVED_INFO }}</span>
|
||
</p>
|
||
</block>
|
||
<div>
|
||
<p class="detail-short-info" v-show="unit.FACTAMOUNT_SALE" style="font-size: 24rpx;"> 单品报表:<text
|
||
class="uni-icon uni-icon-checkmarkempty" style="font-size: 24rpx;"></text></p>
|
||
<p class="detail-short-info" v-show="unit.FACTAMOUNT_CIGARETTE" style="font-size: 24rpx;">香烟数据:<span
|
||
class="uni-icon uni-icon-checkmarkempty" style="font-size: 24rpx;"></span></p>
|
||
</div>
|
||
<div><span class="detail-title detail-short-info" style="font-size: 24rpx;">稽核次数:{{ unit.CHECK_COUNT }}
|
||
次</span><span class="detail-short-info" style="font-size: 24rpx;">长短款额:{{
|
||
$util.fmoney(unit.DIFFERENT_PRICE) }} 元</span></div>
|
||
<div>
|
||
<span class="detail-title detail-short-info" style="font-size: 24rpx;">现金缴款:{{
|
||
$util.fmoney(unit.CASHPAY_DOWNLORD) }} 元</span>
|
||
<span class="detail-short-info" style="font-size: 24rpx;">移动支付:{{ $util.fmoney(unit.MOBILEPAYMENT)
|
||
}} 元</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
props: {
|
||
item: {
|
||
type: Object,
|
||
required: true
|
||
},
|
||
i: {
|
||
type: Number,
|
||
required: true
|
||
},
|
||
provinceCode: {
|
||
type: String,
|
||
default: '530000' // 默认使用云南的配色
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
|
||
|
||
}
|
||
},
|
||
computed: {
|
||
// 根据省份代码获取主题色
|
||
themeColors() {
|
||
const themes = {
|
||
'330200': { // 宁波
|
||
primary: '#1890FF',
|
||
secondary: '#69C0FF'
|
||
},
|
||
'340000': { // 安徽
|
||
primary: '#748ED6',
|
||
secondary: '#91A7E3'
|
||
},
|
||
'500000': { // 重庆
|
||
primary: '#FA541C',
|
||
secondary: '#FF7A45'
|
||
},
|
||
'510000': { // 四川
|
||
primary: '#FA8C16',
|
||
secondary: '#FFA940'
|
||
},
|
||
'520000': { // 贵州
|
||
primary: '#52C41A',
|
||
secondary: '#73D13D'
|
||
},
|
||
'530000': { // 云南(默认色)
|
||
primary: '#27B25F',
|
||
secondary: '#4CCC7F'
|
||
},
|
||
'630000': { // 青海
|
||
primary: '#13C2C2',
|
||
secondary: '#36CFC9'
|
||
},
|
||
'734100': { // 海南
|
||
primary: '#E91E63',
|
||
secondary: '#F06292'
|
||
}
|
||
}
|
||
return themes[this.provinceCode] || themes['530000']
|
||
},
|
||
|
||
// 动态样式字符串(小程序兼容)
|
||
activeCellStyleStr() {
|
||
if (!this.item || !this.item.show) return ''
|
||
return `border: 2rpx solid ${this.themeColors.primary}; box-shadow: 0 4px 20px rgba(${this.hexToRgb(this.themeColors.primary)}, 0.15);`
|
||
},
|
||
|
||
// 价格样式字符串
|
||
priceStyleStr() {
|
||
const paddingRight = !this.item.UNACCOUNT_SIGN ? '0' : '0'
|
||
const fontSize = !this.item.UNACCOUNT_SIGN ? '24rpx' : '24rpx'
|
||
return `padding-right: ${paddingRight}; font-size: ${fontSize}; color: ${this.themeColors.primary};`
|
||
}
|
||
},
|
||
methods: {
|
||
getHour(start, end) {
|
||
return parseInt((new Date(end) - new Date(start)) / (1000 * 3600))
|
||
},
|
||
|
||
toggleShow() {
|
||
this.$emit('toggleShow', this.i)
|
||
},
|
||
|
||
// 将十六进制颜色转换为RGB
|
||
hexToRgb(hex) {
|
||
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
||
return result ?
|
||
`${parseInt(result[1], 16)}, ${parseInt(result[2], 16)}, ${parseInt(result[3], 16)}` :
|
||
'39, 178, 95'; // 默认绿色的RGB
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.analysis-cell {
|
||
background-color: #fff;
|
||
border-radius: 16rpx;
|
||
margin-bottom: 16rpx;
|
||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
||
padding: 16rpx 16rpx 8rpx;
|
||
display: flex;
|
||
flex-direction: column;
|
||
transition: all 0.3s ease;
|
||
position: relative;
|
||
|
||
&.active {
|
||
// 边框和阴影由动态样式控制
|
||
}
|
||
}
|
||
|
||
.analysis-cell .shop-title {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
position: relative;
|
||
font-size: 24rpx;
|
||
font-weight: 600;
|
||
align-items: flex-start;
|
||
|
||
span {
|
||
color: #333;
|
||
flex: 1;
|
||
}
|
||
|
||
p {
|
||
display: flex;
|
||
align-items: center;
|
||
flex-shrink: 0;
|
||
}
|
||
}
|
||
|
||
.analysis-cell .shop-title:before {
|
||
content: '';
|
||
position: absolute;
|
||
width: 24rpx;
|
||
height: 24rpx;
|
||
border-radius: 50%;
|
||
left: -40rpx;
|
||
top: 4rpx;
|
||
background: #e0e0e0;
|
||
border: 3rpx solid #fff;
|
||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
|
||
transition: all 0.3s ease;
|
||
}
|
||
|
||
// 主题色状态指示点样式
|
||
.analysis-cell.active .shop-title.theme-330200:before {
|
||
background: #1890FF;
|
||
box-shadow: 0 2rpx 12rpx rgba(24, 144, 255, 0.3);
|
||
}
|
||
|
||
.analysis-cell.active .shop-title.theme-340000:before {
|
||
background: #748ED6;
|
||
box-shadow: 0 2rpx 12rpx rgba(116, 142, 214, 0.3);
|
||
}
|
||
|
||
.analysis-cell.active .shop-title.theme-500000:before {
|
||
background: #FA541C;
|
||
box-shadow: 0 2rpx 12rpx rgba(250, 84, 28, 0.3);
|
||
}
|
||
|
||
.analysis-cell.active .shop-title.theme-510000:before {
|
||
background: #FA8C16;
|
||
box-shadow: 0 2rpx 12rpx rgba(250, 140, 22, 0.3);
|
||
}
|
||
|
||
.analysis-cell.active .shop-title.theme-520000:before {
|
||
background: #52C41A;
|
||
box-shadow: 0 2rpx 12rpx rgba(82, 196, 26, 0.3);
|
||
}
|
||
|
||
.analysis-cell.active .shop-title.theme-530000:before {
|
||
background: #27B25F;
|
||
box-shadow: 0 2rpx 12rpx rgba(39, 178, 95, 0.3);
|
||
}
|
||
|
||
.analysis-cell.active .shop-title.theme-630000:before {
|
||
background: #13C2C2;
|
||
box-shadow: 0 2rpx 12rpx rgba(19, 194, 194, 0.3);
|
||
}
|
||
|
||
.analysis-cell.active .shop-title.theme-734100:before {
|
||
background: #E91E63;
|
||
box-shadow: 0 2rpx 12rpx rgba(233, 30, 99, 0.3);
|
||
}
|
||
|
||
.shop-title image {
|
||
width: 32rpx;
|
||
height: 32rpx;
|
||
margin-left: 12rpx;
|
||
border-radius: 4rpx;
|
||
}
|
||
|
||
.analysis-cell .cell-price {
|
||
// 颜色由动态样式控制
|
||
font-family: 'PingFang SC', sans-serif;
|
||
font-size: 24rpx;
|
||
font-weight: 700;
|
||
}
|
||
|
||
.atribute-tag {
|
||
display: inline-block;
|
||
background: linear-gradient(135deg, #ff9f43, #ff8c42);
|
||
color: #fff;
|
||
padding: 4rpx 12rpx;
|
||
margin: 4rpx 8rpx 4rpx 0;
|
||
border-radius: 20rpx;
|
||
font-size: 20rpx;
|
||
font-weight: 500;
|
||
box-shadow: 0 2rpx 8rpx rgba(255, 159, 67, 0.2);
|
||
}
|
||
|
||
.analysis-detail {
|
||
background-color: #f8f9fa;
|
||
border-radius: 12rpx;
|
||
position: relative;
|
||
overflow: hidden;
|
||
// margin-top: 16rpx;
|
||
border: 1rpx solid #f0f0f0;
|
||
}
|
||
|
||
.analysis-detail span,
|
||
.analysis-detail view {
|
||
color: #333;
|
||
font-size: 26rpx;
|
||
}
|
||
|
||
.uni-icon-checkmarkempty,
|
||
.analysis-detail span.uni-icon-checkmarkempty {
|
||
color: #2ed573;
|
||
font-size: 32rpx;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.analysis-detail::before {
|
||
content: '';
|
||
width: 0;
|
||
height: 0;
|
||
border-left: 12rpx solid transparent;
|
||
border-right: 12rpx solid transparent;
|
||
border-bottom: 16rpx solid #f8f9fa;
|
||
position: absolute;
|
||
top: -16rpx;
|
||
left: 32rpx;
|
||
}
|
||
|
||
.analysis-detail .detail-unit {
|
||
background-color: #fff;
|
||
padding: 24rpx;
|
||
border-radius: 8rpx;
|
||
// margin: 16rpx;
|
||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||
|
||
&:first-child {
|
||
// margin-top: 24rpx;
|
||
}
|
||
|
||
&:last-child {
|
||
margin-bottom: 24rpx;
|
||
}
|
||
}
|
||
|
||
.analysis-detail .detail-unit>div {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: flex-start;
|
||
margin-bottom: 16rpx;
|
||
|
||
&:last-child {
|
||
margin-bottom: 0;
|
||
}
|
||
}
|
||
|
||
.analysis-detail .detail-unit>p {
|
||
margin-bottom: 16rpx;
|
||
|
||
&:last-child {
|
||
margin-bottom: 0;
|
||
}
|
||
}
|
||
|
||
.analysis-detail span {
|
||
display: inline-block;
|
||
vertical-align: middle;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.analysis-detail .detail-title {
|
||
min-width: 140rpx;
|
||
color: #666;
|
||
font-weight: 500;
|
||
font-size: 24rpx;
|
||
}
|
||
|
||
.analysis-detail .detail-short-info {
|
||
width: 50%;
|
||
color: #333;
|
||
font-size: 24rpx;
|
||
|
||
&:first-child {
|
||
padding-right: 16rpx;
|
||
}
|
||
}
|
||
|
||
.uni-inline-flex {
|
||
span:last-child {
|
||
color: #ff9f43;
|
||
font-weight: 600;
|
||
font-size: 28rpx;
|
||
}
|
||
}
|
||
|
||
/* 动画效果 - listUnit组件 */
|
||
|
||
/* 单元格入场动画 */
|
||
@keyframes cellEnter {
|
||
0% {
|
||
opacity: 0;
|
||
transform: translateY(20rpx) scale(0.95);
|
||
}
|
||
|
||
100% {
|
||
opacity: 1;
|
||
transform: translateY(0) scale(1);
|
||
}
|
||
}
|
||
|
||
.cell-enter {
|
||
animation: cellEnter 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
|
||
opacity: 0;
|
||
}
|
||
|
||
/* 标题滑入动画 */
|
||
@keyframes titleSlide {
|
||
0% {
|
||
opacity: 0;
|
||
transform: translateX(-15rpx);
|
||
}
|
||
|
||
100% {
|
||
opacity: 1;
|
||
transform: translateX(0);
|
||
}
|
||
}
|
||
|
||
.title-slide {
|
||
animation: titleSlide 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s forwards;
|
||
opacity: 0;
|
||
}
|
||
|
||
/* 价格高亮动画 */
|
||
@keyframes priceHighlight {
|
||
0% {
|
||
opacity: 0;
|
||
transform: scale(0.8);
|
||
}
|
||
|
||
50% {
|
||
transform: scale(1.1);
|
||
}
|
||
|
||
100% {
|
||
opacity: 1;
|
||
transform: scale(1);
|
||
}
|
||
}
|
||
|
||
.price-highlight {
|
||
animation: priceHighlight 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s forwards;
|
||
opacity: 0;
|
||
}
|
||
|
||
/* 标签容器动画 */
|
||
@keyframes tagsContainer {
|
||
0% {
|
||
opacity: 0;
|
||
transform: translateY(10rpx);
|
||
}
|
||
|
||
100% {
|
||
opacity: 1;
|
||
transform: translateY(0);
|
||
}
|
||
}
|
||
|
||
.tags-container {
|
||
animation: tagsContainer 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
|
||
opacity: 0;
|
||
}
|
||
|
||
/* 标签弹跳动画 */
|
||
@keyframes tagBounce {
|
||
0% {
|
||
opacity: 0;
|
||
transform: translateY(-10rpx) scale(0.8);
|
||
}
|
||
|
||
60% {
|
||
transform: translateY(2rpx) scale(1.05);
|
||
}
|
||
|
||
100% {
|
||
opacity: 1;
|
||
transform: translateY(0) scale(1);
|
||
}
|
||
}
|
||
|
||
.tag-bounce {
|
||
animation: tagBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
|
||
opacity: 0;
|
||
}
|
||
|
||
/* 详情展开动画 */
|
||
@keyframes detailExpand {
|
||
0% {
|
||
opacity: 0;
|
||
max-height: 0;
|
||
transform: translateY(-20rpx);
|
||
}
|
||
|
||
100% {
|
||
opacity: 1;
|
||
max-height: 2000rpx;
|
||
transform: translateY(0);
|
||
}
|
||
}
|
||
|
||
.detail-expand {
|
||
animation: detailExpand 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* 详情单元淡入动画 */
|
||
@keyframes unitFadeIn {
|
||
0% {
|
||
opacity: 0;
|
||
transform: translateY(15rpx);
|
||
}
|
||
|
||
100% {
|
||
opacity: 1;
|
||
transform: translateY(0);
|
||
}
|
||
}
|
||
|
||
.unit-fade-in {
|
||
animation: unitFadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
|
||
opacity: 0;
|
||
}
|
||
|
||
/* 交互反馈动画 */
|
||
.cell-enter:active {
|
||
transform: scale(0.98);
|
||
transition: transform 0.1s ease-out;
|
||
}
|
||
|
||
.tag-bounce:hover {
|
||
transform: translateY(-2rpx) scale(1.02);
|
||
transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||
}
|
||
|
||
/* 单元格活跃状态增强 */
|
||
.analysis-cell.active {
|
||
transform: translateY(-2rpx);
|
||
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||
}
|
||
</style>
|