核销中心完成
This commit is contained in:
parent
93402088cd
commit
dd7e2d5845
|
|
@ -124,7 +124,7 @@
|
|||
{
|
||||
"path": "verification/index",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "核销页面"
|
||||
|
|
@ -133,6 +133,7 @@
|
|||
{
|
||||
"path": "verification/detail",
|
||||
"style": {
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "核销详情"
|
||||
}
|
||||
|
|
@ -152,7 +153,7 @@
|
|||
"current": 0, // 当前激活的条件,默认为 0
|
||||
"list": [{
|
||||
"name": "", // 条件名称
|
||||
"path": "pagesA/task_hall/list", // 要打开的页面路径
|
||||
"path": "pagesA/verification/index", // 要打开的页面路径
|
||||
"query": "" // 可选的页面参数
|
||||
}]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@
|
|||
{
|
||||
image: uni.$globalData?.RESOURCE_URL + 'home/grid/hexiao.png',
|
||||
title: '核销入库',
|
||||
type: ''
|
||||
type: 'verification'
|
||||
},
|
||||
{
|
||||
image: uni.$globalData?.RESOURCE_URL + 'home/grid/xiaoxi.png',
|
||||
|
|
|
|||
|
|
@ -13,46 +13,62 @@
|
|||
<text class="li-text-42">核销中心</text>
|
||||
</view>
|
||||
</template>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<template #right>
|
||||
<view class="li-flex-center li-mr-200" @click="toVerificationHistory">
|
||||
<text class="ri-history-line li-text-48"></text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<template #right>
|
||||
<view class="li-flex-center li-mr-25" @click="toVerificationHistory">
|
||||
<text class="ri-history-line li-text-48"></text>
|
||||
</view>
|
||||
</template>
|
||||
<!-- #endif -->
|
||||
</wd-navbar>
|
||||
<!-- 导航栏背景 -->
|
||||
<view class="nav-bg-layer"></view>
|
||||
|
||||
<!-- 功能模式切换和连续核销开关 -->
|
||||
<view class="mode-section li-w-92% li-mx-auto li-flex li-justify-between li-items-center li-mt-30">
|
||||
<view class=" li-w-92% li-mx-auto li-flex li-justify-between li-items-center li-mt-20">
|
||||
<wd-tabs v-model="activeMode" :sticky="false" :line-width="18" line-height="4" active-color="#0070F0">
|
||||
<wd-tab title="扫码核销"></wd-tab>
|
||||
<wd-tab title="入库核销"></wd-tab>
|
||||
<wd-tab title="手动输入"></wd-tab>
|
||||
</wd-tabs>
|
||||
<view class="continuous-mode-switch li-flex li-items-center">
|
||||
<view class="li-mr-10 li-text-28 li-text-#666">连续核销</view>
|
||||
<wd-switch v-model="continuousMode" active-color="#0070F0" size="24" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="li-w-90% li-mx-auto li-mt-50 li-flex li-items-center">
|
||||
<wd-tooltip placement="bottom-start" content="开启后可以连续核销多个订单">
|
||||
<view class="li-flex li-items-center li-mr-10">
|
||||
<view class="li-mr-4 li-text-28 li-text-#666">连续核销</view>
|
||||
<text class="ri-question-fill li-text-36 li-text-#666"></text>
|
||||
</view>
|
||||
</wd-tooltip>
|
||||
<wd-switch v-model="continuousMode" active-color="#0070F0" size="24" />
|
||||
</view>
|
||||
|
||||
<!-- 功能区域 - 根据当前模式显示不同内容 -->
|
||||
<view class="function-area li-w-92% li-mx-auto li-mt-20">
|
||||
<view class="li-w-92% li-mx-auto li-mt-40">
|
||||
<!-- 扫码模式 -->
|
||||
<view v-if="activeMode === 0" class="scan-mode-container li-flex li-flex-col li-items-center">
|
||||
<view v-if="activeMode === 0" class=" li-flex li-flex-col li-items-center">
|
||||
<view class="scan-button-wrapper li-mt-50" @click="scanCode">
|
||||
<view class="scan-button li-flex li-items-center li-justify-center">
|
||||
<text class="ri-qr-scan-2-line li-text-70"></text>
|
||||
<text class="ri-qr-scan-2-line li-text-90"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="li-text-30 li-text-#666 li-mt-30">点击扫描二维码核销</view>
|
||||
<view class="li-text-24 li-text-#999 li-mt-10">{{continuousMode ? '连续核销模式已开启' : '核销成功后将跳转到详情页'}}</view>
|
||||
<view class="li-text-30 li-text-#666 li-mt-30">点击扫描二维码入库核销</view>
|
||||
<view class="li-text-24 li-text-#999 li-mt-10">{{continuousMode ? '连续核销模式已开启' : ''}}</view>
|
||||
</view>
|
||||
|
||||
<!-- 手动输入模式 -->
|
||||
<view v-else class="input-mode-container">
|
||||
<view class="li-bg-white li-rd-20 li-px-30 li-py-40 li-shadow-sm">
|
||||
<view class="li-bg-white li-rd-20 li-px-30 li-py-40 li-shadow-sm li-mt-30">
|
||||
<view class="li-text-32 li-mb-30 li-text-#333">请输入订单号</view>
|
||||
<wd-input v-model="orderNumber" placeholder="请输入需要核销的订单号" clear-able class="li-mb-30" />
|
||||
<view class="li-flex li-justify-center">
|
||||
<wd-input v-model="orderNumber" placeholder="请输入需要核销的订单号" clear-able />
|
||||
<view class="li-flex li-justify-center li-mt-30">
|
||||
<wd-button type="primary" @click="submitOrderNumber" block>立即核销</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -60,8 +76,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 连续核销模式下的结果展示区域 -->
|
||||
<view v-if="continuousMode && verificationRecords.length > 0"
|
||||
class="verification-records li-w-92% li-mx-auto li-mt-40">
|
||||
<view v-if="verificationRecords.length > 0" class="verification-records li-w-92% li-mx-auto li-mt-40">
|
||||
<view class="li-text-34 li-text-#333 li-mb-20">最近核销记录</view>
|
||||
|
||||
<view class="records-list">
|
||||
|
|
@ -86,20 +101,15 @@
|
|||
</view>
|
||||
|
||||
<!-- 空状态提示 -->
|
||||
<view v-if="continuousMode && verificationRecords.length === 0"
|
||||
<view v-if="verificationRecords.length === 0"
|
||||
class="empty-state li-w-92% li-mx-auto li-mt-60 li-flex li-flex-col li-items-center">
|
||||
<text class="ri-inbox-line li-text-100 li-text-#ddd"></text>
|
||||
<view class="li-text-30 li-text-#999 li-mt-20">暂无核销记录</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部提示 -->
|
||||
<view class="li-flex li-justify-center li-text-26 li-text-#999 li-mt-60 li-mb-30">
|
||||
<text class="ri-information-line li-mr-5"></text>
|
||||
<text>{{continuousMode ? '连续核销模式下,完成核销后可继续操作' : '核销完成后将跳转至详情页'}}</text>
|
||||
</view>
|
||||
|
||||
<!-- 顶部提示条(成功/失败消息提示) -->
|
||||
<wd-toast id="wd-toast" />
|
||||
<wd-toast />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -107,7 +117,8 @@
|
|||
import { ref, reactive } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { useNavigation } from '@/hooks/useNavigation'
|
||||
|
||||
import { useToast } from '@/uni_modules/wot-design-uni'
|
||||
const Toast = useToast()
|
||||
// 使用导航 composable
|
||||
const {
|
||||
hasMultiplePages, // 是否有多个页面在路由栈中
|
||||
|
|
@ -123,11 +134,11 @@
|
|||
// 核销记录
|
||||
const verificationRecords = ref([
|
||||
// 示例数据,实际应为空数组
|
||||
// {
|
||||
// orderNumber: 'JD202503050001',
|
||||
// time: '2025-03-05 21:58:34',
|
||||
// status: 'success' // success, fail, pending
|
||||
// }
|
||||
{
|
||||
orderNumber: 'JD202503050001',
|
||||
time: '2025-03-05 21:58:34',
|
||||
status: 'success' // success, fail, pending
|
||||
}
|
||||
])
|
||||
|
||||
// 扫码核销
|
||||
|
|
@ -137,7 +148,7 @@
|
|||
handleVerification(res.result)
|
||||
},
|
||||
fail: (err) => {
|
||||
Toast.fail('扫码失败,请重试')
|
||||
Toast.error('扫码失败,请重试')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -145,7 +156,7 @@
|
|||
// 提交订单号核销
|
||||
const submitOrderNumber = () => {
|
||||
if (!orderNumber.value) {
|
||||
Toast.fail('请输入订单号')
|
||||
Toast.error('请输入订单号')
|
||||
return
|
||||
}
|
||||
handleVerification(orderNumber.value)
|
||||
|
|
@ -183,10 +194,7 @@
|
|||
}, 800)
|
||||
} else {
|
||||
// 非连续模式 - 直接跳转到详情页
|
||||
Toast.loading({
|
||||
message: '核销中...',
|
||||
duration: 0
|
||||
})
|
||||
Toast.loading('核销中...')
|
||||
|
||||
// 模拟API请求
|
||||
setTimeout(() => {
|
||||
|
|
@ -199,7 +207,7 @@
|
|||
url: `/pagesA/verification/detail?orderNumber=${code}`
|
||||
})
|
||||
} else {
|
||||
Toast.fail('核销失败,请重试')
|
||||
Toast.error('核销失败,请重试')
|
||||
}
|
||||
}, 800)
|
||||
}
|
||||
|
|
@ -245,10 +253,11 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.verification-page {
|
||||
min-height: 100vh;
|
||||
page {
|
||||
background-color: #f7f8fc;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.verification-page {
|
||||
|
||||
// 导航背景层
|
||||
.nav-bg-layer {
|
||||
|
|
@ -265,8 +274,8 @@
|
|||
|
||||
// 扫码功能区
|
||||
.scan-button-wrapper {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
position: relative;
|
||||
|
||||
.scan-button {
|
||||
|
|
@ -338,4 +347,10 @@
|
|||
padding-bottom: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .wd-switch {
|
||||
height: 50rpx !important;
|
||||
width: 90rpx !important;
|
||||
font-size: 22px !important;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,122 +1,6 @@
|
|||
|
||||
.li-items-center{align-items:center}
|
||||
.items-center{align-items:center}
|
||||
.justify-end{justify-content:end}
|
||||
.justify-center{justify-content:center}
|
||||
.li-justify-between{justify-content:space-between}
|
||||
.justify-between{justify-content:space-between}
|
||||
.li-bg-white{background-color:rgb(255,255,255)}
|
||||
.li-flex{display:flex}
|
||||
.li-flex-center{display:flex;align-items:center;justify-content:center}
|
||||
.li-flex-col{flex-direction:column}
|
||||
.li-font-bold{font-weight:bold}
|
||||
.li-h-130{height:130rpx}
|
||||
.li-h-160{height:160rpx}
|
||||
.li-h-220{height:220rpx}
|
||||
.li-h-58{height:58rpx}
|
||||
.li-justify-around{justify-content:space-around}
|
||||
.li-ml-22{margin-left:22rpx}
|
||||
.li-ml-25{margin-left:25rpx}
|
||||
.li-ml-35{margin-left:35rpx}
|
||||
.li-mr-25{margin-right:25rpx}
|
||||
.li-mr-5{margin-right:5rpx}
|
||||
.li-mt-10{margin-top:10rpx}
|
||||
.li-mt-12{margin-top:12rpx}
|
||||
.li-mt-14{margin-top:14rpx}
|
||||
.li-mt-15{margin-top:15rpx}
|
||||
.li-mt-20{margin-top:20rpx}
|
||||
.li-mt-30{margin-top:30rpx}
|
||||
.li-mx-auto{margin-left:auto;margin-right:auto}
|
||||
.li-pt-15{padding-top:15rpx}
|
||||
.li-px-25{padding-left:25rpx;padding-right:25rpx}
|
||||
.li-px-30{padding-left:30rpx;padding-right:30rpx}
|
||||
.li-px-40{padding-left:40rpx;padding-right:40rpx}
|
||||
.li-px-50{padding-left:50rpx;padding-right:50rpx}
|
||||
.li-py-25{padding-top:25rpx;padding-bottom:25rpx}
|
||||
.li-rd-10{border-radius:10rpx}
|
||||
.li-rd-15{border-radius:15rpx}
|
||||
.li-text-010B3E-color{color:rgb(1,11,62)}
|
||||
.li-text-22{font-size:22rpx}
|
||||
.li-text-24{font-size:24rpx}
|
||||
.li-text-26{font-size:26rpx}
|
||||
.li-text-28{font-size:28rpx}
|
||||
.li-text-30{font-size:30rpx}
|
||||
.li-text-343333-color{color:rgb(52,51,51)}
|
||||
.li-text-43{font-size:43rpx}
|
||||
.li-text-48{font-size:48rpx}
|
||||
.li-text-AFB2B8-color{color:rgb(175,178,184)}
|
||||
.li-text-B1B0B0-color{color:rgb(177,176,176)}
|
||||
.li-text-F42429-color{color:rgb(244,36,41)}
|
||||
.li-w-130{width:130rpx}
|
||||
.li-w-310{width:310rpx}
|
||||
.li-w-58{width:58rpx}
|
||||
.li-w-full-70{width:70%}
|
||||
.li-w-full-88{width:88%}
|
||||
.pt-10{padding-top:10rpx}
|
||||
.bg-FFFFFF{background-color:rgb(255,255,255)}
|
||||
.bg-f9f9f9{background-color:rgb(249,249,249)}
|
||||
.li-mb-8{margin-bottom:8rpx}
|
||||
.li-ml-15{margin-left:15rpx}
|
||||
.li-ml-6{margin-left:6rpx}
|
||||
.li-mr-6{margin-right:6rpx}
|
||||
.li-mt-300-important{margin-top:300rpx !important}
|
||||
.li-p-15{padding:15rpx}
|
||||
.li-pb-15{padding-bottom:15rpx}
|
||||
.li-pb-30{padding-bottom:30rpx}
|
||||
.li-pt-25{padding-top:25rpx}
|
||||
.li-pt-4{padding-top:4rpx}
|
||||
.li-text-32{font-size:32rpx}
|
||||
.li-text-323232-color{color:rgb(50,50,50)}
|
||||
.li-text-333333-color{color:rgb(51,51,51)}
|
||||
.li-text-36{font-size:36rpx}
|
||||
.li-text-42{font-size:42rpx}
|
||||
.li-text-55{font-size:55rpx}
|
||||
.li-text-70{font-size:70rpx}
|
||||
.li-text-9a9a9a-color{color:rgb(154,154,154)}
|
||||
.li-text-ff0000-color{color:rgb(255,0,0)}
|
||||
.li-w-full-100{width:100%}
|
||||
.li-w-full-92{width:92%}
|
||||
|
||||
.li-bottom-0{bottom:0}
|
||||
.li-fixed{position:fixed}
|
||||
.li-h-110{height:110rpx}
|
||||
.li-items-start{align-items:start}
|
||||
.li-mb-12{margin-bottom:12rpx}
|
||||
.li-mb-20{margin-bottom:20rpx}
|
||||
.li-ml-20{margin-left:20rpx}
|
||||
.li-mr-10{margin-right:10rpx}
|
||||
.li-mr-12{margin-right:12rpx}
|
||||
.li-mr-3{margin-right:3rpx}
|
||||
.li-mr-30{margin-right:30rpx}
|
||||
.li-mt-40{margin-top:40rpx}
|
||||
.li-pb-25{padding-bottom:25rpx}
|
||||
.li-pl-20{padding-left:20rpx}
|
||||
.li-pl-30{padding-left:30rpx}
|
||||
.li-pr-30{padding-right:30rpx}
|
||||
.li-pt-2{padding-top:2rpx}
|
||||
.li-pt-20{padding-top:20rpx}
|
||||
.li-pt-30{padding-top:30rpx}
|
||||
.li-py-35{padding-top:35rpx;padding-bottom:35rpx}
|
||||
.li-py-6{padding-top:6rpx;padding-bottom:6rpx}
|
||||
.li-rd-20{border-radius:20rpx}
|
||||
.li-rd-bl-50-important{border-bottom-left-radius:50rpx !important}
|
||||
.li-text-009aff-color{color:rgb(0,154,255)}
|
||||
.li-text-40{font-size:40rpx}
|
||||
.li-text-5f5f5f-color{color:rgb(95,95,95)}
|
||||
.li-text-right{text-align:right}
|
||||
.li-w-110{width:110rpx}
|
||||
.li-w-150{width:150rpx}
|
||||
.li-w-400{width:400rpx}
|
||||
.overflow-hidden{overflow:hidden}
|
||||
|
||||
.li-h-90{height:90rpx}
|
||||
.li-ml-30{margin-left:30rpx}
|
||||
.li-py-20{padding-top:20rpx;padding-bottom:20rpx}
|
||||
.li-text-25{font-size:25rpx}
|
||||
.li-text-52{font-size:52rpx}
|
||||
.li-w-90{width:90rpx}
|
||||
.li-w-full-80{width:80%}
|
||||
|
||||
.li-mr-40{margin-right:40rpx}
|
||||
|
||||
|
||||
|
||||
|
||||
.li-text-35{font-size:35rpx}
|
||||
.li-text-46{font-size:46rpx}
|
||||
|
|
|
|||
Loading…
Reference in New Issue