Compare commits

...

3 Commits

Author SHA1 Message Date
砂糖
b93d636c8a feat: 更新应用版本至1.3.30并优化报餐统计功能
新增系统配置API模块
移除列表加载时的多余条件判断
优化报餐统计页面样式和逻辑
2026-04-14 11:18:33 +08:00
0e1599809d Merge remote-tracking branch 'origin/master' 2026-04-13 15:09:45 +08:00
3953399d90 更新2级写入,以及前端处理 2026-04-13 15:06:33 +08:00
7 changed files with 479 additions and 396 deletions

View File

@@ -0,0 +1,73 @@
import request from '@/utils/request'
// 查询参数列表
export function listConfig(query) {
return request({
url: '/system/config/list',
method: 'get',
params: query
})
}
// 查询参数详细
export function getConfig(configId) {
return request({
url: '/system/config/' + configId,
method: 'get'
})
}
// 根据参数键名查询参数值
export function getConfigKey(configKey) {
return request({
url: '/system/config/configKey/' + configKey,
method: 'get'
})
}
// 新增参数配置
export function addConfig(data) {
return request({
url: '/system/config',
method: 'post',
data: data
})
}
// 修改参数配置
export function updateConfig(data) {
return request({
url: '/system/config',
method: 'put',
data: data
})
}
// 修改参数配置
export function updateConfigByKey(key, value) {
return request({
url: '/system/config/updateByKey',
method: 'put',
data: {
configKey: key,
configValue: value
}
})
}
// 删除参数配置
export function delConfig(configId) {
return request({
url: '/system/config/' + configId,
method: 'delete'
})
}
// 刷新参数缓存
export function refreshCache() {
return request({
url: '/system/config/refreshCache',
method: 'delete'
})
}

View File

@@ -9,7 +9,7 @@ module.exports = {
// 应用名称 // 应用名称
name: "ruoyi-app", name: "ruoyi-app",
// 应用版本 // 应用版本
version: "1.3.29", version: "1.3.30",
// 应用logo // 应用logo
logo: "/static/logo.jpg", logo: "/static/logo.jpg",
// 官方网站 // 官方网站

View File

@@ -252,9 +252,6 @@
* @param {Boolean} isRefresh 是否刷新(重置页码) * @param {Boolean} isRefresh 是否刷新(重置页码)
*/ */
async fetchList(isRefresh = false) { async fetchList(isRefresh = false) {
if (!this.hasMore) {
return;
}
try { try {
// 刷新时重置页码和加载状态 // 刷新时重置页码和加载状态
if (isRefresh) { if (isRefresh) {
@@ -299,9 +296,6 @@
* @param {Boolean} isRefresh 是否刷新(重置页码) * @param {Boolean} isRefresh 是否刷新(重置页码)
*/ */
async fetchDeliveryPlan(isRefresh = false) { async fetchDeliveryPlan(isRefresh = false) {
if (!this.planHasMore) {
return;
}
try { try {
if (isRefresh) { if (isRefresh) {
this.planPageNum = 1; this.planPageNum = 1;

View File

@@ -4,31 +4,19 @@
<view class="date-time-wrap"> <view class="date-time-wrap">
<view class="picker-item"> <view class="picker-item">
<text class="picker-label">餐别</text> <text class="picker-label">餐别</text>
<uni-data-select <uni-data-select v-model="queryParams.mealType" :localdata="range" @change="getList"></uni-data-select>
v-model="queryParams.mealType"
:localdata="range"
@change="getList"
></uni-data-select>
</view> </view>
<!-- 报餐日期选择 --> <!-- 报餐日期选择 -->
<view class="picker-item"> <view class="picker-item">
<text class="picker-label">报餐日期</text> <text class="picker-label">报餐日期</text>
<uni-datetime-picker <uni-datetime-picker v-model="queryParams.reportDate" type="date" placeholder="选择日期" @change="onDateConfirm"
v-model="queryParams.reportDate" class="picker-input"></uni-datetime-picker>
type="date"
placeholder="选择日期"
@change="onDateConfirm"
class="picker-input"
></uni-datetime-picker>
</view> </view>
<!-- 自定义截止时间选择 --> <!-- 自定义截止时间选择 -->
<view class="picker-item"> <view class="picker-item">
<text class="picker-label">截止时间</text> <text class="picker-label">截止时间</text>
<view <view class="custom-time-picker" @click="openTimePopup">
class="custom-time-picker"
@click="openTimePopup"
>
<text class="time-text">{{ formattedDeadlineTime }}</text> <text class="time-text">{{ formattedDeadlineTime }}</text>
<uni-icons type="arrowdown" size="14" color="#999"></uni-icons> <uni-icons type="arrowdown" size="14" color="#999"></uni-icons>
</view> </view>
@@ -100,37 +88,22 @@
<!-- 小时选择 --> <!-- 小时选择 -->
<view class="time-unit"> <view class="time-unit">
<text class="unit-label"></text> <text class="unit-label"></text>
<uni-number-box <uni-number-box v-model="timeSelect.hour" :min="0" :max="23" :step="1"
v-model="timeSelect.hour" @change="handleTimeChange"></uni-number-box>
:min="0"
:max="23"
:step="1"
@change="handleTimeChange"
></uni-number-box>
</view> </view>
<!-- 分钟选择 --> <!-- 分钟选择 -->
<view class="time-unit"> <view class="time-unit">
<text class="unit-label"></text> <text class="unit-label"></text>
<uni-number-box <uni-number-box v-model="timeSelect.minute" :min="0" :max="59" :step="1"
v-model="timeSelect.minute" @change="handleTimeChange"></uni-number-box>
:min="0"
:max="59"
:step="1"
@change="handleTimeChange"
></uni-number-box>
</view> </view>
<!-- 秒选择 --> <!-- 秒选择 -->
<view class="time-unit"> <view class="time-unit">
<text class="unit-label"></text> <text class="unit-label"></text>
<uni-number-box <uni-number-box v-model="timeSelect.second" :min="0" :max="59" :step="1"
v-model="timeSelect.second" @change="handleTimeChange"></uni-number-box>
:min="0"
:max="59"
:step="1"
@change="handleTimeChange"
></uni-number-box>
</view> </view>
</view> </view>
</view> </view>
@@ -139,10 +112,17 @@
</template> </template>
<script> <script>
import { listMealReport } from "@/api/wms/mealReport"; import {
import { getDicts } from '@/api/system/dict/data.js' listMealReport
} from "@/api/wms/mealReport";
import {
getDicts
} from '@/api/system/dict/data.js'
import {
getConfigKey
} from '@/api/system/config.js'
export default { export default {
name: 'MealReportStatistics', name: 'MealReportStatistics',
data() { data() {
return { return {
@@ -188,6 +168,7 @@ export default {
this.getRangeData(); this.getRangeData();
// 加载报餐数据 // 加载报餐数据
this.getList(); this.getList();
this.getDeadlineConfig();
}, },
methods: { methods: {
/** 初始化今日日期为yyyy-MM-dd格式 */ /** 初始化今日日期为yyyy-MM-dd格式 */
@@ -199,6 +180,12 @@ export default {
this.queryParams.reportDate = `${year}-${month}-${day}`; this.queryParams.reportDate = `${year}-${month}-${day}`;
}, },
getDeadlineConfig() {
getConfigKey('hrm.meal.deadline').then(response => {
this.queryParams.deadlineTime = response.msg || '16:00:00'
})
},
/** 获取餐别字典数据 */ /** 获取餐别字典数据 */
getRangeData() { getRangeData() {
getDicts('hrm_meal_type').then(res => { getDicts('hrm_meal_type').then(res => {
@@ -224,8 +211,12 @@ export default {
/** 核心逻辑:区分有效/无效报餐统计 */ /** 核心逻辑:区分有效/无效报餐统计 */
calcTableSum() { calcTableSum() {
let validDine = 0, validTake = 0, validAll = 0; let validDine = 0,
let invalidDine = 0, invalidTake = 0, invalidAll = 0; validTake = 0,
validAll = 0;
let invalidDine = 0,
invalidTake = 0,
invalidAll = 0;
this.list.forEach(item => { this.list.forEach(item => {
// 处理空值,转为数字 // 处理空值,转为数字
@@ -288,7 +279,11 @@ export default {
openTimePopup() { openTimePopup() {
// 解析当前时间到选择器 // 解析当前时间到选择器
const [hour, minute, second] = this.deadlineTime.split(':').map(Number); const [hour, minute, second] = this.deadlineTime.split(':').map(Number);
this.timeSelect = { hour, minute, second }; this.timeSelect = {
hour,
minute,
second
};
// 打开弹窗 // 打开弹窗
this.$refs.timePopup.open('center'); this.$refs.timePopup.open('center');
}, },
@@ -320,19 +315,19 @@ export default {
this.closeTimePopup(); this.closeTimePopup();
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
/* 容器样式 */ /* 容器样式 */
.meal-report-container { .meal-report-container {
padding: 15px; padding: 15px;
background-color: #f5f5f5; background-color: #f5f5f5;
min-height: 100vh; min-height: 100vh;
} }
/* 日期时间选择区域 */ /* 日期时间选择区域 */
.date-time-wrap { .date-time-wrap {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10px; gap: 10px;
@@ -340,23 +335,26 @@ export default {
background-color: #fff; background-color: #fff;
padding: 15px; padding: 15px;
border-radius: 8px; border-radius: 8px;
} }
.picker-item {
.picker-item {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
} }
.picker-label {
.picker-label {
font-size: 14px; font-size: 14px;
color: #333; color: #333;
min-width: 80px; min-width: 80px;
} }
.picker-input {
flex: 1;
}
/* 自定义时间选择器样式 */ .picker-input {
.custom-time-picker { flex: 1;
}
/* 自定义时间选择器样式 */
.custom-time-picker {
flex: 1; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -365,144 +363,162 @@ export default {
border: 1px solid #eee; border: 1px solid #eee;
border-radius: 4px; border-radius: 4px;
background-color: #fff; background-color: #fff;
} }
.time-text {
.time-text {
font-size: 14px; font-size: 14px;
color: #333; color: #333;
} }
/* 统计卡片样式 */ /* 统计卡片样式 */
.statistics-card { .statistics-card {
background-color: #fff; background-color: #fff;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,0.05); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
} }
.card-title {
.card-title {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
color: #333; color: #333;
padding: 12px 15px; padding: 12px 15px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
/* 网格布局3列 */ /* 网格布局3列 */
.stats-grid { .stats-grid {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
border: 1px solid #eee; border: 1px solid #eee;
border-top: none; border-top: none;
} }
/* 统计项样式 */ /* 统计项样式 */
.stats-item { .stats-item {
padding: 12px 8px; padding: 12px 8px;
text-align: center; text-align: center;
border-right: 1px solid #eee; border-right: 1px solid #eee;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
box-sizing: border-box; box-sizing: border-box;
font-size: 14px; font-size: 14px;
} }
/* 去掉最后一列右边框 */
.stats-grid .stats-item:nth-child(3n) {
border-right: none;
}
/* 去掉最后一行下边框 */
.stats-grid .stats-item:last-child,
.stats-grid .stats-item:nth-last-child(2),
.stats-grid .stats-item:nth-last-child(3) {
border-bottom: none;
}
/* 标签和值样式 */ /* 去掉最后一列右边框 */
.item-label { .stats-grid .stats-item:nth-child(3n) {
border-right: none;
}
/* 去掉最后一行下边框 */
.stats-grid .stats-item:last-child,
.stats-grid .stats-item:nth-last-child(2),
.stats-grid .stats-item:nth-last-child(3) {
border-bottom: none;
}
/* 标签和值样式 */
.item-label {
display: block; display: block;
color: #666; color: #666;
font-size: 12px; font-size: 12px;
margin-bottom: 4px; margin-bottom: 4px;
} }
.item-value {
.item-value {
display: block; display: block;
color: #333; color: #333;
font-size: 15px; font-size: 15px;
font-weight: 500; font-weight: 500;
} }
/* 时间弹窗样式 */ /* 时间弹窗样式 */
.time-popup-content { .time-popup-content {
background-color: #fff; background-color: #fff;
padding-bottom: 20px; padding-bottom: 20px;
} }
.popup-header {
.popup-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 12px 15px; padding: 12px 15px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
.popup-title {
.popup-title {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
color: #333; color: #333;
} }
.popup-btns {
.popup-btns {
display: flex; display: flex;
gap: 10px; gap: 10px;
} }
.cancel-btn, .confirm-btn {
.cancel-btn,
.confirm-btn {
padding: 6px 12px; padding: 6px 12px;
font-size: 14px; font-size: 14px;
border-radius: 4px; border-radius: 4px;
} }
.cancel-btn {
.cancel-btn {
background-color: #f5f5f5; background-color: #f5f5f5;
color: #666; color: #666;
border: 1px solid #eee; border: 1px solid #eee;
} }
.confirm-btn {
.confirm-btn {
background-color: #007aff; background-color: #007aff;
color: #fff; color: #fff;
border: none; border: none;
} }
/* 时分秒选择区域 */ /* 时分秒选择区域 */
.time-select-wrap { .time-select-wrap {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 10px; gap: 10px;
padding: 20px 15px; padding: 20px 15px;
} }
.time-unit {
.time-unit {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
} }
.unit-label {
.unit-label {
font-size: 12px; font-size: 12px;
color: #999; color: #999;
} }
.colon {
.colon {
font-size: 20px; font-size: 20px;
color: #333; color: #333;
margin: 0 5px; margin: 0 5px;
} }
/* 适配小屏手机 */ /* 适配小屏手机 */
@media (max-width: 375px) { @media (max-width: 375px) {
.stats-item { .stats-item {
padding: 10px 5px; padding: 10px 5px;
} }
.item-label { .item-label {
font-size: 11px; font-size: 11px;
} }
.item-value { .item-value {
font-size: 14px; font-size: 14px;
} }
.time-select-wrap { .time-select-wrap {
gap: 5px; gap: 5px;
padding: 15px 10px; padding: 15px 10px;
} }
} }
</style> </style>

View File

@@ -73,7 +73,7 @@ function checkStorageSpace() {
function checkUpdate(forceCheck = false) { function checkUpdate(forceCheck = false) {
// 1. 准备本地版本信息 // 1. 准备本地版本信息
const localVersion = plus.runtime.version; // 基座版本 const localVersion = plus.runtime.version; // 基座版本
const staticVersion = '1.3.29'; // 静态默认版本 const staticVersion = '1.3.30'; // 静态默认版本
// const localWgtVersion = staticVersion; // const localWgtVersion = staticVersion;
const localWgtVersion = uni.getStorageSync('wgtVersion') || staticVersion; // 本地wgt版本从存储获取或用默认 const localWgtVersion = uni.getStorageSync('wgtVersion') || staticVersion; // 本地wgt版本从存储获取或用默认
const currentVersion = compareVersion(localWgtVersion, localVersion) > 0 const currentVersion = compareVersion(localWgtVersion, localVersion) > 0

View File

@@ -1,5 +1,5 @@
{ {
"version": "klp 1.3.29", "version": "klp 1.3.30",
"wgtUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.wgt", "wgtUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.wgt",
"apkUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.apk" "apkUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.apk"
} }

View File

@@ -19,7 +19,7 @@
<div class="card-title">{{ item.coilId || '-' }}</div> <div class="card-title">{{ item.coilId || '-' }}</div>
<div class="card-meta"> <div class="card-meta">
<span>入场钢卷号{{ item.enterCoilNo || '-' }}</span> <span>入场钢卷号{{ item.enterCoilNo || '-' }}</span>
<span>优先级{{ item.priority ?? '-' }}</span> <span>优先级{{ item.priority != null ? item.priority : '-' }}</span>
</div> </div>
<div class="card-meta"> <div class="card-meta">
<span>来源coilId{{ item.sourceCoilId || '-' }}</span> <span>来源coilId{{ item.sourceCoilId || '-' }}</span>