lxf 1 жил өмнө
parent
commit
594d95bc35

+ 21 - 0
src/components/PDF/contractPDF.vue

@@ -227,6 +227,27 @@ if (props.rowData && props.rowData.id) {
   getPdfData(props.rowData);
 }
 
+const productUnit = ref([]);
+const tradeMethods = ref([]);
+const shippingMethod = ref([]);
+
+const getDict = () => {
+  proxy.getDictOne(["trade_mode", "shipping_method", "unit"]).then((res) => {
+    tradeMethods.value = res["trade_mode"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    shippingMethod.value = res["shipping_method"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    productUnit.value = res["unit"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
+};
+getDict();
 watch(
   () => props.rowData.id,
   (val) => {