Compare commits
5 Commits
04c98c664b
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| d54955a450 | |||
| 3f1032713e | |||
|
|
b93d636c8a | ||
| 0e1599809d | |||
| 3953399d90 |
73
apps/hand-factory/api/system/config.js
Normal file
73
apps/hand-factory/api/system/config.js
Normal 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'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ module.exports = {
|
||||
// 应用名称
|
||||
name: "ruoyi-app",
|
||||
// 应用版本
|
||||
version: "1.3.29",
|
||||
version: "1.3.31",
|
||||
// 应用logo
|
||||
logo: "/static/logo.jpg",
|
||||
// 官方网站
|
||||
|
||||
@@ -571,17 +571,17 @@
|
||||
async handleShipSubmit() {
|
||||
try {
|
||||
// 判断钢卷的质量状态,必须是A+, A,A-, B+,B,B-其中之一
|
||||
if (!['A+', 'A', 'A-', 'B+', 'B', 'B-'].includes(this.coilDetail.qualityStatus)
|
||||
&& !(this.coilDetail.qualityStatus == null
|
||||
|| this.coilDetail.qualityStatus == undefined
|
||||
|| this.coilDetail.qualityStatus == '')
|
||||
) {
|
||||
uni.showToast({
|
||||
title: '只能发货B-以上品质的钢卷',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
// if (!['A+', 'A', 'A-', 'B+', 'B', 'B-'].includes(this.coilDetail.qualityStatus)
|
||||
// && !(this.coilDetail.qualityStatus == null
|
||||
// || this.coilDetail.qualityStatus == undefined
|
||||
// || this.coilDetail.qualityStatus == '')
|
||||
// ) {
|
||||
// uni.showToast({
|
||||
// title: '只能发货B-以上品质的钢卷',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// 1. 更新钢卷状态为已发货
|
||||
const res = await exportCoil(this.coilDetail.coilId);
|
||||
|
||||
|
||||
@@ -252,9 +252,6 @@
|
||||
* @param {Boolean} isRefresh 是否刷新(重置页码)
|
||||
*/
|
||||
async fetchList(isRefresh = false) {
|
||||
if (!this.hasMore) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// 刷新时重置页码和加载状态
|
||||
if (isRefresh) {
|
||||
@@ -299,9 +296,6 @@
|
||||
* @param {Boolean} isRefresh 是否刷新(重置页码)
|
||||
*/
|
||||
async fetchDeliveryPlan(isRefresh = false) {
|
||||
if (!this.planHasMore) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (isRefresh) {
|
||||
this.planPageNum = 1;
|
||||
|
||||
@@ -4,31 +4,19 @@
|
||||
<view class="date-time-wrap">
|
||||
<view class="picker-item">
|
||||
<text class="picker-label">餐别:</text>
|
||||
<uni-data-select
|
||||
v-model="queryParams.mealType"
|
||||
:localdata="range"
|
||||
@change="getList"
|
||||
></uni-data-select>
|
||||
<uni-data-select v-model="queryParams.mealType" :localdata="range" @change="getList"></uni-data-select>
|
||||
</view>
|
||||
<!-- 报餐日期选择 -->
|
||||
<view class="picker-item">
|
||||
<text class="picker-label">报餐日期:</text>
|
||||
<uni-datetime-picker
|
||||
v-model="queryParams.reportDate"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
@change="onDateConfirm"
|
||||
class="picker-input"
|
||||
></uni-datetime-picker>
|
||||
<uni-datetime-picker v-model="queryParams.reportDate" type="date" placeholder="选择日期" @change="onDateConfirm"
|
||||
class="picker-input"></uni-datetime-picker>
|
||||
</view>
|
||||
|
||||
<!-- 自定义截止时间选择 -->
|
||||
<view class="picker-item">
|
||||
<text class="picker-label">截止时间:</text>
|
||||
<view
|
||||
class="custom-time-picker"
|
||||
@click="openTimePopup"
|
||||
>
|
||||
<view class="custom-time-picker" @click="openTimePopup">
|
||||
<text class="time-text">{{ formattedDeadlineTime }}</text>
|
||||
<uni-icons type="arrowdown" size="14" color="#999"></uni-icons>
|
||||
</view>
|
||||
@@ -100,37 +88,22 @@
|
||||
<!-- 小时选择 -->
|
||||
<view class="time-unit">
|
||||
<text class="unit-label">时</text>
|
||||
<uni-number-box
|
||||
v-model="timeSelect.hour"
|
||||
:min="0"
|
||||
:max="23"
|
||||
:step="1"
|
||||
@change="handleTimeChange"
|
||||
></uni-number-box>
|
||||
<uni-number-box v-model="timeSelect.hour" :min="0" :max="23" :step="1"
|
||||
@change="handleTimeChange"></uni-number-box>
|
||||
</view>
|
||||
|
||||
<!-- 分钟选择 -->
|
||||
<view class="time-unit">
|
||||
<text class="unit-label">分</text>
|
||||
<uni-number-box
|
||||
v-model="timeSelect.minute"
|
||||
:min="0"
|
||||
:max="59"
|
||||
:step="1"
|
||||
@change="handleTimeChange"
|
||||
></uni-number-box>
|
||||
<uni-number-box v-model="timeSelect.minute" :min="0" :max="59" :step="1"
|
||||
@change="handleTimeChange"></uni-number-box>
|
||||
</view>
|
||||
|
||||
<!-- 秒选择 -->
|
||||
<view class="time-unit">
|
||||
<text class="unit-label">秒</text>
|
||||
<uni-number-box
|
||||
v-model="timeSelect.second"
|
||||
:min="0"
|
||||
:max="59"
|
||||
:step="1"
|
||||
@change="handleTimeChange"
|
||||
></uni-number-box>
|
||||
<uni-number-box v-model="timeSelect.second" :min="0" :max="59" :step="1"
|
||||
@change="handleTimeChange"></uni-number-box>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -139,8 +112,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMealReport } from "@/api/wms/mealReport";
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import {
|
||||
listMealReport
|
||||
} from "@/api/wms/mealReport";
|
||||
import {
|
||||
getDicts
|
||||
} from '@/api/system/dict/data.js'
|
||||
import {
|
||||
getConfigKey
|
||||
} from '@/api/system/config.js'
|
||||
|
||||
export default {
|
||||
name: 'MealReportStatistics',
|
||||
@@ -188,6 +168,7 @@ export default {
|
||||
this.getRangeData();
|
||||
// 加载报餐数据
|
||||
this.getList();
|
||||
this.getDeadlineConfig();
|
||||
},
|
||||
methods: {
|
||||
/** 初始化今日日期为yyyy-MM-dd格式 */
|
||||
@@ -199,6 +180,12 @@ export default {
|
||||
this.queryParams.reportDate = `${year}-${month}-${day}`;
|
||||
},
|
||||
|
||||
getDeadlineConfig() {
|
||||
getConfigKey('hrm.meal.deadline').then(response => {
|
||||
this.queryParams.deadlineTime = response.msg || '16:00:00'
|
||||
})
|
||||
},
|
||||
|
||||
/** 获取餐别字典数据 */
|
||||
getRangeData() {
|
||||
getDicts('hrm_meal_type').then(res => {
|
||||
@@ -224,8 +211,12 @@ export default {
|
||||
|
||||
/** 核心逻辑:区分有效/无效报餐统计 */
|
||||
calcTableSum() {
|
||||
let validDine = 0, validTake = 0, validAll = 0;
|
||||
let invalidDine = 0, invalidTake = 0, invalidAll = 0;
|
||||
let validDine = 0,
|
||||
validTake = 0,
|
||||
validAll = 0;
|
||||
let invalidDine = 0,
|
||||
invalidTake = 0,
|
||||
invalidAll = 0;
|
||||
|
||||
this.list.forEach(item => {
|
||||
// 处理空值,转为数字
|
||||
@@ -288,7 +279,11 @@ export default {
|
||||
openTimePopup() {
|
||||
// 解析当前时间到选择器
|
||||
const [hour, minute, second] = this.deadlineTime.split(':').map(Number);
|
||||
this.timeSelect = { hour, minute, second };
|
||||
this.timeSelect = {
|
||||
hour,
|
||||
minute,
|
||||
second
|
||||
};
|
||||
// 打开弹窗
|
||||
this.$refs.timePopup.open('center');
|
||||
},
|
||||
@@ -341,16 +336,19 @@ export default {
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.picker-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.picker-label {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
.picker-input {
|
||||
flex: 1;
|
||||
}
|
||||
@@ -366,6 +364,7 @@ export default {
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.time-text {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
@@ -378,6 +377,7 @@ export default {
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
@@ -403,10 +403,12 @@ export default {
|
||||
box-sizing: border-box;
|
||||
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),
|
||||
@@ -421,6 +423,7 @@ export default {
|
||||
font-size: 12px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.item-value {
|
||||
display: block;
|
||||
color: #333;
|
||||
@@ -433,6 +436,7 @@ export default {
|
||||
background-color: #fff;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.popup-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -440,25 +444,31 @@ export default {
|
||||
padding: 12px 15px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.popup-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.popup-btns {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
.cancel-btn, .confirm-btn {
|
||||
|
||||
.cancel-btn,
|
||||
.confirm-btn {
|
||||
padding: 6px 12px;
|
||||
font-size: 14px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
background-color: #f5f5f5;
|
||||
color: #666;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
background-color: #007aff;
|
||||
color: #fff;
|
||||
@@ -474,15 +484,18 @@ export default {
|
||||
gap: 10px;
|
||||
padding: 20px 15px;
|
||||
}
|
||||
|
||||
.time-unit {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.unit-label {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.colon {
|
||||
font-size: 20px;
|
||||
color: #333;
|
||||
@@ -494,12 +507,15 @@ export default {
|
||||
.stats-item {
|
||||
padding: 10px 5px;
|
||||
}
|
||||
|
||||
.item-label {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.item-value {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.time-select-wrap {
|
||||
gap: 5px;
|
||||
padding: 15px 10px;
|
||||
|
||||
@@ -73,7 +73,7 @@ function checkStorageSpace() {
|
||||
function checkUpdate(forceCheck = false) {
|
||||
// 1. 准备本地版本信息
|
||||
const localVersion = plus.runtime.version; // 基座版本
|
||||
const staticVersion = '1.3.29'; // 静态默认版本
|
||||
const staticVersion = '1.3.31'; // 静态默认版本
|
||||
// const localWgtVersion = staticVersion;
|
||||
const localWgtVersion = uni.getStorageSync('wgtVersion') || staticVersion; // 本地wgt版本(从存储获取或用默认)
|
||||
const currentVersion = compareVersion(localWgtVersion, localVersion) > 0
|
||||
@@ -155,7 +155,7 @@ function checkUpdate(forceCheck = false) {
|
||||
title: '发现新版本',
|
||||
content: `检测到新版本(${remoteVersion}),是否立即下载并更新?`,
|
||||
confirmText: '立即更新',
|
||||
cancelText: '暂不更新',
|
||||
cancelText: '退出应用',
|
||||
showCancel: true,
|
||||
success: (modalRes) => {
|
||||
if (modalRes.confirm) {
|
||||
@@ -163,6 +163,8 @@ function checkUpdate(forceCheck = false) {
|
||||
handleConfirmUpdate(wgtUrl, remoteVersion);
|
||||
} else {
|
||||
// 直接退出
|
||||
plus.runtime.quit()
|
||||
|
||||
|
||||
// 用户取消更新:询问是否忽略该版本
|
||||
// handleCancelUpdate(remoteVersion);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "klp 1.3.29",
|
||||
"version": "klp 1.3.31",
|
||||
"wgtUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.wgt",
|
||||
"apkUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.apk"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="card-title">{{ item.coilId || '-' }}</div>
|
||||
<div class="card-meta">
|
||||
<span>入场钢卷号:{{ item.enterCoilNo || '-' }}</span>
|
||||
<span>优先级:{{ item.priority ?? '-' }}</span>
|
||||
<span>优先级:{{ item.priority != null ? item.priority : '-' }}</span>
|
||||
</div>
|
||||
<div class="card-meta">
|
||||
<span>来源coilId:{{ item.sourceCoilId || '-' }}</span>
|
||||
|
||||
Reference in New Issue
Block a user