| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- <template>
- <view class="purchase-traceability-page">
- <!-- 顶部导航栏 -->
- <uni-nav-bar
- fixed="true"
- statusBar="true"
- left-icon="back"
- title="采购溯源"
- background-color="#fff"
- color="#000"
- @clickLeft="handleBack"
- ></uni-nav-bar>
-
- <!-- 主内容区 -->
- <view class="content-wrapper">
- <!-- 产品图片区域 -->
- <view class="product-image-section">
- <view class="product-title">
- 采购溯源
- </view>
- <image class="product-image" :src="productImageSrc" mode="aspectFit"></image>
- </view>
-
-
-
- <!-- 采购信息列表 -->
- <view class="info-list">
- <!-- 采购详情标题 -->
- <view class="info-title">
- <text>采购详情</text>
- </view>
- <view class="info-item">
- <text class="info-label">原药批号:</text>
- <text class="info-value">YA085-250401</text>
- </view>
- <view class="info-item">
- <text class="info-label">原药产地:</text>
- <text class="info-value">湖南怀化</text>
- </view>
- <view class="info-item">
- <text class="info-label">采购时间:</text>
- <text class="info-value"></text>
- </view>
- <view class="info-item">
- <text class="info-label">采购人员:</text>
- <text class="info-value">申瑶</text>
- </view>
- <view class="info-item">
- <text class="info-label">采购重量:</text>
- <text class="info-value">1000kg</text>
- </view>
- <view class="info-item">
- <text class="info-label">采购日期:</text>
- <text class="info-value">2025-03-29</text>
- </view>
- <view class="images-section">
- <text class="section-subtitle">图片:</text>
- <view class="images-grid">
- <image class="detail-image" :src="detailImageSrc" mode="aspectFill"></image>
- </view>
- </view>
- </view>
-
- <!-- 图片展示区域 -->
- <!-- <view class="images-section">
- <text class="section-subtitle">图片:</text>
- <view class="images-grid">
- <image class="detail-image" :src="detailImageSrc" mode="aspectFill"></image>
- </view>
- </view> -->
-
- <!-- 返回首页按钮 -->
- <!-- <view class="home-button" @click="goToHome">
- <image class="home-icon" :src="homeIconSrc" mode="aspectFit"></image>
- </view> -->
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- // 使用项目中已有的图标路径
- productImageSrc: '/static/product/1.svg',
- detailImageSrc: '/static/product/1.svg',
- homeIconSrc: '/static/tab/home.png'
- };
- },
- methods: {
- handleBack() {
- // 返回上一页
- uni.navigateBack();
- },
- goToHome() {
- // 返回首页
- uni.switchTab({
- url: '/pages/home/home'
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .purchase-traceability-page {
- background-color: #f5f5f5;
- min-height: 100vh;
- background-image: url('/static/svg-icons/bg-pattern.svg');
- background-size: cover;
- background-position: center;
- }
- .content-wrapper {
- padding: 60rpx 40rpx 60rpx;
- }
- .product-image-section {
- display: flex;
- justify-content: center;
- margin-bottom: 40rpx;
- background-color: #fff;
- padding: 40rpx;
- border-radius: 20rpx;
- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
- border: 2rpx solid #ffe6e6;
- position: relative;
- }
- .product-title {
- position: absolute;
- font-size: 32rpx;
- font-weight: bold;
- color: #fff;
- text-align: center;
- margin-bottom: 20rpx;
- padding: 10rpx 40rpx;
- background: #bd0402;
- border-radius: 10rpx;
- box-shadow: 0 2rpx 8rpx rgba(255, 107, 107, 0.3);
- top: -20rpx;
- }
- .product-image {
- width: 100%;
- height: 400rpx;
- border-radius: 10rpx;
- margin-top: 20rpx;
- }
- .info-list {
- background-color: #fff;
- border-radius: 20rpx;
- padding: 30rpx;
- margin-bottom: 30rpx;
- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
- position: relative;
- padding-top: 56rpx;
- border: 2rpx solid #ffe6e6;
- }
- .info-title {
- position: absolute;
- top: -20rpx;
- left: 35%;
- background-color: #bd0402;
- color: #fff;
- text-align: center;
- padding: 10rpx 40rpx;
- margin-bottom: 30rpx;
- border-radius: 10rpx;
- font-size: 32rpx;
- font-weight: bold;
- }
- .info-item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 20rpx 0;
- border-bottom: 1rpx solid #f0f0f0;
- }
- .info-item:last-child {
- border-bottom: none;
- }
- .info-label {
- font-size: 28rpx;
- color: #bd0402;
- }
- .info-value {
- font-size: 28rpx;
- color: #333;
- text-align: right;
- }
- .images-section {
- // background-color: #fff;
- // border-radius: 20rpx;
- padding: 20rpx 0;
- // margin-bottom: 60rpx;
- // box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
- }
- .section-subtitle {
- font-size: 28rpx;
- color: #bd0402;
- margin-bottom: 20rpx;
- display: block;
- }
- .images-grid {
- display: flex;
- flex-direction: column;
- gap: 20rpx;
- }
- .detail-image {
- width: 100%;
- height: 400rpx;
- border-radius: 10rpx;
- }
- .home-button {
- position: fixed;
- bottom: 60rpx;
- right: 60rpx;
- width: 100rpx;
- height: 100rpx;
- background-color: #bd0402;
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- box-shadow: 0 4rpx 20rpx rgba(189, 4, 2, 0.4);
- }
- .home-icon {
- width: 60rpx;
- height: 60rpx;
- }
- </style>
|