From 0d38c8877f9fa733646488dfbf5a82a8eaf945fb Mon Sep 17 00:00:00 2001
From: yangzifeng <2547435354@qq.com>
Date: Tue, 10 Feb 2026 09:31:09 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8D=B0=E5=87=BA?=
=?UTF-8?q?=E5=BA=93=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/printBill/bill.vue | 33 ++++++++++++-------------------
1 file changed, 13 insertions(+), 20 deletions(-)
diff --git a/src/components/printBill/bill.vue b/src/components/printBill/bill.vue
index 7034a1c..1532306 100644
--- a/src/components/printBill/bill.vue
+++ b/src/components/printBill/bill.vue
@@ -25,11 +25,11 @@
| 项目编号: |
- {{ billAllObj[0]?.xmNo }} |
+ {{ billAllObj[0]?.xmNo }} |
| 项目描述: |
- {{ billAllObj[0]?.xmMs }} |
+ {{ billAllObj[0]?.bizType == 1 ? xmMs : billAllObj[0]?.xmMs }} |
@@ -127,29 +127,22 @@ const props = defineProps({
},
});
-function isChukuFun(isChuku){
- // scope.row.isChuku==0?"已入库":(scope.row.isChuku==1?"已出库":"审批中")
- if(isChuku == 0){
- return "已入库"
- } else if(isChuku == 1){
- return "已出库"
- }else if(isChuku == 3){
- return "借料出库"
- }else if(isChuku == 2){
- return "审批中"
- }else if(isChuku == 4){
- return "入库撤销"
- }else if(isChuku == 5){
- return "出库撤销"
- }
-}
const isRuKu = computed(() => {
return props.billAllObj[0]?.bizType == 0;
});
-// 获取第一条数据作为头部基础信息来源
-const header = computed(() => (props.billAllObj && props.billAllObj.length > 0 ? props.billAllObj[0] : {}));
+// 获取不同的项目描述
+const xmMs = computed(() => {
+ const validXmMsValues = props.billAllObj
+ .map(item => item.xmMs) // 提取所有 xmMs 属性值
+ .filter(value => !!value); // 过滤掉 null/undefined/空字符串等假值
+ // 3. 去重:得到所有不同的 xmMs 值
+ const uniqueXmMs = [...new Set(validXmMsValues)];
+ // 4. 核心逻辑:多个值用 + 拼接,单个值直接返回,无值返回空字符串
+ return uniqueXmMs.length > 1 ? uniqueXmMs.join('、') : uniqueXmMs[0] || '';
+});
+
// 汇总逻辑
const summaryList = computed(() => {