app三级后端修改

This commit is contained in:
2025-11-11 12:21:15 +08:00
parent bcf0881bd5
commit eaa59f774f

View File

@@ -1,17 +1,49 @@
<template> <template>
<view class="container"> <view class="container">
<!-- 标题区域 --> <!-- 分条操作区 -->
<view class="page-title">操作类型选择</view> <view class="section-card split-section">
<view class="section-title">
<text class="title-icon"></text>
<text class="title-text">分条操作</text>
</view>
<view class="btn-grid">
<button
v-for='item in splitTypes'
:key="item.dictValue"
@click="handleScan(item.dictValue)"
class="type-btn split-btn">
{{ item.dictLabel }}
</button>
</view>
</view>
<!-- 操作类型按钮区域 --> <!-- 其他操作区 -->
<view class="btn-grid"> <view class="section-card other-section">
<button v-for='item in types' :key="item.dictValue" @click="handleScan(item.dictValue)" class="type-btn"> <view class="section-title">
{{ item.dictLabel }} <text class="title-icon">🔧</text>
</button> <text class="title-text">其他操作</text>
</view>
<view class="btn-grid">
<button
v-for='item in otherTypes'
:key="item.dictValue"
@click="handleScan(item.dictValue)"
class="type-btn other-btn">
{{ item.dictLabel }}
</button>
</view>
</view>
<button class="type-btn" style="background-color: orange;" @click="handleTranfer">移库</button> <!-- 快捷操作区 -->
<view class="section-card quick-section">
<button class="type-btn" style="background-color: greenyellow;" @click="handleShip">发货</button> <view class="section-title">
<text class="title-icon"></text>
<text class="title-text">快捷操作</text>
</view>
<view class="btn-grid quick-grid">
<button class="type-btn move-btn" @click="handleTranfer">移库</button>
<button class="type-btn ship-btn" @click="handleShip">发货</button>
</view>
</view> </view>
<uni-popup ref="tranferPopup" type="bottom"> <uni-popup ref="tranferPopup" type="bottom">
@@ -92,6 +124,22 @@
form: {} form: {}
} }
}, },
computed: {
// 分条操作列表100-199
splitTypes() {
return this.types.filter(item => {
const value = parseInt(item.dictValue);
return value >= 100 && value <= 199;
});
},
// 其他操作列表200-299等
otherTypes() {
return this.types.filter(item => {
const value = parseInt(item.dictValue);
return value < 100 || value > 199;
});
}
},
methods: { methods: {
handleLogout() { handleLogout() {
this.$modal.confirm('确定注销并退出系统吗?').then(() => { this.$modal.confirm('确定注销并退出系统吗?').then(() => {
@@ -182,7 +230,7 @@
scanDevice: this.getDeviceInfo(), scanDevice: this.getDeviceInfo(),
warehouseId: coilData.warehouseId, warehouseId: coilData.warehouseId,
priority: 0, // 默认普通优先级 priority: 0, // 默认普通优先级
remark: `移动端扫码创建 - ${this.getActionTypeName(actionType)}` remark: `移动端扫码创建-${this.getActionTypeName(actionType)}`
}; };
console.log('5. 创建待操作记录,数据:', pendingData); console.log('5. 创建待操作记录,数据:', pendingData);
@@ -532,59 +580,165 @@
<style scoped> <style scoped>
.container { .container {
padding: 20rpx; padding: 15rpx;
min-height: 100vh; min-height: 100vh;
background-color: #f5f7fa; background-color: #f5f7fa;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
padding-bottom: 120rpx;
} }
/* 页面标题 */ /* 页面标题 */
.page-title { .page-title {
font-size: 32rpx; font-size: 30rpx;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
padding: 20rpx 0; padding: 10rpx 0;
margin-bottom: 30rpx; margin-bottom: 15rpx;
text-align: center; text-align: center;
} }
/* 分区卡片 */
.section-card {
width: 100%;
background: #fff;
border-radius: 16rpx;
padding: 20rpx;
margin-bottom: 15rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
}
/* 分区标题 */
.section-title {
display: flex;
align-items: center;
margin-bottom: 12rpx;
padding-bottom: 10rpx;
border-bottom: 2rpx solid #f0f0f0;
}
.title-icon {
font-size: 32rpx;
margin-right: 10rpx;
}
.title-text {
font-size: 28rpx;
font-weight: bold;
color: #333;
}
/* 分条区域特殊样式 */
.split-section {
border-left: 4rpx solid #409eff;
}
.split-section .section-title {
border-bottom-color: #409eff;
}
/* 其他操作区域特殊样式 */
.other-section {
border-left: 4rpx solid #909399;
}
.other-section .section-title {
border-bottom-color: #909399;
}
/* 快捷操作区域特殊样式 */
.quick-section {
border-left: 4rpx solid #67c23a;
}
.quick-section .section-title {
border-bottom-color: #67c23a;
}
/* 按钮网格布局 */ /* 按钮网格布局 */
.btn-grid { .btn-grid {
display: grid; display: grid;
grid-template-columns: 200rpx 200rpx 200rpx; grid-template-columns: repeat(3, 1fr);
/* 固定按钮宽度 */ gap: 15rpx;
grid-template-rows: repeat(4, 1fr);
gap: 40rpx;
/* 按钮间距 */
margin-bottom: 60rpx;
} }
/* 操作类型按钮样式 - 修改后 */ /* 快捷操作区按钮网格 - 两列 */
.quick-grid {
grid-template-columns: repeat(2, 1fr);
gap: 20rpx;
}
.quick-grid .type-btn {
height: 120rpx;
font-size: 28rpx;
}
/* 操作类型按钮样式 - 工业化简洁风格 */
.type-btn { .type-btn {
width: 200rpx; width: 100%;
height: 150rpx; height: 110rpx;
white-space: normal; /* 允许文字换行 */ white-space: normal;
line-height: 1.4; /* 适配换行的行高 */ line-height: 1.4;
padding: 10rpx 0; /* 上下内边距优化 */ padding: 10rpx;
font-size: 30rpx; /* 字体缩小 */ font-size: 26rpx;
color: #333; font-weight: 600;
background-color: #fff; border-radius: 10rpx;
border-radius: 12rpx; border: 2rpx solid transparent;
border: none; box-shadow: none;
box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.05); transition: all 0.2s ease;
transition: all 0.2s ease; text-align: center;
text-align: center; display: flex;
display: flex; align-items: center;
align-items: center; justify-content: center;
justify-content: center;
} }
.type-btn:active { /* 分条按钮样式 - 浅蓝色 */
background-color: #f0f0f0; .split-btn {
box-shadow: 0 2rpx 5rpx rgba(0, 0, 0, 0.1); background-color: #e3f2fd;
transform: scale(0.98); color: #1976d2;
border-color: #1976d2;
}
.split-btn:active {
background-color: #bbdefb;
opacity: 0.9;
}
/* 其他操作按钮样式 - 浅灰色 */
.other-btn {
background-color: #f5f5f5;
color: #606266;
border-color: #909399;
}
.other-btn:active {
background-color: #e0e0e0;
opacity: 0.9;
}
/* 移库按钮 - 黄色 */
.move-btn {
background-color: #fff9e6;
color: #e6a23c;
border-color: #e6a23c;
}
.move-btn:active {
background-color: #fff3cc;
opacity: 0.9;
}
/* 发货按钮 - 绿色 */
.ship-btn {
background-color: #e8f5e9;
color: #67c23a;
border-color: #67c23a;
}
.ship-btn:active {
background-color: #c8e6c9;
opacity: 0.9;
} }
/* 退出登录按钮容器 */ /* 退出登录按钮容器 */
@@ -600,15 +754,15 @@
/* 退出登录按钮样式 */ /* 退出登录按钮样式 */
.logout-btn { .logout-btn {
width: 100%; width: 100%;
height: 90rpx; height: 80rpx;
line-height: 90rpx; line-height: 80rpx;
/* 文字竖直居中 */ /* 文字竖直居中 */
font-size: 30rpx; font-size: 28rpx;
color: #fff; color: #fff;
background-color: #ff4d4f; background-color: #ff4d4f;
border-radius: 16rpx; border-radius: 12rpx;
border: none; border: none;
box-shadow: 0 4rpx 10rpx rgba(255, 77, 79, 0.2); box-shadow: 0 2rpx 8rpx rgba(255, 77, 79, 0.15);
transition: all 0.2s ease; transition: all 0.2s ease;
} }