Эх сурвалжийг харах

审批handleType字段为空问题

cz 1 жил өмнө
parent
commit
02c3dd33f3

+ 11 - 0
src/views/finance/fundManage/accountPayment/index.vue

@@ -191,6 +191,9 @@
       <PaymentPDF v-else :rowData="rowData"></PaymentPDF>
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
+        <el-button type="primary" v-print="printObj" size="large"
+          >打印</el-button
+        >
         <el-button type="primary" @click="clickDownload()" size="large"
           >下载PDF</el-button
         >
@@ -1067,6 +1070,14 @@ const handleOpenFile = (row) => {
 const openFile = (item) => {
   window.open(item.fileUrl, "_blank");
 };
+
+const printObj = ref({
+  id: "pdfDom",
+  popTitle: "",
+  extraCss:
+    "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
+  extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
+});
 </script>
 
 <style lang="scss" scoped>

+ 10 - 0
src/views/finance/fundManage/funds/index.vue

@@ -44,6 +44,9 @@
       <FundsPDF :rowData="rowData"></FundsPDF>
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
+        <el-button type="primary" v-print="printObj" size="large"
+          >打印</el-button
+        >
         <el-button type="primary" @click="clickDownload()" size="large"
           >下载PDF</el-button
         >
@@ -612,6 +615,13 @@ const pushProcessApproval = (row) => {
   });
   return;
 };
+const printObj = ref({
+  id: "pdfDom",
+  popTitle: "",
+  extraCss:
+    "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
+  extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
+});
 </script>
 
 <style lang="scss" scoped>

+ 3 - 2
src/views/process/processApproval/index.vue

@@ -290,6 +290,7 @@ const makeDom = ref(null);
 const flowFormDom = ref(null);
 let dialogVisible = ref(false);
 const nextHandleUser = ref([]);
+const handleType = ref(null);
 const handleSelectUser = () => {
   if (!flowForm.handleUserId) {
     return ElMessage({
@@ -297,7 +298,7 @@ const handleSelectUser = () => {
       type: "info",
     });
   }
-  handleSubmit();
+  handleSubmit(handleType.value);
 };
 const handleResult = (res) => {
   if (res.userList == null && res.success) {
@@ -329,9 +330,9 @@ const handleSuccess = (any, UploadFile) => {
 const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
-
 // 提交逻辑
 const handleSubmit = async (_type) => {
+  handleType.value = _type ? _type : undefined;
   try {
     // 调用发起组件的提交事件
     const flag = await makeDom.value.handleSubmit();