瀏覽代碼

部分bug解决

cz 1 年之前
父節點
當前提交
7527f4683f

+ 19 - 3
src/components/Editor/TinymceEditor.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="content_1111">
     <Editor
       api-key="nfaxt3iz0ciqr1yg7zxzifvksvval28yl46wr1n0847mt0d3"
       :init="init"
@@ -112,5 +112,21 @@ watch(
 );
 </script>
 
-<style lang="scss" scoped>
-</style>
+<style lang="scss" scope>
+// .mce-content-body {
+//   .mce-item-table:not([border]),
+//   .mce-item-table:not([border]) caption,
+//   .mce-item-table:not([border]) td,
+//   .mce-item-table:not([border]) th,
+//   .mce-item-table[border="0"],
+//   .mce-item-table[border="0"] caption,
+//   .mce-item-table[border="0"] td,
+//   .mce-item-table[border="0"] th,
+//   table[style*="border-width: 0px"],
+//   table[style*="border-width: 0px"] caption,
+//   table[style*="border-width: 0px"] td,
+//   table[style*="border-width: 0px"] th {
+//     border: none !important;
+//   }
+// }
+</style>

+ 0 - 46
src/components/Editor/aa.vue

@@ -1,46 +0,0 @@
-<template>
-  <div class="app-container">
-    <Editor
-      id="tinymce"
-      v-model="tinymceHtml"
-      :init="init"
-      @paste="customPaste($event)"
-    /><!-- <div v-html="tinymceHtml"></div> -->
-  </div>
-</template>
-<script setup lang="ts">
-import { ref, onMounted, watch } from "vue";
-import tinymce from "tinymce/tinymce";
-// 使用该方法需要引入下面的数据
-import "tinymce/models/dom"; // 特别注意 tinymce 6.0.0 版本之后必须引入,否则不显示
-import "tinymce/themes/silver/theme";
-import Editor from "@tinymce/tinymce-vue"; // 引入组件
-import "tinymce/icons/default";
-import "tinymce/plugins/image";
-import "tinymce/plugins/link";
-import "tinymce/plugins/code";
-import "tinymce/plugins/table";
-import "tinymce/plugins/lists";
-import "tinymce/plugins/wordcount"; // 引入富文本编辑器主题的js和css
-import "tinymce/themes/silver/theme.min.js";
-import "tinymce/skins/ui/oxide/skin.min.css"; // 以上所有的样式在 node_modules 下面 tinymce 里面的 plugins 都能找到。
-const tinymceHtml = ref<string>("");
-const init = {
-  //初始化数据selector: 'textarea',height: 300, // 限制高度statusbar: false,object_resizing: false,image_description: false,image_dimensions: false, // 禁止操作图片plugins: 'link lists image code table wordcount', // 富文本插件font_size_formats: '8px 10px 12px 14px 16px 18px 24px 36px 48px 128px',font_family_formats:'微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif',toolbar:'undo redo fontfamily fontsize fontname bold italic underline strikethrough | fontsizeselect | forecolor | alignleft aligncenter alignright',branding: false, // //是否禁用“Powered by TinyMCE”menubar: false, //顶部菜单栏显示paste_data_images: false, // 禁止粘贴图片
-};
-
-const emits = defineEmits<{
-  (event: "update:bindHtml", val: string): void; // 富文本内容
-}>();
-
-onMounted(() => {
-  tinymce.init({}); // 初始化富文本
-}); // 实现双向绑定
-
-watch(
-  () => tinymceHtml.value,
-  () => {
-    emits("update:bindHtml", tinymce.activeEditor!.getContent());
-  }
-);
-</script>

+ 9 - 4
src/views/connect/E-mail/mail/com/mailWrite.vue

@@ -351,7 +351,7 @@ const handleReset = () => {
   bcc.value = [];
   fileList.value = [];
   fileListCopy.value = [];
-  // contentEditor.value.changeHtml("");
+  contentEditor.value.changeHtml("");
 };
 
 const handleSend = () => {
@@ -505,13 +505,15 @@ const querySearchPerson = (queryString, callback) => {
 };
 
 const pushTo = () => {
-  if (mailStore.currentMenu.reMail) {
+  if (mailStore.currentMenu.reMail && mailStore.currentMenu.reMail.email) {
     to.value = [
       {
         address: mailStore.currentMenu.reMail.email,
         personal: mailStore.currentMenu.reMail.personal,
       },
     ];
+  } else {
+    to.value = [];
   }
 };
 const handleReplyInit = (allData, pageType) => {
@@ -588,9 +590,9 @@ const handleReplyInit = (allData, pageType) => {
 const init = () => {
   if (mailStore.currentMenu.pageType === "0") {
     handleReset();
+    pushTo();
     formData.data.replyTo = mailStore.selectMail.mailUser;
     handleChangeReply(formData.data.replyTo);
-    pushTo();
   } else if (mailStore.currentMenu.pageType === "10") {
     handleReplyInit(mailStore.currentMenu, "10");
   } else if (mailStore.currentMenu.pageType === "20") {
@@ -609,9 +611,9 @@ watch(
   (val) => {
     if (val === "0") {
       handleReset();
+      pushTo();
       formData.data.replyTo = mailStore.selectMail.mailUser;
       handleChangeReply(formData.data.replyTo);
-      pushTo();
     } else if (val === "10") {
       handleReplyInit(mailStore.currentMenu, "10");
     } else if (val === "20") {
@@ -630,7 +632,10 @@ watch(
   () => mailStore.currentMenu.reMail,
   (val) => {
     if (val && mailStore.currentMenu.pageType === "0") {
+      handleReset();
       pushTo();
+      formData.data.replyTo = mailStore.selectMail.mailUser;
+      handleChangeReply(formData.data.replyTo);
     }
   }
 );

+ 22 - 2
src/views/connect/E-mail/mail/com/right/purchase/index.vue

@@ -33,9 +33,23 @@
       v-loading="loading"
       :height="tableHeight"
     >
-      <el-table-column prop="code" label="单号" width="100" fixed="left" />
+      <el-table-column prop="code" label="单号" width="120" fixed="left">
+      </el-table-column>
       <el-table-column prop="createTime" label="日期" width="150" />
-      <el-table-column prop="supplyName" label="供应商" min-width="150" />
+      <el-table-column prop="supplyName" label="供应商" min-width="150">
+        <template #default="{ row }">
+          <el-tooltip
+            class="box-item"
+            effect="dark"
+            :content="row.supplyName"
+            placement="top"
+          >
+            <div class="contentClass">
+              {{ row.supplyName }}
+            </div>
+          </el-tooltip>
+        </template>
+      </el-table-column>
       <el-table-column prop="amount" label="采购总价" width="100">
         <template #default="{ row }">
           <div>{{ moneyFormat(row.amount, 2) }}</div>
@@ -147,4 +161,10 @@ onMounted(() => {});
 :deep(.el-table .el-table__cell) {
   padding: 2px 0px;
 }
+.contentClass {
+  cursor: pointer;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
 </style>

+ 2 - 2
src/views/purchaseManage/purchaseManage/arrival/index.vue

@@ -234,10 +234,10 @@ const config = computed(() => {
     {
       attrs: {
         label: "物品类型",
-        prop: "productType",
+        prop: "productDefinition",
       },
       render(type) {
-        return proxy.dictValueLabel(type, productType.value);
+        return type == 1 ? "产品" : "物料";
       },
     },
 

+ 1 - 0
src/views/purchaseManage/purchaseManage/purchase/index.vue

@@ -466,6 +466,7 @@ const start = () => {
       path: "/platform_manage/process/processApproval",
       query: {
         flowKey: "purchase_flow",
+        random: proxy.random(),
         ids,
       },
     });

+ 19 - 15
src/views/salesMange/shipmentMange/packing/index.vue

@@ -167,7 +167,7 @@
                 >
                   <el-input-number
                     v-model="item.netWeight"
-                    :precision="0"
+                    :precision="2"
                     :controls="false"
                     :min="0"
                     placeholder="请输入"
@@ -184,7 +184,7 @@
                 >
                   <el-input-number
                     v-model="item.roughWeight"
-                    :precision="0"
+                    :precision="2"
                     :controls="false"
                     :min="0"
                     placeholder="请输入"
@@ -832,6 +832,7 @@ const handleClickPacking = () => {
       item.packQuantity,
       formData.data.packDetailList.length - 1
     );
+    selectProductData.value = [];
   } else {
     return ElMessage({
       message: "请选择产品 !",
@@ -841,33 +842,35 @@ const handleClickPacking = () => {
 };
 
 const handleChangePackQuantity = (val, index) => {
-  // if (val && val > 0) {
-  // 转为map对象
   const obj = {};
   for (let i = 0; i < formData.data.contractProductData.length; i++) {
     const e = formData.data.contractProductData[i];
-    obj[e.contractId + ""] = Number(e.cpQuantity) - Number(e.sumPackQuantity);
+    obj[e.contractId + "_" + e.productId + ""] =
+      Number(e.cpQuantity) - Number(e.sumPackQuantity);
   }
   // 计算数量 即装箱数量 * 箱数 新增字段放在最外层
   for (let i = 0; i < formData.data.packDetailList.length; i++) {
     const ele = formData.data.packDetailList[i];
     for (let j = 0; j < ele.packDetailProductList.length; j++) {
       const jele = ele.packDetailProductList[j];
-      ele[jele.contractId + ""] = Number(ele.packQuantity) * jele.quantity;
+      ele[jele.contractId + "_" + jele.productId + ""] =
+        Number(ele.packQuantity) * jele.quantity;
     }
   }
   // 计算新的待装箱数量
   for (let i = 0; i < formData.data.packDetailList.length; i++) {
     const e = formData.data.packDetailList[i];
     for (const key in obj) {
-      obj[key] = obj[key] - e[key];
-      if (obj[key] < 0) {
-        e.packQuantity = null;
-        handleChangePackQuantity(null, index);
-        return ElMessage({
-          message: "装箱数量 * 箱数不可大于待装箱数量",
-          type: "info",
-        });
+      if (e.hasOwnProperty(key)) {
+        obj[key] = obj[key] - e[key];
+        if (obj[key] < 0) {
+          e.packQuantity = null;
+          handleChangePackQuantity(null, index);
+          return ElMessage({
+            message: "装箱数量 * 箱数不可大于待装箱数量",
+            type: "info",
+          });
+        }
       }
     }
   }
@@ -875,7 +878,7 @@ const handleChangePackQuantity = (val, index) => {
   for (let i = 0; i < formData.data.contractProductData.length; i++) {
     const e = formData.data.contractProductData[i];
     for (const key in obj) {
-      if (e.contractId === key) {
+      if (e.contractId + "_" + e.productId + "" === key) {
         e.waitQuantity = obj[key];
       }
     }
@@ -927,6 +930,7 @@ const handleChangeContract = (val) => {
         waitQuantity: Number(x.cpQuantity) - Number(x.sumPackQuantity),
         quantity: null,
       }));
+      handleChangePackQuantity();
     });
 };