From e8ae17c0fbe5dc0a5424905c738004b143d9ce2c Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期四, 22 八月 2024 15:04:14 +0800
Subject: [PATCH] 二维码打印排版

---
 src/views/hazardousChemicals/homePage/index.vue |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/views/hazardousChemicals/homePage/index.vue b/src/views/hazardousChemicals/homePage/index.vue
index b2975db..24cc320 100644
--- a/src/views/hazardousChemicals/homePage/index.vue
+++ b/src/views/hazardousChemicals/homePage/index.vue
@@ -54,6 +54,8 @@
                     <img :src="avator" style="width: 25px;height: 25px" />
                     <div style="display: flex;flex-direction: column;margin-left: 20px">
                       <span style="font-size: 16px;font-weight: 600">{{item.description}}&nbsp;
+                         <span style="color: #03752e;font-weight: 600" v-if="item.num > 0">{{item.stateName}}</span>&nbsp;
+                         <span style="color: #f6828e;font-weight: 600" v-else>{{item.stateName}}</span>&nbsp;
                         <span style="color: #03752e" v-if="item.num > 0">{{item.num >0 ? '+' + item.num: item.num}}{{item.unit}}</span>
                         <span style="color: #f6828e" v-else>{{item.num}}{{item.unit}}</span>
                       </span>
@@ -186,6 +188,7 @@
         description: `${item.createName} 领用了 ${item.hazmatBasic.name} 状态:${item.state ==0?'未处理':'已处理' }`
       }
     })
+    data.warningData = data.warningData.filter(item => item.state === 0)
   }else{
     ElMessage.warning(res.message)
   }
@@ -199,7 +202,8 @@
       return {
         ...item,
         unit:item.hazmatBasic.unit,
-        description: `${item.user.departName ? item.user.departName +'部门' : ''}   ${item.user.name}  进行了  ${item.state ==0?'批量导入': item.state ==1?'取用' :item.state ==2?'归还':item.state ==3?'标签作废' :''} ${item.hazmatBasic.name}`
+        stateName: item.state ==0 ?'入库': item.state ==1 ? '取用' :item.state ==2 ? '归还': item.state ==3 ? '标签作废' : item.state ==4 ? '用尽登记':item.state ==5 ? '销售' : '',
+        description: `${item.user.departName ? item.user.departName +'部门' : ''}   ${item.user.name}  进行了  `
       }
     })
     console.log('data.hazmatData',data.hazmatData)

--
Gitblit v1.9.2