| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 | <template>	<view class="box">		<view class="top">			<view class="left">				<image :src="carInfo.brandLogo" mode="widthFix" class="brandLogo" v-if="carInfo.brandLogo">					<img src="../../static/timg/nocar.png" alt="" class="brandLogo" v-else>					<view class="car" v-if="carInfo.carModel">{{carInfo.carModel}}</view>					<view class="car" v-else>暂无</view>				</image>			</view>			<image src="../../static/img/big_rightArrow.png" mode="" style="width: 30rpx;height: 30rpx;"></image>		</view>		<view class="main" v-if="itemList">			<view class="mainLeft">				<view class="mainLeftLine" v-for="(item,index) in itemList" :class="{lineLeftActive:leftIndex==index}"					@click="leftClick(item,index)">					<span class="leftTitle">{{item.name}}</span>					<view class="lineNum" v-show="item.num!=0">{{item.num}}</view>				</view>			</view>			<view class="mainRight">				<view class="rightTop">{{itemList[leftIndex].name}}</view>				<view class="mainRightLine" v-for="(item2,index) in itemList[leftIndex].list" :key="index">					<view class="itemTop">						<view class="itemName">{{item2.ItemName}}</view>						<span class="rightState" v-if="item2.open==false" @click="changeState(item2)">展开<image								src="../../static/img/icon_arrow_down.png" mode=""								style="width: 20rpx;height: 11rpx; padding: 5rpx 8rpx;"></image>						</span>						<span class="rightState" v-else @click="changeState(item2)">收起<image								src="../../static/img/icon_arrow_up.png" mode=""								style="width: 20rpx;height: 11rpx; padding: 5rpx 8rpx;"></image>						</span>					</view>					<!--  -->					<view class="itemBox">						<view class="type">							<view class="typeName">喷漆</view>							<view class=""><span class="renminbi">¥</span>{{item2.PSalePrice}}</view>						</view>						<view class="type marginLeft">							<view class="typeName">钣金喷漆</view>							<view class=""><span class="renminbi">¥</span>{{item2.BPSalePrice}}</view>						</view>					</view>				</view>			</view>		</view>	</view></template><script>	export default {		data() {			return {				carInfo: '',				itemList: [],				leftIndex: 0,			}		},		onShow() {			this.carInfo = this.$store.state.carInfo			console.log("车=",this.carInfo);		},		onLoad() {			this.getData();		},		methods: {			changeState(item) {				item.open = !item.open			},			leftClick(item, index) {				this.leftIndex = index			},			getData() {				uni.showLoading({					title: '加载中'				});				this.$http('openSheetMetalSprayPaint/queryPackageList', {					// id: this.id,				}, 'GET').then(res => {					uni.hideLoading();					this.itemList = res.data;				})			},		}	}</script><style>	.box {		min-height: 100vh;		background-color: #f4f5f7;	}	.top {		background-color: #FFFFFF;		padding: 30rpx 20rpx;		display: flex;		justify-content: space-between;		align-items: center;	}	.left {		display: flex;		align-items: center;	}	.car {		font-size: 28rpx;		color: #333333;		line-height: 40rpx;		margin-left: 10rpx;		/* 隐藏文字显示 ...不换行 */		overflow: hidden;		text-overflow: ellipsis;		white-space: nowrap;	}	.brandLogo {		width: 42rpx;		height: 42rpx;	}	.main {		display: flex;		height: calc(100vh - 310rpx);	}	.mainLeft {		width: 154rpx;		background: #F4F5F7;	}	.mainLeftLine {		color: #3C3C3C;		padding: 30rpx 20rpx;		font-size: 26rpx;		text-align: center;		position: relative;	}	.leftTitle {		color: #333333;		font-weight: bold;		font-size: 26rpx;	}	.lineNum {		position: absolute;		background: #FF270A;		width: 40rpx;		height: 26rpx;		text-align: center;		line-height: 26rpx;		font-size: 20rpx;		color: #FFFFFF;		border-radius: 13rpx;		top: 10rpx;		right: 10rpx;	}	.lineLeftActive {		background: #FFFFFF;	}	.mainRight {		width: 596rpx;		background-color: #FFFFFF;	}	.rightTop {		padding: 13rpx 24rpx;		background-color: #F9F9F9;		font-size: 26rpx;		color: #959595;		line-height: 37rpx;	}	.mainRightLine {		padding: 30rpx 24rpx;		background-color: #FFFFFF;	}	.itemTop {		display: flex;		justify-content: space-between;		align-items: center;	}	.itemName {		font-size: 28rpx;		font-weight: bold;		color: #333333;	}	.rightState {		font-size: 24rpx;		color: #6666666;	}	.itemBox {		display: flex;		justify-content: space-around;		border-bottom: 1rpx solid #EEEEEE;		padding: 30rpx 0;	}	.type {		border-radius: 10rpx;		border: 2rpx solid #CCCCCC;				width: 50%;		text-align: center;	}	.marginLeft{		margin-left: 20rpx;	}	.typeName{		height: 57rpx;		color: #666666;		font-size: 26rpx;		line-height: 57rpx;		border-bottom: 2rpx solid #EEEEEE;	}	</style>
 |