Browse Source

ehsd 交接单发起采购

lxf 1 year ago
parent
commit
e2d998a181

+ 17 - 11
src/components/Editor/index.vue

@@ -58,17 +58,20 @@ const handleUpload = (e) => {
   }
   const formdata = new FormData();
   formdata.append("file", files[0]);
-  backsite.uploadFile(formdata)
-    .then(res => {
-      if (res.data.url) {
-        const quill = toRaw(myQuillEditor.value).getQuill()
-        const length = quill.getSelection().index
-        // 插入图片,res为服务器返回的图片链接地址
-        quill.insertEmbed(length, 'image', res.data.url)
-        // 调整光标到最后
-        quill.setSelection(length + 1)
-      }
-    })
+  backsite.uploadFile(formdata).then((res) => {
+    if (res.data.url) {
+      const quill = toRaw(myQuillEditor.value).getQuill();
+      const length = quill.getSelection().index;
+      // 插入图片,res为服务器返回的图片链接地址
+      quill.insertEmbed(length, "image", res.data.url);
+      // 调整光标到最后
+      quill.setSelection(length + 1);
+    }
+  });
+};
+const changeHtml = (val) => {
+  toRaw(myQuillEditor.value).setHTML(val);
+  setValue()
 };
 onMounted(() => {
   const quill = toRaw(myQuillEditor.value).getQuill();
@@ -77,6 +80,9 @@ onMounted(() => {
   }
   toRaw(myQuillEditor.value).setHTML(props.value);
 });
+defineExpose({
+  changeHtml,
+});
 </script>
 <style scoped lang="scss">
 :deep(.ql-editor) {

+ 1 - 1
src/components/process/Contract.vue

@@ -901,7 +901,6 @@ const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
 const submitHandoverForm = () => {
-  formData.data.contractProductList[productIndex.value].remark = productRow.data.remark;
   if (fileList.value && fileList.value.length > 0) {
     for (let i = 0; i < fileList.value.length; i++) {
       if (fileList.value[i].raw.uploadState) {
@@ -920,6 +919,7 @@ const submitHandoverForm = () => {
   } else {
     formData.data.contractProductList[productIndex.value].fileList = [];
   }
+  formData.data.contractProductList[productIndex.value].remark = productRow.data.remark;
   openHandover.value = false;
 };
 const handleRemove = async (index, row) => {

File diff suppressed because it is too large
+ 429 - 351
src/components/process/EHSD/Purchase.vue


+ 1 - 1
src/views/EHSD/procurement/handoverSlipEHSD/index.vue

@@ -226,7 +226,7 @@ const clickPurchase = (row) => {
       random: proxy.random(),
       tenantType: "EHSD",
       ids: ids,
-      type: 0,
+      type: 1,
     },
   });
 };

+ 1 - 1
src/views/EHSD/procurement/handoverSlipSampleEHSD/index.vue

@@ -226,7 +226,7 @@ const clickPurchase = (row) => {
       random: proxy.random(),
       tenantType: "EHSD",
       ids: ids,
-      type: 1,
+      type: 2,
     },
   });
 };

Some files were not shown because too many files changed in this diff