Compare commits

...

11 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
砂糖
04c98c664b Merge branch 'master' of http://49.232.154.205:10100/liujingchao/klp-mono 2026-03-28 18:02:08 +08:00
砂糖
9fab0ade4d feat(发货): 新增发货功能模块及相关页面
- 添加发货功能页面及API接口
- 更新tabbar图标和路由配置
- 修改物料信息展示逻辑
- 优化页面跳转和权限控制
- 更新应用版本至1.3.29
2026-03-28 18:02:04 +08:00
cafa0a9a6c 二级更新计划新增软推荐,计划录入和实绩内容添加入场钢卷号信息 2026-03-20 14:36:23 +08:00
砂糖
3afed26d7f chore: 更新应用版本号至1.3.28 2026-03-11 17:12:09 +08:00
砂糖
a23a4645dc fix(wms): 修复日期解析问题并添加导出功能
修复日期解析函数中的变量名冲突和空值处理问题,同时在新增和修改操作中添加日期格式化处理。新增钢卷待操作导出功能。
2026-03-11 17:11:11 +08:00
砂糖
0902be0135 feat(报餐): 新增报餐功能模块并更新版本号至1.3.27
- 添加报餐页面及相关API接口
- 实现报餐统计功能,包括有效/无效报餐人数计算
- 新增自定义时间选择器组件
- 更新应用版本号至1.3.27
- 调整角色权限控制,新增食堂角色权限配置
2026-03-07 17:31:46 +08:00
砂糖
ac55c9a4d1 feat(search): 添加分页功能并更新版本号至1.3.26
在搜索页面添加分页控件,包括上一页/下一页按钮和分页信息显示
更新应用版本号至1.3.26,涉及config.js、manifest.json等文件
2026-03-06 13:56:02 +08:00
砂糖
2f47047ae6 feat: 更新应用版本至1.3.25并优化功能
- 更新config.js、manifest.json等文件中的版本号至1.3.25
- 在editby.vue页面添加品名、规格等钢卷信息展示
- 调整easycode.vue中otherTypes的过滤条件
- 修改klp-header.vue中的镀锌机组名称
- 更新update.js中的静态版本号
2026-01-27 09:45:06 +08:00
31 changed files with 2042 additions and 210 deletions

View File

@@ -6,7 +6,8 @@
export default {
onLaunch: function() {
this.initApp()
updateManager.checkUpdate();
updateManager.checkUpdate();
plus.navigator.closeSplashscreen()
},
methods: {
// 初始化应用
@@ -17,14 +18,7 @@
//#ifdef H5
this.checkLogin()
//#endif
// uni.hideTabBar()
},
// mounted() {
// uni.hideTabBar()
// },
// onShow() {
// uni.hideTabBar()
// },
initConfig() {
this.globalData.config = config
},

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

@@ -0,0 +1,52 @@
import request from '@/utils/request'
// 查询发货单主列表
export function listDeliveryWaybill(query) {
return request({
url: '/wms/deliveryWaybill/list',
method: 'get',
params: query
})
}
// 查询发货单主详细
export function getDeliveryWaybill(waybillId) {
return request({
url: '/wms/deliveryWaybill/' + waybillId,
method: 'get'
})
}
// 新增发货单主
export function addDeliveryWaybill(data) {
return request({
url: '/wms/deliveryWaybill',
method: 'post',
data: data
})
}
// 修改发货单主
export function updateDeliveryWaybill(data) {
return request({
url: '/wms/deliveryWaybill',
method: 'put',
data: data
})
}
// 删除发货单主
export function delDeliveryWaybill(waybillId) {
return request({
url: '/wms/deliveryWaybill/' + waybillId,
method: 'delete'
})
}
export function updateDeliveryWaybillStatus(data) {
return request({
url: '/wms/deliveryWaybill/status',
method: 'put',
data: data
})
}

View File

@@ -0,0 +1,62 @@
import request from '@/utils/request'
// 查询发货单明细列表
export function listDeliveryWaybillDetail(query) {
return request({
url: '/wms/deliveryWaybillDetail/list',
method: 'get',
params: query
})
}
// 查询发货单明细详细
export function getDeliveryWaybillDetail(detailId) {
return request({
url: '/wms/deliveryWaybillDetail/' + detailId,
method: 'get'
})
}
// 新增发货单明细
export function addDeliveryWaybillDetail(data) {
return request({
url: '/wms/deliveryWaybillDetail',
method: 'post',
data: data
})
}
// 修改发货单明细
export function updateDeliveryWaybillDetail(data) {
return request({
url: '/wms/deliveryWaybillDetail',
method: 'put',
data: data
})
}
// 删除发货单明细
export function delDeliveryWaybillDetail(detailId) {
return request({
url: '/wms/deliveryWaybillDetail/' + detailId,
method: 'delete'
})
}
// 批量新增发货单明细
export function batchAddDeliveryWaybillDetail(data) {
return request({
url: '/wms/deliveryWaybillDetail/batch',
method: 'post',
data: data
})
}
// 查询已绑定发货的钢卷列表
export function listBoundCoil(query) {
return request({
url: '/wms/deliveryWaybillDetail/boundCoilList',
method: 'get',
params: query
})
}

View File

@@ -0,0 +1,72 @@
import request from '@/utils/request'
// 查询部门报餐主列表
export function listMealReport(query) {
return request({
url: '/wms/mealReport/list',
method: 'get',
params: query
})
}
// 查询部门报餐主详细
export function getMealReport(reportId) {
return request({
url: '/wms/mealReport/' + reportId,
method: 'get'
})
}
// 新增部门报餐主
export function addMealReport(data) {
return request({
url: '/wms/mealReport',
method: 'post',
data: data
})
}
// 修改部门报餐主
export function updateMealReport(data) {
return request({
url: '/wms/mealReport',
method: 'put',
data: data
})
}
// 删除部门报餐主
export function delMealReport(reportId) {
return request({
url: '/wms/mealReport/' + reportId,
method: 'delete'
})
}
// 报表相关接口
// 按餐别统计
export function getMealTypeCount(query) {
return request({
url: '/wms/mealReport/report/mealType',
method: 'get',
params: query
})
}
// 按部门统计
export function getDeptCount(query) {
return request({
url: '/wms/mealReport/report/dept',
method: 'get',
params: query
})
}
// 按日期统计
export function getDateCount(query) {
return request({
url: '/wms/mealReport/report/date',
method: 'get',
params: query
})
}

View File

@@ -1,5 +1,23 @@
import request from '@/utils/request'
function parseDate(date) {
// 修复1参数名和内部变量名冲突改用tempDate
// 修复2如果传入的date为空/无效,默认使用当前时间
const tempDate = date ? new Date(date) : new Date();
// 获取年、月、日、时、分、秒(补零处理,确保是两位数)
const year = tempDate.getFullYear();
// 月份从0开始所以要+1不足两位补0
const month = String(tempDate.getMonth() + 1).padStart(2, '0');
const day = String(tempDate.getDate()).padStart(2, '0');
const hours = String(tempDate.getHours()).padStart(2, '0');
const minutes = String(tempDate.getMinutes()).padStart(2, '0');
const seconds = String(tempDate.getSeconds()).padStart(2, '0');
// 格式化为YYYY-mm-dd HH:mm:ss并返回
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
// 查询钢卷待操作列表
export function listPendingAction(query) {
return request({
@@ -19,19 +37,33 @@ export function getPendingAction(actionId) {
// 新增钢卷待操作
export function addPendingAction(data) {
const payload = { ...data }
if (payload.processTime) {
payload.processTime = parseDate(payload.processTime)
}
if (payload.completeTime) {
payload.completeTime = parseDate(payload.completeTime)
}
return request({
url: '/wms/coilPendingAction',
method: 'post',
data: data
data: payload
})
}
// 修改钢卷待操作
export function updatePendingAction(data) {
const payload = { ...data }
if (payload.processTime) {
payload.processTime = parseDate(payload.processTime)
}
if (payload.completeTime) {
payload.completeTime = parseDate(payload.completeTime)
}
return request({
url: '/wms/coilPendingAction',
method: 'put',
data: data
data: payload
})
}
@@ -75,3 +107,12 @@ export function cancelAction(actionId) {
})
}
// 导出钢卷待操作
export function exportPendingAction(query) {
return request({
url: '/wms/coilPendingAction/export',
method: 'post',
params: query
})
}

View File

@@ -38,7 +38,7 @@ export default {
lineList: [
{ name: "科伦普重工-酸轧机组", key: "acidity" },
// { name: "科伦普重工-彩涂机组", key: "paint" },
{ name: "科伦普重工-镀锌线一组", key: "zinc1" },
{ name: "科伦普重工-镀锌组", key: "zinc1" },
// { name: "科伦普重工-镀锌线二组", key: "zinc2" },
// { name: "科伦普重工-镀锌线三组", key: "zinc3" },
],

View File

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

View File

@@ -2,7 +2,7 @@
"name" : "科伦普",
"appid" : "__UNI__E781B49",
"description" : "",
"versionName" : "1.3.24",
"versionName" : "1.3.28",
"versionCode" : 1,
"transformPx" : false,
"app-plus" : {

View File

@@ -88,59 +88,19 @@
"style": {
"navigationBarTitleText": "钢卷查询"
}
},
{
"path": "pages/meal/meal",
"style": {
"navigationBarTitleText": "报餐情况"
}
},
{
"path": "pages/fahuo/fahuo",
"style": {
"navigationBarTitleText": "发货"
}
}
// {
// "path": "pages/register",
// "style": {
// "navigationBarTitleText": "注册"
// }
// }, {
// "path": "pages/work/index",
// "style": {
// "navigationBarTitleText": "工作台"
// }
// },
// {
// "path": "pages/mine/avatar/index",
// "style": {
// "navigationBarTitleText": "修改头像"
// }
// }, {
// "path": "pages/mine/info/edit",
// "style": {
// "navigationBarTitleText": "编辑资料"
// }
// }, {
// "path": "pages/mine/pwd/index",
// "style": {
// "navigationBarTitleText": "修改密码"
// }
// }, {
// "path": "pages/mine/setting/index",
// "style": {
// "navigationBarTitleText": "应用设置"
// }
// }, {
// "path": "pages/mine/help/index",
// "style": {
// "navigationBarTitleText": "常见问题"
// }
// }, {
// "path": "pages/mine/about/index",
// "style": {
// "navigationBarTitleText": "关于我们"
// }
// }, {
// "path": "pages/common/webview/index",
// "style": {
// "navigationBarTitleText": "浏览网页"
// }
// }, {
// "path": "pages/common/textview/index",
// "style": {
// "navigationBarTitleText": "浏览文本"
// }
// },
],
"globalStyle": {
"navigationBarTextStyle": "black",
@@ -156,29 +116,35 @@
"selectedIconPath": "/static/images/tabbar/home_.png",
"iconPath": "/static/images/tabbar/home.png"
},
// {
// "text": "扫码",
// "pagePath": "pages/code/code",
// "selectedIconPath": "/static/images/tabbar/work_.png",
// "iconPath": "/static/images/tabbar/work.png"
// },
{
"text": "扫码",
"pagePath": "pages/easycode/easycode",
"selectedIconPath": "/static/images/tabbar/work_.png",
"iconPath": "/static/images/tabbar/work.png"
},
// {
// "text": "收货",
// "pagePath": "pages/receive/receive",
// "selectedIconPath": "/static/images/tabbar/receive_.png",
// "iconPath": "/static/images/tabbar/receive.png"
// },
// {
// "text": "查找",
// "pagePath": "pages/search/search",
// "selectedIconPath": "/static/images/tabbar/search_.png",
// "iconPath": "/static/images/tabbar/search.png"
// },
{
"text": "收货",
"pagePath": "pages/receive/receive",
"selectedIconPath": "/static/images/tabbar/receive_.png",
"iconPath": "/static/images/tabbar/receive.png"
"text": "报餐",
"pagePath": "pages/meal/meal",
"selectedIconPath": "/static/images/tabbar/meal_.png",
"iconPath": "/static/images/tabbar/meal.png"
},
{
"text": "查找",
"pagePath": "pages/search/search",
"selectedIconPath": "/static/images/tabbar/search_.png",
"iconPath": "/static/images/tabbar/search.png"
"text": "发货",
"pagePath": "pages/fahuo/fahuo",
"selectedIconPath": "/static/images/tabbar/fahuo_.png",
"iconPath": "/static/images/tabbar/fahuo.png"
},
{
"text": "我的",
@@ -196,4 +162,5 @@
"k-(.*)": "@/components/klp-ui/k-$1/k-$1.vue"
}
}
}

View File

@@ -137,19 +137,19 @@
</view>
<view class="info-item">
<text class="item-label">厂家</text>
<text class="item-value">{{ (coilDetail.product && coilDetail.product.manufacturer) || (coilDetail.rawMaterial && coilDetail.rawMaterial.manufacturer) || '-' }}</text>
<text class="item-value">{{ (coilDetail.manufacturer) || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">材质</text>
<text class="item-value">{{ (coilDetail.product && coilDetail.product.material) || (coilDetail.rawMaterial && coilDetail.rawMaterial.material) || '-' }}</text>
<text class="item-value">{{ (coilDetail.material) || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">规格</text>
<text class="item-value">{{ (coilDetail.product && coilDetail.product.specification) || (coilDetail.rawMaterial && coilDetail.rawMaterial.specification) || '-' }}</text>
<text class="item-value">{{ (coilDetail.specification) || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">品名</text>
<text class="item-value">{{ (coilDetail.product && coilDetail.product.productName) || (coilDetail.rawMaterial && coilDetail.rawMaterial.productName) || '-' }}</text>
<text class="item-value">{{ (coilDetail.itemName) || '-' }}</text>
</view>
</view>
</view>
@@ -229,7 +229,7 @@
otherTypes() {
return this.types.filter(item => {
const value = parseInt(item.dictValue);
return value < 100 || value > 199;
return value < 100 || (value > 199 && value < 400);
});
}
},
@@ -847,6 +847,7 @@
},
mounted() {
getDicts('action_type').then(res => {
console.log(res.data)
this.types = res.data
})
}

View File

@@ -1,6 +1,22 @@
<template>
<view class="typing-container">
<view class="info-grid">
<view class="info-item">
<text class="item-label">品名</text>
<text class="item-value">{{ coilDetail.itemName }}</text>
</view>
<view class="info-item">
<text class="item-label">规格</text>
<text class="item-value">{{ coilDetail.itemSpecification }}</text>
</view>
<view class="info-item">
<text class="item-label">材质</text>
<text class="item-value">{{ coilDetail.itemMaterial }}</text>
</view>
<view class="info-item">
<text class="item-label">厂家</text>
<text class="item-value">{{ coilDetail.itemManufacturer }}</text>
</view>
<view class="info-item">
<text class="item-label">入场钢卷号</text>
<text class="item-value">{{ coilDetail.enterCoilNo || '-' }}</text>
@@ -93,7 +109,8 @@
data() {
return {
form: {},
coilDetail: {},
coilDetail: {
},
loading: false,
}
},
@@ -107,8 +124,14 @@
fetchCoil(coilId) {
getMaterialCoil(coilId).then(res => {
this.form = res.data;
this.coilDetail = res.data;
console.log(this.form, '钢卷信息')
this.coilDetail = {
...res.data,
itemName: res.data.itemName,
itemSpecification: res.data.specification,
itemManufacturer: res.data.manufacturer,
itemMaterial: res.data.material
};
console.log('钢卷信息', this.form, )
})
},
// 获取设备信息(原有方法不变)

View File

@@ -0,0 +1,792 @@
<template>
<view class="container">
<!-- 筛选栏 -->
<view class="filter-bar">
<!-- 左侧发货计划选择 -->
<view class="plan-select" @click="openPlanPopup">
<uni-icons type="shop" size="20" color="#666"></uni-icons>
<text class="plan-text">{{ currentPlan.planNo || '选择发货单据' }}</text>
<uni-icons type="arrowright" size="16" color="#999"></uni-icons>
</view>
</view>
<!-- 发货计划选择悬浮窗 -->
<uni-popup ref="planPopup" type="bottom" :mask-click="true" height="70%">
<view class="popup-container">
<!-- 弹窗头部 -->
<view class="popup-header">
<text class="popup-title">选择发货单据</text>
<uni-icons type="close" size="20" @click="closePlanPopup"></uni-icons>
</view>
<!-- 计划筛选输入框 -->
<view class="plan-search">
<input v-model="planKeyword" placeholder="请输入发货单号筛选" clearable class="plan-search-input"
@confirm="fetchDeliveryPlan"></input>
<uni-icons type="search" size="18" color="#666" @click="fetchDeliveryPlan(true)"></uni-icons>
</view>
<!-- 发货计划列表 -->
<scroll-view class="detail-scroll" scroll-y>
<view class="form-card">
<uni-list v-if="planList.length">
<uni-list-item v-for="(item, index) in planList" :key="index"
:title="item.waybillName + '-' + item.consigneeUnit"
:note="item.licensePlate + '(' + item.principal + ')'"
clickable
@click="selectPlan(item)"></uni-list-item>
</uni-list>
<view class="empty-tip" v-else>暂无发货计划数据</view>
</view>
<!-- 加载更多 -->
<uni-load-more :status="planHasMore ? 'more' : 'noMore'" @clickLoadMore="fetchDeliveryPlan(false)"
v-if="planList.length"></uni-load-more>
</scroll-view>
</view>
</uni-popup>
<uni-popup ref='viewPopup' type="bottom" :mask-click="true" height="70%">
<view class="popup-container">
<!-- 弹窗头部标题+关闭按钮 -->
<view class="popup-header">
<text class="popup-title">钢卷详情信息</text>
<uni-icons type="close" size="20" @click="closeViewPopup"></uni-icons>
</view>
<!-- 详情内容区域滚动布局适配多内容 -->
<scroll-view class="detail-scroll" scroll-y>
<view class="form-card" v-if="form.coilId">
<!-- 基础信息网格 -->
<view class="info-grid">
<view class="info-item">
<text class="item-label">入场钢卷号</text>
<text class="item-value">{{ form.enterCoilNo || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">钢卷号</text>
<text class="item-value">{{ form.currentCoilNo || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">班组</text>
<text class="item-value">{{ form.team || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">数据类型</text>
<text
class="item-value">{{ form.dataType === 0 ? '默认数据' : form.dataType === 10 ? '待发货数据' : '-' }}</text>
</view>
<view class="info-item full-width">
<text class="item-label">逻辑库位</text>
<text class="item-value">{{ form.warehouseName || '-' }}</text>
</view>
<view class="info-item full-width">
<text class="item-label">实际库位</text>
<text class="item-value">{{ form.actualWarehouseName || '-' }}</text>
</view>
</view>
<!-- 物料信息 -->
<view class="card-title" style="margin-top: 30rpx;">
<text class="title-dot"></text>
<text class="title-text">物料信息</text>
</view>
<view class="info-grid">
<view class="info-item">
<text class="item-label">物品名称</text>
<text class="item-value">{{ form.itemName || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">规格</text>
<text class="item-value">{{ form.specification || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">材质</text>
<text class="item-value">{{ form.material || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">厂家</text>
<text class="item-value">{{ form.manufacturer || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">表面处理</text>
<text class="item-value">{{ form.surfaceTreatmentDesc || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">镀层质量</text>
<text class="item-value">{{ form.zincLayer || '-' }}</text>
</view>
</view>
<!-- 重量信息 -->
<view class="card-title" style="margin-top: 30rpx;">
<text class="title-dot"></text>
<text class="title-text">数据信息</text>
</view>
<view class="info-grid">
<view class="info-item">
<text class="item-label">毛重</text>
<text class="item-value">{{ form.grossWeight || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">净重</text>
<text class="item-value">{{ form.netWeight || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">长度m</text>
<text class="item-value">{{ form.length || '-' }}</text>
</view>
</view>
<!-- 操作信息 -->
<view class="card-title" style="margin-top: 30rpx;">
<text class="title-dot"></text>
<text class="title-text">操作信息</text>
</view>
<view class="info-grid">
<view class="info-item">
<text class="item-label">操作人</text>
<text class="item-value">{{ operatorName }}</text>
</view>
<view class="info-item">
<text class="item-label">更新时间</text>
<text class="item-value">{{ currentAction.updateTime || '-' }}</text>
</view>
<view class="info-item full-width">
<text class="item-label">操作状态</text>
<text
class="item-value">{{ currentAction.actionStatus === 0 ? '未开始' : currentAction.actionStatus === 2 ? '已完成' : '-' }}</text>
</view>
</view>
</view>
<!-- 空数据提示 -->
<view class="empty-tip" v-else>
暂无钢卷详情数据
</view>
</scroll-view>
</view>
</uni-popup>
<!-- 主列表区域 -->
<view class="main-list">
<scroll-view class="list-scroll" scroll-y>
<uni-list v-if="list.length">
<uni-list-item v-for="(item, index) in list" :key="index" @click=""
:title="`钢卷号:${item.coilNo || '-'}`" :note="`操作时间:${item.updateTime || '-'}`">
<template v-slot:footer>
<button style="margin-right: 10rpx;" size="mini" type="primary" plain="true" @click="openViewPopup(item)">查看</button>
</template>
</uni-list-item>
</uni-list>
<view class="empty-tip" v-else>暂无待操作数据</view>
<!-- 加载更多 -->
<uni-load-more :status="hasMore ? 'more' : 'noMore'" @clickLoadMore="fetchList(false)"
v-if="list.length"></uni-load-more>
</scroll-view>
</view>
</view>
</template>
<script>
import {
listDeliveryWaybill
} from '@/api/wms/deliveryWaybill.js'
import {
listDeliveryPlan
} from '@/api/wms/deliveryPlan.js';
import {
listDeliveryWaybillDetail
} from '@/api/wms/deliveryWaybillDetail.js'
import {
updateMaterialCoilSimple,
getMaterialCoil
} from '@/api/wms/coil.js'
// 入库操作编码
const ACTION_TYPE = 401;
// 发货计划类型编码
const RECEIVE_PLAN_TYPE = 2;
// 未开始操作状态
const ACTION_STATUS = 0;
export default {
data() {
return {
// 主列表数据
list: [],
currentPlan: {}, // 当前选中的发货计划
currentCoilNo: undefined, // 当前输入的钢卷号
hasMore: true, // 是否有更多主列表数据
pageNum: 1, // 主列表页码
pageSize: 10, // 每页条数
refreshing: false, // 下拉刷新状态
// 发货计划弹窗相关
planKeyword: '', // 计划筛选关键词
planList: [], // 发货计划列表
planHasMore: true, // 计划列表是否有更多
planPageNum: 1, // 计划列表页码
popupShow: false, // 弹窗显示状态
form: {},
loading: false,
currentAction: {},
loadingDetail: false,
};
},
computed: {
// 获取当前操作者昵称
operatorName() {
return this.$store.state.user.nickName || this.$store.state.user.name || '未知'
}
},
onShow() {
// 页面显示时初始化加载数据
this.fetchList(true);
},
methods: {
/**
* 获取待操作列表数据
* @param {Boolean} isRefresh 是否刷新(重置页码)
*/
async fetchList(isRefresh = false) {
try {
// 刷新时重置页码和加载状态
if (isRefresh) {
this.pageNum = 1;
this.refreshing = true;
}
// 构造请求参数
const params = {
pageNum: this.pageNum,
waybillId: this.currentPlan.waybillId,
pageSize: this.pageSize
};
// 请求接口
const res = await listDeliveryWaybillDetail(params);
if (res.code === 200) {
const list = res.rows || [];
// 刷新时替换数据,加载更多时追加数据
this.list = isRefresh ? list : [...this.list, ...list];
// 判断是否有更多数据
this.hasMore = this.pageNum * this.pageSize < res.total;
}
console.log(this.list, '需要渲染的数据')
} catch (err) {
console.error('获取待操作列表失败:', err);
uni.showToast({
title: '数据加载失败',
icon: 'none'
});
} finally {
// 结束下拉刷新状态
this.refreshing = false;
// 加载更多时页码+1
if (!isRefresh) this.pageNum++;
}
},
/**
* 获取发货计划列表
* @param {Boolean} isRefresh 是否刷新(重置页码)
*/
async fetchDeliveryPlan(isRefresh = false) {
try {
if (isRefresh) {
this.planPageNum = 1;
}
// 构造请求参数
const params = {
waybillName: this.planKeyword || '', // 计划编号筛选
pageNum: this.planPageNum,
pageSize: this.pageSize,
};
const res = await listDeliveryWaybill(params);
if (res.code === 200) {
const list = res.rows || [];
this.planList = isRefresh ? list : [...this.planList, ...list];
this.planHasMore = this.planPageNum * this.pageSize < res.total;
}
} catch (err) {
console.error('获取发货单据失败:', err);
uni.showToast({
title: '计划加载失败',
icon: 'none'
});
} finally {
if (!isRefresh) this.planPageNum++;
}
},
/**
* 打开发货计划弹窗
*/
openPlanPopup() {
this.$refs.planPopup.open();
// 打开弹窗时加载计划数据
this.fetchDeliveryPlan(true);
},
/**
* 关闭发货计划弹窗
*/
closePlanPopup() {
this.$refs.planPopup.close();
},
/**
* 打开发货弹窗
*/
openReceivePopup(row) {
this.$refs.receivePopup.open('bottom')
// this.loadingDetail = false;
uni.showLoading({
title: '正在加载发货详情'
})
getMaterialCoil(row.coilId).then(res => {
this.form = res.data;
this.currentAction = row;
// this.loadingDetail = true
uni.hideLoading()
})
},
openViewPopup(row) {
this.$refs.viewPopup.open('bottom')
// this.loadingDetail = false;
uni.showLoading({
title: '正在加载发货详情'
})
getMaterialCoil(row.coilId).then(res => {
console.log(res.data)
this.form = res.data;
this.currentAction = row;
uni.hideLoading()
// this.loadingDetail = true
})
},
/**
* 关闭钢卷详情弹窗
*/
closeViewPopup() {
this.$refs.viewPopup.close();
// 可选:清空表单临时数据(根据业务需求决定是否保留)
this.form = {};
this.currentAction = {};
},
/**
* 确认发货
*/
confirmReceive(row) {
const currentAction = this.currentAction;
const form = this.form;
const that = this;
uni.showModal({
title: '确定要发货吗?',
success() {
// console.log(currentAction, form)
that.loading = true;
Promise.all([
updatePendingAction({
...currentAction,
actionStatus: 2
}),
updateMaterialCoilSimple({
...form,
dataType: 1
})
]).then(_ => {
uni.showToast({
title: '钢卷已发货'
});
that.fetchList(true);
that.loading = false;
that.$refs.receivePopup.close()
})
}
})
},
/**
* 选择发货计划
* @param {Object} plan 选中的计划对象
*/
selectPlan(plan) {
this.currentPlan = plan;
this.closePlanPopup();
// 选择计划后重新加载主列表
this.fetchList(true);
},
/**
* 下拉刷新触发(修正后事件可正常绑定)
*/
onPullDownRefresh() {
this.fetchList(true);
},
/**
* 页面上拉加载(可选:补充页面级上拉加载)
*/
onReachBottom() {
if (this.hasMore) {
this.fetchList(false);
}
}
},
// 补充页面级上拉加载钩子(可选,增强体验)
onReachBottom() {
this.onReachBottom();
}
};
</script>
<style scoped lang="scss">
.container {
width: 100%;
height: 100vh;
background-color: #f5f5f5;
display: flex;
flex-direction: column;
}
/* 筛选栏样式 */
.filter-bar {
display: flex;
align-items: center;
padding: 10rpx 20rpx;
background-color: #fff;
border-bottom: 1px solid #eee;
}
.plan-select {
display: flex;
align-items: center;
gap: 8rpx;
padding: 10rpx 15rpx;
background-color: #f8f8f8;
border-radius: 6rpx;
margin-right: 20rpx;
min-width: 200rpx;
}
.plan-text {
font-size: 28rpx;
color: #333;
flex: 1;
}
.coil-filter {
display: flex;
align-items: center;
flex: 1;
background-color: #f8f8f8;
border-radius: 6rpx;
padding: 0 15rpx;
}
.coil-input {
flex: 1;
font-size: 28rpx;
}
/* 弹窗样式 */
.popup-container {
width: 100%;
height: 100%;
background-color: #fff;
display: flex;
flex-direction: column;
}
.popup-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx;
border-bottom: 1px solid #eee;
}
.popup-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.plan-search {
display: flex;
align-items: center;
gap: 10rpx;
padding: 15rpx 20rpx;
border-bottom: 1px solid #eee;
}
.plan-search-input {
flex: 1;
font-size: 28rpx;
}
// .plan-list {
// flex: 1;
// overflow-y: auto;
// padding: 10rpx;
// }
/* 列表样式 */
.main-list {
flex: 1;
overflow: hidden;
}
.list-scroll {
width: 100%;
height: 100%;
}
.uni-list {
background-color: #fff;
margin: 10rpx;
border-radius: 8rpx;
}
.uni-list-item {
font-size: 28rpx;
}
/* 空数据提示 */
.empty-tip {
text-align: center;
padding: 50rpx 0;
font-size: 28rpx;
color: #999;
}
/* 加载更多样式 */
.uni-load-more {
margin: 20rpx 0;
}
.form-card {
background: #fff;
border-radius: 16rpx;
padding: 30rpx;
overflow: scroll;
height: 70vh;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
}
.card-title {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 25rpx;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #f0f0f0;
.title-dot {
width: 8rpx;
height: 28rpx;
background: #007aff;
border-radius: 4rpx;
margin-right: 12rpx;
}
.title-text {
flex: 1;
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.status-badge {
font-size: 22rpx;
padding: 4rpx 12rpx;
border-radius: 12rpx;
margin-right: 10rpx;
&.status-1 {
background: #d1f2eb;
color: #0c6957;
}
&.status-0 {
background: #f8d7da;
color: #721c24;
}
}
.more-btn {
display: flex;
align-items: center;
gap: 8rpx;
padding: 8rpx 16rpx;
background: #f0f7ff;
border-radius: 20rpx;
border: 1rpx solid #007aff;
.icon-more {
font-size: 24rpx;
color: #007aff;
}
.more-text {
font-size: 24rpx;
color: #007aff;
}
}
}
/* 信息网格 */
.info-grid {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
.info-item {
flex: 1;
min-width: 45%;
background: #f8f9fa;
padding: 20rpx;
border-radius: 12rpx;
&.full-width {
flex: 0 0 100%;
}
.item-label {
display: block;
font-size: 24rpx;
color: #999;
margin-bottom: 10rpx;
}
.item-value {
display: block;
font-size: 28rpx;
color: #333;
font-weight: 500;
}
}
}
/* 表单项 */
.form-item {
margin-bottom: 30rpx;
&:last-of-type {
margin-bottom: 0;
}
.form-label {
display: block;
font-size: 28rpx;
color: #333;
margin-bottom: 15rpx;
font-weight: 500;
&::before {
content: '*';
color: #ff4d4f;
margin-right: 6rpx;
}
}
.form-label-optional {
display: block;
font-size: 28rpx;
color: #333;
margin-bottom: 15rpx;
font-weight: 500;
}
.form-input {
width: 100%;
height: 88rpx;
padding: 0 24rpx;
background: #f8f9fa;
border: 2rpx solid #e8e8e8;
border-radius: 12rpx;
font-size: 28rpx;
color: #333;
box-sizing: border-box;
transition: all 0.3s;
&:focus {
background: #fff;
border-color: #007aff;
}
&.form-input-disabled {
background: #f5f5f5;
color: #999;
cursor: not-allowed;
}
}
}
/* 操作者信息 */
.operator-info {
display: flex;
align-items: center;
justify-content: center;
padding: 20rpx 0;
margin-top: 20rpx;
.operator-label {
font-size: 26rpx;
color: #999;
}
.operator-name {
font-size: 26rpx;
color: #007aff;
font-weight: 500;
}
}
/* 操作按钮 */
.action-buttons {
display: flex;
gap: 20rpx;
margin-top: 30rpx;
.btn {
flex: 1;
height: 88rpx;
border-radius: 12rpx;
font-size: 30rpx;
font-weight: 500;
border: none;
transition: all 0.2s;
&:active {
transform: scale(0.98);
}
&[disabled] {
opacity: 0.6;
}
}
.btn-secondary {
background: #f5f5f5;
color: #666;
}
.btn-primary {
background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
color: #fff;
box-shadow: 0 4rpx 16rpx rgba(0, 122, 255, 0.3);
}
}
</style>

View File

@@ -1,11 +1,17 @@
<template>
<div></div>
</template>
<script>
export default {
data() {
return {
hasJumped: false // 防止重复跳转的标记
tabVisible: {
admin: [true, true, false, true, true],
canteen: [false, false, true, false, true],
worker: [false, true, false, true, true]
},
hasJumped: false, // 防止重复跳转的标记
}
},
onShow() {
@@ -25,10 +31,13 @@ export default {
const roles = res.data.roles;
if (roles.includes('admin')) {
uni.setTabBarItem({
index: 0,
visible: true
});
for (let i = 0; i < this.tabVisible.admin.length; i++) {
const v = this.tabVisible.admin[i]
uni.setTabBarItem({
index: i,
visible: v
});
}
// 管理员角色跳转
uni.switchTab({
url: '/pages/line/line',
@@ -44,14 +53,40 @@ export default {
});
}
});
} else if (roles.includes('canteen')) {
for (let i = 0; i < this.tabVisible.canteen.length; i++) {
const v = this.tabVisible.canteen[i]
uni.setTabBarItem({
index: i,
visible: v
});
}
// 食堂角色跳转
uni.switchTab({
url: '/pages/meal/meal',
success: () => {
this.hasJumped = true; // 标记已跳转
},
fail: (err) => {
console.error('管理员页面跳转失败:', err);
uni.showToast({
title: '跳转产线页面失败',
icon: 'none',
duration: 2000
});
}
});
} else if (roles.includes('worker')) {
// 工人角色跳转
// 设置tab内容
// 设置产线和复杂扫码不可见
uni.setTabBarItem({
index: 0,
visible: false
});
for (let i = 0; i < this.tabVisible.worker.length; i++) {
const v = this.tabVisible.worker[i]
uni.setTabBarItem({
index: i,
visible: v
});
}
uni.switchTab({
url: '/pages/easycode/easycode',
success: () => {
@@ -67,16 +102,13 @@ export default {
}
});
} else {
// 处理未定义角色(默认角色)
uni.showToast({
title: '检测到未知角色,将跳转至默认页面',
icon: 'none',
duration: 2000
});
uni.setTabBarItem({
index: 0,
visible: false
});
for (let i = 0; i < this.tabVisible.worker.length; i++) {
const v = this.tabVisible.worker[i]
uni.setTabBarItem({
index: i,
visible: v
});
}
// 延迟跳转,确保提示被用户看到
setTimeout(() => {
uni.switchTab({

View File

@@ -24,15 +24,6 @@
<view class="action-btn">
<button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button>
</view>
<!-- <view class="reg text-center" v-if="register">
<text class="text-grey1">没有账号</text>
<text @click="handleUserRegister" class="text-blue">立即注册</text>
</view> -->
<!-- <view class="xieyi text-center">
<text class="text-grey1">登录即代表同意</text>
<text @click="handleUserAgrement" class="text-blue">用户协议</text>
<text @click="handlePrivacy" class="text-blue">隐私协议</text>
</view> -->
</view>
</view>

View File

@@ -0,0 +1,524 @@
<template>
<view class="meal-report-container">
<!-- 日期和时间选择区域 -->
<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>
</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>
</view>
<!-- 自定义截止时间选择 -->
<view class="picker-item">
<text class="picker-label">截止时间</text>
<view class="custom-time-picker" @click="openTimePopup">
<text class="time-text">{{ formattedDeadlineTime }}</text>
<uni-icons type="arrowdown" size="14" color="#999"></uni-icons>
</view>
</view>
</view>
<!-- 报餐统计卡片 -->
<view class="statistics-card">
<view class="card-title">报餐人数统计</view>
<view class="stats-grid">
<!-- 第一行 -->
<view class="stats-item">
<text class="item-label">堂食人数</text>
<text class="item-value">{{ validDineIn + invalidDineIn }}</text>
</view>
<view class="stats-item">
<text class="item-label">打包人数</text>
<text class="item-value">{{ validTakeout + invalidTakeout }}</text>
</view>
<view class="stats-item">
<text class="item-label">总人数</text>
<text class="item-value">{{ validTotal + invalidTotal }}</text>
</view>
<!-- 第二行 -->
<view class="stats-item">
<text class="item-label">有效堂食人数</text>
<text class="item-value">{{ validDineIn }}</text>
</view>
<view class="stats-item">
<text class="item-label">有效打包人数</text>
<text class="item-value">{{ validTakeout }}</text>
</view>
<view class="stats-item">
<text class="item-label">有效总人数</text>
<text class="item-value">{{ validTotal }}</text>
</view>
<!-- 第三行 -->
<view class="stats-item">
<text class="item-label">无效堂食人数</text>
<text class="item-value">{{ invalidDineIn }}</text>
</view>
<view class="stats-item">
<text class="item-label">无效打包人数</text>
<text class="item-value">{{ invalidTakeout }}</text>
</view>
<view class="stats-item">
<text class="item-label">无效总人数</text>
<text class="item-value">{{ invalidTotal }}</text>
</view>
</view>
</view>
<!-- 自定义时分秒选择弹窗 -->
<uni-popup ref="timePopup" type="bottom" border-radius="10px 10px 0 0">
<view class="time-popup-content">
<!-- 弹窗标题 -->
<view class="popup-header">
<text class="popup-title">选择截止时间</text>
<view class="popup-btns">
<button class="cancel-btn" @click="closeTimePopup">取消</button>
<button class="confirm-btn" @click="confirmTime">确认</button>
</view>
</view>
<!-- 时分秒选择区域 -->
<view class="time-select-wrap">
<!-- 小时选择 -->
<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>
</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>
</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>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
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',
data() {
return {
queryParams: {
mealType: '',
reportDate: '',
pageSize: 9999,
pageNum: 1
},
deadlineDate: '', // 截止日期
deadlineTime: '12:00:00', // 截止时间(原始值)
// 时分秒选择器临时变量
timeSelect: {
hour: 12,
minute: 0,
second: 0
},
list: [],
loading: false,
// 统计数据
validDineIn: 0,
validTakeout: 0,
validTotal: 0,
invalidDineIn: 0,
invalidTakeout: 0,
invalidTotal: 0,
range: []
}
},
computed: {
// 格式化截止时间显示(补零)
formattedDeadlineTime() {
const [hour, minute, second] = this.deadlineTime.split(':');
return `${hour.padStart(2, '0')}:${minute.padStart(2, '0')}:${second.padStart(2, '0')}`;
}
},
onLoad() {
// 初始化今日日期
this.initTodayDate();
// 初始化截止日期为今日
this.deadlineDate = this.queryParams.reportDate;
// 获取餐别字典数据
this.getRangeData();
// 加载报餐数据
this.getList();
this.getDeadlineConfig();
},
methods: {
/** 初始化今日日期为yyyy-MM-dd格式 */
initTodayDate() {
const today = new Date();
const year = today.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, '0');
const day = String(today.getDate()).padStart(2, '0');
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 => {
this.range = res.data.map(item => ({
text: item.dictLabel,
value: item.dictValue
}));
});
},
/** 查询部门报餐列表 */
getList() {
this.loading = true;
listMealReport(this.queryParams).then(response => {
this.list = response.rows || [];
this.loading = false;
this.calcTableSum();
}).catch(error => {
console.error('获取报餐数据失败:', error);
this.loading = false;
});
},
/** 核心逻辑:区分有效/无效报餐统计 */
calcTableSum() {
let validDine = 0,
validTake = 0,
validAll = 0;
let invalidDine = 0,
invalidTake = 0,
invalidAll = 0;
this.list.forEach(item => {
// 处理空值,转为数字
const dine = item.dineInPeople ? Number(item.dineInPeople) : 0;
const take = item.takeoutPeople ? Number(item.takeoutPeople) : 0;
const total = item.totalPeople ? Number(item.totalPeople) : 0;
// 判断当前报餐是否有效
if (this.isValidMealReport(item.createTime)) {
validDine += dine;
validTake += take;
validAll += total;
} else {
invalidDine += dine;
invalidTake += take;
invalidAll += total;
}
});
// 赋值到统计变量
this.validDineIn = validDine;
this.validTakeout = validTake;
this.validTotal = validAll;
this.invalidDineIn = invalidDine;
this.invalidTakeout = invalidTake;
this.invalidTotal = invalidAll;
},
/** 判断报餐是否有效:创建时间在截止时间之前则有效 */
isValidMealReport(createTime) {
if (!createTime) return false;
// 拼接完整的截止时间字符串
const deadlineDateTime = `${this.deadlineDate || this.queryParams.reportDate} ${this.deadlineTime}`;
// 比较时间
const createTimeObj = new Date(createTime);
const deadlineTimeObj = new Date(deadlineDateTime);
return createTimeObj <= deadlineTimeObj;
},
/** 报餐日期选择确认 */
onDateConfirm(e) {
this.queryParams.reportDate = e;
// 如果截止日期未选择,同步为报餐日期
if (!this.deadlineDate) {
this.deadlineDate = e;
}
this.getList();
},
/** 截止日期选择确认 */
onDeadlineDateConfirm(e) {
this.deadlineDate = e;
this.calcTableSum();
},
// ===== 自定义时间选择器逻辑 =====
/** 打开时间选择弹窗 */
openTimePopup() {
// 解析当前时间到选择器
const [hour, minute, second] = this.deadlineTime.split(':').map(Number);
this.timeSelect = {
hour,
minute,
second
};
// 打开弹窗
this.$refs.timePopup.open('center');
},
/** 关闭时间选择弹窗 */
closeTimePopup() {
this.$refs.timePopup.close();
},
/** 处理时分秒数值变化 */
handleTimeChange() {
// 确保数值在合法范围内
this.timeSelect.hour = Math.max(0, Math.min(23, this.timeSelect.hour));
this.timeSelect.minute = Math.max(0, Math.min(59, this.timeSelect.minute));
this.timeSelect.second = Math.max(0, Math.min(59, this.timeSelect.second));
},
/** 确认选择的时间 */
confirmTime() {
// 格式化时分秒(补零)
const hour = String(this.timeSelect.hour).padStart(2, '0');
const minute = String(this.timeSelect.minute).padStart(2, '0');
const second = String(this.timeSelect.second).padStart(2, '0');
// 更新截止时间
this.deadlineTime = `${hour}:${minute}:${second}`;
// 重新计算统计数据
this.calcTableSum();
// 关闭弹窗
this.closeTimePopup();
}
}
}
</script>
<style scoped>
/* 容器样式 */
.meal-report-container {
padding: 15px;
background-color: #f5f5f5;
min-height: 100vh;
}
/* 日期时间选择区域 */
.date-time-wrap {
display: flex;
flex-direction: column;
gap: 10px;
margin-bottom: 20px;
background-color: #fff;
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;
}
/* 自定义时间选择器样式 */
.custom-time-picker {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 10px;
border: 1px solid #eee;
border-radius: 4px;
background-color: #fff;
}
.time-text {
font-size: 14px;
color: #333;
}
/* 统计卡片样式 */
.statistics-card {
background-color: #fff;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.card-title {
font-size: 16px;
font-weight: 600;
color: #333;
padding: 12px 15px;
border-bottom: 1px solid #eee;
}
/* 网格布局3列 */
.stats-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
border: 1px solid #eee;
border-top: none;
}
/* 统计项样式 */
.stats-item {
padding: 12px 8px;
text-align: center;
border-right: 1px solid #eee;
border-bottom: 1px solid #eee;
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),
.stats-grid .stats-item:nth-last-child(3) {
border-bottom: none;
}
/* 标签和值样式 */
.item-label {
display: block;
color: #666;
font-size: 12px;
margin-bottom: 4px;
}
.item-value {
display: block;
color: #333;
font-size: 15px;
font-weight: 500;
}
/* 时间弹窗样式 */
.time-popup-content {
background-color: #fff;
padding-bottom: 20px;
}
.popup-header {
display: flex;
justify-content: space-between;
align-items: center;
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 {
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;
border: none;
}
/* 时分秒选择区域 */
.time-select-wrap {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
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;
margin: 0 5px;
}
/* 适配小屏手机 */
@media (max-width: 375px) {
.stats-item {
padding: 10px 5px;
}
.item-label {
font-size: 11px;
}
.item-value {
font-size: 14px;
}
.time-select-wrap {
gap: 5px;
padding: 15px 10px;
}
}
</style>

View File

@@ -25,57 +25,20 @@
</view>
</view>
<!-- <view class="content-section">
<view class="mine-actions grid col-4 text-center">
<view class="action-item" @click="handleJiaoLiuQun">
<view class="iconfont icon-friendfill text-pink icon"></view>
<text class="text">交流群</text>
</view>
<view class="action-item" @click="handleBuilding">
<view class="iconfont icon-service text-blue icon"></view>
<text class="text">在线客服</text>
</view>
<view class="action-item" @click="handleBuilding">
<view class="iconfont icon-community text-mauve icon"></view>
<text class="text">反馈社区</text>
</view>
<view class="action-item" @click="handleBuilding">
<view class="iconfont icon-dianzan text-green icon"></view>
<text class="text">点赞我们</text>
</view>
</view> -->
<view class="menu-list">
<view class="list-cell list-cell-arrow" @click="handleToSearch">
<view class="menu-item-box">
<view class="iconfont icon-setting menu-icon"></view>
<view>钢卷查找</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleLogout">
<view class="menu-item-box">
<view class="iconfont icon-setting menu-icon"></view>
<view>退出登录</view>
</view>
</view>
<!-- <view class="list-cell list-cell-arrow" @click="handleToEditInfo">
<view class="menu-item-box">
<view class="iconfont icon-user menu-icon"></view>
<view>编辑资料</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleHelp">
<view class="menu-item-box">
<view class="iconfont icon-help menu-icon"></view>
<view>常见问题</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleAbout">
<view class="menu-item-box">
<view class="iconfont icon-aixin menu-icon"></view>
<view>关于我们</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleToSetting">
<view class="menu-item-box">
<view class="iconfont icon-setting menu-icon"></view>
<view>应用设置</view>
</view>
</view> -->
</view>
</view>
@@ -98,8 +61,8 @@
}
},
methods: {
handleToInfo() {
this.$tab.navigateTo('/pages/mine/info/index')
handleToSearch() {
this.$tab.navigateTo('/pages/search/search')
},
handleLogout() {
this.$modal.confirm('确定注销并退出系统吗?').then(() => {
@@ -108,30 +71,7 @@
})
})
},
handleToEditInfo() {
this.$tab.navigateTo('/pages/mine/info/edit')
},
handleToSetting() {
this.$tab.navigateTo('/pages/mine/setting/index')
},
handleToLogin() {
this.$tab.reLaunch('/pages/login')
},
handleToAvatar() {
this.$tab.navigateTo('/pages/mine/avatar/index')
},
handleHelp() {
this.$tab.navigateTo('/pages/mine/help/index')
},
handleAbout() {
this.$tab.navigateTo('/pages/mine/about/index')
},
handleJiaoLiuQun() {
this.$modal.showToast('QQ群①133713780(满)、②146013835(满)、③189091635')
},
handleBuilding() {
this.$modal.showToast('模块建设中~')
}
}
}
</script>

View File

@@ -166,33 +166,29 @@
<text class="title-text">物料信息</text>
</view>
<view class="info-grid">
<!-- <view class="info-item">
<text class="item-label">物品类型</text>
<text class="item-value">{{ form.itemType || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">物品ID</text>
<text class="item-value">{{ form.itemId || '-' }}</text>
</view>
<view class="info-item full-width">
<text class="item-label">物料名称</text>
<text class="item-value">{{ form.itemName || '-' }}</text>
</view> -->
<view class="info-item">
<text class="item-label">物品名称</text>
<text class="item-value">{{ form.rawMaterial.rawMaterialName || form.product.productName || '-' }}</text>
<text class="item-value">{{ form.itemName || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">规格</text>
<text class="item-value">{{ form.rawMaterial.specification || form.product.specification || '-' }}</text>
<text class="item-value">{{ form.specification || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">材质</text>
<text class="item-value">{{ form.rawMaterial.material || form.product.material || '-' }}</text>
<text class="item-value">{{ form.material || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">厂家</text>
<text class="item-value">{{ form.rawMaterial.manufacturer || form.product.manufacturer || '-' }}</text>
<text class="item-value">{{ form.manufacturer || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">表面处理</text>
<text class="item-value">{{ form.surfaceTreatmentDesc || '-' }}</text>
</view>
<view class="info-item">
<text class="item-label">镀层质量</text>
<text class="item-value">{{ form.zincLayer || '-' }}</text>
</view>
</view>

View File

@@ -105,6 +105,30 @@
<view class="empty-list" v-else>
<text>暂无符合条件的钢卷数据</text>
</view>
<!-- 分页控件 -->
<view class="pagination" v-if="total > 0">
<view class="pagination-info">
<text> {{ total }} / {{ totalPages }} </text>
<text>当前第 {{ pager.pageNum }} </text>
</view>
<view class="pagination-btns">
<button
class="page-btn"
@click="prevPage"
:disabled="pager.pageNum <= 1"
>
上一页
</button>
<button
class="page-btn"
@click="nextPage"
:disabled="pager.pageNum >= totalPages"
>
下一页
</button>
</view>
</view>
</view>
<!-- 钢卷详情弹窗 -->
@@ -214,14 +238,26 @@
itemManufacturer: '',
grossWeight: '',
netWeight: '',
length: ''
length: '',
},
pager: {
pageNum: 1,
pageSize: 20,
},
total: 0,
coilDetail: {}, // 钢卷详情数据
list: [], // 钢卷列表数据
loading: false,
currentView: 'search' // 视图切换search=查询页list=列表页
}
},
computed: {
// 计算总页数
totalPages() {
if (this.total === 0) return 0;
return Math.ceil(this.total / this.pager.pageSize);
}
},
methods: {
// ✅ 新增封装通用滚动到顶部方法uniapp全端兼容
scrollToPageTop() {
@@ -244,22 +280,26 @@
// 查询钢卷列表(原有方法优化+✅新增滚动到顶部)
async searchCoilList() {
// 重置页码为1
this.pager.pageNum = 1;
uni.showLoading({
title: '正在查询,请稍后'
});
try {
const res = await listMaterialCoil({
...this.form,
pageNum: 1,
pageSize: 20,
...this.pager,
selectType: this.form.itemType
});
this.list = res.rows || [];
this.total = res.total || 0;
console.log(this.list)
this.currentView = 'list'
// ✅ 切换视图后,滚动到页面顶部
this.scrollToPageTop()
} catch {
} catch (err) {
console.error('查询钢卷列表失败:', err);
uni.showToast({
title: '查询失败,检查网络后重试',
icon: 'none',
@@ -270,6 +310,46 @@
}
},
// 上一页
async prevPage() {
if (this.pager.pageNum <= 1) return;
this.pager.pageNum -= 1;
await this.loadPageData();
},
// 下一页
async nextPage() {
if (this.pager.pageNum >= this.totalPages) return;
this.pager.pageNum += 1;
await this.loadPageData();
},
// 加载指定页码的数据
async loadPageData() {
uni.showLoading({
title: '加载中...'
});
try {
const res = await listMaterialCoil({
...this.form,
...this.pager,
selectType: this.form.itemType
});
this.list = res.rows || [];
// 滚动到列表顶部
this.scrollToPageTop();
} catch (err) {
console.error('加载分页数据失败:', err);
uni.showToast({
title: '加载失败,请重试',
icon: 'none',
duration: 2000
})
} finally {
uni.hideLoading();
}
},
// 回到查询页面(原有方法+✅新增滚动到顶部)
backToSearch() {
this.currentView = 'search';
@@ -314,6 +394,49 @@
color: #999;
font-size: 28rpx;
}
// 分页样式
.pagination {
margin-top: 40rpx;
padding: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
gap: 20rpx;
.pagination-info {
display: flex;
gap: 30rpx;
font-size: 26rpx;
color: #666;
text {
display: block;
}
}
.pagination-btns {
display: flex;
gap: 20rpx;
.page-btn {
width: 160rpx;
height: 70rpx;
line-height: 70rpx;
background: #f0f7ff;
border: 1rpx solid #007aff;
border-radius: 8rpx;
color: #007aff;
font-size: 28rpx;
&:disabled {
background: #f5f5f5;
border-color: #ddd;
color: #999;
}
}
}
}
}
// ✅ 核心新增:悬浮按钮样式(全局通用)
@@ -509,7 +632,7 @@
color: #007aff;
}
}
}
} // ✅ 修复补全card-title的闭合大括号
/* 信息网格 */
.info-grid {

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -1,5 +1,5 @@
{
"uni-load-more.contentdown": "上拉显示更多",
"uni-load-more.contentdown": "点击加载更多",
"uni-load-more.contentrefresh": "正在加载...",
"uni-load-more.contentnomore": "没有更多数据了"
}

View File

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

View File

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

View File

@@ -29,6 +29,14 @@ export function listPlan(query) {
})
}
export function getL3PickupRecommend(limit = 10) {
return l2Request({
url: '/api/pdi/l3PickupRecommend',
method: 'get',
params: { limit }
})
}
// 查询计划详细
export function getPlan(coilId) {
return l2Request({

View File

@@ -18,6 +18,12 @@
<el-input v-model="formData.entryMatId"></el-input>
</el-form-item>
</el-col>
<!-- 入场钢卷号 -->
<el-col :span="8">
<el-form-item label="入场钢卷号" prop="enterCoilNo">
<el-input v-model="formData.enterCoilNo"></el-input>
</el-form-item>
</el-col>
<!-- 分切数 -->
<el-col :span="8">
<el-form-item label="分切数" prop="subId">

View File

@@ -40,6 +40,7 @@
<el-table :data="tableData" style="width: 100%" border stripe @row-click="handleRowClick" highlight-current-row>
<el-table-column prop="exitMatId" label="成品卷号"></el-table-column>
<el-table-column prop="entryMatId" label="来料卷号"></el-table-column>
<el-table-column prop="enterCoilNo" label="入场钢卷号"></el-table-column>
<el-table-column prop="planNo" label="计划单号"></el-table-column>
<el-table-column prop="status" label="状态"></el-table-column>
@@ -252,6 +253,7 @@ export default {
this.dialogTitle = '新增实绩';
// 初始化空表单数据(传递给子组件)
this.formData = {
enterCoilNo: '',
subId: 0,
startPosition: 0,
endPosition: 0,

View File

@@ -0,0 +1,113 @@
<template>
<div class="l3-pickup-recommend-panel">
<div class="section-header">
<div>
<div class="section-title">三级领料推荐</div>
<div class="section-subtitle">来自L3待处理领料队列actionType=501, actionStatus=0</div>
</div>
<el-button type="text" size="mini" @click="fetchList">刷新</el-button>
</div>
<div class="section-body" v-loading="loading">
<div v-if="recommendations.length" class="card-list">
<div
v-for="item in recommendations"
:key="item.actionId"
class="recommend-card"
@click="apply(item)"
>
<div class="card-title">{{ item.coilId || '-' }}</div>
<div class="card-meta">
<span>入场钢卷号{{ item.enterCoilNo || '-' }}</span>
<span>优先级{{ item.priority != null ? item.priority : '-' }}</span>
</div>
<div class="card-meta">
<span>来源coilId{{ item.sourceCoilId || '-' }}</span>
<span>扫码时间{{ formatDate(item.scanTime) }}</span>
</div>
<div class="card-footer">
<span>点击应用到左侧表单</span>
<i class="el-icon-top-right" />
</div>
</div>
</div>
<el-empty v-else description="暂无三级领料推荐" :image-size="90" />
</div>
</div>
</template>
<script>
import { parseTime } from '@/utils/ruoyi'
import { getL3PickupRecommend } from '@/api/l2/plan'
export default {
name: 'L3PickupRecommendPanel',
data() {
return {
loading: false,
recommendations: []
}
},
mounted() {
this.fetchList()
},
methods: {
async fetchList() {
this.loading = true
try {
const res = await getL3PickupRecommend(10)
this.recommendations = Array.isArray(res.data) ? res.data : []
} catch (e) {
console.error('fetch l3 pickup recommend error:', e)
this.$message?.error('获取三级领料推荐失败')
this.recommendations = []
} finally {
this.loading = false
}
},
apply(item) {
this.$emit('apply-recommendation', {
coilid: item.coilId || '',
enterCoilNo: item.enterCoilNo || ''
})
},
formatDate(v) {
if (!v) return '-'
return parseTime(v, '{y}-{m}-{d} {h}:{i}:{s}')
}
}
}
</script>
<style scoped>
.l3-pickup-recommend-panel {
background: #f9fafc;
border: 1px solid #e4e7ed;
border-radius: 6px;
padding: 12px;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 8px;
}
.section-title { font-weight: 600; color: #303133; }
.section-subtitle { font-size: 12px; color: #909399; }
.section-body { max-height: 220px; overflow-y: auto; }
.card-list { display: grid; gap: 8px; }
.recommend-card {
border: 1px solid #dcdfe6;
border-radius: 6px;
background: #fff;
padding: 10px;
cursor: pointer;
}
.recommend-card:hover {
border-color: #409eff;
box-shadow: 0 6px 18px rgba(64, 158, 255, 0.15);
}
.card-title { font-weight: 600; color: #303133; margin-bottom: 6px; }
.card-meta { display: flex; justify-content: space-between; font-size: 12px; color: #606266; margin-bottom: 2px; }
.card-footer { display: flex; justify-content: space-between; font-size: 12px; color: #909399; margin-top: 4px; }
</style>

View File

@@ -234,6 +234,7 @@
append-to-body>
<div class="plan-dialog-body">
<div class="plan-dialog-left">
<l3-pickup-recommend-panel @apply-recommendation="handleApplyL3PickupRecommendation" />
<el-form :model="form" ref="form" label-width="90px" :rules="rules" size="mini" class="plan-base-form">
<el-row :gutter="16">
<el-col :span="12">
@@ -246,6 +247,11 @@
<el-input v-model="form.coilid" placeholder="请输入钢卷号" maxLength="32"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="入场钢卷号" prop="enterCoilNo">
<el-input v-model="form.enterCoilNo" placeholder="请输入入场钢卷号" maxLength="255"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="钢种" prop="steelGrade">
<el-select v-model="form.steelGrade" placeholder="请选择钢种">
@@ -366,6 +372,7 @@ import SetupForm from './components/setupForm.vue'
import SetupPane from './components/setupPane.vue'
import PlanRecommendPanel from './components/PlanRecommendPanel.vue'
import ProcessRecommendPanel from './components/ProcessRecommendPanel.vue'
import L3PickupRecommendPanel from './components/L3PickupRecommendPanel.vue'
// 标准日期格式化方法(优化时间处理逻辑,适配接口日期格式)
function parseTime(time, format = "{yyyy}-{mm}-{dd} {hh}:{ii}:{ss}") {
@@ -409,7 +416,8 @@ export default {
SetupForm,
SetupPane,
PlanRecommendPanel,
ProcessRecommendPanel
ProcessRecommendPanel,
L3PickupRecommendPanel
},
data() {
return {
@@ -442,6 +450,7 @@ export default {
id: null, // 主键ID组件内部用提交时后端自动处理
seqid: null, // 顺序号number接口要求
coilid: "", // 钢卷号string必填
enterCoilNo: "", // 入场钢卷号string
unitCode: "", // 机组号string接口要求
dummyCoilFlag: 0, // 虚卷标识number默认0非虚卷
planid: "", // 计划IDstring接口要求
@@ -635,6 +644,15 @@ export default {
this.form.yieldPoint = payload.yieldPoint
}
},
handleApplyL3PickupRecommendation(payload) {
if (!payload) return
if (payload.coilid !== undefined) {
this.form.coilid = payload.coilid || ''
}
if (payload.enterCoilNo !== undefined) {
this.form.enterCoilNo = payload.enterCoilNo || ''
}
},
handleProcessRecommendation(payload) {
this.processRecommendation = payload
},
@@ -806,6 +824,7 @@ export default {
status: "NEW", // 新增计划默认状态为 新建
planid: "",
planType: "",
enterCoilNo: "",
originCoilid: "",
yieldPoint: null,
zincCoatingThickness: null,