Browse Source

出入库流水bug

cz 1 year ago
parent
commit
1774778ff7

+ 31 - 30
src/components/Editor/TinymceEditor.vue

@@ -32,7 +32,7 @@ const props = defineProps({
   toolbar: {
     type: [String, Array],
     default:
-      "fontselect | fontsizeselect | formatselect | bold italic underline forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table | image | removeformat | fontsize",
+      "font | fontsize | format | bold italic underline forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table | image | removeformat",
   }, //必填
 });
 const emit = defineEmits(["updateValue"]);
@@ -57,39 +57,40 @@ const init = reactive({
   language: "zh_CN", //中文
   paste_data_images: true, //是否打开黏贴图片功能
   font_formats:
-    "Arial=arial,helvetica,sans-serif; 宋体=SimSun; 微软雅黑=Microsoft Yahei; Impact=impact,chicago;", //字体
+    "微软雅黑='微软雅黑';宋体='宋体';黑体='黑体';仿宋='仿宋';楷体='楷体';隶书='隶书';幼圆='幼圆';Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings", //字体
   fontsize_formats: "8pt 10pt 12pt 14pt 18pt 24pt 36pt", // 第二步
   convert_fonts_to_spans: true,
   font_size_style_values: "8pt,10pt,12pt,14pt,18pt,24pt,36pt",
   images_upload_url: import.meta.env.VITE_APP_BASE_API,
-  images_upload_handler: (blobInfo, progress) => new Promise((resolve, reject) => {
-
-    if (blobInfo.blob().size / 1024 / 1024 > 2) {
-      reject({ message: '上传失败,图片大小请控制在 2M 以内', remove: true })
-      return
-    } else {
-      const file = blobInfo.blob();
-      
-      proxy
-        .post("/fileInfo/getSing", { fileName: blobInfo.filename() })
-        .then((res) => {
-          const otherData = res.uploadBody;
-          const formData = new FormData();
-          for (const key in otherData) {
-            formData.append(key, otherData[key]);
-          }
-          formData.append("file", file);
-          
-          proxy
-            .post("https://winfaster.obs.cn-south-1.myhuaweicloud.com", formData)
-            .then((data) => {
-              if (res && typeof res.fileUrl == "string" && res.fileUrl) {
-                resolve(res.fileUrl)
-              }
-            });
-        });
-    }
-  }),
+  images_upload_handler: (blobInfo, progress) =>
+    new Promise((resolve, reject) => {
+      if (blobInfo.blob().size / 1024 / 1024 > 5) {
+        reject({ message: "上传失败,图片大小请控制在 5M 以内", remove: true });
+        return;
+      } else {
+        const file = blobInfo.blob();
+        proxy
+          .post("/fileInfo/getSing", { fileName: blobInfo.filename() })
+          .then((res) => {
+            const otherData = res.uploadBody;
+            const formData = new FormData();
+            for (const key in otherData) {
+              formData.append(key, otherData[key]);
+            }
+            formData.append("file", file);
+            proxy
+              .post(
+                "https://winfaster.obs.cn-south-1.myhuaweicloud.com",
+                formData
+              )
+              .then((data) => {
+                if (res && typeof res.fileUrl == "string" && res.fileUrl) {
+                  resolve(res.fileUrl);
+                }
+              });
+          });
+      }
+    }),
   images_upload_base_path: "/demo",
 });
 

+ 13 - 2
src/views/purchaseSales/outAndInWarehouse/record/index.vue

@@ -18,8 +18,9 @@
       >
         <template #warehouseName="{ item }">
           <div>
-            <span v-if="item.opType == 1">{{ item.toWarehouseName }}</span>
-            <span v-else>{{ item.warehouseName }}</span>
+            <!-- <span v-if="item.opType == 1">{{ item.toWarehouseName }}</span>
+            <span v-else>{{ item.warehouseName }}</span> -->
+            <span>{{ item.warehouseName }}</span>
           </div>
         </template>
       </byTable>
@@ -110,6 +111,7 @@ const typeList = ref([
   },
 ]);
 const warehouseList = ref([]);
+const productUnit = ref([]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -192,6 +194,9 @@ const config = computed(() => {
         prop: "productUnit",
         width: 120,
       },
+      render(unit) {
+        return proxy.dictValueLabel(unit, productUnit.value);
+      },
     },
     {
       attrs: {
@@ -227,6 +232,12 @@ const getDict = () => {
       });
     }
   });
+  proxy.getDictOne(["unit"]).then((res) => {
+    productUnit.value = res["unit"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };