From 3859552775fdf2dc25bbf6d4504209acc6c846df Mon Sep 17 00:00:00 2001
From: liulijun <liulijun@hnkhzn.com>
Date: 星期二, 17 三月 2026 09:33:53 +0800
Subject: [PATCH] 增加老厂排程单页面的物料编号缺料变红的显示和去除物料幅宽的小数点
---
项目代码/WMS/WMSClient/src/views/outbound/outSGOrder.vue | 88 ++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 84 insertions(+), 4 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outSGOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outSGOrder.vue"
index 3252127..ff2917e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outSGOrder.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outSGOrder.vue"
@@ -93,9 +93,16 @@
},
{
field: "orderId",
- title: "涓婃父鐢熶骇鍗曞彿",
+ title: "鎺掔▼鍙�",
type: "string",
width: 160,
+ align: "left",
+ },
+ {
+ field: "number",
+ title: "鐢ㄧ焊搴忓彿",
+ type: "string",
+ width: 90,
align: "left",
},
{
@@ -108,10 +115,21 @@
{
field: "outSGOrderStatus",
title: "鍑哄簱鍗曠姸鎬�",
- type: "string",
+ type: "tag",
width: 110,
align: "left",
bind: { key: "outboundStatusEnum", data: [] },
+ getColor: (row) => {
+ const status = row.outSGOrderStatus;
+ if (status === 3) { // 缂烘枡
+ return 'danger'; // 绾㈣壊
+ } else if (status === 0) { // 鏈紑濮�
+ return 'success'; // 缁胯壊
+ } else if (status === 1) { // 鍑哄簱涓�
+ return 'primary'; // 钃濊壊
+ }
+ return ''; // 榛樿鏃犻鑹�
+ }
},
{
field: "createDate",
@@ -126,6 +144,36 @@
type: "string",
width: 160,
align: "left",
+ formatter: (row) => {
+ const materialNos = row.materialNos;
+ if (!materialNos) return materialNos;
+
+ // 鏋勫缓鐗╂枡缂烘枡鐘舵�佹槧灏�
+ const lackStatusMap = new Map();
+
+ // 娉ㄦ剰锛氬瓧娈靛悕宸茬粡琚浆鎹负椹煎嘲鍛藉悕娉�
+ const statusField = row.materialLackStatus;
+ if (statusField) {
+ const statusPairs = statusField.split(',');
+ statusPairs.forEach(pair => {
+ const [materialNo, isLack] = pair.split(':');
+ lackStatusMap.set(materialNo.trim(), isLack.trim() === 'true');
+ });
+ }
+
+ // 澶勭悊鐗╂枡缂栧彿锛屾牴鎹姸鎬佽缃鑹�
+ const materialList = materialNos.split('/');
+ const formattedMaterials = materialList.map(materialNo => {
+ const trimmedMaterialNo = materialNo.trim();
+ const isLack = lackStatusMap.get(trimmedMaterialNo) || false;
+ if (isLack) {
+ return `<span style="color: red;">${trimmedMaterialNo}</span>`;
+ }
+ return trimmedMaterialNo;
+ });
+
+ return formattedMaterials.join('/');
+ }
},
{
field: "materialWides",
@@ -133,6 +181,26 @@
type: "string",
width: 100,
align: "left",
+ formatter: (row) => {
+ const value = row.materialWides;
+ if (value && typeof value === 'string') {
+ return value.replace(/\.\d+$/, '');
+ }
+ return value;
+ }
+ },
+ {
+ field: "isLackMaterial",
+ title: "鏄惁缂烘枡",
+ type: "string",
+ width: 100,
+ align: "center",
+ formatter: (row) => {
+ const isLack = Boolean(row.isLackMaterial);
+ const text = isLack ? "鏄�" : "鍚�";
+ const bgColor = isLack ? '#ff4d4f' : '#52c41a';
+ return `<div style="background-color: ${bgColor}; color: #ffffff; text-align: center; font-weight: bold; width: 100%; height: 100%; padding: 10px 0; display: flex; justify-content: center; align-items: center;">${text}</div>`;
+ }
},
]);
const detail = ref({
@@ -213,6 +281,7 @@
align: "left",
edit: { type: "string" },
required: true,
+
},
{
field: "xqLen",
@@ -254,12 +323,23 @@
align: "left",
},
{
- field: "outBSTOrderDetailStatus",
+ field: "outSGOrderDetailStatus",
title: "璁㈠崟鏄庣粏鐘舵��",
- type: "string",
+ type: "tag",
width: 180,
align: "left",
bind: { key: "outboundStatusEnum", data: [] },
+ getColor: (row) => {
+ const status = row.outSGOrderDetailStatus;
+ if (status === 3) { // 缂烘枡
+ return 'danger'; // 绾㈣壊
+ } else if (status === 0) { // 鏈紑濮�
+ return 'success'; // 缁胯壊
+ } else if (status === 1) { // 鍑哄簱涓�
+ return 'primary'; // 钃濊壊
+ }
+ return ''; // 榛樿鏃犻鑹�
+ }
},
{
field: "createDate",
--
Gitblit v1.9.3