cz 1 yıl önce
ebeveyn
işleme
ea234d9cd9

+ 5 - 3
src/components/process/SendFunds.vue

@@ -1218,9 +1218,11 @@ onMounted(() => {
           })
           .then((fileObj) => {
             if (fileObj[route.query.businessId]) {
-              formData.data.fileList = fileObj[route.query.businessId].map(
-                (x) => ({ raw: x, name: x.fileName, url: x.fileUrl })
-              );
+              fileList.value = fileObj[route.query.businessId].map((x) => ({
+                raw: x,
+                name: x.fileName,
+                url: x.fileUrl,
+              }));
             }
           });
       });

+ 117 - 10
src/views/finance/fundManage/accountPayment/index.vue

@@ -21,7 +21,11 @@
           </div>
         </template>
         <template #file="{ item }">
-          <div style="width: 100%">aa</div>
+          <div style="width: 100%">
+            <el-button type="primary" text @click="handleOpenFile(item)"
+              >查看</el-button
+            >
+          </div>
         </template>
       </byTable>
     </div>
@@ -231,6 +235,60 @@
         >
       </template>
     </el-dialog>
+
+    <el-dialog
+      title="关联附件"
+      v-if="openFileDialog"
+      v-model="openFileDialog"
+      width="500"
+    >
+      <byForm
+        :formConfig="fileConfig"
+        :formOption="formOption"
+        v-model="fileData.data"
+      >
+        <template #businessFile>
+          <div
+            style="width: 100%"
+            v-if="fileData.data && fileData.data.fileList.length > 0"
+          >
+            <div v-for="(item, index) in fileData.data.fileList" :key="index">
+              <div
+                style="cursor: pointer; color: #409eff"
+                @click="openFile(item)"
+              >
+                {{ item.fileName }}
+              </div>
+            </div>
+          </div>
+          <div v-else>暂无关联</div>
+        </template>
+        <template #fundsFile>
+          <div
+            style="width: 100%"
+            v-if="fileData.data && fileData.data.fileListOne.length > 0"
+          >
+            <div
+              v-for="(item, index) in fileData.data.fileListOne"
+              :key="index"
+            >
+              <div
+                style="cursor: pointer; color: #409eff"
+                @click="openFile(item)"
+              >
+                {{ item.fileName }}
+              </div>
+            </div>
+          </div>
+          <div v-else>暂无关联</div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="openFileDialog = false" size="large"
+          >取 消</el-button
+        >
+      </template>
+    </el-dialog>
   </div>
 </template>
 
@@ -238,7 +296,7 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
-import { computed, ref } from "vue";
+import { computed, reactive, ref } from "vue";
 import moment from "moment";
 import useUserStore from "@/store/modules/user";
 import FundsPDF from "@/components/PDF/fundsPDF.vue";
@@ -352,14 +410,6 @@ const config = computed(() => {
         align: "right",
       },
     },
-    // {
-    //   attrs: {
-    //     label: "关联附件",
-    //     slot: "file",
-    //     width: 200,
-    //     align: "left",
-    //   },
-    // },
     {
       attrs: {
         label: "款项说明",
@@ -369,6 +419,14 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "关联附件",
+        slot: "file",
+        width: 80,
+        align: "left",
+      },
+    },
+    {
+      attrs: {
         label: "打款状态",
         prop: "status",
         width: 120,
@@ -960,6 +1018,55 @@ const clickDetail = () => {
   submitType.value = "edit";
   getDtl(rowData.value);
 };
+const fileData = reactive({
+  data: {},
+});
+const fileConfig = computed(() => [
+  {
+    type: "title",
+    title: "业务附件",
+  },
+  {
+    type: "slot",
+    slotName: "businessFile",
+    // label: "业务附件",
+  },
+  {
+    type: "title",
+    title: "打款附件",
+  },
+  {
+    type: "slot",
+    slotName: "fundsFile",
+    // label: "打款附件",
+  },
+]);
+
+const openFileDialog = ref(false);
+const handleOpenFile = (row) => {
+  fileData.data = {
+    fileList: [],
+    fileListOne: [],
+  };
+  proxy
+    .post("/fileInfo/getList", { businessIdList: [row.businessId] })
+    .then((fileObj) => {
+      if (fileObj[row.businessId] && fileObj[row.businessId].length > 0) {
+        fileData.data.fileList = fileObj[row.businessId];
+      }
+    });
+  proxy
+    .post("/fileInfo/getList", { businessIdList: [row.id] })
+    .then((fileObj) => {
+      if (fileObj[row.id] && fileObj[row.id].length > 0) {
+        fileData.data.fileListOne = fileObj[row.id];
+      }
+    });
+  openFileDialog.value = true;
+};
+const openFile = (item) => {
+  window.open(item.fileUrl, "_blank");
+};
 </script>
 
 <style lang="scss" scoped>

+ 13 - 7
src/views/index.vue

@@ -26,7 +26,7 @@
       </ul>
     </div>
     <div class="table-warp">
-      <div class="card">
+      <div class="card odd">
         <div class="commons-title">我的待审批</div>
         <el-table :data="toBeProcessedData.rows" style="width: 100%">
           <el-table-column prop="flowName" label="流程类型" width="100" />
@@ -47,10 +47,10 @@
           </el-table-column>
         </el-table>
       </div>
-      <div class="card">
+      <div class="card even">
         <div class="commons-title">业务提醒</div>
       </div>
-      <div class="card">
+      <div class="card odd">
         <div class="commons-title">我的发起(未结束)</div>
         <el-table :data="haveInitiatedData.rows" style="width: 100%">
           <el-table-column prop="flowName" label="流程类型" width="100" />
@@ -71,7 +71,7 @@
           </el-table-column>
         </el-table>
       </div>
-      <div class="card">
+      <div class="card even">
         <div class="commons-title">系统公告</div>
         <ul class="announcement">
           <li v-for="i in sendMegData.rows" :key="i.id">
@@ -260,7 +260,6 @@ onMounted(() => {});
     border-radius: 5px;
 
     .card {
-      width: calc(50% - 10px);
       height: calc(50% - 10px);
       background: #fff;
       float: left;
@@ -268,9 +267,16 @@ onMounted(() => {});
       padding: 20px;
       overflow-y: auto;
     }
-    .card:nth-child(2n + 1) {
-      margin-right: 20px;
+    .odd {
+      width: calc(66.5% - 10px);
     }
+    .even {
+      margin-left: 20px;
+      width: calc(33.5% - 10px);
+    }
+    // .card:nth-child(2n + 1) {
+    //   margin-right: 20px;
+    // }
     .card:nth-child(1) {
       margin-bottom: 20px;
     }