瀏覽代碼

销售合同PDF字典

lxf 1 年之前
父節點
當前提交
594d95bc35
共有 1 個文件被更改,包括 21 次插入0 次删除
  1. 21 0
      src/components/PDF/contractPDF.vue

+ 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) => {