From 1c631b345aae30bb6aa7e9dc8d856a0f40d5f1e3 Mon Sep 17 00:00:00 2001
From: liulijun <liulijun@hnkhzn.com>
Date: 星期五, 20 三月 2026 10:49:08 +0800
Subject: [PATCH] 修复货位平面图锁定状态的显示
---
项目代码/WMS/WMSClient/src/views/index/Message.vue | 197 +++++++++++++++++++++++++++++++++++-------------
1 files changed, 143 insertions(+), 54 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/index/Message.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/index/Message.vue"
index e051ab6..4809a27 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/index/Message.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/index/Message.vue"
@@ -1,57 +1,80 @@
<template>
<div class="message-container">
- <div class="item" v-for="(item, index) in list" :key="index">
- <div class="title">{{ item.title }}({{ item.date }})</div>
+ <div class="item" v-for="(item, index) in list" :key="item.id || index">
+ <div class="title-container">
+ <div class="title">{{ item.title }}({{ item.createTime || item.date }})</div>
+ <el-button
+ type="text"
+ class="delete-btn"
+ @click="handleDeleteMessage(item, index)"
+ size="small"
+ >
+ <i class="el-icon-close"></i>
+ </el-button>
+ </div>
<div class="content">
- <el-row>
- <el-col :span="8">
- <label>鏀惰揣鍗曞彿锛歿{ item.formData.receiveOrderNo }}</label>
- </el-col>
- <el-col :span="8">
- <label>璐ㄦ鍗曞彿锛歿{ item.formData.checkOrderNo }}</label>
- </el-col>
- <el-col :span="8">
- <label>鏀惰揣鏄庣粏琛屽彿锛歿{ item.formData.receiveDetailRowNo }}</label>
- </el-col>
- </el-row>
+ <!-- 濡傛灉鏈塮ormData锛屾樉绀鸿川妫�瀹℃壒鐩稿叧鍐呭 -->
+ <template v-if="item.formData">
+ <el-row>
+ <el-col :span="8">
+ <label>鏀惰揣鍗曞彿锛歿{ item.formData.receiveOrderNo }}</label>
+ </el-col>
+ <el-col :span="8">
+ <label>璐ㄦ鍗曞彿锛歿{ item.formData.checkOrderNo }}</label>
+ </el-col>
+ <el-col :span="8">
+ <label>鏀惰揣鏄庣粏琛屽彿锛歿{ item.formData.receiveDetailRowNo }}</label>
+ </el-col>
+ </el-row>
- <el-row>
- <el-col :span="8">
- <label>鐗╂枡缂栧彿锛歿{ item.formData.materielCode }}</label>
- </el-col>
- <el-col :span="8">
- <label>鍚堟牸鏁伴噺锛歿{ item.formData.qualifiedQuantity }}</label>
- </el-col>
- <el-col :span="8">
- <label>鐗归噰鏁伴噺锛歿{ item.formData.defectedQuantity }}</label>
- </el-col>
- </el-row>
+ <el-row>
+ <el-col :span="8">
+ <label>鐗╂枡缂栧彿锛歿{ item.formData.materielCode }}</label>
+ </el-col>
+ <el-col :span="8">
+ <label>鍚堟牸鏁伴噺锛歿{ item.formData.qualifiedQuantity }}</label>
+ </el-col>
+ <el-col :span="8">
+ <label>鐗归噰鏁伴噺锛歿{ item.formData.defectedQuantity }}</label>
+ </el-col>
+ </el-row>
- <el-row>
- <el-col :span="8">
- <label>閫�璐ф暟閲忥細{{ item.formData.returnQuantity }}</label>
- </el-col>
- <el-col :span="8">
- <label>鎶ュ簾鏁伴噺锛歿{ item.formData.scrappedQuantity }}</label>
- </el-col>
- <el-col :span="8">
- <label>璐ㄦ鎬绘暟锛歿{ item.formData.receivedQuantity }}</label>
- </el-col>
- </el-row>
-
- <el-row>
- <el-col :span="16">
- <label>鐗归噰璇存槑锛歿{ item.formData.defectedNote }}</label>
- </el-col>
- <el-col :span="8">
- <label>妫�楠屼汉锛歿{ item.formData.checkUserName }}</label>
- </el-col>
- </el-row>
+ <el-row>
+ <el-col :span="8">
+ <label>閫�璐ф暟閲忥細{{ item.formData.returnQuantity }}</label>
+ </el-col>
+ <el-col :span="8">
+ <label>鎶ュ簾鏁伴噺锛歿{ item.formData.scrappedQuantity }}</label>
+ </el-col>
+ <el-col :span="8">
+ <label>璐ㄦ鎬绘暟锛歿{ item.formData.receivedQuantity }}</label>
+ </el-col>
+ </el-row>
+
+ <el-row>
+ <el-col :span="16">
+ <label>鐗归噰璇存槑锛歿{ item.formData.defectedNote }}</label>
+ </el-col>
+ <el-col :span="8">
+ <label>妫�楠屼汉锛歿{ item.formData.checkUserName }}</label>
+ </el-col>
+ </el-row>
+ <div style="margin-top: 20px">
+ <el-button type="primary">鍚屾剰</el-button
+ ><el-button type="danger">椹冲洖</el-button>
+ </div>
+ </template>
+ <!-- 鍚﹀垯鏄剧ず鏅�氭秷鎭唴瀹� -->
+ <template v-else>
+ <div class="simple-message">
+ {{ item.message || '鏃犳秷鎭唴瀹�' }}
+ </div>
+ </template>
</div>
- <div style="margin-top: 20px">
- <el-button type="primary">鍚屾剰</el-button
- ><el-button type="danger">椹冲洖</el-button>
- </div>
+ </div>
+ <!-- 濡傛灉娌℃湁娑堟伅锛屾樉绀烘彁绀� -->
+ <div v-if="list.length === 0" class="no-message">
+ 鏆傛棤娑堟伅
</div>
</div>
</template>
@@ -88,21 +111,87 @@
// });
// }
},
+ methods: {
+ // 澶勭悊纭鎸夐挳鐐瑰嚮浜嬩欢
+ handleConfirm(item) {
+ console.log('纭娑堟伅:', item);
+ // 杩欓噷鍙互娣诲姞纭鍚庣殑閫昏緫锛屾瘮濡備粠娑堟伅鍒楄〃涓Щ闄よ娑堟伅
+ // 鐢变簬props鏄崟鍚戞暟鎹祦锛岄渶瑕侀�氳繃浜嬩欢閫氱煡鐖剁粍浠跺鐞�
+ this.$emit('confirm', item);
+ },
+ // 澶勭悊鍒犻櫎鍗曟潯娑堟伅
+ handleDeleteMessage(item, index) {
+ // 閫氳繃浜嬩欢閫氱煡鐖剁粍浠跺垹闄よ娑堟伅
+ this.$emit('delete-message', { item, index });
+ }
+ }
};
</script>
<style scoped lang="less">
.message-container {
- .title {
- padding-bottom: 10px;
- font-weight: bold;
- }
+ padding: 10px;
+ background-color: #fafafa;
+ border-radius: 12px;
+
.item {
- border-bottom: 1px solid #eee;
- padding: 10px 20px;
+ background-color: white;
+ border: 1px solid #e4e7ed;
+ border-radius: 12px;
+ padding: 15px 20px;
+ margin-bottom: 15px;
+ position: relative;
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+ transition: all 0.3s ease;
+
+ &:hover {
+ box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
+ transform: translateY(-2px);
+ }
+
+ &:last-child {
+ margin-bottom: 0;
+ }
}
+
+ .title-container {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 10px;
+ }
+
+ .title {
+ font-weight: bold;
+ flex: 1;
+ color: #303133;
+ font-size: 16px;
+ }
+
+ .delete-btn {
+ margin-left: 10px;
+ color: #909399;
+ &:hover {
+ color: #f56c6c;
+ }
+ }
+
.content {
color: #1b1b1b;
font-size: 14px;
}
+
+ .simple-message {
+ line-height: 1.7;
+ color: #606266;
+ }
+
+ .no-message {
+ text-align: center;
+ padding: 50px 0;
+ color: #909399;
+ background-color: white;
+ border-radius: 12px;
+ border: 1px solid #e4e7ed;
+ }
}
</style>
--
Gitblit v1.9.3