修改框架和路由配置(改为多页面)、修改订单复核页面
This commit is contained in:
parent
a3040e5c7f
commit
64f36ce3a2
@ -29,3 +29,35 @@ export function searchOrdersForReview(
|
|||||||
export function fetchCurrentWavePendingOrders(options?: RequestOptions) {
|
export function fetchCurrentWavePendingOrders(options?: RequestOptions) {
|
||||||
return request<ApiBody>('order.review.currentWave', { ...workerPayload }, options)
|
return request<ApiBody>('order.review.currentWave', { ...workerPayload }, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type OrderListPagination = {
|
||||||
|
page?: number
|
||||||
|
pageSize?: number
|
||||||
|
currentPage?: number
|
||||||
|
page_size?: number
|
||||||
|
size?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
type OrderListSort = {
|
||||||
|
sortField?: string
|
||||||
|
sortOrder?: 'asc' | 'desc' | 'ASC' | 'DESC'
|
||||||
|
}
|
||||||
|
|
||||||
|
type OrderListWhere = Record<string, unknown>
|
||||||
|
|
||||||
|
type OrderListParams = {
|
||||||
|
pagination?: OrderListPagination
|
||||||
|
where?: OrderListWhere
|
||||||
|
sort?: OrderListSort
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单工作台总列表
|
||||||
|
* 查询当前登录用户仓库上下文下订单总列表,支持 pagination / where / sort
|
||||||
|
*/
|
||||||
|
export function fetchOrderList(params: OrderListParams = {}, options?: RequestOptions) {
|
||||||
|
return request<ApiBody>('order.list', {
|
||||||
|
...workerPayload,
|
||||||
|
...params,
|
||||||
|
}, options)
|
||||||
|
}
|
||||||
|
|||||||
@ -1,448 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="order-review-one">
|
|
||||||
<view :class="['container', compactTop ? 'container--compact-top' : '']">
|
|
||||||
<view class="search-bar">
|
|
||||||
<input
|
|
||||||
class="search-input"
|
|
||||||
v-model="keyword"
|
|
||||||
placeholder="请输入快递号/商品条码/拣货车/数量等关键词搜索订单"
|
|
||||||
:focus="false"
|
|
||||||
:adjust-position="false"
|
|
||||||
confirm-type="search"
|
|
||||||
@confirm="handleSearch"
|
|
||||||
/>
|
|
||||||
<button class="search-btn" type="primary" @click="handleSearch">搜索</button>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="content-panel">
|
|
||||||
<view class="panel-left">
|
|
||||||
<view class="left-summary">
|
|
||||||
<text class="left-summary-text">待处理:{{ pendingCount }};当前波次:{{ currentWaveCount }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="left-header-actions">
|
|
||||||
<view
|
|
||||||
:class="['header-action-btn', activeLeftAction === 'currentWave' ? 'header-action-btn--active' : '']"
|
|
||||||
@click="handleLeftActionClick('currentWave')"
|
|
||||||
>
|
|
||||||
<text class="header-action-text">当前波次</text>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
:class="['header-action-btn', activeLeftAction === 'settings' ? 'header-action-btn--active' : '']"
|
|
||||||
@click="handleLeftActionClick('settings')"
|
|
||||||
>
|
|
||||||
<text class="header-action-text">设置</text>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
:class="['header-action-btn', activeLeftAction === 'printInfo' ? 'header-action-btn--active' : '']"
|
|
||||||
@click="handleLeftActionClick('printInfo')"
|
|
||||||
>
|
|
||||||
<text class="header-action-text">打印信息</text>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
:class="['header-action-btn', 'header-action-btn--reviewed', activeLeftAction === 'reviewedList' ? 'header-action-btn--active' : '']"
|
|
||||||
@click="handleLeftActionClick('reviewedList')"
|
|
||||||
>
|
|
||||||
<text class="header-action-text">已复核列表</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<scroll-view v-if="activeLeftAction === 'currentWave'" class="left-reviewed-list" scroll-y>
|
|
||||||
<view class="table-wrap table-wrap--current-wave">
|
|
||||||
<view class="table-header">
|
|
||||||
<text class="table-cell cell-pending-order">待处理订单号</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="table-body">
|
|
||||||
<view v-if="displayCurrentWaveOrders.length === 0" class="empty">暂无匹配数据</view>
|
|
||||||
<view
|
|
||||||
v-else
|
|
||||||
v-for="(item, index) in displayCurrentWaveOrders"
|
|
||||||
:key="`${item.waveNo}-${item.pendingOrderNo}-${index}`"
|
|
||||||
class="table-row"
|
|
||||||
>
|
|
||||||
<text class="table-cell cell-pending-order">{{ item.pendingOrderNo }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
|
|
||||||
<scroll-view v-else-if="activeLeftAction === 'reviewedList'" class="left-reviewed-list" scroll-y>
|
|
||||||
<view class="table-wrap table-wrap--reviewed">
|
|
||||||
<view class="table-header">
|
|
||||||
<text class="table-cell cell-index">序号</text>
|
|
||||||
<text class="table-cell cell-order-no">订单号</text>
|
|
||||||
<text class="table-cell cell-wave-no">波次号</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="table-body">
|
|
||||||
<view v-if="displayReviewedOrders.length === 0" class="empty">暂无匹配数据</view>
|
|
||||||
<view v-else v-for="(item, index) in displayReviewedOrders" :key="`${item.orderNo}-${index}`" class="table-row">
|
|
||||||
<text class="table-cell cell-index">{{ index + 1 }}</text>
|
|
||||||
<text class="table-cell cell-order-no">{{ item.orderNo }}</text>
|
|
||||||
<text class="table-cell cell-wave-no">{{ item.waveNo }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="panel-right">
|
|
||||||
<scroll-view class="table-scroll" scroll-x>
|
|
||||||
<view class="table-wrap">
|
|
||||||
<view class="table-header">
|
|
||||||
<text class="table-cell cell-blue-no">蓝号</text>
|
|
||||||
<text class="table-cell cell-qty">数量</text>
|
|
||||||
<text class="table-cell cell-scan">扫描记</text>
|
|
||||||
<text class="table-cell cell-barcode">条码</text>
|
|
||||||
<text class="table-cell cell-name">商品名称</text>
|
|
||||||
<text class="table-cell cell-color">颜色</text>
|
|
||||||
<text class="table-cell cell-spec">规格</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="table-body">
|
|
||||||
<view v-if="displayOrders.length === 0" class="empty">暂无匹配数据</view>
|
|
||||||
<view v-else v-for="order in displayOrders" :key="order.barcode" class="table-row">
|
|
||||||
<text class="table-cell cell-blue-no">{{ order.blueNo }}</text>
|
|
||||||
<text class="table-cell cell-qty">{{ order.quantity }}</text>
|
|
||||||
<text class="table-cell cell-scan">{{ order.scanMark }}</text>
|
|
||||||
<text class="table-cell cell-barcode">{{ order.barcode }}</text>
|
|
||||||
<text class="table-cell cell-name">{{ order.productName }}</text>
|
|
||||||
<text class="table-cell cell-color">{{ order.color }}</text>
|
|
||||||
<text class="table-cell cell-spec">{{ order.spec }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'OrderReviewOne',
|
|
||||||
props: {
|
|
||||||
compactTop: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
pendingCount: 134,
|
|
||||||
currentWaveCount: 0,
|
|
||||||
activeLeftAction: 'currentWave',
|
|
||||||
keyword: '',
|
|
||||||
displayOrders: [],
|
|
||||||
displayCurrentWaveOrders: [],
|
|
||||||
displayReviewedOrders: [],
|
|
||||||
allOrders: [
|
|
||||||
{
|
|
||||||
blueNo: 'L001',
|
|
||||||
quantity: 2,
|
|
||||||
scanMark: '已扫',
|
|
||||||
barcode: '6901234567001',
|
|
||||||
productName: '工装短袖',
|
|
||||||
color: '黑色',
|
|
||||||
spec: 'L',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
blueNo: 'L002',
|
|
||||||
quantity: 1,
|
|
||||||
scanMark: '未扫',
|
|
||||||
barcode: '6901234567002',
|
|
||||||
productName: '防滑手套',
|
|
||||||
color: '灰色',
|
|
||||||
spec: '均码',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
blueNo: 'L003',
|
|
||||||
quantity: 3,
|
|
||||||
scanMark: '已扫',
|
|
||||||
barcode: '6901234567003',
|
|
||||||
productName: '安全帽',
|
|
||||||
color: '黄色',
|
|
||||||
spec: 'M',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
allReviewedOrders: [
|
|
||||||
{ orderNo: 'DD202605190001', waveNo: 'WC001' },
|
|
||||||
{ orderNo: 'DD202605190002', waveNo: 'WC001' },
|
|
||||||
{ orderNo: 'DD202605190003', waveNo: 'WC002' },
|
|
||||||
],
|
|
||||||
allCurrentWaveOrders: [
|
|
||||||
{ waveNo: 'WC001', pendingOrderNo: 'DD202605190101' },
|
|
||||||
{ waveNo: 'WC001', pendingOrderNo: 'DD202605190102' },
|
|
||||||
{ waveNo: 'WC002', pendingOrderNo: 'DD202605190103' },
|
|
||||||
],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.displayOrders = this.allOrders
|
|
||||||
this.displayCurrentWaveOrders = this.allCurrentWaveOrders
|
|
||||||
this.displayReviewedOrders = this.allReviewedOrders
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleLeftActionClick(action) {
|
|
||||||
this.activeLeftAction = action
|
|
||||||
this.handleSearch()
|
|
||||||
},
|
|
||||||
handleSearch() {
|
|
||||||
const query = this.keyword.trim().toLowerCase()
|
|
||||||
|
|
||||||
if (this.activeLeftAction === 'currentWave') {
|
|
||||||
if (!query) {
|
|
||||||
this.displayCurrentWaveOrders = this.allCurrentWaveOrders
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
this.displayCurrentWaveOrders = this.allCurrentWaveOrders.filter((order) => {
|
|
||||||
return Object.values(order).some((value) => String(value || '').toLowerCase().includes(query))
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.activeLeftAction === 'reviewedList') {
|
|
||||||
if (!query) {
|
|
||||||
this.displayReviewedOrders = this.allReviewedOrders
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
this.displayReviewedOrders = this.allReviewedOrders.filter((order) => {
|
|
||||||
return Object.values(order).some((value) => String(value || '').toLowerCase().includes(query))
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!query) {
|
|
||||||
this.displayOrders = this.allOrders
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
this.displayOrders = this.allOrders.filter((order) => {
|
|
||||||
return Object.values(order).some((value) => String(value || '').toLowerCase().includes(query))
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.order-review-one {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
padding: 28rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container--compact-top {
|
|
||||||
padding-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-panel {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
gap: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.panel-left {
|
|
||||||
width: 700rpx;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.panel-right {
|
|
||||||
flex: 1;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.left-summary {
|
|
||||||
margin-bottom: 12rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.left-summary-text {
|
|
||||||
font-size: 30rpx;
|
|
||||||
color: #333;
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.left-header-actions {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
gap: 12rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.left-reviewed-list {
|
|
||||||
margin-top: 14rpx;
|
|
||||||
max-height: 520rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-action-btn {
|
|
||||||
flex: 1;
|
|
||||||
min-width: 0;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
height: 60rpx;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
border: 1rpx solid #d9dde8;
|
|
||||||
background-color: #fff;
|
|
||||||
padding: 0 8rpx;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-action-btn--active {
|
|
||||||
background-color: #34c759;
|
|
||||||
border-color: #34c759;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-action-text {
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 22rpx;
|
|
||||||
line-height: 1;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-action-btn--active .header-action-text {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-action-btn--reviewed {
|
|
||||||
letter-spacing: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 16rpx;
|
|
||||||
margin-bottom: 24rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-input {
|
|
||||||
flex: 1;
|
|
||||||
height: 72rpx;
|
|
||||||
border: 1rpx solid #e5e5e5;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
padding: 0 20rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-btn {
|
|
||||||
width: 160rpx;
|
|
||||||
height: 72rpx;
|
|
||||||
line-height: 72rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-scroll {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-wrap {
|
|
||||||
min-width: 980rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-wrap--reviewed {
|
|
||||||
min-width: 620rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-wrap--current-wave {
|
|
||||||
min-width: 620rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-header,
|
|
||||||
.table-row {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-header {
|
|
||||||
height: 64rpx;
|
|
||||||
border: 1rpx solid #e6ebf5;
|
|
||||||
border-bottom: none;
|
|
||||||
background-color: #f6f8fc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-body {
|
|
||||||
border: 1rpx solid #e6ebf5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-row {
|
|
||||||
min-height: 68rpx;
|
|
||||||
border-top: 1rpx solid #eef2f8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-row:first-child {
|
|
||||||
border-top: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-cell {
|
|
||||||
padding: 0 12rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #333;
|
|
||||||
line-height: 1.4;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-blue-no {
|
|
||||||
width: 110rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-qty {
|
|
||||||
width: 90rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-scan {
|
|
||||||
width: 110rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-barcode {
|
|
||||||
width: 200rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-name {
|
|
||||||
flex: 1;
|
|
||||||
min-width: 180rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-color {
|
|
||||||
width: 110rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-spec {
|
|
||||||
width: 110rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-index {
|
|
||||||
width: 120rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-order-no {
|
|
||||||
flex: 1;
|
|
||||||
min-width: 280rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-wave-no {
|
|
||||||
width: 180rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-pending-order {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.empty {
|
|
||||||
text-align: center;
|
|
||||||
color: #999;
|
|
||||||
font-size: 26rpx;
|
|
||||||
padding: 24rpx 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
384
src/components/top-nav.vue
Normal file
384
src/components/top-nav.vue
Normal file
@ -0,0 +1,384 @@
|
|||||||
|
<template>
|
||||||
|
<view class="top-nav" @click="closeMinePopup">
|
||||||
|
<image class="top-nav-logo" src="/static/images/1.png" mode="heightFix"></image>
|
||||||
|
|
||||||
|
<view class="top-nav-menu-wrap">
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in displayMenus"
|
||||||
|
:key="item.key"
|
||||||
|
:class="['top-nav-menu-item', activeIndex === index ? 'top-nav-menu-item--active' : '']"
|
||||||
|
@click="handleMenuClick(item, index)"
|
||||||
|
>
|
||||||
|
<text class="top-nav-menu-text">{{ item.title }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="top-nav-right" @click.stop>
|
||||||
|
<view class="top-nav-user" @click="openMinePopup">
|
||||||
|
<view class="top-nav-mine-icon" aria-hidden="true">
|
||||||
|
<view class="top-nav-mine-icon-head"></view>
|
||||||
|
<view class="top-nav-mine-icon-body"></view>
|
||||||
|
</view>
|
||||||
|
<text class="top-nav-user-name">{{ getTopNavRealName() }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="showMinePopup" class="popup-card" @click.stop>
|
||||||
|
<view class="popup-user-info" v-if="currentUser && currentUser.employees && currentUser.employees.length">
|
||||||
|
<view
|
||||||
|
v-for="employee in currentUser.employees"
|
||||||
|
:key="employee.id"
|
||||||
|
:class="['popup-user-item', isCurrentRole(employee) ? 'popup-user-item--current' : '']"
|
||||||
|
@click="handleChangeRole(employee)"
|
||||||
|
>
|
||||||
|
<text class="popup-user-text">{{ employee.store_name }} | {{ employee.real_name }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<button class="logout-btn" type="warn" @click="handleLogout">退出登录</button>
|
||||||
|
<button class="close-btn" @click="closeMinePopup">关闭</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { changeUserRole, fetchUserInfo, logout } from '@/api/index'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TopNav',
|
||||||
|
props: {
|
||||||
|
menus: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
activePath: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
useRedirect: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
userName: {
|
||||||
|
type: String,
|
||||||
|
default: '未登录用户',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeIndex: 0,
|
||||||
|
showMinePopup: false,
|
||||||
|
currentUser: null,
|
||||||
|
defaultMenus: [
|
||||||
|
{
|
||||||
|
title: '订单复核1',
|
||||||
|
path: '/pages/order/index',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '称重',
|
||||||
|
path: '/pages/weighing/index',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '退件',
|
||||||
|
path: '/pages/returns/index',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
displayMenus() {
|
||||||
|
const sourceMenus = Array.isArray(this.menus) && this.menus.length ? this.menus : this.defaultMenus
|
||||||
|
return sourceMenus
|
||||||
|
.map((menu, index) => {
|
||||||
|
const path = this.normalizePath(menu?.path)
|
||||||
|
return {
|
||||||
|
raw: menu,
|
||||||
|
key: menu?.path || menu?.name || String(index),
|
||||||
|
path,
|
||||||
|
title: this.getMenuTitle(menu),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.filter((menu) => !!menu.path)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
activePath() {
|
||||||
|
this.syncActiveIndex()
|
||||||
|
},
|
||||||
|
menus: {
|
||||||
|
deep: true,
|
||||||
|
handler() {
|
||||||
|
this.syncActiveIndex()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.syncActiveIndex()
|
||||||
|
this.loadCurrentUserInfo()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
normalizePath(path) {
|
||||||
|
const raw = String(path || '').trim()
|
||||||
|
if (!raw) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
return raw.startsWith('/') ? raw : `/${raw}`
|
||||||
|
},
|
||||||
|
getMenuTitle(menu) {
|
||||||
|
return menu?.meta?.title || menu?.title || menu?.name || '未命名菜单'
|
||||||
|
},
|
||||||
|
syncActiveIndex() {
|
||||||
|
const normalizedActivePath = this.normalizePath(this.activePath)
|
||||||
|
if (normalizedActivePath) {
|
||||||
|
const targetIndex = this.displayMenus.findIndex((item) => item.path === normalizedActivePath)
|
||||||
|
this.activeIndex = targetIndex >= 0 ? targetIndex : 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.syncActiveByRoute()
|
||||||
|
},
|
||||||
|
syncActiveByRoute() {
|
||||||
|
const pages = getCurrentPages()
|
||||||
|
const currentPage = pages[pages.length - 1]
|
||||||
|
const route = currentPage?.route ? `/${currentPage.route}` : ''
|
||||||
|
const targetIndex = this.displayMenus.findIndex((item) => item.path === route)
|
||||||
|
this.activeIndex = targetIndex >= 0 ? targetIndex : 0
|
||||||
|
},
|
||||||
|
handleMenuClick(item, index) {
|
||||||
|
this.activeIndex = index
|
||||||
|
|
||||||
|
this.$emit('menu-click', item.raw)
|
||||||
|
|
||||||
|
if (this.useRedirect) {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: item.path,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
this.closeMinePopup()
|
||||||
|
},
|
||||||
|
getTopNavRealName() {
|
||||||
|
const employees = this.currentUser?.employees || []
|
||||||
|
if (employees.length && employees[0]?.real_name) {
|
||||||
|
return employees[0].real_name
|
||||||
|
}
|
||||||
|
if (this.userName && this.userName !== '未登录用户') {
|
||||||
|
return this.userName
|
||||||
|
}
|
||||||
|
return this.currentUser?.real_name || '未命名用户'
|
||||||
|
},
|
||||||
|
isCurrentRole(employee) {
|
||||||
|
return Number(employee?.is_primary) === 1
|
||||||
|
},
|
||||||
|
openMinePopup() {
|
||||||
|
this.showMinePopup = true
|
||||||
|
},
|
||||||
|
closeMinePopup() {
|
||||||
|
this.showMinePopup = false
|
||||||
|
},
|
||||||
|
loadCurrentUserInfo() {
|
||||||
|
fetchUserInfo()
|
||||||
|
.then((body) => {
|
||||||
|
this.currentUser = body?.data || body?.result || body || null
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.currentUser = null
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleChangeRole(employee) {
|
||||||
|
const employeeId = employee?.id
|
||||||
|
const token = uni.getStorageSync('token')
|
||||||
|
if (!employeeId || !token) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
changeUserRole(employeeId)
|
||||||
|
.then((body) => {
|
||||||
|
const isSuccess = body?.code === 0 || body?.success === true || body?.status === 1
|
||||||
|
if (!isSuccess && (body?.msg || body?.message)) {
|
||||||
|
uni.showToast({
|
||||||
|
title: body?.msg || body?.message,
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.loadCurrentUserInfo()
|
||||||
|
uni.showToast({
|
||||||
|
title: '角色切换成功',
|
||||||
|
icon: 'success',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '角色切换失败',
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
finishLogout() {
|
||||||
|
uni.removeStorageSync('token')
|
||||||
|
uni.showToast({
|
||||||
|
title: '已退出登录',
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/login',
|
||||||
|
})
|
||||||
|
}, 200)
|
||||||
|
},
|
||||||
|
handleLogout() {
|
||||||
|
const token = uni.getStorageSync('token')
|
||||||
|
if (!token) {
|
||||||
|
this.finishLogout()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
logout().finally(() => {
|
||||||
|
this.finishLogout()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.top-nav {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
padding: 18rpx 28rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #2f7dff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav-logo {
|
||||||
|
height: 90rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav-right {
|
||||||
|
position: relative;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav-menu-wrap {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 36rpx;
|
||||||
|
gap: 14rpx;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav-menu-item {
|
||||||
|
padding: 10rpx 18rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav-menu-item--active {
|
||||||
|
background-color: rgba(255, 255, 255, 0.24);
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav-menu-text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav-user {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10rpx;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav-user-name {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 32rpx;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav-mine-icon {
|
||||||
|
width: 44rpx;
|
||||||
|
height: 44rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 999rpx;
|
||||||
|
background-color: rgba(255, 255, 255, 0.2);
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav-mine-icon-head {
|
||||||
|
width: 12rpx;
|
||||||
|
height: 12rpx;
|
||||||
|
border: 2rpx solid #fff;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav-mine-icon-body {
|
||||||
|
width: 20rpx;
|
||||||
|
height: 10rpx;
|
||||||
|
margin-top: 4rpx;
|
||||||
|
border: 2rpx solid #fff;
|
||||||
|
border-top: none;
|
||||||
|
border-radius: 0 0 12rpx 12rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-card {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 70rpx;
|
||||||
|
min-width: 330rpx;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
box-shadow: 0 12rpx 32rpx rgba(0, 0, 0, 0.16);
|
||||||
|
padding: 16rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
z-index: 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-user-info {
|
||||||
|
max-height: 320rpx;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-user-item {
|
||||||
|
padding: 12rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-user-item--current {
|
||||||
|
background-color: #edf4ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-user-text {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-user-item--current .popup-user-text {
|
||||||
|
color: #2f7dff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logout-btn {
|
||||||
|
margin-top: 16rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-btn {
|
||||||
|
margin-top: 10rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
background-color: #f5f7fb;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -18,6 +18,20 @@
|
|||||||
"titleNView": false,
|
"titleNView": false,
|
||||||
"navigationBarTitleText": "订单复核1"
|
"navigationBarTitleText": "订单复核1"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/weighing/index",
|
||||||
|
"style": {
|
||||||
|
"titleNView": false,
|
||||||
|
"navigationBarTitleText": "称重"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/returns/index",
|
||||||
|
"style": {
|
||||||
|
"titleNView": false,
|
||||||
|
"navigationBarTitleText": "退件"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
@ -1,41 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="layout-page" @click="closeMinePopup">
|
<view class="layout-page">
|
||||||
<view class="top-nav" @click.stop>
|
<top-nav
|
||||||
<image class="top-nav-logo" src="http://192.168.11.56:5174/public/logo/1.png" mode="heightFix"></image>
|
:menus="topMenus"
|
||||||
<view class="top-nav-menu-wrap" v-if="topMenus.length">
|
:active-path="activeMenuPath"
|
||||||
<view
|
:use-redirect="false"
|
||||||
v-for="menu in topMenus"
|
@menu-click="handleMenuClick"
|
||||||
:key="menu.path || menu.name"
|
/>
|
||||||
:class="['top-nav-menu-item', isMenuActive(menu) ? 'top-nav-menu-item--active' : '']"
|
|
||||||
@click="handleMenuClick(menu)"
|
|
||||||
>
|
|
||||||
<text class="top-nav-menu-text">{{ getMenuTitle(menu) }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="top-nav-right">
|
|
||||||
<view class="top-nav-mine" @click="openMinePopup">
|
|
||||||
<view class="top-nav-mine-icon" aria-hidden="true">
|
|
||||||
<view class="top-nav-mine-icon-head"></view>
|
|
||||||
<view class="top-nav-mine-icon-body"></view>
|
|
||||||
</view>
|
|
||||||
<text class="top-nav-mine-name">{{ getTopNavRealName() }}</text>
|
|
||||||
</view>
|
|
||||||
<view v-if="showMinePopup" class="popup-card" @click.stop>
|
|
||||||
<view class="popup-user-info" v-if="currentUser && currentUser.employees && currentUser.employees.length">
|
|
||||||
<view
|
|
||||||
v-for="employee in currentUser.employees"
|
|
||||||
:key="employee.id"
|
|
||||||
:class="['popup-user-item', isCurrentRole(employee) ? 'popup-user-item--current' : '']"
|
|
||||||
@click="handleChangeRole(employee)"
|
|
||||||
>
|
|
||||||
<text class="popup-user-text">{{ employee.store_name }} | {{ employee.real_name }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<button class="logout-btn" type="warn" @click="handleLogout">退出登录</button>
|
|
||||||
<button class="close-btn" @click="closeMinePopup">关闭</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="layout-main">
|
<view class="layout-main">
|
||||||
<component
|
<component
|
||||||
@ -53,10 +23,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { changeUserRole, fetchUserInfo, logout } from '@/api/index'
|
import { fetchUserInfo } from '@/api/index'
|
||||||
|
import TopNav from '@/components/top-nav.vue'
|
||||||
import { hasMenuView, normalizeMenuPath, resolveMenuView } from '@/router/menuRoutes'
|
import { hasMenuView, normalizeMenuPath, resolveMenuView } from '@/router/menuRoutes'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
TopNav,
|
||||||
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
uni.hideKeyboard?.()
|
uni.hideKeyboard?.()
|
||||||
;[80, 180, 320, 520].forEach((delay) => {
|
;[80, 180, 320, 520].forEach((delay) => {
|
||||||
@ -87,7 +61,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showMinePopup: false,
|
|
||||||
currentUser: null,
|
currentUser: null,
|
||||||
activeMenuPath: '',
|
activeMenuPath: '',
|
||||||
}
|
}
|
||||||
@ -178,53 +151,6 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getTopNavRealName() {
|
|
||||||
const employees = this.currentUser?.employees || []
|
|
||||||
if (employees.length && employees[0]?.real_name) {
|
|
||||||
return employees[0].real_name
|
|
||||||
}
|
|
||||||
return this.currentUser?.real_name || '未命名用户'
|
|
||||||
},
|
|
||||||
isCurrentRole(employee) {
|
|
||||||
return Number(employee?.is_primary) === 1
|
|
||||||
},
|
|
||||||
handleChangeRole(employee) {
|
|
||||||
const employeeId = employee?.id
|
|
||||||
const token = uni.getStorageSync('token')
|
|
||||||
if (!employeeId || !token) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
changeUserRole(employeeId)
|
|
||||||
.then((body) => {
|
|
||||||
const isSuccess = body?.code === 0 || body?.success === true || body?.status === 1
|
|
||||||
if (!isSuccess && (body?.msg || body?.message)) {
|
|
||||||
uni.showToast({
|
|
||||||
title: body?.msg || body?.message,
|
|
||||||
icon: 'none',
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loadCurrentUserInfo()
|
|
||||||
uni.showToast({
|
|
||||||
title: '角色切换成功',
|
|
||||||
icon: 'success',
|
|
||||||
})
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
uni.showToast({
|
|
||||||
title: '角色切换失败',
|
|
||||||
icon: 'none',
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
openMinePopup() {
|
|
||||||
this.showMinePopup = true
|
|
||||||
},
|
|
||||||
closeMinePopup() {
|
|
||||||
this.showMinePopup = false
|
|
||||||
},
|
|
||||||
loadCurrentUserInfo() {
|
loadCurrentUserInfo() {
|
||||||
fetchUserInfo()
|
fetchUserInfo()
|
||||||
.then((body) => {
|
.then((body) => {
|
||||||
@ -242,29 +168,6 @@ export default {
|
|||||||
/* 静默失败,避免打断主导航 */
|
/* 静默失败,避免打断主导航 */
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
finishLogout() {
|
|
||||||
uni.removeStorageSync('token')
|
|
||||||
uni.showToast({
|
|
||||||
title: '已退出登录',
|
|
||||||
icon: 'none',
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/login/login',
|
|
||||||
})
|
|
||||||
}, 200)
|
|
||||||
},
|
|
||||||
handleLogout() {
|
|
||||||
const token = uni.getStorageSync('token')
|
|
||||||
if (!token) {
|
|
||||||
this.finishLogout()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
logout().finally(() => {
|
|
||||||
this.finishLogout()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -282,160 +185,6 @@ export default {
|
|||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-nav {
|
|
||||||
width: 100%;
|
|
||||||
flex-shrink: 0;
|
|
||||||
margin: 0 0 24rpx;
|
|
||||||
padding: 18rpx 28rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: #2f7dff;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-start;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-right {
|
|
||||||
position: relative;
|
|
||||||
margin-left: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-logo {
|
|
||||||
height: 90rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-menu-wrap {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
margin-left: 36rpx;
|
|
||||||
gap: 14rpx;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-menu-item {
|
|
||||||
padding: 10rpx 18rpx;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-menu-item--active {
|
|
||||||
box-shadow: inset 0 -4rpx 0 #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-menu-text {
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #fff;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-mine {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10rpx;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-mine-icon {
|
|
||||||
width: 44rpx;
|
|
||||||
height: 44rpx;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border-radius: 999rpx;
|
|
||||||
background-color: rgba(255, 255, 255, 0.2);
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-mine-icon-head {
|
|
||||||
width: 12rpx;
|
|
||||||
height: 12rpx;
|
|
||||||
border: 2rpx solid #fff;
|
|
||||||
border-radius: 50%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-mine-icon-body {
|
|
||||||
width: 20rpx;
|
|
||||||
height: 10rpx;
|
|
||||||
margin-top: 4rpx;
|
|
||||||
border: 2rpx solid #fff;
|
|
||||||
border-top: none;
|
|
||||||
border-radius: 0 0 12rpx 12rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-mine-name {
|
|
||||||
font-size: 32rpx;
|
|
||||||
line-height: 1;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-card {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: calc(100% + 14rpx);
|
|
||||||
width: 420rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
padding: 32rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
z-index: 1000;
|
|
||||||
box-shadow: 0 12rpx 30rpx rgba(0, 0, 0, 0.14);
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-user-info {
|
|
||||||
margin-bottom: 18rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-user-item {
|
|
||||||
padding: 12rpx 10rpx;
|
|
||||||
border-bottom: 1rpx solid #eef2f7;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-user-item:last-child {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-user-item--current {
|
|
||||||
background-color: #eef5ff;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-user-text {
|
|
||||||
display: block;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #333;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-user-item--current .popup-user-text {
|
|
||||||
color: #2f7dff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logout-btn,
|
|
||||||
.close-btn {
|
|
||||||
width: 100%;
|
|
||||||
height: 64rpx;
|
|
||||||
line-height: 64rpx;
|
|
||||||
font-size: 26rpx;
|
|
||||||
padding: 0;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logout-btn {
|
|
||||||
margin-top: 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.close-btn {
|
|
||||||
margin-top: 10rpx;
|
|
||||||
background-color: #f5f7fb;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.layout-main {
|
.layout-main {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
@ -467,41 +216,6 @@ export default {
|
|||||||
min-width: 760px;
|
min-width: 760px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-nav {
|
|
||||||
margin-bottom: 18rpx;
|
|
||||||
padding: 16rpx 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-menu-wrap {
|
|
||||||
margin-left: 24rpx;
|
|
||||||
gap: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-menu-item {
|
|
||||||
padding: 8rpx 14rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-menu-text {
|
|
||||||
font-size: 22rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-logo {
|
|
||||||
height: 78rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-card {
|
|
||||||
width: 360rpx;
|
|
||||||
padding: 24rpx;
|
|
||||||
top: calc(100% + 12rpx);
|
|
||||||
}
|
|
||||||
|
|
||||||
.logout-btn,
|
|
||||||
.close-btn {
|
|
||||||
height: 58rpx;
|
|
||||||
line-height: 58rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.layout-main {
|
.layout-main {
|
||||||
padding: 0 20rpx 18rpx;
|
padding: 0 20rpx 18rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -917,7 +917,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/index/index',
|
url: '/pages/order/index',
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
return
|
return
|
||||||
@ -986,7 +986,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/index/index',
|
url: '/pages/order/index',
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
return
|
return
|
||||||
|
|||||||
@ -1,19 +1,345 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page">
|
<view class="page">
|
||||||
<order-review-one compact-top />
|
<top-nav />
|
||||||
|
<view class="page-main order-review-one">
|
||||||
|
<view class="container container--compact-top">
|
||||||
|
<view class="search-bar">
|
||||||
|
<input
|
||||||
|
class="search-input"
|
||||||
|
v-model="keyword"
|
||||||
|
placeholder="请输入快递号/商品条码/拣货车/数量等关键词搜索订单"
|
||||||
|
:focus="false"
|
||||||
|
:adjust-position="false"
|
||||||
|
confirm-type="search"
|
||||||
|
@confirm="handleSearch"
|
||||||
|
/>
|
||||||
|
<button class="search-btn" type="primary" @click="handleSearch">搜索</button>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="content-panel">
|
||||||
|
<view class="panel-left">
|
||||||
|
<view class="left-summary">
|
||||||
|
<text class="left-summary-text">待处理:{{ pendingCount }};当前波次:{{ currentWaveCount }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="left-header-actions">
|
||||||
|
<view
|
||||||
|
:class="['header-action-btn', activeLeftAction === 'currentWave' ? 'header-action-btn--active' : '']"
|
||||||
|
@click="handleLeftActionClick('currentWave')"
|
||||||
|
>
|
||||||
|
<text class="header-action-text">当前波次</text>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
:class="['header-action-btn', activeLeftAction === 'settings' ? 'header-action-btn--active' : '']"
|
||||||
|
@click="handleLeftActionClick('settings')"
|
||||||
|
>
|
||||||
|
<text class="header-action-text">设置</text>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
:class="['header-action-btn', activeLeftAction === 'printInfo' ? 'header-action-btn--active' : '']"
|
||||||
|
@click="handleLeftActionClick('printInfo')"
|
||||||
|
>
|
||||||
|
<text class="header-action-text">打印信息</text>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
:class="['header-action-btn', 'header-action-btn--reviewed', activeLeftAction === 'reviewedList' ? 'header-action-btn--active' : '']"
|
||||||
|
@click="handleLeftActionClick('reviewedList')"
|
||||||
|
>
|
||||||
|
<text class="header-action-text">已复核列表</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<scroll-view v-if="activeLeftAction === 'currentWave'" class="left-reviewed-list" scroll-y>
|
||||||
|
<view class="table-wrap table-wrap--current-wave">
|
||||||
|
<view class="table-header">
|
||||||
|
<text class="table-cell cell-pending-order">待处理订单号</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="table-body">
|
||||||
|
<view v-if="displayCurrentWaveOrders.length === 0" class="empty">暂无匹配数据</view>
|
||||||
|
<view
|
||||||
|
v-else
|
||||||
|
v-for="(item, index) in displayCurrentWaveOrders"
|
||||||
|
:key="`${item.pendingOrderNo}-${index}`"
|
||||||
|
class="table-row"
|
||||||
|
>
|
||||||
|
<text class="table-cell cell-pending-order">{{ item.pendingOrderNo }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<view v-if="activeLeftAction === 'currentWave'" class="pagination-bar pagination-bar--left">
|
||||||
|
<text class="pagination-info">
|
||||||
|
第{{ orderPagination.page }}页 / 共{{ orderPagination.totalPages || 1 }}页
|
||||||
|
</text>
|
||||||
|
<view class="pagination-actions">
|
||||||
|
<button class="pagination-btn" :disabled="!orderPagination.hasPrevious" @click="handlePrevPage">上一页</button>
|
||||||
|
<button class="pagination-btn" :disabled="!orderPagination.hasNext" @click="handleNextPage">下一页</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<scroll-view v-else-if="activeLeftAction === 'reviewedList'" class="left-reviewed-list" scroll-y>
|
||||||
|
<view class="table-wrap table-wrap--reviewed">
|
||||||
|
<view class="table-header">
|
||||||
|
<text class="table-cell cell-index">序号</text>
|
||||||
|
<text class="table-cell cell-order-no">订单号</text>
|
||||||
|
<text class="table-cell cell-wave-no">波次号</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="table-body">
|
||||||
|
<view v-if="displayReviewedOrders.length === 0" class="empty">暂无匹配数据</view>
|
||||||
|
<view v-else v-for="(item, index) in displayReviewedOrders" :key="`${item.orderNo}-${index}`" class="table-row">
|
||||||
|
<text class="table-cell cell-index">{{ index + 1 }}</text>
|
||||||
|
<text class="table-cell cell-order-no">{{ item.orderNo }}</text>
|
||||||
|
<text class="table-cell cell-wave-no">{{ item.waveNo }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<view v-else-if="activeLeftAction === 'settings'" class="settings-panel">
|
||||||
|
<view class="settings-row">
|
||||||
|
<text class="settings-label">默认打印机</text>
|
||||||
|
<input class="settings-input" v-model="defaultPrinter" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="settings-row">
|
||||||
|
<text class="settings-label">预出单</text>
|
||||||
|
<view class="settings-switch-wrap">
|
||||||
|
<switch :checked="prePrintEnabled" color="#34c759" @change="handlePrePrintChange" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-for="item in courierPrinters" :key="item.key" class="settings-row">
|
||||||
|
<text class="settings-label">{{ item.label }}</text>
|
||||||
|
<input class="settings-input" v-model="item.value" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<button class="settings-save-btn" type="primary" @click="handleSaveSettings">保存</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="panel-right">
|
||||||
|
<scroll-view class="table-scroll" scroll-x>
|
||||||
|
<view class="table-wrap">
|
||||||
|
<view class="table-header">
|
||||||
|
<text class="table-cell cell-blue-no">蓝号</text>
|
||||||
|
<text class="table-cell cell-qty">数量</text>
|
||||||
|
<text class="table-cell cell-scan">扫描记</text>
|
||||||
|
<text class="table-cell cell-barcode">条码</text>
|
||||||
|
<text class="table-cell cell-name">商品名称</text>
|
||||||
|
<text class="table-cell cell-color">颜色</text>
|
||||||
|
<text class="table-cell cell-spec">规格</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="table-body">
|
||||||
|
<view v-if="displayOrders.length === 0" class="empty">暂无匹配数据</view>
|
||||||
|
<view v-else v-for="order in displayOrders" :key="order.barcode" class="table-row">
|
||||||
|
<text class="table-cell cell-blue-no">{{ order.blueNo }}</text>
|
||||||
|
<text class="table-cell cell-qty">{{ order.quantity }}</text>
|
||||||
|
<text class="table-cell cell-scan">{{ order.scanMark }}</text>
|
||||||
|
<text class="table-cell cell-barcode">{{ order.barcode }}</text>
|
||||||
|
<text class="table-cell cell-name">{{ order.productName }}</text>
|
||||||
|
<text class="table-cell cell-color">{{ order.color }}</text>
|
||||||
|
<text class="table-cell cell-spec">{{ order.spec }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import OrderReviewOne from '@/components/order-review-one/index.vue'
|
import TopNav from '@/components/top-nav.vue'
|
||||||
/**
|
import { fetchOrderList } from '@/api/order'
|
||||||
* 订单相关 HTTP 请使用 `@/api/order`(如 searchOrdersForReview、fetchCurrentWavePendingOrders),
|
|
||||||
* 将 method 与入参与后端对齐后再在组件中调用。
|
|
||||||
*/
|
|
||||||
export default {
|
export default {
|
||||||
name: 'OrderReviewOnePage',
|
name: 'OrderReviewOnePage',
|
||||||
components: {
|
components: {
|
||||||
OrderReviewOne,
|
TopNav,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pendingCount: 134,
|
||||||
|
currentWaveCount: 0,
|
||||||
|
activeLeftAction: 'currentWave',
|
||||||
|
keyword: '',
|
||||||
|
displayOrders: [],
|
||||||
|
displayCurrentWaveOrders: [],
|
||||||
|
displayReviewedOrders: [],
|
||||||
|
orderPagination: {
|
||||||
|
page: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
total: 0,
|
||||||
|
totalPages: 0,
|
||||||
|
hasPrevious: false,
|
||||||
|
hasNext: false,
|
||||||
|
},
|
||||||
|
defaultPrinter: '1',
|
||||||
|
prePrintEnabled: true,
|
||||||
|
courierPrinters: [
|
||||||
|
{ key: 'yt', label: '圆通打印机', value: '1' },
|
||||||
|
{ key: 'st', label: '申通打印机', value: '1' },
|
||||||
|
{ key: 'yd', label: '韵达打印机', value: '1' },
|
||||||
|
{ key: 'zt', label: '中通打印机', value: '1' },
|
||||||
|
{ key: 'yz', label: '邮政小包打印机', value: '1' },
|
||||||
|
],
|
||||||
|
allReviewedOrders: [
|
||||||
|
{ orderNo: 'DD202605190001', waveNo: 'WC001' },
|
||||||
|
{ orderNo: 'DD202605190002', waveNo: 'WC001' },
|
||||||
|
{ orderNo: 'DD202605190003', waveNo: 'WC002' },
|
||||||
|
],
|
||||||
|
allCurrentWaveOrders: [
|
||||||
|
{ pendingOrderNo: 'DD202605190101' },
|
||||||
|
{ pendingOrderNo: 'DD202605190102' },
|
||||||
|
{ pendingOrderNo: 'DD202605190103' },
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.loadOrderList()
|
||||||
|
this.displayCurrentWaveOrders = this.allCurrentWaveOrders
|
||||||
|
this.displayReviewedOrders = this.allReviewedOrders
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleLeftActionClick(action) {
|
||||||
|
this.activeLeftAction = action
|
||||||
|
this.handleSearch()
|
||||||
|
},
|
||||||
|
handlePrePrintChange(event) {
|
||||||
|
this.prePrintEnabled = !!event.detail.value
|
||||||
|
},
|
||||||
|
handleSaveSettings() {
|
||||||
|
uni.showToast({
|
||||||
|
title: '保存成功',
|
||||||
|
icon: 'success',
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getRowValue(row, keys = []) {
|
||||||
|
for (const key of keys) {
|
||||||
|
const value = row?.[key]
|
||||||
|
if (value !== undefined && value !== null && value !== '') {
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
},
|
||||||
|
normalizeOrderRow(row) {
|
||||||
|
return {
|
||||||
|
blueNo: this.getRowValue(row, ['blueNo', 'blue_no', 'lanhao', 'lan_hao']),
|
||||||
|
quantity: this.getRowValue(row, ['quantity', 'qty', 'num']),
|
||||||
|
scanMark: this.getRowValue(row, ['scanMark', 'scan_mark', 'scanStatus', 'scan_status']),
|
||||||
|
barcode: this.getRowValue(row, ['barcode', 'bar_code', 'goods_barcode']),
|
||||||
|
productName: this.getRowValue(row, ['productName', 'product_name', 'goods_name', 'sku_name']),
|
||||||
|
color: this.getRowValue(row, ['color', 'color_name']),
|
||||||
|
spec: this.getRowValue(row, ['spec', 'spec_name', 'size']),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
buildOrderWhere() {
|
||||||
|
const query = this.keyword.trim()
|
||||||
|
if (!query) {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
keyword: {
|
||||||
|
operator: 'like',
|
||||||
|
value: query,
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async loadOrderList(page = 1) {
|
||||||
|
try {
|
||||||
|
const body = await fetchOrderList({
|
||||||
|
pagination: {
|
||||||
|
page,
|
||||||
|
pageSize: this.orderPagination.pageSize,
|
||||||
|
},
|
||||||
|
where: this.buildOrderWhere(),
|
||||||
|
sort: {
|
||||||
|
sortField: 'id',
|
||||||
|
sortOrder: 'desc',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const payload = body?.data || body?.result || body || {}
|
||||||
|
const list = Array.isArray(payload?.list) ? payload.list : []
|
||||||
|
const pagination = payload?.pagination || {}
|
||||||
|
const pendingOrders = list
|
||||||
|
.map((item) => {
|
||||||
|
return {
|
||||||
|
pendingOrderNo: this.getRowValue(item, ['delivery_order_code']),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.filter((item) => !!item.pendingOrderNo)
|
||||||
|
|
||||||
|
this.displayOrders = list.map((item) => this.normalizeOrderRow(item))
|
||||||
|
this.allCurrentWaveOrders = pendingOrders
|
||||||
|
this.displayCurrentWaveOrders = pendingOrders
|
||||||
|
this.orderPagination = {
|
||||||
|
page: Number(pagination.page || page || 1),
|
||||||
|
pageSize: Number(pagination.pageSize || this.orderPagination.pageSize || 20),
|
||||||
|
total: Number(pagination.total || 0),
|
||||||
|
totalPages: Number(pagination.totalPages || 0),
|
||||||
|
hasPrevious: !!pagination.hasPrevious,
|
||||||
|
hasNext: !!pagination.hasNext,
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
this.displayOrders = []
|
||||||
|
uni.showToast({
|
||||||
|
title: '订单加载失败',
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handlePrevPage() {
|
||||||
|
if (!this.orderPagination.hasPrevious) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const targetPage = Math.max(1, Number(this.orderPagination.page || 1) - 1)
|
||||||
|
this.loadOrderList(targetPage)
|
||||||
|
},
|
||||||
|
handleNextPage() {
|
||||||
|
if (!this.orderPagination.hasNext) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const currentPage = Number(this.orderPagination.page || 1)
|
||||||
|
this.loadOrderList(currentPage + 1)
|
||||||
|
},
|
||||||
|
handleSearch() {
|
||||||
|
const query = this.keyword.trim().toLowerCase()
|
||||||
|
|
||||||
|
if (this.activeLeftAction === 'currentWave') {
|
||||||
|
if (!query) {
|
||||||
|
this.displayCurrentWaveOrders = this.allCurrentWaveOrders
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.displayCurrentWaveOrders = this.allCurrentWaveOrders.filter((order) => {
|
||||||
|
return Object.values(order).some((value) => String(value || '').toLowerCase().includes(query))
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.activeLeftAction === 'reviewedList') {
|
||||||
|
if (!query) {
|
||||||
|
this.displayReviewedOrders = this.allReviewedOrders
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.displayReviewedOrders = this.allReviewedOrders.filter((order) => {
|
||||||
|
return Object.values(order).some((value) => String(value || '').toLowerCase().includes(query))
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.loadOrderList(1)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -21,9 +347,308 @@ export default {
|
|||||||
<style>
|
<style>
|
||||||
.page {
|
.page {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 8rpx 32rpx 32rpx;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-main {
|
||||||
|
padding: 8rpx 32rpx 32rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order-review-one {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container--compact-top {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-panel {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-left {
|
||||||
|
width: 700rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-right {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-summary {
|
||||||
|
margin-bottom: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-summary-text {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-header-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
gap: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-reviewed-list {
|
||||||
|
margin-top: 14rpx;
|
||||||
|
max-height: 520rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-panel {
|
||||||
|
margin-top: 14rpx;
|
||||||
|
border: 1rpx solid #e6ebf5;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
padding: 18rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16rpx;
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-row:last-of-type {
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-label {
|
||||||
|
width: 200rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-input {
|
||||||
|
flex: 1;
|
||||||
|
height: 64rpx;
|
||||||
|
border: 1rpx solid #e5e5e5;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
padding: 0 16rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-switch-wrap {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-save-btn {
|
||||||
|
width: 100%;
|
||||||
|
height: 68rpx;
|
||||||
|
line-height: 68rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-action-btn {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 60rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
border: 1rpx solid #d9dde8;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 0 8rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-action-btn--active {
|
||||||
|
background-color: #34c759;
|
||||||
|
border-color: #34c759;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-action-text {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 22rpx;
|
||||||
|
line-height: 1;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-action-btn--active .header-action-text {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-action-btn--reviewed {
|
||||||
|
letter-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16rpx;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-input {
|
||||||
|
flex: 1;
|
||||||
|
height: 72rpx;
|
||||||
|
border: 1rpx solid #e5e5e5;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-btn {
|
||||||
|
width: 160rpx;
|
||||||
|
height: 72rpx;
|
||||||
|
line-height: 72rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-scroll {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination-bar {
|
||||||
|
margin-top: 16rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination-bar--left {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination-info {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination-btn {
|
||||||
|
width: 140rpx;
|
||||||
|
height: 56rpx;
|
||||||
|
line-height: 56rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-wrap {
|
||||||
|
min-width: 980rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-wrap--reviewed {
|
||||||
|
min-width: 620rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-wrap--current-wave {
|
||||||
|
min-width: 620rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-header,
|
||||||
|
.table-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-header {
|
||||||
|
height: 64rpx;
|
||||||
|
border: 1rpx solid #e6ebf5;
|
||||||
|
border-bottom: none;
|
||||||
|
background-color: #f6f8fc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-body {
|
||||||
|
border: 1rpx solid #e6ebf5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-row {
|
||||||
|
min-height: 68rpx;
|
||||||
|
border-top: 1rpx solid #eef2f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-row:first-child {
|
||||||
|
border-top: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-cell {
|
||||||
|
padding: 0 12rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333;
|
||||||
|
line-height: 1.4;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-blue-no {
|
||||||
|
width: 110rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-qty {
|
||||||
|
width: 90rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-scan {
|
||||||
|
width: 110rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-barcode {
|
||||||
|
width: 200rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-name {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 180rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-color {
|
||||||
|
width: 110rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-spec {
|
||||||
|
width: 110rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-index {
|
||||||
|
width: 120rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-order-no {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 280rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-wave-no {
|
||||||
|
width: 180rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-pending-order {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty {
|
||||||
|
text-align: center;
|
||||||
|
color: #999;
|
||||||
|
font-size: 26rpx;
|
||||||
|
padding: 24rpx 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
34
src/pages/returns/index.vue
Normal file
34
src/pages/returns/index.vue
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page">
|
||||||
|
<top-nav />
|
||||||
|
<view class="page-main">
|
||||||
|
<returns-view compact-top />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ReturnsView from '@/views/returns/index.vue'
|
||||||
|
import TopNav from '@/components/top-nav.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ReturnsPage',
|
||||||
|
components: {
|
||||||
|
TopNav,
|
||||||
|
ReturnsView,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.page {
|
||||||
|
min-height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-main {
|
||||||
|
padding: 8rpx 32rpx 32rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
34
src/pages/weighing/index.vue
Normal file
34
src/pages/weighing/index.vue
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page">
|
||||||
|
<top-nav />
|
||||||
|
<view class="page-main">
|
||||||
|
<catch-weight-view compact-top />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import CatchWeightView from '@/views/catch-weight/index.vue'
|
||||||
|
import TopNav from '@/components/top-nav.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'WeighingPage',
|
||||||
|
components: {
|
||||||
|
TopNav,
|
||||||
|
CatchWeightView,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.page {
|
||||||
|
min-height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-main {
|
||||||
|
padding: 8rpx 32rpx 32rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="dynamic-view dynamic-view--order">
|
<view class="dynamic-view dynamic-view--order">
|
||||||
<order-review-one :compact-top="compactTop" />
|
<order-page />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import OrderReviewOne from '@/components/order-review-one/index.vue'
|
import OrderPage from '@/pages/order/index.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'OrderMenuView',
|
name: 'OrderMenuView',
|
||||||
components: {
|
components: {
|
||||||
OrderReviewOne,
|
OrderPage,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
compactTop: {
|
compactTop: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user