feat(填报记录): 被驳回记录支持修改后重新提交
- records.vue:已驳回记录卡片底部新增“重新提交”按钮,跳转 create?id=<id>&mode=resubmit;同时补上驳回原因展示 (原 normalizeRecord 未提取 rejectReason,列表页看不到驳回理由) - create.vue:复用同一表单页做编辑模式,onLoad 读 id/mode, 回填门店、日期、打卡照、摆台照、小票、销量、小结、评分、定位; 标题与按钮切换为“重新提交填报/重新提交”,隐藏保存草稿 (草稿 key 与新增共用,会互相覆盖) - 提交走 resubmit 接口,成功后返回列表,onShow 自动刷新为待审核 - api/self-report.js:新增 selfReportResubmitReq
This commit is contained in:
@@ -69,6 +69,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="summary-line">小结:{{ item.summary || '-' }}</view>
|
||||
<view v-if="isRejected(item.status) && item.rejectReason" class="reject-line">
|
||||
驳回原因:{{ item.rejectReason }}
|
||||
</view>
|
||||
<view class="record-toggle" @tap="toggleExpanded(item.id)">
|
||||
<text>{{ isExpanded(item.id) ? '收起详情' : '展开详情' }}</text>
|
||||
<u-icon :name="isExpanded(item.id) ? 'arrow-up' : 'arrow-down'" size="20" color="#2fc6a7"/>
|
||||
@@ -137,6 +140,10 @@
|
||||
<view v-else class="detail-empty">暂无销量数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="isRejected(item.status)" class="record-actions">
|
||||
<view class="resubmit-btn" @tap="handleResubmit(item)">重新提交</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -330,6 +337,7 @@ export default {
|
||||
activityTime: item.activityTime || item.activity_time || '',
|
||||
date: item.date || '',
|
||||
status: item.status,
|
||||
rejectReason: item.rejectReason || item.reject_reason || '',
|
||||
reward: item.reward,
|
||||
rating: item.rating,
|
||||
summary,
|
||||
@@ -464,6 +472,15 @@ export default {
|
||||
if (Number(status) === 2) return 'danger'
|
||||
return 'pending'
|
||||
},
|
||||
isRejected(status) {
|
||||
return Number(status) === 2
|
||||
},
|
||||
handleResubmit(item) {
|
||||
if (!item || item.id === undefined || item.id === null) return
|
||||
uni.navigateTo({
|
||||
url: `/packageUser/self-report/create?id=${item.id}&mode=resubmit`
|
||||
})
|
||||
},
|
||||
changeStatus(value) {
|
||||
this.activeStatus = value
|
||||
},
|
||||
@@ -743,6 +760,37 @@ export default {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.reject-line {
|
||||
margin-top: 10rpx;
|
||||
color: #dc2626;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.5;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.record-actions {
|
||||
margin-top: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
border-top: 1rpx solid #eef2f7;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.resubmit-btn {
|
||||
min-width: 200rpx;
|
||||
min-height: 72rpx;
|
||||
padding: 0 32rpx;
|
||||
border-radius: 999rpx;
|
||||
background: linear-gradient(135deg, #2fc6a7, #1db896);
|
||||
color: #ffffff;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 10rpx 20rpx rgba(47, 198, 167, 0.22);
|
||||
}
|
||||
|
||||
.record-toggle {
|
||||
margin-top: 16rpx;
|
||||
display: inline-flex;
|
||||
|
||||
Reference in New Issue
Block a user