Quellcode durchsuchen

销售合同打印单位未替换字典

lxf vor 1 Jahr
Ursprung
Commit
bfdf8eb5e6
1 geänderte Dateien mit 19 neuen und 1 gelöschten Zeilen
  1. 19 1
      src/views/salesMange/saleContract/contract/index.vue

+ 19 - 1
src/views/salesMange/saleContract/contract/index.vue

@@ -133,7 +133,7 @@
               {{ item.productName }}
             </div>
             <div class="contentRow" style="width: 100px; text-align: center">
-              {{ item.productUnit }}
+              {{ dictValueLabel(item.productUnit, productUnit) }}
             </div>
             <div class="contentRow" style="width: 100px; text-align: center">
               {{ item.productQuantity }}
@@ -238,6 +238,7 @@ const corporationList = ref([]);
 const customerList = ref([]);
 const shippingMethod = ref([]);
 const userList = ref([]);
+const productUnit = ref([]);
 const status = ref([
   {
     label: "草稿",
@@ -591,6 +592,23 @@ const getDict = () => {
         };
       });
     });
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "unit",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        productUnit.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };