You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
833 lines
53 KiB
833 lines
53 KiB
|
3 months ago
|
<view class="container {{pageScrollLock ? 'page-scroll-lock' : ''}}"
|
||
|
|
style="align-items: flex-start; padding: 20rpx; width: 100%; max-width: 100vw; overflow-x: hidden; position: relative; box-sizing: border-box;"
|
||
|
|
catchtouchmove="{{touchMoveBlocked ? 'preventTouchMove' : ''}}">
|
||
|
|
<view style="display: flex; justify-content: space-between; align-items: center; width: 90%; margin-bottom: 20rpx;">
|
||
|
|
<view class="title">我的鸡蛋货源</view>
|
||
|
|
<button
|
||
|
|
bindtap="contactCustomerService"
|
||
|
|
class="customer-service-btn"
|
||
|
|
>
|
||
|
|
联系客服
|
||
|
|
</button>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 搜索框 -->
|
||
|
|
<view style="width: 100%; display: flex; justify-content: center; margin-bottom: 20rpx;">
|
||
|
|
<view style="width: 90%; display: flex; border: 1rpx solid #ddd; border-radius: 40rpx; overflow: hidden;">
|
||
|
|
<input
|
||
|
|
style="flex: 1; padding: 20rpx 30rpx;"
|
||
|
|
placeholder="搜索货源名称或品种"
|
||
|
|
bindinput="onSearchInput"
|
||
|
|
value="{{searchKeyword}}"
|
||
|
|
/>
|
||
|
|
<button
|
||
|
|
style="background-color: #52c41a; color: white; font-size: 26rpx; height: 80rpx; line-height: 80rpx; padding: 0 30rpx;"
|
||
|
|
bindtap="searchSupplies"
|
||
|
|
>
|
||
|
|
搜索
|
||
|
|
</button>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<button
|
||
|
|
class="glass-btn primary-glass-btn"
|
||
|
|
bindtap="showAddSupply"
|
||
|
|
style="width: 90%;"
|
||
|
|
>
|
||
|
|
创建新货源
|
||
|
|
</button>
|
||
|
|
|
||
|
|
<!-- 已上架货源 -->
|
||
|
|
<view style="margin-top: 30rpx; width: 100%;">
|
||
|
|
<view style="font-size: 28rpx; font-weight: bold; color: #52c41a; margin-bottom: 15rpx; display: flex; justify-content: space-between; align-items: center;">
|
||
|
|
<text>已上架货源 ({{publishedSupplies.length}})</text>
|
||
|
|
<view bindtap="togglePublishedExpand" style="width: 40rpx; height: 40rpx; display: flex; align-items: center; justify-content: center;">
|
||
|
|
<text wx:if="{{isPublishedExpanded}}" style="color: #52c41a; font-size: 28rpx;">▼</text>
|
||
|
|
<text wx:else style="color: #52c41a; font-size: 28rpx;">▲</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<block wx:if="{{isPublishedExpanded}}">
|
||
|
|
<block wx:if="{{publishedSupplies.length > 0}}">
|
||
|
|
<view wx:for="{{publishedSupplies}}" wx:key="id" class="card" style="width: 100%;">
|
||
|
|
<!-- 图片和信息1:1比例并排显示 -->
|
||
|
|
<view style="display: flex; width: 100%; border-radius: 8rpx; overflow: hidden; background-color: #f5f5f5;">
|
||
|
|
<!-- 左侧图片区域 50%宽度 -->
|
||
|
|
<view style="width: 50%; position: relative;">
|
||
|
|
<!-- 第一张图片 -->
|
||
|
|
<view wx:if="{{item.imageUrls && item.imageUrls.length > 0}}" style="width: 100%; height: 100%;">
|
||
|
|
<image src="{{item.imageUrls[0]}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{item.imageUrls}}" data-index="0" binderror="imageError" bindload="imageLoad"
|
||
|
|
loading="lazy"
|
||
|
|
fallback-src="../../images/logo.svg">
|
||
|
|
</image>
|
||
|
|
</view>
|
||
|
|
<view wx:else style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #999;">
|
||
|
|
<text>暂无图片</text>
|
||
|
|
</view>
|
||
|
|
<!-- 剩余图片可滑动区域 -->
|
||
|
|
<view wx:if="{{item.imageUrls && item.imageUrls.length > 1}}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
|
||
|
|
<swiper
|
||
|
|
class="image-swiper"
|
||
|
|
style="width: 100%; height: 100%;"
|
||
|
|
current="{{item.currentImageIndex || 0}}"
|
||
|
|
bindchange="swiperChange"
|
||
|
|
data-id="{{item.id}}">
|
||
|
|
<block wx:for="{{item.imageUrls}}" wx:for-item="img" wx:for-index="idx" wx:key="idx">
|
||
|
|
<swiper-item>
|
||
|
|
<image src="{{img}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{item.imageUrls}}" data-index="{{idx}}"></image>
|
||
|
|
</swiper-item>
|
||
|
|
</block>
|
||
|
|
</swiper>
|
||
|
|
<!-- 显示页码指示器 -->
|
||
|
|
<view style="position: absolute; bottom: 10rpx; right: 10rpx; background-color: rgba(0,0,0,0.5); color: white; padding: 5rpx 10rpx; border-radius: 15rpx; font-size: 20rpx;">
|
||
|
|
{{(item.currentImageIndex || 0) + 1}}/{{item.imageUrls.length}}
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 右侧信息区域 50%宽度 -->
|
||
|
|
<view style="width: 50%; padding: 15rpx; display: flex; flex-direction: column; justify-content: space-between; background-color: white; border-left: 1rpx solid #f0f0f0;">
|
||
|
|
<view>
|
||
|
|
<view style="font-size: 28rpx; font-weight: bold; word-break: break-word;">{{item.name}}
|
||
|
|
<view style="display: inline-block; margin-left: 10rpx; font-size: 18rpx; color: #fff; background-color: #52c41a; padding: 2rpx 8rpx; border-radius: 10rpx;">已上架</view>
|
||
|
|
</view>
|
||
|
|
<view style="font-size: 24rpx; color: #666; margin-top: 8rpx;">蛋黄: {{item.yolk || '无'}}</view>
|
||
|
|
<view style="font-size: 24rpx; color: #666; margin-top: 8rpx;">规格: {{item.spec || '无'}}</view>
|
||
|
|
<view style="color: #f5222d; font-size: 24rpx; margin-top: 8rpx;">件数: {{item.minOrder}}件</view>
|
||
|
|
<view style="color: #1677ff; font-size: 24rpx; margin-top: 8rpx;">斤重: {{item.grossWeight || ''}}斤</view>
|
||
|
|
<view style="color: #722ed1; font-size: 24rpx; margin-top: 8rpx;">地区: {{item.region || '未设置'}}</view>
|
||
|
|
<view style="font-size: 22rpx; color: #999; margin-top: 8rpx;">创建时间: {{item.formattedCreatedAt}}</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 按钮区域 -->
|
||
|
|
<view style="display: flex; justify-content: center; align-items: center; margin-top: 10rpx;">
|
||
|
|
<button
|
||
|
|
style="background-color: #f5222d; color: white; font-size: 22rpx; padding: 0 20rpx; line-height: 60rpx;"
|
||
|
|
bindtap="unpublishSupply"
|
||
|
|
data-id="{{item.id}}"
|
||
|
|
>
|
||
|
|
下架
|
||
|
|
</button>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 已上架货源加载更多 -->
|
||
|
|
<view class="load-more" wx:if="{{pagination.published.hasMore}}">
|
||
|
|
<view class="loading-text" wx:if="{{pagination.published.loading}}">
|
||
|
|
加载中...
|
||
|
|
</view>
|
||
|
|
<view class="load-more-text" wx:else bindtap="onReachPublishedBottom">
|
||
|
|
点击加载更多已上架货源
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<view class="no-more" wx:if="{{!pagination.published.hasMore && publishedSupplies.length > 0}}">
|
||
|
|
没有更多已上架货源了
|
||
|
|
</view>
|
||
|
|
</block>
|
||
|
|
|
||
|
|
<view wx:else style="text-align: center; color: #999; font-size: 24rpx; padding: 30rpx 0;">
|
||
|
|
暂无已上架的货源
|
||
|
|
</view>
|
||
|
|
</block>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 审核中的货源 -->
|
||
|
|
<view style="margin-top: 30rpx; width: 100%;">
|
||
|
|
<view style="font-size: 28rpx; font-weight: bold; color: #1677ff; margin-bottom: 15rpx; display: flex; justify-content: space-between; align-items: center;">
|
||
|
|
<text>审核中的货源 ({{pendingSupplies.length}})</text>
|
||
|
|
<view bindtap="togglePendingExpand" style="width: 40rpx; height: 40rpx; display: flex; align-items: center; justify-content: center;">
|
||
|
|
<text wx:if="{{isPendingExpanded}}" style="color: #1677ff; font-size: 28rpx;">▼</text>
|
||
|
|
<text wx:else style="color: #1677ff; font-size: 28rpx;">▲</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<block wx:if="{{isPendingExpanded}}">
|
||
|
|
<block wx:if="{{pendingSupplies.length > 0}}">
|
||
|
|
<view wx:for="{{pendingSupplies}}" wx:key="id" class="card" style="width: 100%;">
|
||
|
|
<!-- 图片和信息1:1比例并排显示 -->
|
||
|
|
<view style="display: flex; width: 100%; border-radius: 8rpx; overflow: hidden; background-color: #f5f5f5;">
|
||
|
|
<!-- 左侧图片区域 50%宽度 -->
|
||
|
|
<view style="width: 50%; position: relative;">
|
||
|
|
<!-- 第一张图片 -->
|
||
|
|
<view wx:if="{{item.imageUrls && item.imageUrls.length > 0}}" style="width: 100%; height: 100%;">
|
||
|
|
<image src="{{item.imageUrls[0]}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{item.imageUrls}}" data-index="0"></image>
|
||
|
|
</view>
|
||
|
|
<view wx:else style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #999;">
|
||
|
|
<text>暂无图片</text>
|
||
|
|
</view>
|
||
|
|
<!-- 剩余图片可滑动区域 -->
|
||
|
|
<view wx:if="{{item.imageUrls && item.imageUrls.length > 1}}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
|
||
|
|
<swiper
|
||
|
|
class="image-swiper"
|
||
|
|
style="width: 100%; height: 100%;"
|
||
|
|
current="{{item.currentImageIndex || 0}}"
|
||
|
|
bindchange="swiperChange"
|
||
|
|
data-id="{{item.id}}">
|
||
|
|
<block wx:for="{{item.imageUrls}}" wx:for-item="img" wx:for-index="idx" wx:key="idx">
|
||
|
|
<swiper-item>
|
||
|
|
<image src="{{img}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{item.imageUrls}}" data-index="{{idx}}"></image>
|
||
|
|
</swiper-item>
|
||
|
|
</block>
|
||
|
|
</swiper>
|
||
|
|
<!-- 显示页码指示器 -->
|
||
|
|
<view style="position: absolute; bottom: 10rpx; right: 10rpx; background-color: rgba(0,0,0,0.5); color: white; padding: 5rpx 10rpx; border-radius: 15rpx; font-size: 20rpx;">
|
||
|
|
{{(item.currentImageIndex || 0) + 1}}/{{item.imageUrls.length}}
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 右侧信息区域 50%宽度 -->
|
||
|
|
<view style="width: 50%; padding: 15rpx; display: flex; flex-direction: column; justify-content: space-between; background-color: white; border-left: 1rpx solid #f0f0f0;">
|
||
|
|
<view>
|
||
|
|
<view style="font-size: 28rpx; font-weight: bold; word-break: break-word;">{{item.name}}
|
||
|
|
<view style="display: inline-block; margin-left: 10rpx; font-size: 18rpx; color: #fff; background-color: #1677ff; padding: 2rpx 8rpx; border-radius: 10rpx;">审核中</view>
|
||
|
|
</view>
|
||
|
|
<view style="font-size: 24rpx; color: #666; margin-top: 8rpx;">蛋黄: {{item.yolk || '无'}}</view>
|
||
|
|
<view style="font-size: 24rpx; color: #666; margin-top: 8rpx;">规格: {{item.spec || '无'}}</view>
|
||
|
|
<view style="color: #f5222d; font-size: 24rpx; margin-top: 8rpx;">件数: {{item.minOrder}}件</view>
|
||
|
|
<view style="color: #1677ff; font-size: 24rpx; margin-top: 8rpx;">斤重: {{item.grossWeight || ''}}斤</view>
|
||
|
|
<view style="color: #722ed1; font-size: 24rpx; margin-top: 8rpx;">地区: {{item.region || '未设置'}}</view>
|
||
|
|
<view style="font-size: 22rpx; color: #999; margin-top: 8rpx;">创建时间: {{item.formattedCreatedAt}}</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 按钮区域 -->
|
||
|
|
<view style="display: flex; justify-content: space-around; margin-top: 10rpx; gap: 10rpx;">
|
||
|
|
<button
|
||
|
|
style="background-color: #faad14; color: white; font-size: 22rpx; padding: 0 15rpx; line-height: 60rpx;"
|
||
|
|
bindtap="showEditSupply"
|
||
|
|
data-id="{{item.id}}"
|
||
|
|
>
|
||
|
|
编辑
|
||
|
|
</button>
|
||
|
|
|
||
|
|
<button
|
||
|
|
style="background-color: #f5222d; color: white; font-size: 22rpx; padding: 0 15rpx; line-height: 60rpx;"
|
||
|
|
bindtap="deleteSupply"
|
||
|
|
data-id="{{item.id}}"
|
||
|
|
>
|
||
|
|
删除
|
||
|
|
</button>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 审核中货源加载更多 -->
|
||
|
|
<view class="load-more" wx:if="{{pagination.pending.hasMore}}">
|
||
|
|
<view class="loading-text" wx:if="{{pagination.pending.loading}}">
|
||
|
|
加载中...
|
||
|
|
</view>
|
||
|
|
<view class="load-more-text" wx:else bindtap="onReachPendingBottom">
|
||
|
|
点击加载更多审核中货源
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<view class="no-more" wx:if="{{!pagination.pending.hasMore && pendingSupplies.length > 0}}">
|
||
|
|
没有更多审核中货源了
|
||
|
|
</view>
|
||
|
|
</block>
|
||
|
|
|
||
|
|
<view wx:else style="text-align: center; color: #999; font-size: 24rpx; padding: 30rpx 0;">
|
||
|
|
暂无审核中的货源
|
||
|
|
</view>
|
||
|
|
</block>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 审核失败的货源 -->
|
||
|
|
<view style="margin-top: 30rpx; width: 100%;">
|
||
|
|
<view style="font-size: 28rpx; font-weight: bold; color: #f5222d; margin-bottom: 15rpx; display: flex; justify-content: space-between; align-items: center;">
|
||
|
|
<text>审核失败的货源 ({{rejectedSupplies.length}})</text>
|
||
|
|
<view bindtap="toggleRejectedExpand" style="width: 40rpx; height: 40rpx; display: flex; align-items: center; justify-content: center;">
|
||
|
|
<text wx:if="{{isRejectedExpanded}}" style="color: #f5222d; font-size: 28rpx;">▼</text>
|
||
|
|
<text wx:else style="color: #f5222d; font-size: 28rpx;">▲</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<block wx:if="{{isRejectedExpanded}}">
|
||
|
|
<block wx:if="{{rejectedSupplies.length > 0}}">
|
||
|
|
<view wx:for="{{rejectedSupplies}}" wx:key="id" class="card" style="width: 100%;">
|
||
|
|
<!-- 图片和信息1:1比例并排显示 -->
|
||
|
|
<view style="display: flex; width: 100%; border-radius: 8rpx; overflow: hidden; background-color: #f5f5f5;">
|
||
|
|
<!-- 左侧图片区域 50%宽度 -->
|
||
|
|
<view style="width: 50%; position: relative;">
|
||
|
|
<!-- 第一张图片 -->
|
||
|
|
<view wx:if="{{item.imageUrls && item.imageUrls.length > 0}}" style="width: 100%; height: 100%;">
|
||
|
|
<image src="{{item.imageUrls[0]}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{item.imageUrls}}" data-index="0"></image>
|
||
|
|
</view>
|
||
|
|
<view wx:else style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #999;">
|
||
|
|
<text>暂无图片</text>
|
||
|
|
</view>
|
||
|
|
<!-- 剩余图片可滑动区域 -->
|
||
|
|
<view wx:if="{{item.imageUrls && item.imageUrls.length > 1}}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
|
||
|
|
<swiper
|
||
|
|
class="image-swiper"
|
||
|
|
style="width: 100%; height: 100%;"
|
||
|
|
current="{{item.currentImageIndex || 0}}"
|
||
|
|
bindchange="swiperChange"
|
||
|
|
data-id="{{item.id}}">
|
||
|
|
<block wx:for="{{item.imageUrls}}" wx:for-item="img" wx:for-index="idx" wx:key="idx">
|
||
|
|
<swiper-item>
|
||
|
|
<image src="{{img}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{item.imageUrls}}" data-index="{{idx}}"></image>
|
||
|
|
</swiper-item>
|
||
|
|
</block>
|
||
|
|
</swiper>
|
||
|
|
<!-- 显示页码指示器 -->
|
||
|
|
<view style="position: absolute; bottom: 10rpx; right: 10rpx; background-color: rgba(0,0,0,0.5); color: white; padding: 5rpx 10rpx; border-radius: 15rpx; font-size: 20rpx;">
|
||
|
|
{{(item.currentImageIndex || 0) + 1}}/{{item.imageUrls.length}}
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 右侧信息区域 50%宽度 -->
|
||
|
|
<view style="width: 50%; padding: 15rpx; display: flex; flex-direction: column; justify-content: space-between; background-color: white; border-left: 1rpx solid #f0f0f0;">
|
||
|
|
<view>
|
||
|
|
<view style="font-size: 28rpx; font-weight: bold; word-break: break-word;">{{item.name}}
|
||
|
|
<view style="display: inline-block; margin-left: 10rpx; font-size: 18rpx; color: #fff; background-color: #f5222d; padding: 2rpx 8rpx; border-radius: 10rpx;">审核失败</view>
|
||
|
|
</view>
|
||
|
|
<view style="font-size: 24rpx; color: #666; margin-top: 8rpx;">蛋黄: {{item.yolk || '无'}}</view>
|
||
|
|
<view style="font-size: 24rpx; color: #666; margin-top: 8rpx;">规格: {{item.spec || '无'}}</view>
|
||
|
|
<view style="color: #f5222d; font-size: 24rpx; margin-top: 8rpx;">件数: {{item.minOrder}}件</view>
|
||
|
|
<view style="color: #1677ff; font-size: 24rpx; margin-top: 8rpx;">斤重: {{item.grossWeight || ''}}斤</view>
|
||
|
|
<view style="color: #722ed1; font-size: 24rpx; margin-top: 8rpx;">地区: {{item.region || '未设置'}}</view>
|
||
|
|
<view style="font-size: 22rpx; color: #999; margin-top: 8rpx;">创建时间: {{item.formattedCreatedAt}}</view>
|
||
|
|
<!-- 点击查看审核失败原因 -->
|
||
|
|
<view style="color: #f5222d; font-size: 24rpx; margin-top: 8rpx; text-decoration: underline;" bindtap="showRejectReason" data-id="{{item.id}}">
|
||
|
|
审核失败原因:点击查看
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 按钮区域 -->
|
||
|
|
<view style="display: flex; justify-content: space-around; margin-top: 10rpx; gap: 10rpx;">
|
||
|
|
<button
|
||
|
|
style="background-color: #52c41a; color: white; font-size: 22rpx; padding: 0 15rpx; line-height: 60rpx;"
|
||
|
|
bindtap="preparePublishSupply"
|
||
|
|
data-id="{{item.id}}"
|
||
|
|
>
|
||
|
|
上架
|
||
|
|
</button>
|
||
|
|
|
||
|
|
<button
|
||
|
|
style="background-color: #f5222d; color: white; font-size: 22rpx; padding: 0 15rpx; line-height: 60rpx;"
|
||
|
|
bindtap="deleteSupply"
|
||
|
|
data-id="{{item.id}}"
|
||
|
|
>
|
||
|
|
删除
|
||
|
|
</button>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 审核失败货源加载更多 -->
|
||
|
|
<view class="load-more" wx:if="{{pagination.rejected.hasMore}}">
|
||
|
|
<view class="loading-text" wx:if="{{pagination.rejected.loading}}">
|
||
|
|
加载中...
|
||
|
|
</view>
|
||
|
|
<view class="load-more-text" wx:else bindtap="onReachRejectedBottom">
|
||
|
|
点击加载更多审核失败货源
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<view class="no-more" wx:if="{{!pagination.rejected.hasMore && rejectedSupplies.length > 0}}">
|
||
|
|
没有更多审核失败货源了
|
||
|
|
</view>
|
||
|
|
</block>
|
||
|
|
|
||
|
|
<view wx:else style="text-align: center; color: #999; font-size: 24rpx; padding: 30rpx 0;">
|
||
|
|
暂无审核失败的货源
|
||
|
|
</view>
|
||
|
|
</block>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 草稿状态货源 -->
|
||
|
|
<view style="margin-top: 30rpx; width: 100%;">
|
||
|
|
<view style="font-size: 28rpx; font-weight: bold; color: #999; margin-bottom: 15rpx; display: flex; justify-content: space-between; align-items: center;">
|
||
|
|
<text>下架状态货源 ({{draftSupplies.length}})</text>
|
||
|
|
<view bindtap="toggleDraftExpand" style="width: 40rpx; height: 40rpx; display: flex; align-items: center; justify-content: center;">
|
||
|
|
<text wx:if="{{isDraftExpanded}}" style="color: #999; font-size: 28rpx;">▼</text>
|
||
|
|
<text wx:else style="color: #999; font-size: 28rpx;">▲</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<block wx:if="{{isDraftExpanded}}">
|
||
|
|
<block wx:if="{{draftSupplies.length > 0}}">
|
||
|
|
<view wx:for="{{draftSupplies}}" wx:key="id" class="card" style="width: 100%;">
|
||
|
|
<!-- 图片和信息1:1比例并排显示 -->
|
||
|
|
<view style="display: flex; width: 100%; border-radius: 8rpx; overflow: hidden; background-color: #f5f5f5;">
|
||
|
|
<!-- 左侧图片区域 50%宽度 -->
|
||
|
|
<view style="width: 50%; position: relative;">
|
||
|
|
<!-- 第一张图片 -->
|
||
|
|
<view wx:if="{{item.imageUrls && item.imageUrls.length > 0}}" style="width: 100%; height: 100%;">
|
||
|
|
<image src="{{item.imageUrls[0]}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{item.imageUrls}}" data-index="0"></image>
|
||
|
|
</view>
|
||
|
|
<view wx:else style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #999;">
|
||
|
|
<text>暂无图片</text>
|
||
|
|
</view>
|
||
|
|
<!-- 剩余图片可滑动区域 -->
|
||
|
|
<view wx:if="{{item.imageUrls && item.imageUrls.length > 1}}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
|
||
|
|
<swiper
|
||
|
|
class="image-swiper"
|
||
|
|
style="width: 100%; height: 100%;"
|
||
|
|
current="{{item.currentImageIndex || 0}}"
|
||
|
|
bindchange="swiperChange"
|
||
|
|
data-id="{{item.id}}">
|
||
|
|
<block wx:for="{{item.imageUrls}}" wx:for-item="img" wx:for-index="idx" wx:key="idx">
|
||
|
|
<swiper-item>
|
||
|
|
<image src="{{img}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{item.imageUrls}}" data-index="{{idx}}"></image>
|
||
|
|
</swiper-item>
|
||
|
|
</block>
|
||
|
|
</swiper>
|
||
|
|
<!-- 显示页码指示器 -->
|
||
|
|
<view style="position: absolute; bottom: 10rpx; right: 10rpx; background-color: rgba(0,0,0,0.5); color: white; padding: 5rpx 10rpx; border-radius: 15rpx; font-size: 20rpx;">
|
||
|
|
{{(item.currentImageIndex || 0) + 1}}/{{item.imageUrls.length}}
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 右侧信息区域 50%宽度 -->
|
||
|
|
<view style="width: 50%; padding: 15rpx; display: flex; flex-direction: column; justify-content: space-between; background-color: white; border-left: 1rpx solid #f0f0f0;">
|
||
|
|
<view>
|
||
|
|
<view style="font-size: 28rpx; font-weight: bold; word-break: break-word;">{{item.name}}
|
||
|
|
<view wx:if="{{item.status === 'hidden'}}" style="display: inline-block; margin-left: 10rpx; font-size: 18rpx; color: #fff; background-color: #8c8c8c; padding: 2rpx 8rpx; border-radius: 10rpx;">已隐藏</view>
|
||
|
|
<view wx:elif="{{item.status === 'sold_out' || item.status === 'Undercarriage'}}" style="display: inline-block; margin-left: 10rpx; font-size: 18rpx; color: #fff; background-color: #d9d9d9; padding: 2rpx 8rpx; border-radius: 10rpx;">已下架</view>
|
||
|
|
<view wx:else style="display: inline-block; margin-left: 10rpx; font-size: 18rpx; color: #fff; background-color: #999; padding: 2rpx 8rpx; border-radius: 10rpx;">草稿</view>
|
||
|
|
</view>
|
||
|
|
<view style="font-size: 24rpx; color: #666; margin-top: 8rpx;">蛋黄: {{item.yolk || '无'}}</view>
|
||
|
|
<view style="font-size: 24rpx; color: #666; margin-top: 8rpx;">规格: {{item.spec || '无'}}</view>
|
||
|
|
<view style="color: #f5222d; font-size: 24rpx; margin-top: 8rpx;">件数: {{item.minOrder}}件</view>
|
||
|
|
<view style="color: #1677ff; font-size: 24rpx; margin-top: 8rpx;">斤重: {{item.grossWeight || ''}}斤</view>
|
||
|
|
<view style="color: #722ed1; font-size: 24rpx; margin-top: 8rpx;">地区: {{item.region || '未设置'}}</view>
|
||
|
|
<view style="font-size: 22rpx; color: #999; margin-top: 8rpx;">创建时间: {{item.formattedCreatedAt}}</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 按钮区域 -->
|
||
|
|
<view style="display: flex; justify-content: space-around; margin-top: 10rpx; gap: 10rpx; flex-wrap: wrap;">
|
||
|
|
<button
|
||
|
|
style="background-color: #1677ff; color: white; font-size: 22rpx; padding: 0 12rpx; line-height: 56rpx;"
|
||
|
|
bindtap="preparePublishSupply"
|
||
|
|
data-id="{{item.id}}"
|
||
|
|
>
|
||
|
|
上架
|
||
|
|
</button>
|
||
|
|
|
||
|
|
<!-- <button
|
||
|
|
style="background-color: #faad14; color: white; font-size: 22rpx; padding: 0 12rpx; line-height: 56rpx;"
|
||
|
|
bindtap="showEditSupply"
|
||
|
|
data-id="{{item.id}}"
|
||
|
|
>
|
||
|
|
编辑
|
||
|
|
</button> -->
|
||
|
|
|
||
|
|
<button
|
||
|
|
style="background-color: #f5222d; color: white; font-size: 22rpx; padding: 0 12rpx; line-height: 56rpx;"
|
||
|
|
bindtap="deleteSupply"
|
||
|
|
data-id="{{item.id}}"
|
||
|
|
>
|
||
|
|
删除
|
||
|
|
</button>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 下架状态货源加载更多 -->
|
||
|
|
<view class="load-more" wx:if="{{pagination.draft.hasMore}}">
|
||
|
|
<view class="loading-text" wx:if="{{pagination.draft.loading}}">
|
||
|
|
加载中...
|
||
|
|
</view>
|
||
|
|
<view class="load-more-text" wx:else bindtap="onReachDraftBottom">
|
||
|
|
点击加载更多下架状态货源
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<view class="no-more" wx:if="{{!pagination.draft.hasMore && draftSupplies.length > 0}}">
|
||
|
|
没有更多下架状态货源了
|
||
|
|
</view>
|
||
|
|
</block>
|
||
|
|
|
||
|
|
<view wx:else style="text-align: center; color: #999; font-size: 24rpx; padding: 30rpx 0;">
|
||
|
|
暂无下架状态的货源
|
||
|
|
</view>
|
||
|
|
</block>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 创建货源弹窗 -->
|
||
|
|
<view class="modal" wx:if="{{showModal}}" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 999;" catchtouchmove="true" bindtouchstart="onModalTouchStart" bindtouchmove="onModalTouchMove">
|
||
|
|
<view class="modal-content" style="width: 92%; max-width: 600rpx; background: white; padding: 40rpx; border-radius: 20rpx; max-height: 85vh; position: relative; box-shadow: 0 10rpx 40rpx rgba(0,0,0,0.15); transform: translateZ(0); -webkit-transform: translateZ(0);">
|
||
|
|
<!-- 固定的关闭按钮 -->
|
||
|
|
<view style="position: absolute; top: 20rpx; right: 20rpx; background-color: #f5f5f5; color: #666; width: 60rpx; height: 60rpx; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 36rpx; z-index: 10;" bindtap="hideModal">×</view>
|
||
|
|
|
||
|
|
<scroll-view scroll-y="true" style="height: 950rpx; overflow-y: scroll; -webkit-overflow-scrolling: touch; transform: translateZ(0); -webkit-transform: translateZ(0);" catchtouchmove="true" bindtouchstart="onModalTouchStart" bindtouchmove="onModalTouchMove">
|
||
|
|
<view class="title" style="text-align: center; font-size: 36rpx; font-weight: bold; color: #333; margin-bottom: 30rpx; margin-top: 10rpx;">创建货源</view>
|
||
|
|
|
||
|
|
<!-- 照片上传区域 -->
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-top: 10rpx;">商品图片</view>
|
||
|
|
<view class="upload-area" style="width: 100%; margin: 0 auto; margin-bottom: 30rpx; border: 1rpx dashed #ddd; border-radius: 12rpx; padding: 24rpx;">
|
||
|
|
<view style="display: flex; flex-wrap: wrap;">
|
||
|
|
<!-- 已上传的图片 -->
|
||
|
|
<view wx:for="{{newSupply.imageUrls}}" wx:key="index" style="position: relative; width: 160rpx; height: 160rpx; margin: 10rpx; border-radius: 12rpx; overflow: hidden; box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.1);">
|
||
|
|
<image src="{{item}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{newSupply.imageUrls}}" data-index="{{index}}"></image>
|
||
|
|
<view class="delete-icon" style="position: absolute; top: 8rpx; right: 8rpx; background-color: rgba(0,0,0,0.6); color: white; width: 44rpx; height: 44rpx; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28rpx;" bindtap="deleteImage" data-index="{{index}}" data-type="new">×</view>
|
||
|
|
</view>
|
||
|
|
<!-- 上传按钮 -->
|
||
|
|
<view wx:if="{{newSupply.imageUrls.length < 5}}" style="width: 160rpx; height: 160rpx; margin: 10rpx; border: 2rpx dashed #1677ff; border-radius: 12rpx; display: flex; align-items: center; justify-content: center; background-color: #f0f8ff;" bindtap="chooseImage" data-type="new">
|
||
|
|
<text style="font-size: 60rpx; color: #1677ff;">+</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<view style="font-size: 22rpx; color: #999; margin-top: 16rpx; text-align: center;">最多上传5张图片</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">商品名称</view>
|
||
|
|
<view
|
||
|
|
bindtap="openNameSelectModal"
|
||
|
|
style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block; background: white; position: relative;">
|
||
|
|
<view style="display: flex; justify-content: space-between; align-items: center;">
|
||
|
|
<text>{{newSupply.name || '请选择商品名称'}}</text>
|
||
|
|
<text style="color: #999;">▼</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">蛋黄</view>
|
||
|
|
<view bindtap="openYolkSelectModal" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block; background: white; position: relative;">
|
||
|
|
<view style="display: flex; justify-content: space-between; align-items: center;">
|
||
|
|
<text>{{newSupply.yolk || '请选择蛋黄类型'}}</text>
|
||
|
|
<text style="color: #999;">▼</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">规格</view>
|
||
|
|
<!-- 修改为可点击的视图,点击后打开自定义弹窗 -->
|
||
|
|
<view bindtap="onSpecChange" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block; background: white; position: relative; z-index: 1;">
|
||
|
|
<view style="display: flex; justify-content: space-between; align-items: center;">
|
||
|
|
<text>{{newSupply.spec || '请选择规格'}}</text>
|
||
|
|
<text style="color: #999;">▼</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<!-- 搜索功能已移至弹窗内 -->
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">价格</view>
|
||
|
|
<input class="input" type="text" placeholder="请输入价格" bindinput="onInput" data-field="price" value="{{newSupply.price}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
|
||
|
|
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">件数</view>
|
||
|
|
<input class="input" type="number" placeholder="请输入件数" bindinput="onInput" data-field="minOrder" value="{{newSupply.minOrder}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
|
||
|
|
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">斤重</view>
|
||
|
|
<input class="input" type="text" placeholder="请输入斤重" bindinput="onInput" data-field="grossWeight" value="{{newSupply.grossWeight || ''}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
|
||
|
|
|
||
|
|
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">地区</view>
|
||
|
|
<input class="input" placeholder="请输入地区" bindinput="onInput" data-field="region" value="{{newSupply.region}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
|
||
|
|
|
||
|
|
<view style="display: flex; justify-content: space-between; margin-top: 20rpx; margin-bottom: 20rpx; gap: 20rpx;">
|
||
|
|
<button bindtap="hideModal" style="flex: 1; height: 90rpx; line-height: 90rpx; background-color: #f5f5f5; color: #666; font-size: 30rpx; border-radius: 12rpx; margin: 0; display: flex; align-items: center; justify-content: center;">取消</button>
|
||
|
|
<button bindtap="addSupply" style="flex: 1; height: 90rpx; line-height: 90rpx; background-color: #07c160; color: white; font-size: 30rpx; border-radius: 12rpx; margin: 0; display: flex; align-items: center; justify-content: center;">创建</button>
|
||
|
|
</view>
|
||
|
|
</scroll-view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 编辑货源弹窗 -->
|
||
|
|
<view class="modal" wx:if="{{showEditModal}}" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 999;" catchtouchmove="true" bindtouchstart="onModalTouchStart" bindtouchmove="onModalTouchMove">
|
||
|
|
<view class="modal-content" style="width: 92%; max-width: 600rpx; background: white; padding: 40rpx; border-radius: 20rpx; max-height: 85vh; position: relative; box-shadow: 0 10rpx 40rpx rgba(0,0,0,0.15); transform: translateZ(0); -webkit-transform: translateZ(0);">
|
||
|
|
<!-- 固定的关闭按钮 -->
|
||
|
|
<view style="position: absolute; top: 20rpx; right: 20rpx; background-color: #f5f5f5; color: #666; width: 60rpx; height: 60rpx; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 36rpx; z-index: 10;" bindtap="hideEditModal">×</view>
|
||
|
|
|
||
|
|
<scroll-view scroll-y="true" style="height: 950rpx; overflow-y: scroll; -webkit-overflow-scrolling: touch; transform: translateZ(0); -webkit-transform: translateZ(0);" catchtouchmove="true" bindtouchstart="onModalTouchStart" bindtouchmove="onModalTouchMove">
|
||
|
|
<view class="title" style="text-align: center; font-size: 36rpx; font-weight: bold; color: #333; margin-bottom: 30rpx; margin-top: 10rpx;">编辑货源</view>
|
||
|
|
|
||
|
|
<!-- 照片上传区域 -->
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-top: 10rpx;">商品图片</view>
|
||
|
|
<view class="upload-area" style="width: 100%; margin: 0 auto; margin-bottom: 30rpx; border: 1rpx dashed #ddd; border-radius: 12rpx; padding: 24rpx;">
|
||
|
|
<view style="display: flex; flex-wrap: wrap;">
|
||
|
|
<!-- 已上传的图片 -->
|
||
|
|
<view wx:for="{{editSupply.imageUrls}}" wx:key="index" style="position: relative; width: 160rpx; height: 160rpx; margin: 10rpx; border-radius: 12rpx; overflow: hidden; box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.1);">
|
||
|
|
<image src="{{item}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{editSupply.imageUrls}}" data-index="{{index}}"></image>
|
||
|
|
<view class="delete-icon" style="position: absolute; top: 8rpx; right: 8rpx; background-color: rgba(0,0,0,0.6); color: white; width: 44rpx; height: 44rpx; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28rpx;" bindtap="deleteImage" data-index="{{index}}" data-type="edit">×</view>
|
||
|
|
</view>
|
||
|
|
<!-- 上传按钮 -->
|
||
|
|
<view wx:if="{{editSupply.imageUrls.length < 5}}" style="width: 160rpx; height: 160rpx; margin: 10rpx; border: 2rpx dashed #1677ff; border-radius: 12rpx; display: flex; align-items: center; justify-content: center; background-color: #f0f8ff;" bindtap="chooseImage" data-type="edit">
|
||
|
|
<text style="font-size: 60rpx; color: #1677ff;">+</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<view style="font-size: 22rpx; color: #999; margin-top: 16rpx; text-align: center;">最多上传5张图片</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">商品名称</view>
|
||
|
|
<view
|
||
|
|
bindtap="openNameSelectModal"
|
||
|
|
style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block; background: white; position: relative;">
|
||
|
|
<view style="display: flex; justify-content: space-between; align-items: center;">
|
||
|
|
<text>{{editSupply.name || '请选择商品名称'}}</text>
|
||
|
|
<text style="color: #999;">▼</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">蛋黄</view>
|
||
|
|
<view bindtap="openYolkSelectModal" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block; background: white; position: relative;">
|
||
|
|
<view style="display: flex; justify-content: space-between; align-items: center;">
|
||
|
|
<text>{{editSupply.yolk || '请选择蛋黄类型'}}</text>
|
||
|
|
<text style="color: #999;">▼</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">规格</view>
|
||
|
|
<!-- 修改为可点击的视图,点击后打开自定义弹窗 -->
|
||
|
|
<view bindtap="onEditSpecChange" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block; background: white; position: relative; z-index: 1;">
|
||
|
|
<view style="display: flex; justify-content: space-between; align-items: center;">
|
||
|
|
<text>{{editSupply.spec || '请选择规格'}}</text>
|
||
|
|
<text style="color: #999;">▼</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<!-- 搜索功能已移至弹窗内 -->
|
||
|
|
|
||
|
|
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">价格</view>
|
||
|
|
<input class="input" type="text" placeholder="请输入价格" bindinput="onEditInput" data-field="price" value="{{editSupply.price}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
|
||
|
|
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">件数</view>
|
||
|
|
<input class="input" type="number" placeholder="请输入件数" bindinput="onEditInput" data-field="minOrder" value="{{editSupply.minOrder}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
|
||
|
|
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">斤重</view>
|
||
|
|
<input class="input" type="text" placeholder="请输入斤重" bindinput="onEditInput" data-field="grossWeight" value="{{editSupply.grossWeight || ''}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
|
||
|
|
|
||
|
|
|
||
|
|
<view style="font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 12rpx; margin-left: 10rpx;">地区</view>
|
||
|
|
<input class="input" placeholder="请输入地区" bindinput="onEditInput" data-field="region" value="{{editSupply.region}}" style="width: 100%; height: 90rpx; line-height: 90rpx; padding: 0 24rpx; font-size: 30rpx; border: 2rpx solid #eee; border-radius: 12rpx; box-sizing: border-box; margin: 0 auto 30rpx; display: block;" placeholder-style="font-size: 24rpx; color: #999; text-align: left;" catchtouchmove="true" bindtouchstart="onInputTouchStart" bindtouchmove="onInputTouchMove"></input>
|
||
|
|
|
||
|
|
<view style="display: flex; justify-content: space-between; margin-top: 20rpx; margin-bottom: 20rpx; gap: 20rpx;">
|
||
|
|
<button bindtap="hideEditModal" style="flex: 1; height: 90rpx; line-height: 90rpx; background-color: #f5f5f5; color: #666; font-size: 30rpx; border-radius: 12rpx; margin: 0; display: flex; align-items: center; justify-content: center;">取消</button>
|
||
|
|
<button bindtap="saveEdit" style="flex: 1; height: 90rpx; line-height: 90rpx; background-color: #07c160; color: white; font-size: 30rpx; border-radius: 12rpx; margin: 0; display: flex; align-items: center; justify-content: center;">提交</button>
|
||
|
|
</view>
|
||
|
|
</scroll-view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 图片预览弹窗 -->
|
||
|
|
<view class="image-preview-mask" wx:if="{{showImagePreview}}" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center; z-index: 9999;" catchtouchmove="true" bindtap="closeImagePreview">
|
||
|
|
<view style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;">
|
||
|
|
<swiper
|
||
|
|
style="width: 100%; height: 100%;"
|
||
|
|
current="{{previewImageIndex}}"
|
||
|
|
bindchange="onPreviewImageChange"
|
||
|
|
indicator-dots="true"
|
||
|
|
indicator-color="rgba(255,255,255,0.5)"
|
||
|
|
indicator-active-color="#fff">
|
||
|
|
<block wx:for="{{previewImageUrls}}" wx:key="*this">
|
||
|
|
<swiper-item>
|
||
|
|
<image
|
||
|
|
src="{{item}}"
|
||
|
|
mode="aspectFit"
|
||
|
|
style="width: 100%; height: 100%; transform: scale({{scale}}) translate({{offsetX}}px, {{offsetY}}px); transform-origin: center; transition: transform 0.1s;"
|
||
|
|
bindtap="handleImageTap"
|
||
|
|
bindtouchstart="handleTouchStart"
|
||
|
|
bindtouchmove="handleTouchMove"
|
||
|
|
bindtouchend="handleTouchEnd"
|
||
|
|
bindload="onPreviewImageLoad"
|
||
|
|
></image>
|
||
|
|
</swiper-item>
|
||
|
|
</block>
|
||
|
|
</swiper>
|
||
|
|
<view style="position: absolute; top: 40rpx; right: 40rpx; color: white; font-size: 40rpx;">
|
||
|
|
<text bindtap="closeImagePreview" style="background: rgba(0,0,0,0.5); padding: 10rpx 20rpx; border-radius: 50%;">×</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 审核失败原因弹窗 -->
|
||
|
|
<view class="reject-reason-modal" wx:if="{{showRejectReasonModal}}" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 9999;" catchtouchmove="true">
|
||
|
|
<view style="width: 80%; background: white; border-radius: 16rpx; overflow: hidden;">
|
||
|
|
<!-- 弹窗标题和关闭按钮 -->
|
||
|
|
<view style="padding: 30rpx; border-bottom: 1rpx solid #eee; display: flex; justify-content: space-between; align-items: center;">
|
||
|
|
<text style="font-size: 32rpx; font-weight: bold;">审核失败原因</text>
|
||
|
|
<view style="width: 60rpx; height: 60rpx; display: flex; align-items: center; justify-content: center; font-size: 40rpx; color: #999;" bindtap="closeRejectReasonModal">×</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 失败原因内容 -->
|
||
|
|
<view style="padding: 30rpx;">
|
||
|
|
<view style="min-height: 200rpx; font-size: 28rpx; line-height: 48rpx; color: #666; white-space: pre-wrap; word-break: break-word;">{{rejectReason}}</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 操作按钮 -->
|
||
|
|
<view style="display: flex; border-top: 1rpx solid #eee;">
|
||
|
|
<!-- <button style="flex: 1; background-color: #faad14; color: white; font-size: 28rpx; margin: 0; border-radius: 0; border-right: 1rpx solid #eee;" bindtap="editRejectedSupply">编辑</button> -->
|
||
|
|
<button style="flex: 1; background-color: #52c41a; color: white; font-size: 28rpx; margin: 0; border-radius: 0;" bindtap="resubmitRejectedSupply">重新提交</button>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 蛋黄选择弹窗 - 白色样式 -->
|
||
|
|
<view class="custom-select-modal" wx:if="{{showYolkSelectModal}}" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: center; z-index: 9999;" catchtouchmove="true">
|
||
|
|
<view style="position: fixed; bottom: 0; left: 0; right: 0; background: white; border-radius: 20rpx 20rpx 0 0; max-height: 80vh;">
|
||
|
|
<!-- 顶部操作栏:取消和确定按钮 -->
|
||
|
|
<view style="padding: 20rpx; display: flex; justify-content: space-between; align-items: center; border-bottom: 1rpx solid #eee;">
|
||
|
|
<view bindtap="closeYolkSelectModal" style="font-size: 32rpx; color: #333; padding: 10rpx 20rpx;">取消</view>
|
||
|
|
<view bindtap="confirmYolkSelection" style="font-size: 32rpx; color: #07c160; padding: 10rpx 20rpx;">确定</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 蛋黄列表 -->
|
||
|
|
<scroll-view
|
||
|
|
scroll-y="true"
|
||
|
|
style="max-height: 60vh; padding: 0; -webkit-overflow-scrolling: touch;"
|
||
|
|
enable-back-to-top="false"
|
||
|
|
>
|
||
|
|
<view
|
||
|
|
wx:for="{{yolkOptions}}"
|
||
|
|
wx:key="index"
|
||
|
|
class="select-item {{selectedYolkIndex === index ? 'selected' : ''}}"
|
||
|
|
bindtap="onYolkSelect"
|
||
|
|
data-index="{{index}}"
|
||
|
|
style="padding: 32rpx 40rpx; border-bottom: 1rpx solid #f0f0f0; font-size: 32rpx; color: {{selectedYolkIndex === index ? '#07c160' : '#131413'}}; text-align: center;"
|
||
|
|
>
|
||
|
|
{{item}}
|
||
|
|
</view>
|
||
|
|
</scroll-view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 商品名称选择弹窗 - 白色样式 -->
|
||
|
|
<view class="custom-select-modal" wx:if="{{showNameSelectModal}}" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: center; z-index: 9999;" catchtouchmove="true">
|
||
|
|
<view style="position: fixed; bottom: 0; left: 0; right: 0; background: white; border-radius: 20rpx 20rpx 0 0; max-height: 80vh;">
|
||
|
|
<!-- 顶部操作栏:取消和确定按钮 -->
|
||
|
|
<view style="padding: 20rpx; display: flex; justify-content: space-between; align-items: center; border-bottom: 1rpx solid #eee;">
|
||
|
|
<view bindtap="closeNameSelectModal" style="font-size: 32rpx; color: #333; padding: 10rpx 20rpx;">取消</view>
|
||
|
|
<view bindtap="confirmNameSelection" style="font-size: 32rpx; color: #07c160; padding: 10rpx 20rpx;">确定</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 商品名称列表 -->
|
||
|
|
<scroll-view
|
||
|
|
scroll-y="true"
|
||
|
|
style="max-height: 60vh; padding: 0; -webkit-overflow-scrolling: touch;"
|
||
|
|
enable-back-to-top="false"
|
||
|
|
>
|
||
|
|
<view
|
||
|
|
wx:for="{{productNameOptions}}"
|
||
|
|
wx:key="index"
|
||
|
|
class="select-item {{selectedNameIndex === index ? 'selected' : ''}}"
|
||
|
|
bindtap="onNameSelect"
|
||
|
|
data-index="{{index}}"
|
||
|
|
style="padding: 32rpx 40rpx; border-bottom: 1rpx solid #f0f0f0; font-size: 32rpx; color: {{selectedNameIndex === index ? '#07c160' : '#131413'}}; text-align: center;"
|
||
|
|
>
|
||
|
|
{{item}}
|
||
|
|
</view>
|
||
|
|
</scroll-view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 自定义规格选择弹窗 - 适配原生风格 -->
|
||
|
|
<view class="spec-select-modal" wx:if="{{showSpecSelectModal}}" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: center; z-index: 9999;" catchtouchmove="true">
|
||
|
|
<view style="position: fixed; bottom: 0; left: 0; right: 0; background: white; border-radius: 20rpx 20rpx 0 0; max-height: 80vh;">
|
||
|
|
<!-- 顶部操作栏:取消和确定按钮 -->
|
||
|
|
<view style="padding: 20rpx; display: flex; justify-content: space-between; align-items: center; border-bottom: 1rpx solid #eee;">
|
||
|
|
<view bindtap="closeSpecSelectModal" style="font-size: 32rpx; color: #333; padding: 10rpx 20rpx;">取消</view>
|
||
|
|
<view bindtap="confirmSpecSelection" style="font-size: 32rpx; color: #07c160; padding: 10rpx 20rpx;">确定</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 搜索框区域 -->
|
||
|
|
<view style="padding: 20rpx;">
|
||
|
|
<view style="position: relative; background: #f5f5f5; border-radius: 40rpx; padding: 0 30rpx;">
|
||
|
|
<input
|
||
|
|
type="text"
|
||
|
|
placeholder="搜索规格"
|
||
|
|
value="{{modalSpecSearchKeyword}}"
|
||
|
|
bindinput="onModalSpecSearchInput"
|
||
|
|
confirm-type="search"
|
||
|
|
style="width: 100%; height: 70rpx; line-height: 70rpx; font-size: 28rpx; background: transparent;"
|
||
|
|
/>
|
||
|
|
<view
|
||
|
|
wx:if="{{modalSpecSearchKeyword}}"
|
||
|
|
bindtap="clearModalSpecSearch"
|
||
|
|
style="position: absolute; right: 30rpx; top: 50%; transform: translateY(-50%); color: #999;"
|
||
|
|
>
|
||
|
|
✕
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 规格列表 -->
|
||
|
|
<scroll-view
|
||
|
|
scroll-y="true"
|
||
|
|
style="max-height: 60vh; padding: 0; -webkit-overflow-scrolling: touch;"
|
||
|
|
enable-back-to-top="false"
|
||
|
|
>
|
||
|
|
<view
|
||
|
|
wx:for="{{filteredModalSpecOptions}}"
|
||
|
|
wx:key="index"
|
||
|
|
class="spec-item {{selectedModalSpecIndex === index ? 'selected' : ''}}"
|
||
|
|
bindtap="onModalSpecSelect"
|
||
|
|
data-index="{{index}}"
|
||
|
|
style="padding: 32rpx 40rpx; border-bottom: 1rpx solid #f0f0f0; font-size: 32rpx; color: {{selectedModalSpecIndex === index ? '#07c160' : '#131413'}}; text-align: center;"
|
||
|
|
>
|
||
|
|
{{item}}
|
||
|
|
</view>
|
||
|
|
</scroll-view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 未授权登录提示弹窗 -->
|
||
|
|
<view wx:if="{{showAuthModal}}" class="auth-modal-overlay">
|
||
|
|
<view class="auth-modal-container">
|
||
|
|
<view class="auth-modal-title">
|
||
|
|
<text>提示</text>
|
||
|
|
</view>
|
||
|
|
<view class="auth-modal-content">
|
||
|
|
<text>您还没有授权登录</text>
|
||
|
|
</view>
|
||
|
|
<view class="auth-modal-buttons">
|
||
|
|
<button class="auth-primary-button" bindtap="showOneKeyLogin">
|
||
|
|
一键登录
|
||
|
|
</button>
|
||
|
|
<button class="auth-cancel-button" bindtap="closeAuthModal">取消</button>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 一键登录弹窗 -->
|
||
|
|
<view wx:if="{{showOneKeyLoginModal}}" class="auth-modal-overlay">
|
||
|
|
<view class="auth-modal-container">
|
||
|
|
<view class="auth-modal-title">
|
||
|
|
<text>授权登录</text>
|
||
|
|
</view>
|
||
|
|
<view class="auth-modal-content">
|
||
|
|
<text>请授权获取您的手机号用于登录</text>
|
||
|
|
</view>
|
||
|
|
<view class="auth-modal-buttons">
|
||
|
|
<button class="auth-primary-button" open-type="getPhoneNumber" bind:getphonenumber="onGetPhoneNumber">
|
||
|
|
授权获取手机号
|
||
|
|
</button>
|
||
|
|
<button class="auth-cancel-button" bindtap="closeOneKeyLoginModal">取消</button>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 用户信息填写弹窗 -->
|
||
|
|
<view wx:if="{{showUserInfoForm}}" class="auth-modal-overlay">
|
||
|
|
<view class="auth-modal-container">
|
||
|
|
<view class="auth-modal-title">
|
||
|
|
<text>完善个人信息</text>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 头像选择 -->
|
||
|
|
<view class="auth-avatar-section">
|
||
|
|
<button class="auth-avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
|
||
|
|
<image class="auth-avatar" src="{{avatarUrl}}"></image>
|
||
|
|
</button>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 昵称输入 -->
|
||
|
|
<form bindsubmit="getUserName">
|
||
|
|
<view class="auth-form-group">
|
||
|
|
<view class="auth-form-label">昵称</view>
|
||
|
|
<input placeholder="请输入昵称" type="nickname" name="nickname" maxlength="32" class="auth-form-input"></input>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 提交按钮 -->
|
||
|
|
<view class="auth-form-actions">
|
||
|
|
<button form-type="submit" class="auth-confirm-button">确定</button>
|
||
|
|
</view>
|
||
|
|
</form>
|
||
|
|
|
||
|
|
<!-- 取消按钮 -->
|
||
|
|
<view class="auth-modal-buttons">
|
||
|
|
<button class="auth-cancel-button" bindtap="cancelUserInfoForm">取消</button>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
</view>
|