From 8abc9481eafeb715b39a4f4f8d6f628a642e6b53 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 19 三月 2025 17:38:18 +0800
Subject: [PATCH] 优化AGV和输送线、产线对接逻辑
---
项目代码/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue | 85 ++++++++++++++++++++++++++++++------------
1 files changed, 60 insertions(+), 25 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
index 14cafdc..f903fc0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
@@ -23,7 +23,7 @@
>宸查�夋暟閲忥細 {{ selectionSum }}
</span>
</el-col>
- <el-col :span="4">
+ <!-- <el-col :span="4">
<el-link
type="primary"
size="small"
@@ -31,7 +31,7 @@
@click="revokeAssign"
>鎾ら攢鍒嗛厤</el-link
></el-col
- >
+ > -->
</el-row>
</el-alert>
</div>
@@ -62,17 +62,35 @@
:width="item.width"
align="center"
>
- <template #default="scoped" v-if="item.type == 'icon'">
- <el-tooltip
- class="item"
- effect="dark"
- :content="item.title"
- placement="bottom"
- ><el-button
- type="text"
- @click="tableButtonClick(scoped.row, item)"
- ><i :class="item.icon" style="font-size: 22px"></i></el-button
- ></el-tooltip>
+ <template #default="scoped">
+ <template v-if="item.type == 'icon'">
+ <el-tooltip
+ class="item"
+ effect="dark"
+ :content="item.title"
+ placement="bottom"
+ ><el-button
+ type="text"
+ @click="tableButtonClick(scoped.row, item)"
+ ><i
+ :class="item.icon"
+ :style="{ fontSize: item.iconSize || '22px' }"
+ ></i></el-button
+ ></el-tooltip>
+ </template>
+ <template v-else>
+ <el-tooltip
+ :content="scoped.row[item.prop]"
+ placement="top"
+ :disabled="
+ !isContentOverflow(scoped.row[item.prop], item.width)
+ "
+ >
+ <div class="cell-content">
+ {{ scoped.row[item.prop] }}
+ </div>
+ </el-tooltip>
+ </template>
</template>
</el-table-column>
</el-table>
@@ -113,24 +131,25 @@
type: "string",
width: 150,
},
- // {
- // prop: "palletCode",
- // title: "鎵樼洏缂栧彿",
- // type: "string",
- // width: 150,
- // },
+ {
+ prop: "palletCode",
+ title: "鎵樼洏缂栧彿",
+ type: "string",
+ width: 150,
+ },
{
prop: "batchNo",
title: "鎵规鍙�",
type: "string",
width: 150,
},
- // {
- // prop: "locationCode",
- // title: "璐т綅缂栧彿",
- // type: "string",
- // width: 180,
- // },
+ {
+ prop: "locationCode",
+ title: "璐т綅缂栧彿",
+ type: "string",
+
+ width: 180,
+ },
{
prop: "useableQuantity",
title: "鍙敤鏁伴噺",
@@ -144,6 +163,13 @@
};
},
methods: {
+ isContentOverflow(content, width) {
+ if (!content || !width) return false;
+ // 浼扮畻姣忎釜瀛楃鐨勫搴︼紙鏍规嵁瀛椾綋澶у皬璋冩暣锛�
+ const charWidth = 8; // 鍋囪姣忎釜瀛楃瀹藉害涓� 8px
+ const maxChars = Math.floor(width / charWidth);
+ return content.length > maxChars;
+ },
open(row) {
this.row = row;
this.showDetialBox = true;
@@ -175,6 +201,9 @@
});
},
outbound() {
+ if (this.selection.length <= 0) {
+ return this.$message.error("璇烽�夋嫨鎸囧畾搴撳瓨");
+ }
this.http
.post(
"api/Task/GenerateOutboundTask?id=" + this.row.id,
@@ -263,6 +292,12 @@
.more-style {
color: red;
}
+.cell-content {
+ white-space: nowrap; /* 闃叉鎹㈣ */
+ overflow: hidden; /* 闅愯棌瓒呭嚭閮ㄥ垎 */
+ text-overflow: ellipsis; /* 鏄剧ず鐪佺暐鍙� */
+ width: 100%; /* 瀹藉害鍗犳弧鍗曞厓鏍� */
+}
</style>
<style>
--
Gitblit v1.9.3