工单详情 核销中心
This commit is contained in:
parent
12f061ac11
commit
80ffde7014
21
pages.json
21
pages.json
|
|
@ -81,6 +81,14 @@
|
|||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "工单大厅"
|
||||
}
|
||||
},{
|
||||
"path": "task_hall/detail",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "工单详情"
|
||||
}
|
||||
}, {
|
||||
"path": "my_order/list",
|
||||
"style": {
|
||||
|
|
@ -96,7 +104,7 @@
|
|||
"enablePullDownRefresh": true,
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "工单详情"
|
||||
"navigationBarTitleText": "我的工单详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -119,6 +127,13 @@
|
|||
"enablePullDownRefresh": true,
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "核销页面"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "verification/detail",
|
||||
"style": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "核销详情"
|
||||
}
|
||||
},
|
||||
|
|
@ -137,8 +152,8 @@
|
|||
"current": 0, // 当前激活的条件,默认为 0
|
||||
"list": [{
|
||||
"name": "", // 条件名称
|
||||
"path": "pagesA/message/index", // 要打开的页面路径
|
||||
"path": "pagesA/task_hall/list", // 要打开的页面路径
|
||||
"query": "" // 可选的页面参数
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
<view class="nav-bg-layer"></view>
|
||||
|
||||
<!-- 通知栏 -->
|
||||
<wd-notice-bar class="li-mt-20" :scrollable="false" color="#37A5FF"
|
||||
<!-- <wd-notice-bar class="li-mt-20" :scrollable="false" color="#37A5FF"
|
||||
background-color="rgba(217, 237, 255, 0.35)">
|
||||
<template #prefix>
|
||||
<text class="ri-volume-up-fill li-text-35 li-mr-10 li-ml-20"></text>
|
||||
|
|
@ -41,10 +41,10 @@
|
|||
<template #suffix>
|
||||
<text class="ri-close-line li-text-38 li-mr-10 li-text-#B1B0B0"></text>
|
||||
</template>
|
||||
</wd-notice-bar>
|
||||
</wd-notice-bar> -->
|
||||
|
||||
<!-- list -->
|
||||
<view v-if="messageList.length>0">
|
||||
<view class="li-mt-30" v-if="messageList.length>0">
|
||||
<wd-swipe-action v-for="(item,index) in messageList" :key="index">
|
||||
<view class="li-bg-white li-px-30">
|
||||
<view class="li-flex li-items-center li-bottom-border1 li-py-20">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,223 @@
|
|||
<template>
|
||||
<view class="li-message-page">
|
||||
<!-- 自定义导航栏 -->
|
||||
<wd-navbar :bordered="false"
|
||||
custom-style="background: transparent !important; backdrop-filter: blur(10px) !important; -webkit-backdrop-filter: blur(10px) !important;"
|
||||
safeAreaInsetTop fixed placeholder>
|
||||
<template #left>
|
||||
<view class="li-ml-15 li-mt-10 li-flex li-items-center">
|
||||
<text v-if="hasMultiplePages" class="ri-arrow-left-s-line li-text-70"
|
||||
@click="toPages({type:'nav'})"></text>
|
||||
<text v-if="!hasMultiplePages" class="ri-home-5-line li-text-55 li-mb-8 li-mr-10"
|
||||
@click="toPages({type:'home'})"></text>
|
||||
<text class="li-text-42">工单详情</text>
|
||||
</view>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
<!-- 导航栏背景 -->
|
||||
<view class="nav-bg-layer"></view>
|
||||
<!-- card -->
|
||||
<view class="bg-#FFFFFF li-w-92% li-mx-auto li-rd-20 li-task-card li-pb-25 overflow-hidden li-mt-40">
|
||||
<view class="li-flex li-items-start li-justify-between bg-#f9f9f9">
|
||||
<view class="li-mb-20">
|
||||
<view class="li-flex li-items-center li-text-#5f5f5f li-pl-20 li-pt-20 li-text-28 li-mb-12">
|
||||
<text class="ri-todo-line li-mr-3"></text>
|
||||
<text>JD2424234324325</text>
|
||||
<text class="ri-file-copy-line li-text-#009aff li-ml-15"></text>
|
||||
</view>
|
||||
<text class="li-pl-20 li-text-28 li-text-#5f5f5f">创建时间: 2025-07-09</text>
|
||||
</view>
|
||||
<view class="li-text-28 !li-rd-bl-50 li-px-40 li-py-6"
|
||||
:style="{ color: getStatusColor(1), backgroundColor: getStatusBgColor(1) }">
|
||||
{{getStatusText(1)}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-pt-20 li-pl-20">
|
||||
<!-- <view class="ri-checkbox-circle-fill li-text-#009aff li-mr-12 li-text-40 li-pt-2"></view> -->
|
||||
<!-- <text class="ri-close-circle-fill li-text-#ff0000"></text> -->
|
||||
<text class="ri-error-warning-fill li-text-#ff9d00 li-mr-12 li-text-40 li-pt-2"></text>
|
||||
<view class="li-flex li-flex-col">
|
||||
<text class="li-text-32">{{getStatusText(1)}}</text>
|
||||
<text class="li-text-28">工单待处理,点击按钮确认接单</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- card -->
|
||||
<view class="bg-#FFFFFF li-w-92% li-mx-auto li-mt-20 li-rd-20 li-task-card li-pb-30 overflow-hidden">
|
||||
<view class="li-pl-30 li-pt-30">业主信息</view>
|
||||
<view class="li-pl-30 li-pr-30 li-mt-30">
|
||||
<view class="li-flex li-items-center li-justify-between li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">业主姓名</text>
|
||||
<text class="li-w-400 li-single-line li-text-right">邓大仙儿</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-center li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">联系方式</text>
|
||||
<view class="li-flex li-items-center li-w-400 li-single-line justify-between">
|
||||
<!-- 左侧留空 -->
|
||||
<view></view>
|
||||
<!-- 右侧内容 -->
|
||||
<view class="li-flex li-items-center">
|
||||
<text class="ri-phone-line li-text-#009aff li-mr-6"></text>
|
||||
<text>177****4485</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">配送地址</text>
|
||||
<text class="li-w-400 li-two-line li-text-right">中金北区17号楼一单元201室号</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">商品备注</text>
|
||||
<text class="li-w-400 li-two-line li-text-right">放在门口即可</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">商品信息</text>
|
||||
<view class="li-flex li-flex-col li-w-400 justify-end">
|
||||
<text class="li-two-line li-text-right">燕京 8度U8 500ML*12瓶/箱*2 送燕京9度菊花听500ML*12听</text>
|
||||
<!-- <text class="li-text-#009aff li-text-right">x2</text> -->
|
||||
<view class="li-flex justify-between li-items-center li-mt-20">
|
||||
<!-- 左侧留空 -->
|
||||
<view></view>
|
||||
<!-- 右侧内容 -->
|
||||
<view class="li-flex li-items-center">
|
||||
<image class="li-w-110 li-h-110 li-rd-10" src="../../static/swiper/1.png" mode="">
|
||||
</image>
|
||||
<image class="li-w-110 li-h-110 li-rd-10 li-ml-20" src="../../static/swiper/1.png"
|
||||
mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="li-w-85% li-mx-auto li-mt-90">
|
||||
<wd-button loading block custom-class="custom-shadow"> 接单</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { useNavigation } from '@/hooks/useNavigation'
|
||||
// 使用导航 composable
|
||||
const {
|
||||
hasMultiplePages, // 是否有多个页面在路由栈中
|
||||
isTabBarPage, // 当前页面是否为 tabBar 页面
|
||||
checkRouteStack // 检查当前路由栈状态的方法
|
||||
} = useNavigation()
|
||||
|
||||
onLoad(() => {
|
||||
checkRouteStack()
|
||||
})
|
||||
// 状态颜色配置
|
||||
const getStatusColor = (status : number) => {
|
||||
const colorMap = {
|
||||
1: '#ff9d00', // 待配送
|
||||
2: '#00b42a', // 已完成
|
||||
3: '#37A5FF', // 未入库
|
||||
4: '#F42429' // 已取消
|
||||
}
|
||||
return colorMap[status] || '#666666'
|
||||
}
|
||||
|
||||
// 状态背景色配置
|
||||
const getStatusBgColor = (status : number) => {
|
||||
const bgColorMap = {
|
||||
1: '#fff6e9', // 待配送
|
||||
2: '#e8ffea', // 已完成
|
||||
3: '#e8f4ff', // 未入库
|
||||
4: '#ffe8e8' // 已取消
|
||||
}
|
||||
return bgColorMap[status] || '#f5f5f5'
|
||||
}
|
||||
|
||||
// 状态文字配置
|
||||
const getStatusText = (status : number) => {
|
||||
const textMap = {
|
||||
1: '待配送',
|
||||
2: '已完成',
|
||||
3: '未入库',
|
||||
4: '已取消'
|
||||
}
|
||||
return textMap[status] || '未知状态'
|
||||
}
|
||||
|
||||
|
||||
|
||||
const toPages = (item : any) => {
|
||||
console.log(item);
|
||||
switch (item.type) {
|
||||
case 'nav':
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
break;
|
||||
case 'home':
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const handleAction = (action : string) => {
|
||||
console.log(action);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.li-message-page {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(to bottom,
|
||||
rgba(217, 237, 255, 0.9) 0%,
|
||||
rgba(217, 237, 255, 0.9) 20%,
|
||||
rgba(207, 207, 207, 0.2) 40%,
|
||||
rgba(207, 207, 207, 0.2) 60%,
|
||||
rgba(207, 207, 207, 0.2) 80%,
|
||||
rgba(207, 207, 207, 0.2) 100%);
|
||||
background-attachment: fixed;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 导航栏背景层
|
||||
.nav-bg-layer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: var(--window-top);
|
||||
background: linear-gradient(to bottom,
|
||||
rgba(217, 237, 255, 0.95),
|
||||
rgba(217, 237, 255, 0.85));
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
z-index: 998;
|
||||
}
|
||||
|
||||
.li-task-card {
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
::v-deep .wd-button {
|
||||
width: 160rpx !important;
|
||||
height: 65rpx !important;
|
||||
min-width: 160rpx !important;
|
||||
}
|
||||
.custom-shadow {
|
||||
height: 85rpx !important;
|
||||
font-size: 32rpx !important;
|
||||
box-shadow: 0 3px 1px -2px rgb(0 0 0 / 20%), 0 2px 2px 0 rgb(0 0 0 / 14%), 0 1px 5px 0 rgb(0 0 0 / 12%);
|
||||
background-color: #2EA1EA !important;
|
||||
width: 100% !important;
|
||||
display: flex!important;
|
||||
align-items: center!important;
|
||||
justify-content: center!important;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -10,12 +10,12 @@
|
|||
</view>
|
||||
<wd-drop-menu class="li-w-100%">
|
||||
<wd-drop-menu-item v-model="query.type" :options="option1" @change="refresh" />
|
||||
<wd-drop-menu-item v-model="query.timeRange" :options="option2" @change="refresh" />
|
||||
<wd-drop-menu-item v-model="query.timeRange" :options="option2" @change="refresh1" />
|
||||
</wd-drop-menu>
|
||||
</view>
|
||||
<!-- list -->
|
||||
<view class="li-w-92% li-mx-auto">
|
||||
<view v-for="(item, index) in taskList" :key="index"
|
||||
<view v-for="(item, index) in taskList" :key="index" @click="toPages({type:'detail',value:item})"
|
||||
class="li-task-card li-bg-white li-mt-20 li-rd-15 li-pt-25 li-pb-30 li-px-30">
|
||||
<view class="li-flex li-items-center li-justify-between li-bottom-border2 li-pb-15">
|
||||
<text class="li-text-28">工单编号: {{item.ticket_no}}</text>
|
||||
|
|
@ -50,17 +50,24 @@
|
|||
<text>{{item.order.remark}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="li-flex li-items-center li-justify-between li-mt-20">
|
||||
<view class="li-flex li-items-center li-justify-between li-mt-30">
|
||||
<view
|
||||
:style="{ visibility: (item.type==1 && item.commission && item.commission > 0) ? 'visible' : 'hidden' }"
|
||||
class="li-flex li-items-center">
|
||||
<text class="li-text-36 li-font-bold li-text-#ff0000 li-mr-6">{{item.commission}}</text>
|
||||
<text class="li-text-24 li-text-#333333 li-pt-4">元/可得佣金</text>
|
||||
</view>
|
||||
<wd-button custom-class="custom-shadow" size="small"> 接单 </wd-button>
|
||||
<view class="li-flex li-items-center">
|
||||
<wd-button custom-class="custom-shadow" size="small"> 详情 </wd-button>
|
||||
<wd-button custom-class="custom-shadow1" size="small"> 接单 </wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="taskList.length==0" class="!li-mt-300">
|
||||
<wd-status-tip image="search" tip="暂无待处理工单" />
|
||||
</view>
|
||||
<zero-loading type="wobble" v-if="loading"></zero-loading>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -78,14 +85,20 @@
|
|||
checkRouteStack // 检查当前路由栈状态的方法
|
||||
} = useNavigation()
|
||||
|
||||
const loading = ref<boolean>(false)
|
||||
|
||||
onLoad(() => {
|
||||
checkRouteStack()
|
||||
poolList()
|
||||
})
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
refresh()
|
||||
uni.stopPullDownRefresh()
|
||||
query.value.page = 1
|
||||
taskList.value = []
|
||||
poolList()
|
||||
setTimeout(() => {
|
||||
uni.stopPullDownRefresh()
|
||||
}, 300)
|
||||
})
|
||||
|
||||
onReachBottom(() => {
|
||||
|
|
@ -97,19 +110,19 @@
|
|||
const query = ref({
|
||||
page: 1,
|
||||
limit: 10,
|
||||
type: "",
|
||||
type: '',
|
||||
timeRange: 0
|
||||
})
|
||||
|
||||
var finish = ref<boolean>()
|
||||
const finish = ref<boolean>(false)
|
||||
|
||||
const option1 = ref<Record<string, any>>([
|
||||
const option1 = ref([
|
||||
{ label: '全部类型', value: '' },
|
||||
{ label: '商品工单', value: 'F2' },
|
||||
{ label: '维修工单', value: 'F6' },
|
||||
{ label: '量房工单', value: 'F4' }
|
||||
])
|
||||
const option2 = ref<Record<string, any>>([
|
||||
const option2 = ref([
|
||||
{ label: '全部时间', value: 0 },
|
||||
{ label: '今天', value: 1 },
|
||||
{ label: '最近7天', value: 2 },
|
||||
|
|
@ -130,18 +143,33 @@
|
|||
url: '/pages/index/index'
|
||||
})
|
||||
break;
|
||||
case 'detail':
|
||||
uni.navigateTo({
|
||||
url: '/pagesA/task_hall/detail'
|
||||
})
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const refresh = () => {
|
||||
const refresh = (value : any) => {
|
||||
query.value.type = value.value
|
||||
query.value.page = 1
|
||||
taskList.value = []
|
||||
poolList()
|
||||
}
|
||||
const refresh1 = (value : any) => {
|
||||
query.value.timeRange = value.value
|
||||
query.value.page = 1
|
||||
taskList.value = []
|
||||
poolList()
|
||||
}
|
||||
|
||||
const poolList = async () => {
|
||||
loading.value = true
|
||||
const res = await ticketPoolList(query.value)
|
||||
loading.value = false
|
||||
if (res.data.length < query.value.limit) {
|
||||
finish.value = true
|
||||
}
|
||||
|
|
@ -188,8 +216,15 @@
|
|||
}
|
||||
|
||||
.custom-shadow {
|
||||
color: #009aff !important;
|
||||
background: linear-gradient(to right, #FFFFFF, #FFFFFF) !important;
|
||||
border:solid 1px #009aff !important;
|
||||
}
|
||||
|
||||
.custom-shadow1 {
|
||||
color: #ffffff !important;
|
||||
background: linear-gradient(to right, #7bbfff, #009aff) !important // box-shadow: 0 3px 1px -2px rgb(0 0 0 / 20%), 0 2px 2px 0 rgb(0 0 0 / 14%), 0 1px 5px 0 rgb(0 0 0 / 12%);
|
||||
background: linear-gradient(to right, #7bbfff, #009aff) !important;
|
||||
margin-left: 15rpx !important;
|
||||
}
|
||||
|
||||
::v-deep .wd-drop-menu__list {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,264 @@
|
|||
<template>
|
||||
<view class="li-message-page">
|
||||
<!-- 自定义导航栏 -->
|
||||
<wd-navbar :bordered="false"
|
||||
custom-style="background: transparent !important; backdrop-filter: blur(10px) !important; -webkit-backdrop-filter: blur(10px) !important;"
|
||||
safeAreaInsetTop fixed placeholder>
|
||||
<template #left>
|
||||
<view class="li-ml-15 li-mt-10 li-flex li-items-center">
|
||||
<text v-if="hasMultiplePages" class="ri-arrow-left-s-line li-text-70"
|
||||
@click="toPages({type:'nav'})"></text>
|
||||
<text v-if="!hasMultiplePages" class="ri-home-5-line li-text-55 li-mb-8 li-mr-10"
|
||||
@click="toPages({type:'home'})"></text>
|
||||
<text class="li-text-42">核销详情</text>
|
||||
</view>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
<!-- 导航栏背景 -->
|
||||
<view class="nav-bg-layer"></view>
|
||||
<!-- card -->
|
||||
<view class="bg-#FFFFFF li-w-92% li-mx-auto li-rd-20 li-task-card li-pb-25 overflow-hidden li-mt-40">
|
||||
<view class="li-flex li-items-start li-justify-between bg-#f9f9f9">
|
||||
<view class="li-mb-20">
|
||||
<view class="li-flex li-items-center li-text-#5f5f5f li-pl-20 li-pt-20 li-text-28 li-mb-12">
|
||||
<text class="ri-todo-line li-mr-3"></text>
|
||||
<text>JD2424234324325</text>
|
||||
<text class="ri-file-copy-line li-text-#009aff li-ml-15"></text>
|
||||
</view>
|
||||
<text class="li-pl-20 li-text-28 li-text-#5f5f5f">创建时间: 2025-07-09</text>
|
||||
</view>
|
||||
<view class="li-text-28 !li-rd-bl-50 li-px-40 li-py-6"
|
||||
:style="{ color: getStatusColor(3), backgroundColor: getStatusBgColor(3) }">
|
||||
{{getStatusText(3)}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-pt-20 li-pl-20">
|
||||
<!-- <view class="ri-checkbox-circle-fill li-text-#009aff li-mr-12 li-text-40 li-pt-2"></view> -->
|
||||
<!-- <text class="ri-close-circle-fill li-text-#ff0000"></text> -->
|
||||
<text class="ri-error-warning-fill li-text-#a3a3a3 li-mr-12 li-text-40 li-pt-2"></text>
|
||||
<view class="li-flex li-flex-col">
|
||||
<text class="li-text-32">{{getStatusText(3)}}</text>
|
||||
<text class="li-text-28">工单待入库,请确认入库</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- card -->
|
||||
<view class="bg-#FFFFFF li-w-92% li-mx-auto li-mt-20 li-rd-20 li-task-card li-pb-30 overflow-hidden">
|
||||
<view class="li-pl-30 li-pt-30">业主信息</view>
|
||||
<view class="li-pl-30 li-pr-30 li-mt-30">
|
||||
<view class="li-flex li-items-center li-justify-between li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">业主姓名</text>
|
||||
<text class="li-w-400 li-single-line li-text-right">邓大仙儿</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-center li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">联系方式</text>
|
||||
<view class="li-flex li-items-center li-w-400 li-single-line justify-between">
|
||||
<!-- 左侧留空 -->
|
||||
<view></view>
|
||||
<!-- 右侧内容 -->
|
||||
<view class="li-flex li-items-center">
|
||||
<text class="ri-phone-line li-text-#009aff li-mr-6"></text>
|
||||
<text>177****4485</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">配送地址</text>
|
||||
<text class="li-w-400 li-two-line li-text-right">中金北区17号楼一单元201室号</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">商品备注</text>
|
||||
<text class="li-w-400 li-two-line li-text-right">放在门口即可</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">商品信息</text>
|
||||
<view class="li-flex li-flex-col li-w-400 justify-end">
|
||||
<text class="li-two-line li-text-right">燕京 8度U8 500ML*12瓶/箱*2 送燕京9度菊花听500ML*12听</text>
|
||||
<!-- <text class="li-text-#009aff li-text-right">x2</text> -->
|
||||
<view class="li-flex justify-between li-items-center li-mt-20">
|
||||
<!-- 左侧留空 -->
|
||||
<view></view>
|
||||
<!-- 右侧内容 -->
|
||||
<view class="li-flex li-items-center">
|
||||
<image class="li-w-110 li-h-110 li-rd-10" src="../../static/swiper/1.png" mode="">
|
||||
</image>
|
||||
<image class="li-w-110 li-h-110 li-rd-10 li-ml-20" src="../../static/swiper/1.png"
|
||||
mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- card -->
|
||||
<!-- <view class="bg-#FFFFFF li-w-92% li-mx-auto li-mt-20 li-rd-20 li-task-card li-pb-30 overflow-hidden">
|
||||
<view class="li-pl-30 li-pt-30">员工信息</view>
|
||||
<view class="li-pl-30 li-pr-30 li-mt-30">
|
||||
<view class="li-flex li-items-center li-justify-between li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">员工姓名</text>
|
||||
<text class="li-w-400 li-single-line li-text-right">张三丰</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-center li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">联系方式</text>
|
||||
<text>135****6645</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">工单描述</text>
|
||||
<text class="li-w-400 li-two-line li-text-right">敲门未应答,已按照业主要求放在门口</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">附件上传</text>
|
||||
<view class="li-flex li-flex-col li-w-400 justify-end">
|
||||
<view class="li-flex justify-between li-items-center li-mt-20">
|
||||
<view></view>
|
||||
<view class="li-flex li-items-center">
|
||||
<image class="li-w-110 li-h-110 li-rd-10" src="../../static/logo.png" mode="">
|
||||
</image>
|
||||
<image class="li-w-110 li-h-110 li-rd-10 li-ml-20" src="../../static/logo.png" mode="">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- footer -->
|
||||
<view
|
||||
class="li-flex li-fixed li-bottom-0 li-bg-white li-w-100% li-items-center li-justify-between li-py-35 li-task-card li-rd-10">
|
||||
<!-- 左侧留空 -->
|
||||
<view></view>
|
||||
<view class="li-flex li-items-center li-mr-40">
|
||||
<view>
|
||||
<wd-button :round="false" type="info">继续录入</wd-button>
|
||||
</view>
|
||||
<view class="li-ml-15">
|
||||
<wd-button :round="false">确认入库</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { useNavigation } from '@/hooks/useNavigation'
|
||||
// 使用导航 composable
|
||||
const {
|
||||
hasMultiplePages, // 是否有多个页面在路由栈中
|
||||
isTabBarPage, // 当前页面是否为 tabBar 页面
|
||||
checkRouteStack // 检查当前路由栈状态的方法
|
||||
} = useNavigation()
|
||||
|
||||
onLoad(() => {
|
||||
checkRouteStack()
|
||||
})
|
||||
// 状态颜色配置
|
||||
const getStatusColor = (status : number) => {
|
||||
const colorMap = {
|
||||
1: '#ff9d00', // 待配送
|
||||
2: '#00b42a', // 已完成
|
||||
3: '#37A5FF', // 未入库
|
||||
4: '#F42429' // 已取消
|
||||
}
|
||||
return colorMap[status] || '#666666'
|
||||
}
|
||||
|
||||
// 状态背景色配置
|
||||
const getStatusBgColor = (status : number) => {
|
||||
const bgColorMap = {
|
||||
1: '#fff6e9', // 待配送
|
||||
2: '#e8ffea', // 已完成
|
||||
3: '#e8f4ff', // 未入库
|
||||
4: '#ffe8e8' // 已取消
|
||||
}
|
||||
return bgColorMap[status] || '#f5f5f5'
|
||||
}
|
||||
|
||||
// 状态文字配置
|
||||
const getStatusText = (status : number) => {
|
||||
const textMap = {
|
||||
1: '待配送',
|
||||
2: '已完成',
|
||||
3: '未入库',
|
||||
4: '已取消'
|
||||
}
|
||||
return textMap[status] || '未知状态'
|
||||
}
|
||||
|
||||
|
||||
|
||||
const toPages = (item : any) => {
|
||||
console.log(item);
|
||||
switch (item.type) {
|
||||
case 'nav':
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
break;
|
||||
case 'home':
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const handleAction = (action : string) => {
|
||||
console.log(action);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.li-message-page {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(to bottom,
|
||||
rgba(217, 237, 255, 0.9) 0%,
|
||||
rgba(217, 237, 255, 0.9) 20%,
|
||||
rgba(207, 207, 207, 0.2) 40%,
|
||||
rgba(207, 207, 207, 0.2) 60%,
|
||||
rgba(207, 207, 207, 0.2) 80%,
|
||||
rgba(207, 207, 207, 0.2) 100%);
|
||||
background-attachment: fixed;
|
||||
/* #ifdef H5 */
|
||||
padding-bottom: 160rpx;
|
||||
/* #endif */
|
||||
/* #ifdef APP-PLUS */
|
||||
padding-bottom: 180rpx;
|
||||
/* #endif */
|
||||
/* #ifdef MP-WEIXIN */
|
||||
padding-bottom: 170rpx;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
|
||||
// 导航栏背景层
|
||||
.nav-bg-layer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: var(--window-top);
|
||||
background: linear-gradient(to bottom,
|
||||
rgba(217, 237, 255, 0.95),
|
||||
rgba(217, 237, 255, 0.85));
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
z-index: 998;
|
||||
}
|
||||
|
||||
.li-task-card {
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
::v-deep .wd-button {
|
||||
width: 160rpx !important;
|
||||
height: 65rpx !important;
|
||||
min-width: 160rpx !important;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="li-message-page">
|
||||
<view class="verification-page">
|
||||
<!-- 自定义导航栏 -->
|
||||
<wd-navbar :bordered="false"
|
||||
custom-style="background: transparent !important; backdrop-filter: blur(10px) !important; -webkit-backdrop-filter: blur(10px) !important;"
|
||||
|
|
@ -10,139 +10,104 @@
|
|||
@click="toPages({type:'nav'})"></text>
|
||||
<text v-if="!hasMultiplePages" class="ri-home-5-line li-text-55 li-mb-8 li-mr-10"
|
||||
@click="toPages({type:'home'})"></text>
|
||||
<text class="li-text-42">核销详情</text>
|
||||
<text class="li-text-42">核销中心</text>
|
||||
</view>
|
||||
</template>
|
||||
<template #right>
|
||||
<view class="li-flex-center li-mr-25" @click="toVerificationHistory">
|
||||
<text class="ri-history-line li-text-48"></text>
|
||||
</view>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
<!-- 导航栏背景 -->
|
||||
<view class="nav-bg-layer"></view>
|
||||
<!-- card -->
|
||||
<view class="bg-#FFFFFF li-w-92% li-mx-auto li-rd-20 li-task-card li-pb-25 overflow-hidden li-mt-40">
|
||||
<view class="li-flex li-items-start li-justify-between bg-#f9f9f9">
|
||||
<view class="li-mb-20">
|
||||
<view class="li-flex li-items-center li-text-#5f5f5f li-pl-20 li-pt-20 li-text-28 li-mb-12">
|
||||
<text class="ri-todo-line li-mr-3"></text>
|
||||
<text>JD2424234324325</text>
|
||||
<text class="ri-file-copy-line li-text-#009aff li-ml-15"></text>
|
||||
</view>
|
||||
<text class="li-pl-20 li-text-28 li-text-#5f5f5f">创建时间: 2025-07-09</text>
|
||||
</view>
|
||||
<view class="li-text-28 !li-rd-bl-50 li-px-40 li-py-6"
|
||||
:style="{ color: getStatusColor(3), backgroundColor: getStatusBgColor(3) }">
|
||||
{{getStatusText(3)}}
|
||||
</view>
|
||||
|
||||
<!-- 功能模式切换和连续核销开关 -->
|
||||
<view class="mode-section li-w-92% li-mx-auto li-flex li-justify-between li-items-center li-mt-30">
|
||||
<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-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 class="li-flex li-items-start li-pt-20 li-pl-20">
|
||||
<!-- <view class="ri-checkbox-circle-fill li-text-#009aff li-mr-12 li-text-40 li-pt-2"></view> -->
|
||||
<!-- <text class="ri-close-circle-fill li-text-#ff0000"></text> -->
|
||||
<text class="ri-error-warning-fill li-text-#a3a3a3 li-mr-12 li-text-40 li-pt-2"></text>
|
||||
<view class="li-flex li-flex-col">
|
||||
<text class="li-text-32">{{getStatusText(3)}}</text>
|
||||
<text class="li-text-28">工单待入库,请确认入库</text>
|
||||
</view>
|
||||
|
||||
<!-- 功能区域 - 根据当前模式显示不同内容 -->
|
||||
<view class="function-area li-w-92% li-mx-auto li-mt-20">
|
||||
<!-- 扫码模式 -->
|
||||
<view v-if="activeMode === 0" class="scan-mode-container 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>
|
||||
</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>
|
||||
|
||||
<!-- 手动输入模式 -->
|
||||
<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-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-button type="primary" @click="submitOrderNumber" block>立即核销</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- card -->
|
||||
<view class="bg-#FFFFFF li-w-92% li-mx-auto li-mt-20 li-rd-20 li-task-card li-pb-30 overflow-hidden">
|
||||
<view class="li-pl-30 li-pt-30">业主信息</view>
|
||||
<view class="li-pl-30 li-pr-30 li-mt-30">
|
||||
<view class="li-flex li-items-center li-justify-between li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">业主姓名</text>
|
||||
<text class="li-w-400 li-single-line li-text-right">邓大仙儿</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-center li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">联系方式</text>
|
||||
<view class="li-flex li-items-center li-w-400 li-single-line justify-between">
|
||||
<!-- 左侧留空 -->
|
||||
<view></view>
|
||||
<!-- 右侧内容 -->
|
||||
|
||||
<!-- 连续核销模式下的结果展示区域 -->
|
||||
<view v-if="continuousMode && 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">
|
||||
<view v-for="(record, index) in verificationRecords" :key="index"
|
||||
class="record-item li-flex li-items-center li-justify-between li-bg-white li-rd-20 li-px-30 li-py-25 li-mb-20 li-shadow-sm">
|
||||
<view class="li-flex li-flex-col">
|
||||
<view class="li-flex li-items-center">
|
||||
<text class="ri-phone-line li-text-#009aff li-mr-6"></text>
|
||||
<text>177****4485</text>
|
||||
<text class="ri-file-list-3-line li-mr-10 li-text-#0070F0"></text>
|
||||
<text class="li-text-30">{{record.orderNumber}}</text>
|
||||
</view>
|
||||
<text class="li-text-24 li-text-#999 li-mt-8">{{record.time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">配送地址</text>
|
||||
<text class="li-w-400 li-two-line li-text-right">中金北区17号楼一单元201室号</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">商品备注</text>
|
||||
<text class="li-w-400 li-two-line li-text-right">放在门口即可</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">商品信息</text>
|
||||
<view class="li-flex li-flex-col li-w-400 justify-end">
|
||||
<text class="li-two-line li-text-right">燕京 8度U8 500ML*12瓶/箱*2 送燕京9度菊花听500ML*12听</text>
|
||||
<!-- <text class="li-text-#009aff li-text-right">x2</text> -->
|
||||
<view class="li-flex justify-between li-items-center li-mt-20">
|
||||
<!-- 左侧留空 -->
|
||||
<view></view>
|
||||
<!-- 右侧内容 -->
|
||||
<view class="li-flex li-items-center">
|
||||
<image class="li-w-110 li-h-110 li-rd-10" src="../../static/swiper/1.png" mode="">
|
||||
</image>
|
||||
<image class="li-w-110 li-h-110 li-rd-10 li-ml-20" src="../../static/swiper/1.png"
|
||||
mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="status-badge" :class="[
|
||||
record.status === 'success' ? 'status-success' :
|
||||
record.status === 'fail' ? 'status-fail' : 'status-pending'
|
||||
]">
|
||||
{{record.status === 'success' ? '核销成功' :
|
||||
record.status === 'fail' ? '核销失败' : '处理中'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- card -->
|
||||
<!-- <view class="bg-#FFFFFF li-w-92% li-mx-auto li-mt-20 li-rd-20 li-task-card li-pb-30 overflow-hidden">
|
||||
<view class="li-pl-30 li-pt-30">员工信息</view>
|
||||
<view class="li-pl-30 li-pr-30 li-mt-30">
|
||||
<view class="li-flex li-items-center li-justify-between li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">员工姓名</text>
|
||||
<text class="li-w-400 li-single-line li-text-right">张三丰</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-center li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">联系方式</text>
|
||||
<text>135****6645</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">工单描述</text>
|
||||
<text class="li-w-400 li-two-line li-text-right">敲门未应答,已按照业主要求放在门口</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-start li-justify-between li-mt-30 li-text-28">
|
||||
<text class="li-w-150 li-text-#9a9a9a">附件上传</text>
|
||||
<view class="li-flex li-flex-col li-w-400 justify-end">
|
||||
<view class="li-flex justify-between li-items-center li-mt-20">
|
||||
<view></view>
|
||||
<view class="li-flex li-items-center">
|
||||
<image class="li-w-110 li-h-110 li-rd-10" src="../../static/logo.png" mode="">
|
||||
</image>
|
||||
<image class="li-w-110 li-h-110 li-rd-10 li-ml-20" src="../../static/logo.png" mode="">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- footer -->
|
||||
<view
|
||||
class="li-flex li-fixed li-bottom-0 li-bg-white li-w-100% li-items-center li-justify-between li-py-35 li-task-card li-rd-10">
|
||||
<!-- 左侧留空 -->
|
||||
<view></view>
|
||||
<view class="li-flex li-items-center li-mr-40">
|
||||
<view>
|
||||
<wd-button :round="false" type="info">继续录入</wd-button>
|
||||
</view>
|
||||
<view class="li-ml-15">
|
||||
<wd-button :round="false">确认入库</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 空状态提示 -->
|
||||
<view v-if="continuousMode && 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" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { useNavigation } from '@/hooks/useNavigation'
|
||||
|
||||
// 使用导航 composable
|
||||
const {
|
||||
hasMultiplePages, // 是否有多个页面在路由栈中
|
||||
|
|
@ -150,115 +115,227 @@
|
|||
checkRouteStack // 检查当前路由栈状态的方法
|
||||
} = useNavigation()
|
||||
|
||||
// 模式选择
|
||||
const activeMode = ref(0) // 0: 扫码模式, 1: 手动输入模式
|
||||
const continuousMode = ref(false) // 是否开启连续核销模式
|
||||
const orderNumber = ref('') // 手动输入的订单号
|
||||
|
||||
// 核销记录
|
||||
const verificationRecords = ref([
|
||||
// 示例数据,实际应为空数组
|
||||
// {
|
||||
// orderNumber: 'JD202503050001',
|
||||
// time: '2025-03-05 21:58:34',
|
||||
// status: 'success' // success, fail, pending
|
||||
// }
|
||||
])
|
||||
|
||||
// 扫码核销
|
||||
const scanCode = () => {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
handleVerification(res.result)
|
||||
},
|
||||
fail: (err) => {
|
||||
Toast.fail('扫码失败,请重试')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 提交订单号核销
|
||||
const submitOrderNumber = () => {
|
||||
if (!orderNumber.value) {
|
||||
Toast.fail('请输入订单号')
|
||||
return
|
||||
}
|
||||
handleVerification(orderNumber.value)
|
||||
orderNumber.value = '' // 清空输入
|
||||
}
|
||||
|
||||
// 处理核销逻辑
|
||||
const handleVerification = (code : string) => {
|
||||
// 模拟核销处理过程
|
||||
// 实际项目中这里应该调用API进行核销
|
||||
|
||||
// 模拟API调用延迟
|
||||
if (continuousMode.value) {
|
||||
// 添加一条处理中的记录
|
||||
const newRecord = {
|
||||
orderNumber: code,
|
||||
time: formatDateTime(new Date()),
|
||||
status: 'pending'
|
||||
}
|
||||
verificationRecords.value.unshift(newRecord)
|
||||
|
||||
// 模拟API请求处理时间
|
||||
setTimeout(() => {
|
||||
// 模拟随机结果 (实际项目中应根据API响应决定)
|
||||
const isSuccess = Math.random() > 0.2 // 80%概率成功
|
||||
|
||||
// 更新记录状态
|
||||
const record = verificationRecords.value.find(r => r.orderNumber === code && r.status === 'pending')
|
||||
if (record) {
|
||||
record.status = isSuccess ? 'success' : 'fail'
|
||||
}
|
||||
|
||||
// 显示结果提示
|
||||
Toast[isSuccess ? 'success' : 'fail'](isSuccess ? '核销成功' : '核销失败')
|
||||
}, 800)
|
||||
} else {
|
||||
// 非连续模式 - 直接跳转到详情页
|
||||
Toast.loading({
|
||||
message: '核销中...',
|
||||
duration: 0
|
||||
})
|
||||
|
||||
// 模拟API请求
|
||||
setTimeout(() => {
|
||||
Toast.close()
|
||||
// 这里应该根据实际API响应决定是否跳转
|
||||
// 模拟80%概率成功
|
||||
if (Math.random() > 0.2) {
|
||||
// 跳转到详情页,传递订单号参数
|
||||
uni.navigateTo({
|
||||
url: `/pagesA/verification/detail?orderNumber=${code}`
|
||||
})
|
||||
} else {
|
||||
Toast.fail('核销失败,请重试')
|
||||
}
|
||||
}, 800)
|
||||
}
|
||||
}
|
||||
|
||||
// 格式化日期时间
|
||||
const formatDateTime = (date : Date) : string => {
|
||||
const year = date.getFullYear()
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
const hours = String(date.getHours()).padStart(2, '0')
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0')
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0')
|
||||
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
|
||||
}
|
||||
|
||||
// 跳转到核销历史记录页面
|
||||
const toVerificationHistory = () => {
|
||||
// 这里应该跳转到历史记录页面
|
||||
// 目前示例仅显示提示
|
||||
Toast.info('查看历史记录')
|
||||
// uni.navigateTo({
|
||||
// url: '/pagesA/verification/history'
|
||||
// })
|
||||
}
|
||||
|
||||
// 页面跳转
|
||||
const toPages = (item : any) => {
|
||||
if (item.type === 'nav') {
|
||||
uni.navigateBack()
|
||||
} else if (item.type === 'home') {
|
||||
// 这里是项目内部的跳转逻辑
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
checkRouteStack()
|
||||
})
|
||||
// 状态颜色配置
|
||||
const getStatusColor = (status : number) => {
|
||||
const colorMap = {
|
||||
1: '#ff9d00', // 待配送
|
||||
2: '#00b42a', // 已完成
|
||||
3: '#37A5FF', // 未入库
|
||||
4: '#F42429' // 已取消
|
||||
}
|
||||
return colorMap[status] || '#666666'
|
||||
}
|
||||
|
||||
// 状态背景色配置
|
||||
const getStatusBgColor = (status : number) => {
|
||||
const bgColorMap = {
|
||||
1: '#fff6e9', // 待配送
|
||||
2: '#e8ffea', // 已完成
|
||||
3: '#e8f4ff', // 未入库
|
||||
4: '#ffe8e8' // 已取消
|
||||
}
|
||||
return bgColorMap[status] || '#f5f5f5'
|
||||
}
|
||||
|
||||
// 状态文字配置
|
||||
const getStatusText = (status : number) => {
|
||||
const textMap = {
|
||||
1: '待配送',
|
||||
2: '已完成',
|
||||
3: '未入库',
|
||||
4: '已取消'
|
||||
}
|
||||
return textMap[status] || '未知状态'
|
||||
}
|
||||
|
||||
|
||||
|
||||
const toPages = (item : any) => {
|
||||
console.log(item);
|
||||
switch (item.type) {
|
||||
case 'nav':
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
break;
|
||||
case 'home':
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const handleAction = (action : string) => {
|
||||
console.log(action);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.li-message-page {
|
||||
width: 100%;
|
||||
.verification-page {
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(to bottom,
|
||||
rgba(217, 237, 255, 0.9) 0%,
|
||||
rgba(217, 237, 255, 0.9) 20%,
|
||||
rgba(207, 207, 207, 0.2) 40%,
|
||||
rgba(207, 207, 207, 0.2) 60%,
|
||||
rgba(207, 207, 207, 0.2) 80%,
|
||||
rgba(207, 207, 207, 0.2) 100%);
|
||||
background-attachment: fixed;
|
||||
/* #ifdef H5 */
|
||||
padding-bottom: 160rpx;
|
||||
/* #endif */
|
||||
/* #ifdef APP-PLUS */
|
||||
padding-bottom: 180rpx;
|
||||
/* #endif */
|
||||
/* #ifdef MP-WEIXIN */
|
||||
padding-bottom: 170rpx;
|
||||
/* #endif */
|
||||
}
|
||||
background-color: #f7f8fc;
|
||||
position: relative;
|
||||
|
||||
// 导航背景层
|
||||
.nav-bg-layer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: calc(var(--status-bar-height) + 88rpx);
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
|
||||
z-index: -1;
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
// 导航栏背景层
|
||||
.nav-bg-layer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: var(--window-top);
|
||||
background: linear-gradient(to bottom,
|
||||
rgba(217, 237, 255, 0.95),
|
||||
rgba(217, 237, 255, 0.85));
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
z-index: 998;
|
||||
}
|
||||
// 扫码功能区
|
||||
.scan-button-wrapper {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
position: relative;
|
||||
|
||||
.li-task-card {
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.scan-button {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(135deg, #42a5ff 0%, #0070F0 100%);
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 8rpx 30rpx rgba(56, 165, 255, 0.25);
|
||||
color: white;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
::v-deep .wd-button {
|
||||
width: 160rpx !important;
|
||||
height: 65rpx !important;
|
||||
min-width: 160rpx !important;
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
box-shadow: 0 4rpx 15rpx rgba(56, 165, 255, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -10rpx;
|
||||
left: -10rpx;
|
||||
right: -10rpx;
|
||||
bottom: -10rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid rgba(56, 165, 255, 0.2);
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
|
||||
// 核销记录状态标签
|
||||
.status-badge {
|
||||
padding: 4rpx 20rpx;
|
||||
border-radius: 30rpx;
|
||||
font-size: 24rpx;
|
||||
|
||||
&.status-success {
|
||||
color: #07c160;
|
||||
background-color: rgba(7, 193, 96, 0.1);
|
||||
}
|
||||
|
||||
&.status-fail {
|
||||
color: #fa5151;
|
||||
background-color: rgba(250, 81, 81, 0.1);
|
||||
}
|
||||
|
||||
&.status-pending {
|
||||
color: #f0ad4e;
|
||||
background-color: rgba(240, 173, 78, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
// 卡片阴影效果
|
||||
.li-shadow-sm {
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
// 输入模式美化
|
||||
.input-mode-container {
|
||||
.wd-button {
|
||||
border-radius: 10rpx;
|
||||
height: 90rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 底部区域间距
|
||||
.empty-state {
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
.li-items-center{align-items:center}
|
||||
.items-center{align-items:center}
|
||||
.li-justify-center{justify-content:center}
|
||||
.justify-end{justify-content:end}
|
||||
.justify-center{justify-content:center}
|
||||
.li-justify-between{justify-content:space-between}
|
||||
|
|
@ -19,6 +18,7 @@
|
|||
.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}
|
||||
|
|
@ -43,6 +43,7 @@
|
|||
.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)}
|
||||
|
|
@ -51,105 +52,30 @@
|
|||
.li-w-58{width:58rpx}
|
||||
.li-w-full-70{width:70%}
|
||||
.li-w-full-88{width:88%}
|
||||
.li-font-550{font-weight:550}
|
||||
.li-h-68{height:68rpx}
|
||||
.li-mt-100{margin-top:100rpx}
|
||||
.li-mt-28{margin-top:28rpx}
|
||||
.li-mt-32{margin-top:32rpx}
|
||||
.li-mt-90{margin-top:90rpx}
|
||||
.li-mx-10{margin-left:10rpx;margin-right:10rpx}
|
||||
.li-pt-270{padding-top:270rpx}
|
||||
.li-rd-40{border-radius:40rpx}
|
||||
.li-text-000000-color{color:rgb(0,0,0)}
|
||||
.li-text-2EA1EA-color{color:rgb(46,161,234)}
|
||||
.li-text-38{font-size:38rpx}
|
||||
.li-text-a5a5a5-color{color:rgb(165,165,165)}
|
||||
.li-w-150{width:150rpx}
|
||||
.li-w-420{width:420rpx}
|
||||
.li-w-full-80{width:80%}
|
||||
.li-w-full-85{width:85%}
|
||||
.li-w-full-90{width:90%}
|
||||
.li-h-100{height:100rpx}
|
||||
.li-ml-20{margin-left:20rpx}
|
||||
.li-ml-200{margin-left:200rpx}
|
||||
.li-ml-30{margin-left:30rpx}
|
||||
.li-mr-10{margin-right:10rpx}
|
||||
.li-mr-30{margin-right:30rpx}
|
||||
.li-mt-300-important{margin-top:300rpx !important}
|
||||
.li-pt-2{padding-top:2rpx}
|
||||
.li-py-20{padding-top:20rpx;padding-bottom:20rpx}
|
||||
.li-rd-full-50{border-radius:50%}
|
||||
.li-text-25{font-size:25rpx}
|
||||
.li-text-35{font-size:35rpx}
|
||||
.li-text-42{font-size:42rpx}
|
||||
.li-text-46{font-size:46rpx}
|
||||
.li-w-100{width:100rpx}
|
||||
.pt-10{padding-top:10rpx}
|
||||
.bg-FFFFFF{background-color:rgb(255,255,255)}
|
||||
.bg-f9f9f9{background-color:rgb(249,249,249)}
|
||||
.border-4-white{border-style:solid;border-color:rgb(255,255,255);border-width:4rpx}
|
||||
.li-h-240{height:240rpx}
|
||||
.li-h-250{height:250rpx}
|
||||
.li-h-50{height:50rpx}
|
||||
.li-h-60{height:60rpx}
|
||||
.li-items-end{align-items:end}
|
||||
.li-justify-start{justify-content:start}
|
||||
.li-mb-2{margin-bottom:2rpx}
|
||||
.li-ml-4{margin-left:4rpx}
|
||||
.li-ml-50{margin-left:50rpx}
|
||||
.li-mr-20{margin-right:20rpx}
|
||||
.li-mr-50{margin-right:50rpx}
|
||||
.li-mt-26{margin-top:26rpx}
|
||||
.li-mt-6{margin-top:6rpx}
|
||||
.li-mt-60{margin-top:60rpx}
|
||||
.li-mx-20{margin-left:20rpx;margin-right:20rpx}
|
||||
.li-mx-40{margin-left:40rpx;margin-right:40rpx}
|
||||
.li-pb-10{padding-bottom:10rpx}
|
||||
.li-pb-14{padding-bottom:14rpx}
|
||||
.li-pb-20{padding-bottom:20rpx}
|
||||
.li-pt-20{padding-top:20rpx}
|
||||
.li-pt-8{padding-top:8rpx}
|
||||
.li-rd-20{border-radius:20rpx}
|
||||
.li-rd-tl-30-important{border-top-left-radius:30rpx !important}
|
||||
.li-rd-tr-30-important{border-top-right-radius:30rpx !important}
|
||||
.li-text-19171B-color{color:rgb(25,23,27)}
|
||||
.li-text-20{font-size:20rpx}
|
||||
.li-text-32{font-size:32rpx}
|
||||
.li-text-34{font-size:34rpx}
|
||||
.li-text-706e70-color{color:rgb(112,110,112)}
|
||||
.li-text-B2B2B2-color{color:rgb(178,178,178)}
|
||||
.li-text-BBBDDA-color{color:rgb(187,189,218)}
|
||||
.li-text-F2F7FD-color{color:rgb(242,247,253)}
|
||||
.li-text-F8C883-color{color:rgb(248,200,131)}
|
||||
.li-text-FFFFFF-color{color:rgb(255,255,255)}
|
||||
.li-text-b1bbc7-color{color:rgb(177,187,199)}
|
||||
.li-w-240{width:240rpx}
|
||||
.li-w-50{width:50rpx}
|
||||
.li-w-60{width:60rpx}
|
||||
.li-w-full-94{width:94%}
|
||||
.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-mb-25{margin-bottom:25rpx}
|
||||
.li-text-009aff-color{color:rgb(0,154,255)}
|
||||
.li-text-999-color{color:rgb(153,153,153)}
|
||||
.li-font-400{font-weight:400}
|
||||
.li-m-30{margin:30rpx}
|
||||
.li-text-595959-color{color:rgb(89,89,89)}
|
||||
|
||||
.li-bottom-0{bottom:0}
|
||||
.li-fixed{position:fixed}
|
||||
|
|
@ -157,31 +83,40 @@
|
|||
.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-mr-40{margin-right:40rpx}
|
||||
.li-text-a3a3a3-color{color:rgb(163,163,163)}
|
||||
|
||||
.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}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue